@dropthis/cli 0.30.1 → 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 +21 -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
|
}
|
|
@@ -473,6 +480,14 @@ function writeApiError(deps, details) {
|
|
|
473
480
|
deps.stderr(` ${f.path}: ${f.reason}
|
|
474
481
|
`);
|
|
475
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
|
+
}
|
|
476
491
|
const nextAction = nextActionForApiError(details, "human");
|
|
477
492
|
if (nextAction) deps.stderr(`${hint(nextAction)}
|
|
478
493
|
`);
|
|
@@ -546,7 +561,8 @@ async function runAccountGet(_input, deps) {
|
|
|
546
561
|
pairs.push(["Workspace", `${String(ws.name)} (${String(ws.kind)})${role}`]);
|
|
547
562
|
}
|
|
548
563
|
const usage = data?.usage;
|
|
549
|
-
const
|
|
564
|
+
const entitlements = data?.entitlements;
|
|
565
|
+
const limits = entitlements?.limits;
|
|
550
566
|
if (typeof usage?.storageUsedBytes === "number") {
|
|
551
567
|
if (typeof limits?.maxStorageBytes === "number") {
|
|
552
568
|
pairs.push([
|
|
@@ -563,6 +579,9 @@ async function runAccountGet(_input, deps) {
|
|
|
563
579
|
`${usage.customDomainsUsed} of ${limits.maxCustomHostnames}`
|
|
564
580
|
]);
|
|
565
581
|
}
|
|
582
|
+
if (typeof usage?.seatsUsed === "number" && typeof limits?.seatLimit === "number") {
|
|
583
|
+
pairs.push(["Seats", `${usage.seatsUsed} of ${limits.seatLimit}`]);
|
|
584
|
+
}
|
|
566
585
|
writeKv(deps, pairs, { ok: true, account: result.data });
|
|
567
586
|
if (typeof data?.upgradeUrl === "string") {
|
|
568
587
|
deps.stderr(`${hint(`Upgrade: ${data.upgradeUrl}`)}
|
|
@@ -1013,7 +1032,7 @@ function spreadData(data) {
|
|
|
1013
1032
|
}
|
|
1014
1033
|
|
|
1015
1034
|
// src/version.ts
|
|
1016
|
-
var CLI_VERSION = true ? "0.
|
|
1035
|
+
var CLI_VERSION = true ? "0.31.0" : "0.0.0-dev";
|
|
1017
1036
|
|
|
1018
1037
|
// src/commands/doctor.ts
|
|
1019
1038
|
async function runDoctor(_input, deps) {
|