react-native-update-cli 2.9.6 → 2.10.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/README.md +6 -9
- package/README.zh-CN.md +6 -9
- package/cli.json +0 -27
- package/lib/api.js +3 -4
- package/lib/app.js +1 -1
- package/lib/bundle-pack.js +1 -1
- package/lib/bundle-runner.js +2 -2
- package/lib/diff.d.ts +0 -4
- package/lib/diff.js +18 -61
- package/lib/exports.d.ts +8 -8
- package/lib/exports.js +7 -7
- package/lib/index.d.ts +2 -2
- package/lib/locales/en.d.ts +0 -1
- package/lib/locales/en.js +0 -1
- package/lib/locales/zh.d.ts +0 -1
- package/lib/locales/zh.js +0 -1
- package/lib/modules/index.d.ts +3 -3
- package/lib/package.js +1 -1
- package/lib/utils/app-info-parser/aab.js +1 -1
- package/lib/utils/app-info-parser/ipa.js +1 -1
- package/lib/utils/app-info-parser/utils.d.ts +1 -1
- package/lib/utils/check-plugin.js +22 -10
- package/lib/utils/git.js +1 -1
- package/lib/utils/index.js +3 -3
- package/lib/utils/latest-version/cli.js +1 -1
- package/lib/utils/latest-version/index.d.ts +1 -1
- package/lib/utils/latest-version/index.js +2 -2
- package/lib/utils/zip-options.d.ts +2 -1
- package/lib/utils/zip-options.js +10 -1
- package/lib/versions.d.ts +1 -1
- package/lib/versions.js +4 -4
- package/package.json +12 -9
- package/src/api.ts +4 -5
- package/src/app.ts +1 -2
- package/src/bundle-pack.ts +1 -1
- package/src/bundle-runner.ts +2 -2
- package/src/diff.ts +15 -64
- package/src/exports.ts +17 -20
- package/src/index.ts +2 -2
- package/src/locales/en.ts +0 -2
- package/src/locales/zh.ts +0 -2
- package/src/modules/index.ts +3 -3
- package/src/package.ts +1 -1
- package/src/utils/app-info-parser/aab.ts +1 -1
- package/src/utils/app-info-parser/ipa.ts +1 -1
- package/src/utils/app-info-parser/utils.ts +5 -5
- package/src/utils/check-plugin.ts +18 -11
- package/src/utils/git.ts +1 -1
- package/src/utils/index.ts +4 -5
- package/src/utils/latest-version/cli.ts +4 -4
- package/src/utils/latest-version/index.ts +5 -6
- package/src/utils/zip-options.ts +5 -1
- package/src/versions.ts +5 -10
package/src/utils/zip-options.ts
CHANGED
|
@@ -7,6 +7,7 @@ export type ZipEntryOptions = {
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export const ZIP_ENTRY_SNIFF_BYTES = 64;
|
|
10
|
+
export const MANIFEST_COMPRESSION_THRESHOLD_BYTES = 256;
|
|
10
11
|
|
|
11
12
|
const alreadyCompressedExtensions = new Set([
|
|
12
13
|
'.7z',
|
|
@@ -136,7 +137,10 @@ export function zipOptionsForPatchEntry(): ZipEntryOptions {
|
|
|
136
137
|
return { compress: false };
|
|
137
138
|
}
|
|
138
139
|
|
|
139
|
-
export function zipOptionsForManifestEntry(): ZipEntryOptions {
|
|
140
|
+
export function zipOptionsForManifestEntry(byteLength = 0): ZipEntryOptions {
|
|
141
|
+
if (byteLength >= MANIFEST_COMPRESSION_THRESHOLD_BYTES) {
|
|
142
|
+
return { compressionLevel: 9 };
|
|
143
|
+
}
|
|
140
144
|
return { compress: false };
|
|
141
145
|
}
|
|
142
146
|
|
package/src/versions.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { doDelete, get, getAllPackages, post, put, uploadFile } from './api';
|
|
2
|
-
import { question, saveToLocal } from './utils';
|
|
3
|
-
import { t } from './utils/i18n';
|
|
4
|
-
|
|
5
1
|
import chalk from 'chalk';
|
|
6
2
|
import { satisfies } from 'compare-versions';
|
|
7
3
|
import Table from 'tty-table';
|
|
4
|
+
import { doDelete, get, getAllPackages, post, put, uploadFile } from './api';
|
|
8
5
|
import { getPlatform, getSelectedApp } from './app';
|
|
9
6
|
import { choosePackage } from './package';
|
|
10
7
|
import type { Package, Platform, Version } from './types';
|
|
8
|
+
import { question, saveToLocal } from './utils';
|
|
11
9
|
import { depVersions } from './utils/dep-versions';
|
|
12
10
|
import { getCommitInfo } from './utils/git';
|
|
11
|
+
import { t } from './utils/i18n';
|
|
13
12
|
|
|
14
13
|
interface VersionCommandOptions {
|
|
15
14
|
appId?: string;
|
|
@@ -496,7 +495,7 @@ export const versionCommands = {
|
|
|
496
495
|
let minPkgVersion = options.minPackageVersion;
|
|
497
496
|
let maxPkgVersion = options.maxPackageVersion;
|
|
498
497
|
let packageVersionRange = options.packageVersionRange;
|
|
499
|
-
let rollout: number | undefined
|
|
498
|
+
let rollout: number | undefined;
|
|
500
499
|
|
|
501
500
|
if (options.rollout !== undefined) {
|
|
502
501
|
rollout = Number.parseInt(options.rollout, 10);
|
|
@@ -604,11 +603,7 @@ export const versionCommands = {
|
|
|
604
603
|
await put(`/app/${String(appId)}/version/${versionId}`, updateParams);
|
|
605
604
|
console.log(t('operationSuccess'));
|
|
606
605
|
},
|
|
607
|
-
deleteVersion: async ({
|
|
608
|
-
options,
|
|
609
|
-
}: {
|
|
610
|
-
options: VersionCommandOptions;
|
|
611
|
-
}) => {
|
|
606
|
+
deleteVersion: async ({ options }: { options: VersionCommandOptions }) => {
|
|
612
607
|
let appId = options.appId;
|
|
613
608
|
if (!appId) {
|
|
614
609
|
const platform = await getPlatform(options.platform);
|