first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

76
node_modules/@expo/config/build/Config.d.ts generated vendored Normal file
View File

@@ -0,0 +1,76 @@
import { ConfigFilePaths, ExpoConfig, GetConfigOptions, PackageJSONConfig, ProjectConfig, ProjectTarget, WriteConfigOptions } from './Config.types';
/**
* Evaluate the config for an Expo project.
* If a function is exported from the `app.config.js` then a partial config will be passed as an argument.
* The partial config is composed from any existing app.json, and certain fields from the `package.json` like name and description.
*
* If options.isPublicConfig is true, the Expo config will include only public-facing options (omitting private keys).
* The resulting config should be suitable for hosting or embedding in a publicly readable location.
*
* **Example**
* ```js
* module.exports = function({ config }) {
* // mutate the config before returning it.
* config.slug = 'new slug'
* return { expo: config };
* }
* ```
*
* **Supports**
* - `app.config.ts`
* - `app.config.js`
* - `app.config.json`
* - `app.json`
*
* @param projectRoot the root folder containing all of your application code
* @param options enforce criteria for a project config
*/
export declare function getConfig(projectRoot: string, options?: GetConfigOptions): ProjectConfig;
export declare function getPackageJson(projectRoot: string): PackageJSONConfig;
/**
* Get the static and dynamic config paths for a project. Also accounts for custom paths.
*
* @param projectRoot
*/
export declare function getConfigFilePaths(projectRoot: string): ConfigFilePaths;
/**
* Attempt to modify an Expo project config.
* This will only fully work if the project is using static configs only.
* Otherwise 'warn' | 'fail' will return with a message about why the config couldn't be updated.
* The potentially modified config object will be returned for testing purposes.
*
* @param projectRoot
* @param modifications modifications to make to an existing config
* @param readOptions options for reading the current config file
* @param writeOptions If true, the static config file will not be rewritten
*/
export declare function modifyConfigAsync(projectRoot: string, modifications: Partial<ExpoConfig>, readOptions?: GetConfigOptions, writeOptions?: WriteConfigOptions): Promise<{
type: 'success' | 'warn' | 'fail';
message?: string;
config: ExpoConfig | null;
}>;
export declare function getWebOutputPath(config?: {
[key: string]: any;
}): string;
export declare function getNameFromConfig(exp?: Record<string, any>): {
appName?: string;
webName?: string;
};
export declare function getDefaultTarget(projectRoot: string, exp?: Pick<ExpoConfig, 'sdkVersion'>): ProjectTarget;
/**
* Return a useful name describing the project config.
* - dynamic: app.config.js
* - static: app.json
* - custom path app config relative to root folder
* - both: app.config.js or app.json
*/
export declare function getProjectConfigDescription(projectRoot: string): string;
/**
* Returns a string describing the configurations used for the given project root.
* Will return null if no config is found.
*
* @param projectRoot
* @param projectConfig
*/
export declare function getProjectConfigDescriptionWithPaths(projectRoot: string, projectConfig: ConfigFilePaths): string;
export * from './Config.types';

641
node_modules/@expo/config/build/Config.js generated vendored Normal file
View File

@@ -0,0 +1,641 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {
getConfig: true,
getPackageJson: true,
getConfigFilePaths: true,
modifyConfigAsync: true,
getWebOutputPath: true,
getNameFromConfig: true,
getDefaultTarget: true,
getProjectConfigDescription: true,
getProjectConfigDescriptionWithPaths: true
};
exports.getConfig = getConfig;
exports.getConfigFilePaths = getConfigFilePaths;
exports.getDefaultTarget = getDefaultTarget;
exports.getNameFromConfig = getNameFromConfig;
exports.getPackageJson = getPackageJson;
exports.getProjectConfigDescription = getProjectConfigDescription;
exports.getProjectConfigDescriptionWithPaths = getProjectConfigDescriptionWithPaths;
exports.getWebOutputPath = getWebOutputPath;
exports.modifyConfigAsync = modifyConfigAsync;
function _jsonFile() {
const data = _interopRequireDefault(require("@expo/json-file"));
_jsonFile = function () {
return data;
};
return data;
}
function _deepmerge() {
const data = _interopRequireDefault(require("deepmerge"));
_deepmerge = function () {
return data;
};
return data;
}
function _fs() {
const data = _interopRequireDefault(require("fs"));
_fs = function () {
return data;
};
return data;
}
function _glob() {
const data = require("glob");
_glob = function () {
return data;
};
return data;
}
function _path() {
const data = _interopRequireDefault(require("path"));
_path = function () {
return data;
};
return data;
}
function _resolveFrom() {
const data = _interopRequireDefault(require("resolve-from"));
_resolveFrom = function () {
return data;
};
return data;
}
function _semver() {
const data = _interopRequireDefault(require("semver"));
_semver = function () {
return data;
};
return data;
}
function _slugify() {
const data = _interopRequireDefault(require("slugify"));
_slugify = function () {
return data;
};
return data;
}
function _getConfig() {
const data = require("./getConfig");
_getConfig = function () {
return data;
};
return data;
}
function _getExpoSDKVersion() {
const data = require("./getExpoSDKVersion");
_getExpoSDKVersion = function () {
return data;
};
return data;
}
function _withConfigPlugins() {
const data = require("./plugins/withConfigPlugins");
_withConfigPlugins = function () {
return data;
};
return data;
}
function _withInternal() {
const data = require("./plugins/withInternal");
_withInternal = function () {
return data;
};
return data;
}
function _resolvePackageJson() {
const data = require("./resolvePackageJson");
_resolvePackageJson = function () {
return data;
};
return data;
}
var _Config = require("./Config.types");
Object.keys(_Config).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _Config[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _Config[key];
}
});
});
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
let hasWarnedAboutRootConfig = false;
/**
* If a config has an `expo` object then that will be used as the config.
* This method reduces out other top level values if an `expo` object exists.
*
* @param config Input config object to reduce
*/
function reduceExpoObject(config) {
if (!config) return config || null;
if (config.expo && !hasWarnedAboutRootConfig) {
const keys = Object.keys(config).filter(key => key !== 'expo');
if (keys.length) {
hasWarnedAboutRootConfig = true;
const ansiYellow = str => `\u001B[33m${str}\u001B[0m`;
const ansiGray = str => `\u001B[90m${str}\u001B[0m`;
const ansiBold = str => `\u001B[1m${str}\u001B[22m`;
const plural = keys.length > 1;
console.warn(ansiYellow(ansiBold('Warning: ') + `Root-level ${ansiBold(`"expo"`)} object found. Ignoring extra key${plural ? 's' : ''} in Expo config: ${keys.map(key => `"${key}"`).join(', ')}\n` + ansiGray(`Learn more: https://expo.fyi/root-expo-object`)));
}
}
const {
mods,
...expo
} = config.expo ?? config;
return {
expo,
mods
};
}
/**
* Get all platforms that a project is currently capable of running.
*
* @param projectRoot
* @param exp
*/
function getSupportedPlatforms(projectRoot) {
const platforms = [];
if (_resolveFrom().default.silent(projectRoot, 'react-native')) {
platforms.push('ios', 'android');
}
if (_resolveFrom().default.silent(projectRoot, 'react-dom')) {
platforms.push('web');
}
return platforms;
}
/**
* Evaluate the config for an Expo project.
* If a function is exported from the `app.config.js` then a partial config will be passed as an argument.
* The partial config is composed from any existing app.json, and certain fields from the `package.json` like name and description.
*
* If options.isPublicConfig is true, the Expo config will include only public-facing options (omitting private keys).
* The resulting config should be suitable for hosting or embedding in a publicly readable location.
*
* **Example**
* ```js
* module.exports = function({ config }) {
* // mutate the config before returning it.
* config.slug = 'new slug'
* return { expo: config };
* }
* ```
*
* **Supports**
* - `app.config.ts`
* - `app.config.js`
* - `app.config.json`
* - `app.json`
*
* @param projectRoot the root folder containing all of your application code
* @param options enforce criteria for a project config
*/
function getConfig(projectRoot, options = {}) {
const paths = getConfigFilePaths(projectRoot);
const rawStaticConfig = paths.staticConfigPath ? (0, _getConfig().getStaticConfig)(paths.staticConfigPath) : null;
// For legacy reasons, always return an object.
const rootConfig = rawStaticConfig || {};
const staticConfig = reduceExpoObject(rawStaticConfig) || {};
// Can only change the package.json location if an app.json or app.config.json exists
const [packageJson, packageJsonPath] = getPackageJsonAndPath(projectRoot);
function fillAndReturnConfig(config, dynamicConfigObjectType, mayHaveUnusedStaticConfig = false) {
const configWithDefaultValues = {
...ensureConfigHasDefaultValues({
projectRoot,
exp: config.expo || {},
pkg: packageJson,
skipSDKVersionRequirement: options.skipSDKVersionRequirement,
paths,
packageJsonPath
}),
mods: config.mods,
dynamicConfigObjectType,
rootConfig,
dynamicConfigPath: paths.dynamicConfigPath,
staticConfigPath: paths.staticConfigPath,
hasUnusedStaticConfig: !!paths.staticConfigPath && !!paths.dynamicConfigPath && mayHaveUnusedStaticConfig
};
if (options.isModdedConfig) {
// @ts-ignore: Add the mods back to the object.
configWithDefaultValues.exp.mods = config.mods ?? null;
}
// Apply static json plugins, should be done after _internal
configWithDefaultValues.exp = (0, _withConfigPlugins().withConfigPlugins)(configWithDefaultValues.exp, !!options.skipPlugins);
if (!options.isModdedConfig) {
// @ts-ignore: Delete mods added by static plugins when they won't have a chance to be evaluated
delete configWithDefaultValues.exp.mods;
}
if (options.isPublicConfig) {
// TODD(EvanBacon): Drop plugins array after it's been resolved.
// Remove internal values with references to user's file paths from the public config.
delete configWithDefaultValues.exp._internal;
// hooks no longer exists in the typescript type but should still be removed
if ('hooks' in configWithDefaultValues.exp) {
delete configWithDefaultValues.exp.hooks;
}
if (configWithDefaultValues.exp.ios?.config) {
delete configWithDefaultValues.exp.ios.config;
}
if (configWithDefaultValues.exp.android?.config) {
delete configWithDefaultValues.exp.android.config;
}
delete configWithDefaultValues.exp.updates?.codeSigningCertificate;
delete configWithDefaultValues.exp.updates?.codeSigningMetadata;
}
return configWithDefaultValues;
}
// Fill in the static config
function getContextConfig(config) {
return ensureConfigHasDefaultValues({
projectRoot,
exp: config.expo || {},
pkg: packageJson,
skipSDKVersionRequirement: true,
paths,
packageJsonPath
}).exp;
}
if (paths.dynamicConfigPath) {
// No app.config.json or app.json but app.config.js
const {
exportedObjectType,
config: rawDynamicConfig,
mayHaveUnusedStaticConfig
} = (0, _getConfig().getDynamicConfig)(paths.dynamicConfigPath, {
projectRoot,
staticConfigPath: paths.staticConfigPath,
packageJsonPath,
config: getContextConfig(staticConfig)
});
// Allow for the app.config.js to `export default null;`
// Use `dynamicConfigPath` to detect if a dynamic config exists.
const dynamicConfig = reduceExpoObject(rawDynamicConfig) || {};
return fillAndReturnConfig(dynamicConfig, exportedObjectType, mayHaveUnusedStaticConfig);
}
// No app.config.js but json or no config
return fillAndReturnConfig(staticConfig || {}, null);
}
function getPackageJson(projectRoot) {
const [pkg] = getPackageJsonAndPath(projectRoot);
return pkg;
}
function getPackageJsonAndPath(projectRoot) {
const packageJsonPath = (0, _resolvePackageJson().getRootPackageJsonPath)(projectRoot);
return [_jsonFile().default.read(packageJsonPath), packageJsonPath];
}
/**
* Get the static and dynamic config paths for a project. Also accounts for custom paths.
*
* @param projectRoot
*/
function getConfigFilePaths(projectRoot) {
return {
dynamicConfigPath: getDynamicConfigFilePath(projectRoot),
staticConfigPath: getStaticConfigFilePath(projectRoot)
};
}
const DYNAMIC_CONFIG_EXTS = ['.ts', '.mts', '.cts', '.mjs', '.cjs', '.js'];
function getDynamicConfigFilePath(projectRoot) {
const fileNames = DYNAMIC_CONFIG_EXTS.map(ext => `app.config${ext}`);
for (const fileName of fileNames) {
const configPath = _path().default.join(projectRoot, fileName);
try {
const stat = _fs().default.statSync(configPath);
if (stat.isFile()) {
return configPath;
}
} catch {}
}
return null;
}
function getStaticConfigFilePath(projectRoot) {
for (const fileName of ['app.config.json', 'app.json']) {
const configPath = _path().default.join(projectRoot, fileName);
try {
const stat = _fs().default.statSync(configPath);
if (stat.isFile()) {
return configPath;
}
} catch {}
}
return null;
}
/**
* Attempt to modify an Expo project config.
* This will only fully work if the project is using static configs only.
* Otherwise 'warn' | 'fail' will return with a message about why the config couldn't be updated.
* The potentially modified config object will be returned for testing purposes.
*
* @param projectRoot
* @param modifications modifications to make to an existing config
* @param readOptions options for reading the current config file
* @param writeOptions If true, the static config file will not be rewritten
*/
async function modifyConfigAsync(projectRoot, modifications, readOptions = {}, writeOptions = {}) {
const config = getConfig(projectRoot, readOptions);
const isDryRun = writeOptions.dryRun;
// Create or modify the static config, when not using dynamic config
if (!config.dynamicConfigPath) {
const outputConfig = mergeConfigModifications(config, modifications);
if (!isDryRun) {
const configPath = config.staticConfigPath ?? _path().default.join(projectRoot, 'app.json');
await _jsonFile().default.writeAsync(configPath, outputConfig, {
json5: false
});
}
return {
type: 'success',
config: outputConfig.expo ?? outputConfig
};
}
// Attempt to write to a function-like dynamic config, when used with a static config
if (config.staticConfigPath && config.dynamicConfigObjectType === 'function' && !modifications.hasOwnProperty('plugins') // We don't know what plugins are in dynamic configs
) {
const outputConfig = mergeConfigModifications(config, modifications);
if (isDryRun) {
return {
type: 'warn',
message: `Cannot verify config modifications in dry-run mode for config at: ${_path().default.relative(projectRoot, config.dynamicConfigPath)}`,
config: null
};
}
// Attempt to write the static config with the config modifications
await _jsonFile().default.writeAsync(config.staticConfigPath, outputConfig, {
json5: false
});
// Verify that the dynamic config is using the static config
const newConfig = getConfig(projectRoot, readOptions);
const newConfighasModifications = isMatchingObject(modifications, newConfig.exp);
if (newConfighasModifications) {
return {
type: 'success',
config: newConfig.exp
};
}
// Rollback the changes when the reloaded config did not include the modifications
await _jsonFile().default.writeAsync(config.staticConfigPath, config.rootConfig, {
json5: false
});
}
// We cannot automatically write to a dynamic config
return {
type: 'warn',
message: `Cannot automatically write to dynamic config at: ${_path().default.relative(projectRoot, config.dynamicConfigPath)}`,
config: null
};
}
/**
* Merge the config modifications, using an optional possible top-level `expo` object.
* Note, changes in the plugins are merged differently to avoid duplicate entries.
*/
function mergeConfigModifications(config, {
plugins,
...modifications
}) {
const modifiedExpoConfig = !config.rootConfig.expo ? (0, _deepmerge().default)(config.rootConfig, modifications) : (0, _deepmerge().default)(config.rootConfig.expo, modifications);
if (plugins?.length) {
// When adding plugins, ensure the config has a plugin list
if (!modifiedExpoConfig.plugins) {
modifiedExpoConfig.plugins = [];
}
// Create a plugin lookup map
const existingPlugins = Object.fromEntries(modifiedExpoConfig.plugins.map(definition => typeof definition === 'string' ? [definition, undefined] : definition));
for (const plugin of plugins) {
// Unpack the plugin definition, using either the short (string) or normal (array) notation
const [pluginName, pluginProps] = Array.isArray(plugin) ? plugin : [plugin];
// Abort if the plugin definition is empty
if (!pluginName) continue;
// Add the plugin if it doesn't exist yet, including its properties
if (!(pluginName in existingPlugins)) {
modifiedExpoConfig.plugins.push(plugin);
continue;
}
// If the plugin has properties, and it exists, merge the properties
if (pluginProps) {
modifiedExpoConfig.plugins = modifiedExpoConfig.plugins.map(existingPlugin => {
const [existingPluginName] = Array.isArray(existingPlugin) ? existingPlugin : [existingPlugin];
// Do not modify other plugins
if (existingPluginName !== pluginName) {
return existingPlugin;
}
// Add the props to the existing plugin entry
if (typeof existingPlugin === 'string') {
return [existingPlugin, pluginProps];
}
// Merge the props to the existing plugin properties
if (Array.isArray(existingPlugin) && existingPlugin[0]) {
return [existingPlugin[0], (0, _deepmerge().default)(existingPlugin[1] ?? {}, pluginProps)];
}
return existingPlugin;
});
continue;
}
// If the same plugin exists with properties, and the modification does not contain properties, ignore
}
}
const finalizedConfig = !config.rootConfig.expo ? modifiedExpoConfig : {
...config.rootConfig,
expo: modifiedExpoConfig
};
return finalizedConfig;
}
function isMatchingObject(expectedValues, actualValues) {
for (const key in expectedValues) {
if (!expectedValues.hasOwnProperty(key)) {
continue;
}
if (typeof expectedValues[key] === 'object' && actualValues[key] !== null) {
if (!isMatchingObject(expectedValues[key], actualValues[key])) {
return false;
}
} else {
if (expectedValues[key] !== actualValues[key]) {
return false;
}
}
}
return true;
}
function ensureConfigHasDefaultValues({
projectRoot,
exp,
pkg,
paths,
packageJsonPath,
skipSDKVersionRequirement = false
}) {
if (!exp) {
exp = {};
}
exp = (0, _withInternal().withInternal)(exp, {
projectRoot,
...(paths ?? {}),
packageJsonPath
});
// Defaults for package.json fields
const pkgName = typeof pkg.name === 'string' ? pkg.name : _path().default.basename(projectRoot);
const pkgVersion = typeof pkg.version === 'string' ? pkg.version : '1.0.0';
const pkgWithDefaults = {
...pkg,
name: pkgName,
version: pkgVersion
};
// Defaults for app.json/app.config.js fields
const name = exp.name ?? pkgName;
const slug = exp.slug ?? (0, _slugify().default)(name.toLowerCase());
const version = exp.version ?? pkgVersion;
let description = exp.description;
if (!description && typeof pkg.description === 'string') {
description = pkg.description;
}
const expWithDefaults = {
...exp,
name,
slug,
version,
description
};
let sdkVersion;
try {
sdkVersion = (0, _getExpoSDKVersion().getExpoSDKVersion)(projectRoot, expWithDefaults);
} catch (error) {
if (!skipSDKVersionRequirement) throw error;
}
let platforms = exp.platforms;
if (!platforms) {
platforms = getSupportedPlatforms(projectRoot);
}
return {
exp: {
...expWithDefaults,
sdkVersion,
platforms
},
pkg: pkgWithDefaults
};
}
const DEFAULT_BUILD_PATH = `web-build`;
function getWebOutputPath(config = {}) {
if (process.env.WEBPACK_BUILD_OUTPUT_PATH) {
return process.env.WEBPACK_BUILD_OUTPUT_PATH;
}
const expo = config.expo || config || {};
return expo?.web?.build?.output || DEFAULT_BUILD_PATH;
}
function getNameFromConfig(exp = {}) {
// For RN CLI support
const appManifest = exp.expo || exp;
const {
web = {}
} = appManifest;
// rn-cli apps use a displayName value as well.
const appName = exp.displayName || appManifest.displayName || appManifest.name;
const webName = web.name || appName;
return {
appName,
webName
};
}
function getDefaultTarget(projectRoot, exp) {
exp ??= getConfig(projectRoot, {
skipSDKVersionRequirement: true
}).exp;
// before SDK 37, always default to managed to preserve previous behavior
if (exp.sdkVersion && exp.sdkVersion !== 'UNVERSIONED' && _semver().default.lt(exp.sdkVersion, '37.0.0')) {
return 'managed';
}
return isBareWorkflowProject(projectRoot) ? 'bare' : 'managed';
}
function isBareWorkflowProject(projectRoot) {
const [pkg] = getPackageJsonAndPath(projectRoot);
// TODO: Drop this
if (pkg.dependencies && pkg.dependencies.expokit) {
return false;
}
const xcodeprojFiles = (0, _glob().sync)('ios/**/*.xcodeproj', {
absolute: true,
cwd: projectRoot
});
if (xcodeprojFiles.length) {
return true;
}
const gradleFiles = (0, _glob().sync)('android/**/*.gradle', {
absolute: true,
cwd: projectRoot
});
if (gradleFiles.length) {
return true;
}
return false;
}
/**
* Return a useful name describing the project config.
* - dynamic: app.config.js
* - static: app.json
* - custom path app config relative to root folder
* - both: app.config.js or app.json
*/
function getProjectConfigDescription(projectRoot) {
const paths = getConfigFilePaths(projectRoot);
return getProjectConfigDescriptionWithPaths(projectRoot, paths);
}
/**
* Returns a string describing the configurations used for the given project root.
* Will return null if no config is found.
*
* @param projectRoot
* @param projectConfig
*/
function getProjectConfigDescriptionWithPaths(projectRoot, projectConfig) {
if (projectConfig.dynamicConfigPath) {
const relativeDynamicConfigPath = _path().default.relative(projectRoot, projectConfig.dynamicConfigPath);
if (projectConfig.staticConfigPath) {
return `${relativeDynamicConfigPath} or ${_path().default.relative(projectRoot, projectConfig.staticConfigPath)}`;
}
return relativeDynamicConfigPath;
} else if (projectConfig.staticConfigPath) {
return _path().default.relative(projectRoot, projectConfig.staticConfigPath);
}
// If a config doesn't exist, our tooling will generate a static app.json
return 'app.json';
}
//# sourceMappingURL=Config.js.map

1
node_modules/@expo/config/build/Config.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

165
node_modules/@expo/config/build/Config.types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,165 @@
import type { ModConfig } from '@expo/config-plugins';
import type { ExpoConfig } from '@expo/config-types';
export type { ExpoConfig, Web as ExpoConfigWeb, Android as ExpoConfigAndroid, IOS as ExpoConfigIOS, Splash as ExpoConfigSplash, IOSIcons as ExpoConfigIOSIcons, AndroidIntentFiltersData as ExpoConfigAndroidIntentFiltersData, } from '@expo/config-types';
export type PackageJSONConfig = {
dependencies?: Record<string, string>;
[key: string]: any;
};
export interface ProjectConfig {
/**
* Fully evaluated Expo config with default values injected.
*/
exp: ExpoConfig;
/**
* Dynamic config for processing native files during the generation process.
*/
mods?: ModConfig | null;
/**
* Project package.json object with default values injected.
*/
pkg: PackageJSONConfig;
/**
* Unaltered static config (app.config.json, app.json, or custom json config).
* For legacy, an empty object will be returned even if no static config exists.
*/
rootConfig: AppJSONConfig;
/**
* Path to the static json config file if it exists.
* If a project has an app.config.js and an app.json then app.json will be returned.
* If a project has an app.config.json and an app.json then app.config.json will be returned.
* Returns null if no static config file exists.
*/
staticConfigPath: string | null;
/**
* Path to an app.config.js or app.config.ts.
* Returns null if no dynamic config file exists.
*/
dynamicConfigPath: string | null;
/**
* Returns the type of the value exported from the dynamic config.
* This can be used to determine if the dynamic config is potentially extending a static config when (v === 'function').
* Returns null if no dynamic config file exists.
*/
dynamicConfigObjectType: string | null;
/**
* Returns true if both a static and dynamic config are present, and the dynamic config is applied on top of the static.
* This is only used for expo-doctor diagnostic warnings. This flag may be true even in cases where all static config values are used.
* It only checks against a typical pattern for layering static and dynamic config, e.g.,:
* module.exports = ({ config }) => {
return {
...config,
name: 'name overridden by dynamic config',
};
};
*/
hasUnusedStaticConfig: boolean;
}
export type AppJSONConfig = {
expo: ExpoConfig;
[key: string]: any;
};
export type BareAppConfig = {
name: string;
[key: string]: any;
};
export type HookArguments = {
config: any;
url: any;
exp: ExpoConfig;
iosBundle: string | Uint8Array;
iosSourceMap: string | null;
iosManifest: any;
iosManifestUrl: string;
androidBundle: string | Uint8Array;
androidSourceMap: string | null;
androidManifest: any;
androidManifestUrl: string;
projectRoot: string;
log: (msg: any) => void;
};
export type ExpoGoConfig = {
mainModuleName: string;
debuggerHost: string;
developer: {
tool: string | null;
projectRoot?: string;
};
packagerOpts: {
[key: string]: any;
};
};
export type EASConfig = {
projectId?: string;
};
export type ClientScopingConfig = {
scopeKey?: string;
};
export interface ExpoUpdatesManifestAsset {
url: string;
key: string;
contentType: string;
hash?: string;
}
export interface ExpoUpdatesManifest {
id: string;
createdAt: string;
runtimeVersion: string;
launchAsset: ExpoUpdatesManifestAsset;
assets: ExpoUpdatesManifestAsset[];
metadata: {
[key: string]: string;
};
extra: ClientScopingConfig & {
expoClient?: ExpoConfig & {
/**
* Only present during development using @expo/cli.
*/
hostUri?: string;
};
expoGo?: ExpoGoConfig;
eas?: EASConfig;
};
}
export type Hook = {
file: string;
config: any;
};
export type HookType = 'postPublish' | 'postExport';
export declare enum ProjectPrivacy {
PUBLIC = "public",
UNLISTED = "unlisted"
}
export type Platform = 'android' | 'ios' | 'web';
export type ProjectTarget = 'managed' | 'bare';
export type ConfigErrorCode = 'NO_APP_JSON' | 'NOT_OBJECT' | 'NO_EXPO' | 'MODULE_NOT_FOUND' | 'DEPRECATED' | 'INVALID_MODE' | 'INVALID_FORMAT' | 'INVALID_PLUGIN' | 'INVALID_CONFIG' | 'ENTRY_NOT_FOUND';
export type ConfigContext = {
projectRoot: string;
/**
* The static config path either app.json, app.config.json, or a custom user-defined config.
*/
staticConfigPath: string | null;
packageJsonPath: string | null;
config: Partial<ExpoConfig>;
};
export type GetConfigOptions = {
isPublicConfig?: boolean;
/**
* Should the config `mods` be preserved in the config? Used for compiling mods in the eject command.
*
* @default false
*/
isModdedConfig?: boolean;
skipSDKVersionRequirement?: boolean;
/**
* Dangerously skip resolving plugins.
*/
skipPlugins?: boolean;
strict?: boolean;
};
export type WriteConfigOptions = {
dryRun?: boolean;
};
export type ConfigFilePaths = {
staticConfigPath: string | null;
dynamicConfigPath: string | null;
};

12
node_modules/@expo/config/build/Config.types.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ProjectPrivacy = void 0;
let ProjectPrivacy = exports.ProjectPrivacy = /*#__PURE__*/function (ProjectPrivacy) {
ProjectPrivacy["PUBLIC"] = "public";
ProjectPrivacy["UNLISTED"] = "unlisted";
return ProjectPrivacy;
}({});
//# sourceMappingURL=Config.types.js.map

1
node_modules/@expo/config/build/Config.types.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

11
node_modules/@expo/config/build/Errors.d.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
import { ConfigErrorCode } from './Config.types';
/**
* Based on `JsonFileError` from `@expo/json-file`
*/
export declare class ConfigError extends Error {
code: ConfigErrorCode;
cause?: Error | undefined;
readonly name = "ConfigError";
readonly isConfigError = true;
constructor(message: string, code: ConfigErrorCode, cause?: Error | undefined);
}

20
node_modules/@expo/config/build/Errors.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ConfigError = void 0;
/**
* Based on `JsonFileError` from `@expo/json-file`
*/
class ConfigError extends Error {
name = 'ConfigError';
isConfigError = true;
constructor(message, code, cause) {
super(cause ? `${message}\n└─ Cause: ${cause.name}: ${cause.message}` : message);
this.code = code;
this.cause = cause;
}
}
exports.ConfigError = ConfigError;
//# sourceMappingURL=Errors.js.map

1
node_modules/@expo/config/build/Errors.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Errors.js","names":["ConfigError","Error","name","isConfigError","constructor","message","code","cause","exports"],"sources":["../src/Errors.ts"],"sourcesContent":["import { 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":[]}

3
node_modules/@expo/config/build/Serialize.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export declare function serializeAndEvaluate(val: any): any;
export declare function serializeSkippingMods(val: any): any;
export declare function serializeAfterStaticPlugins(val: any): any;

92
node_modules/@expo/config/build/Serialize.js generated vendored Normal file
View File

@@ -0,0 +1,92 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.serializeAfterStaticPlugins = serializeAfterStaticPlugins;
exports.serializeAndEvaluate = serializeAndEvaluate;
exports.serializeSkippingMods = serializeSkippingMods;
function _Errors() {
const data = require("./Errors");
_Errors = function () {
return data;
};
return data;
}
function serializeAndEvaluate(val) {
if (['undefined', 'string', 'boolean', 'number', 'bigint'].includes(typeof val)) {
return val;
} else if (typeof val === 'function') {
// TODO: Bacon: Should we support async methods?
return val();
} else if (Array.isArray(val)) {
return val.map(serializeAndEvaluate);
} else if (typeof val === 'object') {
const output = {};
for (const property in val) {
if (val.hasOwnProperty(property)) {
output[property] = serializeAndEvaluate(val[property]);
}
}
return output;
}
// symbol
throw new (_Errors().ConfigError)(`Expo config doesn't support \`Symbols\`: ${val}`, 'INVALID_CONFIG');
}
function serializeSkippingMods(val) {
if (typeof val === 'object' && !Array.isArray(val)) {
const output = {};
for (const property in val) {
if (val.hasOwnProperty(property)) {
if (property === 'mods' || property === 'plugins') {
// Don't serialize mods or plugins
output[property] = val[property];
} else {
output[property] = serializeAndEvaluate(val[property]);
}
}
}
return output;
}
return serializeAndEvaluate(val);
}
function serializeAndEvaluatePlugin(val) {
if (['undefined', 'string', 'boolean', 'number', 'bigint'].includes(typeof val)) {
return val;
} else if (typeof val === 'function') {
return val.name || 'withAnonymous';
} else if (Array.isArray(val)) {
return val.map(serializeAndEvaluatePlugin);
} else if (typeof val === 'object') {
const output = {};
for (const property in val) {
if (val.hasOwnProperty(property)) {
output[property] = serializeAndEvaluatePlugin(val[property]);
}
}
return output;
}
// symbol
throw new (_Errors().ConfigError)(`Expo config doesn't support \`Symbols\`: ${val}`, 'INVALID_CONFIG');
}
function serializeAfterStaticPlugins(val) {
if (typeof val === 'object' && !Array.isArray(val)) {
const output = {};
for (const property in val) {
if (val.hasOwnProperty(property)) {
if (property === 'mods') {
// Don't serialize mods
output[property] = val[property];
} else if (property === 'plugins' && Array.isArray(val[property])) {
// Serialize the mods by removing any config plugins
output[property] = val[property].map(serializeAndEvaluatePlugin);
} else {
output[property] = serializeAndEvaluate(val[property]);
}
}
}
return output;
}
return serializeAndEvaluate(val);
}
//# sourceMappingURL=Serialize.js.map

1
node_modules/@expo/config/build/Serialize.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,78 @@
type AndroidRunOptions = {
variant?: string;
device?: boolean | string;
port?: number;
bundler?: boolean;
install?: boolean;
buildCache?: boolean;
allArch?: boolean;
binary?: string;
appId?: string;
};
type IosRunOptions = {
/** iOS device to target. */
device?: string | boolean;
/** Dev server port to use, ignored if `bundler` is `false`. */
port?: number;
/** Xcode scheme to build. */
scheme?: string | boolean;
/** Xcode configuration to build. Default `Debug` */
configuration?: 'Debug' | 'Release';
/** Should start the bundler dev server. */
bundler?: boolean;
/** Should install missing dependencies before building. */
install?: boolean;
/** Should use derived data for builds. */
buildCache?: boolean;
/** Path to an existing binary to install on the device. */
binary?: string;
/** Re-bundle JS and assets, then embed in existing app, and install again. */
rebundle?: boolean;
};
export type RunOptions = AndroidRunOptions | IosRunOptions;
export type ResolveBuildCacheProps = {
projectRoot: string;
platform: 'android' | 'ios';
runOptions: RunOptions;
fingerprintHash: string;
};
/**
* @deprecated Use `ResolveBuildCacheProps` instead.
*/
export type ResolveRemoteBuildCacheProps = ResolveBuildCacheProps;
export type UploadBuildCacheProps = {
projectRoot: string;
buildPath: string;
runOptions: RunOptions;
fingerprintHash: string;
platform: 'android' | 'ios';
};
/**
* @deprecated Use `ResolveBuildCacheProps` instead.
*/
export type UploadRemoteBuildCacheProps = UploadBuildCacheProps;
export type CalculateFingerprintHashProps = {
projectRoot: string;
platform: 'android' | 'ios';
runOptions: RunOptions;
};
export type BuildCacheProvider<T = any> = {
plugin: BuildCacheProviderPlugin<T>;
options: T;
};
export type BuildCacheProviderPlugin<T = any> = {
calculateFingerprintHash?: (props: CalculateFingerprintHashProps, options: T) => Promise<string | null>;
} & ({
resolveBuildCache(props: ResolveBuildCacheProps, options: T): Promise<string | null>;
uploadBuildCache(props: UploadBuildCacheProps, options: T): Promise<string | null>;
} | {
/**
* @deprecated Use `resolveBuildCache` instead.
*/
resolveRemoteBuildCache: (props: ResolveRemoteBuildCacheProps, options: T) => Promise<string | null>;
/**
* @deprecated Use `uploadBuildCache` instead.
*/
uploadRemoteBuildCache: (props: UploadRemoteBuildCacheProps, options: T) => Promise<string | null>;
});
export {};

View File

@@ -0,0 +1,2 @@
"use strict";
//# sourceMappingURL=buildCacheProvider.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"buildCacheProvider.js","names":[],"sources":["../src/buildCacheProvider.ts"],"sourcesContent":["type AndroidRunOptions = {\n variant?: string;\n device?: boolean | string;\n port?: number;\n bundler?: boolean;\n install?: boolean;\n buildCache?: boolean;\n allArch?: boolean;\n binary?: string;\n appId?: string;\n};\n\ntype IosRunOptions = {\n /** iOS device to target. */\n device?: string | boolean;\n /** Dev server port to use, ignored if `bundler` is `false`. */\n port?: number;\n /** Xcode scheme to build. */\n scheme?: string | boolean;\n /** Xcode configuration to build. Default `Debug` */\n configuration?: 'Debug' | 'Release';\n /** Should start the bundler dev server. */\n bundler?: boolean;\n /** Should install missing dependencies before building. */\n install?: boolean;\n /** Should use derived data for builds. */\n buildCache?: boolean;\n /** Path to an existing binary to install on the device. */\n binary?: string;\n\n /** Re-bundle JS and assets, then embed in existing app, and install again. */\n rebundle?: boolean;\n};\n\nexport type RunOptions = AndroidRunOptions | IosRunOptions;\n\nexport type ResolveBuildCacheProps = {\n projectRoot: string;\n platform: 'android' | 'ios';\n runOptions: RunOptions;\n fingerprintHash: string;\n};\n\n/**\n * @deprecated Use `ResolveBuildCacheProps` instead.\n */\nexport type ResolveRemoteBuildCacheProps = ResolveBuildCacheProps;\n\nexport type UploadBuildCacheProps = {\n projectRoot: string;\n buildPath: string;\n runOptions: RunOptions;\n fingerprintHash: string;\n platform: 'android' | 'ios';\n};\n/**\n * @deprecated Use `ResolveBuildCacheProps` instead.\n */\nexport type UploadRemoteBuildCacheProps = UploadBuildCacheProps;\n\nexport type CalculateFingerprintHashProps = {\n projectRoot: string;\n platform: 'android' | 'ios';\n runOptions: RunOptions;\n};\n\nexport type BuildCacheProvider<T = any> = {\n plugin: BuildCacheProviderPlugin<T>;\n options: T;\n};\n\nexport type BuildCacheProviderPlugin<T = any> = {\n calculateFingerprintHash?: (\n props: CalculateFingerprintHashProps,\n options: T\n ) => Promise<string | null>;\n} & (\n | {\n resolveBuildCache(props: ResolveBuildCacheProps, options: T): Promise<string | null>;\n uploadBuildCache(props: UploadBuildCacheProps, options: T): Promise<string | null>;\n }\n | {\n /**\n * @deprecated Use `resolveBuildCache` instead.\n */\n resolveRemoteBuildCache: (\n props: ResolveRemoteBuildCacheProps,\n options: T\n ) => Promise<string | null>;\n /**\n * @deprecated Use `uploadBuildCache` instead.\n */\n uploadRemoteBuildCache: (\n props: UploadRemoteBuildCacheProps,\n options: T\n ) => Promise<string | null>;\n }\n);\n"],"mappings":"","ignoreList":[]}

1
node_modules/@expo/config/build/environment.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare const NON_STANDARD_SYMBOL: unique symbol;

8
node_modules/@expo/config/build/environment.js generated vendored Normal file
View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.NON_STANDARD_SYMBOL = void 0;
const NON_STANDARD_SYMBOL = exports.NON_STANDARD_SYMBOL = Symbol('non-standard');
//# sourceMappingURL=environment.js.map

1
node_modules/@expo/config/build/environment.js.map generated vendored Normal file
View File

@@ -0,0 +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":[]}

31
node_modules/@expo/config/build/evalConfig.d.ts generated vendored Normal file
View File

@@ -0,0 +1,31 @@
import { AppJSONConfig, ConfigContext, ExpoConfig } from './Config.types';
type RawDynamicConfig = AppJSONConfig | Partial<ExpoConfig> | null;
export type DynamicConfigResults = {
config: RawDynamicConfig;
exportedObjectType: string;
mayHaveUnusedStaticConfig: boolean;
};
/**
* Transpile and evaluate the dynamic config object.
* This method is shared between the standard reading method in getConfig, and the headless script.
*
* @param options configFile path to the dynamic app.config.*, request to send to the dynamic config if it exports a function.
* @returns the serialized and evaluated config along with the exported object type (object or function).
*/
export declare function evalConfig(configFile: string, request: ConfigContext | null): DynamicConfigResults;
/**
* - Resolve the exported contents of an Expo config (be it default or module.exports)
* - Assert no promise exports
* - Return config type
* - Serialize config
*
* @param result
* @param configFile
* @param request
*/
export declare function resolveConfigExport(result: any, configFile: string, request: ConfigContext | null): {
config: any;
exportedObjectType: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
mayHaveUnusedStaticConfig: any;
};
export {};

100
node_modules/@expo/config/build/evalConfig.js generated vendored Normal file
View File

@@ -0,0 +1,100 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.evalConfig = evalConfig;
exports.resolveConfigExport = resolveConfigExport;
function _requireUtils() {
const data = require("@expo/require-utils");
_requireUtils = function () {
return data;
};
return data;
}
function _Errors() {
const data = require("./Errors");
_Errors = function () {
return data;
};
return data;
}
function _Serialize() {
const data = require("./Serialize");
_Serialize = function () {
return data;
};
return data;
}
function _environment() {
const data = require("./environment");
_environment = function () {
return data;
};
return data;
}
/**
* Transpile and evaluate the dynamic config object.
* This method is shared between the standard reading method in getConfig, and the headless script.
*
* @param options configFile path to the dynamic app.config.*, request to send to the dynamic config if it exports a function.
* @returns the serialized and evaluated config along with the exported object type (object or function).
*/
function evalConfig(configFile, request) {
const mod = (0, _requireUtils().loadModuleSync)(configFile);
return resolveConfigExport(mod, configFile, request);
}
/**
* - Resolve the exported contents of an Expo config (be it default or module.exports)
* - Assert no promise exports
* - Return config type
* - Serialize config
*
* @param result
* @param configFile
* @param request
*/
function resolveConfigExport(result, configFile, request) {
// add key to static config that we'll check for after the dynamic is evaluated
// to see if the static config was used in determining the dynamic
const hasBaseStaticConfig = _environment().NON_STANDARD_SYMBOL;
if (request?.config) {
// @ts-ignore
request.config[hasBaseStaticConfig] = true;
}
if (result.default != null) {
result = result.default;
}
const exportedObjectType = typeof result;
if (typeof result === 'function') {
result = result(request);
}
if (result instanceof Promise) {
throw new (_Errors().ConfigError)(`Config file ${configFile} cannot return a Promise.`, 'INVALID_CONFIG');
}
// If the key is not added, it suggests that the static config was not used as the base for the dynamic.
// note(Keith): This is the most common way to use static and dynamic config together, but not the only way.
// Hence, this is only output from getConfig() for informational purposes for use by tools like Expo Doctor
// to suggest that there *may* be a problem.
const mayHaveUnusedStaticConfig =
// @ts-ignore
request?.config?.[hasBaseStaticConfig] && !result?.[hasBaseStaticConfig];
if (result) {
delete result._hasBaseStaticConfig;
}
// If the expo object exists, ignore all other values.
if (result?.expo) {
result = (0, _Serialize().serializeSkippingMods)(result.expo);
} else {
result = (0, _Serialize().serializeSkippingMods)(result);
}
return {
config: result,
exportedObjectType,
mayHaveUnusedStaticConfig
};
}
//# sourceMappingURL=evalConfig.js.map

1
node_modules/@expo/config/build/evalConfig.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

4
node_modules/@expo/config/build/getConfig.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import { AppJSONConfig, ConfigContext, ExpoConfig } from './Config.types';
import { DynamicConfigResults } from './evalConfig';
export declare function getDynamicConfig(configPath: string, request: ConfigContext): DynamicConfigResults;
export declare function getStaticConfig(configPath: string): AppJSONConfig | ExpoConfig;

72
node_modules/@expo/config/build/getConfig.js generated vendored Normal file
View File

@@ -0,0 +1,72 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getDynamicConfig = getDynamicConfig;
exports.getStaticConfig = getStaticConfig;
function _jsonFile() {
const data = _interopRequireDefault(require("@expo/json-file"));
_jsonFile = function () {
return data;
};
return data;
}
function _fs() {
const data = require("fs");
_fs = function () {
return data;
};
return data;
}
function _Errors() {
const data = require("./Errors");
_Errors = function () {
return data;
};
return data;
}
function _evalConfig() {
const data = require("./evalConfig");
_evalConfig = function () {
return data;
};
return data;
}
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// We cannot use async config resolution right now because Next.js doesn't support async configs.
// If they don't add support for async Webpack configs then we may need to pull support for Next.js.
function readConfigFile(configFile, context) {
// If the file doesn't exist then we should skip it and continue searching.
if (!(0, _fs().existsSync)(configFile)) {
return null;
}
try {
return (0, _evalConfig().evalConfig)(configFile, context);
} catch (error) {
// @ts-ignore
error.isConfigError = true;
error.message = `Error reading Expo config at ${configFile}:\n\n${error.message}`;
throw error;
}
}
function getDynamicConfig(configPath, request) {
const config = readConfigFile(configPath, request);
if (config) {
// The config must be serialized and evaluated ahead of time so the spawned process can send it over.
return config;
}
// TODO: It seems this is only thrown if the file cannot be found (which may never happen).
// If so we should throw a more helpful error.
throw new (_Errors().ConfigError)(`Failed to read config at: ${configPath}`, 'INVALID_CONFIG');
}
function getStaticConfig(configPath) {
const config = _jsonFile().default.read(configPath, {
json5: true
});
if (config) {
return config;
}
throw new (_Errors().ConfigError)(`Failed to read config at: ${configPath}`, 'INVALID_CONFIG');
}
//# sourceMappingURL=getConfig.js.map

1
node_modules/@expo/config/build/getConfig.js.map generated vendored Normal file
View File

@@ -0,0 +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 { AppJSONConfig, ConfigContext, ExpoConfig } from './Config.types';\nimport { ConfigError } from './Errors';\nimport { DynamicConfigResults, 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;AACA,SAAAK,YAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,WAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAgE,SAAAC,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhE;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":[]}

View File

@@ -0,0 +1,6 @@
import { ExpoConfig } from './Config.types';
/**
* Resolve the Expo SDK Version either from the input Expo config or from the installed
* version of the `expo` package.
*/
export declare function getExpoSDKVersion(projectRoot: string, exp?: Pick<ExpoConfig, 'sdkVersion'>): string;

59
node_modules/@expo/config/build/getExpoSDKVersion.js generated vendored Normal file
View File

@@ -0,0 +1,59 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getExpoSDKVersion = getExpoSDKVersion;
function _jsonFile() {
const data = _interopRequireDefault(require("@expo/json-file"));
_jsonFile = function () {
return data;
};
return data;
}
function _resolveFrom() {
const data = _interopRequireDefault(require("resolve-from"));
_resolveFrom = function () {
return data;
};
return data;
}
function _Errors() {
const data = require("./Errors");
_Errors = function () {
return data;
};
return data;
}
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/**
* Resolve the Expo SDK Version either from the input Expo config or from the installed
* version of the `expo` package.
*/
function getExpoSDKVersion(projectRoot, exp = {}) {
return exp?.sdkVersion ?? getExpoSDKVersionFromPackage(projectRoot);
}
/**
* Resolve the Expo SDK Version either from the input Expo config or from the installed
* version of the `expo` package.
*/
function getExpoSDKVersionFromPackage(projectRoot) {
const packageJsonPath = _resolveFrom().default.silent(projectRoot, 'expo/package.json');
if (!packageJsonPath) {
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');
}
const expoPackageJson = _jsonFile().default.read(packageJsonPath, {
json5: true
});
const {
version: packageVersion
} = expoPackageJson;
if (!(typeof packageVersion === 'string')) {
// This is technically impossible.
throw new (_Errors().ConfigError)(`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.`, 'MODULE_NOT_FOUND');
}
const majorVersion = packageVersion.split('.').shift();
return `${majorVersion}.0.0`;
}
//# sourceMappingURL=getExpoSDKVersion.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"getExpoSDKVersion.js","names":["_jsonFile","data","_interopRequireDefault","require","_resolveFrom","_Errors","e","__esModule","default","getExpoSDKVersion","projectRoot","exp","sdkVersion","getExpoSDKVersionFromPackage","packageJsonPath","resolveFrom","silent","ConfigError","expoPackageJson","JsonFile","read","json5","version","packageVersion","majorVersion","split","shift"],"sources":["../src/getExpoSDKVersion.ts"],"sourcesContent":["import JsonFile from '@expo/json-file';\nimport resolveFrom from 'resolve-from';\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.silent(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,aAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,YAAA,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,GAAGC,sBAAW,CAACC,MAAM,CAACN,WAAW,EAAE,mBAAmB,CAAC;EAC5E,IAAI,CAACI,eAAe,EAAE;IACpB,MAAM,KAAIG,qBAAW,EACnB,mJAAmJ,EACnJ,kBACF,CAAC;EACH;EACA,MAAMC,eAAe,GAAGC,mBAAQ,CAACC,IAAI,CAACN,eAAe,EAAE;IAAEO,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":[]}

5
node_modules/@expo/config/build/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export * from './Config';
export * from './Config.types';
export * from './getExpoSDKVersion';
export * from './Errors';
export * from './buildCacheProvider';

61
node_modules/@expo/config/build/index.js generated vendored Normal file
View File

@@ -0,0 +1,61 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _Config = require("./Config");
Object.keys(_Config).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _Config[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _Config[key];
}
});
});
var _Config2 = require("./Config.types");
Object.keys(_Config2).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _Config2[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _Config2[key];
}
});
});
var _getExpoSDKVersion = require("./getExpoSDKVersion");
Object.keys(_getExpoSDKVersion).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _getExpoSDKVersion[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _getExpoSDKVersion[key];
}
});
});
var _Errors = require("./Errors");
Object.keys(_Errors).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _Errors[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _Errors[key];
}
});
});
var _buildCacheProvider = require("./buildCacheProvider");
Object.keys(_buildCacheProvider).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _buildCacheProvider[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _buildCacheProvider[key];
}
});
});
//# sourceMappingURL=index.js.map

1
node_modules/@expo/config/build/index.js.map generated vendored Normal file
View File

@@ -0,0 +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,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,QAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,kBAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,kBAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,kBAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,kBAAA,CAAAN,GAAA;IAAA;EAAA;AAAA;AACA,IAAAO,OAAA,GAAAX,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAS,OAAA,EAAAR,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,OAAA,CAAAP,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,OAAA,CAAAP,GAAA;IAAA;EAAA;AAAA;AACA,IAAAQ,mBAAA,GAAAZ,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAU,mBAAA,EAAAT,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAQ,mBAAA,CAAAR,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAI,mBAAA,CAAAR,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}

6
node_modules/@expo/config/build/paths/env.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
declare class Env {
/** Disable auto server root detection for Metro. This will not change the server root to the workspace root. */
get EXPO_NO_METRO_WORKSPACE_ROOT(): boolean;
}
export declare const env: Env;
export {};

24
node_modules/@expo/config/build/paths/env.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.env = void 0;
function _getenv() {
const data = require("getenv");
_getenv = function () {
return data;
};
return data;
}
class Env {
/** Disable auto server root detection for Metro. This will not change the server root to the workspace root. */
get EXPO_NO_METRO_WORKSPACE_ROOT() {
if ((0, _getenv().string)('EXPO_USE_METRO_WORKSPACE_ROOT', '')) {
console.warn('EXPO_USE_METRO_WORKSPACE_ROOT is enabled by default, use EXPO_NO_METRO_WORKSPACE_ROOT instead to disable.');
}
return (0, _getenv().boolish)('EXPO_NO_METRO_WORKSPACE_ROOT', false);
}
}
const env = exports.env = new Env();
//# sourceMappingURL=env.js.map

1
node_modules/@expo/config/build/paths/env.js.map generated vendored Normal file
View File

@@ -0,0 +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":[]}

View File

@@ -0,0 +1,8 @@
export type LanguageOptions = {
isTS: boolean;
isModern: boolean;
isReact: boolean;
};
export declare function getExtensions(platforms: string[], extensions: string[], workflows: string[]): string[];
export declare function getLanguageExtensionsInOrder({ isTS, isModern, isReact, }: LanguageOptions): string[];
export declare function getBareExtensions(platforms: string[], languageOptions?: LanguageOptions): string[];

73
node_modules/@expo/config/build/paths/extensions.js generated vendored Normal file
View File

@@ -0,0 +1,73 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getBareExtensions = getBareExtensions;
exports.getExtensions = getExtensions;
exports.getLanguageExtensionsInOrder = getLanguageExtensionsInOrder;
function _assert() {
const data = _interopRequireDefault(require("assert"));
_assert = function () {
return data;
};
return data;
}
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function getExtensions(platforms, extensions, workflows) {
// In the past we used spread operators to collect the values so now we enforce type safety on them.
(0, _assert().default)(Array.isArray(platforms), 'Expected: `platforms: string[]`');
(0, _assert().default)(Array.isArray(extensions), 'Expected: `extensions: string[]`');
(0, _assert().default)(Array.isArray(workflows), 'Expected: `workflows: string[]`');
const fileExtensions = [];
// support .expo files
for (const workflow of [...workflows, '']) {
// Ensure order is correct: [platformA.js, platformB.js, js]
for (const platform of [...platforms, '']) {
// Support both TypeScript and JavaScript
for (const extension of extensions) {
fileExtensions.push([platform, workflow, extension].filter(Boolean).join('.'));
}
}
}
return fileExtensions;
}
function getLanguageExtensionsInOrder({
isTS,
isModern,
isReact
}) {
// @ts-ignore: filter removes false type
const addLanguage = lang => [lang, isReact && `${lang}x`].filter(Boolean);
// Support JavaScript
let extensions = addLanguage('js');
if (isModern) {
extensions.unshift('mjs');
}
if (isTS) {
extensions = [...addLanguage('ts'), ...extensions];
}
return extensions;
}
function getBareExtensions(platforms, languageOptions = {
isTS: true,
isModern: true,
isReact: true
}) {
const fileExtensions = getExtensions(platforms, getLanguageExtensionsInOrder(languageOptions), []);
// Always add these last
_addMiscellaneousExtensions(platforms, fileExtensions);
return fileExtensions;
}
function _addMiscellaneousExtensions(platforms, fileExtensions) {
// Always add these with no platform extension
// In the future we may want to add platform and workspace extensions to json.
fileExtensions.push('json');
// Native doesn't currently support web assembly.
if (platforms.includes('web')) {
fileExtensions.push('wasm');
}
return fileExtensions;
}
//# sourceMappingURL=extensions.js.map

View File

@@ -0,0 +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","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: string[],\n extensions: string[],\n workflows: 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\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,SAAmB,EACnBC,UAAoB,EACpBC,SAAmB,EACT;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;EAEnE,MAAMI,cAAc,GAAG,EAAE;EACzB;EACA,KAAK,MAAMC,QAAQ,IAAI,CAAC,GAAGL,SAAS,EAAE,EAAE,CAAC,EAAE;IACzC;IACA,KAAK,MAAMM,QAAQ,IAAI,CAAC,GAAGR,SAAS,EAAE,EAAE,CAAC,EAAE;MACzC;MACA,KAAK,MAAMS,SAAS,IAAIR,UAAU,EAAE;QAClCK,cAAc,CAACI,IAAI,CAAC,CAACF,QAAQ,EAAED,QAAQ,EAAEE,SAAS,CAAC,CAACE,MAAM,CAACC,OAAO,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC;MAChF;IACF;EACF;EACA,OAAOP,cAAc;AACvB;AAEO,SAASQ,4BAA4BA,CAAC;EAC3CC,IAAI;EACJC,QAAQ;EACRC;AACe,CAAC,EAAY;EAC5B;EACA,MAAMC,WAAW,GAAIC,IAAY,IAAe,CAACA,IAAI,EAAEF,OAAO,IAAI,GAAGE,IAAI,GAAG,CAAC,CAACR,MAAM,CAACC,OAAO,CAAC;;EAE7F;EACA,IAAIX,UAAU,GAAGiB,WAAW,CAAC,IAAI,CAAC;EAElC,IAAIF,QAAQ,EAAE;IACZf,UAAU,CAACmB,OAAO,CAAC,KAAK,CAAC;EAC3B;EACA,IAAIL,IAAI,EAAE;IACRd,UAAU,GAAG,CAAC,GAAGiB,WAAW,CAAC,IAAI,CAAC,EAAE,GAAGjB,UAAU,CAAC;EACpD;EAEA,OAAOA,UAAU;AACnB;AAEO,SAASoB,iBAAiBA,CAC/BrB,SAAmB,EACnBsB,eAAgC,GAAG;EAAEP,IAAI,EAAE,IAAI;EAAEC,QAAQ,EAAE,IAAI;EAAEC,OAAO,EAAE;AAAK,CAAC,EACtE;EACV,MAAMX,cAAc,GAAGP,aAAa,CAClCC,SAAS,EACTc,4BAA4B,CAACQ,eAAe,CAAC,EAC7C,EACF,CAAC;EACD;EACAC,2BAA2B,CAACvB,SAAS,EAAEM,cAAc,CAAC;EACtD,OAAOA,cAAc;AACvB;AAEA,SAASiB,2BAA2BA,CAACvB,SAAmB,EAAEM,cAAwB,EAAY;EAC5F;EACA;EACAA,cAAc,CAACI,IAAI,CAAC,MAAM,CAAC;EAC3B;EACA,IAAIV,SAAS,CAACwB,QAAQ,CAAC,KAAK,CAAC,EAAE;IAC7BlB,cAAc,CAACI,IAAI,CAAC,MAAM,CAAC;EAC7B;EACA,OAAOJ,cAAc;AACvB","ignoreList":[]}

2
node_modules/@expo/config/build/paths/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export * from './paths';
export * from './extensions';

28
node_modules/@expo/config/build/paths/index.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _paths = require("./paths");
Object.keys(_paths).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _paths[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _paths[key];
}
});
});
var _extensions = require("./extensions");
Object.keys(_extensions).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _extensions[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _extensions[key];
}
});
});
//# sourceMappingURL=index.js.map

1
node_modules/@expo/config/build/paths/index.js.map generated vendored Normal file
View File

@@ -0,0 +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":[]}

27
node_modules/@expo/config/build/paths/paths.d.ts generated vendored Normal file
View File

@@ -0,0 +1,27 @@
import { PackageJSONConfig } from '../Config.types';
export declare function ensureSlash(inputPath: string, needsSlash: boolean): string;
export declare function getPossibleProjectRoot(): string;
/** @returns the absolute entry file for an Expo project. */
export declare function resolveEntryPoint(projectRoot: string, { platform, pkg, }?: {
platform?: string;
pkg?: PackageJSONConfig;
}): string;
export declare function getFileWithExtensions(fromDirectory: string, moduleId: string, extensions: string[]): string | null;
/** Get the Metro server root, when working in monorepos */
export declare function getMetroServerRoot(projectRoot: string): string;
/**
* Get the workspace globs for Metro's watchFolders.
* @note This does not traverse the monorepo, and should be used with `getMetroServerRoot`
*/
export declare function getMetroWorkspaceGlobs(monorepoRoot: string): string[] | null;
/**
* Convert an absolute entry point to a server or project root relative filepath.
* This is useful on Android where the entry point is an absolute path.
*/
export declare function convertEntryPointToRelative(projectRoot: string, absolutePath: string): string;
/**
* Resolve the entry point relative to either the server or project root.
* This relative entry path should be used to pass non-absolute paths to Metro,
* accounting for possible monorepos and keeping the cache sharable (no absolute paths).
*/
export declare const resolveRelativeEntryPoint: typeof resolveEntryPoint;

189
node_modules/@expo/config/build/paths/paths.js generated vendored Normal file
View File

@@ -0,0 +1,189 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.convertEntryPointToRelative = convertEntryPointToRelative;
exports.ensureSlash = ensureSlash;
exports.getFileWithExtensions = getFileWithExtensions;
exports.getMetroServerRoot = getMetroServerRoot;
exports.getMetroWorkspaceGlobs = getMetroWorkspaceGlobs;
exports.getPossibleProjectRoot = getPossibleProjectRoot;
exports.resolveEntryPoint = resolveEntryPoint;
exports.resolveRelativeEntryPoint = void 0;
function _fs() {
const data = _interopRequireDefault(require("fs"));
_fs = function () {
return data;
};
return data;
}
function _path() {
const data = _interopRequireDefault(require("path"));
_path = function () {
return data;
};
return data;
}
function _resolveFrom() {
const data = _interopRequireDefault(require("resolve-from"));
_resolveFrom = function () {
return data;
};
return data;
}
function _resolveWorkspaceRoot() {
const data = require("resolve-workspace-root");
_resolveWorkspaceRoot = function () {
return data;
};
return data;
}
function _env() {
const data = require("./env");
_env = function () {
return data;
};
return data;
}
function _extensions() {
const data = require("./extensions");
_extensions = function () {
return data;
};
return data;
}
function _Config() {
const data = require("../Config");
_Config = function () {
return data;
};
return data;
}
function _Errors() {
const data = require("../Errors");
_Errors = function () {
return data;
};
return data;
}
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// https://github.com/facebook/create-react-app/blob/9750738cce89a967cc71f28390daf5d4311b193c/packages/react-scripts/config/paths.js#L22
function ensureSlash(inputPath, needsSlash) {
const hasSlash = inputPath.endsWith('/');
if (hasSlash && !needsSlash) {
return inputPath.substring(0, inputPath.length - 1);
} else if (!hasSlash && needsSlash) {
return `${inputPath}/`;
} else {
return inputPath;
}
}
function getPossibleProjectRoot() {
return _fs().default.realpathSync(process.cwd());
}
const nativePlatforms = ['ios', 'android'];
/** @returns the absolute entry file for an Expo project. */
function resolveEntryPoint(projectRoot, {
platform,
pkg = (0, _Config().getPackageJson)(projectRoot)
} = {}) {
const platforms = !platform ? [] : nativePlatforms.includes(platform) ? [platform, 'native'] : [platform];
const extensions = (0, _extensions().getBareExtensions)(platforms);
// If the config doesn't define a custom entry then we want to look at the `package.json`s `main` field, and try again.
const {
main
} = pkg;
if (main && typeof main === 'string') {
// 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.
let entry = getFileWithExtensions(projectRoot, main, extensions);
if (!entry) {
// Allow for paths like: `{ "main": "expo/AppEntry" }`
entry = resolveFromSilentWithExtensions(projectRoot, main, extensions);
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');
}
return entry;
}
// Check for a root index.* file in the project root.
const entry = resolveFromSilentWithExtensions(projectRoot, './index', extensions);
if (entry) {
return entry;
}
try {
// If none of the default files exist then we will attempt to use the main Expo entry point.
// This requires `expo` to be installed in the project to work as it will use `node_module/expo/AppEntry.js`
// Doing this enables us to create a bare minimum Expo project.
// 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.
return (0, _resolveFrom().default)(projectRoot, 'expo/AppEntry');
} catch {
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');
}
}
// Resolve from but with the ability to resolve like a bundler
function resolveFromSilentWithExtensions(fromDirectory, moduleId, extensions) {
for (const extension of extensions) {
const modulePath = _resolveFrom().default.silent(fromDirectory, `${moduleId}.${extension}`);
if (modulePath?.endsWith(extension)) {
return modulePath;
}
}
return _resolveFrom().default.silent(fromDirectory, moduleId) || null;
}
// Statically attempt to resolve a module but with the ability to resolve like a bundler.
// This won't use node module resolution.
function getFileWithExtensions(fromDirectory, moduleId, extensions) {
const modulePath = _path().default.join(fromDirectory, moduleId);
if (_fs().default.existsSync(modulePath)) {
return modulePath;
}
for (const extension of extensions) {
const modulePath = _path().default.join(fromDirectory, `${moduleId}.${extension}`);
if (_fs().default.existsSync(modulePath)) {
return modulePath;
}
}
return null;
}
/** Get the Metro server root, when working in monorepos */
function getMetroServerRoot(projectRoot) {
if (_env().env.EXPO_NO_METRO_WORKSPACE_ROOT) {
return projectRoot;
}
return (0, _resolveWorkspaceRoot().resolveWorkspaceRoot)(projectRoot) ?? projectRoot;
}
/**
* Get the workspace globs for Metro's watchFolders.
* @note This does not traverse the monorepo, and should be used with `getMetroServerRoot`
*/
function getMetroWorkspaceGlobs(monorepoRoot) {
return (0, _resolveWorkspaceRoot().getWorkspaceGlobs)(monorepoRoot);
}
/**
* Convert an absolute entry point to a server or project root relative filepath.
* This is useful on Android where the entry point is an absolute path.
*/
function convertEntryPointToRelative(projectRoot, absolutePath) {
// The project root could be using a different root on MacOS (`/var` vs `/private/var`)
// We need to make sure to get the non-symlinked path to the server or project root.
return _path().default.relative(_fs().default.realpathSync(getMetroServerRoot(projectRoot)), _fs().default.realpathSync(absolutePath));
}
/**
* Resolve the entry point relative to either the server or project root.
* This relative entry path should be used to pass non-absolute paths to Metro,
* accounting for possible monorepos and keeping the cache sharable (no absolute paths).
*/
const resolveRelativeEntryPoint = (projectRoot, options) => {
return convertEntryPointToRelative(projectRoot, resolveEntryPoint(projectRoot, options));
};
exports.resolveRelativeEntryPoint = resolveRelativeEntryPoint;
//# sourceMappingURL=paths.js.map

1
node_modules/@expo/config/build/paths/paths.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,8 @@
import { ConfigPlugin } from '@expo/config-plugins';
/**
* Resolves static plugins array as config plugin functions.
*
* @param config
* @param projectRoot
*/
export declare const withConfigPlugins: ConfigPlugin<boolean>;

View File

@@ -0,0 +1,44 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.withConfigPlugins = void 0;
function _configPlugins() {
const data = require("@expo/config-plugins");
_configPlugins = function () {
return data;
};
return data;
}
function _Serialize() {
const data = require("../Serialize");
_Serialize = function () {
return data;
};
return data;
}
/**
* Resolves static plugins array as config plugin functions.
*
* @param config
* @param projectRoot
*/
const withConfigPlugins = (config, skipPlugins) => {
// @ts-ignore: plugins not on config type yet -- TODO
if (!Array.isArray(config.plugins) || !config.plugins?.length) {
return config;
}
if (!skipPlugins) {
// Resolve and evaluate plugins
// @ts-ignore: TODO: add plugins to the config schema
config = (0, _configPlugins().withPlugins)(config, config.plugins);
} else {
// Delete the plugins array in case someone added functions or other values which cannot be automatically serialized.
delete config.plugins;
}
// plugins aren't serialized by default, serialize the plugins after resolving them.
return (0, _Serialize().serializeAfterStaticPlugins)(config);
};
exports.withConfigPlugins = withConfigPlugins;
//# sourceMappingURL=withConfigPlugins.js.map

View File

@@ -0,0 +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 { ConfigPlugin, 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":";;;;;;AAAA,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":[]}

View File

@@ -0,0 +1,13 @@
import { ConfigPlugin } from '@expo/config-plugins';
import { ConfigFilePaths } from '../Config.types';
export declare const EXPO_DEBUG: boolean;
/**
* Adds the _internal object.
*
* @param config
* @param projectRoot
*/
export declare const withInternal: ConfigPlugin<{
projectRoot: string;
packageJsonPath?: string;
} & Partial<ConfigFilePaths>>;

View File

@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.withInternal = exports.EXPO_DEBUG = void 0;
function _getenv() {
const data = require("getenv");
_getenv = function () {
return data;
};
return data;
}
const EXPO_DEBUG = exports.EXPO_DEBUG = (0, _getenv().boolish)('EXPO_DEBUG', false);
/**
* Adds the _internal object.
*
* @param config
* @param projectRoot
*/
const withInternal = (config, internals) => {
if (!config._internal) {
config._internal = {};
}
config._internal = {
isDebug: EXPO_DEBUG,
...config._internal,
...internals
};
return config;
};
exports.withInternal = withInternal;
//# sourceMappingURL=withInternal.js.map

View File

@@ -0,0 +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 { ConfigPlugin } from '@expo/config-plugins';\nimport { boolish } from 'getenv';\n\nimport { 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":[]}

View File

@@ -0,0 +1 @@
export declare function getRootPackageJsonPath(projectRoot: string): string;

35
node_modules/@expo/config/build/resolvePackageJson.js generated vendored Normal file
View File

@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getRootPackageJsonPath = getRootPackageJsonPath;
function _fs() {
const data = require("fs");
_fs = function () {
return data;
};
return data;
}
function _path() {
const data = require("path");
_path = function () {
return data;
};
return data;
}
function _Errors() {
const data = require("./Errors");
_Errors = function () {
return data;
};
return data;
}
function getRootPackageJsonPath(projectRoot) {
const packageJsonPath = (0, _path().join)(projectRoot, 'package.json');
if (!(0, _fs().existsSync)(packageJsonPath)) {
throw new (_Errors().ConfigError)(`The expected package.json path: ${packageJsonPath} does not exist`, 'MODULE_NOT_FOUND');
}
return packageJsonPath;
}
//# sourceMappingURL=resolvePackageJson.js.map

View File

@@ -0,0 +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":[]}