@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
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "nonNullish", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return nonNullish;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
4
11
|
function nonNullish(value) {
|
|
5
12
|
return value !== null && value !== undefined;
|
|
6
13
|
}
|
|
7
|
-
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=Predicates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["utils/Predicates.ts"],"sourcesContent":[null],"names":["nonNullish","value","undefined"],"mappings":";;;;+BAAgBA;;;eAAAA;;;AAAT,SAASA,WAAmBC,KAAgC;IACjE,OAAOA,UAAU,QAAQA,UAAUC;AACrC"}
|
package/build/utils/Profile.js
CHANGED
|
@@ -1,23 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "profile", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return profile;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
function _chalk() {
|
|
12
|
+
const data = /*#__PURE__*/ _interop_require_default(require("chalk"));
|
|
13
|
+
_chalk = function() {
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
return data;
|
|
17
|
+
}
|
|
18
|
+
function _interop_require_default(obj) {
|
|
19
|
+
return obj && obj.__esModule ? obj : {
|
|
20
|
+
default: obj
|
|
21
|
+
};
|
|
22
|
+
}
|
|
15
23
|
function profile(options, fn, functionName = fn.name) {
|
|
16
24
|
if (!process.env['DEBUG'] || options.silent) {
|
|
17
25
|
return fn;
|
|
18
26
|
}
|
|
19
|
-
const name =
|
|
20
|
-
return (
|
|
27
|
+
const name = _chalk().default.dim(`⏱ [profile] ${functionName ?? 'unknown'}`);
|
|
28
|
+
return (...args)=>{
|
|
21
29
|
// Start the timer.
|
|
22
30
|
console.time(name);
|
|
23
31
|
// Invoke the method.
|
|
@@ -28,15 +36,16 @@ function profile(options, fn, functionName = fn.name) {
|
|
|
28
36
|
return results;
|
|
29
37
|
}
|
|
30
38
|
// Otherwise await to profile after the promise resolves.
|
|
31
|
-
return new Promise((resolve, reject)
|
|
32
|
-
results.then((results)
|
|
39
|
+
return new Promise((resolve, reject)=>{
|
|
40
|
+
results.then((results)=>{
|
|
33
41
|
resolve(results);
|
|
34
42
|
console.timeEnd(name);
|
|
35
|
-
}, (reason)
|
|
43
|
+
}, (reason)=>{
|
|
36
44
|
reject(reason);
|
|
37
45
|
console.timeEnd(name);
|
|
38
46
|
});
|
|
39
47
|
});
|
|
40
|
-
}
|
|
48
|
+
};
|
|
41
49
|
}
|
|
42
|
-
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=Profile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["utils/Profile.ts"],"sourcesContent":[null],"names":["profile","options","fn","functionName","name","process","env","silent","chalk","dim","args","console","time","results","Promise","timeEnd","resolve","reject","then","reason"],"mappings":";;;;+BAWgBA;;;eAAAA;;;;gEAXE;;;;;;;;;;;AAWX,SAASA,QACdC,OAA0B,EAC1BC,EAAK,EACLC,eAAuBD,GAAGE,IAAI;IAE9B,IAAI,CAACC,QAAQC,GAAG,CAAC,QAAQ,IAAIL,QAAQM,MAAM,EAAE;QAC3C,OAAOL;IACT;IAEA,MAAME,OAAOI,gBAAK,CAACC,GAAG,CAAC,CAAC,aAAa,EAAEN,gBAAgB,WAAW;IAElE,OAAQ,CAAC,GAAGO;QACV,mBAAmB;QACnBC,QAAQC,IAAI,CAACR;QAEb,qBAAqB;QACrB,MAAMS,UAAUX,MAAMQ;QAEtB,oCAAoC;QACpC,IAAI,CAAEG,CAAAA,mBAAmBC,OAAM,GAAI;YACjCH,QAAQI,OAAO,CAACX;YAChB,OAAOS;QACT;QAEA,yDAAyD;QACzD,OAAO,IAAIC,QAAgC,CAACE,SAASC;YACnDJ,QAAQK,IAAI,CACV,CAACL;gBACCG,QAAQH;gBACRF,QAAQI,OAAO,CAACX;YAClB,GACA,CAACe;gBACCF,OAAOE;gBACPR,QAAQI,OAAO,CAACX;YAClB;QAEJ;IACF;AACF"}
|
package/build/utils/SpawnIPC.js
CHANGED
|
@@ -1,21 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
) {
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "spawnWithIpcAsync", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return spawnWithIpcAsync;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
function _spawnasync() {
|
|
12
|
+
const data = /*#__PURE__*/ _interop_require_default(require("@expo/spawn-async"));
|
|
13
|
+
_spawnasync = function() {
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
return data;
|
|
17
|
+
}
|
|
18
|
+
function _nodeassert() {
|
|
19
|
+
const data = /*#__PURE__*/ _interop_require_default(require("node:assert"));
|
|
20
|
+
_nodeassert = function() {
|
|
21
|
+
return data;
|
|
22
|
+
};
|
|
23
|
+
return data;
|
|
24
|
+
}
|
|
25
|
+
function _interop_require_default(obj) {
|
|
26
|
+
return obj && obj.__esModule ? obj : {
|
|
27
|
+
default: obj
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
async function spawnWithIpcAsync(command, args, options) {
|
|
31
|
+
(0, _nodeassert().default)(options?.stdio == null, 'Cannot override stdio when using IPC');
|
|
32
|
+
const promise = (0, _spawnasync().default)(command, args, {
|
|
14
33
|
...options,
|
|
15
|
-
stdio: [
|
|
34
|
+
stdio: [
|
|
35
|
+
'pipe',
|
|
36
|
+
'pipe',
|
|
37
|
+
'pipe',
|
|
38
|
+
'ipc'
|
|
39
|
+
]
|
|
16
40
|
});
|
|
17
41
|
const messageChunks = [];
|
|
18
|
-
const appendMessage = (message)
|
|
42
|
+
const appendMessage = (message)=>{
|
|
19
43
|
messageChunks.push(message);
|
|
20
44
|
};
|
|
21
45
|
promise.child.on('message', appendMessage);
|
|
@@ -23,7 +47,8 @@ async function spawnWithIpcAsync(command, args, options
|
|
|
23
47
|
promise.child.off('message', appendMessage);
|
|
24
48
|
return {
|
|
25
49
|
...result,
|
|
26
|
-
message: messageChunks.join('')
|
|
50
|
+
message: messageChunks.join('')
|
|
27
51
|
};
|
|
28
52
|
}
|
|
29
|
-
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=SpawnIPC.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["utils/SpawnIPC.ts"],"sourcesContent":[null],"names":["spawnWithIpcAsync","command","args","options","assert","stdio","promise","spawnAsync","messageChunks","appendMessage","message","push","child","on","result","off","join"],"mappings":";;;;+BAWsBA;;;eAAAA;;;;gEAPf;;;;;;;gEACY;;;;;;;;;;;AAMZ,eAAeA,kBACpBC,OAAe,EACfC,IAAe,EACfC,OAAsB;IAGtBC,IAAAA,qBAAM,EAACD,SAASE,SAAS,MAAM;IAE/B,MAAMC,UAAUC,IAAAA,qBAAU,EAACN,SAASC,MAAM;QACxC,GAAGC,OAAO;QACVE,OAAO;YAAC;YAAQ;YAAQ;YAAQ;SAAM;IACxC;IAEA,MAAMG,gBAA0B,EAAE;IAClC,MAAMC,gBAAgB,CAACC;QACrBF,cAAcG,IAAI,CAACD;IACrB;IACAJ,QAAQM,KAAK,CAACC,EAAE,CAAC,WAAWJ;IAC5B,MAAMK,SAAS,MAAMR;IACrBA,QAAQM,KAAK,CAACG,GAAG,CAAC,WAAWN;IAC7B,OAAO;QACL,GAAGK,MAAM;QACTJ,SAASF,cAAcQ,IAAI,CAAC;IAC9B;AACF"}
|
package/cli/build/cli.js
CHANGED
|
@@ -1,69 +1,104 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
18
5
|
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
6
|
+
function _arg() {
|
|
7
|
+
const data = /*#__PURE__*/ _interop_require_default(require("arg"));
|
|
8
|
+
_arg = function() {
|
|
9
|
+
return data;
|
|
27
10
|
};
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return
|
|
11
|
+
return data;
|
|
12
|
+
}
|
|
13
|
+
function _chalk() {
|
|
14
|
+
const data = /*#__PURE__*/ _interop_require_default(require("chalk"));
|
|
15
|
+
_chalk = function() {
|
|
16
|
+
return data;
|
|
34
17
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
18
|
+
return data;
|
|
19
|
+
}
|
|
20
|
+
function _debug() {
|
|
21
|
+
const data = /*#__PURE__*/ _interop_require_default(require("debug"));
|
|
22
|
+
_debug = function() {
|
|
23
|
+
return data;
|
|
24
|
+
};
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
function _getenv() {
|
|
28
|
+
const data = require("getenv");
|
|
29
|
+
_getenv = function() {
|
|
30
|
+
return data;
|
|
31
|
+
};
|
|
32
|
+
return data;
|
|
33
|
+
}
|
|
34
|
+
const _runLegacyCLIAsync = require("./runLegacyCLIAsync");
|
|
35
|
+
const _errors = require("./utils/errors");
|
|
36
|
+
const _log = /*#__PURE__*/ _interop_require_wildcard(require("./utils/log"));
|
|
37
|
+
function _interop_require_default(obj) {
|
|
38
|
+
return obj && obj.__esModule ? obj : {
|
|
39
|
+
default: obj
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
43
|
+
if (typeof WeakMap !== "function") return null;
|
|
44
|
+
var cacheBabelInterop = new WeakMap();
|
|
45
|
+
var cacheNodeInterop = new WeakMap();
|
|
46
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
47
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
48
|
+
})(nodeInterop);
|
|
50
49
|
}
|
|
51
|
-
|
|
50
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
51
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
52
|
+
return obj;
|
|
53
|
+
}
|
|
54
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
55
|
+
return {
|
|
56
|
+
default: obj
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
60
|
+
if (cache && cache.has(obj)) {
|
|
61
|
+
return cache.get(obj);
|
|
62
|
+
}
|
|
63
|
+
var newObj = {
|
|
64
|
+
__proto__: null
|
|
65
|
+
};
|
|
66
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
67
|
+
for(var key in obj){
|
|
68
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
69
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
70
|
+
if (desc && (desc.get || desc.set)) {
|
|
71
|
+
Object.defineProperty(newObj, key, desc);
|
|
72
|
+
} else {
|
|
73
|
+
newObj[key] = obj[key];
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
newObj.default = obj;
|
|
78
|
+
if (cache) {
|
|
79
|
+
cache.set(obj, newObj);
|
|
80
|
+
}
|
|
81
|
+
return newObj;
|
|
82
|
+
}
|
|
83
|
+
// Setup before requiring `debug`.
|
|
84
|
+
if ((0, _getenv().boolish)('EXPO_DEBUG', false)) {
|
|
85
|
+
_debug().default.enable('@expo/fingerprint:*');
|
|
86
|
+
} else if (_debug().default.enabled('@expo/fingerprint:')) {
|
|
52
87
|
process.env.EXPO_DEBUG = '1';
|
|
53
88
|
}
|
|
54
89
|
const commands = {
|
|
55
90
|
// Add a new command here
|
|
56
|
-
'fingerprint:generate': ()
|
|
57
|
-
'fingerprint:diff': ()
|
|
91
|
+
'fingerprint:generate': ()=>import('./commands/generateFingerprint.js').then((i)=>i.generateFingerprintAsync),
|
|
92
|
+
'fingerprint:diff': ()=>import('./commands/diffFingerprints.js').then((i)=>i.diffFingerprintsAsync)
|
|
58
93
|
};
|
|
59
|
-
const args = (0,
|
|
94
|
+
const args = (0, _arg().default)({
|
|
60
95
|
// Types
|
|
61
96
|
'--version': Boolean,
|
|
62
97
|
'--help': Boolean,
|
|
63
98
|
// Aliases
|
|
64
|
-
'-h': '--help'
|
|
99
|
+
'-h': '--help'
|
|
65
100
|
}, {
|
|
66
|
-
permissive: true
|
|
101
|
+
permissive: true
|
|
67
102
|
});
|
|
68
103
|
if (args['--version']) {
|
|
69
104
|
// Version is added in the build script.
|
|
@@ -74,8 +109,8 @@ if (args['--version']) {
|
|
|
74
109
|
const command = args._[0];
|
|
75
110
|
const commandArgs = args._.slice(1);
|
|
76
111
|
// Handle `--help` flag
|
|
77
|
-
if (
|
|
78
|
-
|
|
112
|
+
if (args['--help'] && !command || !command) {
|
|
113
|
+
_log.exit((0, _chalk().default)`
|
|
79
114
|
{bold Usage}
|
|
80
115
|
{dim $} npx @expo/fingerprint <command>
|
|
81
116
|
|
|
@@ -94,13 +129,12 @@ if (args['--help']) {
|
|
|
94
129
|
commandArgs.push('--help');
|
|
95
130
|
}
|
|
96
131
|
// Install exit hooks
|
|
97
|
-
process.on('SIGINT', ()
|
|
98
|
-
process.on('SIGTERM', ()
|
|
132
|
+
process.on('SIGINT', ()=>process.exit(0));
|
|
133
|
+
process.on('SIGTERM', ()=>process.exit(0));
|
|
99
134
|
if (!commands[command]) {
|
|
100
|
-
(0,
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
commands[command]()
|
|
104
|
-
.then((exec) => exec(commandArgs))
|
|
105
|
-
.catch(errors_1.logCmdError);
|
|
135
|
+
(0, _runLegacyCLIAsync.runLegacyCLIAsync)(args._).catch(_errors.logCmdError);
|
|
136
|
+
} else {
|
|
137
|
+
commands[command]().then((exec)=>exec(commandArgs)).catch(_errors.logCmdError);
|
|
106
138
|
}
|
|
139
|
+
|
|
140
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["cli.ts"],"sourcesContent":[null],"names":["boolish","Debug","enable","enabled","process","env","EXPO_DEBUG","commands","then","i","generateFingerprintAsync","diffFingerprintsAsync","args","arg","Boolean","permissive","packageJSON","require","console","log","version","exit","command","_","commandArgs","slice","Log","chalk","Object","keys","sort","join","push","on","runLegacyCLIAsync","catch","logCmdError","exec"],"mappings":";;;;;;gEACgB;;;;;;;gEACE;;;;;;;gEACA;;;;;;;yBACM;;;;;;mCAEU;wBACN;6DACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAErB,kCAAkC;AAClC,IAAIA,IAAAA,iBAAO,EAAC,cAAc,QAAQ;IAChCC,gBAAK,CAACC,MAAM,CAAC;AACf,OAAO,IAAID,gBAAK,CAACE,OAAO,CAAC,uBAAuB;IAC9CC,QAAQC,GAAG,CAACC,UAAU,GAAG;AAC3B;AAIA,MAAMC,WAA0D;IAC9D,yBAAyB;IACzB,wBAAwB,IACtB,MAAM,CAAC,qCAAqCC,IAAI,CAAC,CAACC,IAAMA,EAAEC,wBAAwB;IACpF,oBAAoB,IAClB,MAAM,CAAC,kCAAkCF,IAAI,CAAC,CAACC,IAAMA,EAAEE,qBAAqB;AAChF;AAEA,MAAMC,OAAOC,IAAAA,cAAG,EACd;IACE,QAAQ;IACR,aAAaC;IACb,UAAUA;IAEV,UAAU;IACV,MAAM;AACR,GACA;IACEC,YAAY;AACd;AAGF,IAAIH,IAAI,CAAC,YAAY,EAAE;IACrB,wCAAwC;IACxC,MAAMI,cAAcC,QAAQ;IAC5BC,QAAQC,GAAG,CAACH,YAAYI,OAAO;IAC/BhB,QAAQiB,IAAI,CAAC;AACf;AAEA,MAAMC,UAAUV,KAAKW,CAAC,CAAC,EAAE;AACzB,MAAMC,cAAcZ,KAAKW,CAAC,CAACE,KAAK,CAAC;AAEjC,uBAAuB;AACvB,IAAI,AAACb,IAAI,CAAC,SAAS,IAAI,CAACU,WAAY,CAACA,SAAS;IAC5CI,KAAIL,IAAI,CACNM,IAAAA,gBAAK,CAAA,CAAC;;;;;EAKR,EAAEC,OAAOC,IAAI,CAACtB,UAAUuB,IAAI,GAAGC,IAAI,CAAC,MAAM;;;;;;;EAO1C,CAAC,EACC;AAEJ;AAEA,6CAA6C;AAC7C,IAAInB,IAAI,CAAC,SAAS,EAAE;IAClBY,YAAYQ,IAAI,CAAC;AACnB;AAEA,qBAAqB;AACrB5B,QAAQ6B,EAAE,CAAC,UAAU,IAAM7B,QAAQiB,IAAI,CAAC;AACxCjB,QAAQ6B,EAAE,CAAC,WAAW,IAAM7B,QAAQiB,IAAI,CAAC;AAEzC,IAAI,CAACd,QAAQ,CAACe,QAAQ,EAAE;IACtBY,IAAAA,oCAAiB,EAACtB,KAAKW,CAAC,EAAEY,KAAK,CAACC,mBAAW;AAC7C,OAAO;IACL7B,QAAQ,CAACe,QAAQ,GACdd,IAAI,CAAC,CAAC6B,OAASA,KAAKb,cACpBW,KAAK,CAACC,mBAAW;AACtB"}
|
|
@@ -1,57 +1,80 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "diffFingerprintsAsync", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return diffFingerprintsAsync;
|
|
7
9
|
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
10
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
11
|
+
function _chalk() {
|
|
12
|
+
const data = /*#__PURE__*/ _interop_require_default(require("chalk"));
|
|
13
|
+
_chalk = function() {
|
|
14
|
+
return data;
|
|
26
15
|
};
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
16
|
+
return data;
|
|
17
|
+
}
|
|
18
|
+
const _index = require("../../../build/index");
|
|
19
|
+
const _args = require("../utils/args");
|
|
20
|
+
const _errors = require("../utils/errors");
|
|
21
|
+
const _log = /*#__PURE__*/ _interop_require_wildcard(require("../utils/log"));
|
|
22
|
+
const _readFingerprintFileAsync = /*#__PURE__*/ _interop_require_default(require("../utils/readFingerprintFileAsync"));
|
|
23
|
+
function _interop_require_default(obj) {
|
|
24
|
+
return obj && obj.__esModule ? obj : {
|
|
25
|
+
default: obj
|
|
33
26
|
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
27
|
+
}
|
|
28
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
29
|
+
if (typeof WeakMap !== "function") return null;
|
|
30
|
+
var cacheBabelInterop = new WeakMap();
|
|
31
|
+
var cacheNodeInterop = new WeakMap();
|
|
32
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
33
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
34
|
+
})(nodeInterop);
|
|
35
|
+
}
|
|
36
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
37
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
38
|
+
return obj;
|
|
39
|
+
}
|
|
40
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
41
|
+
return {
|
|
42
|
+
default: obj
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
46
|
+
if (cache && cache.has(obj)) {
|
|
47
|
+
return cache.get(obj);
|
|
48
|
+
}
|
|
49
|
+
var newObj = {
|
|
50
|
+
__proto__: null
|
|
51
|
+
};
|
|
52
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
53
|
+
for(var key in obj){
|
|
54
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
55
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
56
|
+
if (desc && (desc.get || desc.set)) {
|
|
57
|
+
Object.defineProperty(newObj, key, desc);
|
|
58
|
+
} else {
|
|
59
|
+
newObj[key] = obj[key];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
newObj.default = obj;
|
|
64
|
+
if (cache) {
|
|
65
|
+
cache.set(obj, newObj);
|
|
66
|
+
}
|
|
67
|
+
return newObj;
|
|
68
|
+
}
|
|
69
|
+
const diffFingerprintsAsync = async (argv)=>{
|
|
70
|
+
const args = (0, _args.assertArgs)({
|
|
48
71
|
// Types
|
|
49
72
|
'--help': Boolean,
|
|
50
73
|
// Aliases
|
|
51
|
-
'-h': '--help'
|
|
74
|
+
'-h': '--help'
|
|
52
75
|
}, argv ?? []);
|
|
53
76
|
if (args['--help']) {
|
|
54
|
-
|
|
77
|
+
_log.exit((0, _chalk().default)`
|
|
55
78
|
{bold Description}
|
|
56
79
|
Diff two fingerprints
|
|
57
80
|
|
|
@@ -62,18 +85,18 @@ Diff two fingerprints
|
|
|
62
85
|
-h, --help Output usage information
|
|
63
86
|
`, 0);
|
|
64
87
|
}
|
|
65
|
-
const fingerprintFile1 = (0,
|
|
66
|
-
const fingerprintFile2 = (0,
|
|
88
|
+
const fingerprintFile1 = (0, _args.getFileArgumentAtIndex)(args, 0);
|
|
89
|
+
const fingerprintFile2 = (0, _args.getFileArgumentAtIndex)(args, 1);
|
|
67
90
|
const [fingerprint1ToDiff, fingerprint2ToDiff] = await Promise.all([
|
|
68
|
-
(0,
|
|
69
|
-
(0,
|
|
91
|
+
(0, _readFingerprintFileAsync.default)(fingerprintFile1),
|
|
92
|
+
(0, _readFingerprintFileAsync.default)(fingerprintFile2)
|
|
70
93
|
]);
|
|
71
94
|
try {
|
|
72
|
-
const diff = (0,
|
|
95
|
+
const diff = (0, _index.diffFingerprints)(fingerprint1ToDiff, fingerprint2ToDiff);
|
|
73
96
|
console.log(JSON.stringify(diff, null, 2));
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
throw new errors_1.CommandError(e.message);
|
|
97
|
+
} catch (e) {
|
|
98
|
+
throw new _errors.CommandError(e.message);
|
|
77
99
|
}
|
|
78
100
|
};
|
|
79
|
-
|
|
101
|
+
|
|
102
|
+
//# sourceMappingURL=diffFingerprints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["commands/diffFingerprints.ts"],"sourcesContent":[null],"names":["diffFingerprintsAsync","argv","args","assertArgs","Boolean","Log","exit","chalk","fingerprintFile1","getFileArgumentAtIndex","fingerprintFile2","fingerprint1ToDiff","fingerprint2ToDiff","Promise","all","readFingerprintFileAsync","diff","diffFingerprints","console","log","JSON","stringify","e","CommandError","message"],"mappings":";;;;+BASaA;;;eAAAA;;;;gEATK;;;;;;uBAEe;sBAEkB;wBACtB;6DACR;iFACgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE9B,MAAMA,wBAAiC,OAAOC;IACnD,MAAMC,OAAOC,IAAAA,gBAAU,EACrB;QACE,QAAQ;QACR,UAAUC;QACV,UAAU;QACV,MAAM;IACR,GACAH,QAAQ,EAAE;IAGZ,IAAIC,IAAI,CAAC,SAAS,EAAE;QAClBG,KAAIC,IAAI,CACNC,IAAAA,gBAAK,CAAA,CAAC;;;;;;;;;IASR,CAAC,EACC;IAEJ;IAEA,MAAMC,mBAAmBC,IAAAA,4BAAsB,EAACP,MAAM;IACtD,MAAMQ,mBAAmBD,IAAAA,4BAAsB,EAACP,MAAM;IAEtD,MAAM,CAACS,oBAAoBC,mBAAmB,GAAG,MAAMC,QAAQC,GAAG,CAAC;QACjEC,IAAAA,iCAAwB,EAACP;QACzBO,IAAAA,iCAAwB,EAACL;KAC1B;IACD,IAAI;QACF,MAAMM,OAAOC,IAAAA,uBAAgB,EAACN,oBAAoBC;QAClDM,QAAQC,GAAG,CAACC,KAAKC,SAAS,CAACL,MAAM,MAAM;IACzC,EAAE,OAAOM,GAAQ;QACf,MAAM,IAAIC,oBAAY,CAACD,EAAEE,OAAO;IAClC;AACF"}
|