@huoye/app-ship 0.1.1 → 0.2.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/LICENSE +57 -0
- package/README.md +332 -298
- package/dist/cli.js +1602 -547
- package/dist/index.cjs +1524 -539
- package/dist/index.d.cts +278 -55
- package/dist/index.d.ts +278 -55
- package/dist/index.js +1504 -529
- package/package.json +44 -12
- package/dist/cli.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 上传配置接口
|
|
3
|
-
*/
|
|
4
|
-
interface UploadConfig {
|
|
3
|
+
*/ interface UploadConfig {
|
|
5
4
|
/** 应用 ID */
|
|
6
5
|
appId?: string;
|
|
7
6
|
/** 版本号 */
|
|
@@ -10,15 +9,62 @@ interface UploadConfig {
|
|
|
10
9
|
build?: {
|
|
11
10
|
/** Android 构建配置 */
|
|
12
11
|
android?: {
|
|
13
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* 构建类型: apk 或 appbundle (aab)
|
|
14
|
+
* @default 'apk'
|
|
15
|
+
*/
|
|
14
16
|
type?: 'apk' | 'appbundle';
|
|
15
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* 是否按 CPU 架构分开打包 (--split-per-abi)
|
|
19
|
+
* 将生成多个 APK (如 arm64 和 arm32),自动适配多包上传
|
|
20
|
+
*/
|
|
21
|
+
splitPerAbi?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* 是否开启 Dart 代码混淆 (--obfuscate)
|
|
24
|
+
*/
|
|
25
|
+
obfuscate?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 调试符号导出路径,开启混淆时必须配合使用
|
|
28
|
+
* @default 'build/debug-info'
|
|
29
|
+
*/
|
|
30
|
+
splitDebugInfo?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Dart 编译期环境变量注入 (-d)
|
|
33
|
+
*/
|
|
34
|
+
dartDefines?: Record<string, string>;
|
|
35
|
+
/**
|
|
36
|
+
* 专家模式附加参数扩展(自动拼接到命令末尾)
|
|
37
|
+
*/
|
|
38
|
+
extraArgs?: string[];
|
|
39
|
+
/**
|
|
40
|
+
* 完全自定义构建命令,配置此项后以上所有构建参数均失效
|
|
41
|
+
* 仅供具有极特殊构建场景的专家用户使用
|
|
42
|
+
*/
|
|
43
|
+
customCommand?: string;
|
|
44
|
+
/** Product Flavor (--flavor) */
|
|
16
45
|
flavor?: string;
|
|
17
|
-
/**
|
|
46
|
+
/** Target platform/lib (--target) */
|
|
18
47
|
target?: string;
|
|
19
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* 注入系统环境变量 (process.env)
|
|
50
|
+
*/
|
|
51
|
+
envs?: Record<string, string>;
|
|
52
|
+
/**
|
|
53
|
+
* 构建前执行脚本
|
|
54
|
+
*/
|
|
55
|
+
preBuild?: string;
|
|
56
|
+
/**
|
|
57
|
+
* 构建后执行脚本
|
|
58
|
+
*/
|
|
59
|
+
postBuild?: string;
|
|
60
|
+
/**
|
|
61
|
+
* 是否在构建前执行 flutter clean
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
clean?: boolean;
|
|
65
|
+
/** 版本名称 (覆盖 pubspec.yaml) */
|
|
20
66
|
buildName?: string;
|
|
21
|
-
/** 构建号 */
|
|
67
|
+
/** 构建号 (覆盖 pubspec.yaml) */
|
|
22
68
|
buildNumber?: string;
|
|
23
69
|
};
|
|
24
70
|
/** iOS 构建配置 */
|
|
@@ -31,6 +77,77 @@ interface UploadConfig {
|
|
|
31
77
|
teamId?: string;
|
|
32
78
|
/** 构建配置:Debug 或 Release */
|
|
33
79
|
configuration?: string;
|
|
80
|
+
/** 是否使用 exportOptions.plist (默认自动生成命令) */
|
|
81
|
+
useExportOptions?: boolean;
|
|
82
|
+
/** 自定义导出配置文件路径 */
|
|
83
|
+
exportOptionsPlist?: string;
|
|
84
|
+
/**
|
|
85
|
+
* 是否开启 Dart 代码混淆 (--obfuscate)
|
|
86
|
+
*/
|
|
87
|
+
obfuscate?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* 调试符号导出路径,开启混淆时必须配合使用
|
|
90
|
+
* @default 'build/debug-info'
|
|
91
|
+
*/
|
|
92
|
+
splitDebugInfo?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Dart 编译期环境变量注入 (-d)
|
|
95
|
+
*/
|
|
96
|
+
dartDefines?: Record<string, string>;
|
|
97
|
+
/**
|
|
98
|
+
* 专家模式附加参数扩展(自动拼接到命令末尾)
|
|
99
|
+
*/
|
|
100
|
+
extraArgs?: string[];
|
|
101
|
+
/**
|
|
102
|
+
* 完全自定义构建命令,配置此项后以上所有构建参数均失效
|
|
103
|
+
*/
|
|
104
|
+
customCommand?: string;
|
|
105
|
+
/** Target platform/lib (--target) */
|
|
106
|
+
target?: string;
|
|
107
|
+
/**
|
|
108
|
+
* 注入系统环境变量 (process.env)
|
|
109
|
+
*/
|
|
110
|
+
envs?: Record<string, string>;
|
|
111
|
+
/**
|
|
112
|
+
* 构建前执行脚本
|
|
113
|
+
*/
|
|
114
|
+
preBuild?: string;
|
|
115
|
+
/**
|
|
116
|
+
* 构建后执行脚本
|
|
117
|
+
*/
|
|
118
|
+
postBuild?: string;
|
|
119
|
+
/**
|
|
120
|
+
* 是否在构建前执行 flutter clean
|
|
121
|
+
* @default false
|
|
122
|
+
*/
|
|
123
|
+
clean?: boolean;
|
|
124
|
+
/** 版本名称 (覆盖 pubspec.yaml) */
|
|
125
|
+
buildName?: string;
|
|
126
|
+
/** 构建号 (覆盖 pubspec.yaml) */
|
|
127
|
+
buildNumber?: string;
|
|
128
|
+
};
|
|
129
|
+
/** HarmonyOS 构建配置 */
|
|
130
|
+
harmony?: {
|
|
131
|
+
/** 构建类型: hap (调试/安装) 或 app (发布/应用) */
|
|
132
|
+
type?: 'hap' | 'app';
|
|
133
|
+
/** Dart 编译期环境变量注入 (-d) */
|
|
134
|
+
dartDefines?: Record<string, string>;
|
|
135
|
+
/** 注入系统环境变量 (process.env) */
|
|
136
|
+
envs?: Record<string, string>;
|
|
137
|
+
/** 构建前执行脚本 */
|
|
138
|
+
preBuild?: string;
|
|
139
|
+
/** 构建后执行脚本 */
|
|
140
|
+
postBuild?: string;
|
|
141
|
+
/** 是否在构建前执行 flutter clean */
|
|
142
|
+
clean?: boolean;
|
|
143
|
+
/** 附加参数 */
|
|
144
|
+
extraArgs?: string[];
|
|
145
|
+
/** 完全自定义构建命令 */
|
|
146
|
+
customCommand?: string;
|
|
147
|
+
/** 版本名称 */
|
|
148
|
+
buildName?: string;
|
|
149
|
+
/** 构建号 */
|
|
150
|
+
buildNumber?: string;
|
|
34
151
|
};
|
|
35
152
|
};
|
|
36
153
|
/** 所有上传操作的重试配置 */
|
|
@@ -288,8 +405,8 @@ interface UploadConfig {
|
|
|
288
405
|
};
|
|
289
406
|
/** 包名 */
|
|
290
407
|
packageName?: string;
|
|
291
|
-
/**
|
|
292
|
-
track?: 'internal'
|
|
408
|
+
/** 发布轨道;首版只支持 internal */
|
|
409
|
+
track?: 'internal';
|
|
293
410
|
};
|
|
294
411
|
/** 未来扩展的其他平台 */
|
|
295
412
|
[key: string]: any;
|
|
@@ -297,8 +414,7 @@ interface UploadConfig {
|
|
|
297
414
|
}
|
|
298
415
|
/**
|
|
299
416
|
* 应用元数据接口
|
|
300
|
-
*/
|
|
301
|
-
interface AppMetadata {
|
|
417
|
+
*/ interface AppMetadata {
|
|
302
418
|
/** 版本号 */
|
|
303
419
|
version: string;
|
|
304
420
|
/** 应用名称 */
|
|
@@ -309,8 +425,10 @@ interface AppMetadata {
|
|
|
309
425
|
changelog: string;
|
|
310
426
|
/** 本次要上传到的平台列表 */
|
|
311
427
|
platform?: string[];
|
|
312
|
-
/** 构建产物路径(apk/ipa
|
|
313
|
-
artifactPath?: string
|
|
428
|
+
/** 构建产物路径(apk/ipa,支持 Record<ABI, Path> 形式以适配多架构) */
|
|
429
|
+
artifactPath?: string | Record<string, string>;
|
|
430
|
+
/** 按平台保留的产物集合,供上传调度层选择单包或多架构组合 */
|
|
431
|
+
platformArtifacts?: Record<string, string | Record<string, string>>;
|
|
314
432
|
/** 全局工具链设置 */
|
|
315
433
|
globalSettings?: {
|
|
316
434
|
/** Android SDK 路径 */
|
|
@@ -319,8 +437,7 @@ interface AppMetadata {
|
|
|
319
437
|
}
|
|
320
438
|
/**
|
|
321
439
|
* 上传结果接口
|
|
322
|
-
*/
|
|
323
|
-
interface UploadResult {
|
|
440
|
+
*/ interface UploadResult {
|
|
324
441
|
/** 平台名称 */
|
|
325
442
|
platform: string;
|
|
326
443
|
/** 是否成功 */
|
|
@@ -349,8 +466,7 @@ interface UploadResult {
|
|
|
349
466
|
}
|
|
350
467
|
/**
|
|
351
468
|
* 上传器接口
|
|
352
|
-
*/
|
|
353
|
-
interface IUploader {
|
|
469
|
+
*/ interface IUploader {
|
|
354
470
|
/** 上传器名称 */
|
|
355
471
|
name: string;
|
|
356
472
|
/**
|
|
@@ -371,16 +487,19 @@ interface IUploader {
|
|
|
371
487
|
}
|
|
372
488
|
/**
|
|
373
489
|
* 构建结果接口
|
|
374
|
-
*/
|
|
375
|
-
interface BuildResult {
|
|
490
|
+
*/ interface BuildResult {
|
|
376
491
|
/** 是否成功 */
|
|
377
492
|
success: boolean;
|
|
378
|
-
/**
|
|
379
|
-
|
|
493
|
+
/**
|
|
494
|
+
* 产物路径
|
|
495
|
+
* - 单包时返回路径字符串
|
|
496
|
+
* - 多架构分包时返回字典映射,如 { 'arm64-v8a': 'path/to/apk64', 'armeabi-v7a': 'path/to/apk32' }
|
|
497
|
+
*/
|
|
498
|
+
artifactPath: string | Record<string, string>;
|
|
380
499
|
/** 构建耗时(毫秒) */
|
|
381
500
|
buildTime: number;
|
|
382
|
-
/** 平台:android | ios */
|
|
383
|
-
platform: 'android' | 'ios';
|
|
501
|
+
/** 平台:android | ios | harmony */
|
|
502
|
+
platform: 'android' | 'ios' | 'harmony';
|
|
384
503
|
}
|
|
385
504
|
|
|
386
505
|
declare class EnvValidator {
|
|
@@ -397,6 +516,12 @@ declare class ConfigValidator {
|
|
|
397
516
|
* @param filePath 配置文件路径
|
|
398
517
|
*/
|
|
399
518
|
static loadAndValidate(filePath: string): UploadConfig | null;
|
|
519
|
+
/**
|
|
520
|
+
* 只收集本次实际启用配置中的环境变量,避免禁用平台阻塞其它上传任务。
|
|
521
|
+
*/
|
|
522
|
+
private static collectRequiredEnvVars;
|
|
523
|
+
/** 在内存中递归解析环境变量,不重新拼接 YAML,避免密钥字符破坏 YAML 结构。 */
|
|
524
|
+
private static resolveEnvVars;
|
|
400
525
|
/**
|
|
401
526
|
* 验证配置 Schema
|
|
402
527
|
* @param config 配置对象
|
|
@@ -580,9 +705,6 @@ declare class XiaomiUploader implements IUploader {
|
|
|
580
705
|
categoryName: string;
|
|
581
706
|
}[] | null>;
|
|
582
707
|
upload(filePath: string, config: any, metadata: AppMetadata): Promise<UploadResult>;
|
|
583
|
-
/**
|
|
584
|
-
* 执行实际的上传操作
|
|
585
|
-
*/
|
|
586
708
|
private performUpload;
|
|
587
709
|
/**
|
|
588
710
|
* 解析公钥: 优先使用内容字段, 其次从文件路径读取
|
|
@@ -983,45 +1105,18 @@ declare class OppoUploader implements IUploader {
|
|
|
983
1105
|
*
|
|
984
1106
|
* 基于 vivo 开放平台「应用分发 API」实现 (协议与腾讯开放平台 Open-QQ 规范一致)
|
|
985
1107
|
* 文档: https://dev.vivo.com.cn/documentCenter/doc/326
|
|
986
|
-
*
|
|
987
|
-
* 上传流程:
|
|
988
|
-
* 1. 使用 access_key + access_secret 生成签名
|
|
989
|
-
* 2. 获取上传地址 (分段上传或直传)
|
|
990
|
-
* 3. 上传 APK 文件
|
|
991
|
-
* 4. 提交版本更新信息
|
|
992
|
-
*
|
|
993
|
-
* 签名方式: HMAC-SHA256(params_sorted, access_secret) → 16进制字符串
|
|
994
1108
|
*/
|
|
995
1109
|
declare class VivoUploader implements IUploader {
|
|
996
1110
|
name: string;
|
|
997
1111
|
/** vivo 开放 API 基础地址 */
|
|
998
1112
|
private static readonly API_BASE;
|
|
999
|
-
/**
|
|
1000
|
-
* vivo API 签名生成
|
|
1001
|
-
* 规则: 所有参数按 ASCII 码排序后拼接为 key=val&... 字符串,
|
|
1002
|
-
* 以 accessSecret 为密钥进行 HMAC-SHA256 加密,结果转为小写 16 进制字符串
|
|
1003
|
-
*/
|
|
1004
1113
|
private generateSign;
|
|
1005
1114
|
validateConfig(config: any): boolean;
|
|
1006
1115
|
canHandle(filePath: string): boolean;
|
|
1007
1116
|
upload(filePath: string, config: any, metadata: AppMetadata): Promise<UploadResult>;
|
|
1008
|
-
/**
|
|
1009
|
-
* 计算文件 MD5
|
|
1010
|
-
*/
|
|
1011
1117
|
private calculateFileMD5;
|
|
1012
|
-
/**
|
|
1013
|
-
* 上传 APK 文件并获取流水号
|
|
1014
|
-
* 将公共参数与业务参数放入一个 multipart 请求中直接上传至 API_BASE
|
|
1015
|
-
*/
|
|
1016
1118
|
private uploadApk;
|
|
1017
|
-
/**
|
|
1018
|
-
* 提交版本更新信息
|
|
1019
|
-
*/
|
|
1020
1119
|
private submitVersion;
|
|
1021
|
-
/**
|
|
1022
|
-
* 格式化错误信息
|
|
1023
|
-
*/
|
|
1024
|
-
private formatError;
|
|
1025
1120
|
}
|
|
1026
1121
|
|
|
1027
1122
|
/**
|
|
@@ -1068,6 +1163,44 @@ declare class TencentUploader implements IUploader {
|
|
|
1068
1163
|
private submitModifyAppInfo;
|
|
1069
1164
|
}
|
|
1070
1165
|
|
|
1166
|
+
interface GooglePlayHttpResponse<T = any> {
|
|
1167
|
+
data: T;
|
|
1168
|
+
}
|
|
1169
|
+
interface GooglePlayHttpClient {
|
|
1170
|
+
post<T = any>(url: string, data?: any, config?: any): Promise<GooglePlayHttpResponse<T>>;
|
|
1171
|
+
put<T = any>(url: string, data?: any, config?: any): Promise<GooglePlayHttpResponse<T>>;
|
|
1172
|
+
delete<T = any>(url: string, config?: any): Promise<GooglePlayHttpResponse<T>>;
|
|
1173
|
+
}
|
|
1174
|
+
interface GooglePlayAuthConfig {
|
|
1175
|
+
serviceAccountJsonPath?: string;
|
|
1176
|
+
serviceAccountJsonContent?: string;
|
|
1177
|
+
}
|
|
1178
|
+
interface GooglePlayUploaderDependencies {
|
|
1179
|
+
httpClient?: GooglePlayHttpClient;
|
|
1180
|
+
getAccessToken?: (auth: GooglePlayAuthConfig) => Promise<string>;
|
|
1181
|
+
}
|
|
1182
|
+
/**
|
|
1183
|
+
* Google Play 上传器。
|
|
1184
|
+
*
|
|
1185
|
+
* 首版能力刻意限制为:上传一个 AAB 到内部测试轨道并保留为 draft。
|
|
1186
|
+
* 配置层与 Google Play API 都使用 internal 作为内部测试轨道标识。
|
|
1187
|
+
* 创建应用、填写商店资料、提交审核和生产发布均不在此适配器范围内。
|
|
1188
|
+
*/
|
|
1189
|
+
declare class GooglePlayUploader implements IUploader {
|
|
1190
|
+
name: string;
|
|
1191
|
+
private readonly httpClient;
|
|
1192
|
+
private readonly getAccessToken;
|
|
1193
|
+
constructor(dependencies?: GooglePlayUploaderDependencies);
|
|
1194
|
+
validateConfig(config: any): boolean;
|
|
1195
|
+
canHandle(filePath: string): boolean;
|
|
1196
|
+
upload(filePath: string, config: any, _metadata: AppMetadata): Promise<UploadResult>;
|
|
1197
|
+
private createAccessToken;
|
|
1198
|
+
private deleteEditBestEffort;
|
|
1199
|
+
private describeError;
|
|
1200
|
+
private redactAndTruncate;
|
|
1201
|
+
private failure;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1071
1204
|
interface RetryConfig {
|
|
1072
1205
|
maxRetries?: number;
|
|
1073
1206
|
initialDelayMs?: number;
|
|
@@ -1187,6 +1320,12 @@ declare class UploadManager {
|
|
|
1187
1320
|
* 上传到单个平台
|
|
1188
1321
|
*/
|
|
1189
1322
|
private uploadToPlatform;
|
|
1323
|
+
private shouldGroupArtifacts;
|
|
1324
|
+
private resolveArtifactSelection;
|
|
1325
|
+
private buildArtifactMapFromFiles;
|
|
1326
|
+
private inferArtifactKey;
|
|
1327
|
+
private getRepresentativeFilePath;
|
|
1328
|
+
private validateArtifactSelection;
|
|
1190
1329
|
/**
|
|
1191
1330
|
* 聚合上传结果
|
|
1192
1331
|
*/
|
|
@@ -1206,7 +1345,7 @@ declare class UploadManager {
|
|
|
1206
1345
|
/**
|
|
1207
1346
|
* 重试失败的平台
|
|
1208
1347
|
*/
|
|
1209
|
-
retryFailedPlatforms(failedPlatforms: string[], filePath: string, config: any, metadata: AppMetadata): Promise<UploadReport>;
|
|
1348
|
+
retryFailedPlatforms(failedPlatforms: string[], filePath: string | string[], config: any, metadata: AppMetadata): Promise<UploadReport>;
|
|
1210
1349
|
}
|
|
1211
1350
|
/**
|
|
1212
1351
|
* 创建上传管理器实例
|
|
@@ -1301,4 +1440,88 @@ interface ParseOptions {
|
|
|
1301
1440
|
*/
|
|
1302
1441
|
declare function parsePackageInfo(filePath: string, options?: ParseOptions): Promise<PackageInfo | null>;
|
|
1303
1442
|
|
|
1304
|
-
|
|
1443
|
+
declare const RELEASE_RECEIPT_SCHEMA_VERSION: 1;
|
|
1444
|
+
declare const DEFAULT_RELEASE_RECEIPT_LIMIT = 100;
|
|
1445
|
+
type ReleaseReceiptKind = 'build' | 'upload';
|
|
1446
|
+
type ReleaseReceiptOutcome = 'success' | 'partial' | 'failed' | 'cancelled';
|
|
1447
|
+
type ReleaseReceiptState = 'built' | 'uploaded' | 'draft_created' | 'review_submitted' | 'reviewing' | 'approved' | 'rejected' | 'released' | 'failed' | 'cancelled';
|
|
1448
|
+
interface ReleaseArtifactReceipt {
|
|
1449
|
+
path: string;
|
|
1450
|
+
name: string;
|
|
1451
|
+
sizeBytes?: number;
|
|
1452
|
+
sha256?: string;
|
|
1453
|
+
available: boolean;
|
|
1454
|
+
}
|
|
1455
|
+
interface ReleaseRemoteReceipt {
|
|
1456
|
+
consoleUrl?: string;
|
|
1457
|
+
downloadUrl?: string;
|
|
1458
|
+
identifiers?: Record<string, string | number | boolean>;
|
|
1459
|
+
}
|
|
1460
|
+
interface ReleaseTargetReceipt {
|
|
1461
|
+
platform: string;
|
|
1462
|
+
state: ReleaseReceiptState;
|
|
1463
|
+
outcome: ReleaseReceiptOutcome;
|
|
1464
|
+
message: string;
|
|
1465
|
+
remote?: ReleaseRemoteReceipt;
|
|
1466
|
+
lastKnownRemoteStatus?: string;
|
|
1467
|
+
checkedAt?: string;
|
|
1468
|
+
}
|
|
1469
|
+
interface ReleaseReceipt {
|
|
1470
|
+
schemaVersion: typeof RELEASE_RECEIPT_SCHEMA_VERSION;
|
|
1471
|
+
id: string;
|
|
1472
|
+
projectKey: string;
|
|
1473
|
+
projectRoot: string;
|
|
1474
|
+
kind: ReleaseReceiptKind;
|
|
1475
|
+
appName?: string;
|
|
1476
|
+
packageName?: string;
|
|
1477
|
+
versionName?: string;
|
|
1478
|
+
buildNumber?: string;
|
|
1479
|
+
changelog?: string;
|
|
1480
|
+
artifacts: ReleaseArtifactReceipt[];
|
|
1481
|
+
targets: ReleaseTargetReceipt[];
|
|
1482
|
+
outcome: ReleaseReceiptOutcome;
|
|
1483
|
+
startedAt: string;
|
|
1484
|
+
finishedAt: string;
|
|
1485
|
+
durationMs: number;
|
|
1486
|
+
}
|
|
1487
|
+
interface ReleaseReceiptInput {
|
|
1488
|
+
projectRoot: string;
|
|
1489
|
+
kind: ReleaseReceiptKind;
|
|
1490
|
+
appName?: string;
|
|
1491
|
+
packageName?: string;
|
|
1492
|
+
versionName?: string;
|
|
1493
|
+
buildNumber?: string | number;
|
|
1494
|
+
changelog?: string;
|
|
1495
|
+
artifactPaths?: unknown;
|
|
1496
|
+
targets: ReleaseTargetReceipt[];
|
|
1497
|
+
startedAt?: string | number | Date;
|
|
1498
|
+
finishedAt?: string | number | Date;
|
|
1499
|
+
outcome?: ReleaseReceiptOutcome;
|
|
1500
|
+
}
|
|
1501
|
+
interface ReleaseReceiptStoreOptions {
|
|
1502
|
+
storageRoot?: string;
|
|
1503
|
+
maxEntries?: number;
|
|
1504
|
+
}
|
|
1505
|
+
/** 解析发布回执所属项目;显式项目目录优先,未提供时才使用配置文件目录。 */
|
|
1506
|
+
declare function resolveReleaseProjectRoot(projectRoot: string | undefined, configPath: string): string;
|
|
1507
|
+
/** 将可能包含凭据的错误信息压缩为可安全持久化的短文本。 */
|
|
1508
|
+
declare function sanitizeReleaseMessage(value: unknown, maxLength?: number): string;
|
|
1509
|
+
/** 将上传结果转换为稳定、可公开展示的渠道状态。 */
|
|
1510
|
+
declare function createUploadTargets(results: UploadResult[]): ReleaseTargetReceipt[];
|
|
1511
|
+
/** 创建回执;只接受已经挑选过的业务字段,不接受完整配置或原始响应。 */
|
|
1512
|
+
declare function createReleaseReceipt(input: ReleaseReceiptInput): Promise<ReleaseReceipt>;
|
|
1513
|
+
/** 将回执转换为适合复制给客户或 AI 的纯文本摘要。 */
|
|
1514
|
+
declare function formatReleaseReceipt(receipt: ReleaseReceipt): string;
|
|
1515
|
+
declare class ReleaseReceiptStore {
|
|
1516
|
+
private readonly storageRoot;
|
|
1517
|
+
private readonly maxEntries;
|
|
1518
|
+
constructor(options?: ReleaseReceiptStoreOptions);
|
|
1519
|
+
append(receipt: ReleaseReceipt): Promise<void>;
|
|
1520
|
+
list(projectRoot: string, limit?: number): Promise<ReleaseReceipt[]>;
|
|
1521
|
+
save(input: ReleaseReceiptInput): Promise<ReleaseReceipt>;
|
|
1522
|
+
private getFilePath;
|
|
1523
|
+
private readFile;
|
|
1524
|
+
}
|
|
1525
|
+
declare function createProjectKey(projectRoot: string): string;
|
|
1526
|
+
|
|
1527
|
+
export { AdHocUploader, type AppMetadata, AppleJWTGenerator, AppleStoreUploader, type BuildResult, ConfigValidator, DEFAULT_RELEASE_RECEIPT_LIMIT, DEFAULT_RETRY_CONFIG, EnvValidator, ErrorCategory, GooglePlayUploader, type GooglePlayUploaderDependencies, HarmonyUploader, HuaweiUploader, type IUploader, OppoUploader, type PackageInfo, type ParseOptions, PgyerUploader, RELEASE_RECEIPT_SCHEMA_VERSION, type ReleaseArtifactReceipt, type ReleaseReceipt, type ReleaseReceiptInput, type ReleaseReceiptKind, type ReleaseReceiptOutcome, type ReleaseReceiptState, ReleaseReceiptStore, type ReleaseReceiptStoreOptions, type ReleaseRemoteReceipt, type ReleaseTargetReceipt, type RetryConfig, type RetryResult, RetryStrategy, TencentUploader, TestFlightUploader, type UploadConfig, UploadManager, type UploadManagerConfig, type UploadReport, type UploadResult, VivoUploader, XiaomiUploader, createProjectKey, createReleaseReceipt, createUploadManager, createUploadRetryStrategy, createUploadTargets, formatReleaseReceipt, parsePackageInfo, resolveReleaseProjectRoot, sanitizeReleaseMessage };
|