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

Compare commits

...

2 Commits

3 changed files with 8 additions and 29 deletions

View File

@@ -1,17 +1,13 @@
{
"name": "react-native-update-cli",
"version": "2.3.2",
"version": "2.4.1",
"description": "command line tool for react-native-update (remote updates for react native)",
"main": "index.js",
"bin": {
"pushy": "lib/index.js",
"cresc": "lib/index.js"
},
"files": [
"lib",
"src",
"cli.json"
],
"files": ["lib", "src", "cli.json"],
"scripts": {
"build": "swc src -d lib --strip-leading-paths",
"prepublishOnly": "npm run build && chmod +x lib/index.js",
@@ -21,13 +17,7 @@
"type": "git",
"url": "git+https://github.com/reactnativecn/react-native-update-cli.git"
},
"keywords": [
"react-native",
"ios",
"android",
"harmony",
"update"
],
"keywords": ["react-native", "ios", "android", "harmony", "update"],
"author": "reactnativecn",
"license": "BSD-3-Clause",
"bugs": {
@@ -81,8 +71,5 @@
"@types/yazl": "^2.4.6",
"typescript": "^5.8.3"
},
"trustedDependencies": [
"@biomejs/biome",
"@swc/core"
]
"trustedDependencies": ["@biomejs/biome", "@swc/core"]
}

View File

@@ -1,4 +1,5 @@
import { defaultEndpoints } from './constants';
import fetch from 'node-fetch';
// const baseUrl = `http://localhost:9000`;
// let baseUrl = SERVER.main[0];

View File

@@ -122,17 +122,6 @@ export const bindVersionToPackages = async ({
console.log(chalk.yellow(t('dryRun')));
}
if (rollout !== undefined) {
const rolloutConfig: Record<string, number> = {};
for (const pkg of pkgs) {
rolloutConfig[pkg.name] = rollout;
}
if (!dryRun) {
await put(`/app/${appId}/version/${versionId}`, {
config: {
rollout: rolloutConfig,
},
});
}
console.log(
`${t('rolloutConfigSet', {
versions: pkgs.map((pkg: Package) => pkg.name).join(', '),
@@ -142,8 +131,10 @@ export const bindVersionToPackages = async ({
}
for (const pkg of pkgs) {
if (!dryRun) {
await put(`/app/${appId}/package/${pkg.id}`, {
await post(`/app/${appId}/binding`, {
versionId,
rollout,
packageId: pkg.id,
});
}
console.log(