react-native-update-cli 1.44.0 → 1.44.2
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 +13 -1
- package/lib/bundle.js +37 -18
- package/lib/index.js +0 -1
- package/lib/locales/en.js +80 -61
- package/lib/locales/zh.js +79 -61
- package/lib/package.js +49 -18
- package/lib/utils/dep-versions.js +20 -18
- package/lib/utils/i18n.js +3 -0
- package/lib/versions.js +1 -1
- package/package.json +1 -1
- package/src/bundle.ts +74 -35
- package/src/index.ts +0 -1
- package/src/locales/en.ts +102 -72
- package/src/locales/zh.ts +97 -68
- package/src/package.ts +18 -35
- package/src/utils/dep-versions.ts +14 -12
- package/src/utils/i18n.ts +3 -0
- package/src/versions.ts +9 -7
package/cli.json
CHANGED
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"description": "Bundle javascript and copy assets."
|
|
119
119
|
},
|
|
120
120
|
"bundle": {
|
|
121
|
-
"description": "Bundle javascript code only.",
|
|
121
|
+
"description": "Bundle javascript code only and optionally publish.",
|
|
122
122
|
"options": {
|
|
123
123
|
"dev": {
|
|
124
124
|
"default": "false",
|
|
@@ -157,6 +157,18 @@
|
|
|
157
157
|
},
|
|
158
158
|
"disableHermes": {
|
|
159
159
|
"default": false
|
|
160
|
+
},
|
|
161
|
+
"name": {
|
|
162
|
+
"hasValue": true,
|
|
163
|
+
"description": "Version name for publishing"
|
|
164
|
+
},
|
|
165
|
+
"description": {
|
|
166
|
+
"hasValue": true,
|
|
167
|
+
"description": "Version description for publishing"
|
|
168
|
+
},
|
|
169
|
+
"metaInfo": {
|
|
170
|
+
"hasValue": true,
|
|
171
|
+
"description": "Meta information for publishing"
|
|
160
172
|
}
|
|
161
173
|
}
|
|
162
174
|
},
|
package/lib/bundle.js
CHANGED
|
@@ -15,8 +15,8 @@ _export(exports, {
|
|
|
15
15
|
enumZipEntries: function() {
|
|
16
16
|
return enumZipEntries;
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
return
|
|
18
|
+
readEntry: function() {
|
|
19
|
+
return readEntry;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
@@ -33,6 +33,7 @@ const _i18n = require("./utils/i18n");
|
|
|
33
33
|
const _constants = require("./utils/constants");
|
|
34
34
|
const _checklockfile = require("./utils/check-lockfile");
|
|
35
35
|
const _addgitignore = require("./utils/add-gitignore");
|
|
36
|
+
const _versions = require("./versions");
|
|
36
37
|
function _interop_require_default(obj) {
|
|
37
38
|
return obj && obj.__esModule ? obj : {
|
|
38
39
|
default: obj
|
|
@@ -95,7 +96,7 @@ async function runReactNativeBundleCommand({ bundleName, dev, entryFile, outputF
|
|
|
95
96
|
if (platform === 'android') {
|
|
96
97
|
gradleConfig = await checkGradleConfig();
|
|
97
98
|
if (gradleConfig.crunchPngs !== false) {
|
|
98
|
-
console.warn(
|
|
99
|
+
console.warn((0, _i18n.t)('androidCrunchPngsWarning'));
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
const reactNativeBundleArgs = [];
|
|
@@ -317,7 +318,7 @@ async function checkGradleConfig() {
|
|
|
317
318
|
};
|
|
318
319
|
}
|
|
319
320
|
async function compileHermesByteCode(bundleName, outputFolder, sourcemapOutput, shouldCleanSourcemap) {
|
|
320
|
-
console.log(
|
|
321
|
+
console.log((0, _i18n.t)('hermesEnabledCompiling'));
|
|
321
322
|
// >= rn 0.69
|
|
322
323
|
const rnDir = _nodepath.default.dirname(require.resolve('react-native', {
|
|
323
324
|
paths: [
|
|
@@ -405,7 +406,7 @@ async function uploadSourcemapForSentry(bundleName, outputFolder, sourcemapOutpu
|
|
|
405
406
|
]
|
|
406
407
|
});
|
|
407
408
|
} catch (error) {
|
|
408
|
-
console.error(
|
|
409
|
+
console.error((0, _i18n.t)('sentryCliNotFound'));
|
|
409
410
|
return;
|
|
410
411
|
}
|
|
411
412
|
if (!_fsextra.existsSync(sentryCliPath)) {
|
|
@@ -484,7 +485,7 @@ async function pack(dir, output) {
|
|
|
484
485
|
file: output
|
|
485
486
|
}));
|
|
486
487
|
}
|
|
487
|
-
function
|
|
488
|
+
function readEntry(entry, zipFile) {
|
|
488
489
|
const buffers = [];
|
|
489
490
|
return new Promise((resolve, reject)=>{
|
|
490
491
|
zipFile.openReadStream(entry, (err, stream)=>{
|
|
@@ -519,7 +520,7 @@ async function diffFromPPK(origin, next, output) {
|
|
|
519
520
|
originMap[entry.crc32] = entry.fileName;
|
|
520
521
|
if (entry.fileName === 'index.bundlejs' || entry.fileName === 'bundle.harmony.js') {
|
|
521
522
|
// This is source.
|
|
522
|
-
return
|
|
523
|
+
return readEntry(entry, zipFile).then((v)=>originSource = v);
|
|
523
524
|
}
|
|
524
525
|
}
|
|
525
526
|
});
|
|
@@ -558,14 +559,14 @@ async function diffFromPPK(origin, next, output) {
|
|
|
558
559
|
}
|
|
559
560
|
} else if (entry.fileName === 'index.bundlejs') {
|
|
560
561
|
//console.log('Found bundle');
|
|
561
|
-
return
|
|
562
|
+
return readEntry(entry, nextZipfile).then((newSource)=>{
|
|
562
563
|
//console.log('Begin diff');
|
|
563
564
|
zipfile.addBuffer(diff(originSource, newSource), 'index.bundlejs.patch');
|
|
564
565
|
//console.log('End diff');
|
|
565
566
|
});
|
|
566
567
|
} else if (entry.fileName === 'bundle.harmony.js') {
|
|
567
568
|
//console.log('Found bundle');
|
|
568
|
-
return
|
|
569
|
+
return readEntry(entry, nextZipfile).then((newSource)=>{
|
|
569
570
|
//console.log('Begin diff');
|
|
570
571
|
zipfile.addBuffer(diff(originSource, newSource), 'bundle.harmony.js.patch');
|
|
571
572
|
//console.log('End diff');
|
|
@@ -636,7 +637,7 @@ async function diffFromPackage(origin, next, output, originBundleName, transform
|
|
|
636
637
|
originMap[entry.crc32] = fn;
|
|
637
638
|
if (fn === originBundleName) {
|
|
638
639
|
// This is source.
|
|
639
|
-
return
|
|
640
|
+
return readEntry(entry, zipFile).then((v)=>originSource = v);
|
|
640
641
|
}
|
|
641
642
|
}
|
|
642
643
|
});
|
|
@@ -659,14 +660,14 @@ async function diffFromPackage(origin, next, output, originBundleName, transform
|
|
|
659
660
|
zipfile.addEmptyDirectory(entry.fileName);
|
|
660
661
|
} else if (entry.fileName === 'index.bundlejs') {
|
|
661
662
|
//console.log('Found bundle');
|
|
662
|
-
return
|
|
663
|
+
return readEntry(entry, nextZipfile).then((newSource)=>{
|
|
663
664
|
//console.log('Begin diff');
|
|
664
665
|
zipfile.addBuffer(diff(originSource, newSource), 'index.bundlejs.patch');
|
|
665
666
|
//console.log('End diff');
|
|
666
667
|
});
|
|
667
668
|
} else if (entry.fileName === 'bundle.harmony.js') {
|
|
668
669
|
//console.log('Found bundle');
|
|
669
|
-
return
|
|
670
|
+
return readEntry(entry, nextZipfile).then((newSource)=>{
|
|
670
671
|
//console.log('Begin diff');
|
|
671
672
|
zipfile.addBuffer(diff(originSource, newSource), 'bundle.harmony.js.patch');
|
|
672
673
|
//console.log('End diff');
|
|
@@ -778,8 +779,8 @@ function diffArgsCheck(args, options, diffFn) {
|
|
|
778
779
|
}
|
|
779
780
|
const commands = {
|
|
780
781
|
bundle: async function({ options }) {
|
|
781
|
-
const platform = (0, _app.checkPlatform)(options.platform || await (0, _utils.question)(
|
|
782
|
-
const { bundleName, entryFile, intermediaDir, output, dev, sourcemap, taro, expo, rncli, disableHermes } = (0, _utils.translateOptions)({
|
|
782
|
+
const platform = (0, _app.checkPlatform)(options.platform || await (0, _utils.question)((0, _i18n.t)('platformPrompt')));
|
|
783
|
+
const { bundleName, entryFile, intermediaDir, output, dev, sourcemap, taro, expo, rncli, disableHermes, name, description, metaInfo } = (0, _utils.translateOptions)({
|
|
783
784
|
...options,
|
|
784
785
|
tempDir: _constants.tempDir,
|
|
785
786
|
platform
|
|
@@ -810,20 +811,38 @@ const commands = {
|
|
|
810
811
|
}
|
|
811
812
|
});
|
|
812
813
|
await pack(_nodepath.default.resolve(intermediaDir), realOutput);
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
const versionName = await this.publish({
|
|
814
|
+
if (name) {
|
|
815
|
+
const versionName = await _versions.commands.publish({
|
|
816
816
|
args: [
|
|
817
817
|
realOutput
|
|
818
818
|
],
|
|
819
819
|
options: {
|
|
820
|
-
platform
|
|
820
|
+
platform,
|
|
821
|
+
name,
|
|
822
|
+
description,
|
|
823
|
+
metaInfo
|
|
821
824
|
}
|
|
822
825
|
});
|
|
823
826
|
if (isSentry) {
|
|
824
827
|
await copyDebugidForSentry(bundleName, intermediaDir, sourcemapOutput);
|
|
825
828
|
await uploadSourcemapForSentry(bundleName, intermediaDir, sourcemapOutput, versionName);
|
|
826
829
|
}
|
|
830
|
+
} else if (!options['no-interactive']) {
|
|
831
|
+
const v = await (0, _utils.question)((0, _i18n.t)('uploadBundlePrompt'));
|
|
832
|
+
if (v.toLowerCase() === 'y') {
|
|
833
|
+
const versionName = await _versions.commands.publish({
|
|
834
|
+
args: [
|
|
835
|
+
realOutput
|
|
836
|
+
],
|
|
837
|
+
options: {
|
|
838
|
+
platform
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
if (isSentry) {
|
|
842
|
+
await copyDebugidForSentry(bundleName, intermediaDir, sourcemapOutput);
|
|
843
|
+
await uploadSourcemapForSentry(bundleName, intermediaDir, sourcemapOutput, versionName);
|
|
844
|
+
}
|
|
845
|
+
}
|
|
827
846
|
}
|
|
828
847
|
},
|
|
829
848
|
async diff ({ args, options }) {
|
package/lib/index.js
CHANGED
|
@@ -9,7 +9,6 @@ const _i18n = require("./utils/i18n");
|
|
|
9
9
|
function printUsage() {
|
|
10
10
|
// const commandName = args[0];
|
|
11
11
|
// TODO: print usage of commandName, or print global usage.
|
|
12
|
-
console.log('Usage is under development now.');
|
|
13
12
|
console.log('Visit `https://github.com/reactnativecn/react-native-update` for document.');
|
|
14
13
|
process.exit(1);
|
|
15
14
|
}
|
package/lib/locales/en.js
CHANGED
|
@@ -9,9 +9,46 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _default = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
addedToGitignore: 'Added {{line}} to .gitignore',
|
|
13
|
+
androidCrunchPngsWarning: 'The crunchPngs option of android seems not disabled (Please ignore this warning if already disabled), which may cause abnormal consumption of mobile network traffic. Please refer to https://cresc.dev/docs/getting-started#disable-crunchpngs-on-android \n',
|
|
14
|
+
appId: 'App ID',
|
|
15
|
+
appIdMismatchApk: 'App ID mismatch! Current APK: {{appIdInPkg}}, current update.json: {{appId}}',
|
|
16
|
+
appIdMismatchApp: 'App ID mismatch! Current APP: {{appIdInPkg}}, current update.json: {{appId}}',
|
|
17
|
+
appIdMismatchIpa: 'App ID mismatch! Current IPA: {{appIdInPkg}}, current update.json: {{appId}}',
|
|
18
|
+
appKeyMismatchApk: 'App Key mismatch! Current APK: {{appKeyInPkg}}, current update.json: {{appKey}}',
|
|
19
|
+
appKeyMismatchApp: 'App Key mismatch! Current APP: {{appKeyInPkg}}, current update.json: {{appKey}}',
|
|
20
|
+
appKeyMismatchIpa: 'App Key mismatch! Current IPA: {{appKeyInPkg}}, current update.json: {{appKey}}',
|
|
21
|
+
appName: 'App Name',
|
|
22
|
+
appNameQuestion: 'App Name:',
|
|
23
|
+
appNotSelected: 'App not selected. run `cresc selectApp --platform {{platform}}` first!',
|
|
24
|
+
appUploadSuccess: 'Successfully uploaded APP native package (id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
|
|
25
|
+
apkUploadSuccess: 'Successfully uploaded APK native package (id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
|
|
26
|
+
boundTo: ', bound to: {{name}} ({{id}})',
|
|
27
|
+
buildTimeNotFound: 'Cannot get the build timestamp of this package. Please update `react-native-update` to the latest version and re-package and upload.',
|
|
28
|
+
bundleCommandError: '"react-native bundle" command exited with code {{code}}.',
|
|
29
|
+
bundleNotFound: 'Bundle file not found. Please ensure that this {{packageType}} is a release version and the bundle file name is the default `{{entryFile}}`',
|
|
30
|
+
bundlingWithRN: 'Bundling with react-native: {{version}}',
|
|
31
|
+
cancelled: 'Cancelled',
|
|
32
|
+
composingSourceMap: 'Composing source map',
|
|
33
|
+
copyFileFailed: 'Failed to copy file: {{error}}',
|
|
34
|
+
copyHarmonyBundleError: 'Error copying Harmony bundle: {{error}}',
|
|
35
|
+
copyingDebugId: 'Copying debugid',
|
|
36
|
+
createAppSuccess: 'App created successfully (id: {{id}})',
|
|
37
|
+
deleteFile: 'Delete {{- file}}',
|
|
38
|
+
deletingFile: 'Delete {{- file}}',
|
|
39
|
+
enterAppIdQuestion: 'Enter AppId:',
|
|
40
|
+
enterNativePackageId: 'Enter native package ID:',
|
|
41
|
+
errorInHarmonyApp: 'Error in getEntryFromHarmonyApp: {{error}}',
|
|
42
|
+
expiredStatus: '(Expired)',
|
|
43
|
+
failedToParseIcon: '[Warning] failed to parse icon: {{error}}',
|
|
44
|
+
failedToParseUpdateJson: 'Failed to parse file `update.json`. Try to remove it manually.',
|
|
45
|
+
fileGenerated: '{{- file}} generated.',
|
|
46
|
+
fileSizeExceeded: 'This file size is {{fileSize}} , exceeding the current quota {{maxSize}} . You may consider upgrading to a higher plan to increase this quota. Details can be found at: {{- pricingPageUrl}}',
|
|
47
|
+
hermesDisabled: 'Hermes disabled',
|
|
48
|
+
hermesEnabledCompiling: 'Hermes enabled, now compiling to hermes bytecode:\n',
|
|
49
|
+
ipaUploadSuccess: 'Successfully uploaded IPA native package (id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
|
|
50
|
+
keyStrings: 'Key strings:',
|
|
51
|
+
latestVersionTag: '(latest: {{version}})',
|
|
15
52
|
lockBestPractice: `
|
|
16
53
|
Best practices for lock files:
|
|
17
54
|
1. All members of the development team should use the same package manager to maintain a single lock file.
|
|
@@ -19,72 +56,54 @@ Best practices for lock files:
|
|
|
19
56
|
3. Pay attention to changes in the lock file during code review.
|
|
20
57
|
This can reduce the risk of inconsistent dependencies and supply chain attacks.
|
|
21
58
|
`,
|
|
59
|
+
lockNotFound: 'No lock file detected, which may cause inconsistent dependencies and hot-updating issues.',
|
|
60
|
+
loggedOut: 'Logged out',
|
|
22
61
|
loginExpired: 'Login information has expired. Please use `cresc login` command to re-login',
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
62
|
+
loginFirst: 'Not logged in.\nPlease run `cresc login` in the project directory to login.',
|
|
63
|
+
multipleLocksFound: 'Multiple lock files detected ({{- lockFiles}}), which may cause inconsistent dependencies and hot-updating issues.',
|
|
64
|
+
nativePackageId: 'Native Package ID',
|
|
65
|
+
nativeVersion: 'Native Version',
|
|
66
|
+
nativeVersionNotFound: 'No native version found >= {{version}}',
|
|
67
|
+
nativeVersionNotFoundLess: 'No native version found <= {{version}}',
|
|
68
|
+
nativeVersionNotFoundMatch: 'No matching native version found: {{version}}',
|
|
69
|
+
offset: 'Offset {{offset}}',
|
|
70
|
+
operationComplete: 'Operation complete, bound to {{count}} native versions',
|
|
71
|
+
operationSuccess: 'Operation successful',
|
|
72
|
+
packageIdRequired: 'Please provide packageId or packageVersion parameter',
|
|
73
|
+
packageUploadSuccess: 'Successfully uploaded new hot update package (id: {{id}})',
|
|
74
|
+
packing: 'Packing',
|
|
75
|
+
pausedStatus: '(Paused)',
|
|
31
76
|
platform: 'Platform',
|
|
32
|
-
|
|
33
|
-
appNotSelected: 'App not selected. run `cresc selectApp --platform {{platform}}` first!',
|
|
34
|
-
enterAppIdQuestion: 'Enter AppId:',
|
|
35
|
-
appNameQuestion: 'App Name:',
|
|
77
|
+
platformPrompt: 'Platform (ios/android/harmony):',
|
|
36
78
|
platformQuestion: 'Platform(ios/android/harmony):',
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
failedToParseUpdateJson: 'Failed to parse file `update.json`. Try to remove it manually.',
|
|
79
|
+
platformRequired: 'Platform must be specified.',
|
|
80
|
+
pluginDetectionError: 'error while detecting {{name}} plugin: {{error}}',
|
|
81
|
+
pluginDetected: 'detected {{name}} plugin',
|
|
41
82
|
ppkPackageGenerated: 'ppk package generated and saved to: {{- output}}',
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
83
|
+
processingError: 'Error processing file: {{error}}',
|
|
84
|
+
processingPackage: 'Processing the package {{count}} ...',
|
|
85
|
+
processingStringPool: 'Processing the string pool ...',
|
|
86
|
+
publishUsage: 'Usage: pushy publish <ppk file> --platform ios|android|harmony',
|
|
87
|
+
rnuVersionNotFound: 'react-native-update: Cannot get the version number. Please run the command in the project directory',
|
|
88
|
+
rolloutConfigSet: 'Set {{rollout}}% rollout for version {{version}} on native version(s) {{versions}}',
|
|
89
|
+
rolloutRangeError: 'rollout must be an integer between 1-100',
|
|
90
|
+
runningHermesc: 'Running hermesc: {{- command}} {{- args}}',
|
|
50
91
|
sentryCliNotFound: 'Cannot find Sentry CLI tool, please make sure @sentry/cli is properly installed',
|
|
51
92
|
sentryReleaseCreated: 'Sentry release created for version: {{version}}',
|
|
93
|
+
totalApps: 'Total {{count}} {{platform}} apps',
|
|
94
|
+
totalPackages: 'Total {{count}} packages',
|
|
95
|
+
typeStrings: 'Type strings:',
|
|
96
|
+
unsupportedPlatform: 'Unsupported platform `{{platform}}`',
|
|
97
|
+
uploadBundlePrompt: 'Upload this bundle now?(Y/N)',
|
|
52
98
|
uploadingSourcemap: 'Uploading sourcemap',
|
|
53
|
-
packing: 'Packing',
|
|
54
|
-
deletingFile: 'Delete {{- file}}',
|
|
55
|
-
bundlingWithRN: 'Bundling with react-native: {{version}}',
|
|
56
|
-
fileGenerated: '{{- file}} generated.',
|
|
57
|
-
processingError: 'Error processing file: {{error}}',
|
|
58
99
|
usageDiff: 'Usage: cresc {{command}} <origin> <next>',
|
|
59
|
-
|
|
60
|
-
pluginDetectionError: 'error while detecting {{name}} plugin: {{error}}',
|
|
61
|
-
addedToGitignore: 'Added {{line}} to .gitignore',
|
|
62
|
-
processingStringPool: 'Processing the string pool ...',
|
|
63
|
-
processingPackage: 'Processing the package {{count}} ...',
|
|
64
|
-
typeStrings: 'Type strings:',
|
|
65
|
-
keyStrings: 'Key strings:',
|
|
66
|
-
failedToParseIcon: '[Warning] failed to parse icon: {{error}}',
|
|
67
|
-
errorInHarmonyApp: 'Error in getEntryFromHarmonyApp: {{error}}',
|
|
68
|
-
totalPackages: 'Total {{count}} packages',
|
|
69
|
-
usageUploadIpa: 'Usage: cresc uploadIpa <ipa file>',
|
|
70
|
-
usageUploadApk: 'Usage: cresc uploadApk <apk file>',
|
|
71
|
-
usageUploadApp: 'Usage: cresc uploadApp <app file>',
|
|
100
|
+
usageParseApk: 'Usage: cresc parseApk <apk file>',
|
|
72
101
|
usageParseApp: 'Usage: cresc parseApp <app file>',
|
|
73
102
|
usageParseIpa: 'Usage: cresc parseIpa <ipa file>',
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
nativeVersionNotFoundMatch: 'No matching native version found: {{version}}',
|
|
81
|
-
packageIdRequired: 'Please provide packageId or packageVersion parameter',
|
|
82
|
-
operationComplete: 'Operation complete, bound to {{count}} native versions',
|
|
83
|
-
platformRequired: 'Platform must be specified.',
|
|
84
|
-
bundleCommandError: '"react-native bundle" command exited with code {{code}}.',
|
|
85
|
-
copyHarmonyBundleError: 'Error copying Harmony bundle: {{error}}',
|
|
86
|
-
copyFileFailed: 'Failed to copy file: {{error}}',
|
|
87
|
-
deleteFile: 'Delete {{- file}}',
|
|
88
|
-
rolloutConfigSet: 'Set {{rollout}}% rollout for version {{version}} on native version(s) {{versions}}',
|
|
89
|
-
versionBind: 'Bound version {{version}} to native version {{nativeVersion}} (id: {{id}})'
|
|
103
|
+
usageUnderDevelopment: 'Usage is under development now.',
|
|
104
|
+
usageUploadApk: 'Usage: cresc uploadApk <apk file>',
|
|
105
|
+
usageUploadApp: 'Usage: cresc uploadApp <app file>',
|
|
106
|
+
usageUploadIpa: 'Usage: cresc uploadIpa <ipa file>',
|
|
107
|
+
versionBind: 'Bound version {{version}} to native version {{nativeVersion}} (id: {{id}})',
|
|
108
|
+
welcomeMessage: 'Welcome to Cresc hot update service, {{name}}.'
|
|
90
109
|
};
|
package/lib/locales/zh.js
CHANGED
|
@@ -9,8 +9,46 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _default = {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
addedToGitignore: '已将 {{line}} 添加到 .gitignore',
|
|
13
|
+
androidCrunchPngsWarning: 'android 的 crunchPngs 选项似乎尚未禁用(如已禁用则请忽略此提示),这可能导致热更包体积异常增大,具体请参考 https://pushy.reactnative.cn/docs/getting-started.html#%E7%A6%81%E7%94%A8-android-%E7%9A%84-crunch-%E4%BC%98%E5%8C%96 \n',
|
|
14
|
+
appId: '应用 id',
|
|
15
|
+
appIdMismatchApk: 'appId不匹配!当前apk: {{appIdInPkg}}, 当前update.json: {{appId}}',
|
|
16
|
+
appIdMismatchApp: 'appId不匹配!当前app: {{appIdInPkg}}, 当前update.json: {{appId}}',
|
|
17
|
+
appIdMismatchIpa: 'appId不匹配!当前ipa: {{appIdInPkg}}, 当前update.json: {{appId}}',
|
|
18
|
+
appKeyMismatchApk: 'appKey不匹配!当前apk: {{appKeyInPkg}}, 当前update.json: {{appKey}}',
|
|
19
|
+
appKeyMismatchApp: 'appKey不匹配!当前app: {{appKeyInPkg}}, 当前update.json: {{appKey}}',
|
|
20
|
+
appKeyMismatchIpa: 'appKey不匹配!当前ipa: {{appKeyInPkg}}, 当前update.json: {{appKey}}',
|
|
21
|
+
appName: '应用名称',
|
|
22
|
+
appNameQuestion: '应用名称:',
|
|
23
|
+
appNotSelected: '尚未选择应用。请先运行 `pushy selectApp --platform {{platform}}` 来选择应用',
|
|
24
|
+
appUploadSuccess: '已成功上传app原生包(id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
|
|
25
|
+
apkUploadSuccess: '已成功上传apk原生包(id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
|
|
26
|
+
boundTo: ', 已绑定:{{name}} ({{id}})',
|
|
27
|
+
buildTimeNotFound: '无法获取此包的编译时间戳。请更新 `react-native-update` 到最新版本后重新打包上传。',
|
|
28
|
+
bundleCommandError: '"react-native bundle" 命令退出,代码为 {{code}}。',
|
|
29
|
+
bundleNotFound: '找不到 bundle 文件。请确保此 {{packageType}} 为 release 版本,且 bundle 文件名为默认的 `{{entryFile}}`',
|
|
30
|
+
bundlingWithRN: '正在使用 react-native {{version}} 打包',
|
|
31
|
+
cancelled: '已取消',
|
|
32
|
+
composingSourceMap: '正在生成 source map',
|
|
33
|
+
copyFileFailed: '复制文件失败:{{error}}',
|
|
34
|
+
copyHarmonyBundleError: '复制 Harmony bundle 错误:{{error}}',
|
|
35
|
+
copyingDebugId: '正在复制 debugid',
|
|
36
|
+
createAppSuccess: '已成功创建应用(id: {{id}})',
|
|
37
|
+
deleteFile: '删除 {{- file}}',
|
|
38
|
+
deletingFile: '删除 {{- file}}',
|
|
39
|
+
enterAppIdQuestion: '输入应用 id:',
|
|
40
|
+
enterNativePackageId: '输入原生包 id:',
|
|
41
|
+
errorInHarmonyApp: '获取 Harmony 应用入口时出错:{{error}}',
|
|
42
|
+
expiredStatus: '(已过期)',
|
|
43
|
+
failedToParseIcon: '[警告] 解析图标失败:{{error}}',
|
|
44
|
+
failedToParseUpdateJson: '无法解析文件 `update.json`。请手动删除它。',
|
|
45
|
+
fileGenerated: '已生成 {{- file}}',
|
|
46
|
+
fileSizeExceeded: '此文件大小 {{fileSize}} , 超出当前额度 {{maxSize}} 。您可以考虑升级付费业务以提升此额度。详情请访问: {{- pricingPageUrl}}',
|
|
47
|
+
hermesDisabled: 'Hermes 已禁用',
|
|
48
|
+
hermesEnabledCompiling: 'Hermes 已启用,正在编译为 hermes 字节码:\n',
|
|
49
|
+
ipaUploadSuccess: '已成功上传ipa原生包(id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
|
|
50
|
+
keyStrings: '键字符串:',
|
|
51
|
+
latestVersionTag: '(最新:{{version}})',
|
|
14
52
|
lockBestPractice: `
|
|
15
53
|
关于 lock 文件的最佳实践:
|
|
16
54
|
1. 开发团队中的所有成员应该使用相同的包管理器,维护同一份 lock 文件。
|
|
@@ -18,73 +56,53 @@ const _default = {
|
|
|
18
56
|
3. 代码审核时应关注 lock 文件的变化。
|
|
19
57
|
这样可以最大限度避免因依赖关系不一致而导致的热更异常,也降低供应链攻击等安全隐患。
|
|
20
58
|
`,
|
|
21
|
-
|
|
59
|
+
lockNotFound: '没有检测到任何 lock 文件,这可能导致依赖关系不一致而使热更异常。',
|
|
60
|
+
loggedOut: '已退出登录',
|
|
22
61
|
loginExpired: '登录信息已过期,请使用 `pushy login` 命令重新登录',
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
62
|
+
loginFirst: '尚未登录。\n请在项目目录中运行`pushy login`命令来登录',
|
|
63
|
+
multipleLocksFound: '检测到多种不同格式的锁文件({{- lockFiles}}),这可能导致依赖关系不一致而使热更异常。',
|
|
64
|
+
nativePackageId: '原生包 Id',
|
|
65
|
+
nativeVersion: '原生版本',
|
|
66
|
+
nativeVersionNotFound: '未查询到 >= {{version}} 的原生版本',
|
|
67
|
+
nativeVersionNotFoundLess: '未查询到 <= {{version}} 的原生版本',
|
|
68
|
+
nativeVersionNotFoundMatch: '未查询到匹配原生版本:{{version}}',
|
|
69
|
+
offset: '偏移量 {{offset}}',
|
|
70
|
+
operationComplete: '操作完成,共已绑定 {{count}} 个原生版本',
|
|
71
|
+
operationSuccess: '操作成功',
|
|
72
|
+
packageIdRequired: '请提供 packageId 或 packageVersion 参数',
|
|
73
|
+
packageUploadSuccess: '已成功上传新热更包(id: {{id}})',
|
|
74
|
+
packing: '正在打包',
|
|
75
|
+
pausedStatus: '(已暂停)',
|
|
31
76
|
platform: '平台',
|
|
32
|
-
|
|
33
|
-
appNotSelected: '尚未选择应用。请先运行 `pushy selectApp --platform {{platform}}` 来选择应用',
|
|
34
|
-
enterAppIdQuestion: '输入应用 id:',
|
|
35
|
-
appNameQuestion: '应用名称:',
|
|
77
|
+
platformPrompt: '平台(ios/android/harmony):',
|
|
36
78
|
platformQuestion: '平台(ios/android/harmony):',
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
failedToParseUpdateJson: '无法解析文件 `update.json`。请手动删除它。',
|
|
79
|
+
platformRequired: '必须指定平台。',
|
|
80
|
+
pluginDetectionError: '检测 {{name}} 插件时出错:{{error}}',
|
|
81
|
+
pluginDetected: '检测到 {{name}} 插件',
|
|
41
82
|
ppkPackageGenerated: 'ppk 热更包已生成并保存到: {{- output}}',
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
83
|
+
processingError: '处理文件时出错:{{error}}',
|
|
84
|
+
processingPackage: '正在处理包 {{count}}...',
|
|
85
|
+
processingStringPool: '正在处理字符串池...',
|
|
86
|
+
publishUsage: '使用方法: pushy publish ppk后缀文件 --platform ios|android|harmony',
|
|
87
|
+
rnuVersionNotFound: 'react-native-update: 无法获取版本号。请在项目目录中运行命令',
|
|
88
|
+
rolloutConfigSet: '已在原生版本 {{versions}} 上设置灰度发布 {{rollout}}% 热更版本 {{version}}',
|
|
89
|
+
rolloutRangeError: 'rollout 必须是 1-100 的整数',
|
|
90
|
+
runningHermesc: '运行 hermesc:{{- command}} {{- args}}',
|
|
50
91
|
sentryCliNotFound: '无法找到 Sentry CLI 工具,请确保已正确安装 @sentry/cli',
|
|
51
92
|
sentryReleaseCreated: '已为版本 {{version}} 创建 Sentry release',
|
|
93
|
+
totalApps: '共 {{count}} 个 {{platform}} 应用',
|
|
94
|
+
totalPackages: '共 {{count}} 个包',
|
|
95
|
+
typeStrings: '类型字符串:',
|
|
96
|
+
unsupportedPlatform: '无法识别的平台 `{{platform}}`',
|
|
97
|
+
uploadBundlePrompt: '是否现在上传此热更包?(Y/N)',
|
|
52
98
|
uploadingSourcemap: '正在上传 sourcemap',
|
|
53
|
-
packing: '正在打包',
|
|
54
|
-
deletingFile: '删除 {{- file}}',
|
|
55
|
-
bundlingWithRN: '正在使用 react-native {{version}} 打包',
|
|
56
|
-
fileGenerated: '已生成 {{- file}}。',
|
|
57
|
-
processingError: '处理文件时出错:{{error}}',
|
|
58
99
|
usageDiff: '用法:pushy {{command}} <origin> <next>',
|
|
59
|
-
|
|
60
|
-
pluginDetectionError: '检测 {{name}} 插件时出错:{{error}}',
|
|
61
|
-
addedToGitignore: '已将 {{line}} 添加到 .gitignore',
|
|
62
|
-
processingStringPool: '正在处理字符串池...',
|
|
63
|
-
processingPackage: '正在处理包 {{count}}...',
|
|
64
|
-
typeStrings: '类型字符串:',
|
|
65
|
-
keyStrings: '键字符串:',
|
|
66
|
-
failedToParseIcon: '[警告] 解析图标失败:{{error}}',
|
|
67
|
-
errorInHarmonyApp: '获取 Harmony 应用入口时出错:{{error}}',
|
|
68
|
-
totalPackages: '共 {{count}} 个包',
|
|
69
|
-
usageUploadIpa: '使用方法: pushy uploadIpa ipa后缀文件',
|
|
70
|
-
usageUploadApk: '使用方法: pushy uploadApk apk后缀文件',
|
|
71
|
-
usageUploadApp: '使用方法: pushy uploadApp app后缀文件',
|
|
100
|
+
usageParseApk: '使用方法: pushy parseApk apk后缀文件',
|
|
72
101
|
usageParseApp: '使用方法: pushy parseApp app后缀文件',
|
|
73
102
|
usageParseIpa: '使用方法: pushy parseIpa ipa后缀文件',
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
nativeVersionNotFoundLess: '未查询到 <= {{version}} 的原生版本',
|
|
80
|
-
nativeVersionNotFoundMatch: '未查询到匹配原生版本:{{version}}',
|
|
81
|
-
packageIdRequired: '请提供 packageId 或 packageVersion 参数',
|
|
82
|
-
operationComplete: '操作完成,共已绑定 {{count}} 个原生版本',
|
|
83
|
-
platformRequired: '必须指定平台。',
|
|
84
|
-
bundleCommandError: '"react-native bundle" 命令退出,代码为 {{code}}。',
|
|
85
|
-
copyHarmonyBundleError: '复制 Harmony bundle 错误:{{error}}',
|
|
86
|
-
copyFileFailed: '复制文件失败:{{error}}',
|
|
87
|
-
deleteFile: '删除 {{- file}}',
|
|
88
|
-
rolloutConfigSet: '已在原生版本 {{versions}} 上设置灰度发布 {{rollout}}% 热更版本 {{version}}',
|
|
89
|
-
versionBind: '已将热更版本 {{version}} 绑定到原生版本 {{nativeVersion}} (id: {{id}})'
|
|
103
|
+
usageUploadApk: '使用方法: pushy uploadApk apk后缀文件',
|
|
104
|
+
usageUploadApp: '使用方法: pushy uploadApp app后缀文件',
|
|
105
|
+
usageUploadIpa: '使用方法: pushy uploadIpa ipa后缀文件',
|
|
106
|
+
versionBind: '已将热更版本 {{version}} 绑定到原生版本 {{nativeVersion}} (id: {{id}})',
|
|
107
|
+
welcomeMessage: '欢迎使用 pushy 热更新服务,{{name}}。'
|
|
90
108
|
};
|