@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.
- package/build/Config.js +69 -44
- package/build/Config.js.map +1 -1
- package/build/Dedup.js +82 -36
- package/build/Dedup.js.map +1 -1
- package/build/ExpoConfig.d.ts +11 -2
- package/build/ExpoConfig.js +118 -34
- package/build/ExpoConfig.js.map +1 -1
- package/build/ExpoConfigLoader.d.ts +41 -0
- package/build/ExpoConfigLoader.js +185 -145
- package/build/ExpoConfigLoader.js.map +1 -1
- package/build/ExpoResolver.js +77 -43
- package/build/ExpoResolver.js.map +1 -1
- package/build/Fingerprint.js +67 -76
- package/build/Fingerprint.js.map +1 -1
- package/build/Fingerprint.types.d.ts +98 -5
- package/build/Fingerprint.types.js +6 -3
- package/build/Fingerprint.types.js.map +1 -1
- package/build/Options.d.ts +1 -2
- package/build/Options.js +101 -51
- package/build/Options.js.map +1 -1
- package/build/Presets.d.ts +26 -0
- package/build/Presets.js +50 -0
- package/build/Presets.js.map +1 -0
- package/build/ProjectWorkflow.js +129 -67
- package/build/ProjectWorkflow.js.map +1 -1
- package/build/Sort.js +30 -16
- package/build/Sort.js.map +1 -1
- package/build/hash/FileHookTransform.js +26 -20
- package/build/hash/FileHookTransform.js.map +1 -1
- package/build/hash/Hash.d.ts +8 -1
- package/build/hash/Hash.js +208 -116
- package/build/hash/Hash.js.map +1 -1
- package/build/hash/ReactImportsPatcher.js +39 -27
- package/build/hash/ReactImportsPatcher.js.map +1 -1
- package/build/index.js +40 -22
- package/build/index.js.map +1 -1
- package/build/sourcer/AutolinkingConfig.d.ts +19 -0
- package/build/sourcer/AutolinkingConfig.js +159 -0
- package/build/sourcer/AutolinkingConfig.js.map +1 -0
- package/build/sourcer/Bare.js +192 -94
- package/build/sourcer/Bare.js.map +1 -1
- package/build/sourcer/Expo.d.ts +3 -2
- package/build/sourcer/Expo.js +264 -121
- package/build/sourcer/Expo.js.map +1 -1
- package/build/sourcer/Packages.d.ts +4 -3
- package/build/sourcer/Packages.js +83 -23
- package/build/sourcer/Packages.js.map +1 -1
- package/build/sourcer/PatchPackage.js +32 -14
- package/build/sourcer/PatchPackage.js.map +1 -1
- package/build/sourcer/SourceSkips.d.ts +27 -2
- package/build/sourcer/SourceSkips.js +65 -48
- package/build/sourcer/SourceSkips.js.map +1 -1
- package/build/sourcer/Sourcer.js +57 -38
- package/build/sourcer/Sourcer.js.map +1 -1
- package/build/sourcer/Utils.d.ts +14 -0
- package/build/sourcer/Utils.js +113 -41
- package/build/sourcer/Utils.js.map +1 -1
- package/build/types/module.d.ts +7 -0
- package/build/utils/Concurrency.js +29 -22
- package/build/utils/Concurrency.js.map +1 -1
- package/build/utils/Path.d.ts +5 -0
- package/build/utils/Path.js +138 -75
- package/build/utils/Path.js.map +1 -1
- package/build/utils/Predicates.js +11 -3
- package/build/utils/Predicates.js.map +1 -1
- package/build/utils/Profile.js +29 -20
- package/build/utils/Profile.js.map +1 -1
- package/build/utils/SpawnIPC.js +41 -16
- package/build/utils/SpawnIPC.js.map +1 -1
- package/cli/build/cli.js +94 -60
- package/cli/build/cli.js.map +1 -0
- package/cli/build/commands/diffFingerprints.js +76 -53
- package/cli/build/commands/diffFingerprints.js.map +1 -0
- package/cli/build/commands/generateFingerprint.js +129 -72
- package/cli/build/commands/generateFingerprint.js.map +1 -0
- package/cli/build/runLegacyCLIAsync.js +31 -22
- package/cli/build/runLegacyCLIAsync.js.map +1 -0
- package/cli/build/utils/args.js +110 -67
- package/cli/build/utils/args.js.map +1 -0
- package/cli/build/utils/errors.js +49 -20
- package/cli/build/utils/errors.js.map +1 -0
- package/cli/build/utils/log.js +62 -20
- package/cli/build/utils/log.js.map +1 -0
- package/cli/build/utils/readFingerprintFileAsync.js +25 -9
- package/cli/build/utils/readFingerprintFileAsync.js.map +1 -0
- package/cli/build/utils/withConsoleDisabledAsync.js +16 -8
- package/cli/build/utils/withConsoleDisabledAsync.js.map +1 -0
- package/package.json +37 -31
package/build/sourcer/Bare.js
CHANGED
|
@@ -1,80 +1,166 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
0 && (module.exports = {
|
|
6
|
+
getBareAndroidSourcesAsync: null,
|
|
7
|
+
getBareIosSourcesAsync: null,
|
|
8
|
+
getCoreAutolinkingSourcesFromExpoAndroid: null,
|
|
9
|
+
getCoreAutolinkingSourcesFromExpoIos: null,
|
|
10
|
+
getCoreAutolinkingSourcesFromRncCliAsync: null,
|
|
11
|
+
getGitIgnoreSourcesAsync: null,
|
|
12
|
+
getPackageJsonScriptSourcesAsync: null
|
|
13
|
+
});
|
|
14
|
+
function _export(target, all) {
|
|
15
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
_export(exports, {
|
|
21
|
+
get getBareAndroidSourcesAsync () {
|
|
22
|
+
return getBareAndroidSourcesAsync;
|
|
23
|
+
},
|
|
24
|
+
get getBareIosSourcesAsync () {
|
|
25
|
+
return getBareIosSourcesAsync;
|
|
26
|
+
},
|
|
27
|
+
get getCoreAutolinkingSourcesFromExpoAndroid () {
|
|
28
|
+
return getCoreAutolinkingSourcesFromExpoAndroid;
|
|
29
|
+
},
|
|
30
|
+
get getCoreAutolinkingSourcesFromExpoIos () {
|
|
31
|
+
return getCoreAutolinkingSourcesFromExpoIos;
|
|
32
|
+
},
|
|
33
|
+
get getCoreAutolinkingSourcesFromRncCliAsync () {
|
|
34
|
+
return getCoreAutolinkingSourcesFromRncCliAsync;
|
|
35
|
+
},
|
|
36
|
+
get getGitIgnoreSourcesAsync () {
|
|
37
|
+
return getGitIgnoreSourcesAsync;
|
|
38
|
+
},
|
|
39
|
+
get getPackageJsonScriptSourcesAsync () {
|
|
40
|
+
return getPackageJsonScriptSourcesAsync;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
function _env() {
|
|
44
|
+
const data = require("@expo/env");
|
|
45
|
+
_env = function() {
|
|
46
|
+
return data;
|
|
47
|
+
};
|
|
48
|
+
return data;
|
|
49
|
+
}
|
|
50
|
+
function _spawnasync() {
|
|
51
|
+
const data = /*#__PURE__*/ _interop_require_default(require("@expo/spawn-async"));
|
|
52
|
+
_spawnasync = function() {
|
|
53
|
+
return data;
|
|
54
|
+
};
|
|
55
|
+
return data;
|
|
56
|
+
}
|
|
57
|
+
function _assert() {
|
|
58
|
+
const data = /*#__PURE__*/ _interop_require_default(require("assert"));
|
|
59
|
+
_assert = function() {
|
|
60
|
+
return data;
|
|
61
|
+
};
|
|
62
|
+
return data;
|
|
63
|
+
}
|
|
64
|
+
function _chalk() {
|
|
65
|
+
const data = /*#__PURE__*/ _interop_require_default(require("chalk"));
|
|
66
|
+
_chalk = function() {
|
|
67
|
+
return data;
|
|
68
|
+
};
|
|
69
|
+
return data;
|
|
70
|
+
}
|
|
71
|
+
function _nodeprocess() {
|
|
72
|
+
const data = /*#__PURE__*/ _interop_require_default(require("node:process"));
|
|
73
|
+
_nodeprocess = function() {
|
|
74
|
+
return data;
|
|
75
|
+
};
|
|
76
|
+
return data;
|
|
77
|
+
}
|
|
78
|
+
function _path() {
|
|
79
|
+
const data = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
80
|
+
_path = function() {
|
|
81
|
+
return data;
|
|
82
|
+
};
|
|
83
|
+
return data;
|
|
84
|
+
}
|
|
85
|
+
function _resolvefrom() {
|
|
86
|
+
const data = /*#__PURE__*/ _interop_require_default(require("resolve-from"));
|
|
87
|
+
_resolvefrom = function() {
|
|
88
|
+
return data;
|
|
89
|
+
};
|
|
90
|
+
return data;
|
|
91
|
+
}
|
|
92
|
+
const _ExpoResolver = require("../ExpoResolver");
|
|
93
|
+
const _Path = require("../utils/Path");
|
|
94
|
+
const _Profile = require("../utils/Profile");
|
|
95
|
+
const _AutolinkingConfig = require("./AutolinkingConfig");
|
|
96
|
+
const _SourceSkips = require("./SourceSkips");
|
|
97
|
+
const _Utils = require("./Utils");
|
|
98
|
+
function _interop_require_default(obj) {
|
|
99
|
+
return obj && obj.__esModule ? obj : {
|
|
100
|
+
default: obj
|
|
101
|
+
};
|
|
102
|
+
}
|
|
24
103
|
const debug = require('debug')('expo:fingerprint:sourcer:Bare');
|
|
25
104
|
async function getBareAndroidSourcesAsync(projectRoot, options) {
|
|
26
105
|
if (options.platforms.includes('android')) {
|
|
27
|
-
const result = await (0,
|
|
106
|
+
const result = await (0, _Utils.getFileBasedHashSourceAsync)(projectRoot, 'android', 'bareNativeDir');
|
|
28
107
|
if (result != null) {
|
|
29
|
-
debug(`Adding bare native dir - ${
|
|
30
|
-
return [
|
|
108
|
+
debug(`Adding bare native dir - ${_chalk().default.dim('android')}`);
|
|
109
|
+
return [
|
|
110
|
+
result
|
|
111
|
+
];
|
|
31
112
|
}
|
|
32
113
|
}
|
|
33
114
|
return [];
|
|
34
115
|
}
|
|
35
116
|
async function getBareIosSourcesAsync(projectRoot, options) {
|
|
36
117
|
if (options.platforms.includes('ios')) {
|
|
37
|
-
const result = await (0,
|
|
118
|
+
const result = await (0, _Utils.getFileBasedHashSourceAsync)(projectRoot, 'ios', 'bareNativeDir');
|
|
38
119
|
if (result != null) {
|
|
39
|
-
debug(`Adding bare native dir - ${
|
|
40
|
-
return [
|
|
120
|
+
debug(`Adding bare native dir - ${_chalk().default.dim('ios')}`);
|
|
121
|
+
return [
|
|
122
|
+
result
|
|
123
|
+
];
|
|
41
124
|
}
|
|
42
125
|
}
|
|
43
126
|
return [];
|
|
44
127
|
}
|
|
45
128
|
async function getPackageJsonScriptSourcesAsync(projectRoot, options) {
|
|
46
|
-
if (options.sourceSkips &
|
|
129
|
+
if (options.sourceSkips & _SourceSkips.SourceSkips.PackageJsonScriptsAll) {
|
|
47
130
|
return [];
|
|
48
131
|
}
|
|
49
132
|
let packageJson;
|
|
50
133
|
try {
|
|
51
|
-
packageJson = require((0,
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
debug(`Unable to read package.json from ${path_1.default.resolve(projectRoot)}/package.json: ` + e);
|
|
134
|
+
packageJson = require((0, _resolvefrom().default)(_path().default.resolve(projectRoot), './package.json'));
|
|
135
|
+
} catch (e) {
|
|
136
|
+
debug(`Unable to read package.json from ${_path().default.resolve(projectRoot)}/package.json: ` + e);
|
|
55
137
|
return [];
|
|
56
138
|
}
|
|
57
139
|
const results = [];
|
|
58
140
|
if (packageJson.scripts) {
|
|
59
|
-
debug(`Adding package.json contents - ${
|
|
141
|
+
debug(`Adding package.json contents - ${_chalk().default.dim('scripts')}`);
|
|
60
142
|
const id = 'packageJson:scripts';
|
|
61
143
|
results.push({
|
|
62
144
|
type: 'contents',
|
|
63
145
|
id,
|
|
64
146
|
contents: normalizePackageJsonScriptSources(packageJson.scripts, options),
|
|
65
|
-
reasons: [
|
|
147
|
+
reasons: [
|
|
148
|
+
id
|
|
149
|
+
]
|
|
66
150
|
});
|
|
67
151
|
}
|
|
68
152
|
return results;
|
|
69
153
|
}
|
|
70
154
|
async function getGitIgnoreSourcesAsync(projectRoot, options) {
|
|
71
|
-
if (options.sourceSkips &
|
|
155
|
+
if (options.sourceSkips & _SourceSkips.SourceSkips.GitIgnore) {
|
|
72
156
|
return [];
|
|
73
157
|
}
|
|
74
|
-
const result = await (0,
|
|
158
|
+
const result = await (0, _Utils.getFileBasedHashSourceAsync)(projectRoot, '.gitignore', 'bareGitIgnore');
|
|
75
159
|
if (result != null) {
|
|
76
|
-
debug(`Adding file - ${
|
|
77
|
-
return [
|
|
160
|
+
debug(`Adding file - ${_chalk().default.dim('.gitignore')}`);
|
|
161
|
+
return [
|
|
162
|
+
result
|
|
163
|
+
];
|
|
78
164
|
}
|
|
79
165
|
return [];
|
|
80
166
|
}
|
|
@@ -83,20 +169,25 @@ async function getCoreAutolinkingSourcesFromRncCliAsync(projectRoot, options, us
|
|
|
83
169
|
return [];
|
|
84
170
|
}
|
|
85
171
|
try {
|
|
86
|
-
const { stdout } = await (0,
|
|
172
|
+
const { stdout } = await (0, _spawnasync().default)('npx', [
|
|
173
|
+
'react-native',
|
|
174
|
+
'config'
|
|
175
|
+
], {
|
|
87
176
|
cwd: projectRoot,
|
|
88
|
-
env: (0,
|
|
177
|
+
env: (0, _env().getOriginalEnv)()
|
|
89
178
|
});
|
|
90
179
|
const config = JSON.parse(stdout);
|
|
91
180
|
const results = await parseCoreAutolinkingSourcesAsync({
|
|
92
181
|
config,
|
|
93
182
|
contentsId: 'rncoreAutolinkingConfig',
|
|
94
|
-
reasons: [
|
|
183
|
+
reasons: [
|
|
184
|
+
'rncoreAutolinking'
|
|
185
|
+
],
|
|
186
|
+
options
|
|
95
187
|
});
|
|
96
188
|
return results;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
debug(chalk_1.default.red(`Error adding react-native core autolinking sources.\n${e}`));
|
|
189
|
+
} catch (e) {
|
|
190
|
+
debug(_chalk().default.red(`Error adding react-native core autolinking sources.\n${e}`));
|
|
100
191
|
return [];
|
|
101
192
|
}
|
|
102
193
|
}
|
|
@@ -105,28 +196,30 @@ async function getCoreAutolinkingSourcesFromExpoAndroid(projectRoot, options, us
|
|
|
105
196
|
return [];
|
|
106
197
|
}
|
|
107
198
|
const args = [
|
|
108
|
-
(0,
|
|
199
|
+
(0, _ExpoResolver.resolveExpoAutolinkingCliPath)(projectRoot),
|
|
109
200
|
'react-native-config',
|
|
110
201
|
'--json',
|
|
111
202
|
'--platform',
|
|
112
|
-
'android'
|
|
203
|
+
'android'
|
|
113
204
|
];
|
|
114
205
|
try {
|
|
115
|
-
const { stdout } = await (0,
|
|
206
|
+
const { stdout } = await (0, _spawnasync().default)('node', args, {
|
|
116
207
|
cwd: projectRoot,
|
|
117
|
-
env: (0,
|
|
208
|
+
env: (0, _env().getOriginalEnv)()
|
|
118
209
|
});
|
|
119
210
|
const config = JSON.parse(stdout);
|
|
120
211
|
const results = await parseCoreAutolinkingSourcesAsync({
|
|
121
212
|
config,
|
|
122
213
|
contentsId: 'rncoreAutolinkingConfig:android',
|
|
123
|
-
reasons: [
|
|
124
|
-
|
|
214
|
+
reasons: [
|
|
215
|
+
'rncoreAutolinkingAndroid'
|
|
216
|
+
],
|
|
217
|
+
options,
|
|
218
|
+
platform: 'android'
|
|
125
219
|
});
|
|
126
220
|
return results;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
debug(chalk_1.default.red(`Error adding react-native core autolinking sources for android.\n${e}`));
|
|
221
|
+
} catch (e) {
|
|
222
|
+
debug(_chalk().default.red(`Error adding react-native core autolinking sources for android.\n${e}`));
|
|
130
223
|
return [];
|
|
131
224
|
}
|
|
132
225
|
}
|
|
@@ -135,81 +228,85 @@ async function getCoreAutolinkingSourcesFromExpoIos(projectRoot, options, useRNC
|
|
|
135
228
|
return [];
|
|
136
229
|
}
|
|
137
230
|
try {
|
|
138
|
-
const { stdout } = await (0,
|
|
139
|
-
(0,
|
|
231
|
+
const { stdout } = await (0, _spawnasync().default)('node', [
|
|
232
|
+
(0, _ExpoResolver.resolveExpoAutolinkingCliPath)(projectRoot),
|
|
140
233
|
'react-native-config',
|
|
141
234
|
'--json',
|
|
142
235
|
'--platform',
|
|
143
|
-
'ios'
|
|
144
|
-
], {
|
|
236
|
+
'ios'
|
|
237
|
+
], {
|
|
238
|
+
cwd: projectRoot,
|
|
239
|
+
env: (0, _env().getOriginalEnv)()
|
|
240
|
+
});
|
|
145
241
|
const config = JSON.parse(stdout);
|
|
146
242
|
const results = await parseCoreAutolinkingSourcesAsync({
|
|
147
243
|
config,
|
|
148
244
|
contentsId: 'rncoreAutolinkingConfig:ios',
|
|
149
|
-
reasons: [
|
|
150
|
-
|
|
245
|
+
reasons: [
|
|
246
|
+
'rncoreAutolinkingIos'
|
|
247
|
+
],
|
|
248
|
+
options,
|
|
249
|
+
platform: 'ios'
|
|
151
250
|
});
|
|
152
251
|
return results;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
debug(chalk_1.default.red(`Error adding react-native core autolinking sources for ios.\n${e}`));
|
|
252
|
+
} catch (e) {
|
|
253
|
+
debug(_chalk().default.red(`Error adding react-native core autolinking sources for ios.\n${e}`));
|
|
156
254
|
return [];
|
|
157
255
|
}
|
|
158
256
|
}
|
|
159
|
-
async function parseCoreAutolinkingSourcesAsync({ config, reasons, contentsId, platform, }) {
|
|
160
|
-
const logTag = platform
|
|
161
|
-
? `react-native core autolinking dir for ${platform}`
|
|
162
|
-
: 'react-native core autolinking dir';
|
|
257
|
+
async function parseCoreAutolinkingSourcesAsync({ config, reasons, contentsId, platform, options }) {
|
|
258
|
+
const logTag = platform ? `react-native core autolinking dir for ${platform}` : 'react-native core autolinking dir';
|
|
163
259
|
const results = [];
|
|
164
|
-
const root = await (0,
|
|
260
|
+
const root = await (0, _Utils.maybeGetRealPathAsync)(config.root);
|
|
165
261
|
const autolinkingConfig = {};
|
|
166
|
-
for (const [depName, depData] of Object.entries(config.dependencies))
|
|
262
|
+
for (const [depName, depData] of Object.entries(config.dependencies)){
|
|
167
263
|
try {
|
|
168
264
|
stripRncoreAutolinkingAbsolutePaths(depData, root);
|
|
169
|
-
const filePath = (0,
|
|
170
|
-
debug(`Adding ${logTag} - ${
|
|
171
|
-
results.push(
|
|
265
|
+
const filePath = (0, _Path.toPosixPath)(depData.root);
|
|
266
|
+
debug(`Adding ${logTag} - ${_chalk().default.dim(filePath)}`);
|
|
267
|
+
results.push(await (0, _Utils.createAutolinkingHashSourceAsync)(root, filePath, reasons, options.nativeModuleSourceType));
|
|
172
268
|
autolinkingConfig[depName] = depData;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
debug(chalk_1.default.red(`Error adding ${logTag} - ${depName}.\n${e}`));
|
|
269
|
+
} catch (e) {
|
|
270
|
+
debug(_chalk().default.red(`Error adding ${logTag} - ${depName}.\n${e}`));
|
|
176
271
|
}
|
|
177
272
|
}
|
|
178
273
|
results.push({
|
|
179
274
|
type: 'contents',
|
|
180
275
|
id: contentsId,
|
|
181
|
-
contents: JSON.stringify(
|
|
182
|
-
|
|
276
|
+
contents: JSON.stringify((0, _Profile.profile)(options, _AutolinkingConfig.normalizeAutolinkingConfig)(autolinkingConfig, {
|
|
277
|
+
stripPaths: !!(options.sourceSkips & _SourceSkips.SourceSkips.AutolinkingConfigPaths),
|
|
278
|
+
roots: [
|
|
279
|
+
root
|
|
280
|
+
]
|
|
281
|
+
})),
|
|
282
|
+
reasons
|
|
183
283
|
});
|
|
184
284
|
return results;
|
|
185
285
|
}
|
|
186
286
|
function stripRncoreAutolinkingAbsolutePaths(dependency, root) {
|
|
187
|
-
(0,
|
|
287
|
+
(0, _assert().default)(dependency.root);
|
|
188
288
|
const dependencyRoot = dependency.root;
|
|
189
|
-
const cmakeDepRoot =
|
|
190
|
-
dependency.root = (0,
|
|
191
|
-
for (const platformData of Object.values(dependency.platforms))
|
|
192
|
-
for (const [key, value] of Object.entries(platformData ?? {}))
|
|
289
|
+
const cmakeDepRoot = _nodeprocess().default.platform === 'win32' ? dependencyRoot.replace(/\\/g, '/') : dependencyRoot;
|
|
290
|
+
dependency.root = (0, _Path.toPosixPath)(_path().default.relative(root, dependencyRoot));
|
|
291
|
+
for (const platformData of Object.values(dependency.platforms)){
|
|
292
|
+
for (const [key, value] of Object.entries(platformData ?? {})){
|
|
193
293
|
let newValue;
|
|
194
|
-
if (
|
|
195
|
-
|
|
294
|
+
if (_nodeprocess().default.platform === 'win32' && [
|
|
295
|
+
'cmakeListsPath',
|
|
296
|
+
'cxxModuleCMakeListsPath'
|
|
297
|
+
].includes(key)) {
|
|
196
298
|
// CMake paths on Windows are serving in slashes,
|
|
197
299
|
// we have to check startsWith with the same slashes.
|
|
198
|
-
newValue = value?.startsWith?.(cmakeDepRoot)
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
newValue = value?.startsWith?.(dependencyRoot)
|
|
204
|
-
? (0, Path_1.toPosixPath)(path_1.default.relative(root, value))
|
|
205
|
-
: value;
|
|
300
|
+
newValue = value?.startsWith?.(cmakeDepRoot) ? (0, _Path.toPosixPath)(_path().default.relative(root, value)) : value;
|
|
301
|
+
} else {
|
|
302
|
+
newValue = value?.startsWith?.(dependencyRoot) ? (0, _Path.toPosixPath)(_path().default.relative(root, value)) : value;
|
|
206
303
|
}
|
|
207
304
|
platformData[key] = newValue;
|
|
208
305
|
}
|
|
209
306
|
}
|
|
210
307
|
}
|
|
211
308
|
function normalizePackageJsonScriptSources(scripts, options) {
|
|
212
|
-
if (options.sourceSkips &
|
|
309
|
+
if (options.sourceSkips & _SourceSkips.SourceSkips.PackageJsonAndroidAndIosScriptsIfNotContainRun) {
|
|
213
310
|
// Replicate the behavior of `expo prebuild`
|
|
214
311
|
if (!scripts.android?.includes('run') || scripts.android === 'expo run:android') {
|
|
215
312
|
delete scripts.android;
|
|
@@ -220,4 +317,5 @@ function normalizePackageJsonScriptSources(scripts, options) {
|
|
|
220
317
|
}
|
|
221
318
|
return JSON.stringify(scripts);
|
|
222
319
|
}
|
|
223
|
-
|
|
320
|
+
|
|
321
|
+
//# sourceMappingURL=Bare.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["sourcer/Bare.ts"],"sourcesContent":[null],"names":["getBareAndroidSourcesAsync","getBareIosSourcesAsync","getCoreAutolinkingSourcesFromExpoAndroid","getCoreAutolinkingSourcesFromExpoIos","getCoreAutolinkingSourcesFromRncCliAsync","getGitIgnoreSourcesAsync","getPackageJsonScriptSourcesAsync","debug","require","projectRoot","options","platforms","includes","result","getFileBasedHashSourceAsync","chalk","dim","sourceSkips","SourceSkips","PackageJsonScriptsAll","packageJson","resolveFrom","path","resolve","e","results","scripts","id","push","type","contents","normalizePackageJsonScriptSources","reasons","GitIgnore","useRNCoreAutolinkingFromExpo","stdout","spawnAsync","cwd","env","getOriginalEnv","config","JSON","parse","parseCoreAutolinkingSourcesAsync","contentsId","red","args","resolveExpoAutolinkingCliPath","platform","logTag","root","maybeGetRealPathAsync","autolinkingConfig","depName","depData","Object","entries","dependencies","stripRncoreAutolinkingAbsolutePaths","filePath","toPosixPath","createAutolinkingHashSourceAsync","nativeModuleSourceType","stringify","profile","normalizeAutolinkingConfig","stripPaths","AutolinkingConfigPaths","roots","dependency","assert","dependencyRoot","cmakeDepRoot","process","replace","relative","platformData","values","key","value","newValue","startsWith","PackageJsonAndroidAndIosScriptsIfNotContainRun","android","ios"],"mappings":";;;;;;;;;;;;;;;;;;;;QAsBsBA;eAAAA;;QAcAC;eAAAA;;QAiFAC;eAAAA;;QAmCAC;eAAAA;;QA9DAC;eAAAA;;QAZAC;eAAAA;;QA5BAC;eAAAA;;;;yBAlDS;;;;;;;gEACR;;;;;;;gEACJ;;;;;;;gEACD;;;;;;;gEACE;;;;;;;gEACH;;;;;;;gEACO;;;;;;8BAEsB;sBAElB;yBACJ;mCACmB;6BACf;uBAKrB;;;;;;AAEP,MAAMC,QAAQC,QAAQ,SAAS;AAExB,eAAeR,2BACpBS,WAAmB,EACnBC,OAA0B;IAE1B,IAAIA,QAAQC,SAAS,CAACC,QAAQ,CAAC,YAAY;QACzC,MAAMC,SAAS,MAAMC,IAAAA,kCAA2B,EAACL,aAAa,WAAW;QACzE,IAAII,UAAU,MAAM;YAClBN,MAAM,CAAC,yBAAyB,EAAEQ,gBAAK,CAACC,GAAG,CAAC,YAAY;YACxD,OAAO;gBAACH;aAAO;QACjB;IACF;IACA,OAAO,EAAE;AACX;AAEO,eAAeZ,uB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A;YACN,OAAO;gBACLC,WAAWD,OAAOE,aAAaV,kBAC3BX,IAAAA,iBAAW,EAACtC,eAAI,CAACqD,QAAQ,CAACzB,MAAM6B,UAChCA;YACN;YAEAH,YAAY,CAACE,IAAI,GAAGE;QACtB;IACF;AACF;AAEA,SAASjD,kCACPL,OAA+B,EAC/BhB,OAA0B;IAE1B,IAAIA,QAAQO,WAAW,GAAGC,wBAAW,CAACgE,8CAA8C,EAAE;QACpF,4CAA4C;QAC5C,IAAI,CAACxD,QAAQyD,OAAO,EAAEvE,SAAS,UAAUc,QAAQyD,OAAO,KAAK,oBAAoB;YAC/E,OAAOzD,QAAQyD,OAAO;QACxB;QACA,IAAI,CAACzD,QAAQ0D,GAAG,EAAExE,SAAS,UAAUc,QAAQ0D,GAAG,KAAK,gBAAgB;YACnE,OAAO1D,QAAQ0D,GAAG;QACpB;IACF;IACA,OAAO3C,KAAKsB,SAAS,CAACrC;AACxB"}
|
package/build/sourcer/Expo.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { ExpoConfig, ProjectConfig } from 'expo/config';
|
|
1
|
+
import type { ExpoConfig, ProjectConfig } from '@expo/config';
|
|
2
|
+
import type { LoadedModuleSource } from '../ExpoConfigLoader';
|
|
2
3
|
import type { HashSource, NormalizedOptions } from '../Fingerprint.types';
|
|
3
|
-
export declare function getExpoConfigSourcesAsync(projectRoot: string, config: ProjectConfig | null, loadedModules:
|
|
4
|
+
export declare function getExpoConfigSourcesAsync(projectRoot: string, config: ProjectConfig | null, loadedModules: LoadedModuleSource[] | null, options: NormalizedOptions): Promise<HashSource[]>;
|
|
4
5
|
export declare function createHashSourceExternalFileAsync({ projectRoot, file, reason, }: {
|
|
5
6
|
projectRoot: string;
|
|
6
7
|
file: string;
|