1"use strict"; 2var __importDefault = (this && this.__importDefault) || function (mod) { 3 return (mod && mod.__esModule) ? mod : { "default": mod }; 4}; 5Object.defineProperty(exports, "__esModule", { value: true }); 6exports.validateConfig = void 0; 7const ajv_1 = __importDefault(require("ajv")); 8const schema = { 9 type: 'object', 10 properties: { 11 tryToLaunchLastOpenedBundle: { type: 'boolean', nullable: true }, 12 android: { 13 type: 'object', 14 properties: { 15 tryToLaunchLastOpenedBundle: { type: 'boolean', nullable: true }, 16 }, 17 nullable: true, 18 }, 19 ios: { 20 type: 'object', 21 properties: { 22 tryToLaunchLastOpenedBundle: { type: 'boolean', nullable: true }, 23 }, 24 nullable: true, 25 }, 26 }, 27}; 28/** 29 * @ignore 30 */ 31function validateConfig(config) { 32 const validate = new ajv_1.default({ allowUnionTypes: true }).compile(schema); 33 if (!validate(config)) { 34 throw new Error('Invalid expo-dev-launcher config: ' + JSON.stringify(validate.errors)); 35 } 36 return config; 37} 38exports.validateConfig = validateConfig; 39