@dropthis/cli 0.30.0 → 0.31.0
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.cjs +25 -2
- package/dist/cli.cjs.map +1 -1
- package/node_modules/@dropthis/node/README.md +16 -5
- package/node_modules/@dropthis/node/dist/edge.cjs +17 -1
- package/node_modules/@dropthis/node/dist/edge.cjs.map +1 -1
- package/node_modules/@dropthis/node/dist/edge.d.cts +1 -1
- package/node_modules/@dropthis/node/dist/edge.d.ts +1 -1
- package/node_modules/@dropthis/node/dist/edge.mjs +17 -1
- package/node_modules/@dropthis/node/dist/edge.mjs.map +1 -1
- package/node_modules/@dropthis/node/dist/index.cjs +32 -1
- package/node_modules/@dropthis/node/dist/index.cjs.map +1 -1
- package/node_modules/@dropthis/node/dist/index.d.cts +24 -3
- package/node_modules/@dropthis/node/dist/index.d.ts +24 -3
- package/node_modules/@dropthis/node/dist/index.mjs +29 -1
- package/node_modules/@dropthis/node/dist/index.mjs.map +1 -1
- package/node_modules/@dropthis/node/dist/{workspaces-BXW942z-.d.cts → workspaces-Xmo2L46y.d.cts} +49 -11
- package/node_modules/@dropthis/node/dist/{workspaces-BXW942z-.d.ts → workspaces-Xmo2L46y.d.ts} +49 -11
- package/node_modules/@dropthis/node/package.json +1 -1
- package/package.json +2 -2
package/dist/cli.cjs
CHANGED
|
@@ -206,6 +206,13 @@ function apiErrorEnvelope(error2) {
|
|
|
206
206
|
...error2.requestId ? { request_id: error2.requestId } : {},
|
|
207
207
|
...error2.suggestion ? { suggestion: error2.suggestion } : {},
|
|
208
208
|
...error2.retryable !== void 0 && error2.retryable !== null ? { retryable: error2.retryable } : {},
|
|
209
|
+
...error2.feature ? { feature: error2.feature } : {},
|
|
210
|
+
...error2.currentPlan ? { current_plan: error2.currentPlan } : {},
|
|
211
|
+
...error2.requiredPlan ? { required_plan: error2.requiredPlan } : {},
|
|
212
|
+
...error2.upgradeUrl ? { upgrade_url: error2.upgradeUrl } : {},
|
|
213
|
+
...typeof error2.limit === "number" ? { limit: error2.limit } : {},
|
|
214
|
+
...typeof error2.used === "number" ? { used: error2.used } : {},
|
|
215
|
+
...typeof error2.requested === "number" ? { requested: error2.requested } : {},
|
|
209
216
|
...failures.length ? { failures } : {},
|
|
210
217
|
next_action: nextActionForApiError(error2)
|
|
211
218
|
}
|
|
@@ -407,6 +414,10 @@ function formatDropDetails(data) {
|
|
|
407
414
|
if (vis === "unlisted") parts.push("unlisted");
|
|
408
415
|
const exp = data.expiresAt;
|
|
409
416
|
if (typeof exp === "string") parts.push(`expires ${exp.split("T")[0]}`);
|
|
417
|
+
const ws = data.workspace;
|
|
418
|
+
if (ws && ws.kind === "team" && typeof ws.name === "string") {
|
|
419
|
+
parts.push(`team: ${ws.name}`);
|
|
420
|
+
}
|
|
410
421
|
if (parts.length === 0) return "";
|
|
411
422
|
return ` ${import_picocolors2.default.dim(parts.join(" \xB7 "))}`;
|
|
412
423
|
}
|
|
@@ -469,6 +480,14 @@ function writeApiError(deps, details) {
|
|
|
469
480
|
deps.stderr(` ${f.path}: ${f.reason}
|
|
470
481
|
`);
|
|
471
482
|
}
|
|
483
|
+
if (details.code === "feature_not_in_plan" || details.code === "quota_exceeded") {
|
|
484
|
+
if (details.currentPlan && details.requiredPlan) {
|
|
485
|
+
deps.stderr(
|
|
486
|
+
`${hint(`Plan: ${details.currentPlan} \u2192 needs ${details.requiredPlan}`)}
|
|
487
|
+
`
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
472
491
|
const nextAction = nextActionForApiError(details, "human");
|
|
473
492
|
if (nextAction) deps.stderr(`${hint(nextAction)}
|
|
474
493
|
`);
|
|
@@ -542,7 +561,8 @@ async function runAccountGet(_input, deps) {
|
|
|
542
561
|
pairs.push(["Workspace", `${String(ws.name)} (${String(ws.kind)})${role}`]);
|
|
543
562
|
}
|
|
544
563
|
const usage = data?.usage;
|
|
545
|
-
const
|
|
564
|
+
const entitlements = data?.entitlements;
|
|
565
|
+
const limits = entitlements?.limits;
|
|
546
566
|
if (typeof usage?.storageUsedBytes === "number") {
|
|
547
567
|
if (typeof limits?.maxStorageBytes === "number") {
|
|
548
568
|
pairs.push([
|
|
@@ -559,6 +579,9 @@ async function runAccountGet(_input, deps) {
|
|
|
559
579
|
`${usage.customDomainsUsed} of ${limits.maxCustomHostnames}`
|
|
560
580
|
]);
|
|
561
581
|
}
|
|
582
|
+
if (typeof usage?.seatsUsed === "number" && typeof limits?.seatLimit === "number") {
|
|
583
|
+
pairs.push(["Seats", `${usage.seatsUsed} of ${limits.seatLimit}`]);
|
|
584
|
+
}
|
|
562
585
|
writeKv(deps, pairs, { ok: true, account: result.data });
|
|
563
586
|
if (typeof data?.upgradeUrl === "string") {
|
|
564
587
|
deps.stderr(`${hint(`Upgrade: ${data.upgradeUrl}`)}
|
|
@@ -1009,7 +1032,7 @@ function spreadData(data) {
|
|
|
1009
1032
|
}
|
|
1010
1033
|
|
|
1011
1034
|
// src/version.ts
|
|
1012
|
-
var CLI_VERSION = true ? "0.
|
|
1035
|
+
var CLI_VERSION = true ? "0.31.0" : "0.0.0-dev";
|
|
1013
1036
|
|
|
1014
1037
|
// src/commands/doctor.ts
|
|
1015
1038
|
async function runDoctor(_input, deps) {
|