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.
Files changed (55) hide show
  1. package/lib/api.js +22 -19
  2. package/lib/app.js +9 -9
  3. package/lib/bundle-pack.js +1 -1
  4. package/lib/bundle-runner.js +16 -16
  5. package/lib/diff.js +14 -91
  6. package/lib/exports.d.ts +8 -8
  7. package/lib/exports.js +23 -23
  8. package/lib/index.d.ts +2 -2
  9. package/lib/index.js +3 -3
  10. package/lib/module-manager.js +3 -3
  11. package/lib/modules/app-module.js +1 -1
  12. package/lib/modules/index.d.ts +3 -3
  13. package/lib/modules/index.js +7 -7
  14. package/lib/package.js +9 -9
  15. package/lib/utils/app-info-parser/aab.js +8 -8
  16. package/lib/utils/app-info-parser/ipa.js +1 -1
  17. package/lib/utils/app-info-parser/resource-finder.js +7 -7
  18. package/lib/utils/app-info-parser/utils.d.ts +1 -1
  19. package/lib/utils/app-info-parser/utils.js +10 -10
  20. package/lib/utils/app-info-parser/xml-parser/binary.js +2 -2
  21. package/lib/utils/command-result.js +3 -3
  22. package/lib/utils/constants.js +10 -10
  23. package/lib/utils/git.js +1 -1
  24. package/lib/utils/http-helper.js +5 -5
  25. package/lib/utils/index.js +13 -13
  26. package/lib/utils/latest-version/cli.js +2 -2
  27. package/lib/utils/latest-version/index.d.ts +1 -1
  28. package/lib/utils/latest-version/index.js +12 -12
  29. package/lib/utils/options.js +5 -5
  30. package/lib/utils/plugin-config.js +2 -2
  31. package/lib/utils/zip-entries.js +28 -11
  32. package/lib/utils/zip-options.d.ts +2 -1
  33. package/lib/utils/zip-options.js +17 -8
  34. package/lib/versions.d.ts +1 -1
  35. package/lib/versions.js +9 -13
  36. package/package.json +22 -19
  37. package/src/api.ts +11 -6
  38. package/src/app.ts +5 -4
  39. package/src/bundle-pack.ts +1 -1
  40. package/src/bundle-runner.ts +2 -2
  41. package/src/diff.ts +9 -161
  42. package/src/exports.ts +17 -20
  43. package/src/index.ts +2 -2
  44. package/src/modules/index.ts +3 -3
  45. package/src/package.ts +1 -1
  46. package/src/utils/app-info-parser/aab.ts +1 -1
  47. package/src/utils/app-info-parser/ipa.ts +1 -1
  48. package/src/utils/app-info-parser/utils.ts +5 -5
  49. package/src/utils/git.ts +1 -1
  50. package/src/utils/index.ts +4 -5
  51. package/src/utils/latest-version/cli.ts +4 -4
  52. package/src/utils/latest-version/index.ts +5 -6
  53. package/src/utils/zip-entries.ts +26 -8
  54. package/src/utils/zip-options.ts +7 -7
  55. 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[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- closeSession: function() {
12
+ get closeSession () {
13
13
  return closeSession;
14
14
  },
15
- doDelete: function() {
15
+ get doDelete () {
16
16
  return doDelete;
17
17
  },
18
- get: function() {
18
+ get get () {
19
19
  return get;
20
20
  },
21
- getAllPackages: function() {
21
+ get getAllPackages () {
22
22
  return getAllPackages;
23
23
  },
24
- getApiToken: function() {
24
+ get getApiToken () {
25
25
  return getApiToken;
26
26
  },
27
- getSession: function() {
27
+ get getSession () {
28
28
  return getSession;
29
29
  },
30
- loadSession: function() {
30
+ get loadSession () {
31
31
  return loadSession;
32
32
  },
33
- post: function() {
33
+ get post () {
34
34
  return post;
35
35
  },
36
- put: function() {
36
+ get put () {
37
37
  return put;
38
38
  },
39
- replaceSession: function() {
39
+ get replaceSession () {
40
40
  return replaceSession;
41
41
  },
42
- saveSession: function() {
42
+ get saveSession () {
43
43
  return saveSession;
44
44
  },
45
- setApiToken: function() {
45
+ get setApiToken () {
46
46
  return setApiToken;
47
47
  },
48
- uploadFile: function() {
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[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- appCommands: function() {
12
+ get appCommands () {
13
13
  return appCommands;
14
14
  },
15
- assertPlatform: function() {
15
+ get assertPlatform () {
16
16
  return assertPlatform;
17
17
  },
18
- chooseApp: function() {
18
+ get chooseApp () {
19
19
  return chooseApp;
20
20
  },
21
- getPlatform: function() {
21
+ get getPlatform () {
22
22
  return getPlatform;
23
23
  },
24
- getSelectedApp: function() {
24
+ get getSelectedApp () {
25
25
  return getSelectedApp;
26
26
  },
27
- listApp: function() {
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
  }
@@ -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");
@@ -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[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- copyDebugidForSentry: function() {
12
+ get copyDebugidForSentry () {
13
13
  return copyDebugidForSentry;
14
14
  },
15
- hasProjectDependency: function() {
15
+ get hasProjectDependency () {
16
16
  return hasProjectDependency;
17
17
  },
18
- resolveExpoCli: function() {
18
+ get resolveExpoCli () {
19
19
  return resolveExpoCli;
20
20
  },
21
- runReactNativeBundleCommand: function() {
21
+ get runReactNativeBundleCommand () {
22
22
  return runReactNativeBundleCommand;
23
23
  },
24
- uploadSourcemapForSentry: function() {
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 (e) {
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 (e) {
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 (e) {
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 (e) {
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 (e) {
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 (e) {
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 (e) {
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 (e) {
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[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- diffCommands: function() {
12
+ get diffCommands () {
13
13
  return diffCommands;
14
14
  },
15
- enumZipEntries: function() {
15
+ get enumZipEntries () {
16
16
  return _zipentries.enumZipEntries;
17
17
  },
18
- readEntry: function() {
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 (e) {}
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 = /^(.+\/)[^\/]+\/?$/.exec(fn);
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
- zipfile.addBuffer(Buffer.from(JSON.stringify({
201
+ const diffManifest = Buffer.from(JSON.stringify({
280
202
  copies,
281
203
  deletes
282
- })), '__diff.json', (0, _zipoptions.zipOptionsForManifestEntry)());
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
- zipfile.addBuffer(Buffer.from(JSON.stringify({
281
+ const diffManifest = Buffer.from(JSON.stringify({
359
282
  copies
360
- })), '__diff.json', (0, _zipoptions.zipOptionsForManifestEntry)());
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
- var _options_customChiffModule;
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 { userModule } from './modules/user-module';
7
+ export { bundleModule } from './modules/bundle-module';
9
8
  export { packageModule } from './modules/package-module';
10
- export { loadSession, getSession } from './api';
11
- export { getPlatform, getSelectedApp } from './app';
12
- export { diffCommands } from './diff';
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[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- CLIProviderImpl: function() {
12
+ get CLIProviderImpl () {
13
13
  return _provider.CLIProviderImpl;
14
14
  },
15
- appModule: function() {
15
+ get appModule () {
16
16
  return _appmodule.appModule;
17
17
  },
18
- builtinModules: function() {
18
+ get builtinModules () {
19
19
  return _modules.builtinModules;
20
20
  },
21
- bundleModule: function() {
21
+ get bundleModule () {
22
22
  return _bundlemodule.bundleModule;
23
23
  },
24
- diffCommands: function() {
24
+ get diffCommands () {
25
25
  return _diff.diffCommands;
26
26
  },
27
- getPlatform: function() {
27
+ get getPlatform () {
28
28
  return _app.getPlatform;
29
29
  },
30
- getSelectedApp: function() {
30
+ get getSelectedApp () {
31
31
  return _app.getSelectedApp;
32
32
  },
33
- getSession: function() {
33
+ get getSession () {
34
34
  return _api.getSession;
35
35
  },
36
- loadSession: function() {
36
+ get loadSession () {
37
37
  return _api.loadSession;
38
38
  },
39
- moduleManager: function() {
39
+ get moduleManager () {
40
40
  return _modulemanager.moduleManager;
41
41
  },
42
- packageModule: function() {
42
+ get packageModule () {
43
43
  return _packagemodule.packageModule;
44
44
  },
45
- question: function() {
45
+ get question () {
46
46
  return _utils.question;
47
47
  },
48
- saveToLocal: function() {
48
+ get saveToLocal () {
49
49
  return _utils.saveToLocal;
50
50
  },
51
- userModule: function() {
51
+ get userModule () {
52
52
  return _usermodule.userModule;
53
53
  },
54
- versionModule: function() {
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 _usermodule = require("./modules/user-module");
64
+ const _bundlemodule = require("./modules/bundle-module");
65
65
  const _packagemodule = require("./modules/package-module");
66
- const _api = require("./api");
67
- const _app = require("./app");
68
- const _diff = require("./diff");
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 { CLIProvider, CLIModule, CommandDefinition, CustomWorkflow, WorkflowStep, } from './types';
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[name]
9
+ get: Object.getOwnPropertyDescriptor(all, name).get
10
10
  });
11
11
  }
12
12
  _export(exports, {
13
- CLIProviderImpl: function() {
13
+ get CLIProviderImpl () {
14
14
  return _provider.CLIProviderImpl;
15
15
  },
16
- moduleManager: function() {
16
+ get moduleManager () {
17
17
  return _modulemanager.moduleManager;
18
18
  }
19
19
  });
@@ -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[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- ModuleManager: function() {
12
+ get ModuleManager () {
13
13
  return ModuleManager;
14
14
  },
15
- moduleManager: function() {
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,
@@ -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 { userModule } from './user-module';
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[];
@@ -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[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- appModule: function() {
12
+ get appModule () {
13
13
  return _appmodule.appModule;
14
14
  },
15
- builtinModules: function() {
15
+ get builtinModules () {
16
16
  return builtinModules;
17
17
  },
18
- bundleModule: function() {
18
+ get bundleModule () {
19
19
  return _bundlemodule.bundleModule;
20
20
  },
21
- packageModule: function() {
21
+ get packageModule () {
22
22
  return _packagemodule.packageModule;
23
23
  },
24
- userModule: function() {
24
+ get userModule () {
25
25
  return _usermodule.userModule;
26
26
  },
27
- versionModule: function() {
27
+ get versionModule () {
28
28
  return _versionmodule.versionModule;
29
29
  }
30
30
  });