@expo/config 57.0.1 → 57.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/Config.js CHANGED
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  var _exportNames = {
7
5
  getPlatformsFromConfig: true,
8
6
  getConfig: true,
@@ -114,12 +112,7 @@ Object.keys(_Config).forEach(function (key) {
114
112
  if (key === "default" || key === "__esModule") return;
115
113
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
116
114
  if (key in exports && exports[key] === _Config[key]) return;
117
- Object.defineProperty(exports, key, {
118
- enumerable: true,
119
- get: function () {
120
- return _Config[key];
121
- }
122
- });
115
+ exports[key] = _Config[key];
123
116
  });
124
117
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
125
118
  let hasWarnedAboutRootConfig = false;
@@ -1 +1 @@
1
- {"version":3,"file":"Config.js","names":["_jsonFile","data","_interopRequireDefault","require","_requireUtils","_deepmerge","_glob","_path","_semver","_slugify","_getConfig","_getExpoSDKVersion","_withConfigPlugins","_withInternal","_resolvePackageJson","_Config","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","e","__esModule","default","hasWarnedAboutRootConfig","reduceExpoObject","config","expo","filter","length","ansiYellow","str","ansiGray","ansiBold","plural","console","warn","map","join","mods","getSupportedPlatforms","projectRoot","exp","platforms","resolveFrom","push","experiments","outOfTreePlatforms","getPlatformsFromConfig","platform","getConfig","options","paths","getConfigFilePaths","rawStaticConfig","staticConfigPath","getStaticConfig","rootConfig","staticConfig","packageJson","packageJsonPath","getPackageJsonAndPath","fillAndReturnConfig","dynamicConfigObjectType","mayHaveUnusedStaticConfig","configWithDefaultValues","ensureConfigHasDefaultValues","pkg","skipSDKVersionRequirement","dynamicConfigPath","hasUnusedStaticConfig","isModdedConfig","withConfigPlugins","skipPlugins","isPublicConfig","_internal","hooks","ios","android","updates","codeSigningCertificate","codeSigningMetadata","getContextConfig","exportedObjectType","rawDynamicConfig","getDynamicConfig","dynamicConfig","getPackageJson","getRootPackageJsonPath","JsonFile","read","getDynamicConfigFilePath","getStaticConfigFilePath","DYNAMIC_CONFIG_EXTS","extensions","modifyConfigAsync","modifications","readOptions","writeOptions","isDryRun","dryRun","outputConfig","mergeConfigModifications","configPath","path","writeAsync","json5","type","message","relative","newConfig","newConfighasModifications","isMatchingObject","plugins","modifiedExpoConfig","deepMerge","existingPlugins","fromEntries","definition","undefined","plugin","pluginName","pluginProps","Array","isArray","existingPlugin","existingPluginName","finalizedConfig","expectedValues","actualValues","withInternal","pkgName","name","basename","pkgVersion","version","pkgWithDefaults","slug","slugify","toLowerCase","description","expWithDefaults","sdkVersion","getExpoSDKVersion","error","DEFAULT_BUILD_PATH","getWebOutputPath","process","env","WEBPACK_BUILD_OUTPUT_PATH","web","build","output","getNameFromConfig","appManifest","appName","displayName","webName","getDefaultTarget","semver","lt","isBareWorkflowProject","dependencies","expokit","xcodeprojFiles","globSync","absolute","cwd","gradleFiles","getProjectConfigDescription","getProjectConfigDescriptionWithPaths","projectConfig","relativeDynamicConfigPath"],"sources":["../src/Config.ts"],"sourcesContent":["import type { ModConfig } from '@expo/config-plugins';\nimport type { JSONObject } from '@expo/json-file';\nimport JsonFile from '@expo/json-file';\nimport { resolveFrom } from '@expo/require-utils';\nimport deepMerge from 'deepmerge';\nimport { sync as globSync } from 'glob';\nimport path from 'path';\nimport semver from 'semver';\nimport slugify from 'slugify';\n\nimport type {\n AppJSONConfig,\n ConfigFilePaths,\n ExpoConfig,\n GetConfigOptions,\n PackageJSONConfig,\n Platform,\n ProjectConfig,\n ProjectTarget,\n WriteConfigOptions,\n} from './Config.types';\nimport { getDynamicConfig, getStaticConfig } from './getConfig';\nimport { getExpoSDKVersion } from './getExpoSDKVersion';\nimport { withConfigPlugins } from './plugins/withConfigPlugins';\nimport { withInternal } from './plugins/withInternal';\nimport { getRootPackageJsonPath } from './resolvePackageJson';\n\ntype SplitConfigs = { expo?: ExpoConfig; mods?: ModConfig };\n\nlet hasWarnedAboutRootConfig = false;\n\n/**\n * If a config has an `expo` object then that will be used as the config.\n * This method reduces out other top level values if an `expo` object exists.\n *\n * @param config Input config object to reduce\n */\nfunction reduceExpoObject(config?: any): SplitConfigs | null {\n if (!config) return config || null;\n\n if (config.expo && !hasWarnedAboutRootConfig) {\n const keys = Object.keys(config).filter((key) => key !== 'expo');\n if (keys.length) {\n hasWarnedAboutRootConfig = true;\n const ansiYellow = (str: string) => `\\u001B[33m${str}\\u001B[0m`;\n const ansiGray = (str: string) => `\\u001B[90m${str}\\u001B[0m`;\n const ansiBold = (str: string) => `\\u001B[1m${str}\\u001B[22m`;\n const plural = keys.length > 1;\n console.warn(\n ansiYellow(\n ansiBold('Warning: ') +\n `Root-level ${ansiBold(`\"expo\"`)} object found. Ignoring extra key${plural ? 's' : ''} in Expo config: ${keys\n .map((key) => `\"${key}\"`)\n .join(', ')}\\n` +\n ansiGray(`Learn more: https://expo.fyi/root-expo-object`)\n )\n );\n }\n }\n\n const { mods, ...expo } = config.expo ?? config;\n\n return {\n expo,\n mods,\n };\n}\n\n/**\n * Get all platforms that a project is currently capable of running.\n *\n * @param projectRoot\n * @param exp\n */\nfunction getSupportedPlatforms(projectRoot: string, exp: Partial<ExpoConfig>): Platform[] {\n const platforms: Platform[] = [];\n if (resolveFrom(projectRoot, 'react-native/package.json')) {\n platforms.push('ios', 'android');\n }\n if (resolveFrom(projectRoot, 'react-dom/package.json')) {\n platforms.push('web');\n }\n if (exp.experiments?.outOfTreePlatforms) {\n if (resolveFrom(projectRoot, 'react-native-tvos/package.json')) {\n platforms.push('tvos');\n }\n if (resolveFrom(projectRoot, 'react-native-macos/package.json')) {\n platforms.push('macos');\n }\n }\n return platforms;\n}\n\n/**\n * Resolves the platforms a project targets, as configured or detected.\n *\n * @param projectRoot\n * @param exp\n */\nexport function getPlatformsFromConfig(projectRoot: string, exp: Partial<ExpoConfig>): Platform[] {\n let platforms =\n (exp?.platforms as Platform[] | undefined) ?? getSupportedPlatforms(projectRoot, exp);\n // TODO(@kitten): Update when XDL schema is modified\n if (!exp.experiments?.outOfTreePlatforms) {\n platforms = platforms.filter(\n (platform) => platform === 'android' || platform === 'ios' || platform === 'web'\n );\n }\n return platforms;\n}\n\n/**\n * Evaluate the config for an Expo project.\n * If a function is exported from the `app.config.js` then a partial config will be passed as an argument.\n * The partial config is composed from any existing app.json, and certain fields from the `package.json` like name and description.\n *\n * If options.isPublicConfig is true, the Expo config will include only public-facing options (omitting private keys).\n * The resulting config should be suitable for hosting or embedding in a publicly readable location.\n *\n * **Example**\n * ```js\n * module.exports = function({ config }) {\n * // mutate the config before returning it.\n * config.slug = 'new slug'\n * return { expo: config };\n * }\n * ```\n *\n * **Supports**\n * - `app.config.ts`\n * - `app.config.js`\n * - `app.config.json`\n * - `app.json`\n *\n * @param projectRoot the root folder containing all of your application code\n * @param options enforce criteria for a project config\n */\nexport function getConfig(projectRoot: string, options: GetConfigOptions = {}): ProjectConfig {\n const paths = getConfigFilePaths(projectRoot);\n\n const rawStaticConfig = paths.staticConfigPath ? getStaticConfig(paths.staticConfigPath) : null;\n // For legacy reasons, always return an object.\n const rootConfig = (rawStaticConfig || {}) as AppJSONConfig;\n const staticConfig = reduceExpoObject(rawStaticConfig) || {};\n\n // Can only change the package.json location if an app.json or app.config.json exists\n const [packageJson, packageJsonPath] = getPackageJsonAndPath(projectRoot);\n\n function fillAndReturnConfig(\n config: SplitConfigs,\n dynamicConfigObjectType: string | null,\n mayHaveUnusedStaticConfig: boolean = false\n ) {\n const configWithDefaultValues = {\n ...ensureConfigHasDefaultValues({\n projectRoot,\n exp: config.expo || {},\n pkg: packageJson,\n skipSDKVersionRequirement: options.skipSDKVersionRequirement,\n paths,\n packageJsonPath,\n }),\n mods: config.mods,\n dynamicConfigObjectType,\n rootConfig,\n dynamicConfigPath: paths.dynamicConfigPath,\n staticConfigPath: paths.staticConfigPath,\n hasUnusedStaticConfig:\n !!paths.staticConfigPath && !!paths.dynamicConfigPath && mayHaveUnusedStaticConfig,\n };\n\n if (options.isModdedConfig) {\n // @ts-ignore: Add the mods back to the object.\n configWithDefaultValues.exp.mods = config.mods ?? null;\n }\n\n // Apply static json plugins, should be done after _internal\n configWithDefaultValues.exp = withConfigPlugins(\n configWithDefaultValues.exp,\n !!options.skipPlugins\n );\n\n if (!options.isModdedConfig) {\n // @ts-ignore: Delete mods added by static plugins when they won't have a chance to be evaluated\n delete configWithDefaultValues.exp.mods;\n }\n\n if (options.isPublicConfig) {\n // TODD(EvanBacon): Drop plugins array after it's been resolved.\n\n // Remove internal values with references to user's file paths from the public config.\n delete configWithDefaultValues.exp._internal;\n\n // hooks no longer exists in the typescript type but should still be removed\n if ('hooks' in configWithDefaultValues.exp) {\n delete configWithDefaultValues.exp.hooks;\n }\n if (configWithDefaultValues.exp.ios?.config) {\n delete configWithDefaultValues.exp.ios.config;\n }\n if (configWithDefaultValues.exp.android?.config) {\n delete configWithDefaultValues.exp.android.config;\n }\n\n delete configWithDefaultValues.exp.updates?.codeSigningCertificate;\n delete configWithDefaultValues.exp.updates?.codeSigningMetadata;\n }\n\n return configWithDefaultValues;\n }\n\n // Fill in the static config\n function getContextConfig(config: SplitConfigs) {\n return ensureConfigHasDefaultValues({\n projectRoot,\n exp: config.expo || {},\n pkg: packageJson,\n skipSDKVersionRequirement: true,\n paths,\n packageJsonPath,\n }).exp;\n }\n\n if (paths.dynamicConfigPath) {\n // No app.config.json or app.json but app.config.js\n const {\n exportedObjectType,\n config: rawDynamicConfig,\n mayHaveUnusedStaticConfig,\n } = getDynamicConfig(paths.dynamicConfigPath, {\n projectRoot,\n staticConfigPath: paths.staticConfigPath,\n packageJsonPath,\n config: getContextConfig(staticConfig),\n });\n // Allow for the app.config.js to `export default null;`\n // Use `dynamicConfigPath` to detect if a dynamic config exists.\n const dynamicConfig = reduceExpoObject(rawDynamicConfig) || {};\n return fillAndReturnConfig(dynamicConfig, exportedObjectType, mayHaveUnusedStaticConfig);\n }\n\n // No app.config.js but json or no config\n return fillAndReturnConfig(staticConfig || {}, null);\n}\n\nexport function getPackageJson(projectRoot: string): PackageJSONConfig {\n const [pkg] = getPackageJsonAndPath(projectRoot);\n return pkg;\n}\n\nfunction getPackageJsonAndPath(projectRoot: string): [PackageJSONConfig, string] {\n const packageJsonPath = getRootPackageJsonPath(projectRoot);\n return [JsonFile.read(packageJsonPath), packageJsonPath];\n}\n\n/**\n * Get the static and dynamic config paths for a project. Also accounts for custom paths.\n *\n * @param projectRoot\n */\nexport function getConfigFilePaths(projectRoot: string): ConfigFilePaths {\n return {\n dynamicConfigPath: getDynamicConfigFilePath(projectRoot),\n staticConfigPath: getStaticConfigFilePath(projectRoot),\n };\n}\n\nconst DYNAMIC_CONFIG_EXTS = ['.ts', '.mts', '.cts', '.mjs', '.cjs', '.js'];\n\nfunction getDynamicConfigFilePath(projectRoot: string): string | null {\n return resolveFrom(projectRoot, './app.config', { extensions: DYNAMIC_CONFIG_EXTS });\n}\n\nfunction getStaticConfigFilePath(projectRoot: string): string | null {\n return resolveFrom(projectRoot, './app.config.json') ?? resolveFrom(projectRoot, './app.json');\n}\n\n/**\n * Attempt to modify an Expo project config.\n * This will only fully work if the project is using static configs only.\n * Otherwise 'warn' | 'fail' will return with a message about why the config couldn't be updated.\n * The potentially modified config object will be returned for testing purposes.\n *\n * @param projectRoot\n * @param modifications modifications to make to an existing config\n * @param readOptions options for reading the current config file\n * @param writeOptions If true, the static config file will not be rewritten\n */\nexport async function modifyConfigAsync(\n projectRoot: string,\n modifications: Partial<ExpoConfig>,\n readOptions: GetConfigOptions = {},\n writeOptions: WriteConfigOptions = {}\n): Promise<{\n type: 'success' | 'warn' | 'fail';\n message?: string;\n config: ExpoConfig | null;\n}> {\n const config = getConfig(projectRoot, readOptions);\n const isDryRun = writeOptions.dryRun;\n\n // Create or modify the static config, when not using dynamic config\n if (!config.dynamicConfigPath) {\n const outputConfig = mergeConfigModifications(config, modifications);\n\n if (!isDryRun) {\n const configPath = config.staticConfigPath ?? path.join(projectRoot, 'app.json');\n await JsonFile.writeAsync(configPath, outputConfig, { json5: false });\n }\n\n return { type: 'success', config: outputConfig.expo ?? outputConfig };\n }\n\n // Attempt to write to a function-like dynamic config, when used with a static config\n if (\n config.staticConfigPath &&\n config.dynamicConfigObjectType === 'function' &&\n !modifications.hasOwnProperty('plugins') // We don't know what plugins are in dynamic configs\n ) {\n const outputConfig = mergeConfigModifications(config, modifications);\n\n if (isDryRun) {\n return {\n type: 'warn',\n message: `Cannot verify config modifications in dry-run mode for config at: ${path.relative(projectRoot, config.dynamicConfigPath)}`,\n config: null,\n };\n }\n\n // Attempt to write the static config with the config modifications\n await JsonFile.writeAsync(config.staticConfigPath, outputConfig, { json5: false });\n\n // Verify that the dynamic config is using the static config\n const newConfig = getConfig(projectRoot, readOptions);\n const newConfighasModifications = isMatchingObject(modifications, newConfig.exp);\n if (newConfighasModifications) {\n return {\n type: 'success',\n config: newConfig.exp,\n };\n }\n\n // Rollback the changes when the reloaded config did not include the modifications\n await JsonFile.writeAsync(config.staticConfigPath, config.rootConfig, { json5: false });\n }\n\n // We cannot automatically write to a dynamic config\n return {\n type: 'warn',\n message: `Cannot automatically write to dynamic config at: ${path.relative(\n projectRoot,\n config.dynamicConfigPath\n )}`,\n config: null,\n };\n}\n\n/**\n * Merge the config modifications, using an optional possible top-level `expo` object.\n * Note, changes in the plugins are merged differently to avoid duplicate entries.\n */\nfunction mergeConfigModifications(\n config: ProjectConfig,\n { plugins, ...modifications }: Partial<ExpoConfig>\n): AppJSONConfig {\n const modifiedExpoConfig: ExpoConfig = !config.rootConfig.expo\n ? deepMerge(config.rootConfig, modifications)\n : deepMerge(config.rootConfig.expo, modifications);\n\n if (plugins?.length) {\n // When adding plugins, ensure the config has a plugin list\n if (!modifiedExpoConfig.plugins) {\n modifiedExpoConfig.plugins = [];\n }\n\n // Create a plugin lookup map\n const existingPlugins: Record<string, any> = Object.fromEntries(\n modifiedExpoConfig.plugins.map((definition) =>\n typeof definition === 'string' ? [definition, undefined] : definition\n )\n );\n\n for (const plugin of plugins) {\n // Unpack the plugin definition, using either the short (string) or normal (array) notation\n const [pluginName, pluginProps] = Array.isArray(plugin) ? plugin : [plugin];\n // Abort if the plugin definition is empty\n if (!pluginName) continue;\n\n // Add the plugin if it doesn't exist yet, including its properties\n if (!(pluginName in existingPlugins)) {\n modifiedExpoConfig.plugins.push(plugin);\n continue;\n }\n\n // If the plugin has properties, and it exists, merge the properties\n if (pluginProps) {\n modifiedExpoConfig.plugins = modifiedExpoConfig.plugins.map((existingPlugin) => {\n const [existingPluginName] = Array.isArray(existingPlugin)\n ? existingPlugin\n : [existingPlugin];\n\n // Do not modify other plugins\n if (existingPluginName !== pluginName) {\n return existingPlugin;\n }\n\n // Add the props to the existing plugin entry\n if (typeof existingPlugin === 'string') {\n return [existingPlugin, pluginProps];\n }\n\n // Merge the props to the existing plugin properties\n if (Array.isArray(existingPlugin) && existingPlugin[0]) {\n return [existingPlugin[0], deepMerge(existingPlugin[1] ?? {}, pluginProps)];\n }\n\n return existingPlugin;\n });\n continue;\n }\n\n // If the same plugin exists with properties, and the modification does not contain properties, ignore\n }\n }\n\n const finalizedConfig = !config.rootConfig.expo\n ? modifiedExpoConfig\n : { ...config.rootConfig, expo: modifiedExpoConfig };\n\n return finalizedConfig as AppJSONConfig;\n}\n\nfunction isMatchingObject<T extends Record<string, any>>(\n expectedValues: T,\n actualValues: T\n): boolean {\n for (const key in expectedValues) {\n if (!expectedValues.hasOwnProperty(key)) {\n continue;\n }\n\n if (typeof expectedValues[key] === 'object' && actualValues[key] !== null) {\n if (!isMatchingObject(expectedValues[key], actualValues[key])) {\n return false;\n }\n } else {\n if (expectedValues[key] !== actualValues[key]) {\n return false;\n }\n }\n }\n return true;\n}\n\nfunction ensureConfigHasDefaultValues({\n projectRoot,\n exp,\n pkg,\n paths,\n packageJsonPath,\n skipSDKVersionRequirement = false,\n}: {\n projectRoot: string;\n exp: Partial<ExpoConfig> | null;\n pkg: JSONObject;\n skipSDKVersionRequirement?: boolean;\n paths?: ConfigFilePaths;\n packageJsonPath?: string;\n}): { exp: ExpoConfig; pkg: PackageJSONConfig } {\n if (!exp) {\n exp = {};\n }\n exp = withInternal(exp as any, {\n projectRoot,\n ...(paths ?? {}),\n packageJsonPath,\n });\n // Defaults for package.json fields\n const pkgName = typeof pkg.name === 'string' ? pkg.name : path.basename(projectRoot);\n const pkgVersion = typeof pkg.version === 'string' ? pkg.version : '1.0.0';\n\n const pkgWithDefaults = { ...pkg, name: pkgName, version: pkgVersion };\n\n // Defaults for app.json/app.config.js fields\n const name = exp.name ?? pkgName;\n const slug = exp.slug ?? slugify(name.toLowerCase());\n const version = exp.version ?? pkgVersion;\n let description = exp.description;\n if (!description && typeof pkg.description === 'string') {\n description = pkg.description;\n }\n\n const expWithDefaults = { ...exp, name, slug, version, description };\n\n let sdkVersion;\n try {\n sdkVersion = getExpoSDKVersion(projectRoot, expWithDefaults);\n } catch (error) {\n if (!skipSDKVersionRequirement) throw error;\n }\n\n // TODO(@kitten): Remove once platforms are updated in XDL schema\n const platforms = getPlatformsFromConfig(projectRoot, exp) as NonNullable<\n ExpoConfig['platforms']\n >;\n\n return {\n exp: { ...expWithDefaults, sdkVersion, platforms },\n pkg: pkgWithDefaults,\n };\n}\n\nconst DEFAULT_BUILD_PATH = `web-build`;\n\nexport function getWebOutputPath(config: { [key: string]: any } = {}): string {\n if (process.env.WEBPACK_BUILD_OUTPUT_PATH) {\n return process.env.WEBPACK_BUILD_OUTPUT_PATH;\n }\n const expo = config.expo || config || {};\n return expo?.web?.build?.output || DEFAULT_BUILD_PATH;\n}\n\nexport function getNameFromConfig(exp: Record<string, any> = {}): {\n appName?: string;\n webName?: string;\n} {\n // For RN CLI support\n const appManifest = exp.expo || exp;\n const { web = {} } = appManifest;\n\n // rn-cli apps use a displayName value as well.\n const appName = exp.displayName || appManifest.displayName || appManifest.name;\n const webName = web.name || appName;\n\n return {\n appName,\n webName,\n };\n}\n\nexport function getDefaultTarget(\n projectRoot: string,\n exp?: Pick<ExpoConfig, 'sdkVersion'>\n): ProjectTarget {\n exp ??= getConfig(projectRoot, { skipSDKVersionRequirement: true }).exp;\n\n // before SDK 37, always default to managed to preserve previous behavior\n if (exp.sdkVersion && exp.sdkVersion !== 'UNVERSIONED' && semver.lt(exp.sdkVersion, '37.0.0')) {\n return 'managed';\n }\n return isBareWorkflowProject(projectRoot) ? 'bare' : 'managed';\n}\n\nfunction isBareWorkflowProject(projectRoot: string): boolean {\n const [pkg] = getPackageJsonAndPath(projectRoot);\n\n // TODO: Drop this\n if (pkg.dependencies && pkg.dependencies.expokit) {\n return false;\n }\n\n const xcodeprojFiles = globSync('ios/**/*.xcodeproj', {\n absolute: true,\n cwd: projectRoot,\n });\n if (xcodeprojFiles.length) {\n return true;\n }\n const gradleFiles = globSync('android/**/*.gradle', {\n absolute: true,\n cwd: projectRoot,\n });\n if (gradleFiles.length) {\n return true;\n }\n\n return false;\n}\n\n/**\n * Return a useful name describing the project config.\n * - dynamic: app.config.js\n * - static: app.json\n * - custom path app config relative to root folder\n * - both: app.config.js or app.json\n */\nexport function getProjectConfigDescription(projectRoot: string): string {\n const paths = getConfigFilePaths(projectRoot);\n return getProjectConfigDescriptionWithPaths(projectRoot, paths);\n}\n\n/**\n * Returns a string describing the configurations used for the given project root.\n * Will return null if no config is found.\n *\n * @param projectRoot\n * @param projectConfig\n */\nexport function getProjectConfigDescriptionWithPaths(\n projectRoot: string,\n projectConfig: ConfigFilePaths\n): string {\n if (projectConfig.dynamicConfigPath) {\n const relativeDynamicConfigPath = path.relative(projectRoot, projectConfig.dynamicConfigPath);\n if (projectConfig.staticConfigPath) {\n return `${relativeDynamicConfigPath} or ${path.relative(\n projectRoot,\n projectConfig.staticConfigPath\n )}`;\n }\n return relativeDynamicConfigPath;\n } else if (projectConfig.staticConfigPath) {\n return path.relative(projectRoot, projectConfig.staticConfigPath);\n }\n // If a config doesn't exist, our tooling will generate a static app.json\n return 'app.json';\n}\n\nexport * from './Config.types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,MAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,MAAA;EAAA,MAAAN,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAI,KAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,QAAA;EAAA,MAAAP,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAK,OAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,SAAA;EAAA,MAAAR,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAM,QAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAaA,SAAAS,WAAA;EAAA,MAAAT,IAAA,GAAAE,OAAA;EAAAO,UAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SA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E9H;EACP,CAAC,CAAC;EACF,IAAI2H,cAAc,CAACvI,MAAM,EAAE;IACzB,OAAO,IAAI;EACb;EACA,MAAM2I,WAAW,GAAG,IAAAH,YAAQ,EAAC,qBAAqB,EAAE;IAClDC,QAAQ,EAAE,IAAI;IACdC,GAAG,EAAE9H;EACP,CAAC,CAAC;EACF,IAAI+H,WAAW,CAAC3I,MAAM,EAAE;IACtB,OAAO,IAAI;EACb;EAEA,OAAO,KAAK;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS4I,2BAA2BA,CAAChI,WAAmB,EAAU;EACvE,MAAMW,KAAK,GAAGC,kBAAkB,CAACZ,WAAW,CAAC;EAC7C,OAAOiI,oCAAoC,CAACjI,WAAW,EAAEW,KAAK,CAAC;AACjE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASsH,oCAAoCA,CAClDjI,WAAmB,EACnBkI,aAA8B,EACtB;EACR,IAAIA,aAAa,CAACtG,iBAAiB,EAAE;IACnC,MAAMuG,yBAAyB,GAAGpE,eAAI,CAACK,QAAQ,CAACpE,WAAW,EAAEkI,aAAa,CAACtG,iBAAiB,CAAC;IAC7F,IAAIsG,aAAa,CAACpH,gBAAgB,EAAE;MAClC,OAAO,GAAGqH,yBAAyB,OAAOpE,eAAI,CAACK,QAAQ,CACrDpE,WAAW,EACXkI,aAAa,CAACpH,gBAChB,CAAC,EAAE;IACL;IACA,OAAOqH,yBAAyB;EAClC,CAAC,MAAM,IAAID,aAAa,CAACpH,gBAAgB,EAAE;IACzC,OAAOiD,eAAI,CAACK,QAAQ,CAACpE,WAAW,EAAEkI,aAAa,CAACpH,gBAAgB,CAAC;EACnE;EACA;EACA,OAAO,UAAU;AACnB","ignoreList":[]}
1
+ {"version":3,"file":"Config.js","names":["_jsonFile","data","_interopRequireDefault","require","_requireUtils","_deepmerge","_glob","_path","_semver","_slugify","_getConfig","_getExpoSDKVersion","_withConfigPlugins","_withInternal","_resolvePackageJson","_Config","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","e","__esModule","default","hasWarnedAboutRootConfig","reduceExpoObject","config","expo","filter","length","ansiYellow","str","ansiGray","ansiBold","plural","console","warn","map","join","mods","getSupportedPlatforms","projectRoot","exp","platforms","resolveFrom","push","experiments","outOfTreePlatforms","getPlatformsFromConfig","platform","getConfig","options","paths","getConfigFilePaths","rawStaticConfig","staticConfigPath","getStaticConfig","rootConfig","staticConfig","packageJson","packageJsonPath","getPackageJsonAndPath","fillAndReturnConfig","dynamicConfigObjectType","mayHaveUnusedStaticConfig","configWithDefaultValues","ensureConfigHasDefaultValues","pkg","skipSDKVersionRequirement","dynamicConfigPath","hasUnusedStaticConfig","isModdedConfig","withConfigPlugins","skipPlugins","isPublicConfig","_internal","hooks","ios","android","updates","codeSigningCertificate","codeSigningMetadata","getContextConfig","exportedObjectType","rawDynamicConfig","getDynamicConfig","dynamicConfig","getPackageJson","getRootPackageJsonPath","JsonFile","read","getDynamicConfigFilePath","getStaticConfigFilePath","DYNAMIC_CONFIG_EXTS","extensions","modifyConfigAsync","modifications","readOptions","writeOptions","isDryRun","dryRun","outputConfig","mergeConfigModifications","configPath","path","writeAsync","json5","type","message","relative","newConfig","newConfighasModifications","isMatchingObject","plugins","modifiedExpoConfig","deepMerge","existingPlugins","fromEntries","definition","undefined","plugin","pluginName","pluginProps","Array","isArray","existingPlugin","existingPluginName","finalizedConfig","expectedValues","actualValues","withInternal","pkgName","name","basename","pkgVersion","version","pkgWithDefaults","slug","slugify","toLowerCase","description","expWithDefaults","sdkVersion","getExpoSDKVersion","error","DEFAULT_BUILD_PATH","getWebOutputPath","process","env","WEBPACK_BUILD_OUTPUT_PATH","web","build","output","getNameFromConfig","appManifest","appName","displayName","webName","getDefaultTarget","semver","lt","isBareWorkflowProject","dependencies","expokit","xcodeprojFiles","globSync","absolute","cwd","gradleFiles","getProjectConfigDescription","getProjectConfigDescriptionWithPaths","projectConfig","relativeDynamicConfigPath"],"sources":["../src/Config.ts"],"sourcesContent":["import type { ModConfig } from '@expo/config-plugins';\nimport type { JSONObject } from '@expo/json-file';\nimport JsonFile from '@expo/json-file';\nimport { resolveFrom } from '@expo/require-utils';\nimport deepMerge from 'deepmerge';\nimport { sync as globSync } from 'glob';\nimport path from 'path';\nimport semver from 'semver';\nimport slugify from 'slugify';\n\nimport type {\n AppJSONConfig,\n ConfigFilePaths,\n ExpoConfig,\n GetConfigOptions,\n PackageJSONConfig,\n Platform,\n ProjectConfig,\n ProjectTarget,\n WriteConfigOptions,\n} from './Config.types';\nimport { getDynamicConfig, getStaticConfig } from './getConfig';\nimport { getExpoSDKVersion } from './getExpoSDKVersion';\nimport { withConfigPlugins } from './plugins/withConfigPlugins';\nimport { withInternal } from './plugins/withInternal';\nimport { getRootPackageJsonPath } from './resolvePackageJson';\n\ntype SplitConfigs = { expo?: ExpoConfig; mods?: ModConfig };\n\nlet hasWarnedAboutRootConfig = false;\n\n/**\n * If a config has an `expo` object then that will be used as the config.\n * This method reduces out other top level values if an `expo` object exists.\n *\n * @param config Input config object to reduce\n */\nfunction reduceExpoObject(config?: any): SplitConfigs | null {\n if (!config) return config || null;\n\n if (config.expo && !hasWarnedAboutRootConfig) {\n const keys = Object.keys(config).filter((key) => key !== 'expo');\n if (keys.length) {\n hasWarnedAboutRootConfig = true;\n const ansiYellow = (str: string) => `\\u001B[33m${str}\\u001B[0m`;\n const ansiGray = (str: string) => `\\u001B[90m${str}\\u001B[0m`;\n const ansiBold = (str: string) => `\\u001B[1m${str}\\u001B[22m`;\n const plural = keys.length > 1;\n console.warn(\n ansiYellow(\n ansiBold('Warning: ') +\n `Root-level ${ansiBold(`\"expo\"`)} object found. Ignoring extra key${plural ? 's' : ''} in Expo config: ${keys\n .map((key) => `\"${key}\"`)\n .join(', ')}\\n` +\n ansiGray(`Learn more: https://expo.fyi/root-expo-object`)\n )\n );\n }\n }\n\n const { mods, ...expo } = config.expo ?? config;\n\n return {\n expo,\n mods,\n };\n}\n\n/**\n * Get all platforms that a project is currently capable of running.\n *\n * @param projectRoot\n * @param exp\n */\nfunction getSupportedPlatforms(projectRoot: string, exp: Partial<ExpoConfig>): Platform[] {\n const platforms: Platform[] = [];\n if (resolveFrom(projectRoot, 'react-native/package.json')) {\n platforms.push('ios', 'android');\n }\n if (resolveFrom(projectRoot, 'react-dom/package.json')) {\n platforms.push('web');\n }\n if (exp.experiments?.outOfTreePlatforms) {\n if (resolveFrom(projectRoot, 'react-native-tvos/package.json')) {\n platforms.push('tvos');\n }\n if (resolveFrom(projectRoot, 'react-native-macos/package.json')) {\n platforms.push('macos');\n }\n }\n return platforms;\n}\n\n/**\n * Resolves the platforms a project targets, as configured or detected.\n *\n * @param projectRoot\n * @param exp\n */\nexport function getPlatformsFromConfig(projectRoot: string, exp: Partial<ExpoConfig>): Platform[] {\n let platforms =\n (exp?.platforms as Platform[] | undefined) ?? getSupportedPlatforms(projectRoot, exp);\n // TODO(@kitten): Update when XDL schema is modified\n if (!exp.experiments?.outOfTreePlatforms) {\n platforms = platforms.filter(\n (platform) => platform === 'android' || platform === 'ios' || platform === 'web'\n );\n }\n return platforms;\n}\n\n/**\n * Evaluate the config for an Expo project.\n * If a function is exported from the `app.config.js` then a partial config will be passed as an argument.\n * The partial config is composed from any existing app.json, and certain fields from the `package.json` like name and description.\n *\n * If options.isPublicConfig is true, the Expo config will include only public-facing options (omitting private keys).\n * The resulting config should be suitable for hosting or embedding in a publicly readable location.\n *\n * **Example**\n * ```js\n * module.exports = function({ config }) {\n * // mutate the config before returning it.\n * config.slug = 'new slug'\n * return { expo: config };\n * }\n * ```\n *\n * **Supports**\n * - `app.config.ts`\n * - `app.config.js`\n * - `app.config.json`\n * - `app.json`\n *\n * @param projectRoot the root folder containing all of your application code\n * @param options enforce criteria for a project config\n */\nexport function getConfig(projectRoot: string, options: GetConfigOptions = {}): ProjectConfig {\n const paths = getConfigFilePaths(projectRoot);\n\n const rawStaticConfig = paths.staticConfigPath ? getStaticConfig(paths.staticConfigPath) : null;\n // For legacy reasons, always return an object.\n const rootConfig = (rawStaticConfig || {}) as AppJSONConfig;\n const staticConfig = reduceExpoObject(rawStaticConfig) || {};\n\n // Can only change the package.json location if an app.json or app.config.json exists\n const [packageJson, packageJsonPath] = getPackageJsonAndPath(projectRoot);\n\n function fillAndReturnConfig(\n config: SplitConfigs,\n dynamicConfigObjectType: string | null,\n mayHaveUnusedStaticConfig: boolean = false\n ) {\n const configWithDefaultValues = {\n ...ensureConfigHasDefaultValues({\n projectRoot,\n exp: config.expo || {},\n pkg: packageJson,\n skipSDKVersionRequirement: options.skipSDKVersionRequirement,\n paths,\n packageJsonPath,\n }),\n mods: config.mods,\n dynamicConfigObjectType,\n rootConfig,\n dynamicConfigPath: paths.dynamicConfigPath,\n staticConfigPath: paths.staticConfigPath,\n hasUnusedStaticConfig:\n !!paths.staticConfigPath && !!paths.dynamicConfigPath && mayHaveUnusedStaticConfig,\n };\n\n if (options.isModdedConfig) {\n // @ts-ignore: Add the mods back to the object.\n configWithDefaultValues.exp.mods = config.mods ?? null;\n }\n\n // Apply static json plugins, should be done after _internal\n configWithDefaultValues.exp = withConfigPlugins(\n configWithDefaultValues.exp,\n !!options.skipPlugins\n );\n\n if (!options.isModdedConfig) {\n // @ts-ignore: Delete mods added by static plugins when they won't have a chance to be evaluated\n delete configWithDefaultValues.exp.mods;\n }\n\n if (options.isPublicConfig) {\n // TODD(EvanBacon): Drop plugins array after it's been resolved.\n\n // Remove internal values with references to user's file paths from the public config.\n delete configWithDefaultValues.exp._internal;\n\n // hooks no longer exists in the typescript type but should still be removed\n if ('hooks' in configWithDefaultValues.exp) {\n delete configWithDefaultValues.exp.hooks;\n }\n if (configWithDefaultValues.exp.ios?.config) {\n delete configWithDefaultValues.exp.ios.config;\n }\n if (configWithDefaultValues.exp.android?.config) {\n delete configWithDefaultValues.exp.android.config;\n }\n\n delete configWithDefaultValues.exp.updates?.codeSigningCertificate;\n delete configWithDefaultValues.exp.updates?.codeSigningMetadata;\n }\n\n return configWithDefaultValues;\n }\n\n // Fill in the static config\n function getContextConfig(config: SplitConfigs) {\n return ensureConfigHasDefaultValues({\n projectRoot,\n exp: config.expo || {},\n pkg: packageJson,\n skipSDKVersionRequirement: true,\n paths,\n packageJsonPath,\n }).exp;\n }\n\n if (paths.dynamicConfigPath) {\n // No app.config.json or app.json but app.config.js\n const {\n exportedObjectType,\n config: rawDynamicConfig,\n mayHaveUnusedStaticConfig,\n } = getDynamicConfig(paths.dynamicConfigPath, {\n projectRoot,\n staticConfigPath: paths.staticConfigPath,\n packageJsonPath,\n config: getContextConfig(staticConfig),\n });\n // Allow for the app.config.js to `export default null;`\n // Use `dynamicConfigPath` to detect if a dynamic config exists.\n const dynamicConfig = reduceExpoObject(rawDynamicConfig) || {};\n return fillAndReturnConfig(dynamicConfig, exportedObjectType, mayHaveUnusedStaticConfig);\n }\n\n // No app.config.js but json or no config\n return fillAndReturnConfig(staticConfig || {}, null);\n}\n\nexport function getPackageJson(projectRoot: string): PackageJSONConfig {\n const [pkg] = getPackageJsonAndPath(projectRoot);\n return pkg;\n}\n\nfunction getPackageJsonAndPath(projectRoot: string): [PackageJSONConfig, string] {\n const packageJsonPath = getRootPackageJsonPath(projectRoot);\n return [JsonFile.read(packageJsonPath), packageJsonPath];\n}\n\n/**\n * Get the static and dynamic config paths for a project. Also accounts for custom paths.\n *\n * @param projectRoot\n */\nexport function getConfigFilePaths(projectRoot: string): ConfigFilePaths {\n return {\n dynamicConfigPath: getDynamicConfigFilePath(projectRoot),\n staticConfigPath: getStaticConfigFilePath(projectRoot),\n };\n}\n\nconst DYNAMIC_CONFIG_EXTS = ['.ts', '.mts', '.cts', '.mjs', '.cjs', '.js'];\n\nfunction getDynamicConfigFilePath(projectRoot: string): string | null {\n return resolveFrom(projectRoot, './app.config', { extensions: DYNAMIC_CONFIG_EXTS });\n}\n\nfunction getStaticConfigFilePath(projectRoot: string): string | null {\n return resolveFrom(projectRoot, './app.config.json') ?? resolveFrom(projectRoot, './app.json');\n}\n\n/**\n * Attempt to modify an Expo project config.\n * This will only fully work if the project is using static configs only.\n * Otherwise 'warn' | 'fail' will return with a message about why the config couldn't be updated.\n * The potentially modified config object will be returned for testing purposes.\n *\n * @param projectRoot\n * @param modifications modifications to make to an existing config\n * @param readOptions options for reading the current config file\n * @param writeOptions If true, the static config file will not be rewritten\n */\nexport async function modifyConfigAsync(\n projectRoot: string,\n modifications: Partial<ExpoConfig>,\n readOptions: GetConfigOptions = {},\n writeOptions: WriteConfigOptions = {}\n): Promise<{\n type: 'success' | 'warn' | 'fail';\n message?: string;\n config: ExpoConfig | null;\n}> {\n const config = getConfig(projectRoot, readOptions);\n const isDryRun = writeOptions.dryRun;\n\n // Create or modify the static config, when not using dynamic config\n if (!config.dynamicConfigPath) {\n const outputConfig = mergeConfigModifications(config, modifications);\n\n if (!isDryRun) {\n const configPath = config.staticConfigPath ?? path.join(projectRoot, 'app.json');\n await JsonFile.writeAsync(configPath, outputConfig, { json5: false });\n }\n\n return { type: 'success', config: outputConfig.expo ?? outputConfig };\n }\n\n // Attempt to write to a function-like dynamic config, when used with a static config\n if (\n config.staticConfigPath &&\n config.dynamicConfigObjectType === 'function' &&\n !modifications.hasOwnProperty('plugins') // We don't know what plugins are in dynamic configs\n ) {\n const outputConfig = mergeConfigModifications(config, modifications);\n\n if (isDryRun) {\n return {\n type: 'warn',\n message: `Cannot verify config modifications in dry-run mode for config at: ${path.relative(projectRoot, config.dynamicConfigPath)}`,\n config: null,\n };\n }\n\n // Attempt to write the static config with the config modifications\n await JsonFile.writeAsync(config.staticConfigPath, outputConfig, { json5: false });\n\n // Verify that the dynamic config is using the static config\n const newConfig = getConfig(projectRoot, readOptions);\n const newConfighasModifications = isMatchingObject(modifications, newConfig.exp);\n if (newConfighasModifications) {\n return {\n type: 'success',\n config: newConfig.exp,\n };\n }\n\n // Rollback the changes when the reloaded config did not include the modifications\n await JsonFile.writeAsync(config.staticConfigPath, config.rootConfig, { json5: false });\n }\n\n // We cannot automatically write to a dynamic config\n return {\n type: 'warn',\n message: `Cannot automatically write to dynamic config at: ${path.relative(\n projectRoot,\n config.dynamicConfigPath\n )}`,\n config: null,\n };\n}\n\n/**\n * Merge the config modifications, using an optional possible top-level `expo` object.\n * Note, changes in the plugins are merged differently to avoid duplicate entries.\n */\nfunction mergeConfigModifications(\n config: ProjectConfig,\n { plugins, ...modifications }: Partial<ExpoConfig>\n): AppJSONConfig {\n const modifiedExpoConfig: ExpoConfig = !config.rootConfig.expo\n ? deepMerge(config.rootConfig, modifications)\n : deepMerge(config.rootConfig.expo, modifications);\n\n if (plugins?.length) {\n // When adding plugins, ensure the config has a plugin list\n if (!modifiedExpoConfig.plugins) {\n modifiedExpoConfig.plugins = [];\n }\n\n // Create a plugin lookup map\n const existingPlugins: Record<string, any> = Object.fromEntries(\n modifiedExpoConfig.plugins.map((definition) =>\n typeof definition === 'string' ? [definition, undefined] : definition\n )\n );\n\n for (const plugin of plugins) {\n // Unpack the plugin definition, using either the short (string) or normal (array) notation\n const [pluginName, pluginProps] = Array.isArray(plugin) ? plugin : [plugin];\n // Abort if the plugin definition is empty\n if (!pluginName) continue;\n\n // Add the plugin if it doesn't exist yet, including its properties\n if (!(pluginName in existingPlugins)) {\n modifiedExpoConfig.plugins.push(plugin);\n continue;\n }\n\n // If the plugin has properties, and it exists, merge the properties\n if (pluginProps) {\n modifiedExpoConfig.plugins = modifiedExpoConfig.plugins.map((existingPlugin) => {\n const [existingPluginName] = Array.isArray(existingPlugin)\n ? existingPlugin\n : [existingPlugin];\n\n // Do not modify other plugins\n if (existingPluginName !== pluginName) {\n return existingPlugin;\n }\n\n // Add the props to the existing plugin entry\n if (typeof existingPlugin === 'string') {\n return [existingPlugin, pluginProps];\n }\n\n // Merge the props to the existing plugin properties\n if (Array.isArray(existingPlugin) && existingPlugin[0]) {\n return [existingPlugin[0], deepMerge(existingPlugin[1] ?? {}, pluginProps)];\n }\n\n return existingPlugin;\n });\n continue;\n }\n\n // If the same plugin exists with properties, and the modification does not contain properties, ignore\n }\n }\n\n const finalizedConfig = !config.rootConfig.expo\n ? modifiedExpoConfig\n : { ...config.rootConfig, expo: modifiedExpoConfig };\n\n return finalizedConfig as AppJSONConfig;\n}\n\nfunction isMatchingObject<T extends Record<string, any>>(\n expectedValues: T,\n actualValues: T\n): boolean {\n for (const key in expectedValues) {\n if (!expectedValues.hasOwnProperty(key)) {\n continue;\n }\n\n if (typeof expectedValues[key] === 'object' && actualValues[key] !== null) {\n if (!isMatchingObject(expectedValues[key], actualValues[key])) {\n return false;\n }\n } else {\n if (expectedValues[key] !== actualValues[key]) {\n return false;\n }\n }\n }\n return true;\n}\n\nfunction ensureConfigHasDefaultValues({\n projectRoot,\n exp,\n pkg,\n paths,\n packageJsonPath,\n skipSDKVersionRequirement = false,\n}: {\n projectRoot: string;\n exp: Partial<ExpoConfig> | null;\n pkg: JSONObject;\n skipSDKVersionRequirement?: boolean;\n paths?: ConfigFilePaths;\n packageJsonPath?: string;\n}): { exp: ExpoConfig; pkg: PackageJSONConfig } {\n if (!exp) {\n exp = {};\n }\n exp = withInternal(exp as any, {\n projectRoot,\n ...(paths ?? {}),\n packageJsonPath,\n });\n // Defaults for package.json fields\n const pkgName = typeof pkg.name === 'string' ? pkg.name : path.basename(projectRoot);\n const pkgVersion = typeof pkg.version === 'string' ? pkg.version : '1.0.0';\n\n const pkgWithDefaults = { ...pkg, name: pkgName, version: pkgVersion };\n\n // Defaults for app.json/app.config.js fields\n const name = exp.name ?? pkgName;\n const slug = exp.slug ?? slugify(name.toLowerCase());\n const version = exp.version ?? pkgVersion;\n let description = exp.description;\n if (!description && typeof pkg.description === 'string') {\n description = pkg.description;\n }\n\n const expWithDefaults = { ...exp, name, slug, version, description };\n\n let sdkVersion;\n try {\n sdkVersion = getExpoSDKVersion(projectRoot, expWithDefaults);\n } catch (error) {\n if (!skipSDKVersionRequirement) throw error;\n }\n\n // TODO(@kitten): Remove once platforms are updated in XDL schema\n const platforms = getPlatformsFromConfig(projectRoot, exp) as NonNullable<\n ExpoConfig['platforms']\n >;\n\n return {\n exp: { ...expWithDefaults, sdkVersion, platforms },\n pkg: pkgWithDefaults,\n };\n}\n\nconst DEFAULT_BUILD_PATH = `web-build`;\n\nexport function getWebOutputPath(config: { [key: string]: any } = {}): string {\n if (process.env.WEBPACK_BUILD_OUTPUT_PATH) {\n return process.env.WEBPACK_BUILD_OUTPUT_PATH;\n }\n const expo = config.expo || config || {};\n return expo?.web?.build?.output || DEFAULT_BUILD_PATH;\n}\n\nexport function getNameFromConfig(exp: Record<string, any> = {}): {\n appName?: string;\n webName?: string;\n} {\n // For RN CLI support\n const appManifest = exp.expo || exp;\n const { web = {} } = appManifest;\n\n // rn-cli apps use a displayName value as well.\n const appName = exp.displayName || appManifest.displayName || appManifest.name;\n const webName = web.name || appName;\n\n return {\n appName,\n webName,\n };\n}\n\nexport function getDefaultTarget(\n projectRoot: string,\n exp?: Pick<ExpoConfig, 'sdkVersion'>\n): ProjectTarget {\n exp ??= getConfig(projectRoot, { skipSDKVersionRequirement: true }).exp;\n\n // before SDK 37, always default to managed to preserve previous behavior\n if (exp.sdkVersion && exp.sdkVersion !== 'UNVERSIONED' && semver.lt(exp.sdkVersion, '37.0.0')) {\n return 'managed';\n }\n return isBareWorkflowProject(projectRoot) ? 'bare' : 'managed';\n}\n\nfunction isBareWorkflowProject(projectRoot: string): boolean {\n const [pkg] = getPackageJsonAndPath(projectRoot);\n\n // TODO: Drop this\n if (pkg.dependencies && pkg.dependencies.expokit) {\n return false;\n }\n\n const xcodeprojFiles = globSync('ios/**/*.xcodeproj', {\n absolute: true,\n cwd: projectRoot,\n });\n if (xcodeprojFiles.length) {\n return true;\n }\n const gradleFiles = globSync('android/**/*.gradle', {\n absolute: true,\n cwd: projectRoot,\n });\n if (gradleFiles.length) {\n return true;\n }\n\n return false;\n}\n\n/**\n * Return a useful name describing the project config.\n * - dynamic: app.config.js\n * - static: app.json\n * - custom path app config relative to root folder\n * - both: app.config.js or app.json\n */\nexport function getProjectConfigDescription(projectRoot: string): string {\n const paths = getConfigFilePaths(projectRoot);\n return getProjectConfigDescriptionWithPaths(projectRoot, paths);\n}\n\n/**\n * Returns a string describing the configurations used for the given project root.\n * Will return null if no config is found.\n *\n * @param projectRoot\n * @param projectConfig\n */\nexport function getProjectConfigDescriptionWithPaths(\n projectRoot: string,\n projectConfig: ConfigFilePaths\n): string {\n if (projectConfig.dynamicConfigPath) {\n const relativeDynamicConfigPath = path.relative(projectRoot, projectConfig.dynamicConfigPath);\n if (projectConfig.staticConfigPath) {\n return `${relativeDynamicConfigPath} or ${path.relative(\n projectRoot,\n projectConfig.staticConfigPath\n )}`;\n }\n return relativeDynamicConfigPath;\n } else if (projectConfig.staticConfigPath) {\n return path.relative(projectRoot, projectConfig.staticConfigPath);\n }\n // If a config doesn't exist, our tooling will generate a static app.json\n return 'app.json';\n}\n\nexport * from './Config.types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,MAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,MAAA;EAAA,MAAAN,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAI,KAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EA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AE;IACL;IACA,OAAOqH,yBAAyB;EAClC,CAAC,MAAM,IAAID,aAAa,CAACpH,gBAAgB,EAAE;IACzC,OAAOiD,eAAI,CAACK,QAAQ,CAACpE,WAAW,EAAEkI,aAAa,CAACpH,gBAAgB,CAAC;EACnE;EACA;EACA,OAAO,UAAU;AACnB","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.ProjectPrivacy = void 0;
7
5
  let ProjectPrivacy = exports.ProjectPrivacy = /*#__PURE__*/function (ProjectPrivacy) {
8
6
  ProjectPrivacy["PUBLIC"] = "public";
@@ -1 +1 @@
1
- {"version":3,"file":"Config.types.js","names":["ProjectPrivacy","exports"],"sources":["../src/Config.types.ts"],"sourcesContent":["import type { ModConfig } from '@expo/config-plugins';\nimport type { ExpoConfig } from '@expo/config-types';\n\nexport type {\n ExpoConfig,\n Web as ExpoConfigWeb,\n Android as ExpoConfigAndroid,\n IOS as ExpoConfigIOS,\n IOSIcons as ExpoConfigIOSIcons,\n AndroidIntentFiltersData as ExpoConfigAndroidIntentFiltersData,\n} from '@expo/config-types';\n\nexport type PackageJSONConfig = { dependencies?: Record<string, string>; [key: string]: any };\n\nexport interface ProjectConfig {\n /**\n * Fully evaluated Expo config with default values injected.\n */\n exp: ExpoConfig;\n /**\n * Dynamic config for processing native files during the generation process.\n */\n mods?: ModConfig | null;\n /**\n * Project package.json object with default values injected.\n */\n pkg: PackageJSONConfig;\n /**\n * Unaltered static config (app.config.json, app.json, or custom json config).\n * For legacy, an empty object will be returned even if no static config exists.\n */\n rootConfig: AppJSONConfig;\n /**\n * Path to the static json config file if it exists.\n * If a project has an app.config.js and an app.json then app.json will be returned.\n * If a project has an app.config.json and an app.json then app.config.json will be returned.\n * Returns null if no static config file exists.\n */\n staticConfigPath: string | null;\n /**\n * Path to an app.config.js or app.config.ts.\n * Returns null if no dynamic config file exists.\n */\n dynamicConfigPath: string | null;\n\n /**\n * Returns the type of the value exported from the dynamic config.\n * This can be used to determine if the dynamic config is potentially extending a static config when (v === 'function').\n * Returns null if no dynamic config file exists.\n */\n dynamicConfigObjectType: string | null;\n /**\n * Returns true if both a static and dynamic config are present, and the dynamic config is applied on top of the static.\n * This is only used for expo-doctor diagnostic warnings. This flag may be true even in cases where all static config values are used.\n * It only checks against a typical pattern for layering static and dynamic config, e.g.,:\n * module.exports = ({ config }) => {\n return {\n ...config,\n name: 'name overridden by dynamic config',\n };\n };\n */\n hasUnusedStaticConfig: boolean;\n}\nexport type AppJSONConfig = { expo: ExpoConfig; [key: string]: any };\nexport type BareAppConfig = { name: string; [key: string]: any };\nexport type HookArguments = {\n config: any;\n url: any;\n exp: ExpoConfig;\n iosBundle: string | Uint8Array;\n iosSourceMap: string | null;\n iosManifest: any;\n iosManifestUrl: string;\n androidBundle: string | Uint8Array;\n androidSourceMap: string | null;\n androidManifest: any;\n androidManifestUrl: string;\n projectRoot: string;\n log: (msg: any) => void;\n};\n\nexport type ExpoGoConfig = {\n mainModuleName: string;\n debuggerHost: string;\n developer: {\n tool: string | null;\n projectRoot?: string;\n };\n packagerOpts: {\n [key: string]: any;\n };\n username?: string;\n};\n\nexport type EASConfig = {\n projectId?: string;\n};\n\nexport type ClientScopingConfig = {\n scopeKey?: string;\n};\n\nexport interface ExpoUpdatesManifestAsset {\n url: string;\n key: string;\n contentType: string;\n hash?: string;\n}\n\nexport interface ExpoUpdatesManifest {\n id: string;\n createdAt: string;\n runtimeVersion: string;\n launchAsset: ExpoUpdatesManifestAsset;\n assets: ExpoUpdatesManifestAsset[];\n metadata: { [key: string]: string };\n extra: ClientScopingConfig & {\n expoClient?: ExpoConfig & {\n /**\n * Only present during development using @expo/cli.\n */\n hostUri?: string;\n };\n expoGo?: ExpoGoConfig;\n eas?: EASConfig;\n };\n}\n\nexport type Hook = {\n file: string;\n config: any;\n};\n\nexport type HookType = 'postPublish' | 'postExport';\n\nexport enum ProjectPrivacy {\n PUBLIC = 'public',\n UNLISTED = 'unlisted',\n}\n\nexport type Platform = 'android' | 'ios' | 'web' | 'tvos' | 'macos';\nexport type NativePlatform = Exclude<Platform, 'web'>;\nexport type ProjectTarget = 'managed' | 'bare';\n\nexport type ConfigErrorCode =\n | 'NO_APP_JSON'\n | 'NOT_OBJECT'\n | 'NO_EXPO'\n | 'MODULE_NOT_FOUND'\n | 'DEPRECATED'\n | 'INVALID_MODE'\n | 'INVALID_FORMAT'\n | 'INVALID_PLUGIN'\n | 'INVALID_CONFIG'\n | 'ENTRY_NOT_FOUND';\n\nexport type ConfigContext = {\n projectRoot: string;\n /**\n * The static config path either app.json, app.config.json, or a custom user-defined config.\n */\n staticConfigPath: string | null;\n packageJsonPath: string | null;\n config: Partial<ExpoConfig>;\n};\n\nexport type GetConfigOptions = {\n isPublicConfig?: boolean;\n /**\n * Should the config `mods` be preserved in the config? Used for compiling mods in the eject command.\n *\n * @default false\n */\n isModdedConfig?: boolean;\n skipSDKVersionRequirement?: boolean;\n /**\n * Dangerously skip resolving plugins.\n */\n skipPlugins?: boolean;\n strict?: boolean;\n};\n\nexport type WriteConfigOptions = { dryRun?: boolean };\n\nexport type ConfigFilePaths = { staticConfigPath: string | null; dynamicConfigPath: string | null };\n"],"mappings":";;;;;;IAwIYA,cAAc,GAAAC,OAAA,CAAAD,cAAA,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"Config.types.js","names":["ProjectPrivacy","exports"],"sources":["../src/Config.types.ts"],"sourcesContent":["import type { ModConfig } from '@expo/config-plugins';\nimport type { ExpoConfig } from '@expo/config-types';\n\nexport type {\n ExpoConfig,\n Web as ExpoConfigWeb,\n Android as ExpoConfigAndroid,\n IOS as ExpoConfigIOS,\n IOSIcons as ExpoConfigIOSIcons,\n AndroidIntentFiltersData as ExpoConfigAndroidIntentFiltersData,\n} from '@expo/config-types';\n\nexport type PackageJSONConfig = { dependencies?: Record<string, string>; [key: string]: any };\n\nexport interface ProjectConfig {\n /**\n * Fully evaluated Expo config with default values injected.\n */\n exp: ExpoConfig;\n /**\n * Dynamic config for processing native files during the generation process.\n */\n mods?: ModConfig | null;\n /**\n * Project package.json object with default values injected.\n */\n pkg: PackageJSONConfig;\n /**\n * Unaltered static config (app.config.json, app.json, or custom json config).\n * For legacy, an empty object will be returned even if no static config exists.\n */\n rootConfig: AppJSONConfig;\n /**\n * Path to the static json config file if it exists.\n * If a project has an app.config.js and an app.json then app.json will be returned.\n * If a project has an app.config.json and an app.json then app.config.json will be returned.\n * Returns null if no static config file exists.\n */\n staticConfigPath: string | null;\n /**\n * Path to an app.config.js or app.config.ts.\n * Returns null if no dynamic config file exists.\n */\n dynamicConfigPath: string | null;\n\n /**\n * Returns the type of the value exported from the dynamic config.\n * This can be used to determine if the dynamic config is potentially extending a static config when (v === 'function').\n * Returns null if no dynamic config file exists.\n */\n dynamicConfigObjectType: string | null;\n /**\n * Returns true if both a static and dynamic config are present, and the dynamic config is applied on top of the static.\n * This is only used for expo-doctor diagnostic warnings. This flag may be true even in cases where all static config values are used.\n * It only checks against a typical pattern for layering static and dynamic config, e.g.,:\n * module.exports = ({ config }) => {\n return {\n ...config,\n name: 'name overridden by dynamic config',\n };\n };\n */\n hasUnusedStaticConfig: boolean;\n}\nexport type AppJSONConfig = { expo: ExpoConfig; [key: string]: any };\nexport type BareAppConfig = { name: string; [key: string]: any };\nexport type HookArguments = {\n config: any;\n url: any;\n exp: ExpoConfig;\n iosBundle: string | Uint8Array;\n iosSourceMap: string | null;\n iosManifest: any;\n iosManifestUrl: string;\n androidBundle: string | Uint8Array;\n androidSourceMap: string | null;\n androidManifest: any;\n androidManifestUrl: string;\n projectRoot: string;\n log: (msg: any) => void;\n};\n\nexport type ExpoGoConfig = {\n mainModuleName: string;\n debuggerHost: string;\n developer: {\n tool: string | null;\n projectRoot?: string;\n };\n packagerOpts: {\n [key: string]: any;\n };\n username?: string;\n};\n\nexport type EASConfig = {\n projectId?: string;\n};\n\nexport type ClientScopingConfig = {\n scopeKey?: string;\n};\n\nexport interface ExpoUpdatesManifestAsset {\n url: string;\n key: string;\n contentType: string;\n hash?: string;\n}\n\nexport interface ExpoUpdatesManifest {\n id: string;\n createdAt: string;\n runtimeVersion: string;\n launchAsset: ExpoUpdatesManifestAsset;\n assets: ExpoUpdatesManifestAsset[];\n metadata: { [key: string]: string };\n extra: ClientScopingConfig & {\n expoClient?: ExpoConfig & {\n /**\n * Only present during development using @expo/cli.\n */\n hostUri?: string;\n };\n expoGo?: ExpoGoConfig;\n eas?: EASConfig;\n };\n}\n\nexport type Hook = {\n file: string;\n config: any;\n};\n\nexport type HookType = 'postPublish' | 'postExport';\n\nexport enum ProjectPrivacy {\n PUBLIC = 'public',\n UNLISTED = 'unlisted',\n}\n\nexport type Platform = 'android' | 'ios' | 'web' | 'tvos' | 'macos';\nexport type NativePlatform = Exclude<Platform, 'web'>;\nexport type ProjectTarget = 'managed' | 'bare';\n\nexport type ConfigErrorCode =\n | 'NO_APP_JSON'\n | 'NOT_OBJECT'\n | 'NO_EXPO'\n | 'MODULE_NOT_FOUND'\n | 'DEPRECATED'\n | 'INVALID_MODE'\n | 'INVALID_FORMAT'\n | 'INVALID_PLUGIN'\n | 'INVALID_CONFIG'\n | 'ENTRY_NOT_FOUND';\n\nexport type ConfigContext = {\n projectRoot: string;\n /**\n * The static config path either app.json, app.config.json, or a custom user-defined config.\n */\n staticConfigPath: string | null;\n packageJsonPath: string | null;\n config: Partial<ExpoConfig>;\n};\n\nexport type GetConfigOptions = {\n isPublicConfig?: boolean;\n /**\n * Should the config `mods` be preserved in the config? Used for compiling mods in the eject command.\n *\n * @default false\n */\n isModdedConfig?: boolean;\n skipSDKVersionRequirement?: boolean;\n /**\n * Dangerously skip resolving plugins.\n */\n skipPlugins?: boolean;\n strict?: boolean;\n};\n\nexport type WriteConfigOptions = { dryRun?: boolean };\n\nexport type ConfigFilePaths = { staticConfigPath: string | null; dynamicConfigPath: string | null };\n"],"mappings":";;;;IAwIYA,cAAc,GAAAC,OAAA,CAAAD,cAAA,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
package/build/Errors.js CHANGED
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.ConfigError = void 0;
7
5
  /**
8
6
  * Based on `JsonFileError` from `@expo/json-file`
@@ -1 +1 @@
1
- {"version":3,"file":"Errors.js","names":["ConfigError","Error","name","isConfigError","constructor","message","code","cause","exports"],"sources":["../src/Errors.ts"],"sourcesContent":["import type { ConfigErrorCode } from './Config.types';\n\n/**\n * Based on `JsonFileError` from `@expo/json-file`\n */\nexport class ConfigError extends Error {\n readonly name = 'ConfigError';\n readonly isConfigError = true;\n\n constructor(\n message: string,\n public code: ConfigErrorCode,\n public cause?: Error\n ) {\n super(cause ? `${message}\\n└─ Cause: ${cause.name}: ${cause.message}` : message);\n }\n}\n"],"mappings":";;;;;;AAEA;AACA;AACA;AACO,MAAMA,WAAW,SAASC,KAAK,CAAC;EAC5BC,IAAI,GAAG,aAAa;EACpBC,aAAa,GAAG,IAAI;EAE7BC,WAAWA,CACTC,OAAe,EACRC,IAAqB,EACrBC,KAAa,EACpB;IACA,KAAK,CAACA,KAAK,GAAG,GAAGF,OAAO,eAAeE,KAAK,CAACL,IAAI,KAAKK,KAAK,CAACF,OAAO,EAAE,GAAGA,OAAO,CAAC;IAAC,KAH1EC,IAAqB,GAArBA,IAAqB;IAAA,KACrBC,KAAa,GAAbA,KAAa;EAGtB;AACF;AAACC,OAAA,CAAAR,WAAA,GAAAA,WAAA","ignoreList":[]}
1
+ {"version":3,"file":"Errors.js","names":["ConfigError","Error","name","isConfigError","constructor","message","code","cause","exports"],"sources":["../src/Errors.ts"],"sourcesContent":["import type { ConfigErrorCode } from './Config.types';\n\n/**\n * Based on `JsonFileError` from `@expo/json-file`\n */\nexport class ConfigError extends Error {\n readonly name = 'ConfigError';\n readonly isConfigError = true;\n\n constructor(\n message: string,\n public code: ConfigErrorCode,\n public cause?: Error\n ) {\n super(cause ? `${message}\\n└─ Cause: ${cause.name}: ${cause.message}` : message);\n }\n}\n"],"mappings":";;;;AAEA;AACA;AACA;AACO,MAAMA,WAAW,SAASC,KAAK,CAAC;EAC5BC,IAAI,GAAG,aAAa;EACpBC,aAAa,GAAG,IAAI;EAE7BC,WAAWA,CACTC,OAAe,EACRC,IAAqB,EACrBC,KAAa,EACpB;IACA,KAAK,CAACA,KAAK,GAAG,GAAGF,OAAO,eAAeE,KAAK,CAACL,IAAI,KAAKK,KAAK,CAACF,OAAO,EAAE,GAAGA,OAAO,CAAC;IAAC,KAH1EC,IAAqB,GAArBA,IAAqB;IAAA,KACrBC,KAAa,GAAbA,KAAa;EAGtB;AACF;AAACC,OAAA,CAAAR,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.serializeAfterStaticPlugins = serializeAfterStaticPlugins;
7
5
  exports.serializeAndEvaluate = serializeAndEvaluate;
8
6
  exports.serializeSkippingMods = serializeSkippingMods;
@@ -1 +1 @@
1
- {"version":3,"file":"Serialize.js","names":["_Errors","data","require","serializeAndEvaluate","val","includes","Array","isArray","map","output","property","hasOwnProperty","ConfigError","serializeSkippingMods","serializeAndEvaluatePlugin","name","serializeAfterStaticPlugins"],"sources":["../src/Serialize.ts"],"sourcesContent":["import { ConfigError } from './Errors';\n\nexport function serializeAndEvaluate(val: any): any {\n if (['undefined', 'string', 'boolean', 'number', 'bigint'].includes(typeof val)) {\n return val;\n } else if (typeof val === 'function') {\n // TODO: Bacon: Should we support async methods?\n return val();\n } else if (Array.isArray(val)) {\n return val.map(serializeAndEvaluate);\n } else if (typeof val === 'object') {\n const output: { [key: string]: any } = {};\n for (const property in val) {\n if (val.hasOwnProperty(property)) {\n output[property] = serializeAndEvaluate(val[property]);\n }\n }\n return output;\n }\n // symbol\n throw new ConfigError(`Expo config doesn't support \\`Symbols\\`: ${val}`, 'INVALID_CONFIG');\n}\n\nexport function serializeSkippingMods(val: any): any {\n if (typeof val === 'object' && !Array.isArray(val)) {\n const output: { [key: string]: any } = {};\n for (const property in val) {\n if (val.hasOwnProperty(property)) {\n if (property === 'mods' || property === 'plugins') {\n // Don't serialize mods or plugins\n output[property] = val[property];\n } else {\n output[property] = serializeAndEvaluate(val[property]);\n }\n }\n }\n return output;\n }\n return serializeAndEvaluate(val);\n}\n\nfunction serializeAndEvaluatePlugin(val: any): any {\n if (['undefined', 'string', 'boolean', 'number', 'bigint'].includes(typeof val)) {\n return val;\n } else if (typeof val === 'function') {\n return val.name || 'withAnonymous';\n } else if (Array.isArray(val)) {\n return val.map(serializeAndEvaluatePlugin);\n } else if (typeof val === 'object') {\n const output: { [key: string]: any } = {};\n for (const property in val) {\n if (val.hasOwnProperty(property)) {\n output[property] = serializeAndEvaluatePlugin(val[property]);\n }\n }\n return output;\n }\n // symbol\n throw new ConfigError(`Expo config doesn't support \\`Symbols\\`: ${val}`, 'INVALID_CONFIG');\n}\n\nexport function serializeAfterStaticPlugins(val: any): any {\n if (typeof val === 'object' && !Array.isArray(val)) {\n const output: { [key: string]: any } = {};\n for (const property in val) {\n if (val.hasOwnProperty(property)) {\n if (property === 'mods') {\n // Don't serialize mods\n output[property] = val[property];\n } else if (property === 'plugins' && Array.isArray(val[property])) {\n // Serialize the mods by removing any config plugins\n output[property] = val[property].map(serializeAndEvaluatePlugin);\n } else {\n output[property] = serializeAndEvaluate(val[property]);\n }\n }\n }\n return output;\n }\n return serializeAndEvaluate(val);\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAA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E;MAC1B,IAAIA,GAAG,CAACO,cAAc,CAACD,QAAQ,CAAC,EAAE;QAChC,IAAIA,QAAQ,KAAK,MAAM,EAAE;UACvB;UACAD,MAAM,CAACC,QAAQ,CAAC,GAAGN,GAAG,CAACM,QAAQ,CAAC;QAClC,CAAC,MAAM,IAAIA,QAAQ,KAAK,SAAS,IAAIJ,KAAK,CAACC,OAAO,CAACH,GAAG,CAACM,QAAQ,CAAC,CAAC,EAAE;UACjE;UACAD,MAAM,CAACC,QAAQ,CAAC,GAAGN,GAAG,CAACM,QAAQ,CAAC,CAACF,GAAG,CAACM,0BAA0B,CAAC;QAClE,CAAC,MAAM;UACLL,MAAM,CAACC,QAAQ,CAAC,GAAGP,oBAAoB,CAACC,GAAG,CAACM,QAAQ,CAAC,CAAC;QACxD;MACF;IACF;IACA,OAAOD,MAAM;EACf;EACA,OAAON,oBAAoB,CAACC,GAAG,CAAC;AAClC","ignoreList":[]}
1
+ {"version":3,"file":"Serialize.js","names":["_Errors","data","require","serializeAndEvaluate","val","includes","Array","isArray","map","output","property","hasOwnProperty","ConfigError","serializeSkippingMods","serializeAndEvaluatePlugin","name","serializeAfterStaticPlugins"],"sources":["../src/Serialize.ts"],"sourcesContent":["import { ConfigError } from './Errors';\n\nexport function serializeAndEvaluate(val: any): any {\n if (['undefined', 'string', 'boolean', 'number', 'bigint'].includes(typeof val)) {\n return val;\n } else if (typeof val === 'function') {\n // TODO: Bacon: Should we support async methods?\n return val();\n } else if (Array.isArray(val)) {\n return val.map(serializeAndEvaluate);\n } else if (typeof val === 'object') {\n const output: { [key: string]: any } = {};\n for (const property in val) {\n if (val.hasOwnProperty(property)) {\n output[property] = serializeAndEvaluate(val[property]);\n }\n }\n return output;\n }\n // symbol\n throw new ConfigError(`Expo config doesn't support \\`Symbols\\`: ${val}`, 'INVALID_CONFIG');\n}\n\nexport function serializeSkippingMods(val: any): any {\n if (typeof val === 'object' && !Array.isArray(val)) {\n const output: { [key: string]: any } = {};\n for (const property in val) {\n if (val.hasOwnProperty(property)) {\n if (property === 'mods' || property === 'plugins') {\n // Don't serialize mods or plugins\n output[property] = val[property];\n } else {\n output[property] = serializeAndEvaluate(val[property]);\n }\n }\n }\n return output;\n }\n return serializeAndEvaluate(val);\n}\n\nfunction serializeAndEvaluatePlugin(val: any): any {\n if (['undefined', 'string', 'boolean', 'number', 'bigint'].includes(typeof val)) {\n return val;\n } else if (typeof val === 'function') {\n return val.name || 'withAnonymous';\n } else if (Array.isArray(val)) {\n return val.map(serializeAndEvaluatePlugin);\n } else if (typeof val === 'object') {\n const output: { [key: string]: any } = {};\n for (const property in val) {\n if (val.hasOwnProperty(property)) {\n output[property] = serializeAndEvaluatePlugin(val[property]);\n }\n }\n return output;\n }\n // symbol\n throw new ConfigError(`Expo config doesn't support \\`Symbols\\`: ${val}`, 'INVALID_CONFIG');\n}\n\nexport function serializeAfterStaticPlugins(val: any): any {\n if (typeof val === 'object' && !Array.isArray(val)) {\n const output: { [key: string]: any } = {};\n for (const property in val) {\n if (val.hasOwnProperty(property)) {\n if (property === 'mods') {\n // Don't serialize mods\n output[property] = val[property];\n } else if (property === 'plugins' && Array.isArray(val[property])) {\n // Serialize the mods by removing any config plugins\n output[property] = val[property].map(serializeAndEvaluatePlugin);\n } else {\n output[property] = serializeAndEvaluate(val[property]);\n }\n }\n }\n return output;\n }\n return serializeAndEvaluate(val);\n}\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,SAASE,oBAAoBA,CAACC,GAAQ,EAAO;EAClD,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAACC,QAAQ,CAAC,OAAOD,GAAG,CAAC,EAAE;IAC/E,OAAOA,GAAG;EACZ,CAAC,MAAM,IAAI,OAAOA,GAAG,KAAK,UAAU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,EAAE;UACjE;UACAD,MAAM,CAACC,QAAQ,CAAC,GAAGN,GAAG,CAACM,QAAQ,CAAC,CAACF,GAAG,CAACM,0BAA0B,CAAC;QAClE,CAAC,MAAM;UACLL,MAAM,CAACC,QAAQ,CAAC,GAAGP,oBAAoB,CAACC,GAAG,CAACM,QAAQ,CAAC,CAAC;QACxD;MACF;IACF;IACA,OAAOD,MAAM;EACf;EACA,OAAON,oBAAoB,CAACC,GAAG,CAAC;AAClC","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.NON_STANDARD_SYMBOL = void 0;
7
5
  const NON_STANDARD_SYMBOL = exports.NON_STANDARD_SYMBOL = Symbol('non-standard');
8
6
  //# sourceMappingURL=environment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"environment.js","names":["NON_STANDARD_SYMBOL","exports","Symbol"],"sources":["../src/environment.ts"],"sourcesContent":["export const NON_STANDARD_SYMBOL = Symbol('non-standard');\n"],"mappings":";;;;;;AAAO,MAAMA,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAGE,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"environment.js","names":["NON_STANDARD_SYMBOL","exports","Symbol"],"sources":["../src/environment.ts"],"sourcesContent":["export const NON_STANDARD_SYMBOL = Symbol('non-standard');\n"],"mappings":";;;;AAAO,MAAMA,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAGE,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.evalConfig = evalConfig;
7
5
  exports.resolveConfigExport = resolveConfigExport;
8
6
  function _requireUtils() {
@@ -1 +1 @@
1
- {"version":3,"file":"evalConfig.js","names":["_requireUtils","data","require","_Errors","_Serialize","_environment","evalConfig","configFile","request","mod","loadModuleSync","resolveConfigExport","result","hasBaseStaticConfig","NON_STANDARD_SYMBOL","config","default","exportedObjectType","Promise","ConfigError","mayHaveUnusedStaticConfig","_hasBaseStaticConfig","expo","serializeSkippingMods"],"sources":["../src/evalConfig.ts"],"sourcesContent":["import { loadModuleSync } from '@expo/require-utils';\n\nimport type { AppJSONConfig, ConfigContext, ExpoConfig } from './Config.types';\nimport { ConfigError } from './Errors';\nimport { serializeSkippingMods } from './Serialize';\nimport { NON_STANDARD_SYMBOL } from './environment';\n\ntype RawDynamicConfig = AppJSONConfig | Partial<ExpoConfig> | null;\n\nexport type DynamicConfigResults = {\n config: RawDynamicConfig;\n exportedObjectType: string;\n mayHaveUnusedStaticConfig: boolean;\n};\n\n/**\n * Transpile and evaluate the dynamic config object.\n * This method is shared between the standard reading method in getConfig, and the headless script.\n *\n * @param options configFile path to the dynamic app.config.*, request to send to the dynamic config if it exports a function.\n * @returns the serialized and evaluated config along with the exported object type (object or function).\n */\nexport function evalConfig(\n configFile: string,\n request: ConfigContext | null\n): DynamicConfigResults {\n const mod = loadModuleSync(configFile);\n return resolveConfigExport(mod, configFile, request);\n}\n\n/**\n * - Resolve the exported contents of an Expo config (be it default or module.exports)\n * - Assert no promise exports\n * - Return config type\n * - Serialize config\n *\n * @param result\n * @param configFile\n * @param request\n */\nexport function resolveConfigExport(\n result: any,\n configFile: string,\n request: ConfigContext | null\n) {\n // add key to static config that we'll check for after the dynamic is evaluated\n // to see if the static config was used in determining the dynamic\n const hasBaseStaticConfig = NON_STANDARD_SYMBOL;\n if (request?.config) {\n // @ts-ignore\n request.config[hasBaseStaticConfig] = true;\n }\n if (result.default != null) {\n result = result.default;\n }\n const exportedObjectType = typeof result;\n if (typeof result === 'function') {\n result = result(request);\n }\n\n if (result instanceof Promise) {\n throw new ConfigError(`Config file ${configFile} cannot return a Promise.`, 'INVALID_CONFIG');\n }\n\n // If the key is not added, it suggests that the static config was not used as the base for the dynamic.\n // note(Keith): This is the most common way to use static and dynamic config together, but not the only way.\n // Hence, this is only output from getConfig() for informational purposes for use by tools like Expo Doctor\n // to suggest that there *may* be a problem.\n const mayHaveUnusedStaticConfig =\n // @ts-ignore\n request?.config?.[hasBaseStaticConfig] && !result?.[hasBaseStaticConfig];\n if (result) {\n delete result._hasBaseStaticConfig;\n }\n\n // If the expo object exists, ignore all other values.\n if (result?.expo) {\n result = serializeSkippingMods(result.expo);\n } else {\n result = serializeSkippingMods(result);\n }\n\n return { config: result, exportedObjectType, mayHaveUnusedStaticConfig };\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,cAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,aAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,aAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,YAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASK,UAAUA,CACxBC,UAAkB,EAClBC,OAA6B,EACP;EACtB,MAAMC,GAAG,GAAG,IAAAC,8BAAc,EAACH,UAAU,CAAC;EACtC,OAAOI,mBAAmB,CAACF,GAAG,EAAEF,UAAU,EAAEC,OAAO,CAAC;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,mBAAmBA,CACjCC,MAAW,EACXL,UAAkB,EAClBC,OAA6B,EAC7B;EACA;EACA;EACA,MAAMK,mBAAmB,GAAGC,kCAAmB;EAC/C,IAAIN,OAAO,EAAEO,MAAM,EAAE;IACnB;IACAP,OAAO,CAACO,MAAM,CAACF,mBAAmB,CAAC,GAAG,IAAI;EAC5C;EACA,IAAID,MAAM,CAACI,OAAO,IAAI,IAAI,EAAE;IAC1BJ,MAAM,GAAGA,MAAM,CAACI,OAAO;EACzB;EACA,MAAMC,kBAAkB,GAAG,OAAOL,MAAM;EACxC,IAAI,OAAOA,MAAM,KAAK,UAAU,EAAE;IAChCA,MAAM,GAAGA,MAAM,CAACJ,OAAO,CAAC;EAC1B;EAEA,IAAII,MAAM,YAAYM,OAAO,EAAE;IAC7B,MAAM,KAAIC,qBAAW,EAAC,eAAeZ,UAAU,2BAA2B,EAAE,gBAAgB,CAAC;EAC/F;;EAEA;EACA;EACA;EACA;EACA,MAAMa,yBAAyB;EAC7B;EACAZ,OAAO,EAAEO,MAAM,GAAGF,mBAAmB,CAAC,IAAI,CAACD,MAAM,GAAGC,mBAAmB,CAAC;EAC1E,IAAID,MAAM,EAAE;IACV,OAAOA,MAAM,CAACS,oBAAoB;EACpC;;EAEA;EACA,IAAIT,MAAM,EAAEU,IAAI,EAAE;IAChBV,MAAM,GAAG,IAAAW,kCAAqB,EAACX,MAAM,CAACU,IAAI,CAAC;EAC7C,CAAC,MAAM;IACLV,MAAM,GAAG,IAAAW,kCAAqB,EAACX,MAAM,CAAC;EACxC;EAEA,OAAO;IAAEG,MAAM,EAAEH,MAAM;IAAEK,kBAAkB;IAAEG;EAA0B,CAAC;AAC1E","ignoreList":[]}
1
+ {"version":3,"file":"evalConfig.js","names":["_requireUtils","data","require","_Errors","_Serialize","_environment","evalConfig","configFile","request","mod","loadModuleSync","resolveConfigExport","result","hasBaseStaticConfig","NON_STANDARD_SYMBOL","config","default","exportedObjectType","Promise","ConfigError","mayHaveUnusedStaticConfig","_hasBaseStaticConfig","expo","serializeSkippingMods"],"sources":["../src/evalConfig.ts"],"sourcesContent":["import { loadModuleSync } from '@expo/require-utils';\n\nimport type { AppJSONConfig, ConfigContext, ExpoConfig } from './Config.types';\nimport { ConfigError } from './Errors';\nimport { serializeSkippingMods } from './Serialize';\nimport { NON_STANDARD_SYMBOL } from './environment';\n\ntype RawDynamicConfig = AppJSONConfig | Partial<ExpoConfig> | null;\n\nexport type DynamicConfigResults = {\n config: RawDynamicConfig;\n exportedObjectType: string;\n mayHaveUnusedStaticConfig: boolean;\n};\n\n/**\n * Transpile and evaluate the dynamic config object.\n * This method is shared between the standard reading method in getConfig, and the headless script.\n *\n * @param options configFile path to the dynamic app.config.*, request to send to the dynamic config if it exports a function.\n * @returns the serialized and evaluated config along with the exported object type (object or function).\n */\nexport function evalConfig(\n configFile: string,\n request: ConfigContext | null\n): DynamicConfigResults {\n const mod = loadModuleSync(configFile);\n return resolveConfigExport(mod, configFile, request);\n}\n\n/**\n * - Resolve the exported contents of an Expo config (be it default or module.exports)\n * - Assert no promise exports\n * - Return config type\n * - Serialize config\n *\n * @param result\n * @param configFile\n * @param request\n */\nexport function resolveConfigExport(\n result: any,\n configFile: string,\n request: ConfigContext | null\n) {\n // add key to static config that we'll check for after the dynamic is evaluated\n // to see if the static config was used in determining the dynamic\n const hasBaseStaticConfig = NON_STANDARD_SYMBOL;\n if (request?.config) {\n // @ts-ignore\n request.config[hasBaseStaticConfig] = true;\n }\n if (result.default != null) {\n result = result.default;\n }\n const exportedObjectType = typeof result;\n if (typeof result === 'function') {\n result = result(request);\n }\n\n if (result instanceof Promise) {\n throw new ConfigError(`Config file ${configFile} cannot return a Promise.`, 'INVALID_CONFIG');\n }\n\n // If the key is not added, it suggests that the static config was not used as the base for the dynamic.\n // note(Keith): This is the most common way to use static and dynamic config together, but not the only way.\n // Hence, this is only output from getConfig() for informational purposes for use by tools like Expo Doctor\n // to suggest that there *may* be a problem.\n const mayHaveUnusedStaticConfig =\n // @ts-ignore\n request?.config?.[hasBaseStaticConfig] && !result?.[hasBaseStaticConfig];\n if (result) {\n delete result._hasBaseStaticConfig;\n }\n\n // If the expo object exists, ignore all other values.\n if (result?.expo) {\n result = serializeSkippingMods(result.expo);\n } else {\n result = serializeSkippingMods(result);\n }\n\n return { config: result, exportedObjectType, mayHaveUnusedStaticConfig };\n}\n"],"mappings":";;;;;AAAA,SAAAA,cAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,aAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,aAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,YAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASK,UAAUA,CACxBC,UAAkB,EAClBC,OAA6B,EACP;EACtB,MAAMC,GAAG,GAAG,IAAAC,8BAAc,EAACH,UAAU,CAAC;EACtC,OAAOI,mBAAmB,CAACF,GAAG,EAAEF,UAAU,EAAEC,OAAO,CAAC;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,mBAAmBA,CACjCC,MAAW,EACXL,UAAkB,EAClBC,OAA6B,EAC7B;EACA;EACA;EACA,MAAMK,mBAAmB,GAAGC,kCAAmB;EAC/C,IAAIN,OAAO,EAAEO,MAAM,EAAE;IACnB;IACAP,OAAO,CAACO,MAAM,CAACF,mBAAmB,CAAC,GAAG,IAAI;EAC5C;EACA,IAAID,MAAM,CAACI,OAAO,IAAI,IAAI,EAAE;IAC1BJ,MAAM,GAAGA,MAAM,CAACI,OAAO;EACzB;EACA,MAAMC,kBAAkB,GAAG,OAAOL,MAAM;EACxC,IAAI,OAAOA,MAAM,KAAK,UAAU,EAAE;IAChCA,MAAM,GAAGA,MAAM,CAACJ,OAAO,CAAC;EAC1B;EAEA,IAAII,MAAM,YAAYM,OAAO,EAAE;IAC7B,MAAM,KAAIC,qBAAW,EAAC,eAAeZ,UAAU,2BAA2B,EAAE,gBAAgB,CAAC;EAC/F;;EAEA;EACA;EACA;EACA;EACA,MAAMa,yBAAyB;EAC7B;EACAZ,OAAO,EAAEO,MAAM,GAAGF,mBAAmB,CAAC,IAAI,CAACD,MAAM,GAAGC,mBAAmB,CAAC;EAC1E,IAAID,MAAM,EAAE;IACV,OAAOA,MAAM,CAACS,oBAAoB;EACpC;;EAEA;EACA,IAAIT,MAAM,EAAEU,IAAI,EAAE;IAChBV,MAAM,GAAG,IAAAW,kCAAqB,EAACX,MAAM,CAACU,IAAI,CAAC;EAC7C,CAAC,MAAM;IACLV,MAAM,GAAG,IAAAW,kCAAqB,EAACX,MAAM,CAAC;EACxC;EAEA,OAAO;IAAEG,MAAM,EAAEH,MAAM;IAAEK,kBAAkB;IAAEG;EAA0B,CAAC;AAC1E","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.getDynamicConfig = getDynamicConfig;
7
5
  exports.getStaticConfig = getStaticConfig;
8
6
  function _jsonFile() {
@@ -1 +1 @@
1
- {"version":3,"file":"getConfig.js","names":["_jsonFile","data","_interopRequireDefault","require","_fs","_Errors","_evalConfig","e","__esModule","default","readConfigFile","configFile","context","existsSync","evalConfig","error","isConfigError","message","getDynamicConfig","configPath","request","config","ConfigError","getStaticConfig","JsonFile","read","json5"],"sources":["../src/getConfig.ts"],"sourcesContent":["import JsonFile from '@expo/json-file';\nimport { existsSync } from 'fs';\n\nimport type { AppJSONConfig, ConfigContext, ExpoConfig } from './Config.types';\nimport { ConfigError } from './Errors';\nimport type { DynamicConfigResults } from './evalConfig';\nimport { evalConfig } from './evalConfig';\n\n// We cannot use async config resolution right now because Next.js doesn't support async configs.\n// If they don't add support for async Webpack configs then we may need to pull support for Next.js.\nfunction readConfigFile(configFile: string, context: ConfigContext): null | DynamicConfigResults {\n // If the file doesn't exist then we should skip it and continue searching.\n if (!existsSync(configFile)) {\n return null;\n }\n try {\n return evalConfig(configFile, context);\n } catch (error: any) {\n // @ts-ignore\n error.isConfigError = true;\n error.message = `Error reading Expo config at ${configFile}:\\n\\n${error.message}`;\n throw error;\n }\n}\n\nexport function getDynamicConfig(configPath: string, request: ConfigContext): DynamicConfigResults {\n const config = readConfigFile(configPath, request);\n if (config) {\n // The config must be serialized and evaluated ahead of time so the spawned process can send it over.\n return config;\n }\n // TODO: It seems this is only thrown if the file cannot be found (which may never happen).\n // If so we should throw a more helpful error.\n throw new ConfigError(`Failed to read config at: ${configPath}`, 'INVALID_CONFIG');\n}\n\nexport function getStaticConfig(configPath: string): AppJSONConfig | ExpoConfig {\n const config = JsonFile.read(configPath, { json5: true });\n if (config) {\n return config as any;\n }\n throw new ConfigError(`Failed to read config at: ${configPath}`, 'INVALID_CONFIG');\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,IAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,YAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,WAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0C,SAAAC,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE1C;AACA;AACA,SAASG,cAAcA,CAACC,UAAkB,EAAEC,OAAsB,EAA+B;EAC/F;EACA,IAAI,CAAC,IAAAC,gBAAU,EAACF,UAAU,CAAC,EAAE;IAC3B,OAAO,IAAI;EACb;EACA,IAAI;IACF,OAAO,IAAAG,wBAAU,EAACH,UAAU,EAAEC,OAAO,CAAC;EACxC,CAAC,CAAC,OAAOG,KAAU,EAAE;IACnB;IACAA,KAAK,CAACC,aAAa,GAAG,IAAI;IAC1BD,KAAK,CAACE,OAAO,GAAG,gCAAgCN,UAAU,QAAQI,KAAK,CAACE,OAAO,EAAE;IACjF,MAAMF,KAAK;EACb;AACF;AAEO,SAASG,gBAAgBA,CAACC,UAAkB,EAAEC,OAAsB,EAAwB;EACjG,MAAMC,MAAM,GAAGX,cAAc,CAACS,UAAU,EAAEC,OAAO,CAAC;EAClD,IAAIC,MAAM,EAAE;IACV;IACA,OAAOA,MAAM;EACf;EACA;EACA;EACA,MAAM,KAAIC,qBAAW,EAAC,6BAA6BH,UAAU,EAAE,EAAE,gBAAgB,CAAC;AACpF;AAEO,SAASI,eAAeA,CAACJ,UAAkB,EAA8B;EAC9E,MAAME,MAAM,GAAGG,mBAAQ,CAACC,IAAI,CAACN,UAAU,EAAE;IAAEO,KAAK,EAAE;EAAK,CAAC,CAAC;EACzD,IAAIL,MAAM,EAAE;IACV,OAAOA,MAAM;EACf;EACA,MAAM,KAAIC,qBAAW,EAAC,6BAA6BH,UAAU,EAAE,EAAE,gBAAgB,CAAC;AACpF","ignoreList":[]}
1
+ {"version":3,"file":"getConfig.js","names":["_jsonFile","data","_interopRequireDefault","require","_fs","_Errors","_evalConfig","e","__esModule","default","readConfigFile","configFile","context","existsSync","evalConfig","error","isConfigError","message","getDynamicConfig","configPath","request","config","ConfigError","getStaticConfig","JsonFile","read","json5"],"sources":["../src/getConfig.ts"],"sourcesContent":["import JsonFile from '@expo/json-file';\nimport { existsSync } from 'fs';\n\nimport type { AppJSONConfig, ConfigContext, ExpoConfig } from './Config.types';\nimport { ConfigError } from './Errors';\nimport type { DynamicConfigResults } from './evalConfig';\nimport { evalConfig } from './evalConfig';\n\n// We cannot use async config resolution right now because Next.js doesn't support async configs.\n// If they don't add support for async Webpack configs then we may need to pull support for Next.js.\nfunction readConfigFile(configFile: string, context: ConfigContext): null | DynamicConfigResults {\n // If the file doesn't exist then we should skip it and continue searching.\n if (!existsSync(configFile)) {\n return null;\n }\n try {\n return evalConfig(configFile, context);\n } catch (error: any) {\n // @ts-ignore\n error.isConfigError = true;\n error.message = `Error reading Expo config at ${configFile}:\\n\\n${error.message}`;\n throw error;\n }\n}\n\nexport function getDynamicConfig(configPath: string, request: ConfigContext): DynamicConfigResults {\n const config = readConfigFile(configPath, request);\n if (config) {\n // The config must be serialized and evaluated ahead of time so the spawned process can send it over.\n return config;\n }\n // TODO: It seems this is only thrown if the file cannot be found (which may never happen).\n // If so we should throw a more helpful error.\n throw new ConfigError(`Failed to read config at: ${configPath}`, 'INVALID_CONFIG');\n}\n\nexport function getStaticConfig(configPath: string): AppJSONConfig | ExpoConfig {\n const config = JsonFile.read(configPath, { json5: true });\n if (config) {\n return config as any;\n }\n throw new ConfigError(`Failed to read config at: ${configPath}`, 'INVALID_CONFIG');\n}\n"],"mappings":";;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,IAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA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EAAE;IACV,OAAOA,MAAM;EACf;EACA,MAAM,KAAIC,qBAAW,EAAC,6BAA6BH,UAAU,EAAE,EAAE,gBAAgB,CAAC;AACpF","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.getExpoSDKVersion = getExpoSDKVersion;
7
5
  function _jsonFile() {
8
6
  const data = _interopRequireDefault(require("@expo/json-file"));
@@ -1 +1 @@
1
- {"version":3,"file":"getExpoSDKVersion.js","names":["_jsonFile","data","_interopRequireDefault","require","_requireUtils","_Errors","e","__esModule","default","getExpoSDKVersion","projectRoot","exp","sdkVersion","getExpoSDKVersionFromPackage","packageJsonPath","resolveFrom","ConfigError","expoPackageJson","JsonFile","read","json5","version","packageVersion","majorVersion","split","shift"],"sources":["../src/getExpoSDKVersion.ts"],"sourcesContent":["import JsonFile from '@expo/json-file';\nimport { resolveFrom } from '@expo/require-utils';\n\nimport type { ExpoConfig } from './Config.types';\nimport { ConfigError } from './Errors';\n\n/**\n * Resolve the Expo SDK Version either from the input Expo config or from the installed\n * version of the `expo` package.\n */\nexport function getExpoSDKVersion(\n projectRoot: string,\n exp: Pick<ExpoConfig, 'sdkVersion'> = {}\n): string {\n return exp?.sdkVersion ?? getExpoSDKVersionFromPackage(projectRoot);\n}\n\n/**\n * Resolve the Expo SDK Version either from the input Expo config or from the installed\n * version of the `expo` package.\n */\nfunction getExpoSDKVersionFromPackage(projectRoot: string): string {\n const packageJsonPath = resolveFrom(projectRoot, 'expo/package.json');\n if (!packageJsonPath) {\n throw new ConfigError(\n `Cannot determine the project's Expo SDK version because the module \\`expo\\` is not installed. Install it with \\`npm install expo\\` and try again.`,\n 'MODULE_NOT_FOUND'\n );\n }\n const expoPackageJson = JsonFile.read(packageJsonPath, { json5: true });\n const { version: packageVersion } = expoPackageJson;\n\n if (!(typeof packageVersion === 'string')) {\n // This is technically impossible.\n throw new ConfigError(\n `Cannot determine the project's Expo SDK version because the module \\`expo\\` has an invalid package.json (missing \\`version\\` field). Try reinstalling node modules and trying again.`,\n 'MODULE_NOT_FOUND'\n );\n }\n\n const majorVersion = packageVersion.split('.').shift();\n return `${majorVersion}.0.0`;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAuC,SAAAC,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvC;AACA;AACA;AACA;AACO,SAASG,iBAAiBA,CAC/BC,WAAmB,EACnBC,GAAmC,GAAG,CAAC,CAAC,EAChC;EACR,OAAOA,GAAG,EAAEC,UAAU,IAAIC,4BAA4B,CAACH,WAAW,CAAC;AACrE;;AAEA;AACA;AACA;AACA;AACA,SAASG,4BAA4BA,CAACH,WAAmB,EAAU;EACjE,MAAMI,eAAe,GAAG,IAAAC,2BAAW,EAACL,WAAW,EAAE,mBAAmB,CAAC;EACrE,IAAI,CAACI,eAAe,EAAE;IACpB,MAAM,KAAIE,qBAAW,EACnB,mJAAmJ,EACnJ,kBACF,CAAC;EACH;EACA,MAAMC,eAAe,GAAGC,mBAAQ,CAACC,IAAI,CAACL,eAAe,EAAE;IAAEM,KAAK,EAAE;EAAK,CAAC,CAAC;EACvE,MAAM;IAAEC,OAAO,EAAEC;EAAe,CAAC,GAAGL,eAAe;EAEnD,IAAI,EAAE,OAAOK,cAAc,KAAK,QAAQ,CAAC,EAAE;IACzC;IACA,MAAM,KAAIN,qBAAW,EACnB,sLAAsL,EACtL,kBACF,CAAC;EACH;EAEA,MAAMO,YAAY,GAAGD,cAAc,CAACE,KAAK,CAAC,GAAG,CAAC,CAACC,KAAK,CAAC,CAAC;EACtD,OAAO,GAAGF,YAAY,MAAM;AAC9B","ignoreList":[]}
1
+ {"version":3,"file":"getExpoSDKVersion.js","names":["_jsonFile","data","_interopRequireDefault","require","_requireUtils","_Errors","e","__esModule","default","getExpoSDKVersion","projectRoot","exp","sdkVersion","getExpoSDKVersionFromPackage","packageJsonPath","resolveFrom","ConfigError","expoPackageJson","JsonFile","read","json5","version","packageVersion","majorVersion","split","shift"],"sources":["../src/getExpoSDKVersion.ts"],"sourcesContent":["import JsonFile from '@expo/json-file';\nimport { resolveFrom } from '@expo/require-utils';\n\nimport type { ExpoConfig } from './Config.types';\nimport { ConfigError } from './Errors';\n\n/**\n * Resolve the Expo SDK Version either from the input Expo config or from the installed\n * version of the `expo` package.\n */\nexport function getExpoSDKVersion(\n projectRoot: string,\n exp: Pick<ExpoConfig, 'sdkVersion'> = {}\n): string {\n return exp?.sdkVersion ?? getExpoSDKVersionFromPackage(projectRoot);\n}\n\n/**\n * Resolve the Expo SDK Version either from the input Expo config or from the installed\n * version of the `expo` package.\n */\nfunction getExpoSDKVersionFromPackage(projectRoot: string): string {\n const packageJsonPath = resolveFrom(projectRoot, 'expo/package.json');\n if (!packageJsonPath) {\n throw new ConfigError(\n `Cannot determine the project's Expo SDK version because the module \\`expo\\` is not installed. Install it with \\`npm install expo\\` and try again.`,\n 'MODULE_NOT_FOUND'\n );\n }\n const expoPackageJson = JsonFile.read(packageJsonPath, { json5: true });\n const { version: packageVersion } = expoPackageJson;\n\n if (!(typeof packageVersion === 'string')) {\n // This is technically impossible.\n throw new ConfigError(\n `Cannot determine the project's Expo SDK version because the module \\`expo\\` has an invalid package.json (missing \\`version\\` field). Try reinstalling node modules and trying again.`,\n 'MODULE_NOT_FOUND'\n );\n }\n\n const majorVersion = packageVersion.split('.').shift();\n return `${majorVersion}.0.0`;\n}\n"],"mappings":";;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAuC,SAAAC,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvC;AACA;AACA;AACA;AACO,SAASG,iBAAiBA,CAC/BC,WAAmB,EACnBC,GAAmC,GAAG,CAAC,CAAC,EAChC;EACR,OAAOA,GAAG,EAAEC,UAAU,IAAIC,4BAA4B,CAACH,WAAW,CAAC;AACrE;;AAEA;AACA;AACA;AACA;AACA,SAASG,4BAA4BA,CAACH,WAAmB,EAAU;EACjE,MAAMI,eAAe,GAAG,IAAAC,2BAAW,EAACL,WAAW,EAAE,mBAAmB,CAAC;EACrE,IAAI,CAACI,eAAe,EAAE;IACpB,MAAM,KAAIE,qBAAW,EACnB,mJAAmJ,EACnJ,kBACF,CAAC;EACH;EACA,MAAMC,eAAe,GAAGC,mBAAQ,CAACC,IAAI,CAACL,eAAe,EAAE;IAAEM,KAAK,EAAE;EAAK,CAAC,CAAC;EACvE,MAAM;IAAEC,OAAO,EAAEC;EAAe,CAAC,GAAGL,eAAe;EAEnD,IAAI,EAAE,OAAOK,cAAc,KAAK,QAAQ,CAAC,EAAE;IACzC;IACA,MAAM,KAAIN,qBAAW,EACnB,sLAAsL,EACtL,kBACF,CAAC;EACH;EAEA,MAAMO,YAAY,GAAGD,cAAc,CAACE,KAAK,CAAC,GAAG,CAAC,CAACC,KAAK,CAAC,CAAC;EACtD,OAAO,GAAGF,YAAY,MAAM;AAC9B","ignoreList":[]}
package/build/index.js CHANGED
@@ -1,61 +1,34 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  var _Config = require("./Config");
7
5
  Object.keys(_Config).forEach(function (key) {
8
6
  if (key === "default" || key === "__esModule") return;
9
7
  if (key in exports && exports[key] === _Config[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _Config[key];
14
- }
15
- });
8
+ exports[key] = _Config[key];
16
9
  });
17
10
  var _Config2 = require("./Config.types");
18
11
  Object.keys(_Config2).forEach(function (key) {
19
12
  if (key === "default" || key === "__esModule") return;
20
13
  if (key in exports && exports[key] === _Config2[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _Config2[key];
25
- }
26
- });
14
+ exports[key] = _Config2[key];
27
15
  });
28
16
  var _getExpoSDKVersion = require("./getExpoSDKVersion");
29
17
  Object.keys(_getExpoSDKVersion).forEach(function (key) {
30
18
  if (key === "default" || key === "__esModule") return;
31
19
  if (key in exports && exports[key] === _getExpoSDKVersion[key]) return;
32
- Object.defineProperty(exports, key, {
33
- enumerable: true,
34
- get: function () {
35
- return _getExpoSDKVersion[key];
36
- }
37
- });
20
+ exports[key] = _getExpoSDKVersion[key];
38
21
  });
39
22
  var _Errors = require("./Errors");
40
23
  Object.keys(_Errors).forEach(function (key) {
41
24
  if (key === "default" || key === "__esModule") return;
42
25
  if (key in exports && exports[key] === _Errors[key]) return;
43
- Object.defineProperty(exports, key, {
44
- enumerable: true,
45
- get: function () {
46
- return _Errors[key];
47
- }
48
- });
26
+ exports[key] = _Errors[key];
49
27
  });
50
28
  var _buildCacheProvider = require("./buildCacheProvider");
51
29
  Object.keys(_buildCacheProvider).forEach(function (key) {
52
30
  if (key === "default" || key === "__esModule") return;
53
31
  if (key in exports && exports[key] === _buildCacheProvider[key]) return;
54
- Object.defineProperty(exports, key, {
55
- enumerable: true,
56
- get: function () {
57
- return _buildCacheProvider[key];
58
- }
59
- });
32
+ exports[key] = _buildCacheProvider[key];
60
33
  });
61
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_Config","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_Config2","_getExpoSDKVersion","_Errors","_buildCacheProvider"],"sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable import/export */\n\nexport * from './Config';\nexport * from './Config.types';\nexport * from './getExpoSDKVersion';\nexport * from './Errors';\nexport * from './buildCacheProvider';\n"],"mappings":";;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,QAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,QAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,QAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,U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key","exports","_Config2","_getExpoSDKVersion","_Errors","_buildCacheProvider"],"sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable import/export */\n\nexport * from './Config';\nexport * from './Config.types';\nexport * from './getExpoSDKVersion';\nexport * from './Errors';\nexport * from './buildCacheProvider';\n"],"mappings":";;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAL,OAAA,CAAAK,GAAA;AAAA;AACA,IAAAE,QAAA,GAAAN,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAI,QAAA,EAAAH,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAE,QAAA,CAAAF,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAE,QAAA,CAAAF,GAAA;AAAA;AACA,IAAAG,kBAAA,GAAAP,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAK,kBAAA,EAAAJ,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAG,kBAAA,CAAAH,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAG,kBAAA,CAAAH,GAAA;AAAA;AACA,IAAAI,OAAA,GAAAR,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAM,OAAA,EAAAL,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAI,OAAA,CAAAJ,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAI,OAAA,CAAAJ,GAAA;AAAA;AACA,IAAAK,mBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,mBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,mBAAA,CAAAL,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAK,mBAAA,CAAAL,GAAA;AAAA","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.env = void 0;
7
5
  function _getenv() {
8
6
  const data = require("getenv");
@@ -1 +1 @@
1
- {"version":3,"file":"env.js","names":["_getenv","data","require","Env","EXPO_NO_METRO_WORKSPACE_ROOT","string","console","warn","boolish","env","exports"],"sources":["../../src/paths/env.ts"],"sourcesContent":["import { boolish, string } from 'getenv';\n\nclass Env {\n /** Disable auto server root detection for Metro. This will not change the server root to the workspace root. */\n get EXPO_NO_METRO_WORKSPACE_ROOT(): boolean {\n if (string('EXPO_USE_METRO_WORKSPACE_ROOT', '')) {\n console.warn(\n 'EXPO_USE_METRO_WORKSPACE_ROOT is enabled by default, use EXPO_NO_METRO_WORKSPACE_ROOT instead to disable.'\n );\n }\n\n return boolish('EXPO_NO_METRO_WORKSPACE_ROOT', false);\n }\n}\n\nexport const env = new Env();\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,MAAME,GAAG,CAAC;EACR;EACA,IAAIC,4BAA4BA,CAAA,EAAY;IAC1C,IAAI,IAAAC,gBAAM,EAAC,+BAA+B,EAAE,EAAE,CAAC,EAAE;MAC/CC,OAAO,CAACC,IAAI,CACV,2GACF,CAAC;IACH;IAEA,OAAO,IAAAC,iBAAO,EAAC,8BAA8B,EAAE,KAAK,CAAC;EACvD;AACF;AAEO,MAAMC,GAAG,GAAAC,OAAA,CAAAD,GAAA,GAAG,IAAIN,GAAG,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"env.js","names":["_getenv","data","require","Env","EXPO_NO_METRO_WORKSPACE_ROOT","string","console","warn","boolish","env","exports"],"sources":["../../src/paths/env.ts"],"sourcesContent":["import { boolish, string } from 'getenv';\n\nclass Env {\n /** Disable auto server root detection for Metro. This will not change the server root to the workspace root. */\n get EXPO_NO_METRO_WORKSPACE_ROOT(): boolean {\n if (string('EXPO_USE_METRO_WORKSPACE_ROOT', '')) {\n console.warn(\n 'EXPO_USE_METRO_WORKSPACE_ROOT is enabled by default, use EXPO_NO_METRO_WORKSPACE_ROOT instead to disable.'\n );\n }\n\n return boolish('EXPO_NO_METRO_WORKSPACE_ROOT', false);\n }\n}\n\nexport const env = new Env();\n"],"mappings":";;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,MAAME,GAAG,CAAC;EACR;EACA,IAAIC,4BAA4BA,CAAA,EAAY;IAC1C,IAAI,IAAAC,gBAAM,EAAC,+BAA+B,EAAE,EAAE,CAAC,EAAE;MAC/CC,OAAO,CAACC,IAAI,CACV,2GACF,CAAC;IACH;IAEA,OAAO,IAAAC,iBAAO,EAAC,8BAA8B,EAAE,KAAK,CAAC;EACvD;AACF;AAEO,MAAMC,GAAG,GAAAC,OAAA,CAAAD,GAAA,GAAG,IAAIN,GAAG,CAAC,CAAC","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.getBareExtensions = getBareExtensions;
7
5
  exports.getExtensions = getExtensions;
8
6
  exports.getLanguageExtensionsInOrder = getLanguageExtensionsInOrder;
@@ -1 +1 @@
1
- {"version":3,"file":"extensions.js","names":["_assert","data","_interopRequireDefault","require","e","__esModule","default","getExtensions","platforms","extensions","workflows","assert","Array","isArray","fileExtensions","workflow","platform","extension","push","filter","Boolean","join","getLanguageExtensionsInOrder","isTS","isModern","isReact","addLanguage","lang","unshift","getBareExtensions","languageOptions","_addMiscellaneousExtensions","PLATFORM_EXTENSIONS","tvos","macos","getPlatformExtensions","customPlatformExtensions","platformExtensions","includes"],"sources":["../../src/paths/extensions.ts"],"sourcesContent":["import assert from 'assert';\n\nexport type LanguageOptions = {\n isTS: boolean;\n isModern: boolean;\n isReact: boolean;\n};\n\nexport function getExtensions(\n platforms: readonly string[],\n extensions: readonly string[],\n workflows: readonly string[]\n): string[] {\n // In the past we used spread operators to collect the values so now we enforce type safety on them.\n assert(Array.isArray(platforms), 'Expected: `platforms: string[]`');\n assert(Array.isArray(extensions), 'Expected: `extensions: string[]`');\n assert(Array.isArray(workflows), 'Expected: `workflows: string[]`');\n\n const fileExtensions = [];\n // support .expo files\n for (const workflow of [...workflows, '']) {\n // Ensure order is correct: [platformA.js, platformB.js, js]\n for (const platform of [...platforms, '']) {\n // Support both TypeScript and JavaScript\n for (const extension of extensions) {\n fileExtensions.push([platform, workflow, extension].filter(Boolean).join('.'));\n }\n }\n }\n return fileExtensions;\n}\n\nexport function getLanguageExtensionsInOrder({\n isTS,\n isModern,\n isReact,\n}: LanguageOptions): string[] {\n // @ts-ignore: filter removes false type\n const addLanguage = (lang: string): string[] => [lang, isReact && `${lang}x`].filter(Boolean);\n\n // Support JavaScript\n let extensions = addLanguage('js');\n\n if (isModern) {\n extensions.unshift('mjs');\n }\n if (isTS) {\n extensions = [...addLanguage('ts'), ...extensions];\n }\n\n return extensions;\n}\n\nexport function getBareExtensions(\n platforms: string[],\n languageOptions: LanguageOptions = { isTS: true, isModern: true, isReact: true }\n): string[] {\n const fileExtensions = getExtensions(\n platforms,\n getLanguageExtensionsInOrder(languageOptions),\n []\n );\n // Always add these last\n _addMiscellaneousExtensions(platforms, fileExtensions);\n return fileExtensions;\n}\n\nconst PLATFORM_EXTENSIONS: Record<string, readonly string[]> = {\n tvos: ['tvos', 'ios', 'native'],\n macos: ['macos', 'ios', 'native'],\n};\n\n/** Expand `extensions` with OOT platform extensions for platform */\nexport function getPlatformExtensions(\n platform: string,\n extensions: readonly string[],\n customPlatformExtensions: readonly string[] | undefined\n): string[] | null {\n const platformExtensions = customPlatformExtensions || PLATFORM_EXTENSIONS[platform];\n return platformExtensions ? getExtensions(platformExtensions, extensions, []) : null;\n}\n\nfunction _addMiscellaneousExtensions(platforms: string[], fileExtensions: string[]): string[] {\n // Always add these with no platform extension\n // In the future we may want to add platform and workspace extensions to json.\n fileExtensions.push('json');\n // Native doesn't currently support web assembly.\n if (platforms.includes('web')) {\n fileExtensions.push('wasm');\n }\n return fileExtensions;\n}\n"],"mappings":";;;;;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA4B,SAAAC,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAQrB,SAASG,aAAaA,CAC3BC,SAA4B,EAC5BC,UAA6B,EAC7BC,SAA4B,EAClB;EACV;EACA,IAAAC,iBAAM,EAACC,KAAK,CAACC,OAAO,CAACL,SAAS,CAAC,EAAE,iCAAiC,CAAC;EACnE,IAAAG,iBAAM,EAACC,KAAK,CAACC,OAAO,CAACJ,UAAU,CAAC,EAAE,kCAAkC,CAAC;EACrE,IAAAE,iBAAM,EAACC,KAAK,CAACC,OAAO,CAACH,SAAS,CAAC,EAAE,iCAAiC,CAAC;EAEn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EA,MAAMkB,mBAAsD,GAAG;EAC7DC,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC;EAC/BC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ;AAClC,CAAC;;AAED;AACO,SAASC,qBAAqBA,CACnCnB,QAAgB,EAChBP,UAA6B,EAC7B2B,wBAAuD,EACtC;EACjB,MAAMC,kBAAkB,GAAGD,wBAAwB,IAAIJ,mBAAmB,CAAChB,QAAQ,CAAC;EACpF,OAAOqB,kBAAkB,GAAG9B,aAAa,CAAC8B,kBAAkB,EAAE5B,UAAU,EAAE,EAAE,CAAC,GAAG,IAAI;AACtF;AAEA,SAASsB,2BAA2BA,CAACvB,SAAmB,EAAEM,cAAwB,EAAY;EAC5F;EACA;EACAA,cAAc,CAACI,IAAI,CAAC,MAAM,CAAC;EAC3B;EACA,IAAIV,SAAS,CAAC8B,QAAQ,CAAC,KAAK,CAAC,EAAE;IAC7BxB,cAAc,CAACI,IAAI,CAAC,MAAM,CAAC;EAC7B;EACA,OAAOJ,cAAc;AACvB","ignoreList":[]}
1
+ {"version":3,"file":"extensions.js","names":["_assert","data","_interopRequireDefault","require","e","__esModule","default","getExtensions","platforms","extensions","workflows","assert","Array","isArray","fileExtensions","workflow","platform","extension","push","filter","Boolean","join","getLanguageExtensionsInOrder","isTS","isModern","isReact","addLanguage","lang","unshift","getBareExtensions","languageOptions","_addMiscellaneousExtensions","PLATFORM_EXTENSIONS","tvos","macos","getPlatformExtensions","customPlatformExtensions","platformExtensions","includes"],"sources":["../../src/paths/extensions.ts"],"sourcesContent":["import assert from 'assert';\n\nexport type LanguageOptions = {\n isTS: boolean;\n isModern: boolean;\n isReact: boolean;\n};\n\nexport function getExtensions(\n platforms: readonly string[],\n extensions: readonly string[],\n workflows: readonly string[]\n): string[] {\n // In the past we used spread operators to collect the values so now we enforce type safety on them.\n assert(Array.isArray(platforms), 'Expected: `platforms: string[]`');\n assert(Array.isArray(extensions), 'Expected: `extensions: string[]`');\n assert(Array.isArray(workflows), 'Expected: `workflows: string[]`');\n\n const fileExtensions = [];\n // support .expo files\n for (const workflow of [...workflows, '']) {\n // Ensure order is correct: [platformA.js, platformB.js, js]\n for (const platform of [...platforms, '']) {\n // Support both TypeScript and JavaScript\n for (const extension of extensions) {\n fileExtensions.push([platform, workflow, extension].filter(Boolean).join('.'));\n }\n }\n }\n return fileExtensions;\n}\n\nexport function getLanguageExtensionsInOrder({\n isTS,\n isModern,\n isReact,\n}: LanguageOptions): string[] {\n // @ts-ignore: filter removes false type\n const addLanguage = (lang: string): string[] => [lang, isReact && `${lang}x`].filter(Boolean);\n\n // Support JavaScript\n let extensions = addLanguage('js');\n\n if (isModern) {\n extensions.unshift('mjs');\n }\n if (isTS) {\n extensions = [...addLanguage('ts'), ...extensions];\n }\n\n return extensions;\n}\n\nexport function getBareExtensions(\n platforms: string[],\n languageOptions: LanguageOptions = { isTS: true, isModern: true, isReact: true }\n): string[] {\n const fileExtensions = getExtensions(\n platforms,\n getLanguageExtensionsInOrder(languageOptions),\n []\n );\n // Always add these last\n _addMiscellaneousExtensions(platforms, fileExtensions);\n return fileExtensions;\n}\n\nconst PLATFORM_EXTENSIONS: Record<string, readonly string[]> = {\n tvos: ['tvos', 'ios', 'native'],\n macos: ['macos', 'ios', 'native'],\n};\n\n/** Expand `extensions` with OOT platform extensions for platform */\nexport function getPlatformExtensions(\n platform: string,\n extensions: readonly string[],\n customPlatformExtensions: readonly string[] | undefined\n): string[] | null {\n const platformExtensions = customPlatformExtensions || PLATFORM_EXTENSIONS[platform];\n return platformExtensions ? getExtensions(platformExtensions, extensions, []) : null;\n}\n\nfunction _addMiscellaneousExtensions(platforms: string[], fileExtensions: string[]): string[] {\n // Always add these with no platform extension\n // In the future we may want to add platform and workspace extensions to json.\n fileExtensions.push('json');\n // Native doesn't currently support web assembly.\n if (platforms.includes('web')) {\n fileExtensions.push('wasm');\n }\n return fileExtensions;\n}\n"],"mappings":";;;;;;;AAAA,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OAAOJ,cAAc;AACvB","ignoreList":[]}
@@ -1,28 +1,16 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  var _paths = require("./paths");
7
5
  Object.keys(_paths).forEach(function (key) {
8
6
  if (key === "default" || key === "__esModule") return;
9
7
  if (key in exports && exports[key] === _paths[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _paths[key];
14
- }
15
- });
8
+ exports[key] = _paths[key];
16
9
  });
17
10
  var _extensions = require("./extensions");
18
11
  Object.keys(_extensions).forEach(function (key) {
19
12
  if (key === "default" || key === "__esModule") return;
20
13
  if (key in exports && exports[key] === _extensions[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _extensions[key];
25
- }
26
- });
14
+ exports[key] = _extensions[key];
27
15
  });
28
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_paths","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_extensions"],"sources":["../../src/paths/index.ts"],"sourcesContent":["export * from './paths';\nexport * from './extensions';\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,WAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,WAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,WAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,WAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_paths","require","Object","keys","forEach","key","exports","_extensions"],"sources":["../../src/paths/index.ts"],"sourcesContent":["export * from './paths';\nexport * from './extensions';\n"],"mappings":";;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAL,MAAA,CAAAK,GAAA;AAAA;AACA,IAAAE,WAAA,GAAAN,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAI,WAAA,EAAAH,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAE,WAAA,CAAAF,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAE,WAAA,CAAAF,GAAA;AAAA","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.convertEntryPointToRelative = convertEntryPointToRelative;
7
5
  exports.ensureSlash = ensureSlash;
8
6
  exports.getFileWithExtensions = getFileWithExtensions;
@@ -1 +1 @@
1
- {"version":3,"file":"paths.js","names":["_requireUtils","data","require","_fs","_interopRequireDefault","_path","_resolveWorkspaceRoot","_env","_extensions","_Config","_Errors","e","__esModule","default","ensureSlash","inputPath","needsSlash","hasSlash","endsWith","substring","length","getPossibleProjectRoot","fs","realpathSync","process","cwd","nativePlatforms","resolveEntryPoint","projectRoot","platform","pkg","getPackageJson","platforms","includes","extensions","getBareExtensions","main","entry","resolveFrom","ConfigError","getFileWithExtensions","fromDirectory","moduleId","modulePath","path","join","existsSync","extension","_metroServerRootCache","Map","getMetroServerRoot","env","EXPO_NO_METRO_WORKSPACE_ROOT","resolve","serverRoot","get","resolveWorkspaceRoot","set","getMetroWorkspaceGlobs","monorepoRoot","getWorkspaceGlobs","toPosixPath","filePath","replace","convertEntryPointToRelative","absolutePath","extname","isAbsolute","realServerRoot","startsWith","sep","realAbsolutePath","relative","slice","resolveRelativeEntryPoint","options","exports"],"sources":["../../src/paths/paths.ts"],"sourcesContent":["import { resolveFrom } from '@expo/require-utils';\nimport fs from 'fs';\nimport path from 'path';\nimport { getWorkspaceGlobs, resolveWorkspaceRoot } from 'resolve-workspace-root';\n\nimport { env } from './env';\nimport { getBareExtensions } from './extensions';\nimport { getPackageJson } from '../Config';\nimport type { PackageJSONConfig } from '../Config.types';\nimport { ConfigError } from '../Errors';\n\n// https://github.com/facebook/create-react-app/blob/9750738cce89a967cc71f28390daf5d4311b193c/packages/react-scripts/config/paths.js#L22\nexport function ensureSlash(inputPath: string, needsSlash: boolean): string {\n const hasSlash = inputPath.endsWith('/');\n if (hasSlash && !needsSlash) {\n return inputPath.substring(0, inputPath.length - 1);\n } else if (!hasSlash && needsSlash) {\n return `${inputPath}/`;\n } else {\n return inputPath;\n }\n}\n\nexport function getPossibleProjectRoot(): string {\n return fs.realpathSync(process.cwd());\n}\n\nconst nativePlatforms = ['ios', 'android'];\n\n/** @returns the absolute entry file for an Expo project. */\nexport function resolveEntryPoint(\n projectRoot: string,\n {\n platform,\n pkg = getPackageJson(projectRoot),\n }: {\n platform?: string;\n pkg?: PackageJSONConfig;\n } = {}\n): string {\n const platforms = !platform\n ? []\n : nativePlatforms.includes(platform)\n ? [platform, 'native']\n : [platform];\n const extensions = getBareExtensions(platforms);\n\n // If the config doesn't define a custom entry then we want to look at the `package.json`s `main` field, and try again.\n const { main } = pkg;\n if (main && typeof main === 'string') {\n // Allow for paths like: `{ \"main\": \"expo/AppEntry\" }`\n const entry = resolveFrom(projectRoot, main, { extensions });\n if (!entry) {\n throw new ConfigError(\n `Cannot resolve entry file: The \\`main\\` field defined in your \\`package.json\\` points to an unresolvable or non-existent path.`,\n 'ENTRY_NOT_FOUND'\n );\n }\n return entry;\n }\n\n // Check for a root index.* file in the project root.\n let entry = resolveFrom(projectRoot, './index', { extensions });\n if (entry) {\n return entry;\n }\n\n // If none of the default files exist then we will attempt to use the main Expo entry point.\n // This requires `expo` to be installed in the project to work as it will use `node_module/expo/AppEntry.js`\n // Doing this enables us to create a bare minimum Expo project.\n\n // TODO(Bacon): We may want to do a check against `./App` and `expo` in the `package.json` `dependencies` as we can more accurately ensure that the project is expo-min without needing the modules installed.\n entry = resolveFrom(projectRoot, 'expo/AppEntry', { extensions });\n if (!entry) {\n throw new ConfigError(\n `The project entry file could not be resolved. Define it in the \\`main\\` field of the \\`package.json\\`, create an \\`index.js\\`, or install the \\`expo\\` package.`,\n 'ENTRY_NOT_FOUND'\n );\n }\n\n return entry;\n}\n\n// Statically attempt to resolve a module but with the ability to resolve like a bundler.\n// This won't use node module resolution.\n/** @deprecated */\nexport function getFileWithExtensions(\n fromDirectory: string,\n moduleId: string,\n extensions: string[]\n): string | null {\n const modulePath = path.join(fromDirectory, moduleId);\n if (fs.existsSync(modulePath)) {\n return modulePath;\n }\n for (const extension of extensions) {\n const modulePath = path.join(fromDirectory, `${moduleId}.${extension}`);\n if (fs.existsSync(modulePath)) {\n return modulePath;\n }\n }\n return null;\n}\n\nconst _metroServerRootCache = new Map<string, string>();\n\n/** Get the Metro server root, when working in monorepos */\nexport function getMetroServerRoot(projectRoot: string): string {\n if (env.EXPO_NO_METRO_WORKSPACE_ROOT) {\n return projectRoot;\n }\n\n projectRoot = path.resolve(projectRoot);\n\n let serverRoot: string | null | undefined = _metroServerRootCache.get(projectRoot);\n if (serverRoot != null) {\n return serverRoot;\n }\n\n serverRoot = resolveWorkspaceRoot(projectRoot);\n if (serverRoot != null) {\n serverRoot = path.resolve(serverRoot);\n _metroServerRootCache.set(projectRoot, serverRoot);\n }\n\n return serverRoot ?? projectRoot;\n}\n\n/**\n * Get the workspace globs for Metro's watchFolders.\n * @note This does not traverse the monorepo, and should be used with `getMetroServerRoot`\n */\nexport function getMetroWorkspaceGlobs(monorepoRoot: string): string[] | null {\n return getWorkspaceGlobs(monorepoRoot);\n}\n\nfunction toPosixPath(filePath: string): string {\n return filePath.replace(/\\\\/g, '/');\n}\n\n// TODO: Move to internals\n/**\n * Convert an absolute entry point to a server or project root relative filepath.\n * This is useful on Android where the entry point is an absolute path.\n * @deprecated\n */\nexport function convertEntryPointToRelative(\n projectRoot: string,\n absolutePath: string,\n extname: string | null = '.js'\n) {\n if (!path.isAbsolute(absolutePath)) {\n absolutePath = path.resolve(process.cwd(), projectRoot, absolutePath);\n }\n\n // The project root could be using a different root on MacOS (`/var` vs `/private/var`)\n // We need to make sure to get the non-symlinked path to the server or project root.\n let serverRoot = getMetroServerRoot(projectRoot);\n try {\n const realServerRoot = fs.realpathSync(serverRoot);\n // If the absolute path already starts with the resolved server root, use it directly\n if (absolutePath.startsWith(realServerRoot + path.sep)) {\n serverRoot = realServerRoot;\n } else if (absolutePath.startsWith(serverRoot + path.sep)) {\n // If the absolute path starts with the (possibly symlinked) server root, preserve it as-is\n } else {\n // Otherwise, resolve the absolute path to check if it matches the real server root.\n // This is only needed when absolutePath doesn't match either root representation,\n // and absolutePath may not be valid (e.g. non-existent file)\n try {\n const realAbsolutePath = fs.realpathSync(absolutePath);\n if (realAbsolutePath.startsWith(realServerRoot + path.sep)) {\n serverRoot = realServerRoot;\n absolutePath = realAbsolutePath;\n } else if (realServerRoot !== serverRoot || realAbsolutePath !== absolutePath) {\n // Last resort: fall back to the legacy behavior of using the realpath for both,\n // without knowing if the resulting relative path will be valid\n serverRoot = realServerRoot;\n absolutePath = realAbsolutePath;\n }\n } catch {}\n }\n } catch {\n // NOTE: `fs.realpathSync` can fail if `projectRoot` doesn't exist (e.g. mocked folder)\n }\n\n let entry = toPosixPath(path.relative(serverRoot, absolutePath));\n\n // Strip extname, if it's set and trivially resolvable by Metro\n if (extname != null) {\n if (extname[0] !== '.') {\n extname = `.${extname}`;\n }\n if (entry.endsWith(extname)) {\n entry = entry.slice(0, -extname.length);\n }\n }\n\n return entry;\n}\n\n// TODO: Move to internals\n/**\n * Resolve the entry point relative to either the server or project root.\n * This relative entry path should be used to pass non-absolute paths to Metro,\n * accounting for possible monorepos and keeping the cache sharable (no absolute paths).\n * @deprecated\n */\nexport const resolveRelativeEntryPoint: typeof resolveEntryPoint = (projectRoot, options) => {\n return convertEntryPointToRelative(projectRoot, resolveEntryPoint(projectRoot, options));\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAAA,cAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,aAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,IAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,MAAA;EAAA,MAAAJ,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,sBAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,qBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,KAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,IAAA,YA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IAAI7B,KAAK,CAACnB,QAAQ,CAACgD,OAAO,CAAC,EAAE;MAC3B7B,KAAK,GAAGA,KAAK,CAACoC,KAAK,CAAC,CAAC,EAAE,CAACP,OAAO,CAAC9C,MAAM,CAAC;IACzC;EACF;EAEA,OAAOiB,KAAK;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMqC,yBAAmD,GAAGA,CAAC9C,WAAW,EAAE+C,OAAO,KAAK;EAC3F,OAAOX,2BAA2B,CAACpC,WAAW,EAAED,iBAAiB,CAACC,WAAW,EAAE+C,OAAO,CAAC,CAAC;AAC1F,CAAC;AAACC,OAAA,CAAAF,yBAAA,GAAAA,yBAAA","ignoreList":[]}
1
+ {"version":3,"file":"paths.js","names":["_requireUtils","data","require","_fs","_interopRequireDefault","_path","_resolveWorkspaceRoot","_env","_extensions","_Config","_Errors","e","__esModule","default","ensureSlash","inputPath","needsSlash","hasSlash","endsWith","substring","length","getPossibleProjectRoot","fs","realpathSync","process","cwd","nativePlatforms","resolveEntryPoint","projectRoot","platform","pkg","getPackageJson","platforms","includes","extensions","getBareExtensions","main","entry","resolveFrom","ConfigError","getFileWithExtensions","fromDirectory","moduleId","modulePath","path","join","existsSync","extension","_metroServerRootCache","Map","getMetroServerRoot","env","EXPO_NO_METRO_WORKSPACE_ROOT","resolve","serverRoot","get","resolveWorkspaceRoot","set","getMetroWorkspaceGlobs","monorepoRoot","getWorkspaceGlobs","toPosixPath","filePath","replace","convertEntryPointToRelative","absolutePath","extname","isAbsolute","realServerRoot","startsWith","sep","realAbsolutePath","relative","slice","resolveRelativeEntryPoint","options","exports"],"sources":["../../src/paths/paths.ts"],"sourcesContent":["import { resolveFrom } from '@expo/require-utils';\nimport fs from 'fs';\nimport path from 'path';\nimport { getWorkspaceGlobs, resolveWorkspaceRoot } from 'resolve-workspace-root';\n\nimport { env } from './env';\nimport { getBareExtensions } from './extensions';\nimport { getPackageJson } from '../Config';\nimport type { PackageJSONConfig } from '../Config.types';\nimport { ConfigError } from '../Errors';\n\n// https://github.com/facebook/create-react-app/blob/9750738cce89a967cc71f28390daf5d4311b193c/packages/react-scripts/config/paths.js#L22\nexport function ensureSlash(inputPath: string, needsSlash: boolean): string {\n const hasSlash = inputPath.endsWith('/');\n if (hasSlash && !needsSlash) {\n return inputPath.substring(0, inputPath.length - 1);\n } else if (!hasSlash && needsSlash) {\n return `${inputPath}/`;\n } else {\n return inputPath;\n }\n}\n\nexport function getPossibleProjectRoot(): string {\n return fs.realpathSync(process.cwd());\n}\n\nconst nativePlatforms = ['ios', 'android'];\n\n/** @returns the absolute entry file for an Expo project. */\nexport function resolveEntryPoint(\n projectRoot: string,\n {\n platform,\n pkg = getPackageJson(projectRoot),\n }: {\n platform?: string;\n pkg?: PackageJSONConfig;\n } = {}\n): string {\n const platforms = !platform\n ? []\n : nativePlatforms.includes(platform)\n ? [platform, 'native']\n : [platform];\n const extensions = getBareExtensions(platforms);\n\n // If the config doesn't define a custom entry then we want to look at the `package.json`s `main` field, and try again.\n const { main } = pkg;\n if (main && typeof main === 'string') {\n // Allow for paths like: `{ \"main\": \"expo/AppEntry\" }`\n const entry = resolveFrom(projectRoot, main, { extensions });\n if (!entry) {\n throw new ConfigError(\n `Cannot resolve entry file: The \\`main\\` field defined in your \\`package.json\\` points to an unresolvable or non-existent path.`,\n 'ENTRY_NOT_FOUND'\n );\n }\n return entry;\n }\n\n // Check for a root index.* file in the project root.\n let entry = resolveFrom(projectRoot, './index', { extensions });\n if (entry) {\n return entry;\n }\n\n // If none of the default files exist then we will attempt to use the main Expo entry point.\n // This requires `expo` to be installed in the project to work as it will use `node_module/expo/AppEntry.js`\n // Doing this enables us to create a bare minimum Expo project.\n\n // TODO(Bacon): We may want to do a check against `./App` and `expo` in the `package.json` `dependencies` as we can more accurately ensure that the project is expo-min without needing the modules installed.\n entry = resolveFrom(projectRoot, 'expo/AppEntry', { extensions });\n if (!entry) {\n throw new ConfigError(\n `The project entry file could not be resolved. Define it in the \\`main\\` field of the \\`package.json\\`, create an \\`index.js\\`, or install the \\`expo\\` package.`,\n 'ENTRY_NOT_FOUND'\n );\n }\n\n return entry;\n}\n\n// Statically attempt to resolve a module but with the ability to resolve like a bundler.\n// This won't use node module resolution.\n/** @deprecated */\nexport function getFileWithExtensions(\n fromDirectory: string,\n moduleId: string,\n extensions: string[]\n): string | null {\n const modulePath = path.join(fromDirectory, moduleId);\n if (fs.existsSync(modulePath)) {\n return modulePath;\n }\n for (const extension of extensions) {\n const modulePath = path.join(fromDirectory, `${moduleId}.${extension}`);\n if (fs.existsSync(modulePath)) {\n return modulePath;\n }\n }\n return null;\n}\n\nconst _metroServerRootCache = new Map<string, string>();\n\n/** Get the Metro server root, when working in monorepos */\nexport function getMetroServerRoot(projectRoot: string): string {\n if (env.EXPO_NO_METRO_WORKSPACE_ROOT) {\n return projectRoot;\n }\n\n projectRoot = path.resolve(projectRoot);\n\n let serverRoot: string | null | undefined = _metroServerRootCache.get(projectRoot);\n if (serverRoot != null) {\n return serverRoot;\n }\n\n serverRoot = resolveWorkspaceRoot(projectRoot);\n if (serverRoot != null) {\n serverRoot = path.resolve(serverRoot);\n _metroServerRootCache.set(projectRoot, serverRoot);\n }\n\n return serverRoot ?? projectRoot;\n}\n\n/**\n * Get the workspace globs for Metro's watchFolders.\n * @note This does not traverse the monorepo, and should be used with `getMetroServerRoot`\n */\nexport function getMetroWorkspaceGlobs(monorepoRoot: string): string[] | null {\n return getWorkspaceGlobs(monorepoRoot);\n}\n\nfunction toPosixPath(filePath: string): string {\n return filePath.replace(/\\\\/g, '/');\n}\n\n// TODO: Move to internals\n/**\n * Convert an absolute entry point to a server or project root relative filepath.\n * This is useful on Android where the entry point is an absolute path.\n * @deprecated\n */\nexport function convertEntryPointToRelative(\n projectRoot: string,\n absolutePath: string,\n extname: string | null = '.js'\n) {\n if (!path.isAbsolute(absolutePath)) {\n absolutePath = path.resolve(process.cwd(), projectRoot, absolutePath);\n }\n\n // The project root could be using a different root on MacOS (`/var` vs `/private/var`)\n // We need to make sure to get the non-symlinked path to the server or project root.\n let serverRoot = getMetroServerRoot(projectRoot);\n try {\n const realServerRoot = fs.realpathSync(serverRoot);\n // If the absolute path already starts with the resolved server root, use it directly\n if (absolutePath.startsWith(realServerRoot + path.sep)) {\n serverRoot = realServerRoot;\n } else if (absolutePath.startsWith(serverRoot + path.sep)) {\n // If the absolute path starts with the (possibly symlinked) server root, preserve it as-is\n } else {\n // Otherwise, resolve the absolute path to check if it matches the real server root.\n // This is only needed when absolutePath doesn't match either root representation,\n // and absolutePath may not be valid (e.g. non-existent file)\n try {\n const realAbsolutePath = fs.realpathSync(absolutePath);\n if (realAbsolutePath.startsWith(realServerRoot + path.sep)) {\n serverRoot = realServerRoot;\n absolutePath = realAbsolutePath;\n } else if (realServerRoot !== serverRoot || realAbsolutePath !== absolutePath) {\n // Last resort: fall back to the legacy behavior of using the realpath for both,\n // without knowing if the resulting relative path will be valid\n serverRoot = realServerRoot;\n absolutePath = realAbsolutePath;\n }\n } catch {}\n }\n } catch {\n // NOTE: `fs.realpathSync` can fail if `projectRoot` doesn't exist (e.g. mocked folder)\n }\n\n let entry = toPosixPath(path.relative(serverRoot, absolutePath));\n\n // Strip extname, if it's set and trivially resolvable by Metro\n if (extname != null) {\n if (extname[0] !== '.') {\n extname = `.${extname}`;\n }\n if (entry.endsWith(extname)) {\n entry = entry.slice(0, -extname.length);\n }\n }\n\n return entry;\n}\n\n// TODO: Move to internals\n/**\n * Resolve the entry point relative to either the server or project root.\n * This relative entry path should be used to pass non-absolute paths to Metro,\n * accounting for possible monorepos and keeping the cache sharable (no absolute paths).\n * @deprecated\n */\nexport const resolveRelativeEntryPoint: typeof resolveEntryPoint = (projectRoot, options) => {\n return convertEntryPointToRelative(projectRoot, resolveEntryPoint(projectRoot, options));\n};\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,cAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,aAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;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cAAc;UAC3BH,YAAY,GAAGM,gBAAgB;QACjC,CAAC,MAAM,IAAIH,cAAc,KAAKd,UAAU,IAAIiB,gBAAgB,KAAKN,YAAY,EAAE;UAC7E;UACA;UACAX,UAAU,GAAGc,cAAc;UAC3BH,YAAY,GAAGM,gBAAgB;QACjC;MACF,CAAC,CAAC,MAAM,CAAC;IACX;EACF,CAAC,CAAC,MAAM;IACN;EAAA;EAGF,IAAIlC,KAAK,GAAGwB,WAAW,CAACjB,eAAI,CAAC4B,QAAQ,CAAClB,UAAU,EAAEW,YAAY,CAAC,CAAC;;EAEhE;EACA,IAAIC,OAAO,IAAI,IAAI,EAAE;IACnB,IAAIA,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;MACtBA,OAAO,GAAG,IAAIA,OAAO,EAAE;IACzB;IACA,IAAI7B,KAAK,CAACnB,QAAQ,CAACgD,OAAO,CAAC,EAAE;MAC3B7B,KAAK,GAAGA,KAAK,CAACoC,KAAK,CAAC,CAAC,EAAE,CAACP,OAAO,CAAC9C,MAAM,CAAC;IACzC;EACF;EAEA,OAAOiB,KAAK;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMqC,yBAAmD,GAAGA,CAAC9C,WAAW,EAAE+C,OAAO,KAAK;EAC3F,OAAOX,2BAA2B,CAACpC,WAAW,EAAED,iBAAiB,CAACC,WAAW,EAAE+C,OAAO,CAAC,CAAC;AAC1F,CAAC;AAACC,OAAA,CAAAF,yBAAA,GAAAA,yBAAA","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.withConfigPlugins = void 0;
7
5
  function _configPlugins() {
8
6
  const data = require("@expo/config-plugins");
@@ -1 +1 @@
1
- {"version":3,"file":"withConfigPlugins.js","names":["_configPlugins","data","require","_Serialize","withConfigPlugins","config","skipPlugins","Array","isArray","plugins","length","withPlugins","serializeAfterStaticPlugins","exports"],"sources":["../../src/plugins/withConfigPlugins.ts"],"sourcesContent":["import type { ConfigPlugin } from '@expo/config-plugins';\nimport { withPlugins } from '@expo/config-plugins';\n\nimport { serializeAfterStaticPlugins } from '../Serialize';\n\n/**\n * Resolves static plugins array as config plugin functions.\n *\n * @param config\n * @param projectRoot\n */\nexport const withConfigPlugins: ConfigPlugin<boolean> = (config, skipPlugins) => {\n // @ts-ignore: plugins not on config type yet -- TODO\n if (!Array.isArray(config.plugins) || !config.plugins?.length) {\n return config;\n }\n if (!skipPlugins) {\n // Resolve and evaluate plugins\n // @ts-ignore: TODO: add plugins to the config schema\n config = withPlugins(config, config.plugins);\n } else {\n // Delete the plugins array in case someone added functions or other values which cannot be automatically serialized.\n delete config.plugins;\n }\n // plugins aren't serialized by default, serialize the plugins after resolving them.\n return serializeAfterStaticPlugins(config);\n};\n"],"mappings":";;;;;;AACA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,iBAAwC,GAAGA,CAACC,MAAM,EAAEC,WAAW,KAAK;EAC/E;EACA,IAAI,CAACC,KAAK,CAACC,OAAO,CAACH,MAAM,CAACI,OAAO,CAAC,IAAI,CAACJ,MAAM,CAACI,OAAO,EAAEC,MAAM,EAAE;IAC7D,OAAOL,MAAM;EACf;EACA,IAAI,CAACC,WAAW,EAAE;IAChB;IACA;IACAD,MAAM,GAAG,IAAAM,4BAAW,EAACN,MAAM,EAAEA,MAAM,CAACI,OAAO,CAAC;EAC9C,CAAC,MAAM;IACL;IACA,OAAOJ,MAAM,CAACI,OAAO;EACvB;EACA;EACA,OAAO,IAAAG,wCAA2B,EAACP,MAAM,CAAC;AAC5C,CAAC;AAACQ,OAAA,CAAAT,iBAAA,GAAAA,iBAAA","ignoreList":[]}
1
+ {"version":3,"file":"withConfigPlugins.js","names":["_configPlugins","data","require","_Serialize","withConfigPlugins","config","skipPlugins","Array","isArray","plugins","length","withPlugins","serializeAfterStaticPlugins","exports"],"sources":["../../src/plugins/withConfigPlugins.ts"],"sourcesContent":["import type { ConfigPlugin } from '@expo/config-plugins';\nimport { withPlugins } from '@expo/config-plugins';\n\nimport { serializeAfterStaticPlugins } from '../Serialize';\n\n/**\n * Resolves static plugins array as config plugin functions.\n *\n * @param config\n * @param projectRoot\n */\nexport const withConfigPlugins: ConfigPlugin<boolean> = (config, skipPlugins) => {\n // @ts-ignore: plugins not on config type yet -- TODO\n if (!Array.isArray(config.plugins) || !config.plugins?.length) {\n return config;\n }\n if (!skipPlugins) {\n // Resolve and evaluate plugins\n // @ts-ignore: TODO: add plugins to the config schema\n config = withPlugins(config, config.plugins);\n } else {\n // Delete the plugins array in case someone added functions or other values which cannot be automatically serialized.\n delete config.plugins;\n }\n // plugins aren't serialized by default, serialize the plugins after resolving them.\n return serializeAfterStaticPlugins(config);\n};\n"],"mappings":";;;;AACA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,iBAAwC,GAAGA,CAACC,MAAM,EAAEC,WAAW,KAAK;EAC/E;EACA,IAAI,CAACC,KAAK,CAACC,OAAO,CAACH,MAAM,CAACI,OAAO,CAAC,IAAI,CAACJ,MAAM,CAACI,OAAO,EAAEC,MAAM,EAAE;IAC7D,OAAOL,MAAM;EACf;EACA,IAAI,CAACC,WAAW,EAAE;IAChB;IACA;IACAD,MAAM,GAAG,IAAAM,4BAAW,EAACN,MAAM,EAAEA,MAAM,CAACI,OAAO,CAAC;EAC9C,CAAC,MAAM;IACL;IACA,OAAOJ,MAAM,CAACI,OAAO;EACvB;EACA;EACA,OAAO,IAAAG,wCAA2B,EAACP,MAAM,CAAC;AAC5C,CAAC;AAACQ,OAAA,CAAAT,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.withInternal = exports.EXPO_DEBUG = void 0;
7
5
  function _getenv() {
8
6
  const data = require("getenv");
@@ -1 +1 @@
1
- {"version":3,"file":"withInternal.js","names":["_getenv","data","require","EXPO_DEBUG","exports","boolish","withInternal","config","internals","_internal","isDebug"],"sources":["../../src/plugins/withInternal.ts"],"sourcesContent":["import type { ConfigPlugin } from '@expo/config-plugins';\nimport { boolish } from 'getenv';\n\nimport type { ConfigFilePaths } from '../Config.types';\n\nexport const EXPO_DEBUG = boolish('EXPO_DEBUG', false);\n\n/**\n * Adds the _internal object.\n *\n * @param config\n * @param projectRoot\n */\nexport const withInternal: ConfigPlugin<\n { projectRoot: string; packageJsonPath?: string } & Partial<ConfigFilePaths>\n> = (config, internals) => {\n if (!config._internal) {\n config._internal = {};\n }\n\n config._internal = {\n isDebug: EXPO_DEBUG,\n ...config._internal,\n ...internals,\n };\n\n return config;\n};\n"],"mappings":";;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIO,MAAME,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,IAAAE,iBAAO,EAAC,YAAY,EAAE,KAAK,CAAC;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAEZ,GAAGA,CAACC,MAAM,EAAEC,SAAS,KAAK;EACzB,IAAI,CAACD,MAAM,CAACE,SAAS,EAAE;IACrBF,MAAM,CAACE,SAAS,GAAG,CAAC,CAAC;EACvB;EAEAF,MAAM,CAACE,SAAS,GAAG;IACjBC,OAAO,EAAEP,UAAU;IACnB,GAAGI,MAAM,CAACE,SAAS;IACnB,GAAGD;EACL,CAAC;EAED,OAAOD,MAAM;AACf,CAAC;AAACH,OAAA,CAAAE,YAAA,GAAAA,YAAA","ignoreList":[]}
1
+ {"version":3,"file":"withInternal.js","names":["_getenv","data","require","EXPO_DEBUG","exports","boolish","withInternal","config","internals","_internal","isDebug"],"sources":["../../src/plugins/withInternal.ts"],"sourcesContent":["import type { ConfigPlugin } from '@expo/config-plugins';\nimport { boolish } from 'getenv';\n\nimport type { ConfigFilePaths } from '../Config.types';\n\nexport const EXPO_DEBUG = boolish('EXPO_DEBUG', false);\n\n/**\n * Adds the _internal object.\n *\n * @param config\n * @param projectRoot\n */\nexport const withInternal: ConfigPlugin<\n { projectRoot: string; packageJsonPath?: string } & Partial<ConfigFilePaths>\n> = (config, internals) => {\n if (!config._internal) {\n config._internal = {};\n }\n\n config._internal = {\n isDebug: EXPO_DEBUG,\n ...config._internal,\n ...internals,\n };\n\n return config;\n};\n"],"mappings":";;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIO,MAAME,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,IAAAE,iBAAO,EAAC,YAAY,EAAE,KAAK,CAAC;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAEZ,GAAGA,CAACC,MAAM,EAAEC,SAAS,KAAK;EACzB,IAAI,CAACD,MAAM,CAACE,SAAS,EAAE;IACrBF,MAAM,CAACE,SAAS,GAAG,CAAC,CAAC;EACvB;EAEAF,MAAM,CAACE,SAAS,GAAG;IACjBC,OAAO,EAAEP,UAAU;IACnB,GAAGI,MAAM,CAACE,SAAS;IACnB,GAAGD;EACL,CAAC;EAED,OAAOD,MAAM;AACf,CAAC;AAACH,OAAA,CAAAE,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ exports.__esModule = true;
6
4
  exports.getRootPackageJsonPath = getRootPackageJsonPath;
7
5
  function _fs() {
8
6
  const data = require("fs");
@@ -1 +1 @@
1
- {"version":3,"file":"resolvePackageJson.js","names":["_fs","data","require","_path","_Errors","getRootPackageJsonPath","projectRoot","packageJsonPath","join","existsSync","ConfigError"],"sources":["../src/resolvePackageJson.ts"],"sourcesContent":["import { existsSync } from 'fs';\nimport { join } from 'path';\n\nimport { ConfigError } from './Errors';\n\nexport function getRootPackageJsonPath(projectRoot: string): string {\n const packageJsonPath = join(projectRoot, 'package.json');\n if (!existsSync(packageJsonPath)) {\n throw new ConfigError(\n `The expected package.json path: ${packageJsonPath} does not exist`,\n 'MODULE_NOT_FOUND'\n );\n }\n return packageJsonPath;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,IAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,GAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,SAASI,sBAAsBA,CAACC,WAAmB,EAAU;EAClE,MAAMC,eAAe,GAAG,IAAAC,YAAI,EAACF,WAAW,EAAE,cAAc,CAAC;EACzD,IAAI,CAAC,IAAAG,gBAAU,EAACF,eAAe,CAAC,EAAE;IAChC,MAAM,KAAIG,qBAAW,EACnB,mCAAmCH,eAAe,iBAAiB,EACnE,kBACF,CAAC;EACH;EACA,OAAOA,eAAe;AACxB","ignoreList":[]}
1
+ {"version":3,"file":"resolvePackageJson.js","names":["_fs","data","require","_path","_Errors","getRootPackageJsonPath","projectRoot","packageJsonPath","join","existsSync","ConfigError"],"sources":["../src/resolvePackageJson.ts"],"sourcesContent":["import { existsSync } from 'fs';\nimport { join } from 'path';\n\nimport { ConfigError } from './Errors';\n\nexport function getRootPackageJsonPath(projectRoot: string): string {\n const packageJsonPath = join(projectRoot, 'package.json');\n if (!existsSync(packageJsonPath)) {\n throw new ConfigError(\n `The expected package.json path: ${packageJsonPath} does not exist`,\n 'MODULE_NOT_FOUND'\n );\n }\n return packageJsonPath;\n}\n"],"mappings":";;;;AAAA,SAAAA,IAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,GAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,SAASI,sBAAsBA,CAACC,WAAmB,EAAU;EAClE,MAAMC,eAAe,GAAG,IAAAC,YAAI,EAACF,WAAW,EAAE,cAAc,CAAC;EACzD,IAAI,CAAC,IAAAG,gBAAU,EAACF,eAAe,CAAC,EAAE;IAChC,MAAM,KAAIG,qBAAW,EACnB,mCAAmCH,eAAe,iBAAiB,EACnE,kBACF,CAAC;EACH;EACA,OAAOA,eAAe;AACxB","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/config",
3
- "version": "57.0.1",
3
+ "version": "57.0.2",
4
4
  "description": "A library for interacting with the app.json",
5
5
  "main": "build/index.js",
6
6
  "repository": {
@@ -24,10 +24,10 @@
24
24
  "paths"
25
25
  ],
26
26
  "dependencies": {
27
- "@expo/config-plugins": "~57.0.1",
27
+ "@expo/config-plugins": "~57.0.2",
28
28
  "@expo/config-types": "^57.0.1",
29
29
  "@expo/json-file": "^11.0.0",
30
- "@expo/require-utils": "^57.0.0",
30
+ "@expo/require-utils": "^57.0.1",
31
31
  "deepmerge": "^4.3.1",
32
32
  "getenv": "^2.0.0",
33
33
  "glob": "^13.0.0",
@@ -45,7 +45,7 @@
45
45
  "publishConfig": {
46
46
  "access": "public"
47
47
  },
48
- "gitHead": "b134c8d1eb906156ef7d5f6fee1a70ff0d9a8f22",
48
+ "gitHead": "5104cb89c3938bc9653e0cbad43da3a43a2e77a7",
49
49
  "scripts": {
50
50
  "build": "tsc --emitDeclarationOnly && babel src --out-dir build --extensions \".ts\" --source-maps --ignore \"src/**/__mocks__/*\",\"src/**/__tests__/*\"",
51
51
  "clean": "expo-module clean",