"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveEntryPoint = resolveEntryPoint; function _paths() { const data = require("@expo/config/paths"); _paths = function () { return data; }; return data; } function _path() { const data = _interopRequireDefault(require("path")); _path = function () { return data; }; return data; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const supportedPlatforms = ['ios', 'android', 'web']; function resolveEntryPoint(projectRoot, platform, projectConfig) { if (platform && !supportedPlatforms.includes(platform)) { throw new Error(`Failed to resolve the project's entry file: The platform "${platform}" is not supported.`); } // TODO: Bacon: support platform extension resolution like .ios, .native // const platforms = [platform, 'native'].filter(Boolean) as string[]; const platforms = []; const entry = (0, _paths().getEntryPoint)(projectRoot, ['./index'], platforms, projectConfig); if (!entry) throw new Error(`The project entry file could not be resolved. Please either define it in the \`package.json\` (main), \`app.json\` (expo.entryPoint), create an \`index.js\`, or install the \`expo\` package.`); return _path().default.relative(projectRoot, entry); } //# sourceMappingURL=resolveEntryPoint.js.map