react-native-update-cli 1.8.1 → 1.9.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
@@ -88,6 +88,29 @@
88
88
  }
89
89
  },
90
90
 
91
+ "updateVersionInfo": {
92
+ "options": {
93
+ "platform": {
94
+ "hasValue": true
95
+ },
96
+ "versionId": {
97
+ "hasValue": true
98
+ },
99
+ "name": {
100
+ "default": false,
101
+ "hasValue": true
102
+ },
103
+ "description": {
104
+ "default": false,
105
+ "hasValue": true
106
+ },
107
+ "metaInfo": {
108
+ "default": false,
109
+ "hasValue": true
110
+ }
111
+ }
112
+ },
113
+
91
114
  "build": {
92
115
  "description": "Bundle javascript and copy assets."
93
116
  },
package/lib/versions.js CHANGED
@@ -142,5 +142,17 @@ const commands = exports.commands = {
142
142
  versionId
143
143
  });
144
144
  console.log('操作成功');
145
+ },
146
+ updateVersionInfo: async function ({ args, options }) {
147
+ const platform = (0, _app.checkPlatform)(options.platform || (await (0, _utils.question)('平台(ios/android):')));
148
+ const { appId } = await (0, _app.getSelectedApp)(platform);
149
+ const versionId = options.versionId || (await chooseVersion(appId)).id;
150
+
151
+ const updateParams = {};
152
+ options.name && (updateParams.name = options.name);
153
+ options.description && (updateParams.description = options.description);
154
+ options.metaInfo && (updateParams.metaInfo = options.metaInfo);
155
+ await put(`/app/${appId}/version/${versionId}`, updateParams);
156
+ console.log('操作成功');
145
157
  }
146
158
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update-cli",
3
- "version": "1.8.1",
3
+ "version": "1.9.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/versions.js CHANGED
@@ -149,4 +149,18 @@ export const commands = {
149
149
  });
150
150
  console.log('操作成功');
151
151
  },
152
+ updateVersionInfo: async function ({ args, options }) {
153
+ const platform = checkPlatform(
154
+ options.platform || (await question('平台(ios/android):')),
155
+ );
156
+ const { appId } = await getSelectedApp(platform);
157
+ const versionId = options.versionId || (await chooseVersion(appId)).id;
158
+
159
+ const updateParams = {};
160
+ options.name && (updateParams.name = options.name);
161
+ options.description && (updateParams.description = options.description);
162
+ options.metaInfo && (updateParams.metaInfo = options.metaInfo);
163
+ await put(`/app/${appId}/version/${versionId}`, updateParams);
164
+ console.log('操作成功');
165
+ },
152
166
  };
package/lib/.DS_Store DELETED
Binary file