mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-17 18:06:10 +08:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
26725200b7 | ||
![]() |
8bd31b8dc1 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-update-cli",
|
||||
"version": "1.38.0",
|
||||
"version": "1.38.1",
|
||||
"description": "Command tools for javaScript updater with `pushy` service for react native apps.",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
|
@@ -101,6 +101,7 @@ function queryWithBody(method: string) {
|
||||
});
|
||||
}
|
||||
|
||||
export const get = queryWithoutBody('GET');
|
||||
export const post = queryWithBody('POST');
|
||||
export const put = queryWithBody('PUT');
|
||||
export const doDelete = queryWithBody('DELETE');
|
||||
|
@@ -112,14 +112,14 @@ export const commands = {
|
||||
await this.update({ args: [], options: { versionId: id, platform } });
|
||||
}
|
||||
},
|
||||
versions: async function ({ options }) {
|
||||
versions: async ({ options }) => {
|
||||
const platform = checkPlatform(
|
||||
options.platform || (await question('平台(ios/android/harmony):')),
|
||||
);
|
||||
const { appId } = await getSelectedApp(platform);
|
||||
await listVersions(appId);
|
||||
},
|
||||
update: async function ({ args, options }) {
|
||||
update: async ({ args, options }) => {
|
||||
const platform = checkPlatform(
|
||||
options.platform || (await question('平台(ios/android/harmony):')),
|
||||
);
|
||||
@@ -138,7 +138,7 @@ export const commands = {
|
||||
rollout = null;
|
||||
} else {
|
||||
try {
|
||||
rollout = parseInt(rollout);
|
||||
rollout = Number.parseInt(rollout);
|
||||
} catch (e) {
|
||||
throw new Error('rollout 必须是 1-100 的整数');
|
||||
}
|
||||
@@ -173,7 +173,9 @@ export const commands = {
|
||||
await put(`/app/${appId}/package/${pkg.id}`, {
|
||||
versionId,
|
||||
});
|
||||
console.log(`已将热更版本 ${versionId} 绑定到原生版本 ${pkg.name} (id: ${pkg.id})`);
|
||||
console.log(
|
||||
`已将热更版本 ${versionId} 绑定到原生版本 ${pkg.name} (id: ${pkg.id})`,
|
||||
);
|
||||
}
|
||||
console.log(`操作完成,共已绑定 ${pkgs.length} 个原生版本`);
|
||||
return;
|
||||
@@ -205,7 +207,9 @@ export const commands = {
|
||||
await put(`/app/${appId}/package/${pkg.id}`, {
|
||||
versionId,
|
||||
});
|
||||
console.log(`已将热更版本 ${versionId} 绑定到原生版本 ${pkg.name} (id: ${pkg.id})`);
|
||||
console.log(
|
||||
`已将热更版本 ${versionId} 绑定到原生版本 ${pkg.name} (id: ${pkg.id})`,
|
||||
);
|
||||
}
|
||||
console.log(`操作完成,共已绑定 ${pkgs.length} 个原生版本`);
|
||||
return;
|
||||
@@ -251,9 +255,11 @@ export const commands = {
|
||||
await put(`/app/${appId}/package/${pkgId}`, {
|
||||
versionId,
|
||||
});
|
||||
console.log(`已将热更版本 ${versionId} 绑定到原生版本 ${pkgVersion} (id: ${pkgId})`);
|
||||
console.log(
|
||||
`已将热更版本 ${versionId} 绑定到原生版本 ${pkgVersion} (id: ${pkgId})`,
|
||||
);
|
||||
},
|
||||
updateVersionInfo: async function ({ args, options }) {
|
||||
updateVersionInfo: async ({ args, options }) => {
|
||||
const platform = checkPlatform(
|
||||
options.platform || (await question('平台(ios/android/harmony):')),
|
||||
);
|
||||
|
Reference in New Issue
Block a user