@ait-co/console-cli 0.1.26 → 0.1.27

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/cli.mjs CHANGED
@@ -2491,6 +2491,11 @@ function isValidHttpUrl(v) {
2491
2491
  }
2492
2492
  }
2493
2493
  function validateManifest(raw, configDir) {
2494
+ let miniAppId;
2495
+ if (raw.miniAppId !== void 0 && raw.miniAppId !== null) {
2496
+ if (typeof raw.miniAppId !== "number" || !Number.isInteger(raw.miniAppId) || raw.miniAppId <= 0) throw new ManifestError("invalid-config", `miniAppId must be a positive integer (got ${JSON.stringify(raw.miniAppId)})`, "miniAppId");
2497
+ miniAppId = raw.miniAppId;
2498
+ }
2494
2499
  const titleKo = requireString(raw, "titleKo");
2495
2500
  if (!TITLE_KO_REGEX.test(titleKo)) throw new ManifestError("invalid-config", `titleKo may only contain Korean/English letters, digits, spaces, and ":·?" (got "${titleKo}"; server-side rule, errorCode: miniApp.InvalidTitle)`, "titleKo");
2496
2501
  const titleKoLen = codePointsExcludingSpaces(titleKo);
@@ -2513,21 +2518,29 @@ function validateManifest(raw, configDir) {
2513
2518
  if (descriptionCodepoints > DETAIL_DESCRIPTION_MAX_CODEPOINTS) throw new ManifestError("invalid-config", `description must be ${DETAIL_DESCRIPTION_MAX_CODEPOINTS} characters or fewer (got ${descriptionCodepoints})`, "description");
2514
2519
  const homePageUri = optionalString(raw, "homePageUri");
2515
2520
  if (homePageUri !== void 0 && !isValidHttpUrl(homePageUri)) throw new ManifestError("invalid-config", `homePageUri must be a http(s) URL (got ${homePageUri})`, "homePageUri");
2521
+ const logo = requirePath(raw, "logo", configDir);
2522
+ const logoDarkMode = optionalPath(raw, "logoDarkMode", configDir);
2523
+ const horizontalThumbnail = requirePath(raw, "horizontalThumbnail", configDir);
2524
+ const categoryIds = requireNumberArray(raw, "categoryIds", { min: 1 });
2525
+ const keywords = optionalStringArray(raw, "keywords", { max: 10 });
2526
+ const verticalScreenshots = requirePathArray(raw, "verticalScreenshots", configDir, { min: 3 });
2527
+ const horizontalScreenshots = optionalPathArray(raw, "horizontalScreenshots", configDir);
2516
2528
  return {
2529
+ miniAppId,
2517
2530
  titleKo,
2518
2531
  titleEn,
2519
2532
  appName,
2520
2533
  homePageUri,
2521
2534
  csEmail,
2522
- logo: requirePath(raw, "logo", configDir),
2523
- logoDarkMode: optionalPath(raw, "logoDarkMode", configDir),
2524
- horizontalThumbnail: requirePath(raw, "horizontalThumbnail", configDir),
2525
- categoryIds: requireNumberArray(raw, "categoryIds", { min: 1 }),
2535
+ logo,
2536
+ logoDarkMode,
2537
+ horizontalThumbnail,
2538
+ categoryIds,
2526
2539
  subtitle,
2527
2540
  description,
2528
- keywords: optionalStringArray(raw, "keywords", { max: 10 }),
2529
- verticalScreenshots: requirePathArray(raw, "verticalScreenshots", configDir, { min: 3 }),
2530
- horizontalScreenshots: optionalPathArray(raw, "horizontalScreenshots", configDir)
2541
+ keywords,
2542
+ verticalScreenshots,
2543
+ horizontalScreenshots
2531
2544
  };
2532
2545
  }
2533
2546
  //#endregion
@@ -2904,6 +2917,7 @@ function buildSubmitPayload(manifest, urls) {
2904
2917
  description: manifest.subtitle,
2905
2918
  detailDescription: manifest.description,
2906
2919
  images,
2920
+ ...manifest.miniAppId !== void 0 ? { miniAppId: manifest.miniAppId } : {},
2907
2921
  ...urls.logoDarkMode !== void 0 ? { darkModeIconUri: urls.logoDarkMode } : {},
2908
2922
  ...manifest.homePageUri !== void 0 ? { homePageUri: manifest.homePageUri } : {}
2909
2923
  },
@@ -2925,6 +2939,7 @@ async function runRegister(args, deps = {}) {
2925
2939
  printContextHeader(ctx, { json: args.json });
2926
2940
  const manifest = await loadAndValidateManifest(args, deps);
2927
2941
  if (!manifest) return;
2942
+ if (manifest.miniAppId !== void 0 && !args.json) process.stderr.write(`[mode: update · miniAppId ${manifest.miniAppId}] existing app draft will be overwritten and re-enter the review queue.\n`);
2928
2943
  if (!args.dryRun && !args.acceptTerms) {
2929
2944
  emitTermsNotAccepted(args.json);
2930
2945
  await exitAfterFlush(ExitCode.Usage);
@@ -9151,7 +9166,7 @@ function resolveVersion() {
9151
9166
  if (typeof injected === "string" && injected.length > 0) return injected;
9152
9167
  } catch {}
9153
9168
  try {
9154
- return "0.1.26";
9169
+ return "0.1.27";
9155
9170
  } catch {}
9156
9171
  return "0.0.0-dev";
9157
9172
  }