@expo/fingerprint 0.20.13 → 0.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/build/Config.js +69 -44
  2. package/build/Config.js.map +1 -1
  3. package/build/Dedup.js +82 -36
  4. package/build/Dedup.js.map +1 -1
  5. package/build/ExpoConfig.d.ts +11 -2
  6. package/build/ExpoConfig.js +118 -34
  7. package/build/ExpoConfig.js.map +1 -1
  8. package/build/ExpoConfigLoader.d.ts +41 -0
  9. package/build/ExpoConfigLoader.js +185 -145
  10. package/build/ExpoConfigLoader.js.map +1 -1
  11. package/build/ExpoResolver.js +77 -43
  12. package/build/ExpoResolver.js.map +1 -1
  13. package/build/Fingerprint.js +67 -76
  14. package/build/Fingerprint.js.map +1 -1
  15. package/build/Fingerprint.types.d.ts +98 -5
  16. package/build/Fingerprint.types.js +6 -3
  17. package/build/Fingerprint.types.js.map +1 -1
  18. package/build/Options.d.ts +1 -2
  19. package/build/Options.js +101 -51
  20. package/build/Options.js.map +1 -1
  21. package/build/Presets.d.ts +26 -0
  22. package/build/Presets.js +50 -0
  23. package/build/Presets.js.map +1 -0
  24. package/build/ProjectWorkflow.js +129 -67
  25. package/build/ProjectWorkflow.js.map +1 -1
  26. package/build/Sort.js +30 -16
  27. package/build/Sort.js.map +1 -1
  28. package/build/hash/FileHookTransform.js +26 -20
  29. package/build/hash/FileHookTransform.js.map +1 -1
  30. package/build/hash/Hash.d.ts +8 -1
  31. package/build/hash/Hash.js +208 -116
  32. package/build/hash/Hash.js.map +1 -1
  33. package/build/hash/ReactImportsPatcher.js +39 -27
  34. package/build/hash/ReactImportsPatcher.js.map +1 -1
  35. package/build/index.js +40 -22
  36. package/build/index.js.map +1 -1
  37. package/build/sourcer/AutolinkingConfig.d.ts +19 -0
  38. package/build/sourcer/AutolinkingConfig.js +159 -0
  39. package/build/sourcer/AutolinkingConfig.js.map +1 -0
  40. package/build/sourcer/Bare.js +192 -94
  41. package/build/sourcer/Bare.js.map +1 -1
  42. package/build/sourcer/Expo.d.ts +3 -2
  43. package/build/sourcer/Expo.js +264 -121
  44. package/build/sourcer/Expo.js.map +1 -1
  45. package/build/sourcer/Packages.d.ts +4 -3
  46. package/build/sourcer/Packages.js +83 -23
  47. package/build/sourcer/Packages.js.map +1 -1
  48. package/build/sourcer/PatchPackage.js +32 -14
  49. package/build/sourcer/PatchPackage.js.map +1 -1
  50. package/build/sourcer/SourceSkips.d.ts +27 -2
  51. package/build/sourcer/SourceSkips.js +65 -48
  52. package/build/sourcer/SourceSkips.js.map +1 -1
  53. package/build/sourcer/Sourcer.js +57 -38
  54. package/build/sourcer/Sourcer.js.map +1 -1
  55. package/build/sourcer/Utils.d.ts +14 -0
  56. package/build/sourcer/Utils.js +113 -41
  57. package/build/sourcer/Utils.js.map +1 -1
  58. package/build/types/module.d.ts +7 -0
  59. package/build/utils/Concurrency.js +29 -22
  60. package/build/utils/Concurrency.js.map +1 -1
  61. package/build/utils/Path.d.ts +5 -0
  62. package/build/utils/Path.js +138 -75
  63. package/build/utils/Path.js.map +1 -1
  64. package/build/utils/Predicates.js +11 -3
  65. package/build/utils/Predicates.js.map +1 -1
  66. package/build/utils/Profile.js +29 -20
  67. package/build/utils/Profile.js.map +1 -1
  68. package/build/utils/SpawnIPC.js +41 -16
  69. package/build/utils/SpawnIPC.js.map +1 -1
  70. package/cli/build/cli.js +94 -60
  71. package/cli/build/cli.js.map +1 -0
  72. package/cli/build/commands/diffFingerprints.js +76 -53
  73. package/cli/build/commands/diffFingerprints.js.map +1 -0
  74. package/cli/build/commands/generateFingerprint.js +129 -72
  75. package/cli/build/commands/generateFingerprint.js.map +1 -0
  76. package/cli/build/runLegacyCLIAsync.js +31 -22
  77. package/cli/build/runLegacyCLIAsync.js.map +1 -0
  78. package/cli/build/utils/args.js +110 -67
  79. package/cli/build/utils/args.js.map +1 -0
  80. package/cli/build/utils/errors.js +49 -20
  81. package/cli/build/utils/errors.js.map +1 -0
  82. package/cli/build/utils/log.js +62 -20
  83. package/cli/build/utils/log.js.map +1 -0
  84. package/cli/build/utils/readFingerprintFileAsync.js +25 -9
  85. package/cli/build/utils/readFingerprintFileAsync.js.map +1 -0
  86. package/cli/build/utils/withConsoleDisabledAsync.js +16 -8
  87. package/cli/build/utils/withConsoleDisabledAsync.js.map +1 -0
  88. package/package.json +37 -31
@@ -1,6 +1,47 @@
1
1
  /**
2
2
  * A helper script to load the Expo config and loaded plugins from a project
3
3
  */
4
+ /**
5
+ * A CommonJS module observed while `installModuleCaptureHook()` was active.
6
+ */
7
+ export interface CapturedModule {
8
+ /** The module id (cache key). May diverge from `filename` for virtual modules. */
9
+ id: string;
10
+ /** The filename Node compiled the module under. Authoritative even for transpiled sources. */
11
+ filename: string;
12
+ /** The source content Node executed for the module. */
13
+ content: string;
14
+ }
15
+ /**
16
+ * A config-plugin source produced from a captured module.
17
+ * A module backed by a real file becomes a `file` source.
18
+ * For virtual modules without a physical file in the file system, it becomes a `contents` source
19
+ * carrying the captured body.
20
+ */
21
+ export type LoadedModuleSource = {
22
+ type: 'file';
23
+ path: string;
24
+ } | {
25
+ type: 'contents';
26
+ id: string;
27
+ contents: string;
28
+ };
29
+ /**
30
+ * Observe every CommonJS module compiled while the hook is installed.
31
+ * We hook `Module.prototype._compile` to keep each module's authoritative filename and source
32
+ * content.
33
+ */
34
+ export declare function installModuleCaptureHook(): {
35
+ getCapturedModules: () => CapturedModule[];
36
+ uninstall: () => void;
37
+ };
38
+ /**
39
+ * Turn captured modules into config-plugin sources, dropping ignored paths.
40
+ * A real file becomes a `file` source; a module with no file on disk (virtual / compiled from a
41
+ * string) becomes a `contents` source keyed by its project-relative path so it stays stable across
42
+ * runs. A path that exists but is not a file (e.g. a directory) is skipped.
43
+ */
44
+ export declare function resolveLoadedModuleSourcesAsync(capturedModules: CapturedModule[], projectRoot: string, ignoredPaths: string[]): Promise<LoadedModuleSource[]>;
4
45
  /**
5
46
  * Get the path to the ExpoConfigLoader file.
6
47
  */
@@ -1,207 +1,247 @@
1
- "use strict";
2
1
  /**
3
2
  * A helper script to load the Expo config and loaded plugins from a project
4
- */
5
- var __importDefault = (this && this.__importDefault) || function (mod) {
6
- return (mod && mod.__esModule) ? mod : { "default": mod };
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.getExpoConfigLoaderPath = getExpoConfigLoaderPath;
10
- const promises_1 = __importDefault(require("fs/promises"));
11
- const module_1 = __importDefault(require("module"));
12
- const node_process_1 = __importDefault(require("node:process"));
13
- const path_1 = __importDefault(require("path"));
14
- const resolve_from_1 = __importDefault(require("resolve-from"));
15
- const Options_1 = require("./Options");
16
- const Path_1 = require("./utils/Path");
3
+ */ "use strict";
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ 0 && (module.exports = {
8
+ getExpoConfigLoaderPath: null,
9
+ installModuleCaptureHook: null,
10
+ resolveLoadedModuleSourcesAsync: null
11
+ });
12
+ function _export(target, all) {
13
+ for(var name in all)Object.defineProperty(target, name, {
14
+ enumerable: true,
15
+ get: Object.getOwnPropertyDescriptor(all, name).get
16
+ });
17
+ }
18
+ _export(exports, {
19
+ get getExpoConfigLoaderPath () {
20
+ return getExpoConfigLoaderPath;
21
+ },
22
+ get installModuleCaptureHook () {
23
+ return installModuleCaptureHook;
24
+ },
25
+ get resolveLoadedModuleSourcesAsync () {
26
+ return resolveLoadedModuleSourcesAsync;
27
+ }
28
+ });
29
+ function _env() {
30
+ const data = require("@expo/env");
31
+ _env = function() {
32
+ return data;
33
+ };
34
+ return data;
35
+ }
36
+ function _promises() {
37
+ const data = /*#__PURE__*/ _interop_require_default(require("fs/promises"));
38
+ _promises = function() {
39
+ return data;
40
+ };
41
+ return data;
42
+ }
43
+ function _module() {
44
+ const data = /*#__PURE__*/ _interop_require_default(require("module"));
45
+ _module = function() {
46
+ return data;
47
+ };
48
+ return data;
49
+ }
50
+ function _nodeprocess() {
51
+ const data = /*#__PURE__*/ _interop_require_default(require("node:process"));
52
+ _nodeprocess = function() {
53
+ return data;
54
+ };
55
+ return data;
56
+ }
57
+ function _path() {
58
+ const data = /*#__PURE__*/ _interop_require_default(require("path"));
59
+ _path = function() {
60
+ return data;
61
+ };
62
+ return data;
63
+ }
64
+ function _resolvefrom() {
65
+ const data = /*#__PURE__*/ _interop_require_default(require("resolve-from"));
66
+ _resolvefrom = function() {
67
+ return data;
68
+ };
69
+ return data;
70
+ }
71
+ const _Options = require("./Options");
72
+ const _Path = require("./utils/Path");
73
+ function _interop_require_default(obj) {
74
+ return obj && obj.__esModule ? obj : {
75
+ default: obj
76
+ };
77
+ }
17
78
  async function runAsync(programName, args = []) {
18
79
  if (args[0] == null) {
19
- console.log(`Usage: ${programName} <projectRoot> [ignoredFile]`);
80
+ console.log(`Usage: ${programName} <projectRoot> [ignoredFile] --mode <development|production> [--skipPlugins]`);
20
81
  return;
21
82
  }
22
- const projectRoot = path_1.default.resolve(args[0]);
23
- const ignoredFile = args[1] ? path_1.default.resolve(args[1]) : null;
24
- setNodeEnv('development');
25
- require('@expo/env').load(projectRoot);
26
- const loadedModulesBefore = new Set(Object.keys(module_1.default._cache));
27
- const { getConfig } = require((0, resolve_from_1.default)(path_1.default.resolve(projectRoot), 'expo/config'));
28
- const config = await getConfig(projectRoot, {
29
- skipSDKVersionRequirement: true,
83
+ const projectRoot = _path().default.resolve(args[0]);
84
+ const skipPlugins = args.includes('--skipPlugins');
85
+ const ignoredFileArg = args[1] && !args[1].startsWith('--') ? args[1] : null;
86
+ const ignoredFile = ignoredFileArg ? _path().default.resolve(ignoredFileArg) : null;
87
+ const modeFlagIndex = args.indexOf('--mode');
88
+ const mode = modeFlagIndex >= 0 ? args[modeFlagIndex + 1] : undefined;
89
+ if (mode !== 'development' && mode !== 'production') {
90
+ throw new Error(`Unsupported Expo config mode: ${mode}`);
91
+ }
92
+ (0, _env().consumeConfigEnvMode)();
93
+ globalThis.__DEV__ = mode === 'development';
94
+ (0, _env().loadProjectEnv)(projectRoot, {
95
+ mode
30
96
  });
31
- const virtualModuleNames = new Set();
32
- const loadedModules = [];
33
- // TODO(@kitten): Don't rely on `module._cache` for this over Node loader hooks
34
- // The module cache isn't reflective of real files necessarily
35
- for (const id of Object.keys(module_1.default._cache)) {
36
- if (loadedModulesBefore.has(id)) {
37
- continue;
38
- }
39
- let filename = id;
40
- const mod = module_1.default._cache[id];
41
- if (mod != null && mod.filename != null) {
42
- filename = mod.filename || id;
43
- }
44
- // NOTE(@kitten): Virtual modules may be placed on `module._cache` and we can't rely on the ID to be accurate
45
- // The IDs are also not necessarily paths. We prefer `filename`, and trust they exist, but if the ID mismatches
46
- // with the module name, we use the ID, and ignore the filename entirely
47
- if (filename !== id) {
48
- virtualModuleNames.add(filename);
49
- loadedModules.push(id);
50
- }
51
- else {
52
- loadedModules.push(filename);
53
- }
97
+ const { getCapturedModules, uninstall } = installModuleCaptureHook();
98
+ let config;
99
+ try {
100
+ const { getConfig } = require((0, _resolvefrom().default)(_path().default.resolve(projectRoot), 'expo/config'));
101
+ config = await getConfig(projectRoot, {
102
+ skipSDKVersionRequirement: true,
103
+ skipPlugins
104
+ });
105
+ } finally{
106
+ uninstall();
54
107
  }
55
108
  const ignoredPaths = [
56
109
  ...DEFAULT_CONFIG_LOADING_IGNORE_PATHS,
57
- ...(await loadIgnoredPathsAsync(ignoredFile)),
110
+ ...await loadIgnoredPathsAsync(ignoredFile)
58
111
  ];
59
- const filteredLoadedModules = loadedModules.filter((modulePath) => !virtualModuleNames.has(modulePath));
60
- const existingLoadedModules = (await Promise.all(filteredLoadedModules.map(async (modulePath) => {
61
- const relativePath = path_1.default.relative(projectRoot, modulePath);
62
- if ((0, Path_1.isIgnoredPath)(relativePath, ignoredPaths)) {
63
- return null;
64
- }
65
- try {
66
- const stat = await promises_1.default.stat(modulePath);
67
- if (!stat.isFile()) {
68
- return null;
69
- }
70
- return relativePath;
71
- }
72
- catch (error) {
73
- // Filter out virtual paths / non-existent files
74
- if (error.code === 'ENOENT') {
75
- return null;
76
- }
77
- throw error;
78
- }
79
- }))).filter((modulePath) => modulePath != null);
112
+ const loadedModules = await resolveLoadedModuleSourcesAsync(getCapturedModules(), projectRoot, ignoredPaths);
80
113
  const result = JSON.stringify({
81
- config,
82
- loadedModules: existingLoadedModules,
114
+ // The plugins-skipped pass only contributes its module list to the diff; its config is unused.
115
+ config: skipPlugins ? null : config,
116
+ loadedModules
83
117
  });
84
- if (node_process_1.default.send) {
85
- node_process_1.default.send(result);
86
- }
87
- else {
118
+ if (_nodeprocess().default.send) {
119
+ _nodeprocess().default.send(result);
120
+ } else {
88
121
  console.log(result);
89
122
  }
90
123
  }
91
124
  // If running from the command line
92
125
  if (require.main?.filename === __filename) {
93
- (async () => {
94
- const programIndex = node_process_1.default.argv.findIndex((arg) => arg === __filename);
95
- const programName = node_process_1.default.argv[programIndex] ?? __filename;
126
+ (async ()=>{
127
+ const programIndex = _nodeprocess().default.argv.findIndex((arg)=>arg === __filename);
128
+ const programName = _nodeprocess().default.argv[programIndex] ?? __filename;
96
129
  try {
97
- await runAsync(programName, node_process_1.default.argv.slice(programIndex + 1));
98
- }
99
- catch (e) {
130
+ await runAsync(programName, _nodeprocess().default.argv.slice(programIndex + 1));
131
+ } catch (e) {
100
132
  console.error('Uncaught Error', e);
101
- node_process_1.default.exit(1);
133
+ _nodeprocess().default.exit(1);
102
134
  }
103
135
  })();
104
136
  }
105
137
  /**
106
138
  * Load the generated ignored paths file from caller and remove the file after loading
107
- */
108
- async function loadIgnoredPathsAsync(ignoredFile) {
139
+ */ async function loadIgnoredPathsAsync(ignoredFile) {
109
140
  if (!ignoredFile) {
110
- return Options_1.DEFAULT_IGNORE_PATHS;
141
+ return _Options.DEFAULT_IGNORE_PATHS;
111
142
  }
112
143
  const ignorePaths = [];
113
144
  try {
114
- const fingerprintIgnore = await promises_1.default.readFile(ignoredFile, 'utf8');
145
+ const fingerprintIgnore = await _promises().default.readFile(ignoredFile, 'utf8');
115
146
  const fingerprintIgnoreLines = fingerprintIgnore.split('\n');
116
- for (const line of fingerprintIgnoreLines) {
147
+ for (const line of fingerprintIgnoreLines){
117
148
  const trimmedLine = line.trim();
118
149
  if (trimmedLine) {
119
150
  ignorePaths.push(trimmedLine);
120
151
  }
121
152
  }
122
- }
123
- catch { }
153
+ } catch {}
124
154
  return ignorePaths;
125
155
  }
126
- /**
127
- * Get the path to the ExpoConfigLoader file.
128
- */
129
- function getExpoConfigLoaderPath() {
130
- return path_1.default.join(__dirname, 'ExpoConfigLoader.js');
156
+ function installModuleCaptureHook() {
157
+ const moduleProto = _module().default.prototype;
158
+ const capturedModules = [];
159
+ const originalCompile = moduleProto._compile;
160
+ moduleProto._compile = function(content, filename) {
161
+ capturedModules.push({
162
+ id: this.id ?? filename,
163
+ filename,
164
+ content
165
+ });
166
+ return originalCompile.call(this, content, filename);
167
+ };
168
+ return {
169
+ getCapturedModules: ()=>capturedModules,
170
+ uninstall: ()=>{
171
+ moduleProto._compile = originalCompile;
172
+ }
173
+ };
131
174
  }
132
- /**
133
- * Set the environment to production or development
134
- * Replicates the code from `@expo/cli` to ensure the same environment is set.
135
- */
136
- function setNodeEnv(mode) {
137
- node_process_1.default.env.NODE_ENV = node_process_1.default.env.NODE_ENV || mode;
138
- node_process_1.default.env.BABEL_ENV = node_process_1.default.env.BABEL_ENV || node_process_1.default.env.NODE_ENV;
139
- // @ts-expect-error: Add support for external React libraries being loaded in the same process.
140
- globalThis.__DEV__ = node_process_1.default.env.NODE_ENV !== 'production';
175
+ async function resolveLoadedModuleSourcesAsync(capturedModules, projectRoot, ignoredPaths) {
176
+ const seen = new Set();
177
+ const ignoredPathMatchObjects = (0, _Path.buildPathMatchObjects)(ignoredPaths);
178
+ const candidates = capturedModules.map(({ filename, content })=>({
179
+ relativePath: (0, _Path.toPosixPath)(_path().default.relative(projectRoot, filename)),
180
+ filename,
181
+ content
182
+ })).filter(({ relativePath })=>{
183
+ if (seen.has(relativePath) || (0, _Path.isIgnoredPathWithMatchObjects)(relativePath, ignoredPathMatchObjects)) {
184
+ return false;
185
+ }
186
+ seen.add(relativePath);
187
+ return true;
188
+ });
189
+ const sources = await Promise.all(candidates.map(async ({ relativePath, filename, content })=>{
190
+ try {
191
+ const stat = await _promises().default.stat(filename);
192
+ return stat.isFile() ? {
193
+ type: 'file',
194
+ path: relativePath
195
+ } : null;
196
+ } catch (error) {
197
+ if (error.code === 'ENOENT') {
198
+ return {
199
+ type: 'contents',
200
+ id: relativePath,
201
+ contents: content
202
+ };
203
+ }
204
+ throw error;
205
+ }
206
+ }));
207
+ return sources.filter((source)=>source !== null);
141
208
  }
142
- // Ignore default javascript files when calling `getConfig()`
209
+ function getExpoConfigLoaderPath() {
210
+ return _path().default.join(__dirname, 'ExpoConfigLoader.js');
211
+ }
212
+ // Ignore known non-native packages loaded while applying config plugins, which the plugins-skipped
213
+ // diff can't drop since they only load during plugin application.
143
214
  const DEFAULT_CONFIG_LOADING_IGNORE_PATHS = [
144
- // We don't want to include the whole project package.json from the ExpoConfigLoader phase.
145
- 'package.json',
146
- '**/node_modules/@babel/**/*',
147
215
  '**/node_modules/@expo/**/*',
148
- '**/node_modules/@jridgewell/**/*',
149
- '**/node_modules/cross-spawn/**/*',
150
- '**/node_modules/isexe/**/*',
151
- '**/node_modules/shebang-command/**/*',
152
- '**/node_modules/shebang-regex/**/*',
153
- '**/node_modules/semver/**/*',
154
- '**/node_modules/slugify/**/*',
155
- '**/node_modules/typescript/**/*',
156
- '**/node_modules/expo/config/**/*',
157
- '**/node_modules/expo/config.js',
158
- '**/node_modules/expo/config-plugins.js',
159
216
  `**/node_modules/{${[
160
- 'ajv',
161
- 'ajv-formats',
162
- 'ajv-keywords',
163
217
  'ansi-styles',
164
218
  'base64-js',
165
219
  'big-integer',
166
220
  'bplist-creator',
167
221
  'chalk',
222
+ 'cross-spawn',
168
223
  'debug',
169
- 'dotenv',
170
- 'dotenv-expand',
171
- 'escape-string-regexp',
172
- 'getenv',
173
- 'graceful-fs',
174
- 'fast-deep-equal',
175
- 'fast-uri',
176
224
  'has-flag',
177
- 'imurmurhash',
225
+ 'isexe',
178
226
  'jimp-compact',
179
- 'js-tokens',
180
- 'json5',
181
- 'json-schema-traverse',
182
227
  'ms',
183
228
  'parse-png',
184
229
  'path-key',
185
- 'picocolors',
186
230
  'plist',
187
231
  'pngjs',
188
- 'lines-and-columns',
189
- 'require-from-string',
190
- 'resolve-from',
191
232
  'sax',
192
- 'schema-utils',
193
- 'signal-exit',
233
+ 'semver',
234
+ 'shebang-command',
235
+ 'shebang-regex',
194
236
  'simple-plist',
195
237
  'stream-buffers',
196
- 'sucrase',
197
238
  'supports-color',
198
- 'ts-interface-checker',
199
- 'write-file-atomic',
200
- 'xml2js',
201
- 'xmlbuilder',
202
- 'which',
203
239
  'uuid',
240
+ 'which',
204
241
  'xcode',
205
- ].join(',')}}/**/*`,
242
+ 'xml2js',
243
+ 'xmlbuilder'
244
+ ].join(',')}}/**/*`
206
245
  ];
207
- //# sourceMappingURL=ExpoConfigLoader.js.map
246
+
247
+ //# sourceMappingURL=ExpoConfigLoader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoConfigLoader.js","sourceRoot":"","sources":["../src/ExpoConfigLoader.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;AAiJH,0DAEC;AAjJD,2DAA6B;AAC7B,oDAA4B;AAC5B,gEAAmC;AACnC,gDAAwB;AACxB,gEAAuC;AAEvC,uCAAiD;AACjD,uCAA6C;AAE7C,KAAK,UAAU,QAAQ,CAAC,WAAmB,EAAE,OAAiB,EAAE;IAC9D,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,UAAU,WAAW,8BAA8B,CAAC,CAAC;QACjE,OAAO;IACT,CAAC;IAED,MAAM,WAAW,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CA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;QACV,UAAU;QACV,aAAa;QACb,cAAc;QACd,WAAW;QACX,OAAO;QACP,sBAAsB;QACtB,IAAI;QACJ,WAAW;QACX,UAAU;QACV,YAAY;QACZ,OAAO;QACP,OAAO;QACP,mBAAmB;QACnB,qBAAqB;QACrB,cAAc;QACd,KAAK;QACL,cAAc;QACd,aAAa;QACb,cAAc;QACd,gBAAgB;QAChB,SAAS;QACT,gBAAgB;QAChB,sBAAsB;QACtB,mBAAmB;QACnB,QAAQ;QACR,YAAY;QACZ,OAAO;QACP,MAAM;QACN,OAAO;KACR,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ;CACpB,CAAC"}
1
+ {"version":3,"sources":["ExpoConfigLoader.ts"],"sourcesContent":[null],"names":["getExpoConfigLoaderPath","installModuleCaptureHook","resolveLoadedModuleSourcesAsync","runAsync","programName","args","console","log","projectRoot","path","resolve","skipPlugins","includes","ignoredFileArg","startsWith","ignoredFile","modeFlagIndex","indexOf","mode","undefined","Error","consumeConfigEnvMode","globalThis","__DEV__","loadProjectEnv","getCapturedModules","uninstall","config","getConfig","require","resolveFrom","skipSDKVersionRequirement","ignoredPaths","DEFAULT_CONFIG_LOADING_IGNORE_PATHS","loadIgnoredPathsAsync","loadedModules","result","JSON","stringify","process","send","main","filename","__filename","programIndex","argv","findIndex","arg","slice","e","error","exit","DEFAULT_IGNORE_PATHS","ignorePaths","fingerprintIgnore","fs","readFile","fingerprintIgnoreLines","split","line","trimmedLine","trim","push","moduleProto","module","prototype","capturedModules","originalCompile","_compile","content","id","call","seen","Set","ignoredPathMatchObjects","buildPathMatchObjects","candidates","map","relativePath","toPosixPath","relative","filter","has","isIgnoredPathWithMatchObjects","add","sources","Promise","all","stat","isFile","type","code","contents","source","join","__dirname"],"mappings":"AAAA;;CAEC;;;;;;;;;;;;;;;;QAoNeA;eAAAA;;QA3EAC;eAAAA;;QA6BMC;eAAAA;;;;yBApK+B;;;;;;;gEACtC;;;;;;;gEACI;;;;;;;gEACC;;;;;;;gEACH;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AAS7F;IACd,OAAOS,eAAI,CAACqF,IAAI,CAACC,WAAW;AAC9B;AAEA,mGAAmG;AACnG,kEAAkE;AAClE,MAAM9D,sCAAsC;IAC1C;IACA,CAAC,iBAAiB,EAAE;QAClB;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD,CAAC6D,IAAI,CAAC,KAAK,MAAM,CAAC;CACpB"}
@@ -1,32 +1,76 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.resolveExpoVersion = resolveExpoVersion;
7
- exports.resolveExpoAutolinkingPackageRoot = resolveExpoAutolinkingPackageRoot;
8
- exports.resolveExpoAutolinkingCliPath = resolveExpoAutolinkingCliPath;
9
- exports.resolveExpoAutolinkingVersion = resolveExpoAutolinkingVersion;
10
- exports.resolveExpoConfigPluginsPackagePath = resolveExpoConfigPluginsPackagePath;
11
- exports.satisfyExpoVersion = satisfyExpoVersion;
12
- const path_1 = __importDefault(require("path"));
13
- const resolve_from_1 = __importDefault(require("resolve-from"));
14
- const semver_1 = __importDefault(require("semver"));
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ 0 && (module.exports = {
6
+ resolveExpoAutolinkingCliPath: null,
7
+ resolveExpoAutolinkingPackageRoot: null,
8
+ resolveExpoAutolinkingVersion: null,
9
+ resolveExpoConfigPluginsPackagePath: null,
10
+ resolveExpoVersion: null,
11
+ satisfyExpoVersion: null
12
+ });
13
+ function _export(target, all) {
14
+ for(var name in all)Object.defineProperty(target, name, {
15
+ enumerable: true,
16
+ get: Object.getOwnPropertyDescriptor(all, name).get
17
+ });
18
+ }
19
+ _export(exports, {
20
+ get resolveExpoAutolinkingCliPath () {
21
+ return resolveExpoAutolinkingCliPath;
22
+ },
23
+ get resolveExpoAutolinkingPackageRoot () {
24
+ return resolveExpoAutolinkingPackageRoot;
25
+ },
26
+ get resolveExpoAutolinkingVersion () {
27
+ return resolveExpoAutolinkingVersion;
28
+ },
29
+ get resolveExpoConfigPluginsPackagePath () {
30
+ return resolveExpoConfigPluginsPackagePath;
31
+ },
32
+ get resolveExpoVersion () {
33
+ return resolveExpoVersion;
34
+ },
35
+ get satisfyExpoVersion () {
36
+ return satisfyExpoVersion;
37
+ }
38
+ });
39
+ function _path() {
40
+ const data = /*#__PURE__*/ _interop_require_default(require("path"));
41
+ _path = function() {
42
+ return data;
43
+ };
44
+ return data;
45
+ }
46
+ function _resolvefrom() {
47
+ const data = /*#__PURE__*/ _interop_require_default(require("resolve-from"));
48
+ _resolvefrom = function() {
49
+ return data;
50
+ };
51
+ return data;
52
+ }
53
+ function _semver() {
54
+ const data = /*#__PURE__*/ _interop_require_default(require("semver"));
55
+ _semver = function() {
56
+ return data;
57
+ };
58
+ return data;
59
+ }
60
+ function _interop_require_default(obj) {
61
+ return obj && obj.__esModule ? obj : {
62
+ default: obj
63
+ };
64
+ }
15
65
  let cachedExpoAutolinkingPackageRoot = null;
16
- /**
17
- * Resolve the version of `expo` package in the project.
18
- */
19
66
  function resolveExpoVersion(projectRoot) {
20
- const expoPackageJsonPath = resolve_from_1.default.silent(projectRoot, 'expo/package.json');
67
+ const expoPackageJsonPath = _resolvefrom().default.silent(projectRoot, 'expo/package.json');
21
68
  if (expoPackageJsonPath) {
22
69
  const expoPackageJson = require(expoPackageJsonPath);
23
70
  return expoPackageJson.version;
24
71
  }
25
72
  return null;
26
73
  }
27
- /**
28
- * Resolve the package root of `expo-modules-autolinking` package in the project.
29
- */
30
74
  function resolveExpoAutolinkingPackageRoot(projectRoot) {
31
75
  if (cachedExpoAutolinkingPackageRoot) {
32
76
  const [cachedProjectRoot, cachedPackageRoot] = cachedExpoAutolinkingPackageRoot;
@@ -34,52 +78,42 @@ function resolveExpoAutolinkingPackageRoot(projectRoot) {
34
78
  return cachedPackageRoot;
35
79
  }
36
80
  }
37
- const expoPackageRoot = resolve_from_1.default.silent(projectRoot, 'expo/package.json');
38
- const autolinkingPackageJsonPath = resolve_from_1.default.silent(expoPackageRoot ?? projectRoot, 'expo-modules-autolinking/package.json');
81
+ const expoPackageRoot = _resolvefrom().default.silent(projectRoot, 'expo/package.json');
82
+ const autolinkingPackageJsonPath = _resolvefrom().default.silent(expoPackageRoot ?? projectRoot, 'expo-modules-autolinking/package.json');
39
83
  if (autolinkingPackageJsonPath) {
40
- const autolinkingPackageRoot = path_1.default.dirname(autolinkingPackageJsonPath);
41
- cachedExpoAutolinkingPackageRoot = [projectRoot, autolinkingPackageRoot];
84
+ const autolinkingPackageRoot = _path().default.dirname(autolinkingPackageJsonPath);
85
+ cachedExpoAutolinkingPackageRoot = [
86
+ projectRoot,
87
+ autolinkingPackageRoot
88
+ ];
42
89
  return autolinkingPackageRoot;
43
90
  }
44
91
  return null;
45
92
  }
46
- /**
47
- * Resolve the path to the `expo-modules-autolinking` CLI in the project.
48
- * @throws If the package is not found in the project.
49
- */
50
93
  function resolveExpoAutolinkingCliPath(projectRoot) {
51
94
  const autolinkingPackageRoot = resolveExpoAutolinkingPackageRoot(projectRoot);
52
95
  if (autolinkingPackageRoot == null) {
53
96
  throw new Error('Cannot resolve expo-modules-autolinking package in the project.');
54
97
  }
55
- return path_1.default.join(autolinkingPackageRoot, 'bin', 'expo-modules-autolinking.js');
98
+ return _path().default.join(autolinkingPackageRoot, 'bin', 'expo-modules-autolinking.js');
56
99
  }
57
- /**
58
- * Resolve the version of `expo-modules-autolinking` package in the project.
59
- */
60
100
  function resolveExpoAutolinkingVersion(projectRoot) {
61
101
  const autolinkingPackageRoot = resolveExpoAutolinkingPackageRoot(projectRoot);
62
102
  if (autolinkingPackageRoot) {
63
- const autolinkingPackageJson = require(path_1.default.join(autolinkingPackageRoot, 'package.json'));
103
+ const autolinkingPackageJson = require(_path().default.join(autolinkingPackageRoot, 'package.json'));
64
104
  return autolinkingPackageJson.version;
65
105
  }
66
106
  return null;
67
107
  }
68
- /**
69
- * Resolve the package root of `expo/config-plugins` package in the project.
70
- */
71
108
  function resolveExpoConfigPluginsPackagePath(projectRoot) {
72
- return resolve_from_1.default.silent(projectRoot, 'expo/config-plugins') ?? null;
109
+ return _resolvefrom().default.silent(projectRoot, 'expo/config-plugins') ?? null;
73
110
  }
74
- /**
75
- * Resolve the `expo` package version and check if it satisfies the provided semver range.
76
- * @returns `null` if the `expo` package is not found in the project.
77
- */
78
111
  function satisfyExpoVersion(projectRoot, range) {
79
112
  const expoVersion = resolveExpoVersion(projectRoot);
80
113
  if (expoVersion) {
81
- return semver_1.default.satisfies(expoVersion, range);
114
+ return _semver().default.satisfies(expoVersion, range);
82
115
  }
83
116
  return null;
84
117
  }
85
- //# sourceMappingURL=ExpoResolver.js.map
118
+
119
+ //# sourceMappingURL=ExpoResolver.js.map