@expo/config 55.0.13 → 55.0.15
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
|
@@ -30,6 +30,13 @@ function _jsonFile() {
|
|
|
30
30
|
};
|
|
31
31
|
return data;
|
|
32
32
|
}
|
|
33
|
+
function _requireUtils() {
|
|
34
|
+
const data = require("@expo/require-utils");
|
|
35
|
+
_requireUtils = function () {
|
|
36
|
+
return data;
|
|
37
|
+
};
|
|
38
|
+
return data;
|
|
39
|
+
}
|
|
33
40
|
function _deepmerge() {
|
|
34
41
|
const data = _interopRequireDefault(require("deepmerge"));
|
|
35
42
|
_deepmerge = function () {
|
|
@@ -58,13 +65,6 @@ function _path() {
|
|
|
58
65
|
};
|
|
59
66
|
return data;
|
|
60
67
|
}
|
|
61
|
-
function _resolveFrom() {
|
|
62
|
-
const data = _interopRequireDefault(require("resolve-from"));
|
|
63
|
-
_resolveFrom = function () {
|
|
64
|
-
return data;
|
|
65
|
-
};
|
|
66
|
-
return data;
|
|
67
|
-
}
|
|
68
68
|
function _semver() {
|
|
69
69
|
const data = _interopRequireDefault(require("semver"));
|
|
70
70
|
_semver = function () {
|
|
@@ -166,10 +166,10 @@ function reduceExpoObject(config) {
|
|
|
166
166
|
*/
|
|
167
167
|
function getSupportedPlatforms(projectRoot) {
|
|
168
168
|
const platforms = [];
|
|
169
|
-
if (
|
|
169
|
+
if ((0, _requireUtils().resolveFrom)(projectRoot, 'react-native/package.json')) {
|
|
170
170
|
platforms.push('ios', 'android');
|
|
171
171
|
}
|
|
172
|
-
if (
|
|
172
|
+
if ((0, _requireUtils().resolveFrom)(projectRoot, 'react-dom/package.json')) {
|
|
173
173
|
platforms.push('web');
|
|
174
174
|
}
|
|
175
175
|
return platforms;
|
package/build/Config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.js","names":["_jsonFile","data","_interopRequireDefault","require","_deepmerge","_fs","_glob","_path","_resolveFrom","_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","platforms","resolveFrom","silent","push","getConfig","options","paths","getConfigFilePaths","rawStaticConfig","staticConfigPath","getStaticConfig","rootConfig","staticConfig","packageJson","packageJsonPath","getPackageJsonAndPath","fillAndReturnConfig","dynamicConfigObjectType","mayHaveUnusedStaticConfig","configWithDefaultValues","ensureConfigHasDefaultValues","exp","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","fileNames","ext","fileName","configPath","path","stat","fs","statSync","isFile","modifyConfigAsync","modifications","readOptions","writeOptions","isDryRun","dryRun","outputConfig","mergeConfigModifications","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 { ModConfig } from '@expo/config-plugins';\nimport JsonFile, { JSONObject } from '@expo/json-file';\nimport deepMerge from 'deepmerge';\nimport fs from 'fs';\nimport { sync as globSync } from 'glob';\nimport path from 'path';\nimport resolveFrom from 'resolve-from';\nimport semver from 'semver';\nimport slugify from 'slugify';\n\nimport {\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): Platform[] {\n const platforms: Platform[] = [];\n if (resolveFrom.silent(projectRoot, 'react-native')) {\n platforms.push('ios', 'android');\n }\n if (resolveFrom.silent(projectRoot, 'react-dom')) {\n platforms.push('web');\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 const fileNames = DYNAMIC_CONFIG_EXTS.map((ext) => `app.config${ext}`);\n for (const fileName of fileNames) {\n const configPath = path.join(projectRoot, fileName);\n try {\n const stat = fs.statSync(configPath);\n if (stat.isFile()) {\n return configPath;\n }\n } catch {}\n }\n return null;\n}\n\nfunction getStaticConfigFilePath(projectRoot: string): string | null {\n for (const fileName of ['app.config.json', 'app.json']) {\n const configPath = path.join(projectRoot, fileName);\n try {\n const stat = fs.statSync(configPath);\n if (stat.isFile()) {\n return configPath;\n }\n } catch {}\n }\n return null;\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 let platforms = exp.platforms;\n if (!platforms) {\n platforms = getSupportedPlatforms(projectRoot);\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":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,IAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,GAAA,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,aAAA;EAAA,MAAAP,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAK,YAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,QAAA;EAAA,MAAAR,IAAA,GAAAC,sBAAA,CAAAC,OAA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ACiB,QAAQ,CAACvE,WAAW,EAAEqI,aAAa,CAAC3H,gBAAgB,CAAC;EACnE;EACA;EACA,OAAO,UAAU;AACnB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Config.js","names":["_jsonFile","data","_interopRequireDefault","require","_requireUtils","_deepmerge","_fs","_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","platforms","resolveFrom","push","getConfig","options","paths","getConfigFilePaths","rawStaticConfig","staticConfigPath","getStaticConfig","rootConfig","staticConfig","packageJson","packageJsonPath","getPackageJsonAndPath","fillAndReturnConfig","dynamicConfigObjectType","mayHaveUnusedStaticConfig","configWithDefaultValues","ensureConfigHasDefaultValues","exp","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","fileNames","ext","fileName","configPath","path","stat","fs","statSync","isFile","modifyConfigAsync","modifications","readOptions","writeOptions","isDryRun","dryRun","outputConfig","mergeConfigModifications","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 { ModConfig } from '@expo/config-plugins';\nimport JsonFile, { JSONObject } from '@expo/json-file';\nimport { resolveFrom } from '@expo/require-utils';\nimport deepMerge from 'deepmerge';\nimport fs from 'fs';\nimport { sync as globSync } from 'glob';\nimport path from 'path';\nimport semver from 'semver';\nimport slugify from 'slugify';\n\nimport {\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): 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 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 const fileNames = DYNAMIC_CONFIG_EXTS.map((ext) => `app.config${ext}`);\n for (const fileName of fileNames) {\n const configPath = path.join(projectRoot, fileName);\n try {\n const stat = fs.statSync(configPath);\n if (stat.isFile()) {\n return configPath;\n }\n } catch {}\n }\n return null;\n}\n\nfunction getStaticConfigFilePath(projectRoot: string): string | null {\n for (const fileName of ['app.config.json', 'app.json']) {\n const configPath = path.join(projectRoot, fileName);\n try {\n const stat = fs.statSync(configPath);\n if (stat.isFile()) {\n return configPath;\n }\n } catch {}\n }\n return null;\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 let platforms = exp.platforms;\n if (!platforms) {\n platforms = getSupportedPlatforms(projectRoot);\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":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,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,IAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAG,GAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,MAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,KAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,MAAA;EAAA,MAAAP,IAAA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AQ,CACrDtE,WAAW,EACXoI,aAAa,CAAC3H,gBAChB,CAAC,EAAE;IACL;IACA,OAAO4H,yBAAyB;EAClC,CAAC,MAAM,IAAID,aAAa,CAAC3H,gBAAgB,EAAE;IACzC,OAAO4C,eAAI,CAACiB,QAAQ,CAACtE,WAAW,EAAEoI,aAAa,CAAC3H,gBAAgB,CAAC;EACnE;EACA;EACA,OAAO,UAAU;AACnB","ignoreList":[]}
|
|
@@ -11,9 +11,9 @@ function _jsonFile() {
|
|
|
11
11
|
};
|
|
12
12
|
return data;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const data =
|
|
16
|
-
|
|
14
|
+
function _requireUtils() {
|
|
15
|
+
const data = require("@expo/require-utils");
|
|
16
|
+
_requireUtils = function () {
|
|
17
17
|
return data;
|
|
18
18
|
};
|
|
19
19
|
return data;
|
|
@@ -39,7 +39,7 @@ function getExpoSDKVersion(projectRoot, exp = {}) {
|
|
|
39
39
|
* version of the `expo` package.
|
|
40
40
|
*/
|
|
41
41
|
function getExpoSDKVersionFromPackage(projectRoot) {
|
|
42
|
-
const packageJsonPath =
|
|
42
|
+
const packageJsonPath = (0, _requireUtils().resolveFrom)(projectRoot, 'expo/package.json');
|
|
43
43
|
if (!packageJsonPath) {
|
|
44
44
|
throw new (_Errors().ConfigError)(`Cannot determine the project's Expo SDK version because the module \`expo\` is not installed. Install it with \`npm install expo\` and try again.`, 'MODULE_NOT_FOUND');
|
|
45
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getExpoSDKVersion.js","names":["_jsonFile","data","_interopRequireDefault","require","
|
|
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 { 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/paths/paths.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare function resolveEntryPoint(projectRoot: string, { platform, pkg,
|
|
|
6
6
|
platform?: string;
|
|
7
7
|
pkg?: PackageJSONConfig;
|
|
8
8
|
}): string;
|
|
9
|
+
/** @deprecated */
|
|
9
10
|
export declare function getFileWithExtensions(fromDirectory: string, moduleId: string, extensions: string[]): string | null;
|
|
10
11
|
/** Get the Metro server root, when working in monorepos */
|
|
11
12
|
export declare function getMetroServerRoot(projectRoot: string): string;
|
|
@@ -17,11 +18,13 @@ export declare function getMetroWorkspaceGlobs(monorepoRoot: string): string[] |
|
|
|
17
18
|
/**
|
|
18
19
|
* Convert an absolute entry point to a server or project root relative filepath.
|
|
19
20
|
* This is useful on Android where the entry point is an absolute path.
|
|
21
|
+
* @deprecated
|
|
20
22
|
*/
|
|
21
|
-
export declare function convertEntryPointToRelative(projectRoot: string, absolutePath: string): string;
|
|
23
|
+
export declare function convertEntryPointToRelative(projectRoot: string, absolutePath: string, extname?: string | null): string;
|
|
22
24
|
/**
|
|
23
25
|
* Resolve the entry point relative to either the server or project root.
|
|
24
26
|
* This relative entry path should be used to pass non-absolute paths to Metro,
|
|
25
27
|
* accounting for possible monorepos and keeping the cache sharable (no absolute paths).
|
|
28
|
+
* @deprecated
|
|
26
29
|
*/
|
|
27
30
|
export declare const resolveRelativeEntryPoint: typeof resolveEntryPoint;
|
package/build/paths/paths.js
CHANGED
|
@@ -11,6 +11,13 @@ exports.getMetroWorkspaceGlobs = getMetroWorkspaceGlobs;
|
|
|
11
11
|
exports.getPossibleProjectRoot = getPossibleProjectRoot;
|
|
12
12
|
exports.resolveEntryPoint = resolveEntryPoint;
|
|
13
13
|
exports.resolveRelativeEntryPoint = void 0;
|
|
14
|
+
function _requireUtils() {
|
|
15
|
+
const data = require("@expo/require-utils");
|
|
16
|
+
_requireUtils = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
14
21
|
function _fs() {
|
|
15
22
|
const data = _interopRequireDefault(require("fs"));
|
|
16
23
|
_fs = function () {
|
|
@@ -25,13 +32,6 @@ function _path() {
|
|
|
25
32
|
};
|
|
26
33
|
return data;
|
|
27
34
|
}
|
|
28
|
-
function _resolveFrom() {
|
|
29
|
-
const data = _interopRequireDefault(require("resolve-from"));
|
|
30
|
-
_resolveFrom = function () {
|
|
31
|
-
return data;
|
|
32
|
-
};
|
|
33
|
-
return data;
|
|
34
|
-
}
|
|
35
35
|
function _resolveWorkspaceRoot() {
|
|
36
36
|
const data = require("resolve-workspace-root");
|
|
37
37
|
_resolveWorkspaceRoot = function () {
|
|
@@ -97,46 +97,41 @@ function resolveEntryPoint(projectRoot, {
|
|
|
97
97
|
main
|
|
98
98
|
} = pkg;
|
|
99
99
|
if (main && typeof main === 'string') {
|
|
100
|
-
//
|
|
101
|
-
|
|
100
|
+
// Allow for paths like: `{ "main": "expo/AppEntry" }`
|
|
101
|
+
const entry = (0, _requireUtils().resolveFrom)(projectRoot, main, {
|
|
102
|
+
extensions
|
|
103
|
+
});
|
|
102
104
|
if (!entry) {
|
|
103
|
-
|
|
104
|
-
entry = resolveFromSilentWithExtensions(projectRoot, main, extensions);
|
|
105
|
-
if (!entry) throw new (_Errors().ConfigError)(`Cannot resolve entry file: The \`main\` field defined in your \`package.json\` points to an unresolvable or non-existent path.`, 'ENTRY_NOT_FOUND');
|
|
105
|
+
throw new (_Errors().ConfigError)(`Cannot resolve entry file: The \`main\` field defined in your \`package.json\` points to an unresolvable or non-existent path.`, 'ENTRY_NOT_FOUND');
|
|
106
106
|
}
|
|
107
107
|
return entry;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
// Check for a root index.* file in the project root.
|
|
111
|
-
|
|
111
|
+
let entry = (0, _requireUtils().resolveFrom)(projectRoot, './index', {
|
|
112
|
+
extensions
|
|
113
|
+
});
|
|
112
114
|
if (entry) {
|
|
113
115
|
return entry;
|
|
114
116
|
}
|
|
115
|
-
try {
|
|
116
|
-
// If none of the default files exist then we will attempt to use the main Expo entry point.
|
|
117
|
-
// This requires `expo` to be installed in the project to work as it will use `node_module/expo/AppEntry.js`
|
|
118
|
-
// Doing this enables us to create a bare minimum Expo project.
|
|
119
117
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
throw new (_Errors().ConfigError)(`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.`, 'ENTRY_NOT_FOUND');
|
|
124
|
-
}
|
|
125
|
-
}
|
|
118
|
+
// If none of the default files exist then we will attempt to use the main Expo entry point.
|
|
119
|
+
// This requires `expo` to be installed in the project to work as it will use `node_module/expo/AppEntry.js`
|
|
120
|
+
// Doing this enables us to create a bare minimum Expo project.
|
|
126
121
|
|
|
127
|
-
//
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
122
|
+
// 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.
|
|
123
|
+
entry = (0, _requireUtils().resolveFrom)(projectRoot, 'expo/AppEntry', {
|
|
124
|
+
extensions
|
|
125
|
+
});
|
|
126
|
+
if (!entry) {
|
|
127
|
+
throw new (_Errors().ConfigError)(`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.`, 'ENTRY_NOT_FOUND');
|
|
134
128
|
}
|
|
135
|
-
return
|
|
129
|
+
return entry;
|
|
136
130
|
}
|
|
137
131
|
|
|
138
132
|
// Statically attempt to resolve a module but with the ability to resolve like a bundler.
|
|
139
133
|
// This won't use node module resolution.
|
|
134
|
+
/** @deprecated */
|
|
140
135
|
function getFileWithExtensions(fromDirectory, moduleId, extensions) {
|
|
141
136
|
const modulePath = _path().default.join(fromDirectory, moduleId);
|
|
142
137
|
if (_fs().default.existsSync(modulePath)) {
|
|
@@ -164,6 +159,7 @@ function getMetroServerRoot(projectRoot) {
|
|
|
164
159
|
}
|
|
165
160
|
serverRoot = (0, _resolveWorkspaceRoot().resolveWorkspaceRoot)(projectRoot);
|
|
166
161
|
if (serverRoot != null) {
|
|
162
|
+
serverRoot = _path().default.resolve(serverRoot);
|
|
167
163
|
_metroServerRootCache.set(projectRoot, serverRoot);
|
|
168
164
|
}
|
|
169
165
|
return serverRoot ?? projectRoot;
|
|
@@ -176,21 +172,71 @@ function getMetroServerRoot(projectRoot) {
|
|
|
176
172
|
function getMetroWorkspaceGlobs(monorepoRoot) {
|
|
177
173
|
return (0, _resolveWorkspaceRoot().getWorkspaceGlobs)(monorepoRoot);
|
|
178
174
|
}
|
|
175
|
+
function toPosixPath(filePath) {
|
|
176
|
+
return filePath.replace(/\\/g, '/');
|
|
177
|
+
}
|
|
179
178
|
|
|
179
|
+
// TODO: Move to internals
|
|
180
180
|
/**
|
|
181
181
|
* Convert an absolute entry point to a server or project root relative filepath.
|
|
182
182
|
* This is useful on Android where the entry point is an absolute path.
|
|
183
|
+
* @deprecated
|
|
183
184
|
*/
|
|
184
|
-
function convertEntryPointToRelative(projectRoot, absolutePath) {
|
|
185
|
+
function convertEntryPointToRelative(projectRoot, absolutePath, extname = '.js') {
|
|
186
|
+
if (!_path().default.isAbsolute(absolutePath)) {
|
|
187
|
+
absolutePath = _path().default.resolve(process.cwd(), projectRoot, absolutePath);
|
|
188
|
+
}
|
|
189
|
+
|
|
185
190
|
// The project root could be using a different root on MacOS (`/var` vs `/private/var`)
|
|
186
191
|
// We need to make sure to get the non-symlinked path to the server or project root.
|
|
187
|
-
|
|
192
|
+
let serverRoot = getMetroServerRoot(projectRoot);
|
|
193
|
+
try {
|
|
194
|
+
const realServerRoot = _fs().default.realpathSync(serverRoot);
|
|
195
|
+
// If the absolute path already starts with the resolved server root, use it directly
|
|
196
|
+
if (absolutePath.startsWith(realServerRoot + _path().default.sep)) {
|
|
197
|
+
serverRoot = realServerRoot;
|
|
198
|
+
} else if (absolutePath.startsWith(serverRoot + _path().default.sep)) {
|
|
199
|
+
// If the absolute path starts with the (possibly symlinked) server root, preserve it as-is
|
|
200
|
+
} else {
|
|
201
|
+
// Otherwise, resolve the absolute path to check if it matches the real server root.
|
|
202
|
+
// This is only needed when absolutePath doesn't match either root representation,
|
|
203
|
+
// and absolutePath may not be valid (e.g. non-existent file)
|
|
204
|
+
try {
|
|
205
|
+
const realAbsolutePath = _fs().default.realpathSync(absolutePath);
|
|
206
|
+
if (realAbsolutePath.startsWith(realServerRoot + _path().default.sep)) {
|
|
207
|
+
serverRoot = realServerRoot;
|
|
208
|
+
absolutePath = realAbsolutePath;
|
|
209
|
+
} else if (realServerRoot !== serverRoot || realAbsolutePath !== absolutePath) {
|
|
210
|
+
// Last resort: fall back to the legacy behavior of using the realpath for both,
|
|
211
|
+
// without knowing if the resulting relative path will be valid
|
|
212
|
+
serverRoot = realServerRoot;
|
|
213
|
+
absolutePath = realAbsolutePath;
|
|
214
|
+
}
|
|
215
|
+
} catch {}
|
|
216
|
+
}
|
|
217
|
+
} catch {
|
|
218
|
+
// NOTE: `fs.realpathSync` can fail if `projectRoot` doesn't exist (e.g. mocked folder)
|
|
219
|
+
}
|
|
220
|
+
let entry = toPosixPath(_path().default.relative(serverRoot, absolutePath));
|
|
221
|
+
|
|
222
|
+
// Strip extname, if it's set and trivially resolvable by Metro
|
|
223
|
+
if (extname != null) {
|
|
224
|
+
if (extname[0] !== '.') {
|
|
225
|
+
extname = `.${extname}`;
|
|
226
|
+
}
|
|
227
|
+
if (entry.endsWith(extname)) {
|
|
228
|
+
entry = entry.slice(0, -extname.length);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return entry;
|
|
188
232
|
}
|
|
189
233
|
|
|
234
|
+
// TODO: Move to internals
|
|
190
235
|
/**
|
|
191
236
|
* Resolve the entry point relative to either the server or project root.
|
|
192
237
|
* This relative entry path should be used to pass non-absolute paths to Metro,
|
|
193
238
|
* accounting for possible monorepos and keeping the cache sharable (no absolute paths).
|
|
239
|
+
* @deprecated
|
|
194
240
|
*/
|
|
195
241
|
const resolveRelativeEntryPoint = (projectRoot, options) => {
|
|
196
242
|
return convertEntryPointToRelative(projectRoot, resolveEntryPoint(projectRoot, options));
|
package/build/paths/paths.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","names":["_fs","data","_interopRequireDefault","require","_path","_resolveFrom","_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","getFileWithExtensions","resolveFromSilentWithExtensions","ConfigError","resolveFrom","fromDirectory","moduleId","extension","modulePath","silent","path","join","existsSync","_metroServerRootCache","Map","getMetroServerRoot","env","EXPO_NO_METRO_WORKSPACE_ROOT","resolve","serverRoot","get","resolveWorkspaceRoot","set","getMetroWorkspaceGlobs","monorepoRoot","getWorkspaceGlobs","convertEntryPointToRelative","absolutePath","relative","resolveRelativeEntryPoint","options","exports"],"sources":["../../src/paths/paths.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport resolveFrom from 'resolve-from';\nimport { getWorkspaceGlobs, resolveWorkspaceRoot } from 'resolve-workspace-root';\n\nimport { env } from './env';\nimport { getBareExtensions } from './extensions';\nimport { getPackageJson } from '../Config';\nimport { 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 // Testing the main field against all of the provided extensions - for legacy reasons we can't use node module resolution as the package.json allows you to pass in a file without a relative path and expect it as a relative path.\n let entry = getFileWithExtensions(projectRoot, main, extensions);\n if (!entry) {\n // Allow for paths like: `{ \"main\": \"expo/AppEntry\" }`\n entry = resolveFromSilentWithExtensions(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 const entry = resolveFromSilentWithExtensions(projectRoot, './index', extensions);\n if (entry) {\n return entry;\n }\n\n try {\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 return resolveFrom(projectRoot, 'expo/AppEntry');\n } catch {\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\n// Resolve from but with the ability to resolve like a bundler\nfunction resolveFromSilentWithExtensions(\n fromDirectory: string,\n moduleId: string,\n extensions: string[]\n): string | null {\n for (const extension of extensions) {\n const modulePath = resolveFrom.silent(fromDirectory, `${moduleId}.${extension}`);\n if (modulePath?.endsWith(extension)) {\n return modulePath;\n }\n }\n return resolveFrom.silent(fromDirectory, moduleId) || null;\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.\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 _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\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 */\nexport function convertEntryPointToRelative(projectRoot: string, absolutePath: string) {\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 return path.relative(\n fs.realpathSync(getMetroServerRoot(projectRoot)),\n fs.realpathSync(absolutePath)\n );\n}\n\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 */\nexport const resolveRelativeEntryPoint: typeof resolveEntryPoint = (projectRoot, options) => {\n return convertEntryPointToRelative(projectRoot, resolveEntryPoint(projectRoot, options));\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAAA,IAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,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G,CAAiB,CAAC;;AAEvD;AACO,SAASC,kBAAkBA,CAACxB,WAAmB,EAAU;EAC9D,IAAIyB,UAAG,CAACC,4BAA4B,EAAE;IACpC,OAAO1B,WAAW;EACpB;EAEAA,WAAW,GAAGmB,eAAI,CAACQ,OAAO,CAAC3B,WAAW,CAAC;EAEvC,IAAI4B,UAAqC,GAAGN,qBAAqB,CAACO,GAAG,CAAC7B,WAAW,CAAC;EAClF,IAAI4B,UAAU,IAAI,IAAI,EAAE;IACtB,OAAOA,UAAU;EACnB;EAEAA,UAAU,GAAG,IAAAE,4CAAoB,EAAC9B,WAAW,CAAC;EAC9C,IAAI4B,UAAU,IAAI,IAAI,EAAE;IACtBN,qBAAqB,CAACS,GAAG,CAAC/B,WAAW,EAAE4B,UAAU,CAAC;EACpD;EAEA,OAAOA,UAAU,IAAI5B,WAAW;AAClC;;AAEA;AACA;AACA;AACA;AACO,SAASgC,sBAAsBA,CAACC,YAAoB,EAAmB;EAC5E,OAAO,IAAAC,yCAAiB,EAACD,YAAY,CAAC;AACxC;;AAEA;AACA;AACA;AACA;AACO,SAASE,2BAA2BA,CAACnC,WAAmB,EAAEoC,YAAoB,EAAE;EACrF;EACA;EACA,OAAOjB,eAAI,CAACkB,QAAQ,CAClB3C,aAAE,CAACC,YAAY,CAAC6B,kBAAkB,CAACxB,WAAW,CAAC,CAAC,EAChDN,aAAE,CAACC,YAAY,CAACyC,YAAY,CAC9B,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAME,yBAAmD,GAAGA,CAACtC,WAAW,EAAEuC,OAAO,KAAK;EAC3F,OAAOJ,2BAA2B,CAACnC,WAAW,EAAED,iBAAiB,CAACC,WAAW,EAAEuC,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 { 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,YAAAA,CAAA;I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K,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":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/config",
|
|
3
|
-
"version": "55.0.
|
|
3
|
+
"version": "55.0.15",
|
|
4
4
|
"description": "A library for interacting with the app.json",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -36,11 +36,10 @@
|
|
|
36
36
|
"@expo/config-plugins": "~55.0.8",
|
|
37
37
|
"@expo/config-types": "^55.0.5",
|
|
38
38
|
"@expo/json-file": "^10.0.13",
|
|
39
|
-
"@expo/require-utils": "^55.0.
|
|
39
|
+
"@expo/require-utils": "^55.0.4",
|
|
40
40
|
"deepmerge": "^4.3.1",
|
|
41
41
|
"getenv": "^2.0.0",
|
|
42
42
|
"glob": "^13.0.0",
|
|
43
|
-
"resolve-from": "^5.0.0",
|
|
44
43
|
"resolve-workspace-root": "^2.0.0",
|
|
45
44
|
"semver": "^7.6.0",
|
|
46
45
|
"slugify": "^1.3.4"
|
|
@@ -52,5 +51,5 @@
|
|
|
52
51
|
"publishConfig": {
|
|
53
52
|
"access": "public"
|
|
54
53
|
},
|
|
55
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "ccfaea4c6143c6343e90366c9da25412b3f18873"
|
|
56
55
|
}
|