react-native-update-cli 1.23.1 → 1.24.0

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/cli.json CHANGED
@@ -34,8 +34,20 @@
34
34
  }
35
35
  },
36
36
 
37
- "uploadIpa": {},
38
- "uploadApk": {},
37
+ "uploadIpa": {
38
+ "options": {
39
+ "note": {
40
+ "hasValue": true
41
+ }
42
+ }
43
+ },
44
+ "uploadApk": {
45
+ "options": {
46
+ "note": {
47
+ "hasValue": true
48
+ }
49
+ }
50
+ },
39
51
  "parseIpa": {},
40
52
  "parseApk": {},
41
53
  "packages": {
package/lib/package.js CHANGED
@@ -66,6 +66,7 @@ const commands = exports.commands = {
66
66
  if (!fn || !fn.endsWith('.ipa')) {
67
67
  throw new Error('使用方法: pushy uploadIpa ipa后缀文件');
68
68
  }
69
+ const { note = '' } = options;
69
70
  const {
70
71
  versionName,
71
72
  buildTime,
@@ -87,16 +88,18 @@ const commands = exports.commands = {
87
88
  const { id } = await (0, _api.post)(`/app/${appId}/package/create`, {
88
89
  name: versionName,
89
90
  hash,
90
- buildTime
91
+ buildTime,
92
+ note
91
93
  });
92
94
  (0, _utils.saveToLocal)(fn, `${appId}/package/${id}.ipa`);
93
95
  console.log(`已成功上传ipa原生包(id: ${id}, version: ${versionName}, buildTime: ${buildTime})`);
94
96
  },
95
- uploadApk: async function ({ args }) {
97
+ uploadApk: async function ({ args, options }) {
96
98
  const fn = args[0];
97
99
  if (!fn || !fn.endsWith('.apk')) {
98
100
  throw new Error('使用方法: pushy uploadApk apk后缀文件');
99
101
  }
102
+ const { note = '' } = options;
100
103
  const {
101
104
  versionName,
102
105
  buildTime,
@@ -118,7 +121,8 @@ const commands = exports.commands = {
118
121
  const { id } = await (0, _api.post)(`/app/${appId}/package/create`, {
119
122
  name: versionName,
120
123
  hash,
121
- buildTime
124
+ buildTime,
125
+ note
122
126
  });
123
127
  (0, _utils.saveToLocal)(fn, `${appId}/package/${id}.apk`);
124
128
  console.log(`已成功上传apk原生包(id: ${id}, version: ${versionName}, buildTime: ${buildTime})`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update-cli",
3
- "version": "1.23.1",
3
+ "version": "1.24.0",
4
4
  "description": "Command tools for javaScript updater with `pushy` service for react native apps.",
5
5
  "main": "index.js",
6
6
  "bin": {
package/src/package.js CHANGED
@@ -53,6 +53,7 @@ export const commands = {
53
53
  if (!fn || !fn.endsWith('.ipa')) {
54
54
  throw new Error('使用方法: pushy uploadIpa ipa后缀文件');
55
55
  }
56
+ const { note = '' } = options;
56
57
  const {
57
58
  versionName,
58
59
  buildTime,
@@ -79,17 +80,19 @@ export const commands = {
79
80
  name: versionName,
80
81
  hash,
81
82
  buildTime,
83
+ note,
82
84
  });
83
85
  saveToLocal(fn, `${appId}/package/${id}.ipa`);
84
86
  console.log(
85
87
  `已成功上传ipa原生包(id: ${id}, version: ${versionName}, buildTime: ${buildTime})`,
86
88
  );
87
89
  },
88
- uploadApk: async function ({ args }) {
90
+ uploadApk: async function ({ args, options }) {
89
91
  const fn = args[0];
90
92
  if (!fn || !fn.endsWith('.apk')) {
91
93
  throw new Error('使用方法: pushy uploadApk apk后缀文件');
92
94
  }
95
+ const { note = '' } = options;
93
96
  const {
94
97
  versionName,
95
98
  buildTime,
@@ -116,6 +119,7 @@ export const commands = {
116
119
  name: versionName,
117
120
  hash,
118
121
  buildTime,
122
+ note,
119
123
  });
120
124
  saveToLocal(fn, `${appId}/package/${id}.apk`);
121
125
  console.log(