@waitcher/cli 0.2.6 → 0.2.8
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 +47 -7
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -875,7 +875,6 @@ var init_limits = __esm({
|
|
|
875
875
|
scanIntervalMs: 200,
|
|
876
876
|
artifactDays: 7,
|
|
877
877
|
metadataDays: 14,
|
|
878
|
-
maxRuns: 1e4,
|
|
879
878
|
cleanupBatch: 50
|
|
880
879
|
});
|
|
881
880
|
StorageError = class extends Error {
|
|
@@ -53877,11 +53876,13 @@ var EXIT_CODES = Object.freeze({
|
|
|
53877
53876
|
VALIDATION_ERROR: 2,
|
|
53878
53877
|
UNSUPPORTED_VERSION: 2,
|
|
53879
53878
|
FORBIDDEN: 7,
|
|
53879
|
+
ACCOUNT_SUSPENDED: 7,
|
|
53880
53880
|
CONFLICT: 8,
|
|
53881
53881
|
MANAGED_BY_CONFIG: 8,
|
|
53882
53882
|
QUOTA_EXCEEDED: 6,
|
|
53883
53883
|
RATE_LIMITED: 6,
|
|
53884
53884
|
DAILY_SCRIPT_BUDGET: 6,
|
|
53885
|
+
RUNNER_DAILY_BUDGET: 6,
|
|
53885
53886
|
QUEUE_FULL: 6,
|
|
53886
53887
|
NOT_FOUND: 9,
|
|
53887
53888
|
SERVICE_UNAVAILABLE: 10
|
|
@@ -58528,6 +58529,16 @@ var entries = {
|
|
|
58528
58529
|
meaning: "The account has used its script runs for today (UTC), scheduled and manual together.",
|
|
58529
58530
|
fix: "Wait until after midnight UTC; scheduled runs over the limit are recorded as missed. Never loop."
|
|
58530
58531
|
},
|
|
58532
|
+
RUNNER_DAILY_BUDGET: {
|
|
58533
|
+
title: "Hosted script runs used",
|
|
58534
|
+
meaning: "The cloud runner's runs for today (UTC) are used, by all accounts or by free accounts' share.",
|
|
58535
|
+
fix: "Wait until after midnight UTC; scheduled runs are recorded as missed. Never loop."
|
|
58536
|
+
},
|
|
58537
|
+
ACCOUNT_SUSPENDED: {
|
|
58538
|
+
title: "Account suspended",
|
|
58539
|
+
meaning: "The administrator stopped every check of this account; its data stays and can be exported or deleted.",
|
|
58540
|
+
fix: "Contact the address on the terms page. Retrying does not help."
|
|
58541
|
+
},
|
|
58531
58542
|
QUEUE_FULL: {
|
|
58532
58543
|
title: "Execution queue full",
|
|
58533
58544
|
meaning: "The run was not queued and is not saved for later.",
|
|
@@ -62029,7 +62040,7 @@ Authentication
|
|
|
62029
62040
|
|
|
62030
62041
|
Plans and billing
|
|
62031
62042
|
account billing Plan, limits and subscription status
|
|
62032
|
-
account upgrade [--yearly]
|
|
62043
|
+
account upgrade [--yearly] [--trial] Stripe Checkout URL for the pro plan; --trial: 14 days, once, no card
|
|
62033
62044
|
account billing-portal Stripe portal URL to change payment or cancel
|
|
62034
62045
|
The plan changes only when Stripe confirms the payment, never on the return page.
|
|
62035
62046
|
Billing appears when the server reports features.billing.
|
|
@@ -62075,6 +62086,10 @@ Capabilities
|
|
|
62075
62086
|
system plans Administrator: plan profiles and accounts not on starter
|
|
62076
62087
|
system plan --owner clerk:USER_ID --plan starter|pilot
|
|
62077
62088
|
Administrator: assign a plan; takes effect immediately
|
|
62089
|
+
system suspensions Administrator: accounts whose checks are suspended
|
|
62090
|
+
system suspend --owner clerk:USER_ID --reason TEXT
|
|
62091
|
+
Administrator: stop every check of one account; data stays
|
|
62092
|
+
system unsuspend --owner clerk:USER_ID Administrator: lift a suspension
|
|
62078
62093
|
|
|
62079
62094
|
Projects and environments
|
|
62080
62095
|
project list
|
|
@@ -62492,7 +62507,7 @@ ${exitCodes}
|
|
|
62492
62507
|
// package.json
|
|
62493
62508
|
var package_default = {
|
|
62494
62509
|
name: "@waitcher/cli",
|
|
62495
|
-
version: "0.2.
|
|
62510
|
+
version: "0.2.8",
|
|
62496
62511
|
description: "Synthetic monitoring from your repository: deploy HTTP, certificate, heartbeat, API and browser monitors from waitcher.json.",
|
|
62497
62512
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
62498
62513
|
author: "S\u0142awomir Radzymi\u0144ski",
|
|
@@ -62630,6 +62645,7 @@ async function main() {
|
|
|
62630
62645
|
"monitor-id": { type: "string" },
|
|
62631
62646
|
owner: { type: "string" },
|
|
62632
62647
|
plan: { type: "string" },
|
|
62648
|
+
reason: { type: "string" },
|
|
62633
62649
|
"run-id": { type: "string" },
|
|
62634
62650
|
"case-id": { type: "string" },
|
|
62635
62651
|
dataset: { type: "string" },
|
|
@@ -62684,6 +62700,7 @@ async function main() {
|
|
|
62684
62700
|
"dry-run": { type: "boolean" },
|
|
62685
62701
|
yes: { type: "boolean" },
|
|
62686
62702
|
yearly: { type: "boolean" },
|
|
62703
|
+
trial: { type: "boolean" },
|
|
62687
62704
|
browser: { type: "boolean" },
|
|
62688
62705
|
global: { type: "boolean" },
|
|
62689
62706
|
wait: { type: "boolean" },
|
|
@@ -62779,7 +62796,7 @@ async function main() {
|
|
|
62779
62796
|
"account budget": ["daily-invocations", "expected-revision"],
|
|
62780
62797
|
"account settings": [],
|
|
62781
62798
|
"account billing": [],
|
|
62782
|
-
"account upgrade": ["yearly"],
|
|
62799
|
+
"account upgrade": ["yearly", "trial"],
|
|
62783
62800
|
"account billing-portal": [],
|
|
62784
62801
|
"account configure": ["file", "expected-revision"],
|
|
62785
62802
|
"account activity": ["before"],
|
|
@@ -62875,6 +62892,9 @@ async function main() {
|
|
|
62875
62892
|
"system diagnostics": [],
|
|
62876
62893
|
"system plans": [],
|
|
62877
62894
|
"system plan": ["owner", "plan"],
|
|
62895
|
+
"system suspensions": [],
|
|
62896
|
+
"system suspend": ["owner", "reason"],
|
|
62897
|
+
"system unsuspend": ["owner"],
|
|
62878
62898
|
"artifact get": ["id", "path", "file"],
|
|
62879
62899
|
"auth logout": [],
|
|
62880
62900
|
"monitor init": [
|
|
@@ -64655,20 +64675,25 @@ async function main() {
|
|
|
64655
64675
|
} else if (command === "system diagnostics")
|
|
64656
64676
|
result2 = await api("system/diagnostics");
|
|
64657
64677
|
else if (command === "system plans") result2 = await api("system/plans");
|
|
64678
|
+
else if (command === "system suspensions")
|
|
64679
|
+
result2 = await api("system/suspensions");
|
|
64658
64680
|
else if (command === "account billing") result2 = await api("billing");
|
|
64659
64681
|
else if (command === "account upgrade" || command === "account billing-portal") {
|
|
64660
64682
|
const { url: url3 } = await api(
|
|
64661
64683
|
command === "account upgrade" ? "billing/checkout" : "billing/portal",
|
|
64662
64684
|
{
|
|
64663
64685
|
method: "POST",
|
|
64664
|
-
body: command === "account upgrade"
|
|
64686
|
+
body: command === "account upgrade" ? {
|
|
64687
|
+
...v.yearly ? { interval: "year" } : {},
|
|
64688
|
+
...v.trial ? { trial: true } : {}
|
|
64689
|
+
} : {}
|
|
64665
64690
|
}
|
|
64666
64691
|
);
|
|
64667
64692
|
result2 = {
|
|
64668
64693
|
event: command === "account upgrade" ? "checkout_created" : "portal_created",
|
|
64669
64694
|
url: url3,
|
|
64670
64695
|
next: [
|
|
64671
|
-
command === "account upgrade" ? "Open the URL in a browser and pay there; the plan changes when Stripe confirms the payment" : "Open the URL in a browser to change or cancel the subscription",
|
|
64696
|
+
command === "account upgrade" ? v.trial ? "Open the URL in a browser to start the trial; no card is needed, and without one the plan returns to starter when it ends" : "Open the URL in a browser and pay there; the plan changes when Stripe confirms the payment" : "Open the URL in a browser to change or cancel the subscription",
|
|
64672
64697
|
"waitcher account billing"
|
|
64673
64698
|
]
|
|
64674
64699
|
};
|
|
@@ -64681,6 +64706,17 @@ async function main() {
|
|
|
64681
64706
|
method: "PUT",
|
|
64682
64707
|
body: { plan }
|
|
64683
64708
|
});
|
|
64709
|
+
} else if (command === "system suspend" || command === "system unsuspend") {
|
|
64710
|
+
const owner = String(v.owner ?? "");
|
|
64711
|
+
if (!/^clerk:user_[A-Za-z0-9]{8,64}$/.test(owner))
|
|
64712
|
+
usage2("--owner must be an account owner like clerk:user_ID");
|
|
64713
|
+
const suspend = command === "system suspend";
|
|
64714
|
+
if (suspend && String(v.reason ?? "").trim().length < 3)
|
|
64715
|
+
usage2("--reason must say why, in 3 to 200 characters");
|
|
64716
|
+
result2 = await api(`system/suspensions/${encodeURIComponent(owner)}`, {
|
|
64717
|
+
method: suspend ? "PUT" : "DELETE",
|
|
64718
|
+
...suspend ? { body: { reason: String(v.reason) } } : {}
|
|
64719
|
+
});
|
|
64684
64720
|
} else if (command === "system capabilities")
|
|
64685
64721
|
result2 = await api("capabilities");
|
|
64686
64722
|
else if (command === "auth status") {
|
|
@@ -64690,7 +64726,11 @@ async function main() {
|
|
|
64690
64726
|
mode: session.kind === "automation" ? "automation" : session.kind === "oauth" ? "oauth" : "admin_password",
|
|
64691
64727
|
authorization: data.authorization,
|
|
64692
64728
|
account: data.account,
|
|
64693
|
-
...data.owner ? {
|
|
64729
|
+
...data.owner ? {
|
|
64730
|
+
owner: data.owner,
|
|
64731
|
+
plan: data.limits?.plan,
|
|
64732
|
+
...data.suspended ? { suspended: data.suspended } : {}
|
|
64733
|
+
} : {},
|
|
64694
64734
|
server,
|
|
64695
64735
|
probe: data.probe,
|
|
64696
64736
|
expiresAt: new Date(session.expiresAt).toISOString()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@waitcher/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Synthetic monitoring from your repository: deploy HTTP, certificate, heartbeat, API and browser monitors from waitcher.json.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Sławomir Radzymiński",
|