@theholocron/holocron-plugin-checkly 5.0.0-alpha.422 → 5.0.0-alpha.423
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/README.md +7 -7
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +8 -8
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Checkly plugin for [Holocron](../cli). Implements the
|
|
|
6
6
|
`monitoring` capability against [Checkly's REST API](https://api.checklyhq.com/v1)
|
|
7
7
|
(API checks only — browser checks, heartbeats, and dashboards are out of
|
|
8
8
|
scope until a real consumer needs them), plus exports `verifyToken` +
|
|
9
|
-
`AUTH_HINT` for use by `holocron
|
|
9
|
+
`AUTH_HINT` for use by `holocron check token`.
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
@@ -31,15 +31,15 @@ granular roles, but require the Starter tier or above — not available
|
|
|
31
31
|
on the free Hobby tier. Revisit if/when the account upgrades.
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
holocron
|
|
35
|
-
holocron
|
|
34
|
+
holocron new token checkly <TOKEN>
|
|
35
|
+
holocron check token checkly # verify — hits GET /v1/accounts
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
## Config
|
|
39
39
|
|
|
40
40
|
`accountId` is required on every request (Checkly's `x-checkly-account`
|
|
41
41
|
header) — it is not a secret, the same status as Vercel's `teamId`.
|
|
42
|
-
`checks` is the list of API checks `holocron
|
|
42
|
+
`checks` is the list of API checks `holocron setup` ensures exist,
|
|
43
43
|
each matched and upserted by exact `name`. **`locations` is required** —
|
|
44
44
|
Checkly refuses a check with neither `locations` nor `privateLocations`
|
|
45
45
|
set (`400 "You have to set at least one location or privateLocation"`)
|
|
@@ -103,10 +103,10 @@ subscribed to a channel it is routed away from.
|
|
|
103
103
|
alert settings and its routed subscriptions.
|
|
104
104
|
- `monitoring.whoami()` — lightweight auth probe (`GET /checks?limit=1`).
|
|
105
105
|
- `monitoring.checks` — the configured check list, read by
|
|
106
|
-
`holocron
|
|
106
|
+
`holocron setup` to loop over `ensureCheck`.
|
|
107
107
|
- `verifyToken` — `GET /v1/accounts` (the one Checkly endpoint that does
|
|
108
|
-
**not** require `x-checkly-account`), used by `holocron
|
|
109
|
-
`holocron
|
|
108
|
+
**not** require `x-checkly-account`), used by `holocron new token` /
|
|
109
|
+
`holocron check token` before any `accountId` is in scope.
|
|
110
110
|
|
|
111
111
|
## Status
|
|
112
112
|
|
package/dist/index.d.mts
CHANGED
|
@@ -83,7 +83,7 @@ export declare function verifyToken(token: string, opts?: VerifyTokenOptions): P
|
|
|
83
83
|
export interface ChecklyPluginOptions extends ResolveTokenInput {
|
|
84
84
|
/** Checkly account id — required on every request, not a secret (same status as Vercel's teamId). */
|
|
85
85
|
accountId: string;
|
|
86
|
-
/** Checks `holocron
|
|
86
|
+
/** Checks `holocron setup` should ensure exist. */
|
|
87
87
|
checks?: MonitoringCheckInput[];
|
|
88
88
|
/** Override base URL for tests. */
|
|
89
89
|
baseUrl?: string;
|
|
@@ -112,7 +112,7 @@ export declare function createPlugin(options: ChecklyPluginOptions): {
|
|
|
112
112
|
};
|
|
113
113
|
};
|
|
114
114
|
/**
|
|
115
|
-
* One-line hint printed by `holocron
|
|
115
|
+
* One-line hint printed by `holocron new token checkly` when no token
|
|
116
116
|
* is supplied or the supplied token is rejected.
|
|
117
117
|
*/
|
|
118
118
|
export declare const AUTH_HINT: string;
|
package/dist/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ const resolveToken = createResolveToken({
|
|
|
8
8
|
envName: "HOLOCRON_CHECKLY_TOKEN",
|
|
9
9
|
vendorEnvName: "CHECKLY_API_KEY",
|
|
10
10
|
keyringService: "checkly",
|
|
11
|
-
errorMessage: "no Checkly token found. Pass --token <TOKEN>, set HOLOCRON_CHECKLY_TOKEN / CHECKLY_API_KEY, or run: holocron
|
|
11
|
+
errorMessage: "no Checkly token found. Pass --token <TOKEN>, set HOLOCRON_CHECKLY_TOKEN / CHECKLY_API_KEY, or run: holocron new token checkly <TOKEN>"
|
|
12
12
|
});
|
|
13
13
|
/** Every token this plugin takes, for `holocron doctor tokens`. */
|
|
14
14
|
const tokens = [resolveToken.token];
|
|
@@ -27,7 +27,7 @@ const CHECKLY_ICON = {
|
|
|
27
27
|
// src/routing.ts
|
|
28
28
|
/**
|
|
29
29
|
* Whether the config routes the check `checkName` away from the alert channel `channelName`: it declares the check with
|
|
30
|
-
* a non-empty `alertChannels` that does not name the channel (compared without regard to case, as `notifications
|
|
30
|
+
* a non-empty `alertChannels` that does not name the channel (compared without regard to case, as `setup notifications`
|
|
31
31
|
* does). A check the config does not declare, or declares with no routes (or an empty list), alerts through every channel.
|
|
32
32
|
*/
|
|
33
33
|
function routedAway(declared, checkName, channelName) {
|
|
@@ -47,7 +47,7 @@ const sameTemplate = (a, b) => (a ?? "").replace(/\s+/g, "") === b.replace(/\s+/
|
|
|
47
47
|
* partial match) narrows to candidates, then an exact-name match picks
|
|
48
48
|
* the one to update. `checks` carries whatever this provider was
|
|
49
49
|
* constructed with (from the provider config tuple's second argument —
|
|
50
|
-
* same place `Deployment.domain` comes from) for `holocron
|
|
50
|
+
* same place `Deployment.domain` comes from) for `holocron setup`
|
|
51
51
|
* to loop over generically.
|
|
52
52
|
*/
|
|
53
53
|
const SOURCE_MAP = {
|
|
@@ -423,7 +423,7 @@ const channelName = (deps) => createEnvLookup(deps.env).get("HOLOCRON_CHECKLY_PR
|
|
|
423
423
|
async function findChannel(client, deps) {
|
|
424
424
|
const name = channelName(deps);
|
|
425
425
|
const channel = (await client.alertChannels.list()).find((c) => c.type === "WEBHOOK" && c.config.name === name);
|
|
426
|
-
if (!channel) throw new Error(`no alert channel named "${name}" (run \`holocron notifications
|
|
426
|
+
if (!channel) throw new Error(`no alert channel named "${name}" (run \`holocron setup notifications\`, or set HOLOCRON_CHECKLY_PROBE_CHANNEL)`);
|
|
427
427
|
return channel;
|
|
428
428
|
}
|
|
429
429
|
// src/probes/channel.ts
|
|
@@ -473,7 +473,7 @@ function channelProbe(deps) {
|
|
|
473
473
|
} : {
|
|
474
474
|
status: "fail",
|
|
475
475
|
label: "template differs from the shipped one",
|
|
476
|
-
detail: "run `holocron notifications
|
|
476
|
+
detail: "run `holocron setup notifications` to put it back"
|
|
477
477
|
});
|
|
478
478
|
const ids = (await allChecks(client)).filter((c) => !routedAway(deps.checks ?? [], c.name, channel.config.name)).map((c) => c.id);
|
|
479
479
|
const subscribed = new Set(channel.subscriptions.filter((s) => s.checkId && s.activated !== false).map((s) => s.checkId));
|
|
@@ -484,7 +484,7 @@ function channelProbe(deps) {
|
|
|
484
484
|
} : {
|
|
485
485
|
status: "fail",
|
|
486
486
|
label: `${ids.length - missing} of ${ids.length} checks use it`,
|
|
487
|
-
detail: "run `holocron notifications
|
|
487
|
+
detail: "run `holocron setup notifications` to subscribe the rest"
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
490
|
};
|
|
@@ -670,8 +670,8 @@ function createPlugin(options) {
|
|
|
670
670
|
};
|
|
671
671
|
}
|
|
672
672
|
/**
|
|
673
|
-
* One-line hint printed by `holocron
|
|
673
|
+
* One-line hint printed by `holocron new token checkly` when no token
|
|
674
674
|
* is supplied or the supplied token is rejected.
|
|
675
675
|
*/
|
|
676
|
-
const AUTH_HINT = "generate a Checkly API key at https://app.checklyhq.com/settings/user/api-keys, then run: holocron
|
|
676
|
+
const AUTH_HINT = "generate a Checkly API key at https://app.checklyhq.com/settings/user/api-keys, then run: holocron new token checkly <KEY>";
|
|
677
677
|
export { AUTH_HINT, AuthError, ChecklyMonitoring, createChecklyClient, createContext, createPlugin, monitoring, resolveToken, tokens, verifyToken };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/holocron-plugin-checkly",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.423",
|
|
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.
|
|
45
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
46
|
-
"@theholocron/http-client": "^1.58.0-alpha.
|
|
44
|
+
"@theholocron/checkly-client": "^1.58.0-alpha.29",
|
|
45
|
+
"@theholocron/cli": "5.0.0-alpha.423",
|
|
46
|
+
"@theholocron/http-client": "^1.58.0-alpha.29",
|
|
47
47
|
"@theholocron/misc-utils": "^1.17.0-alpha.4",
|
|
48
|
-
"@theholocron/tsconfig": "^8.9.0-alpha.
|
|
48
|
+
"@theholocron/tsconfig": "^8.9.0-alpha.17"
|
|
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.
|
|
53
|
+
"@theholocron/cli": "5.0.0-alpha.423"
|
|
54
54
|
},
|
|
55
55
|
"engines": {
|
|
56
56
|
"node": ">=22"
|