@ait-co/console-cli 0.1.32 → 0.1.34
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 +13 -9
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1974,7 +1974,7 @@ async function runDeploy(args, deps = {}) {
|
|
|
1974
1974
|
const release = Boolean(args.release);
|
|
1975
1975
|
const confirm = Boolean(args.confirm);
|
|
1976
1976
|
const releaseNotes = typeof args.releaseNotes === "string" ? args.releaseNotes : void 0;
|
|
1977
|
-
if (requestReview && releaseNotes === void 0) {
|
|
1977
|
+
if (requestReview && (releaseNotes === void 0 || releaseNotes.trim() === "")) {
|
|
1978
1978
|
if (args.json) emitJson({
|
|
1979
1979
|
ok: false,
|
|
1980
1980
|
reason: "missing-release-notes",
|
|
@@ -2143,7 +2143,7 @@ async function runDeploy(args, deps = {}) {
|
|
|
2143
2143
|
async function emitPartialFailure(json, err, progress) {
|
|
2144
2144
|
if (err instanceof TossApiError && err.isAuthError) {
|
|
2145
2145
|
if (json) emitJson({
|
|
2146
|
-
ok:
|
|
2146
|
+
ok: false,
|
|
2147
2147
|
authenticated: false,
|
|
2148
2148
|
reason: "session-expired",
|
|
2149
2149
|
...progress
|
|
@@ -2510,10 +2510,12 @@ function validateManifest(raw, configDir) {
|
|
|
2510
2510
|
if (!isTitleCaseWord(word)) throw new ManifestError("invalid-config", `titleEn word "${word}" must be title-case (first letter uppercase, rest lowercase); server-side rule, errorCode: miniApp.InvalidTitleEn`, "titleEn");
|
|
2511
2511
|
}
|
|
2512
2512
|
const appName = requireString(raw, "appName");
|
|
2513
|
+
if (!APP_NAME_REGEX.test(appName)) throw new ManifestError("invalid-config", `appName must be a kebab-case slug starting with a lowercase letter (got "${appName}"; server-side rule)`, "appName");
|
|
2513
2514
|
const csEmail = requireString(raw, "csEmail");
|
|
2514
2515
|
if (!isValidEmail$1(csEmail)) throw new ManifestError("invalid-config", `csEmail is not a valid email address (got ${csEmail})`, "csEmail");
|
|
2515
2516
|
const subtitle = requireString(raw, "subtitle");
|
|
2516
|
-
|
|
2517
|
+
const subtitleCodepoints = [...subtitle].length;
|
|
2518
|
+
if (subtitleCodepoints > MANIFEST_LIMITS.subtitleMaxChars) throw new ManifestError("invalid-config", `subtitle must be ${MANIFEST_LIMITS.subtitleMaxChars} characters or fewer (got ${subtitleCodepoints})`, "subtitle");
|
|
2517
2519
|
const description = requireString(raw, "description");
|
|
2518
2520
|
const descriptionCodepoints = [...description].length;
|
|
2519
2521
|
if (descriptionCodepoints > DETAIL_DESCRIPTION_MAX_CODEPOINTS) throw new ManifestError("invalid-config", `description must be ${DETAIL_DESCRIPTION_MAX_CODEPOINTS} characters or fewer (got ${descriptionCodepoints})`, "description");
|
|
@@ -3139,7 +3141,9 @@ async function emitFailureAndExit(json, err) {
|
|
|
3139
3141
|
return emitFailureFromError(json, err);
|
|
3140
3142
|
}
|
|
3141
3143
|
async function persistMiniAppIdToProject(json, miniAppId, cwd) {
|
|
3142
|
-
|
|
3144
|
+
const coerced = typeof miniAppId === "string" && /^\d+$/.test(miniAppId) ? Number(miniAppId) : miniAppId;
|
|
3145
|
+
if (typeof coerced !== "number" || !Number.isInteger(coerced) || coerced <= 0) return;
|
|
3146
|
+
const numericId = coerced;
|
|
3143
3147
|
let ctx;
|
|
3144
3148
|
try {
|
|
3145
3149
|
ctx = await findProjectContext(cwd);
|
|
@@ -3151,12 +3155,12 @@ async function persistMiniAppIdToProject(json, miniAppId, cwd) {
|
|
|
3151
3155
|
return;
|
|
3152
3156
|
}
|
|
3153
3157
|
if (ctx === null) {
|
|
3154
|
-
if (!json) process.stderr.write(`tip: drop an aitcc.yaml with \`miniAppId: ${
|
|
3158
|
+
if (!json) process.stderr.write(`tip: drop an aitcc.yaml with \`miniAppId: ${numericId}\` in your project root to skip --app on later commands.\n`);
|
|
3155
3159
|
return;
|
|
3156
3160
|
}
|
|
3157
3161
|
try {
|
|
3158
|
-
const outcome = await writeProjectMiniAppId(ctx.source,
|
|
3159
|
-
if (!json && outcome.status === "written") process.stderr.write(`Updated ${ctx.source} with miniAppId: ${
|
|
3162
|
+
const outcome = await writeProjectMiniAppId(ctx.source, numericId);
|
|
3163
|
+
if (!json && outcome.status === "written") process.stderr.write(`Updated ${ctx.source} with miniAppId: ${numericId}.\n`);
|
|
3160
3164
|
} catch (err) {
|
|
3161
3165
|
if (!json) {
|
|
3162
3166
|
const detail = err instanceof Error ? err.message : String(err);
|
|
@@ -6218,7 +6222,7 @@ async function clearAuthState() {
|
|
|
6218
6222
|
* 2. OS keychain entry whose email is recorded in `auth-state.json`.
|
|
6219
6223
|
*
|
|
6220
6224
|
* Returns `null` when no source is configured. The discriminated `kind`
|
|
6221
|
-
* lets callers (e.g.
|
|
6225
|
+
* lets callers (e.g. the login flow) tell why a credential was found
|
|
6222
6226
|
* without having to peek at process env themselves — useful for
|
|
6223
6227
|
* "auto-login from CI" diagnostics.
|
|
6224
6228
|
*
|
|
@@ -9229,7 +9233,7 @@ function resolveVersion() {
|
|
|
9229
9233
|
if (typeof injected === "string" && injected.length > 0) return injected;
|
|
9230
9234
|
} catch {}
|
|
9231
9235
|
try {
|
|
9232
|
-
return "0.1.
|
|
9236
|
+
return "0.1.34";
|
|
9233
9237
|
} catch {}
|
|
9234
9238
|
return "0.0.0-dev";
|
|
9235
9239
|
}
|