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

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,i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AC,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