react-native-update-cli 1.46.0 → 1.46.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/lib/app.js CHANGED
@@ -9,15 +9,15 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
+ appCommands: function() {
13
+ return appCommands;
14
+ },
12
15
  assertPlatform: function() {
13
16
  return assertPlatform;
14
17
  },
15
18
  chooseApp: function() {
16
19
  return chooseApp;
17
20
  },
18
- commands: function() {
19
- return commands;
20
- },
21
21
  getPlatform: function() {
22
22
  return getPlatform;
23
23
  },
@@ -108,7 +108,7 @@ async function chooseApp(platform) {
108
108
  }
109
109
  }
110
110
  }
111
- const commands = {
111
+ const appCommands = {
112
112
  createApp: async function({ options }) {
113
113
  const name = options.name || await (0, _utils.question)((0, _i18n.t)('appNameQuestion'));
114
114
  const { downloadUrl } = options;
package/lib/bundle.js CHANGED
@@ -9,8 +9,8 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- commands: function() {
13
- return commands;
12
+ bundleCommands: function() {
13
+ return bundleCommands;
14
14
  },
15
15
  enumZipEntries: function() {
16
16
  return enumZipEntries;
@@ -784,7 +784,7 @@ function diffArgsCheck(args, options, diffFn) {
784
784
  realOutput: output.replace(/\$\{time\}/g, `${Date.now()}`)
785
785
  };
786
786
  }
787
- const commands = {
787
+ const bundleCommands = {
788
788
  bundle: async ({ options })=>{
789
789
  const platform = await (0, _app.getPlatform)(options.platform);
790
790
  const { bundleName, entryFile, intermediaDir, output, dev, sourcemap, taro, expo, rncli, disableHermes, name, description, metaInfo, packageId, packageVersion, minPackageVersion, maxPackageVersion, packageVersionRange, rollout, dryRun } = (0, _utils.translateOptions)({
package/lib/index.js CHANGED
@@ -6,6 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  const _api = require("./api");
7
7
  const _utils = require("./utils");
8
8
  const _i18n = require("./utils/i18n");
9
+ const _bundle = require("./bundle");
10
+ const _versions = require("./versions");
11
+ const _user = require("./user");
12
+ const _app = require("./app");
13
+ const _package = require("./package");
9
14
  function printUsage() {
10
15
  // const commandName = args[0];
11
16
  // TODO: print usage of commandName, or print global usage.
@@ -13,11 +18,11 @@ function printUsage() {
13
18
  process.exit(1);
14
19
  }
15
20
  const commands = {
16
- ...require('./user').commands,
17
- ...require('./bundle').commands,
18
- ...require('./app').commands,
19
- ...require('./package').commands,
20
- ...require('./versions').commands,
21
+ ..._user.userCommands,
22
+ ..._bundle.bundleCommands,
23
+ ..._app.appCommands,
24
+ ..._package.packageCommands,
25
+ ..._versions.versionCommands,
21
26
  help: printUsage
22
27
  };
23
28
  async function run() {
package/lib/package.js CHANGED
@@ -12,11 +12,11 @@ _export(exports, {
12
12
  choosePackage: function() {
13
13
  return choosePackage;
14
14
  },
15
- commands: function() {
16
- return commands;
17
- },
18
15
  listPackage: function() {
19
16
  return listPackage;
17
+ },
18
+ packageCommands: function() {
19
+ return packageCommands;
20
20
  }
21
21
  });
22
22
  const _api = require("./api");
@@ -80,7 +80,7 @@ async function choosePackage(appId) {
80
80
  }
81
81
  }
82
82
  }
83
- const commands = {
83
+ const packageCommands = {
84
84
  uploadIpa: async ({ args })=>{
85
85
  const fn = args[0];
86
86
  if (!fn || !fn.endsWith('.ipa')) {
package/lib/user.js CHANGED
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- Object.defineProperty(exports, "commands", {
5
+ Object.defineProperty(exports, "userCommands", {
6
6
  enumerable: true,
7
7
  get: function() {
8
- return commands;
8
+ return userCommands;
9
9
  }
10
10
  });
11
11
  const _utils = require("./utils");
@@ -20,7 +20,7 @@ function _interop_require_default(obj) {
20
20
  function md5(str) {
21
21
  return _crypto.default.createHash('md5').update(str).digest('hex');
22
22
  }
23
- const commands = {
23
+ const userCommands = {
24
24
  login: async ({ args })=>{
25
25
  const email = args[0] || await (0, _utils.question)('email:');
26
26
  const pwd = args[1] || await (0, _utils.question)('password:', true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update-cli",
3
- "version": "1.46.0",
3
+ "version": "1.46.1",
4
4
  "description": "command line tool for react-native-update (remote updates for react native)",
5
5
  "main": "index.js",
6
6
  "bin": {
package/src/app.ts CHANGED
@@ -66,7 +66,7 @@ export async function chooseApp(platform: Platform) {
66
66
  }
67
67
  }
68
68
 
69
- export const commands = {
69
+ export const appCommands = {
70
70
  createApp: async function ({
71
71
  options,
72
72
  }: {
package/src/bundle.ts CHANGED
@@ -908,7 +908,7 @@ function diffArgsCheck(args: string[], options: any, diffFn: string) {
908
908
  };
909
909
  }
910
910
 
911
- export const commands = {
911
+ export const bundleCommands = {
912
912
  bundle: async ({ options }) => {
913
913
  const platform = await getPlatform(options.platform);
914
914
 
package/src/index.ts CHANGED
@@ -3,6 +3,11 @@
3
3
  import { loadSession } from './api';
4
4
  import { printVersionCommand } from './utils';
5
5
  import { t } from './utils/i18n';
6
+ import { bundleCommands } from './bundle';
7
+ import { versionCommands } from './versions';
8
+ import { userCommands } from './user';
9
+ import { appCommands } from './app';
10
+ import { packageCommands } from './package';
6
11
 
7
12
  function printUsage() {
8
13
  // const commandName = args[0];
@@ -15,11 +20,11 @@ function printUsage() {
15
20
  }
16
21
 
17
22
  const commands = {
18
- ...require('./user').commands,
19
- ...require('./bundle').commands,
20
- ...require('./app').commands,
21
- ...require('./package').commands,
22
- ...require('./versions').commands,
23
+ ...userCommands,
24
+ ...bundleCommands,
25
+ ...appCommands,
26
+ ...packageCommands,
27
+ ...versionCommands,
23
28
  help: printUsage,
24
29
  };
25
30
 
package/src/package.ts CHANGED
@@ -52,7 +52,7 @@ export async function choosePackage(appId: string) {
52
52
  }
53
53
  }
54
54
 
55
- export const commands = {
55
+ export const packageCommands = {
56
56
  uploadIpa: async ({ args }: { args: string[] }) => {
57
57
  const fn = args[0];
58
58
  if (!fn || !fn.endsWith('.ipa')) {
package/src/user.ts CHANGED
@@ -7,7 +7,7 @@ function md5(str: string) {
7
7
  return crypto.createHash('md5').update(str).digest('hex');
8
8
  }
9
9
 
10
- export const commands = {
10
+ export const userCommands = {
11
11
  login: async ({ args }: { args: string[] }) => {
12
12
  const email = args[0] || (await question('email:'));
13
13
  const pwd = args[1] || (await question('password:', true));