democut 1.0.63 → 1.0.64
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.js +25 -18
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6916,7 +6916,7 @@ import { realpathSync } from "fs";
|
|
|
6916
6916
|
import { fileURLToPath } from "url";
|
|
6917
6917
|
|
|
6918
6918
|
// src/version.ts
|
|
6919
|
-
var VERSION = "1.0.
|
|
6919
|
+
var VERSION = "1.0.64";
|
|
6920
6920
|
|
|
6921
6921
|
// src/device-flow.ts
|
|
6922
6922
|
var DeviceFlowError = class extends Error {
|
|
@@ -7306,13 +7306,14 @@ function parseDetail(status, body) {
|
|
|
7306
7306
|
const loc = e.loc;
|
|
7307
7307
|
return Array.isArray(loc) ? String(loc[loc.length - 1]) : "";
|
|
7308
7308
|
}).filter(Boolean);
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
"
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
unknownFields.length ? { unknownFields } : {}
|
|
7315
|
-
|
|
7309
|
+
const missingFields = detail.filter((e) => e.type === "missing").map((e) => {
|
|
7310
|
+
const loc = e.loc;
|
|
7311
|
+
return Array.isArray(loc) ? loc.filter((x) => x !== "body").join(".") : "";
|
|
7312
|
+
}).filter(Boolean);
|
|
7313
|
+
return new ApiError(status, "VALIDATION_ERROR", lines.join("\n"), true, {
|
|
7314
|
+
...unknownFields.length ? { unknownFields } : {},
|
|
7315
|
+
...missingFields.length ? { missingFields } : {}
|
|
7316
|
+
});
|
|
7316
7317
|
}
|
|
7317
7318
|
return new ApiError(status, `HTTP_${status}`, `\uC694\uCCAD\uC774 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4 (HTTP ${status}).`, null);
|
|
7318
7319
|
}
|
|
@@ -12986,6 +12987,9 @@ function callableStructured(value) {
|
|
|
12986
12987
|
}
|
|
12987
12988
|
return value;
|
|
12988
12989
|
}
|
|
12990
|
+
function asFields(v) {
|
|
12991
|
+
return Array.isArray(v) ? v.filter((x) => typeof x === "string" && x.length > 0) : [];
|
|
12992
|
+
}
|
|
12989
12993
|
function usd(v) {
|
|
12990
12994
|
return v < 0.01 ? `$${v.toFixed(4)}` : `$${v.toFixed(2)}`;
|
|
12991
12995
|
}
|
|
@@ -13049,16 +13053,19 @@ function classifyApiError(e, ctx) {
|
|
|
13049
13053
|
return { safety: "fixable", notCharged: true, lines };
|
|
13050
13054
|
}
|
|
13051
13055
|
if (e.status === 422) {
|
|
13052
|
-
const unknown2 = e.extra.unknownFields;
|
|
13053
|
-
|
|
13054
|
-
|
|
13055
|
-
|
|
13056
|
-
|
|
13057
|
-
lines:
|
|
13058
|
-
|
|
13059
|
-
|
|
13060
|
-
|
|
13061
|
-
|
|
13056
|
+
const unknown2 = asFields(e.extra.unknownFields);
|
|
13057
|
+
const missing = asFields(e.extra.missingFields);
|
|
13058
|
+
if (unknown2.length || missing.length) {
|
|
13059
|
+
const lines = [];
|
|
13060
|
+
if (unknown2.length) {
|
|
13061
|
+
lines.push(`\uC11C\uBC84\uAC00 \uC544\uC9C1 \uBAA8\uB974\uB294 \uC778\uC790\uC785\uB2C8\uB2E4: ${unknown2.join(", ")} \u2014 \uBC30\uD3EC\uAC00 \uACB9\uCE58\uB294 \uC911\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.`);
|
|
13062
|
+
lines.push("\uADF8 \uC778\uC790\uB9CC \uBE7C\uACE0 \uB098\uBA38\uC9C0\uB294 \uADF8\uB300\uB85C \uB2E4\uC2DC \uBCF4\uB0B4\uC138\uC694.");
|
|
13063
|
+
}
|
|
13064
|
+
if (missing.length) {
|
|
13065
|
+
lines.push(`\uBE60\uC9C4 \uC778\uC790\uC785\uB2C8\uB2E4: ${missing.join(", ")} \u2014 \uADF8 \uAC12\uC744 \uC2E4\uC5B4 \uB2E4\uC2DC \uBCF4\uB0B4\uC138\uC694.`);
|
|
13066
|
+
}
|
|
13067
|
+
lines.push("\uC544\uC9C1 \uACFC\uAE08\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.");
|
|
13068
|
+
return { safety: "fixable", notCharged: true, lines };
|
|
13062
13069
|
}
|
|
13063
13070
|
return {
|
|
13064
13071
|
safety: "fixable",
|