react-native-update-cli 2.14.0 → 2.15.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/cli.json +6 -0
- package/lib/api.js +27 -1
- package/lib/diff.js +12 -1
- package/lib/locales/en.d.ts +4 -0
- package/lib/locales/en.js +6 -2
- package/lib/locales/zh.d.ts +4 -0
- package/lib/locales/zh.js +6 -2
- package/lib/package.d.ts +5 -7
- package/lib/package.js +43 -15
- package/lib/utils/options.d.ts +1 -0
- package/lib/utils/options.js +21 -0
- package/lib/versions.d.ts +1 -0
- package/lib/versions.js +43 -11
- package/package.json +1 -1
- package/src/api.ts +38 -1
- package/src/diff.ts +12 -1
- package/src/locales/en.ts +8 -1
- package/src/locales/zh.ts +7 -1
- package/src/package.ts +56 -23
- package/src/utils/options.ts +22 -0
- package/src/versions.ts +50 -10
package/cli.json
CHANGED
|
@@ -99,6 +99,9 @@
|
|
|
99
99
|
},
|
|
100
100
|
"packageId": {
|
|
101
101
|
"hasValue": true
|
|
102
|
+
},
|
|
103
|
+
"packageIds": {
|
|
104
|
+
"hasValue": true
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
107
|
},
|
|
@@ -210,6 +213,9 @@
|
|
|
210
213
|
"versionId": {
|
|
211
214
|
"hasValue": true
|
|
212
215
|
},
|
|
216
|
+
"versionIds": {
|
|
217
|
+
"hasValue": true
|
|
218
|
+
},
|
|
213
219
|
"appId": {
|
|
214
220
|
"hasValue": true
|
|
215
221
|
}
|
package/lib/api.js
CHANGED
|
@@ -118,6 +118,24 @@ function createRequestError(error, requestUrl, status) {
|
|
|
118
118
|
requestError.status = status;
|
|
119
119
|
return requestError;
|
|
120
120
|
}
|
|
121
|
+
const PROXY_ERROR_PATTERNS = [
|
|
122
|
+
'socket disconnected before secure TLS connection',
|
|
123
|
+
'ECONNRESET',
|
|
124
|
+
'ECONNREFUSED',
|
|
125
|
+
'DEPTH_ZERO_SELF_SIGNED_CERT',
|
|
126
|
+
'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
|
|
127
|
+
'CERT_HAS_EXPIRED',
|
|
128
|
+
'self signed certificate',
|
|
129
|
+
'proxy',
|
|
130
|
+
'ETIMEDOUT',
|
|
131
|
+
'EHOSTUNREACH',
|
|
132
|
+
'ENETUNREACH'
|
|
133
|
+
];
|
|
134
|
+
function isProxyRelatedError(error) {
|
|
135
|
+
const msg = error instanceof Error ? error.message : typeof error === 'string' ? error : '';
|
|
136
|
+
const lower = msg.toLowerCase();
|
|
137
|
+
return PROXY_ERROR_PATTERNS.some((p)=>lower.includes(p.toLowerCase()));
|
|
138
|
+
}
|
|
121
139
|
async function query(url, options) {
|
|
122
140
|
const baseUrl = await _httphelper.getBaseUrl;
|
|
123
141
|
const fullUrl = `${baseUrl}${url}`;
|
|
@@ -125,7 +143,11 @@ async function query(url, options) {
|
|
|
125
143
|
try {
|
|
126
144
|
resp = await (0, _runtime.runtimeFetch)(fullUrl, options);
|
|
127
145
|
} catch (error) {
|
|
128
|
-
|
|
146
|
+
const baseError = createRequestError(error, fullUrl);
|
|
147
|
+
if (isProxyRelatedError(error)) {
|
|
148
|
+
throw new Error(`${baseError.message}\n\n${(0, _i18n.t)('proxyNetworkError')}\n${(0, _i18n.t)('proxyNetworkErrorTips')}`);
|
|
149
|
+
}
|
|
150
|
+
throw baseError;
|
|
129
151
|
}
|
|
130
152
|
const text = await resp.text();
|
|
131
153
|
let json;
|
|
@@ -238,6 +260,10 @@ async function uploadFile(fn, key) {
|
|
|
238
260
|
body: form
|
|
239
261
|
});
|
|
240
262
|
} catch (error) {
|
|
263
|
+
if (isProxyRelatedError(error)) {
|
|
264
|
+
const rawMessage = error instanceof Error ? error.message : String(error);
|
|
265
|
+
throw new Error(`${rawMessage}\n\n${(0, _i18n.t)('proxyNetworkError')}\n${(0, _i18n.t)('proxyNetworkErrorTips')}`);
|
|
266
|
+
}
|
|
241
267
|
throw createRequestError(error, realUrl);
|
|
242
268
|
}
|
|
243
269
|
if (res.status > 299) {
|
package/lib/diff.js
CHANGED
|
@@ -210,6 +210,12 @@ async function diffFromPackage(origin, next, output, diffFn, originBundleName, t
|
|
|
210
210
|
const originEntries = {};
|
|
211
211
|
const originMap = {};
|
|
212
212
|
let originSource;
|
|
213
|
+
// Content checksum (CRC32) for entries that are copied from a *different*
|
|
214
|
+
// path in the origin package ("moved" entries). On Android these are the
|
|
215
|
+
// res/ drawables (images), whose on-device path differs between an APK
|
|
216
|
+
// baseline and an AAB(split-apk) install due to resource path shortening,
|
|
217
|
+
// so the client cannot locate them by path and must fall back to content.
|
|
218
|
+
const copiesCrc = {};
|
|
213
219
|
await (0, _zipentries.enumZipEntries)(origin, async (entry, zipFile)=>{
|
|
214
220
|
if (!/\/$/.test(entry.fileName)) {
|
|
215
221
|
const fn = transformPackagePath(entry.fileName);
|
|
@@ -257,6 +263,10 @@ async function diffFromPackage(origin, next, output, diffFn, originBundleName, t
|
|
|
257
263
|
const movedFrom = originMap[entry.crc32];
|
|
258
264
|
if (movedFrom) {
|
|
259
265
|
copies[entry.fileName] = movedFrom;
|
|
266
|
+
// Record the content checksum so the client can locate this file by
|
|
267
|
+
// content when the origin path does not exist verbatim on device
|
|
268
|
+
// (APK baseline -> AAB install path shortening).
|
|
269
|
+
copiesCrc[entry.fileName] = entry.crc32;
|
|
260
270
|
return;
|
|
261
271
|
}
|
|
262
272
|
const entryPrefix = await (0, _zipentries.readEntryPrefix)(entry, nextZipfile, _zipoptions.ZIP_ENTRY_SNIFF_BYTES);
|
|
@@ -278,7 +288,8 @@ async function diffFromPackage(origin, next, output, diffFn, originBundleName, t
|
|
|
278
288
|
}
|
|
279
289
|
});
|
|
280
290
|
const diffManifest = Buffer.from(JSON.stringify({
|
|
281
|
-
copies
|
|
291
|
+
copies,
|
|
292
|
+
copiesCrc
|
|
282
293
|
}));
|
|
283
294
|
zipfile.addBuffer(diffManifest, '__diff.json', (0, _zipoptions.zipOptionsForManifestEntry)(diffManifest.length));
|
|
284
295
|
zipfile.end();
|
package/lib/locales/en.d.ts
CHANGED
|
@@ -126,13 +126,17 @@ declare const _default: {
|
|
|
126
126
|
usingCustomVersion: string;
|
|
127
127
|
confirmDeletePackage: string;
|
|
128
128
|
deletePackageSuccess: string;
|
|
129
|
+
deletePackagesSuccess: string;
|
|
129
130
|
deletePackageError: string;
|
|
130
131
|
usageDeletePackage: string;
|
|
131
132
|
deleteVersionSuccess: string;
|
|
133
|
+
deleteVersionsSuccess: string;
|
|
132
134
|
deleteVersionError: string;
|
|
133
135
|
bundleFileNotFound: string;
|
|
134
136
|
diffPackageGenerated: string;
|
|
135
137
|
nodeHdiffpatchRequired: string;
|
|
136
138
|
apkExtracted: string;
|
|
139
|
+
proxyNetworkError: string;
|
|
140
|
+
proxyNetworkErrorTips: string;
|
|
137
141
|
};
|
|
138
142
|
export default _default;
|
package/lib/locales/en.js
CHANGED
|
@@ -142,12 +142,16 @@ This can reduce the risk of inconsistent dependencies and supply chain attacks.
|
|
|
142
142
|
usingCustomVersion: 'Using custom version: {{version}}',
|
|
143
143
|
confirmDeletePackage: 'Confirm delete native package {{packageId}}? This operation cannot be undone (Y/N):',
|
|
144
144
|
deletePackageSuccess: 'Native package {{packageId}} deleted successfully',
|
|
145
|
+
deletePackagesSuccess: 'Deleted {{count}} native packages: {{packageIds}}',
|
|
145
146
|
deletePackageError: 'Failed to delete native package {{packageId}}: {{error}}',
|
|
146
|
-
usageDeletePackage: 'Usage: cresc deletePackage [packageId] --appId [appId]',
|
|
147
|
+
usageDeletePackage: 'Usage: cresc deletePackage [packageId] --packageIds [packageIds] --appId [appId]',
|
|
147
148
|
deleteVersionSuccess: 'Version {{versionId}} deleted successfully',
|
|
149
|
+
deleteVersionsSuccess: 'Deleted {{count}} OTA versions: {{versionIds}}',
|
|
148
150
|
deleteVersionError: 'Failed to delete version {{versionId}}: {{error}}',
|
|
149
151
|
bundleFileNotFound: 'Bundle file not found! Please use default bundle file name and path.',
|
|
150
152
|
diffPackageGenerated: '{{- output}} generated.',
|
|
151
153
|
nodeHdiffpatchRequired: 'This function needs "node-hdiffpatch". Please run "{{scriptName}} install node-hdiffpatch" to install',
|
|
152
|
-
apkExtracted: 'APK extracted to {{output}}'
|
|
154
|
+
apkExtracted: 'APK extracted to {{output}}',
|
|
155
|
+
proxyNetworkError: 'Network error — likely caused by a proxy/VPN. Please try disabling your proxy and retry.',
|
|
156
|
+
proxyNetworkErrorTips: 'Common fixes:\n1. Disable system proxy or VPN\n2. Check HTTP_PROXY / HTTPS_PROXY environment variables\n3. Check proxy settings in .npmrc'
|
|
153
157
|
};
|
package/lib/locales/zh.d.ts
CHANGED
|
@@ -125,13 +125,17 @@ declare const _default: {
|
|
|
125
125
|
usingCustomVersion: string;
|
|
126
126
|
confirmDeletePackage: string;
|
|
127
127
|
deletePackageSuccess: string;
|
|
128
|
+
deletePackagesSuccess: string;
|
|
128
129
|
deletePackageError: string;
|
|
129
130
|
usageDeletePackage: string;
|
|
130
131
|
deleteVersionSuccess: string;
|
|
132
|
+
deleteVersionsSuccess: string;
|
|
131
133
|
deleteVersionError: string;
|
|
132
134
|
bundleFileNotFound: string;
|
|
133
135
|
diffPackageGenerated: string;
|
|
134
136
|
nodeHdiffpatchRequired: string;
|
|
135
137
|
apkExtracted: string;
|
|
138
|
+
proxyNetworkError: string;
|
|
139
|
+
proxyNetworkErrorTips: string;
|
|
136
140
|
};
|
|
137
141
|
export default _default;
|
package/lib/locales/zh.js
CHANGED
|
@@ -141,12 +141,16 @@ const _default = {
|
|
|
141
141
|
usingCustomVersion: '使用自定义版本:{{version}}',
|
|
142
142
|
confirmDeletePackage: '确认删除原生包 {{packageId}}? 此操作不可撤销 (Y/N):',
|
|
143
143
|
deletePackageSuccess: '原生包 {{packageId}} 删除成功',
|
|
144
|
+
deletePackagesSuccess: '已删除 {{count}} 个原生包:{{packageIds}}',
|
|
144
145
|
deletePackageError: '删除原生包 {{packageId}} 失败: {{error}}',
|
|
145
|
-
usageDeletePackage: '使用方法: pushy deletePackage [packageId] --appId [appId]',
|
|
146
|
+
usageDeletePackage: '使用方法: pushy deletePackage [packageId] --packageIds [packageIds] --appId [appId]',
|
|
146
147
|
deleteVersionSuccess: '热更包 {{versionId}} 删除成功',
|
|
148
|
+
deleteVersionsSuccess: '已删除 {{count}} 个热更包:{{versionIds}}',
|
|
147
149
|
deleteVersionError: '删除热更包 {{versionId}} 失败: {{error}}',
|
|
148
150
|
bundleFileNotFound: '未找到 bundle 文件!请使用默认的 bundle 文件名和路径。',
|
|
149
151
|
diffPackageGenerated: '{{- output}} 已生成。',
|
|
150
152
|
nodeHdiffpatchRequired: '此功能需要 "node-hdiffpatch"。请运行 "{{scriptName}} install node-hdiffpatch" 来安装',
|
|
151
|
-
apkExtracted: 'APK 已提取到 {{output}}'
|
|
153
|
+
apkExtracted: 'APK 已提取到 {{output}}',
|
|
154
|
+
proxyNetworkError: '网络连接异常,可能是代理/VPN 导致。请尝试关闭代理后重试。',
|
|
155
|
+
proxyNetworkErrorTips: '常见解决方法:\n1. 关闭系统代理或 VPN\n2. 检查 HTTP_PROXY / HTTPS_PROXY 环境变量\n3. 检查 .npmrc 中的 proxy 配置'
|
|
152
156
|
};
|
package/lib/package.d.ts
CHANGED
|
@@ -4,6 +4,9 @@ type PackageCommandOptions = Record<string, unknown> & {
|
|
|
4
4
|
appKey?: string;
|
|
5
5
|
platform?: Platform;
|
|
6
6
|
version?: string;
|
|
7
|
+
packageId?: string;
|
|
8
|
+
packageIds?: string;
|
|
9
|
+
packageVersion?: string;
|
|
7
10
|
includeAllSplits?: boolean | string;
|
|
8
11
|
splits?: string;
|
|
9
12
|
output?: string;
|
|
@@ -49,13 +52,8 @@ export declare const packageCommands: {
|
|
|
49
52
|
platform: Platform;
|
|
50
53
|
};
|
|
51
54
|
}) => Promise<void>;
|
|
52
|
-
deletePackage: ({ options
|
|
53
|
-
options:
|
|
54
|
-
appId?: string;
|
|
55
|
-
packageId?: string;
|
|
56
|
-
packageVersion?: string;
|
|
57
|
-
platform?: Platform;
|
|
58
|
-
};
|
|
55
|
+
deletePackage: ({ options }: {
|
|
56
|
+
options: PackageCommandOptions;
|
|
59
57
|
}) => Promise<void>;
|
|
60
58
|
};
|
|
61
59
|
export {};
|
package/lib/package.js
CHANGED
|
@@ -33,6 +33,7 @@ const _aab = require("./utils/app-info-parser/aab");
|
|
|
33
33
|
const _depversions = require("./utils/dep-versions");
|
|
34
34
|
const _git = require("./utils/git");
|
|
35
35
|
const _i18n = require("./utils/i18n");
|
|
36
|
+
const _options = require("./utils/options");
|
|
36
37
|
function _interop_require_default(obj) {
|
|
37
38
|
return obj && obj.__esModule ? obj : {
|
|
38
39
|
default: obj
|
|
@@ -98,6 +99,15 @@ function parseCsvOption(value) {
|
|
|
98
99
|
const parsed = value.split(',').map((item)=>item.trim()).filter(Boolean);
|
|
99
100
|
return parsed.length > 0 ? parsed : null;
|
|
100
101
|
}
|
|
102
|
+
function toNumericIds(ids) {
|
|
103
|
+
return ids.map((id)=>{
|
|
104
|
+
const numericId = Number(id);
|
|
105
|
+
if (!Number.isInteger(numericId) || numericId <= 0) {
|
|
106
|
+
throw new Error(`Invalid id: ${id}`);
|
|
107
|
+
}
|
|
108
|
+
return numericId;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
101
111
|
function getVersionBinding(version) {
|
|
102
112
|
if (!version || typeof version !== 'object') {
|
|
103
113
|
return undefined;
|
|
@@ -313,26 +323,33 @@ const packageCommands = {
|
|
|
313
323
|
await listPackage(String(appId));
|
|
314
324
|
},
|
|
315
325
|
deletePackage: async ({ options })=>{
|
|
316
|
-
|
|
326
|
+
var _getStringListOption;
|
|
327
|
+
let { appId } = options;
|
|
328
|
+
let packageIds = (_getStringListOption = (0, _options.getStringListOption)(options, 'packageIds')) != null ? _getStringListOption : (0, _options.getStringListOption)(options, 'packageId');
|
|
317
329
|
if (!appId) {
|
|
318
330
|
const platform = await (0, _app.getPlatform)(options.platform);
|
|
319
331
|
appId = (await (0, _app.getSelectedApp)(platform)).appId;
|
|
320
332
|
}
|
|
321
|
-
|
|
322
|
-
|
|
333
|
+
if (!packageIds) {
|
|
334
|
+
const packageVersions = (0, _options.getStringListOption)(options, 'packageVersion');
|
|
335
|
+
if (!packageVersions) {
|
|
336
|
+
throw new Error((0, _i18n.t)('usageDeletePackage'));
|
|
337
|
+
}
|
|
323
338
|
const allPkgs = await (0, _api.getAllPackages)(appId);
|
|
324
339
|
if (!allPkgs) {
|
|
325
340
|
throw new Error((0, _i18n.t)('noPackagesFound', {
|
|
326
341
|
appId
|
|
327
342
|
}));
|
|
328
343
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
344
|
+
packageIds = packageVersions.map((packageVersion)=>{
|
|
345
|
+
const selectedPackage = allPkgs.find((pkg)=>pkg.name === packageVersion);
|
|
346
|
+
if (!selectedPackage) {
|
|
347
|
+
throw new Error((0, _i18n.t)('packageNotFound', {
|
|
348
|
+
packageVersion
|
|
349
|
+
}));
|
|
350
|
+
}
|
|
351
|
+
return String(selectedPackage.id);
|
|
352
|
+
});
|
|
336
353
|
}
|
|
337
354
|
// Confirm deletion
|
|
338
355
|
// const confirmDelete = await question(
|
|
@@ -346,14 +363,25 @@ const packageCommands = {
|
|
|
346
363
|
// return;
|
|
347
364
|
// }
|
|
348
365
|
try {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
packageId
|
|
352
|
-
|
|
366
|
+
if (packageIds.length === 1) {
|
|
367
|
+
const [packageId] = packageIds;
|
|
368
|
+
await (0, _api.doDelete)(`/app/${appId}/package/${packageId}`);
|
|
369
|
+
console.log((0, _i18n.t)('deletePackageSuccess', {
|
|
370
|
+
packageId
|
|
371
|
+
}));
|
|
372
|
+
} else {
|
|
373
|
+
await (0, _api.doDelete)(`/app/${appId}/package`, {
|
|
374
|
+
packageIds: toNumericIds(packageIds)
|
|
375
|
+
});
|
|
376
|
+
console.log((0, _i18n.t)('deletePackagesSuccess', {
|
|
377
|
+
count: packageIds.length,
|
|
378
|
+
packageIds: packageIds.join(', ')
|
|
379
|
+
}));
|
|
380
|
+
}
|
|
353
381
|
} catch (error) {
|
|
354
382
|
const message = error instanceof Error ? error.message : String(error);
|
|
355
383
|
throw new Error((0, _i18n.t)('deletePackageError', {
|
|
356
|
-
packageId,
|
|
384
|
+
packageId: packageIds.join(', '),
|
|
357
385
|
error: message
|
|
358
386
|
}));
|
|
359
387
|
}
|
package/lib/utils/options.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare function getBooleanOption(options: Record<string, unknown>, key: string, fallback?: boolean): boolean;
|
|
2
2
|
export declare function getStringOption(options: Record<string, unknown>, key: string, fallback?: string): string;
|
|
3
3
|
export declare function getOptionalStringOption(options: Record<string, unknown>, key: string): string | undefined;
|
|
4
|
+
export declare function getStringListOption(options: Record<string, unknown>, key: string): string[] | undefined;
|
|
4
5
|
export declare function toObjectState<T extends Record<string, unknown>>(value: unknown, fallback: T): T;
|
package/lib/utils/options.js
CHANGED
|
@@ -15,6 +15,9 @@ _export(exports, {
|
|
|
15
15
|
get getOptionalStringOption () {
|
|
16
16
|
return getOptionalStringOption;
|
|
17
17
|
},
|
|
18
|
+
get getStringListOption () {
|
|
19
|
+
return getStringListOption;
|
|
20
|
+
},
|
|
18
21
|
get getStringOption () {
|
|
19
22
|
return getStringOption;
|
|
20
23
|
},
|
|
@@ -55,6 +58,24 @@ function getOptionalStringOption(options, key) {
|
|
|
55
58
|
}
|
|
56
59
|
return undefined;
|
|
57
60
|
}
|
|
61
|
+
function getStringListOption(options, key) {
|
|
62
|
+
const value = options[key];
|
|
63
|
+
const rawValues = Array.isArray(value) ? value : [
|
|
64
|
+
value
|
|
65
|
+
];
|
|
66
|
+
const result = rawValues.flatMap((item)=>{
|
|
67
|
+
if (typeof item === 'string') {
|
|
68
|
+
return item.split(',').map((value)=>value.trim()).filter(Boolean);
|
|
69
|
+
}
|
|
70
|
+
if (typeof item === 'number' || typeof item === 'boolean') {
|
|
71
|
+
return [
|
|
72
|
+
String(item)
|
|
73
|
+
];
|
|
74
|
+
}
|
|
75
|
+
return [];
|
|
76
|
+
});
|
|
77
|
+
return result.length > 0 ? result : undefined;
|
|
78
|
+
}
|
|
58
79
|
function toObjectState(value, fallback) {
|
|
59
80
|
if (value && typeof value === 'object') {
|
|
60
81
|
return value;
|
package/lib/versions.d.ts
CHANGED
package/lib/versions.js
CHANGED
|
@@ -99,6 +99,15 @@ function getDepsChanges(oldDeps, newDeps) {
|
|
|
99
99
|
}
|
|
100
100
|
return rows;
|
|
101
101
|
}
|
|
102
|
+
function toNumericIds(ids) {
|
|
103
|
+
return ids.map((id)=>{
|
|
104
|
+
const numericId = Number(id);
|
|
105
|
+
if (!Number.isInteger(numericId) || numericId <= 0) {
|
|
106
|
+
throw new Error(`Invalid id: ${id}`);
|
|
107
|
+
}
|
|
108
|
+
return numericId;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
102
111
|
function getDepsChangeSummary(changes) {
|
|
103
112
|
return changes.reduce((acc, item)=>{
|
|
104
113
|
if (item.type === 'added') {
|
|
@@ -304,14 +313,22 @@ const bindVersionToPackages = async ({ appId, versionId, pkgs, rollout, dryRun }
|
|
|
304
313
|
rollout: rollout
|
|
305
314
|
})}`);
|
|
306
315
|
}
|
|
307
|
-
|
|
308
|
-
if (
|
|
316
|
+
if (!dryRun) {
|
|
317
|
+
if (pkgs.length === 1) {
|
|
309
318
|
await (0, _api.post)(`/app/${appId}/binding`, {
|
|
310
319
|
versionId,
|
|
311
320
|
rollout,
|
|
312
|
-
packageId:
|
|
321
|
+
packageId: pkgs[0].id
|
|
322
|
+
});
|
|
323
|
+
} else {
|
|
324
|
+
await (0, _api.post)(`/app/${appId}/binding`, {
|
|
325
|
+
versionId,
|
|
326
|
+
rollout,
|
|
327
|
+
packageIds: toNumericIds(pkgs.map((pkg)=>String(pkg.id)))
|
|
313
328
|
});
|
|
314
329
|
}
|
|
330
|
+
}
|
|
331
|
+
for (const pkg of pkgs){
|
|
315
332
|
console.log(`${(0, _i18n.t)('versionBind', {
|
|
316
333
|
version: versionId,
|
|
317
334
|
nativeVersion: pkg.name,
|
|
@@ -525,27 +542,42 @@ const versionCommands = {
|
|
|
525
542
|
console.log((0, _i18n.t)('operationSuccess'));
|
|
526
543
|
},
|
|
527
544
|
deleteVersion: async ({ options })=>{
|
|
545
|
+
var _getStringListOption;
|
|
528
546
|
const nonInteractive = (0, _options.getBooleanOption)(options, 'no-interactive', false) || (0, _utils.isNonInteractive)();
|
|
529
547
|
let appId = options.appId;
|
|
530
548
|
if (!appId) {
|
|
531
549
|
const platform = await (0, _app.getPlatform)(options.platform);
|
|
532
550
|
appId = (await (0, _app.getSelectedApp)(platform)).appId;
|
|
533
551
|
}
|
|
534
|
-
|
|
535
|
-
|
|
552
|
+
const parsedVersionIds = (_getStringListOption = (0, _options.getStringListOption)(options, 'versionIds')) != null ? _getStringListOption : (0, _options.getStringListOption)(options, 'versionId');
|
|
553
|
+
let versionIds = parsedVersionIds;
|
|
554
|
+
if (!versionIds) {
|
|
536
555
|
if (nonInteractive) {
|
|
537
556
|
throw new Error((0, _i18n.t)('versionIdRequired'));
|
|
538
557
|
}
|
|
539
|
-
|
|
558
|
+
versionIds = [
|
|
559
|
+
(await chooseVersion(String(appId))).id
|
|
560
|
+
];
|
|
540
561
|
}
|
|
541
562
|
try {
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
versionId
|
|
545
|
-
|
|
563
|
+
if (versionIds.length === 1) {
|
|
564
|
+
const [versionId] = versionIds;
|
|
565
|
+
await (0, _api.doDelete)(`/app/${String(appId)}/version/${versionId}`);
|
|
566
|
+
console.log((0, _i18n.t)('deleteVersionSuccess', {
|
|
567
|
+
versionId
|
|
568
|
+
}));
|
|
569
|
+
} else {
|
|
570
|
+
await (0, _api.doDelete)(`/app/${String(appId)}/version`, {
|
|
571
|
+
versionIds: toNumericIds(versionIds)
|
|
572
|
+
});
|
|
573
|
+
console.log((0, _i18n.t)('deleteVersionsSuccess', {
|
|
574
|
+
count: versionIds.length,
|
|
575
|
+
versionIds: versionIds.join(', ')
|
|
576
|
+
}));
|
|
577
|
+
}
|
|
546
578
|
} catch (error) {
|
|
547
579
|
throw new Error((0, _i18n.t)('deleteVersionError', {
|
|
548
|
-
versionId,
|
|
580
|
+
versionId: versionIds.join(', '),
|
|
549
581
|
error: error.message
|
|
550
582
|
}));
|
|
551
583
|
}
|
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -95,6 +95,31 @@ function createRequestError(
|
|
|
95
95
|
return requestError;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
const PROXY_ERROR_PATTERNS = [
|
|
99
|
+
'socket disconnected before secure TLS connection',
|
|
100
|
+
'ECONNRESET',
|
|
101
|
+
'ECONNREFUSED',
|
|
102
|
+
'DEPTH_ZERO_SELF_SIGNED_CERT',
|
|
103
|
+
'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
|
|
104
|
+
'CERT_HAS_EXPIRED',
|
|
105
|
+
'self signed certificate',
|
|
106
|
+
'proxy',
|
|
107
|
+
'ETIMEDOUT',
|
|
108
|
+
'EHOSTUNREACH',
|
|
109
|
+
'ENETUNREACH',
|
|
110
|
+
];
|
|
111
|
+
|
|
112
|
+
function isProxyRelatedError(error: unknown): boolean {
|
|
113
|
+
const msg =
|
|
114
|
+
error instanceof Error
|
|
115
|
+
? error.message
|
|
116
|
+
: typeof error === 'string'
|
|
117
|
+
? error
|
|
118
|
+
: '';
|
|
119
|
+
const lower = msg.toLowerCase();
|
|
120
|
+
return PROXY_ERROR_PATTERNS.some((p) => lower.includes(p.toLowerCase()));
|
|
121
|
+
}
|
|
122
|
+
|
|
98
123
|
async function query(url: string, options: RuntimeRequestInit) {
|
|
99
124
|
const baseUrl = await getBaseUrl;
|
|
100
125
|
const fullUrl = `${baseUrl}${url}`;
|
|
@@ -102,7 +127,13 @@ async function query(url: string, options: RuntimeRequestInit) {
|
|
|
102
127
|
try {
|
|
103
128
|
resp = await runtimeFetch(fullUrl, options);
|
|
104
129
|
} catch (error) {
|
|
105
|
-
|
|
130
|
+
const baseError = createRequestError(error, fullUrl);
|
|
131
|
+
if (isProxyRelatedError(error)) {
|
|
132
|
+
throw new Error(
|
|
133
|
+
`${baseError.message}\n\n${t('proxyNetworkError')}\n${t('proxyNetworkErrorTips')}`,
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
throw baseError;
|
|
106
137
|
}
|
|
107
138
|
const text = await resp.text();
|
|
108
139
|
let json: any;
|
|
@@ -230,6 +261,12 @@ export async function uploadFile(fn: string, key?: string) {
|
|
|
230
261
|
body: form,
|
|
231
262
|
});
|
|
232
263
|
} catch (error) {
|
|
264
|
+
if (isProxyRelatedError(error)) {
|
|
265
|
+
const rawMessage = error instanceof Error ? error.message : String(error);
|
|
266
|
+
throw new Error(
|
|
267
|
+
`${rawMessage}\n\n${t('proxyNetworkError')}\n${t('proxyNetworkErrorTips')}`,
|
|
268
|
+
);
|
|
269
|
+
}
|
|
233
270
|
throw createRequestError(error, realUrl);
|
|
234
271
|
}
|
|
235
272
|
|
package/src/diff.ts
CHANGED
|
@@ -223,6 +223,13 @@ async function diffFromPackage(
|
|
|
223
223
|
|
|
224
224
|
let originSource: Buffer | undefined;
|
|
225
225
|
|
|
226
|
+
// Content checksum (CRC32) for entries that are copied from a *different*
|
|
227
|
+
// path in the origin package ("moved" entries). On Android these are the
|
|
228
|
+
// res/ drawables (images), whose on-device path differs between an APK
|
|
229
|
+
// baseline and an AAB(split-apk) install due to resource path shortening,
|
|
230
|
+
// so the client cannot locate them by path and must fall back to content.
|
|
231
|
+
const copiesCrc: Record<string, number> = {};
|
|
232
|
+
|
|
226
233
|
await enumZipEntries(origin, async (entry, zipFile) => {
|
|
227
234
|
if (!/\/$/.test(entry.fileName)) {
|
|
228
235
|
const fn = transformPackagePath(entry.fileName);
|
|
@@ -281,6 +288,10 @@ async function diffFromPackage(
|
|
|
281
288
|
const movedFrom = originMap[entry.crc32];
|
|
282
289
|
if (movedFrom) {
|
|
283
290
|
copies[entry.fileName] = movedFrom;
|
|
291
|
+
// Record the content checksum so the client can locate this file by
|
|
292
|
+
// content when the origin path does not exist verbatim on device
|
|
293
|
+
// (APK baseline -> AAB install path shortening).
|
|
294
|
+
copiesCrc[entry.fileName] = entry.crc32;
|
|
284
295
|
return;
|
|
285
296
|
}
|
|
286
297
|
|
|
@@ -313,7 +324,7 @@ async function diffFromPackage(
|
|
|
313
324
|
}
|
|
314
325
|
});
|
|
315
326
|
|
|
316
|
-
const diffManifest = Buffer.from(JSON.stringify({ copies }));
|
|
327
|
+
const diffManifest = Buffer.from(JSON.stringify({ copies, copiesCrc }));
|
|
317
328
|
zipfile.addBuffer(
|
|
318
329
|
diffManifest,
|
|
319
330
|
'__diff.json',
|
package/src/locales/en.ts
CHANGED
|
@@ -168,10 +168,13 @@ This can reduce the risk of inconsistent dependencies and supply chain attacks.
|
|
|
168
168
|
confirmDeletePackage:
|
|
169
169
|
'Confirm delete native package {{packageId}}? This operation cannot be undone (Y/N):',
|
|
170
170
|
deletePackageSuccess: 'Native package {{packageId}} deleted successfully',
|
|
171
|
+
deletePackagesSuccess: 'Deleted {{count}} native packages: {{packageIds}}',
|
|
171
172
|
deletePackageError:
|
|
172
173
|
'Failed to delete native package {{packageId}}: {{error}}',
|
|
173
|
-
usageDeletePackage:
|
|
174
|
+
usageDeletePackage:
|
|
175
|
+
'Usage: cresc deletePackage [packageId] --packageIds [packageIds] --appId [appId]',
|
|
174
176
|
deleteVersionSuccess: 'Version {{versionId}} deleted successfully',
|
|
177
|
+
deleteVersionsSuccess: 'Deleted {{count}} OTA versions: {{versionIds}}',
|
|
175
178
|
deleteVersionError: 'Failed to delete version {{versionId}}: {{error}}',
|
|
176
179
|
bundleFileNotFound:
|
|
177
180
|
'Bundle file not found! Please use default bundle file name and path.',
|
|
@@ -179,4 +182,8 @@ This can reduce the risk of inconsistent dependencies and supply chain attacks.
|
|
|
179
182
|
nodeHdiffpatchRequired:
|
|
180
183
|
'This function needs "node-hdiffpatch". Please run "{{scriptName}} install node-hdiffpatch" to install',
|
|
181
184
|
apkExtracted: 'APK extracted to {{output}}',
|
|
185
|
+
proxyNetworkError:
|
|
186
|
+
'Network error — likely caused by a proxy/VPN. Please try disabling your proxy and retry.',
|
|
187
|
+
proxyNetworkErrorTips:
|
|
188
|
+
'Common fixes:\n1. Disable system proxy or VPN\n2. Check HTTP_PROXY / HTTPS_PROXY environment variables\n3. Check proxy settings in .npmrc',
|
|
182
189
|
};
|
package/src/locales/zh.ts
CHANGED
|
@@ -156,14 +156,20 @@ export default {
|
|
|
156
156
|
usingCustomVersion: '使用自定义版本:{{version}}',
|
|
157
157
|
confirmDeletePackage: '确认删除原生包 {{packageId}}? 此操作不可撤销 (Y/N):',
|
|
158
158
|
deletePackageSuccess: '原生包 {{packageId}} 删除成功',
|
|
159
|
+
deletePackagesSuccess: '已删除 {{count}} 个原生包:{{packageIds}}',
|
|
159
160
|
deletePackageError: '删除原生包 {{packageId}} 失败: {{error}}',
|
|
160
161
|
usageDeletePackage:
|
|
161
|
-
'使用方法: pushy deletePackage [packageId] --appId [appId]',
|
|
162
|
+
'使用方法: pushy deletePackage [packageId] --packageIds [packageIds] --appId [appId]',
|
|
162
163
|
deleteVersionSuccess: '热更包 {{versionId}} 删除成功',
|
|
164
|
+
deleteVersionsSuccess: '已删除 {{count}} 个热更包:{{versionIds}}',
|
|
163
165
|
deleteVersionError: '删除热更包 {{versionId}} 失败: {{error}}',
|
|
164
166
|
bundleFileNotFound: '未找到 bundle 文件!请使用默认的 bundle 文件名和路径。',
|
|
165
167
|
diffPackageGenerated: '{{- output}} 已生成。',
|
|
166
168
|
nodeHdiffpatchRequired:
|
|
167
169
|
'此功能需要 "node-hdiffpatch"。请运行 "{{scriptName}} install node-hdiffpatch" 来安装',
|
|
168
170
|
apkExtracted: 'APK 已提取到 {{output}}',
|
|
171
|
+
proxyNetworkError:
|
|
172
|
+
'网络连接异常,可能是代理/VPN 导致。请尝试关闭代理后重试。',
|
|
173
|
+
proxyNetworkErrorTips:
|
|
174
|
+
'常见解决方法:\n1. 关闭系统代理或 VPN\n2. 检查 HTTP_PROXY / HTTPS_PROXY 环境变量\n3. 检查 .npmrc 中的 proxy 配置',
|
|
169
175
|
};
|
package/src/package.ts
CHANGED
|
@@ -16,12 +16,16 @@ import { AabParser } from './utils/app-info-parser/aab';
|
|
|
16
16
|
import { depVersions } from './utils/dep-versions';
|
|
17
17
|
import { getCommitInfo } from './utils/git';
|
|
18
18
|
import { t } from './utils/i18n';
|
|
19
|
+
import { getStringListOption } from './utils/options';
|
|
19
20
|
|
|
20
21
|
type PackageCommandOptions = Record<string, unknown> & {
|
|
21
22
|
appId?: string;
|
|
22
23
|
appKey?: string;
|
|
23
24
|
platform?: Platform;
|
|
24
25
|
version?: string;
|
|
26
|
+
packageId?: string;
|
|
27
|
+
packageIds?: string;
|
|
28
|
+
packageVersion?: string;
|
|
25
29
|
includeAllSplits?: boolean | string;
|
|
26
30
|
splits?: string;
|
|
27
31
|
output?: string;
|
|
@@ -82,6 +86,16 @@ function parseCsvOption(value: unknown): string[] | null {
|
|
|
82
86
|
return parsed.length > 0 ? parsed : null;
|
|
83
87
|
}
|
|
84
88
|
|
|
89
|
+
function toNumericIds(ids: string[]) {
|
|
90
|
+
return ids.map((id) => {
|
|
91
|
+
const numericId = Number(id);
|
|
92
|
+
if (!Number.isInteger(numericId) || numericId <= 0) {
|
|
93
|
+
throw new Error(`Invalid id: ${id}`);
|
|
94
|
+
}
|
|
95
|
+
return numericId;
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
85
99
|
function getVersionBinding(version: unknown): PackageVersionRef | undefined {
|
|
86
100
|
if (!version || typeof version !== 'object') {
|
|
87
101
|
return undefined;
|
|
@@ -339,36 +353,37 @@ export const packageCommands = {
|
|
|
339
353
|
const { appId } = await getSelectedApp(platform);
|
|
340
354
|
await listPackage(String(appId));
|
|
341
355
|
},
|
|
342
|
-
deletePackage: async ({
|
|
343
|
-
options
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
packageId?: string;
|
|
348
|
-
packageVersion?: string;
|
|
349
|
-
platform?: Platform;
|
|
350
|
-
};
|
|
351
|
-
}) => {
|
|
352
|
-
let { appId, packageId, packageVersion } = options;
|
|
356
|
+
deletePackage: async ({ options }: { options: PackageCommandOptions }) => {
|
|
357
|
+
let { appId } = options;
|
|
358
|
+
let packageIds =
|
|
359
|
+
getStringListOption(options, 'packageIds') ??
|
|
360
|
+
getStringListOption(options, 'packageId');
|
|
353
361
|
|
|
354
362
|
if (!appId) {
|
|
355
363
|
const platform = await getPlatform(options.platform);
|
|
356
364
|
appId = (await getSelectedApp(platform)).appId;
|
|
357
365
|
}
|
|
358
366
|
|
|
359
|
-
|
|
360
|
-
|
|
367
|
+
if (!packageIds) {
|
|
368
|
+
const packageVersions = getStringListOption(options, 'packageVersion');
|
|
369
|
+
if (!packageVersions) {
|
|
370
|
+
throw new Error(t('usageDeletePackage'));
|
|
371
|
+
}
|
|
372
|
+
|
|
361
373
|
const allPkgs = await getAllPackages(appId);
|
|
362
374
|
if (!allPkgs) {
|
|
363
375
|
throw new Error(t('noPackagesFound', { appId }));
|
|
364
376
|
}
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
377
|
+
|
|
378
|
+
packageIds = packageVersions.map((packageVersion) => {
|
|
379
|
+
const selectedPackage = allPkgs.find(
|
|
380
|
+
(pkg) => pkg.name === packageVersion,
|
|
381
|
+
);
|
|
382
|
+
if (!selectedPackage) {
|
|
383
|
+
throw new Error(t('packageNotFound', { packageVersion }));
|
|
384
|
+
}
|
|
385
|
+
return String(selectedPackage.id);
|
|
386
|
+
});
|
|
372
387
|
}
|
|
373
388
|
|
|
374
389
|
// Confirm deletion
|
|
@@ -385,11 +400,29 @@ export const packageCommands = {
|
|
|
385
400
|
// }
|
|
386
401
|
|
|
387
402
|
try {
|
|
388
|
-
|
|
389
|
-
|
|
403
|
+
if (packageIds.length === 1) {
|
|
404
|
+
const [packageId] = packageIds;
|
|
405
|
+
await doDelete(`/app/${appId}/package/${packageId}`);
|
|
406
|
+
console.log(t('deletePackageSuccess', { packageId }));
|
|
407
|
+
} else {
|
|
408
|
+
await doDelete(`/app/${appId}/package`, {
|
|
409
|
+
packageIds: toNumericIds(packageIds),
|
|
410
|
+
});
|
|
411
|
+
console.log(
|
|
412
|
+
t('deletePackagesSuccess', {
|
|
413
|
+
count: packageIds.length,
|
|
414
|
+
packageIds: packageIds.join(', '),
|
|
415
|
+
}),
|
|
416
|
+
);
|
|
417
|
+
}
|
|
390
418
|
} catch (error) {
|
|
391
419
|
const message = error instanceof Error ? error.message : String(error);
|
|
392
|
-
throw new Error(
|
|
420
|
+
throw new Error(
|
|
421
|
+
t('deletePackageError', {
|
|
422
|
+
packageId: packageIds.join(', '),
|
|
423
|
+
error: message,
|
|
424
|
+
}),
|
|
425
|
+
);
|
|
393
426
|
}
|
|
394
427
|
},
|
|
395
428
|
};
|
package/src/utils/options.ts
CHANGED
|
@@ -45,6 +45,28 @@ export function getOptionalStringOption(
|
|
|
45
45
|
return undefined;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
export function getStringListOption(
|
|
49
|
+
options: Record<string, unknown>,
|
|
50
|
+
key: string,
|
|
51
|
+
): string[] | undefined {
|
|
52
|
+
const value = options[key];
|
|
53
|
+
const rawValues = Array.isArray(value) ? value : [value];
|
|
54
|
+
const result = rawValues.flatMap((item) => {
|
|
55
|
+
if (typeof item === 'string') {
|
|
56
|
+
return item
|
|
57
|
+
.split(',')
|
|
58
|
+
.map((value) => value.trim())
|
|
59
|
+
.filter(Boolean);
|
|
60
|
+
}
|
|
61
|
+
if (typeof item === 'number' || typeof item === 'boolean') {
|
|
62
|
+
return [String(item)];
|
|
63
|
+
}
|
|
64
|
+
return [];
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
return result.length > 0 ? result : undefined;
|
|
68
|
+
}
|
|
69
|
+
|
|
48
70
|
export function toObjectState<T extends Record<string, unknown>>(
|
|
49
71
|
value: unknown,
|
|
50
72
|
fallback: T,
|
package/src/versions.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { isNonInteractive, question } from './utils';
|
|
|
9
9
|
import { depVersions } from './utils/dep-versions';
|
|
10
10
|
import { getCommitInfo } from './utils/git';
|
|
11
11
|
import { t } from './utils/i18n';
|
|
12
|
-
import { getBooleanOption } from './utils/options';
|
|
12
|
+
import { getBooleanOption, getStringListOption } from './utils/options';
|
|
13
13
|
|
|
14
14
|
interface VersionCommandOptions {
|
|
15
15
|
[key: string]: unknown;
|
|
@@ -19,6 +19,7 @@ interface VersionCommandOptions {
|
|
|
19
19
|
metaInfo?: string;
|
|
20
20
|
platform?: Platform;
|
|
21
21
|
versionId?: string;
|
|
22
|
+
versionIds?: string;
|
|
22
23
|
packageId?: string;
|
|
23
24
|
packageVersion?: string;
|
|
24
25
|
minPackageVersion?: string;
|
|
@@ -128,6 +129,16 @@ function getDepsChanges(oldDeps?: Deps, newDeps?: Deps): DepChange[] {
|
|
|
128
129
|
return rows;
|
|
129
130
|
}
|
|
130
131
|
|
|
132
|
+
function toNumericIds(ids: string[]) {
|
|
133
|
+
return ids.map((id) => {
|
|
134
|
+
const numericId = Number(id);
|
|
135
|
+
if (!Number.isInteger(numericId) || numericId <= 0) {
|
|
136
|
+
throw new Error(`Invalid id: ${id}`);
|
|
137
|
+
}
|
|
138
|
+
return numericId;
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
131
142
|
function getDepsChangeSummary(changes: DepChange[]): DepsChangeSummary {
|
|
132
143
|
return changes.reduce(
|
|
133
144
|
(acc, item) => {
|
|
@@ -407,14 +418,24 @@ export const bindVersionToPackages = async ({
|
|
|
407
418
|
})}`,
|
|
408
419
|
);
|
|
409
420
|
}
|
|
410
|
-
|
|
411
|
-
|
|
421
|
+
|
|
422
|
+
if (!dryRun) {
|
|
423
|
+
if (pkgs.length === 1) {
|
|
412
424
|
await post(`/app/${appId}/binding`, {
|
|
413
425
|
versionId,
|
|
414
426
|
rollout,
|
|
415
|
-
packageId:
|
|
427
|
+
packageId: pkgs[0].id,
|
|
428
|
+
});
|
|
429
|
+
} else {
|
|
430
|
+
await post(`/app/${appId}/binding`, {
|
|
431
|
+
versionId,
|
|
432
|
+
rollout,
|
|
433
|
+
packageIds: toNumericIds(pkgs.map((pkg) => String(pkg.id))),
|
|
416
434
|
});
|
|
417
435
|
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
for (const pkg of pkgs) {
|
|
418
439
|
console.log(
|
|
419
440
|
`${t('versionBind', {
|
|
420
441
|
version: versionId,
|
|
@@ -688,20 +709,39 @@ export const versionCommands = {
|
|
|
688
709
|
appId = (await getSelectedApp(platform)).appId;
|
|
689
710
|
}
|
|
690
711
|
|
|
691
|
-
|
|
692
|
-
|
|
712
|
+
const parsedVersionIds =
|
|
713
|
+
getStringListOption(options, 'versionIds') ??
|
|
714
|
+
getStringListOption(options, 'versionId');
|
|
715
|
+
let versionIds = parsedVersionIds;
|
|
716
|
+
if (!versionIds) {
|
|
693
717
|
if (nonInteractive) {
|
|
694
718
|
throw new Error(t('versionIdRequired'));
|
|
695
719
|
}
|
|
696
|
-
|
|
720
|
+
versionIds = [(await chooseVersion(String(appId))).id];
|
|
697
721
|
}
|
|
698
722
|
|
|
699
723
|
try {
|
|
700
|
-
|
|
701
|
-
|
|
724
|
+
if (versionIds.length === 1) {
|
|
725
|
+
const [versionId] = versionIds;
|
|
726
|
+
await doDelete(`/app/${String(appId)}/version/${versionId}`);
|
|
727
|
+
console.log(t('deleteVersionSuccess', { versionId }));
|
|
728
|
+
} else {
|
|
729
|
+
await doDelete(`/app/${String(appId)}/version`, {
|
|
730
|
+
versionIds: toNumericIds(versionIds),
|
|
731
|
+
});
|
|
732
|
+
console.log(
|
|
733
|
+
t('deleteVersionsSuccess', {
|
|
734
|
+
count: versionIds.length,
|
|
735
|
+
versionIds: versionIds.join(', '),
|
|
736
|
+
}),
|
|
737
|
+
);
|
|
738
|
+
}
|
|
702
739
|
} catch (error: any) {
|
|
703
740
|
throw new Error(
|
|
704
|
-
t('deleteVersionError', {
|
|
741
|
+
t('deleteVersionError', {
|
|
742
|
+
versionId: versionIds.join(', '),
|
|
743
|
+
error: error.message,
|
|
744
|
+
}),
|
|
705
745
|
);
|
|
706
746
|
}
|
|
707
747
|
},
|