@waitcher/cli 0.2.23 → 0.2.24

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 +22 -4
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -55724,7 +55724,12 @@ function formatAgentReport(summary2, gate, runStatus) {
55724
55724
  }
55725
55725
  if (failed.length) {
55726
55726
  lines.push(" Failed steps:");
55727
- for (const c of failed.slice(0, 20)) lines.push(` ${c.command.replaceAll("\n", " ").slice(0, 200)}`);
55727
+ for (const c of failed.slice(0, 20)) {
55728
+ lines.push(` ${c.command.replaceAll("\n", " ").slice(0, 200)}`);
55729
+ const output2 = typeof c.output === "string" ? c.output.trim().slice(-400) : "";
55730
+ for (const line of output2 ? output2.split("\n").slice(-6) : [])
55731
+ lines.push(` > ${line.slice(0, 200)}`);
55732
+ }
55728
55733
  }
55729
55734
  const denied = Array.isArray(gate?.denied) ? gate.denied.filter((d) => typeof d === "string").slice(0, 20) : [];
55730
55735
  if (denied.length) lines.push(` Refused by the gateway: ${denied.join("; ")}`);
@@ -62716,6 +62721,8 @@ Monitor configuration
62716
62721
  monitor export --id ID --file PATH Export configuration, not history
62717
62722
  monitor apply --file PATH [--id ID --expected-revision N]
62718
62723
  [--dry-run] [--enable] Create, or replace with --id (complete definition)
62724
+ A project token (auth status shows projectName) uses
62725
+ waitcher.json and deploy apply instead
62719
62726
  monitor pause --id ID Disable scheduled executions
62720
62727
  monitor resume --id ID Enable scheduled executions
62721
62728
  monitor delete --id ID --yes Permanently remove monitor and history
@@ -63087,7 +63094,7 @@ ${exitCodes}
63087
63094
  // package.json
63088
63095
  var package_default = {
63089
63096
  name: "@waitcher/cli",
63090
- version: "0.2.23",
63097
+ version: "0.2.24",
63091
63098
  description: "Synthetic monitoring from your repository: deploy HTTP, certificate, heartbeat, API, browser and visual monitors from waitcher.json.",
63092
63099
  license: "SEE LICENSE IN LICENSE.txt",
63093
63100
  author: "S\u0142awomir Radzymi\u0144ski",
@@ -63217,6 +63224,15 @@ async function passwordFromStdin(maxBytes = 2048) {
63217
63224
  controller.signal.removeEventListener("abort", cancel);
63218
63225
  }
63219
63226
  }
63227
+ function projectTokenNext(authorization) {
63228
+ if (!authorization?.projectId) return {};
63229
+ const name5 = JSON.stringify(authorization.projectName ?? "");
63230
+ return {
63231
+ next: [
63232
+ `This token reaches only the project ${name5}. Add or change monitors in a waitcher.json whose "project" is ${name5} (waitcher config init --project-name ${name5}), then waitcher deploy plan and deploy apply; monitor apply, pause and resume are refused.`
63233
+ ]
63234
+ };
63235
+ }
63220
63236
  async function main() {
63221
63237
  let parsed;
63222
63238
  try {
@@ -64112,7 +64128,8 @@ async function main() {
64112
64128
  credentialId: data.authorization.id,
64113
64129
  scopes: data.authorization.scopes,
64114
64130
  expiresAt: new Date(saved2.expiresAt).toISOString(),
64115
- sessionFile: saved2.path
64131
+ sessionFile: saved2.path,
64132
+ ...projectTokenNext(data.authorization)
64116
64133
  }) + "\n"
64117
64134
  );
64118
64135
  return;
@@ -65389,7 +65406,8 @@ async function main() {
65389
65406
  } : {},
65390
65407
  server,
65391
65408
  probe: data.probe,
65392
- expiresAt: new Date(session.expiresAt).toISOString()
65409
+ expiresAt: new Date(session.expiresAt).toISOString(),
65410
+ ...projectTokenNext(data.authorization)
65393
65411
  };
65394
65412
  } else if (command === "monitor calibrate") {
65395
65413
  const body2 = await readCalibrationRequest(v.file);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@waitcher/cli",
3
- "version": "0.2.23",
3
+ "version": "0.2.24",
4
4
  "description": "Synthetic monitoring from your repository: deploy HTTP, certificate, heartbeat, API, browser and visual monitors from waitcher.json.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Sławomir Radzymiński",