@better-update/cli 0.46.0 → 0.46.1
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/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -35,7 +35,7 @@ var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region package.json
|
|
38
|
-
var version = "0.46.
|
|
38
|
+
var version = "0.46.1";
|
|
39
39
|
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/lib/interactive-mode.ts
|
|
@@ -28397,8 +28397,10 @@ const androidMenu = (ctx) => Effect.gen(function* () {
|
|
|
28397
28397
|
//#endregion
|
|
28398
28398
|
//#region src/lib/credentials-generator-asc-key.ts
|
|
28399
28399
|
const toUserRole = (role) => role === "APP_MANAGER" ? AppleUtils.UserRole.APP_MANAGER : AppleUtils.UserRole.ADMIN;
|
|
28400
|
+
const ASC_API_KEY_NICKNAME_MAX_LENGTH = 30;
|
|
28401
|
+
const clampAscApiKeyNickname = (nickname) => nickname.slice(0, ASC_API_KEY_NICKNAME_MAX_LENGTH);
|
|
28400
28402
|
/** Default nickname shown in App Store Connect → Users and Access → Integrations. */
|
|
28401
|
-
const defaultAscApiKeyNickname = () => `[better-update] ${
|
|
28403
|
+
const defaultAscApiKeyNickname = () => `[better-update] ${Date.now().toString(36)}`;
|
|
28402
28404
|
const ASC_KEY_NOT_READY_PATTERN = /no resource of type|resource does not exist/iu;
|
|
28403
28405
|
const ASC_KEY_DOWNLOAD_RETRY = Schedule.exponential("1 second", 2).pipe(Schedule.intersect(Schedule.recurs(6)));
|
|
28404
28406
|
const downloadAscKeyWithRetry = (key) => Effect.tryPromise({
|
|
@@ -28432,7 +28434,7 @@ const writeRescueP8 = (keyId, p8Pem) => Effect.gen(function* () {
|
|
|
28432
28434
|
const generateAndUploadAscApiKeyViaAppleId = (api, input) => Effect.gen(function* () {
|
|
28433
28435
|
const ctx = input.context;
|
|
28434
28436
|
const key = yield* wrap("apple-create-asc-key", async () => AppleUtils.ApiKey.createAsync(ctx, {
|
|
28435
|
-
nickname: input.nickname,
|
|
28437
|
+
nickname: clampAscApiKeyNickname(input.nickname),
|
|
28436
28438
|
allAppsVisible: true,
|
|
28437
28439
|
roles: [toUserRole(input.role)],
|
|
28438
28440
|
keyType: AppleUtils.ApiKeyType.PUBLIC_API
|
|
@@ -30545,7 +30547,7 @@ const ascKeyCommand = defineCommand({
|
|
|
30545
30547
|
},
|
|
30546
30548
|
nickname: {
|
|
30547
30549
|
type: "string",
|
|
30548
|
-
description: "Nickname shown in App Store Connect (defaults to a timestamped name)"
|
|
30550
|
+
description: "Nickname shown in App Store Connect (defaults to a timestamped name; Apple caps it at 30 chars, longer values are truncated)"
|
|
30549
30551
|
}
|
|
30550
30552
|
},
|
|
30551
30553
|
run: async ({ args }) => runEffect(Effect.gen(function* () {
|