react-native-update-cli 2.9.5 → 2.9.7
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/lib/api.js +22 -19
- package/lib/app.js +9 -9
- package/lib/bundle-pack.js +1 -1
- package/lib/bundle-runner.js +16 -16
- package/lib/diff.js +14 -91
- package/lib/exports.d.ts +8 -8
- package/lib/exports.js +23 -23
- package/lib/index.d.ts +2 -2
- package/lib/index.js +3 -3
- package/lib/module-manager.js +3 -3
- package/lib/modules/app-module.js +1 -1
- package/lib/modules/index.d.ts +3 -3
- package/lib/modules/index.js +7 -7
- package/lib/package.js +9 -9
- package/lib/utils/app-info-parser/aab.js +8 -8
- package/lib/utils/app-info-parser/ipa.js +1 -1
- package/lib/utils/app-info-parser/resource-finder.js +7 -7
- package/lib/utils/app-info-parser/utils.d.ts +1 -1
- package/lib/utils/app-info-parser/utils.js +10 -10
- package/lib/utils/app-info-parser/xml-parser/binary.js +2 -2
- package/lib/utils/command-result.js +3 -3
- package/lib/utils/constants.js +10 -10
- package/lib/utils/git.js +1 -1
- package/lib/utils/http-helper.js +5 -5
- package/lib/utils/index.js +13 -13
- package/lib/utils/latest-version/cli.js +2 -2
- package/lib/utils/latest-version/index.d.ts +1 -1
- package/lib/utils/latest-version/index.js +12 -12
- package/lib/utils/options.js +5 -5
- package/lib/utils/plugin-config.js +2 -2
- package/lib/utils/zip-entries.js +28 -11
- package/lib/utils/zip-options.d.ts +2 -1
- package/lib/utils/zip-options.js +17 -8
- package/lib/versions.d.ts +1 -1
- package/lib/versions.js +9 -13
- package/package.json +22 -19
- package/src/api.ts +11 -6
- package/src/app.ts +5 -4
- package/src/bundle-pack.ts +1 -1
- package/src/bundle-runner.ts +2 -2
- package/src/diff.ts +9 -161
- package/src/exports.ts +17 -20
- package/src/index.ts +2 -2
- package/src/modules/index.ts +3 -3
- package/src/package.ts +1 -1
- package/src/utils/app-info-parser/aab.ts +1 -1
- package/src/utils/app-info-parser/ipa.ts +1 -1
- package/src/utils/app-info-parser/utils.ts +5 -5
- package/src/utils/git.ts +1 -1
- package/src/utils/index.ts +4 -5
- package/src/utils/latest-version/cli.ts +4 -4
- package/src/utils/latest-version/index.ts +5 -6
- package/src/utils/zip-entries.ts +26 -8
- package/src/utils/zip-options.ts +7 -7
- package/src/versions.ts +11 -18
package/lib/api.js
CHANGED
|
@@ -5,58 +5,58 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
closeSession
|
|
12
|
+
get closeSession () {
|
|
13
13
|
return closeSession;
|
|
14
14
|
},
|
|
15
|
-
doDelete
|
|
15
|
+
get doDelete () {
|
|
16
16
|
return doDelete;
|
|
17
17
|
},
|
|
18
|
-
get
|
|
18
|
+
get get () {
|
|
19
19
|
return get;
|
|
20
20
|
},
|
|
21
|
-
getAllPackages
|
|
21
|
+
get getAllPackages () {
|
|
22
22
|
return getAllPackages;
|
|
23
23
|
},
|
|
24
|
-
getApiToken
|
|
24
|
+
get getApiToken () {
|
|
25
25
|
return getApiToken;
|
|
26
26
|
},
|
|
27
|
-
getSession
|
|
27
|
+
get getSession () {
|
|
28
28
|
return getSession;
|
|
29
29
|
},
|
|
30
|
-
loadSession
|
|
30
|
+
get loadSession () {
|
|
31
31
|
return loadSession;
|
|
32
32
|
},
|
|
33
|
-
post
|
|
33
|
+
get post () {
|
|
34
34
|
return post;
|
|
35
35
|
},
|
|
36
|
-
put
|
|
36
|
+
get put () {
|
|
37
37
|
return put;
|
|
38
38
|
},
|
|
39
|
-
replaceSession
|
|
39
|
+
get replaceSession () {
|
|
40
40
|
return replaceSession;
|
|
41
41
|
},
|
|
42
|
-
saveSession
|
|
42
|
+
get saveSession () {
|
|
43
43
|
return saveSession;
|
|
44
44
|
},
|
|
45
|
-
setApiToken
|
|
45
|
+
get setApiToken () {
|
|
46
46
|
return setApiToken;
|
|
47
47
|
},
|
|
48
|
-
uploadFile
|
|
48
|
+
get uploadFile () {
|
|
49
49
|
return uploadFile;
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
|
-
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
53
|
-
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
54
|
-
const _util = /*#__PURE__*/ _interop_require_default(require("util"));
|
|
55
52
|
const _filesizeparser = /*#__PURE__*/ _interop_require_default(require("filesize-parser"));
|
|
56
53
|
const _formdata = /*#__PURE__*/ _interop_require_default(require("form-data"));
|
|
54
|
+
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
57
55
|
const _nodefetch = /*#__PURE__*/ _interop_require_default(require("node-fetch"));
|
|
56
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
58
57
|
const _progress = /*#__PURE__*/ _interop_require_default(require("progress"));
|
|
59
58
|
const _tcpping = /*#__PURE__*/ _interop_require_default(require("tcp-ping"));
|
|
59
|
+
const _util = /*#__PURE__*/ _interop_require_default(require("util"));
|
|
60
60
|
const _httphelper = require("./utils/http-helper");
|
|
61
61
|
const _packagejson = /*#__PURE__*/ _interop_require_default(require("../package.json"));
|
|
62
62
|
const _constants = require("./utils/constants");
|
|
@@ -131,7 +131,11 @@ async function query(url, options) {
|
|
|
131
131
|
let json;
|
|
132
132
|
try {
|
|
133
133
|
json = JSON.parse(text);
|
|
134
|
-
} catch (e) {
|
|
134
|
+
} catch (e) {
|
|
135
|
+
if (resp.status === 200 && text) {
|
|
136
|
+
console.warn(`Warning: API returned 200 with non-JSON body (${text.length} bytes)`);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
135
139
|
if (resp.status !== 200) {
|
|
136
140
|
const message = (json == null ? void 0 : json.message) || resp.statusText || `HTTP ${resp.status}`;
|
|
137
141
|
if (resp.status === 401) {
|
|
@@ -185,7 +189,6 @@ async function uploadFile(fn, key) {
|
|
|
185
189
|
});
|
|
186
190
|
let realUrl = url;
|
|
187
191
|
if (backupUrl) {
|
|
188
|
-
// @ts-ignore
|
|
189
192
|
if (global.USE_ACC_OSS) {
|
|
190
193
|
realUrl = backupUrl;
|
|
191
194
|
} else {
|
package/lib/app.js
CHANGED
|
@@ -5,33 +5,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
appCommands
|
|
12
|
+
get appCommands () {
|
|
13
13
|
return appCommands;
|
|
14
14
|
},
|
|
15
|
-
assertPlatform
|
|
15
|
+
get assertPlatform () {
|
|
16
16
|
return assertPlatform;
|
|
17
17
|
},
|
|
18
|
-
chooseApp
|
|
18
|
+
get chooseApp () {
|
|
19
19
|
return chooseApp;
|
|
20
20
|
},
|
|
21
|
-
getPlatform
|
|
21
|
+
get getPlatform () {
|
|
22
22
|
return getPlatform;
|
|
23
23
|
},
|
|
24
|
-
getSelectedApp
|
|
24
|
+
get getSelectedApp () {
|
|
25
25
|
return getSelectedApp;
|
|
26
26
|
},
|
|
27
|
-
listApp
|
|
27
|
+
get listApp () {
|
|
28
28
|
return listApp;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
32
32
|
const _ttytable = /*#__PURE__*/ _interop_require_default(require("tty-table"));
|
|
33
|
-
const _utils = require("./utils");
|
|
34
33
|
const _api = require("./api");
|
|
34
|
+
const _utils = require("./utils");
|
|
35
35
|
const _i18n = require("./utils/i18n");
|
|
36
36
|
function _interop_require_default(obj) {
|
|
37
37
|
return obj && obj.__esModule ? obj : {
|
|
@@ -143,7 +143,7 @@ const appCommands = {
|
|
|
143
143
|
},
|
|
144
144
|
deleteApp: async ({ args, options })=>{
|
|
145
145
|
const { platform } = options;
|
|
146
|
-
const id = args[0] || chooseApp(platform);
|
|
146
|
+
const id = args[0] || (await chooseApp(platform)).id;
|
|
147
147
|
if (!id) {
|
|
148
148
|
console.log((0, _i18n.t)('cancelled'));
|
|
149
149
|
}
|
package/lib/bundle-pack.js
CHANGED
|
@@ -8,8 +8,8 @@ Object.defineProperty(exports, "packBundle", {
|
|
|
8
8
|
return packBundle;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
12
11
|
const _fsextra = /*#__PURE__*/ _interop_require_wildcard(require("fs-extra"));
|
|
12
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
13
13
|
const _yazl = require("yazl");
|
|
14
14
|
const _i18n = require("./utils/i18n");
|
|
15
15
|
const _zipoptions = require("./utils/zip-options");
|
package/lib/bundle-runner.js
CHANGED
|
@@ -5,31 +5,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
copyDebugidForSentry
|
|
12
|
+
get copyDebugidForSentry () {
|
|
13
13
|
return copyDebugidForSentry;
|
|
14
14
|
},
|
|
15
|
-
hasProjectDependency
|
|
15
|
+
get hasProjectDependency () {
|
|
16
16
|
return hasProjectDependency;
|
|
17
17
|
},
|
|
18
|
-
resolveExpoCli
|
|
18
|
+
get resolveExpoCli () {
|
|
19
19
|
return resolveExpoCli;
|
|
20
20
|
},
|
|
21
|
-
runReactNativeBundleCommand
|
|
21
|
+
get runReactNativeBundleCommand () {
|
|
22
22
|
return runReactNativeBundleCommand;
|
|
23
23
|
},
|
|
24
|
-
uploadSourcemapForSentry
|
|
24
|
+
get uploadSourcemapForSentry () {
|
|
25
25
|
return uploadSourcemapForSentry;
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
const _child_process = require("child_process");
|
|
29
|
-
const _os = /*#__PURE__*/ _interop_require_default(require("os"));
|
|
30
|
-
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
31
29
|
const _compareversions = require("compare-versions");
|
|
32
30
|
const _fsextra = /*#__PURE__*/ _interop_require_wildcard(require("fs-extra"));
|
|
31
|
+
const _os = /*#__PURE__*/ _interop_require_default(require("os"));
|
|
32
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
33
33
|
const _i18n = require("./utils/i18n");
|
|
34
34
|
function _interop_require_default(obj) {
|
|
35
35
|
return obj && obj.__esModule ? obj : {
|
|
@@ -95,7 +95,7 @@ function hasProjectDependency(dependencyName, projectRoot = process.cwd()) {
|
|
|
95
95
|
}
|
|
96
96
|
return dependencyName in dependencies;
|
|
97
97
|
});
|
|
98
|
-
} catch (
|
|
98
|
+
} catch (unused) {
|
|
99
99
|
return false;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -117,7 +117,7 @@ function resolveExpoCli(projectRoot = process.cwd()) {
|
|
|
117
117
|
]
|
|
118
118
|
});
|
|
119
119
|
searchPaths.push(_path.default.dirname(expoPackageJsonPath));
|
|
120
|
-
} catch (
|
|
120
|
+
} catch (unused) {
|
|
121
121
|
// expo 包不存在,忽略
|
|
122
122
|
}
|
|
123
123
|
const cliPath = require.resolve('@expo/cli', {
|
|
@@ -136,7 +136,7 @@ function resolveExpoCli(projectRoot = process.cwd()) {
|
|
|
136
136
|
cliPath,
|
|
137
137
|
usingExpo: true
|
|
138
138
|
};
|
|
139
|
-
} catch (
|
|
139
|
+
} catch (unused) {
|
|
140
140
|
return {
|
|
141
141
|
cliPath: '',
|
|
142
142
|
usingExpo: false
|
|
@@ -171,7 +171,7 @@ async function runReactNativeBundleCommand({ bundleName, dev, entryFile, outputF
|
|
|
171
171
|
process.cwd()
|
|
172
172
|
]
|
|
173
173
|
});
|
|
174
|
-
} catch (
|
|
174
|
+
} catch (unused) {
|
|
175
175
|
cliPath = require.resolve('@react-native-community/cli/build/bin.js', {
|
|
176
176
|
paths: [
|
|
177
177
|
process.cwd()
|
|
@@ -186,7 +186,7 @@ async function runReactNativeBundleCommand({ bundleName, dev, entryFile, outputF
|
|
|
186
186
|
process.cwd()
|
|
187
187
|
]
|
|
188
188
|
});
|
|
189
|
-
} catch (
|
|
189
|
+
} catch (unused) {
|
|
190
190
|
// fallback 到 RN CLI
|
|
191
191
|
}
|
|
192
192
|
};
|
|
@@ -316,7 +316,7 @@ async function checkGradleConfig() {
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
|
-
} catch (
|
|
319
|
+
} catch (unused) {
|
|
320
320
|
// ignore parsing failures
|
|
321
321
|
}
|
|
322
322
|
return {
|
|
@@ -383,7 +383,7 @@ async function copyDebugidForSentry(bundleName, outputFolder, sourcemapOutput) {
|
|
|
383
383
|
process.cwd()
|
|
384
384
|
]
|
|
385
385
|
});
|
|
386
|
-
} catch (
|
|
386
|
+
} catch (unused) {
|
|
387
387
|
console.error((0, _i18n.t)('sentryCliNotFound'));
|
|
388
388
|
return;
|
|
389
389
|
}
|
|
@@ -412,7 +412,7 @@ async function uploadSourcemapForSentry(bundleName, outputFolder, sourcemapOutpu
|
|
|
412
412
|
process.cwd()
|
|
413
413
|
]
|
|
414
414
|
});
|
|
415
|
-
} catch (
|
|
415
|
+
} catch (unused) {
|
|
416
416
|
console.error((0, _i18n.t)('sentryCliNotFound'));
|
|
417
417
|
return;
|
|
418
418
|
}
|
package/lib/diff.js
CHANGED
|
@@ -5,23 +5,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
diffCommands
|
|
12
|
+
get diffCommands () {
|
|
13
13
|
return diffCommands;
|
|
14
14
|
},
|
|
15
|
-
enumZipEntries
|
|
15
|
+
get enumZipEntries () {
|
|
16
16
|
return _zipentries.enumZipEntries;
|
|
17
17
|
},
|
|
18
|
-
readEntry
|
|
18
|
+
get readEntry () {
|
|
19
19
|
return _zipentries.readEntry;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
23
22
|
const _fsextra = /*#__PURE__*/ _interop_require_wildcard(require("fs-extra"));
|
|
24
23
|
const _globaldirs = require("global-dirs");
|
|
24
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
25
25
|
const _yazl = require("yazl");
|
|
26
26
|
const _utils = require("./utils");
|
|
27
27
|
const _constants = require("./utils/constants");
|
|
@@ -85,91 +85,13 @@ const loadModule = (pkgName)=>{
|
|
|
85
85
|
paths: resolvePaths
|
|
86
86
|
});
|
|
87
87
|
return require(resolved);
|
|
88
|
-
} catch (
|
|
88
|
+
} catch (unused) {}
|
|
89
89
|
return undefined;
|
|
90
90
|
};
|
|
91
91
|
const hdiff = loadModule('node-hdiffpatch');
|
|
92
92
|
const bsdiff = loadModule('node-bsdiff');
|
|
93
|
-
const chiff = loadModule('@chiff/node');
|
|
94
|
-
// Structured covers are experimental and can be expensive on real Hermes input.
|
|
95
|
-
// Keep native hdiff as the default unless the server explicitly opts in.
|
|
96
|
-
function resolveChiffHpatchPolicy(policy) {
|
|
97
|
-
var _ref;
|
|
98
|
-
const value = String((_ref = policy != null ? policy : process.env.RNU_CHIFF_HPATCH_POLICY) != null ? _ref : 'off').toLowerCase();
|
|
99
|
-
if (value === 'costed' || value === 'on' || value === 'true' || value === '1') {
|
|
100
|
-
return 'costed';
|
|
101
|
-
}
|
|
102
|
-
return 'off';
|
|
103
|
-
}
|
|
104
|
-
function resolveChiffHpatchMinNativeBytes(value) {
|
|
105
|
-
var _ref;
|
|
106
|
-
const raw = (_ref = value != null ? value : process.env.RNU_CHIFF_HPATCH_MIN_NATIVE_BYTES) != null ? _ref : 4096;
|
|
107
|
-
const parsed = Number(raw);
|
|
108
|
-
if (!Number.isFinite(parsed) || parsed < 0) {
|
|
109
|
-
return 4096;
|
|
110
|
-
}
|
|
111
|
-
return Math.floor(parsed);
|
|
112
|
-
}
|
|
113
|
-
function resolveChiffHpatchExactPolicy(policy) {
|
|
114
|
-
var _ref;
|
|
115
|
-
const value = String((_ref = policy != null ? policy : process.env.RNU_CHIFF_HPATCH_EXACT_COVERS) != null ? _ref : 'off').toLowerCase();
|
|
116
|
-
if (value === 'on' || value === 'true' || value === '1') {
|
|
117
|
-
return 'on';
|
|
118
|
-
}
|
|
119
|
-
return 'off';
|
|
120
|
-
}
|
|
121
|
-
function createChiffAwareHdiff(hdiffModule, chiffModule, policy, minNativeBytes, exactPolicy) {
|
|
122
|
-
const baseDiff = hdiffModule.diff;
|
|
123
|
-
if (!baseDiff) {
|
|
124
|
-
throw new Error((0, _i18n.t)('nodeHdiffpatchRequired', {
|
|
125
|
-
scriptName: _constants.scriptName
|
|
126
|
-
}));
|
|
127
|
-
}
|
|
128
|
-
if (policy === 'off') {
|
|
129
|
-
return baseDiff;
|
|
130
|
-
}
|
|
131
|
-
return (oldSource, newSource)=>{
|
|
132
|
-
const nativeDiff = baseDiff(oldSource, newSource);
|
|
133
|
-
if (!oldSource || !newSource || !hdiffModule.diffWithCovers) {
|
|
134
|
-
return nativeDiff;
|
|
135
|
-
}
|
|
136
|
-
let bestDiff = nativeDiff;
|
|
137
|
-
const tryDiffWithCovers = (covers, mode)=>{
|
|
138
|
-
try {
|
|
139
|
-
const result = hdiffModule.diffWithCovers == null ? void 0 : hdiffModule.diffWithCovers.call(hdiffModule, oldSource, newSource, covers, {
|
|
140
|
-
mode
|
|
141
|
-
});
|
|
142
|
-
if (Buffer.isBuffer(result == null ? void 0 : result.diff) && result.diff.length < bestDiff.length) {
|
|
143
|
-
bestDiff = result.diff;
|
|
144
|
-
}
|
|
145
|
-
} catch (e) {}
|
|
146
|
-
};
|
|
147
|
-
tryDiffWithCovers([], 'native-coalesce');
|
|
148
|
-
if (nativeDiff.length < minNativeBytes) {
|
|
149
|
-
return bestDiff;
|
|
150
|
-
}
|
|
151
|
-
try {
|
|
152
|
-
var _chiffModule_hpatchApproximatePlanResult;
|
|
153
|
-
const approximatePlan = chiffModule == null ? void 0 : (_chiffModule_hpatchApproximatePlanResult = chiffModule.hpatchApproximatePlanResult) == null ? void 0 : _chiffModule_hpatchApproximatePlanResult.call(chiffModule, oldSource, newSource);
|
|
154
|
-
if (Array.isArray(approximatePlan == null ? void 0 : approximatePlan.covers)) {
|
|
155
|
-
tryDiffWithCovers(approximatePlan.covers, 'merge');
|
|
156
|
-
}
|
|
157
|
-
} catch (e) {}
|
|
158
|
-
if (exactPolicy === 'off' || !(chiffModule == null ? void 0 : chiffModule.hpatchCompatiblePlanResult)) {
|
|
159
|
-
return bestDiff;
|
|
160
|
-
}
|
|
161
|
-
try {
|
|
162
|
-
const plan = chiffModule.hpatchCompatiblePlanResult(oldSource, newSource);
|
|
163
|
-
if (Array.isArray(plan.covers)) {
|
|
164
|
-
tryDiffWithCovers(plan.covers, 'replace');
|
|
165
|
-
tryDiffWithCovers(plan.covers, 'merge');
|
|
166
|
-
}
|
|
167
|
-
} catch (e) {}
|
|
168
|
-
return bestDiff;
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
93
|
function basename(fn) {
|
|
172
|
-
const m = /^(.+\/)[
|
|
94
|
+
const m = /^(.+\/)[^/]+\/?$/.exec(fn);
|
|
173
95
|
return m == null ? void 0 : m[1];
|
|
174
96
|
}
|
|
175
97
|
async function diffFromPPK(origin, next, output, diffFn) {
|
|
@@ -276,10 +198,11 @@ async function diffFromPPK(origin, next, output, diffFn) {
|
|
|
276
198
|
}
|
|
277
199
|
}
|
|
278
200
|
//console.log({copies, deletes});
|
|
279
|
-
|
|
201
|
+
const diffManifest = Buffer.from(JSON.stringify({
|
|
280
202
|
copies,
|
|
281
203
|
deletes
|
|
282
|
-
}))
|
|
204
|
+
}));
|
|
205
|
+
zipfile.addBuffer(diffManifest, '__diff.json', (0, _zipoptions.zipOptionsForManifestEntry)(diffManifest.length));
|
|
283
206
|
zipfile.end();
|
|
284
207
|
await writePromise;
|
|
285
208
|
}
|
|
@@ -355,9 +278,10 @@ async function diffFromPackage(origin, next, output, diffFn, originBundleName, t
|
|
|
355
278
|
});
|
|
356
279
|
}
|
|
357
280
|
});
|
|
358
|
-
|
|
281
|
+
const diffManifest = Buffer.from(JSON.stringify({
|
|
359
282
|
copies
|
|
360
|
-
}))
|
|
283
|
+
}));
|
|
284
|
+
zipfile.addBuffer(diffManifest, '__diff.json', (0, _zipoptions.zipOptionsForManifestEntry)(diffManifest.length));
|
|
361
285
|
zipfile.end();
|
|
362
286
|
await writePromise;
|
|
363
287
|
}
|
|
@@ -373,8 +297,7 @@ function resolveDiffImplementation(useHdiff, options) {
|
|
|
373
297
|
scriptName: _constants.scriptName
|
|
374
298
|
}));
|
|
375
299
|
}
|
|
376
|
-
|
|
377
|
-
return createChiffAwareHdiff(hdiffModule, (_options_customChiffModule = options.customChiffModule) != null ? _options_customChiffModule : chiff, resolveChiffHpatchPolicy(options.chiffHpatchPolicy), resolveChiffHpatchMinNativeBytes(options.chiffHpatchMinNativeBytes), resolveChiffHpatchExactPolicy(options.chiffHpatchExactCovers));
|
|
300
|
+
return hdiffModule.diff;
|
|
378
301
|
}
|
|
379
302
|
if (!(bsdiff == null ? void 0 : bsdiff.diff)) {
|
|
380
303
|
throw new Error((0, _i18n.t)('nodeBsdiffRequired', {
|
package/lib/exports.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
export { getSession, loadSession } from './api';
|
|
2
|
+
export { getPlatform, getSelectedApp } from './app';
|
|
3
|
+
export { diffCommands } from './diff';
|
|
1
4
|
export { moduleManager } from './module-manager';
|
|
2
|
-
export { CLIProviderImpl } from './provider';
|
|
3
|
-
export type { CLIProvider, CLIModule, CommandDefinition, CustomWorkflow, WorkflowStep, CommandContext, CommandResult, BundleOptions, PublishOptions, UploadOptions, Platform, Session, Version, Package, } from './types';
|
|
4
5
|
export { builtinModules } from './modules';
|
|
5
|
-
export { bundleModule } from './modules/bundle-module';
|
|
6
|
-
export { versionModule } from './modules/version-module';
|
|
7
6
|
export { appModule } from './modules/app-module';
|
|
8
|
-
export {
|
|
7
|
+
export { bundleModule } from './modules/bundle-module';
|
|
9
8
|
export { packageModule } from './modules/package-module';
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
9
|
+
export { userModule } from './modules/user-module';
|
|
10
|
+
export { versionModule } from './modules/version-module';
|
|
11
|
+
export { CLIProviderImpl } from './provider';
|
|
12
|
+
export type { BundleOptions, CLIModule, CLIProvider, CommandContext, CommandDefinition, CommandResult, CustomWorkflow, Package, Platform, PublishOptions, Session, UploadOptions, Version, WorkflowStep, } from './types';
|
|
13
13
|
export { question, saveToLocal } from './utils';
|
package/lib/exports.js
CHANGED
|
@@ -5,65 +5,65 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
CLIProviderImpl
|
|
12
|
+
get CLIProviderImpl () {
|
|
13
13
|
return _provider.CLIProviderImpl;
|
|
14
14
|
},
|
|
15
|
-
appModule
|
|
15
|
+
get appModule () {
|
|
16
16
|
return _appmodule.appModule;
|
|
17
17
|
},
|
|
18
|
-
builtinModules
|
|
18
|
+
get builtinModules () {
|
|
19
19
|
return _modules.builtinModules;
|
|
20
20
|
},
|
|
21
|
-
bundleModule
|
|
21
|
+
get bundleModule () {
|
|
22
22
|
return _bundlemodule.bundleModule;
|
|
23
23
|
},
|
|
24
|
-
diffCommands
|
|
24
|
+
get diffCommands () {
|
|
25
25
|
return _diff.diffCommands;
|
|
26
26
|
},
|
|
27
|
-
getPlatform
|
|
27
|
+
get getPlatform () {
|
|
28
28
|
return _app.getPlatform;
|
|
29
29
|
},
|
|
30
|
-
getSelectedApp
|
|
30
|
+
get getSelectedApp () {
|
|
31
31
|
return _app.getSelectedApp;
|
|
32
32
|
},
|
|
33
|
-
getSession
|
|
33
|
+
get getSession () {
|
|
34
34
|
return _api.getSession;
|
|
35
35
|
},
|
|
36
|
-
loadSession
|
|
36
|
+
get loadSession () {
|
|
37
37
|
return _api.loadSession;
|
|
38
38
|
},
|
|
39
|
-
moduleManager
|
|
39
|
+
get moduleManager () {
|
|
40
40
|
return _modulemanager.moduleManager;
|
|
41
41
|
},
|
|
42
|
-
packageModule
|
|
42
|
+
get packageModule () {
|
|
43
43
|
return _packagemodule.packageModule;
|
|
44
44
|
},
|
|
45
|
-
question
|
|
45
|
+
get question () {
|
|
46
46
|
return _utils.question;
|
|
47
47
|
},
|
|
48
|
-
saveToLocal
|
|
48
|
+
get saveToLocal () {
|
|
49
49
|
return _utils.saveToLocal;
|
|
50
50
|
},
|
|
51
|
-
userModule
|
|
51
|
+
get userModule () {
|
|
52
52
|
return _usermodule.userModule;
|
|
53
53
|
},
|
|
54
|
-
versionModule
|
|
54
|
+
get versionModule () {
|
|
55
55
|
return _versionmodule.versionModule;
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
|
+
const _api = require("./api");
|
|
59
|
+
const _app = require("./app");
|
|
60
|
+
const _diff = require("./diff");
|
|
58
61
|
const _modulemanager = require("./module-manager");
|
|
59
|
-
const _provider = require("./provider");
|
|
60
62
|
const _modules = require("./modules");
|
|
61
|
-
const _bundlemodule = require("./modules/bundle-module");
|
|
62
|
-
const _versionmodule = require("./modules/version-module");
|
|
63
63
|
const _appmodule = require("./modules/app-module");
|
|
64
|
-
const
|
|
64
|
+
const _bundlemodule = require("./modules/bundle-module");
|
|
65
65
|
const _packagemodule = require("./modules/package-module");
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
const
|
|
66
|
+
const _usermodule = require("./modules/user-module");
|
|
67
|
+
const _versionmodule = require("./modules/version-module");
|
|
68
|
+
const _provider = require("./provider");
|
|
69
69
|
const _utils = require("./utils");
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { moduleManager } from './module-manager';
|
|
3
|
-
export { moduleManager };
|
|
4
3
|
export { CLIProviderImpl } from './provider';
|
|
5
|
-
export type {
|
|
4
|
+
export type { CLIModule, CLIProvider, CommandDefinition, CustomWorkflow, WorkflowStep, } from './types';
|
|
5
|
+
export { moduleManager };
|
package/lib/index.js
CHANGED
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
CLIProviderImpl
|
|
13
|
+
get CLIProviderImpl () {
|
|
14
14
|
return _provider.CLIProviderImpl;
|
|
15
15
|
},
|
|
16
|
-
moduleManager
|
|
16
|
+
get moduleManager () {
|
|
17
17
|
return _modulemanager.moduleManager;
|
|
18
18
|
}
|
|
19
19
|
});
|
package/lib/module-manager.js
CHANGED
|
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
ModuleManager
|
|
12
|
+
get ModuleManager () {
|
|
13
13
|
return ModuleManager;
|
|
14
14
|
},
|
|
15
|
-
moduleManager
|
|
15
|
+
get moduleManager () {
|
|
16
16
|
return moduleManager;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
@@ -164,9 +164,9 @@ const appModule = {
|
|
|
164
164
|
name: 'analyze-apps',
|
|
165
165
|
description: 'Analyze app status',
|
|
166
166
|
execute: async (context, previousResult)=>{
|
|
167
|
+
var _state_appsData;
|
|
167
168
|
console.log('📊 Analyzing app status...');
|
|
168
169
|
const state = (0, _options.toObjectState)(previousResult, {});
|
|
169
|
-
var _state_appsData;
|
|
170
170
|
const appsData = (_state_appsData = state.appsData) != null ? _state_appsData : emptyAppsData;
|
|
171
171
|
const analysis = {
|
|
172
172
|
totalApps: 0,
|
package/lib/modules/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { bundleModule } from './bundle-module';
|
|
2
|
-
export { versionModule } from './version-module';
|
|
3
1
|
export { appModule } from './app-module';
|
|
4
|
-
export {
|
|
2
|
+
export { bundleModule } from './bundle-module';
|
|
5
3
|
export { packageModule } from './package-module';
|
|
4
|
+
export { userModule } from './user-module';
|
|
5
|
+
export { versionModule } from './version-module';
|
|
6
6
|
export declare const builtinModules: import("..").CLIModule[];
|
package/lib/modules/index.js
CHANGED
|
@@ -5,26 +5,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
appModule
|
|
12
|
+
get appModule () {
|
|
13
13
|
return _appmodule.appModule;
|
|
14
14
|
},
|
|
15
|
-
builtinModules
|
|
15
|
+
get builtinModules () {
|
|
16
16
|
return builtinModules;
|
|
17
17
|
},
|
|
18
|
-
bundleModule
|
|
18
|
+
get bundleModule () {
|
|
19
19
|
return _bundlemodule.bundleModule;
|
|
20
20
|
},
|
|
21
|
-
packageModule
|
|
21
|
+
get packageModule () {
|
|
22
22
|
return _packagemodule.packageModule;
|
|
23
23
|
},
|
|
24
|
-
userModule
|
|
24
|
+
get userModule () {
|
|
25
25
|
return _usermodule.userModule;
|
|
26
26
|
},
|
|
27
|
-
versionModule
|
|
27
|
+
get versionModule () {
|
|
28
28
|
return _versionmodule.versionModule;
|
|
29
29
|
}
|
|
30
30
|
});
|