@waitcher/cli 0.2.6 → 0.2.7

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +39 -2
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -53877,11 +53877,13 @@ var EXIT_CODES = Object.freeze({
53877
53877
  VALIDATION_ERROR: 2,
53878
53878
  UNSUPPORTED_VERSION: 2,
53879
53879
  FORBIDDEN: 7,
53880
+ ACCOUNT_SUSPENDED: 7,
53880
53881
  CONFLICT: 8,
53881
53882
  MANAGED_BY_CONFIG: 8,
53882
53883
  QUOTA_EXCEEDED: 6,
53883
53884
  RATE_LIMITED: 6,
53884
53885
  DAILY_SCRIPT_BUDGET: 6,
53886
+ RUNNER_DAILY_BUDGET: 6,
53885
53887
  QUEUE_FULL: 6,
53886
53888
  NOT_FOUND: 9,
53887
53889
  SERVICE_UNAVAILABLE: 10
@@ -58528,6 +58530,16 @@ var entries = {
58528
58530
  meaning: "The account has used its script runs for today (UTC), scheduled and manual together.",
58529
58531
  fix: "Wait until after midnight UTC; scheduled runs over the limit are recorded as missed. Never loop."
58530
58532
  },
58533
+ RUNNER_DAILY_BUDGET: {
58534
+ title: "Hosted script runs used",
58535
+ meaning: "The cloud runner's runs for today (UTC) are used, by all accounts or by free accounts' share.",
58536
+ fix: "Wait until after midnight UTC; scheduled runs are recorded as missed. Never loop."
58537
+ },
58538
+ ACCOUNT_SUSPENDED: {
58539
+ title: "Account suspended",
58540
+ meaning: "The administrator stopped every check of this account; its data stays and can be exported or deleted.",
58541
+ fix: "Contact the address on the terms page. Retrying does not help."
58542
+ },
58531
58543
  QUEUE_FULL: {
58532
58544
  title: "Execution queue full",
58533
58545
  meaning: "The run was not queued and is not saved for later.",
@@ -62075,6 +62087,10 @@ Capabilities
62075
62087
  system plans Administrator: plan profiles and accounts not on starter
62076
62088
  system plan --owner clerk:USER_ID --plan starter|pilot
62077
62089
  Administrator: assign a plan; takes effect immediately
62090
+ system suspensions Administrator: accounts whose checks are suspended
62091
+ system suspend --owner clerk:USER_ID --reason TEXT
62092
+ Administrator: stop every check of one account; data stays
62093
+ system unsuspend --owner clerk:USER_ID Administrator: lift a suspension
62078
62094
 
62079
62095
  Projects and environments
62080
62096
  project list
@@ -62492,7 +62508,7 @@ ${exitCodes}
62492
62508
  // package.json
62493
62509
  var package_default = {
62494
62510
  name: "@waitcher/cli",
62495
- version: "0.2.6",
62511
+ version: "0.2.7",
62496
62512
  description: "Synthetic monitoring from your repository: deploy HTTP, certificate, heartbeat, API and browser monitors from waitcher.json.",
62497
62513
  license: "SEE LICENSE IN LICENSE.txt",
62498
62514
  author: "S\u0142awomir Radzymi\u0144ski",
@@ -62630,6 +62646,7 @@ async function main() {
62630
62646
  "monitor-id": { type: "string" },
62631
62647
  owner: { type: "string" },
62632
62648
  plan: { type: "string" },
62649
+ reason: { type: "string" },
62633
62650
  "run-id": { type: "string" },
62634
62651
  "case-id": { type: "string" },
62635
62652
  dataset: { type: "string" },
@@ -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,6 +64675,8 @@ 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(
@@ -64681,6 +64703,17 @@ async function main() {
64681
64703
  method: "PUT",
64682
64704
  body: { plan }
64683
64705
  });
64706
+ } else if (command === "system suspend" || command === "system unsuspend") {
64707
+ const owner = String(v.owner ?? "");
64708
+ if (!/^clerk:user_[A-Za-z0-9]{8,64}$/.test(owner))
64709
+ usage2("--owner must be an account owner like clerk:user_ID");
64710
+ const suspend = command === "system suspend";
64711
+ if (suspend && String(v.reason ?? "").trim().length < 3)
64712
+ usage2("--reason must say why, in 3 to 200 characters");
64713
+ result2 = await api(`system/suspensions/${encodeURIComponent(owner)}`, {
64714
+ method: suspend ? "PUT" : "DELETE",
64715
+ ...suspend ? { body: { reason: String(v.reason) } } : {}
64716
+ });
64684
64717
  } else if (command === "system capabilities")
64685
64718
  result2 = await api("capabilities");
64686
64719
  else if (command === "auth status") {
@@ -64690,7 +64723,11 @@ async function main() {
64690
64723
  mode: session.kind === "automation" ? "automation" : session.kind === "oauth" ? "oauth" : "admin_password",
64691
64724
  authorization: data.authorization,
64692
64725
  account: data.account,
64693
- ...data.owner ? { owner: data.owner, plan: data.limits?.plan } : {},
64726
+ ...data.owner ? {
64727
+ owner: data.owner,
64728
+ plan: data.limits?.plan,
64729
+ ...data.suspended ? { suspended: data.suspended } : {}
64730
+ } : {},
64694
64731
  server,
64695
64732
  probe: data.probe,
64696
64733
  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.6",
3
+ "version": "0.2.7",
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",