@theholocron/holocron-plugin-checkly 5.0.0-alpha.468 → 5.0.0-alpha.470

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/index.mjs +7 -5
  2. package/package.json +5 -5
package/dist/index.mjs CHANGED
@@ -370,10 +370,11 @@ async function ensureStatusPage(client, input) {
370
370
  changedComponents.push(c.name);
371
371
  }
372
372
  }
373
- const rules = await api.rules.list(page.id);
374
373
  const rulesMade = [];
375
374
  const rulesChanged = [];
376
- for (const c of input.components) {
375
+ const automated = input.automation !== false;
376
+ const rules = automated ? await api.rules.list(page.id) : [];
377
+ for (const c of automated ? input.components : []) {
377
378
  const componentId = componentIds.get(c.name);
378
379
  const rule = rules.find((r) => r.name === c.name);
379
380
  if (ruleOk(rule, c.tags, componentId)) continue;
@@ -453,7 +454,8 @@ async function inspectStatusPage(client, input) {
453
454
  extraRules: []
454
455
  };
455
456
  const api = client.statusPages;
456
- const [components, rules] = await Promise.all([api.components.list(page.id), api.rules.list(page.id)]);
457
+ const automated = input.automation !== false;
458
+ const [components, rules] = await Promise.all([api.components.list(page.id), automated ? api.rules.list(page.id) : Promise.resolve([])]);
457
459
  const { groups, order } = layout(input.components);
458
460
  const byId = new Map(components.map((c) => [c.id, c]));
459
461
  const declaredNames = /* @__PURE__ */ new Set([...input.components.map((c) => c.name), ...groups]);
@@ -471,7 +473,7 @@ async function inspectStatusPage(client, input) {
471
473
  const found = services.get(c.name);
472
474
  if (!found) {
473
475
  missing.push(c.name);
474
- missingRules.push(c.name);
476
+ if (automated) missingRules.push(c.name);
475
477
  continue;
476
478
  }
477
479
  if (c.group !== void 0) {
@@ -479,7 +481,7 @@ async function inspectStatusPage(client, input) {
479
481
  }
480
482
  const want = c.group === void 0 ? order.get(`service:${c.name}`) : order.get(`child:${c.group}:${c.name}`);
481
483
  if (found.displayOrder !== want) misplaced.push(`${c.name}: order ${found.displayOrder}, expected ${want}`);
482
- if (!ruleOk(rules.find((r) => r.name === c.name), c.tags, found.id)) missingRules.push(c.name);
484
+ if (automated && !ruleOk(rules.find((r) => r.name === c.name), c.tags, found.id)) missingRules.push(c.name);
483
485
  }
484
486
  const state = {
485
487
  exists: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-checkly",
3
- "version": "5.0.0-alpha.468",
3
+ "version": "5.0.0-alpha.470",
4
4
  "description": "Holocron plugin for Checkly. Implements the monitoring capability against Checkly's REST API, plus exports verifyToken + AUTH_HINT for `holocron auth`.",
5
5
  "keywords": [
6
6
  "checkly",
@@ -41,16 +41,16 @@
41
41
  "tsx": "4.23.15",
42
42
  "typescript": "^5.9.3",
43
43
  "vitest": "^5.1.0",
44
- "@theholocron/checkly-client": "^1.58.0-alpha.40",
45
- "@theholocron/cli": "5.0.0-alpha.468",
46
44
  "@theholocron/http-client": "^1.58.0-alpha.40",
45
+ "@theholocron/cli": "5.0.0-alpha.470",
47
46
  "@theholocron/misc-utils": "^1.17.0-alpha.5",
48
- "@theholocron/tsconfig": "^8.9.0-alpha.19"
47
+ "@theholocron/checkly-client": "^1.58.0-alpha.40",
48
+ "@theholocron/tsconfig": "^8.9.0-alpha.20"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@theholocron/checkly-client": "^1.55.0",
52
52
  "@theholocron/misc-utils": "^1.16.0",
53
- "@theholocron/cli": "5.0.0-alpha.468"
53
+ "@theholocron/cli": "5.0.0-alpha.470"
54
54
  },
55
55
  "engines": {
56
56
  "node": ">=22"