1
0
mirror of https://gitcode.com/github-mirrors/react-native-update-cli.git synced 2025-09-17 18:06:10 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Compare commits

..

2 Commits

Author SHA1 Message Date
sunnylqm
f1d6c3744e v1.7.0 2021-10-18 17:54:07 +08:00
sunnylqm
768484d7b5 Add packageVersion 2021-10-18 17:53:29 +08:00
5 changed files with 3058 additions and 2899 deletions

View File

@@ -80,6 +80,10 @@
},
"packageId": {
"hasValue": true
},
"packageVersion": {
"hasValue": true
}
}
},

View File

@@ -1,6 +1,6 @@
{
"name": "react-native-update-cli",
"version": "1.7.0-beta.0",
"version": "1.7.0",
"description": "Command tools for javaScript updater with `pushy` service for react native apps.",
"main": "index.js",
"bin": {

3035
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -124,7 +124,24 @@ export const commands = {
);
const { appId } = await getSelectedApp(platform);
const versionId = options.versionId || (await chooseVersion(appId)).id;
const pkgId = options.packageId || (await choosePackage(appId)).id;
let pkgId = options.packageId;
if (!pkgId) {
let pkgVersion = options.packageVersion;
if (pkgVersion) {
pkgVersion = pkgVersion.trim();
const { data } = await get(`/app/${appId}/package/list?limit=1000`);
const pkg = data.find((d) => d.name === pkgVersion);
if (pkg) {
pkgId = pkg.id;
} else {
throw new Error(`未查询到匹配原生版本:${pkgVersion}`);
}
}
}
if (!pkgId) {
throw new Error('请提供 packageId 或 packageVersion 参数');
}
await put(`/app/${appId}/package/${pkgId}`, {
versionId,
});

2897
yarn.lock

File diff suppressed because it is too large Load Diff