fix(admin-service): 添加APK/IPA解析依赖 + 修复Platform类型推断
- 添加adbkit-apkreader, unzipper, bplist-parser - 修复platform变量类型为Platform枚举 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c42827c6c1
commit
2f583a0a24
|
|
@ -24,6 +24,9 @@
|
||||||
"passport-jwt": "^4.0.1",
|
"passport-jwt": "^4.0.1",
|
||||||
"class-validator": "^0.14.0",
|
"class-validator": "^0.14.0",
|
||||||
"class-transformer": "^0.5.1",
|
"class-transformer": "^0.5.1",
|
||||||
|
"adbkit-apkreader": "^3.2.0",
|
||||||
|
"unzipper": "^0.12.0",
|
||||||
|
"bplist-parser": "^0.3.2",
|
||||||
"minio": "^8.0.0",
|
"minio": "^8.0.0",
|
||||||
"reflect-metadata": "^0.2.1",
|
"reflect-metadata": "^0.2.1",
|
||||||
"rxjs": "^7.8.1"
|
"rxjs": "^7.8.1"
|
||||||
|
|
|
||||||
|
|
@ -93,9 +93,9 @@ export class AdminVersionController {
|
||||||
// Parse package to extract metadata (auto-fill when not provided)
|
// Parse package to extract metadata (auto-fill when not provided)
|
||||||
const parsedInfo = await this.packageParser.parse(file.buffer, file.originalname);
|
const parsedInfo = await this.packageParser.parse(file.buffer, file.originalname);
|
||||||
|
|
||||||
const platform = body.platform
|
const platform: Platform = body.platform
|
||||||
? (body.platform.toUpperCase() as Platform)
|
? (body.platform.toUpperCase() as Platform)
|
||||||
: parsedInfo.platform;
|
: (parsedInfo.platform as Platform);
|
||||||
const versionCode = body.versionCode
|
const versionCode = body.versionCode
|
||||||
? parseInt(body.versionCode, 10)
|
? parseInt(body.versionCode, 10)
|
||||||
: parsedInfo.versionCode || Date.now();
|
: parsedInfo.versionCode || Date.now();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue