react-native-update-cli 2.24.2 → 2.26.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.
Files changed (98) hide show
  1. package/README.md +12 -5
  2. package/README.zh-CN.md +12 -5
  3. package/cli.json +7 -1
  4. package/lib/api.d.ts +2 -0
  5. package/lib/api.js +63 -18
  6. package/lib/app.js +25 -3
  7. package/lib/bin.js +39 -45
  8. package/lib/bundle-runner.d.ts +45 -1
  9. package/lib/bundle-runner.js +303 -34
  10. package/lib/bundle.d.ts +1 -1
  11. package/lib/bundle.js +23 -7
  12. package/lib/commands.d.ts +6 -0
  13. package/lib/commands.js +65 -0
  14. package/lib/locales/en.d.ts +7 -14
  15. package/lib/locales/en.js +10 -17
  16. package/lib/locales/zh.d.ts +7 -13
  17. package/lib/locales/zh.js +10 -16
  18. package/lib/package.js +4 -0
  19. package/lib/provider.d.ts +1 -1
  20. package/lib/provider.js +3 -1
  21. package/lib/symbolicate.js +7 -2
  22. package/lib/types.d.ts +1 -0
  23. package/lib/user.js +6 -0
  24. package/lib/utils/add-gitignore.js +7 -1
  25. package/lib/utils/dep-versions.d.ts +7 -0
  26. package/lib/utils/dep-versions.js +78 -26
  27. package/lib/utils/git.js +9 -6
  28. package/lib/utils/hbcTransform.d.ts +15 -0
  29. package/lib/utils/hbcTransform.js +22 -0
  30. package/lib/utils/hermes-base.d.ts +61 -6
  31. package/lib/utils/hermes-base.js +328 -46
  32. package/lib/utils/hermes-literals.d.ts +51 -0
  33. package/lib/utils/hermes-literals.js +210 -0
  34. package/lib/utils/i18n.d.ts +5 -0
  35. package/lib/utils/i18n.js +14 -1
  36. package/lib/utils/index.d.ts +2 -1
  37. package/lib/utils/index.js +9 -4
  38. package/lib/utils/latest-version/index.js +8 -0
  39. package/lib/utils/runtime.d.ts +21 -0
  40. package/lib/utils/runtime.js +138 -5
  41. package/lib/utils/zip-range.js +3 -2
  42. package/lib/versions.js +14 -4
  43. package/package.json +6 -3
  44. package/lib/index.d.ts +0 -1
  45. package/lib/index.js +0 -17
  46. package/src/api.ts +0 -470
  47. package/src/app.ts +0 -241
  48. package/src/auto-update.ts +0 -647
  49. package/src/bin-cresc.ts +0 -8
  50. package/src/bin.ts +0 -115
  51. package/src/bundle-pack.ts +0 -61
  52. package/src/bundle-runner.ts +0 -1430
  53. package/src/bundle.ts +0 -371
  54. package/src/cache.ts +0 -20
  55. package/src/diff.ts +0 -1010
  56. package/src/exports.ts +0 -17
  57. package/src/index.ts +0 -1
  58. package/src/install.ts +0 -50
  59. package/src/locales/en.ts +0 -257
  60. package/src/locales/zh.ts +0 -234
  61. package/src/native-package.ts +0 -338
  62. package/src/package.ts +0 -482
  63. package/src/provider.ts +0 -294
  64. package/src/symbolicate.ts +0 -164
  65. package/src/types.ts +0 -150
  66. package/src/user.ts +0 -39
  67. package/src/utils/add-gitignore.ts +0 -35
  68. package/src/utils/app-info-parser/aab.ts +0 -241
  69. package/src/utils/app-info-parser/apk.ts +0 -92
  70. package/src/utils/app-info-parser/app.ts +0 -7
  71. package/src/utils/app-info-parser/index.ts +0 -54
  72. package/src/utils/app-info-parser/ipa.ts +0 -109
  73. package/src/utils/app-info-parser/resource-finder.ts +0 -508
  74. package/src/utils/app-info-parser/utils.ts +0 -161
  75. package/src/utils/app-info-parser/xml-parser/binary.ts +0 -693
  76. package/src/utils/app-info-parser/xml-parser/manifest.ts +0 -228
  77. package/src/utils/app-info-parser/zip.ts +0 -108
  78. package/src/utils/check-lockfile.ts +0 -93
  79. package/src/utils/check-plugin.ts +0 -38
  80. package/src/utils/command-result.ts +0 -24
  81. package/src/utils/constants.ts +0 -25
  82. package/src/utils/dep-versions.ts +0 -83
  83. package/src/utils/git.ts +0 -71
  84. package/src/utils/hbcTransform.ts +0 -649
  85. package/src/utils/hermes-base.ts +0 -1137
  86. package/src/utils/http-helper.ts +0 -152
  87. package/src/utils/i18n.ts +0 -39
  88. package/src/utils/index.ts +0 -698
  89. package/src/utils/latest-version/index.ts +0 -573
  90. package/src/utils/options.ts +0 -78
  91. package/src/utils/plugin-config.ts +0 -32
  92. package/src/utils/runtime.ts +0 -187
  93. package/src/utils/slim-sourcemap.ts +0 -105
  94. package/src/utils/zip-entries.ts +0 -209
  95. package/src/utils/zip-options.ts +0 -178
  96. package/src/utils/zip-range.ts +0 -727
  97. package/src/utils/zip-raw-writer.ts +0 -247
  98. package/src/versions.ts +0 -892
package/src/exports.ts DELETED
@@ -1,17 +0,0 @@
1
- export { getSession, loadSession } from './api';
2
- export { getPlatform, getSelectedApp } from './app';
3
- export { diffCommands } from './diff';
4
- export { CLIProviderImpl } from './provider';
5
- export type {
6
- BundleOptions,
7
- CLIProvider,
8
- CommandContext,
9
- CommandResult,
10
- Package,
11
- Platform,
12
- PublishOptions,
13
- Session,
14
- UploadOptions,
15
- Version,
16
- } from './types';
17
- export { question } from './utils';
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './exports';
package/src/install.ts DELETED
@@ -1,50 +0,0 @@
1
- import { spawnSync } from 'child_process';
2
- import path from 'path';
3
- import type { CommandContext } from './types';
4
- import { scriptName } from './utils/constants';
5
- import { t } from './utils/i18n';
6
- import { getInstallCommand } from './utils/runtime';
7
-
8
- // package names / version specs only — rejects shell metacharacters since
9
- // Windows needs shell: true to run package manager .cmd shims
10
- const SAFE_PACKAGE_ARG = /^[@a-z0-9^~._/-]+$/i;
11
-
12
- export const installCommands = {
13
- install: async ({ args }: CommandContext) => {
14
- if (args.length === 0) {
15
- throw new Error(t('installPackageRequired', { scriptName }));
16
- }
17
- for (const arg of args) {
18
- if (!SAFE_PACKAGE_ARG.test(arg)) {
19
- throw new Error(t('installPackageRequired', { scriptName }));
20
- }
21
- }
22
-
23
- const cliDir = path.resolve(__dirname, '..');
24
- const installCommand = getInstallCommand(args, cliDir);
25
-
26
- const result = spawnSync(installCommand.command, installCommand.args, {
27
- cwd: cliDir,
28
- stdio: 'inherit',
29
- // package manager executables are .cmd shims on Windows
30
- shell: process.platform === 'win32',
31
- });
32
-
33
- if (result.error) {
34
- throw new Error(
35
- t('installFailed', {
36
- packages: args.join(' '),
37
- error: result.error.message,
38
- }),
39
- );
40
- }
41
- if (result.status !== 0) {
42
- throw new Error(
43
- t('installFailed', {
44
- packages: args.join(' '),
45
- error: `${installCommand.command} exited with code ${result.status}`,
46
- }),
47
- );
48
- }
49
- },
50
- };
package/src/locales/en.ts DELETED
@@ -1,257 +0,0 @@
1
- export default {
2
- addedToGitignore: 'Added {{line}} to .gitignore',
3
- androidCrunchPngsWarning:
4
- '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',
5
- aabOpenApksFailed: 'Failed to open generated .apks file',
6
- aabReadUniversalApkFailed: 'Failed to read universal.apk',
7
- aabUniversalApkNotFound: 'universal.apk not found in generated .apks',
8
- aabBundletoolDownloadHint:
9
- 'bundletool not found. Downloading node-bundletool via npx (first run may take a while).',
10
- aabManifestNotFound:
11
- "AndroidManifest.xml can't be found in AAB base/manifest/",
12
- aabParseResourcesWarning:
13
- '[Warning] Failed to parse resources.arsc: {{error}}',
14
- aabParseFailed: 'Failed to parse AAB: {{error}}',
15
- aabParseManifestError: 'Parse AndroidManifest.xml error: {{error}}',
16
- aabParseResourcesError: 'Parser resources.arsc error: {{error}}',
17
- appId: 'App ID',
18
- appIdMismatchApk:
19
- 'App ID mismatch! Current APK: {{appIdInPkg}}, current {{- source}}: {{appId}}',
20
- appIdMismatchApp:
21
- 'App ID mismatch! Current APP: {{appIdInPkg}}, current {{- source}}: {{appId}}',
22
- appIdMismatchIpa:
23
- 'App ID mismatch! Current IPA: {{appIdInPkg}}, current {{- source}}: {{appId}}',
24
- appKeyMismatchApk:
25
- 'App Key mismatch! Current APK: {{appKeyInPkg}}, current {{- source}}: {{appKey}}',
26
- appKeyMismatchApp:
27
- 'App Key mismatch! Current APP: {{appKeyInPkg}}, current {{- source}}: {{appKey}}',
28
- appKeyMismatchIpa:
29
- 'App Key mismatch! Current IPA: {{appKeyInPkg}}, current {{- source}}: {{appKey}}',
30
- appName: 'App Name',
31
- appNameQuestion: 'App Name:',
32
- appPlatformMismatch:
33
- 'App {{appId}} is a {{appPlatform}} app, but this command targets {{platform}}',
34
- appNotSelected:
35
- 'App not selected. run `cresc selectApp --platform {{platform}}` first!',
36
- appUploadSuccess:
37
- 'Successfully uploaded APP native package (id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
38
- autoUpdatePermission:
39
- 'CLI auto-update was skipped because the global package directory is not writable. Fix the package-manager prefix permissions, then run: {{- command}}',
40
- autoUpdateSuccess:
41
- 'CLI was automatically updated in the background: {{from}} -> {{to}}',
42
- apkUploadSuccess:
43
- 'Successfully uploaded APK native package (id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
44
- boundTo: ', bound to: {{name}} ({{id}})',
45
- buildTimeNotFound:
46
- 'Cannot get the build timestamp of this package. Please update `react-native-update` to the latest version and re-package and upload.',
47
- bundleCommandError:
48
- '"react-native bundle" command exited with code {{code}}.',
49
- bundleNotFound:
50
- 'Bundle file not found. Please ensure that this {{packageType}} is a release version and the bundle file name is the default `{{entryFile}}`',
51
- bundlingWithRN: 'Bundling with react-native: {{version}}',
52
- cancelled: 'Cancelled',
53
- composingSourceMap: 'Composing source map',
54
- copyFileFailed: 'Failed to copy file: {{error}}',
55
- copyHarmonyBundleError: 'Error copying Harmony bundle: {{error}}',
56
- copyingDebugId: 'Copying debugid',
57
- createAppSuccess: 'App created successfully (id: {{id}})',
58
- deleteFile: 'Delete {{- file}}',
59
- deletingFile: 'Delete {{- file}}',
60
- enterAppIdQuestion: 'Enter AppId:',
61
- enterNativePackageId: 'Enter native package ID:',
62
- errorInHarmonyApp: 'Error in getEntryFromHarmonyApp: {{error}}',
63
- expiredStatus: '(Expired)',
64
- failedToParseIcon: '[Warning] failed to parse icon: {{error}}',
65
- failedToParseUpdateJson:
66
- 'Failed to parse file `{{- configPath}}`. Try to remove it manually.',
67
- fileGenerated: '{{- file}} generated.',
68
- fileSizeExceeded:
69
- '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}}',
70
- forceHermes: 'Forcing Hermes enabled for this build',
71
- hermesEnabledCompiling: 'Hermes enabled, now compiling to hermes bytecode:\n',
72
- ipaUploadSuccess:
73
- 'Successfully uploaded IPA native package (id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
74
- keyStrings: 'Key strings:',
75
- latestVersionTag: '(latest: {{version}})',
76
- lockBestPractice: `
77
- Best practices for lock files:
78
- 1. All members of the development team should use the same package manager to maintain a single lock file.
79
- 2. Add the lock file to version control (but do not commit multiple lock files of different formats).
80
- 3. Pay attention to changes in the lock file during code review.
81
- This can reduce the risk of inconsistent dependencies and supply chain attacks.
82
- `,
83
- lockNotFound:
84
- 'No lock file detected, which may cause inconsistent dependencies and hot-updating issues.',
85
- loggedOut: 'Logged out',
86
- loginExpired:
87
- 'Login information has expired. Please use `cresc login` command to re-login',
88
- loginFirst:
89
- 'Not logged in.\nPlease run `cresc login` in the project directory to login.',
90
- multipleLocksFound:
91
- 'Multiple lock files detected ({{- lockFiles}}), which may cause inconsistent dependencies and hot-updating issues.',
92
- nativePackageId: 'Native Package ID',
93
- nativeVersion: 'Native Version',
94
- nativeVersionNotFoundGte: 'No native version found >= {{version}}',
95
- nativeVersionNotFoundLte: 'No native version found <= {{version}}',
96
- nativeVersionNotFoundBetween:
97
- 'No native version found between {{min}} and {{max}}',
98
- conflictingPackageSelectors:
99
- 'Only one of packageId / packageVersion / packageVersionRange / minPackageVersion+maxPackageVersion can be used at a time',
100
- nativeVersionNotFoundMatch: 'No matching native version found: {{version}}',
101
- nativePackageIdNotFound: 'No native package id found: {{id}}',
102
- noPackagesFound: 'No packages found. (appId: {{appId}})',
103
- offset: 'Offset {{offset}}',
104
- operationComplete: 'Operation complete, bound to {{count}} native versions',
105
- operationSuccess: 'Operation successful',
106
- packageIdRequired: 'Please provide packageId or packageVersion parameter',
107
- packageUploadSuccess:
108
- 'Successfully uploaded new hot update package (id: {{id}})',
109
- depsChangeWarningTitle: 'Dependency changes detected',
110
- depsChangeSummary:
111
- 'Dependency changes: added {{added}}, removed {{removed}}, changed {{changed}}.',
112
- depsChangeTargetPackage:
113
- 'Target native package: {{packageName}} (id: {{packageId}})',
114
- depsChangeDependencyHeader: 'Dependency',
115
- depsChangeVersionHeader: 'Version change',
116
- depsChangeAddedLabel: 'Added',
117
- depsChangeRemovedLabel: 'Removed',
118
- depsChangeChangedLabel: 'Changed',
119
- depsChangeArrow: '->',
120
- depsChangeRiskWarning:
121
- 'Warning: if changed dependencies are pure JS modules, impact is usually low; if native code is newly introduced or changed, OTA update may cause abnormal behavior or even crashes. Test thoroughly before production release.',
122
- depsChangeFetchFailed: 'Failed to fetch OTA dependency info: {{error}}',
123
- depsChangeNonBlockingHint:
124
- 'This is only a dependency change warning and will not block publishing.',
125
- packing: 'Packing',
126
- pausedStatus: '(Paused)',
127
- platform: 'Platform',
128
- platformPrompt: 'Platform (ios/android/harmony):',
129
- platformQuestion: 'Platform(ios/android/harmony):',
130
- platformRequired: 'Platform must be specified.',
131
- pluginDetectionError: 'error while detecting {{name}} plugin: {{error}}',
132
- pluginDetected: 'detected {{name}} plugin',
133
- ppkPackageGenerated: 'ppk package generated and saved to: {{- output}}',
134
- processingError: 'Error processing file: {{error}}',
135
- processingPackage: 'Processing the package {{count}} ...',
136
- processingStringPool: 'Processing the string pool ...',
137
- publishUsage:
138
- 'Usage: pushy publish <ppk file> --platform ios|android|harmony',
139
- sourceMapNotFound: 'Source map not found: {{path}}',
140
- sourceMapMissingWarning:
141
- 'No source map was archived with this version: crashes cannot be symbolicated later. Bundle with the default --sourcemap, or pass --sourcemap <file> to publish.',
142
- sourceMapArchived: 'Source map archived with version {{id}}',
143
- sourceMapUploadFailedWarning:
144
- 'Source map upload failed ({{error}}); publishing without an archived map. Upgrade the update server to archive source maps.',
145
- symbolicateUsage:
146
- 'Usage: pushy symbolicate <stack file | -> --hash <updateHash> [--platform ios|android|harmony] [--output <file>]',
147
- symbolicateVersionNotFound:
148
- 'No published version with hash {{hash}} found for this app',
149
- symbolicateNoSourceMap:
150
- 'Version {{id}} was published without a source map; nothing to symbolicate against',
151
- symbolicateDone:
152
- 'Symbolicated {{count}} frame(s) against version {{id}} ({{hash}})',
153
- rnuVersionNotFound:
154
- 'react-native-update: Cannot get the version number. Please run the command in the project directory',
155
- rolloutConfigSet:
156
- 'Set {{rollout}}% rollout for OTA update {{version}} on native version(s) {{versions}}',
157
- rolloutRangeError: 'rollout must be an integer between 1-100',
158
- runningHermesc: 'Running hermesc: {{- command}} {{- args}}',
159
- hermesSourcemapKept:
160
- 'Debug info is stripped from the bytecode (like RN release builds); the Hermes sourcemap is kept at {{- file}} for symbolicating crash stacks later.',
161
- sentryReactNativeNotFound:
162
- 'Cannot find @sentry/react-native, please make sure it is properly installed',
163
- sentryCliNotFound:
164
- 'Cannot find Sentry CLI tool, please make sure @sentry/cli is properly installed',
165
- sentryReleaseCreated: 'Sentry release created for version: {{version}}',
166
- totalApps: 'Total {{count}} {{platform}} apps',
167
- totalPackages: 'Total {{count}} packages',
168
- typeStrings: 'Type strings:',
169
- unsupportedPlatform: 'Unsupported platform `{{platform}}`',
170
- uploadBundlePrompt: 'Upload this bundle now?(Y/N)',
171
- uploadingSourcemap: 'Uploading sourcemap',
172
- usageDiff: 'Usage: cresc {{command}} <origin> <next>',
173
- usageParseApk: 'Usage: cresc parseApk <apk file>',
174
- usageParseAab: 'Usage: cresc parseAab <aab file>',
175
- usageExtractApk:
176
- 'Usage: cresc extractApk <aab file> [--output <apk file>] [--includeAllSplits] [--splits <split names>]',
177
- usageParseApp: 'Usage: cresc parseApp <app file>',
178
- usageParseIpa: 'Usage: cresc parseIpa <ipa file>',
179
- usageUnderDevelopment: 'Usage is under development now.',
180
- usageUploadApk: 'Usage: cresc uploadApk <apk file>',
181
- usageUploadAab:
182
- 'Usage: cresc uploadAab <aab file> [--includeAllSplits] [--splits <split names>]',
183
- usageUploadApp: 'Usage: cresc uploadApp <app file>',
184
- usageUploadIpa: 'Usage: cresc uploadIpa <ipa file>',
185
- versionBind:
186
- 'Bound hot update {{version}} to native version {{nativeVersion}} (id: {{id}})',
187
- versionIdRequired: 'Please provide versionId in non-interactive mode.',
188
- welcomeMessage: 'Welcome to Cresc hot update service, {{name}}.',
189
- versionNameQuestion: 'Enter OTA update name:',
190
- versionDescriptionQuestion: 'Enter OTA update description:',
191
- versionMetaInfoQuestion: 'Enter custom meta info:',
192
- updateNativePackageQuestion: 'Bind to native package now?(Y/N)',
193
- unnamed: '(Unnamed)',
194
- dryRun: 'Below is the dry-run result, no actual operation will be performed:',
195
- usingCustomVersion: 'Using custom version: {{version}}',
196
- confirmDeletePackage:
197
- 'Confirm delete native package {{packageId}}? This operation cannot be undone (Y/N):',
198
- deletePackageSuccess: 'Native package {{packageId}} deleted successfully',
199
- deletePackagesSuccess: 'Deleted {{count}} native packages: {{packageIds}}',
200
- deletePackageError:
201
- 'Failed to delete native package {{packageId}}: {{error}}',
202
- usageDeletePackage:
203
- 'Usage: cresc deletePackage [packageId] --packageIds [packageIds] --appId [appId]',
204
- deleteVersionSuccess: 'Version {{versionId}} deleted successfully',
205
- deleteVersionsSuccess: 'Deleted {{count}} OTA versions: {{versionIds}}',
206
- deleteVersionError: 'Failed to delete version {{versionId}}: {{error}}',
207
- bundleFileNotFound:
208
- 'Bundle file not found! Please use default bundle file name and path.',
209
- diffPackageGenerated: '{{- output}} generated.',
210
- nodeHdiffpatchRequired:
211
- 'This function needs "node-hdiffpatch". Please run "{{scriptName}} install node-hdiffpatch" to install',
212
- hbcTransformRoundTripFailed:
213
- 'HBC transform round-trip verification failed; falling back to plain diff.',
214
- hbcTransformNeedsPatch:
215
- 'hbcTransform requires patch support from node-hdiffpatch; option ignored.',
216
- bundleStreamNeedsHdiffpatch:
217
- 'bundleStreamThreshold requires diffStream/patchStream from node-hdiffpatch; option ignored.',
218
- apkExtracted: 'APK extracted to {{output}}',
219
- composeSourceMapsNotFound:
220
- 'Cannot find react-native/scripts/compose-source-maps.js, skipping hermes sourcemap composing. The uploaded sourcemap may not match the compiled bundle.',
221
- installPackageRequired:
222
- 'Please specify the package to install, e.g. "{{scriptName}} install node-hdiffpatch"',
223
- installFailed: 'Failed to install {{packages}}: {{error}}',
224
- proxyNetworkError:
225
- 'Network error — likely caused by a proxy/VPN. Please try disabling your proxy and retry.',
226
- proxyNetworkErrorTips:
227
- 'Common fixes:\n1. Disable system proxy or VPN\n2. Check HTTP_PROXY / HTTPS_PROXY environment variables\n3. Check proxy settings in .npmrc',
228
- invalidId: 'Invalid id: {{id}}',
229
- outputPathRequired: 'Output path is required.',
230
- unsupportedFileType: 'Unsupported file type: {{fileType}}',
231
- failedToLoadSession: 'Failed to load session',
232
- appIdRequired: 'appId is required',
233
- unknownCommand: 'Unknown command: {{command}}',
234
- unsupportedPlatformForHermes: 'Unsupported platform for Hermes: {{platform}}',
235
- invalidManifest: 'Invalid manifest',
236
- failedToResolveResource: 'Failed to resolve resource: {{error}}',
237
- hermesBaseNone:
238
- 'Hermes base: none ({{- reason}}); compiling without -base-bytecode',
239
- hermesBaseUsing: 'Hermes base: {{- source}} (HBC v{{version}})',
240
- hermesBaseDownloading: 'Hermes base: downloading {{- url}}',
241
- hermesBaseRangeFetched:
242
- 'Hermes base: fetched only the bundle via HTTP Range ({{fetchedKb}} KB of {{totalKb}} KB)',
243
- hermesBaseRangeFallback:
244
- 'Hermes base: partial download unavailable ({{- reason}}); downloading the whole package',
245
- hermesBaseCompileFailed:
246
- 'Hermes base compile failed ({{- reason}}); retrying without -base-bytecode',
247
- hermesBaseCompileFailedLog:
248
- 'Hermes base: full compiler output written to {{- file}}',
249
- hermesBasePlainCompileFailed:
250
- 'Hermes base: the plain compile used for verification failed ({{- reason}}); keeping the base compile unverified',
251
- hermesBaseVerified:
252
- 'Hermes base: bytecode verified equivalent to a plain compile',
253
- hermesBaseVerifyFailed:
254
- 'Hermes base: bytecode differs from a plain compile; dropping the base and recompiling',
255
- cacheCleaned: 'Removed {{count}} cached bundle(s)',
256
- cacheStats: 'Bundle cache: {{- dir}} — {{files}} file(s), {{mb}} MB',
257
- };
package/src/locales/zh.ts DELETED
@@ -1,234 +0,0 @@
1
- export default {
2
- addedToGitignore: '已将 {{line}} 添加到 .gitignore',
3
- androidCrunchPngsWarning:
4
- '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',
5
- aabOpenApksFailed: '无法打开生成的 .apks 文件',
6
- aabReadUniversalApkFailed: '无法读取 universal.apk',
7
- aabUniversalApkNotFound: '在生成的 .apks 中未找到 universal.apk',
8
- aabBundletoolDownloadHint:
9
- '未找到 bundletool,正在通过 npx 下载 node-bundletool(首次下载可能需要一些时间)。',
10
- aabManifestNotFound: '在 AAB 的 base/manifest/ 中找不到 AndroidManifest.xml',
11
- aabParseResourcesWarning: '[警告] 解析 resources.arsc 失败:{{error}}',
12
- aabParseFailed: '解析 AAB 失败:{{error}}',
13
- aabParseManifestError: '解析 AndroidManifest.xml 出错:{{error}}',
14
- aabParseResourcesError: '解析 resources.arsc 出错:{{error}}',
15
- appId: '应用 id',
16
- appIdMismatchApk:
17
- 'appId不匹配!当前apk: {{appIdInPkg}}, 当前{{- source}}: {{appId}}',
18
- appIdMismatchApp:
19
- 'appId不匹配!当前app: {{appIdInPkg}}, 当前{{- source}}: {{appId}}',
20
- appIdMismatchIpa:
21
- 'appId不匹配!当前ipa: {{appIdInPkg}}, 当前{{- source}}: {{appId}}',
22
- appKeyMismatchApk:
23
- 'appKey不匹配!当前apk: {{appKeyInPkg}}, 当前{{- source}}: {{appKey}}',
24
- appKeyMismatchApp:
25
- 'appKey不匹配!当前app: {{appKeyInPkg}}, 当前{{- source}}: {{appKey}}',
26
- appKeyMismatchIpa:
27
- 'appKey不匹配!当前ipa: {{appKeyInPkg}}, 当前{{- source}}: {{appKey}}',
28
- appName: '应用名称',
29
- appNameQuestion: '应用名称:',
30
- appPlatformMismatch:
31
- '应用 {{appId}} 是 {{appPlatform}} 平台的应用,但当前命令的平台是 {{platform}}',
32
- appNotSelected:
33
- '尚未选择应用。请先运行 `pushy selectApp --platform {{platform}}` 来选择应用',
34
- appUploadSuccess:
35
- '已成功上传app原生包(id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
36
- autoUpdatePermission:
37
- 'CLI 自动更新已跳过:全局包目录不可写。请修复包管理器的全局目录权限后运行:{{- command}}',
38
- autoUpdateSuccess: 'CLI 已在后台自动更新:{{from}} -> {{to}}',
39
- apkUploadSuccess:
40
- '已成功上传apk原生包(id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
41
- boundTo: ', 已绑定:{{name}} ({{id}})',
42
- buildTimeNotFound:
43
- '无法获取此包的编译时间戳。请更新 `react-native-update` 到最新版本后重新打包上传。',
44
- bundleCommandError: '"react-native bundle" 命令退出,代码为 {{code}}。',
45
- bundleNotFound:
46
- '找不到 bundle 文件。请确保此 {{packageType}} 为 release 版本,且 bundle 文件名为默认的 `{{entryFile}}`',
47
- bundlingWithRN: '正在使用 react-native {{version}} 打包',
48
- cancelled: '已取消',
49
- composingSourceMap: '正在生成 source map',
50
- copyFileFailed: '复制文件失败:{{error}}',
51
- copyHarmonyBundleError: '复制 Harmony bundle 错误:{{error}}',
52
- copyingDebugId: '正在复制 debugid',
53
- createAppSuccess: '已成功创建应用(id: {{id}})',
54
- deleteFile: '删除 {{- file}}',
55
- deletingFile: '删除 {{- file}}',
56
- enterAppIdQuestion: '输入应用 id:',
57
- enterNativePackageId: '输入原生包 id:',
58
- errorInHarmonyApp: '获取 Harmony 应用入口时出错:{{error}}',
59
- expiredStatus: '(已过期)',
60
- failedToParseIcon: '[警告] 解析图标失败:{{error}}',
61
- failedToParseUpdateJson: '无法解析文件 `{{- configPath}}`。请手动删除它。',
62
- fileGenerated: '已生成 {{- file}}',
63
- fileSizeExceeded:
64
- '此文件大小 {{fileSize}} , 超出当前额度 {{maxSize}} 。您可以考虑升级付费业务以提升此额度。详情请访问: {{- pricingPageUrl}}',
65
- forceHermes: '强制启用 Hermes 编译',
66
- hermesEnabledCompiling: 'Hermes 已启用,正在编译为 hermes 字节码:\n',
67
- ipaUploadSuccess:
68
- '已成功上传ipa原生包(id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
69
- keyStrings: '键字符串:',
70
- latestVersionTag: '(最新:{{version}})',
71
- lockBestPractice: `
72
- 关于 lock 文件的最佳实践:
73
- 1. 开发团队中的所有成员应该使用相同的包管理器,维护同一份 lock 文件。
74
- 2. 将 lock 文件添加到版本控制中(但不要同时提交多种不同格式的 lock 文件)。
75
- 3. 代码审核时应关注 lock 文件的变化。
76
- 这样可以最大限度避免因依赖关系不一致而导致的热更异常,也降低供应链攻击等安全隐患。
77
- `,
78
- lockNotFound:
79
- '没有检测到任何 lock 文件,这可能导致依赖关系不一致而使热更异常。',
80
- loggedOut: '已退出登录',
81
- loginExpired: '登录信息已过期,请使用 `pushy login` 命令重新登录',
82
- loginFirst: '尚未登录。\n请在项目目录中运行`pushy login`命令来登录',
83
- multipleLocksFound:
84
- '检测到多种不同格式的锁文件({{- lockFiles}}),这可能导致依赖关系不一致而使热更异常。',
85
- nativePackageId: '原生包 Id',
86
- nativeVersion: '原生版本',
87
- nativeVersionNotFoundGte: '未查询到 >= {{version}} 的原生版本',
88
- nativeVersionNotFoundLte: '未查询到 <= {{version}} 的原生版本',
89
- nativeVersionNotFoundBetween: '未查询到 {{min}} 至 {{max}} 之间的原生版本',
90
- conflictingPackageSelectors:
91
- 'packageId / packageVersion / packageVersionRange / minPackageVersion+maxPackageVersion 只能使用其中一组,不能混用',
92
- nativeVersionNotFoundMatch: '未查询到匹配原生版本:{{version}}',
93
- nativePackageIdNotFound: '未查询到原生包 id: {{id}}',
94
- noPackagesFound: '未查询到任何原生包(appId: {{appId}})',
95
- offset: '偏移量 {{offset}}',
96
- operationComplete: '操作完成,共已绑定 {{count}} 个原生版本',
97
- operationSuccess: '操作成功',
98
- packageIdRequired: '请提供 packageId 或 packageVersion 参数',
99
- packageUploadSuccess: '已成功上传新热更包(id: {{id}})',
100
- depsChangeWarningTitle: '检测到依赖变化',
101
- depsChangeSummary:
102
- '依赖变化:新增 {{added}} 项,移除 {{removed}} 项,版本变更 {{changed}} 项。',
103
- depsChangeTargetPackage: '目标原生包:{{packageName}} (id: {{packageId}})',
104
- depsChangeDependencyHeader: '依赖',
105
- depsChangeVersionHeader: '版本变化',
106
- depsChangeAddedLabel: '新增',
107
- depsChangeRemovedLabel: '移除',
108
- depsChangeChangedLabel: '变更',
109
- depsChangeArrow: '->',
110
- depsChangeRiskWarning:
111
- '警告:如果变更依赖是纯 JS 模块,则一般没有影响;若包含原生代码新增或变化,热更可能导致功能不正常甚至闪退,建议发布前使用扫码功能完整测试。',
112
- depsChangeFetchFailed: '获取热更依赖信息失败:{{error}}',
113
- depsChangeNonBlockingHint: '以上仅为依赖变化提示,不会阻止本次发布。',
114
- packing: '正在打包',
115
- pausedStatus: '(已暂停)',
116
- platform: '平台',
117
- platformPrompt: '平台(ios/android/harmony):',
118
- platformQuestion: '平台(ios/android/harmony):',
119
- platformRequired: '必须指定平台。',
120
- pluginDetectionError: '检测 {{name}} 插件时出错:{{error}}',
121
- pluginDetected: '检测到 {{name}} 插件',
122
- ppkPackageGenerated: 'ppk 热更包已生成并保存到: {{- output}}',
123
- processingError: '处理文件时出错:{{error}}',
124
- processingPackage: '正在处理包 {{count}}...',
125
- processingStringPool: '正在处理字符串池...',
126
- sourceMapNotFound: '找不到 source map:{{path}}',
127
- sourceMapMissingWarning:
128
- '本版本没有归档 source map,之后的崩溃堆栈将无法还原。请用默认的 --sourcemap 打包,或在 publish 时传 --sourcemap <文件>。',
129
- sourceMapArchived: 'source map 已随版本 {{id}} 归档',
130
- sourceMapUploadFailedWarning:
131
- 'source map 上传失败({{error}}),本次发布不归档 map。升级更新服务端后可归档 source map。',
132
- symbolicateUsage:
133
- '用法:pushy symbolicate <堆栈文件 | -> --hash <热更 hash> [--platform ios|android|harmony] [--output <文件>]',
134
- symbolicateVersionNotFound: '当前应用下找不到 hash 为 {{hash}} 的已发布版本',
135
- symbolicateNoSourceMap: '版本 {{id}} 发布时未归档 source map,无法还原',
136
- symbolicateDone: '已按版本 {{id}}({{hash}})还原 {{count}} 个堆栈帧',
137
- publishUsage:
138
- '使用方法: pushy publish ppk后缀文件 --platform ios|android|harmony',
139
- rnuVersionNotFound:
140
- 'react-native-update: 无法获取版本号。请在项目目录中运行命令',
141
- rolloutConfigSet:
142
- '已在原生版本 {{versions}} 上设置灰度发布 {{rollout}}% 热更包 {{version}}',
143
- rolloutRangeError: 'rollout 必须是 1-100 的整数',
144
- runningHermesc: '运行 hermesc:{{- command}} {{- args}}',
145
- hermesSourcemapKept:
146
- '字节码已剥离 debug info(与 RN release 构建一致);Hermes sourcemap 保留在 {{- file}},可用于事后符号化崩溃堆栈。',
147
- sentryReactNativeNotFound: '无法找到 @sentry/react-native,请确保已正确安装',
148
- sentryCliNotFound: '无法找到 Sentry CLI 工具,请确保已正确安装 @sentry/cli',
149
- sentryReleaseCreated: '已为版本 {{version}} 创建 Sentry release',
150
- totalApps: '共 {{count}} 个 {{platform}} 应用',
151
- totalPackages: '共 {{count}} 个包',
152
- typeStrings: '类型字符串:',
153
- unsupportedPlatform: '无法识别的平台 `{{platform}}`',
154
- uploadBundlePrompt: '是否现在上传此热更包?(Y/N)',
155
- uploadingSourcemap: '正在上传 sourcemap',
156
- usageDiff: '用法:pushy {{command}} <origin> <next>',
157
- usageParseApk: '使用方法: pushy parseApk apk后缀文件',
158
- usageParseAab: '使用方法: pushy parseAab aab后缀文件',
159
- usageExtractApk:
160
- '使用方法: pushy extractApk aab后缀文件 [--output apk文件] [--includeAllSplits] [--splits 分包名列表]',
161
- usageParseApp: '使用方法: pushy parseApp app后缀文件',
162
- usageParseIpa: '使用方法: pushy parseIpa ipa后缀文件',
163
- usageUploadApk: '使用方法: pushy uploadApk apk后缀文件',
164
- usageUploadAab:
165
- '使用方法: pushy uploadAab aab后缀文件 [--includeAllSplits] [--splits 分包名列表]',
166
- usageUploadApp: '使用方法: pushy uploadApp app后缀文件',
167
- usageUploadIpa: '使用方法: pushy uploadIpa ipa后缀文件',
168
- versionBind:
169
- '已将热更包 {{version}} 绑定到原生版本 {{nativeVersion}} (id: {{id}})',
170
- versionIdRequired: '非交互模式下请提供 versionId。',
171
- welcomeMessage: '欢迎使用 pushy 热更新服务,{{name}}。',
172
- versionNameQuestion: '输入版本名称:',
173
- versionDescriptionQuestion: '输入版本描述:',
174
- versionMetaInfoQuestion: '输入自定义的 meta info:',
175
- updateNativePackageQuestion: '是否现在将此热更应用到原生包上?(Y/N)',
176
- unnamed: '(未命名)',
177
- dryRun: '以下是 dry-run 模拟运行结果,不会实际执行任何操作:',
178
- usingCustomVersion: '使用自定义版本:{{version}}',
179
- confirmDeletePackage: '确认删除原生包 {{packageId}}? 此操作不可撤销 (Y/N):',
180
- deletePackageSuccess: '原生包 {{packageId}} 删除成功',
181
- deletePackagesSuccess: '已删除 {{count}} 个原生包:{{packageIds}}',
182
- deletePackageError: '删除原生包 {{packageId}} 失败: {{error}}',
183
- usageDeletePackage:
184
- '使用方法: pushy deletePackage [packageId] --packageIds [packageIds] --appId [appId]',
185
- deleteVersionSuccess: '热更包 {{versionId}} 删除成功',
186
- deleteVersionsSuccess: '已删除 {{count}} 个热更包:{{versionIds}}',
187
- deleteVersionError: '删除热更包 {{versionId}} 失败: {{error}}',
188
- bundleFileNotFound: '未找到 bundle 文件!请使用默认的 bundle 文件名和路径。',
189
- diffPackageGenerated: '{{- output}} 已生成。',
190
- nodeHdiffpatchRequired:
191
- '此功能需要 "node-hdiffpatch"。请运行 "{{scriptName}} install node-hdiffpatch" 来安装',
192
- hbcTransformRoundTripFailed:
193
- 'HBC 变换 round-trip 自检未通过,已回退普通 diff。',
194
- hbcTransformNeedsPatch:
195
- 'hbcTransform 需要 node-hdiffpatch 的 patch 能力,选项已忽略。',
196
- bundleStreamNeedsHdiffpatch:
197
- 'bundleStreamThreshold 需要 node-hdiffpatch 的 diffStream/patchStream 能力,选项已忽略。',
198
- apkExtracted: 'APK 已提取到 {{output}}',
199
- composeSourceMapsNotFound:
200
- '找不到 react-native/scripts/compose-source-maps.js,跳过 hermes sourcemap 合成。上传的 sourcemap 可能与编译后的 bundle 不匹配。',
201
- installPackageRequired:
202
- '请指定要安装的包,例如 "{{scriptName}} install node-hdiffpatch"',
203
- installFailed: '安装 {{packages}} 失败: {{error}}',
204
- proxyNetworkError:
205
- '网络连接异常,可能是代理/VPN 导致。请尝试关闭代理后重试。',
206
- proxyNetworkErrorTips:
207
- '常见解决方法:\n1. 关闭系统代理或 VPN\n2. 检查 HTTP_PROXY / HTTPS_PROXY 环境变量\n3. 检查 .npmrc 中的 proxy 配置',
208
- invalidId: '无效的 id:{{id}}',
209
- outputPathRequired: '必须指定输出路径。',
210
- unsupportedFileType: '不支持的文件类型:{{fileType}}',
211
- failedToLoadSession: '加载登录状态失败',
212
- appIdRequired: '必须指定 appId',
213
- unknownCommand: '未知命令:{{command}}',
214
- unsupportedPlatformForHermes: 'Hermes 不支持当前系统平台:{{platform}}',
215
- invalidManifest: '无效的 manifest',
216
- failedToResolveResource: '资源解析失败:{{error}}',
217
- hermesBaseNone: 'Hermes base:未使用({{- reason}}),按普通方式编译',
218
- hermesBaseUsing: 'Hermes base:{{- source}}(HBC v{{version}})',
219
- hermesBaseDownloading: 'Hermes base:下载 {{- url}}',
220
- hermesBaseRangeFetched:
221
- 'Hermes base:已通过 HTTP Range 仅下载 bundle({{fetchedKb}} KB / 整包 {{totalKb}} KB)',
222
- hermesBaseRangeFallback:
223
- 'Hermes base:无法按需下载({{- reason}}),改为下载整包',
224
- hermesBaseCompileFailed:
225
- 'Hermes base 编译失败({{- reason}}),改为不带 -base-bytecode 重编',
226
- hermesBaseCompileFailedLog: 'Hermes base:完整编译错误已写入 {{- file}}',
227
- hermesBasePlainCompileFailed:
228
- 'Hermes base:用于校验的普通编译失败({{- reason}}),保留 base 编译结果但未校验',
229
- hermesBaseVerified: 'Hermes base:字节码与普通编译等价,校验通过',
230
- hermesBaseVerifyFailed:
231
- 'Hermes base:字节码与普通编译不等价,放弃 base 重新编译',
232
- cacheCleaned: '已清理 {{count}} 个缓存 bundle',
233
- cacheStats: 'bundle 缓存:{{- dir}} — {{files}} 个文件,{{mb}} MB',
234
- };