@theholocron/holocron-plugin-cloudflare 5.0.0-alpha.123 → 5.0.0-alpha.125

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/index.d.mts CHANGED
@@ -42,6 +42,11 @@ declare class CloudflareDns implements Dns {
42
42
  listRecords(domain: string): Promise<DnsRecord[]>;
43
43
  upsertRecord(domain: string, record: DnsRecord): Promise<DnsRecord>;
44
44
  deleteRecord(domain: string, id: string): Promise<void>;
45
+ /** `holocron doctor` has no specific domain to check — lists every zone the token can see instead. */
46
+ whoami(): Promise<{
47
+ ok: boolean;
48
+ zones: number;
49
+ }>;
45
50
  /**
46
51
  * Walk from full domain up to apex to find the Cloudflare zone.
47
52
  * E.g. "api.staging.example.com" tries:
@@ -61,6 +66,11 @@ declare class CloudflareWorkers implements Workers {
61
66
  private readonly zoneCache;
62
67
  constructor(client: () => Pick<CloudflareClient$1, "workers" | "zones">, accountId: string);
63
68
  upsertProxy(hostname: string, config: WikiProxyConfig): Promise<void>;
69
+ /** `holocron doctor` has no specific script to check — lists every script the token can see instead. */
70
+ whoami(): Promise<{
71
+ ok: boolean;
72
+ scripts: number;
73
+ }>;
64
74
  deployScript(name: string, config: DeployScriptConfig): Promise<DeployScriptResult>;
65
75
  /** Idempotent create-or-update for one route pattern — shared by both public methods. */
66
76
  private upsertRoute;
package/dist/index.mjs CHANGED
@@ -155,6 +155,13 @@ var CloudflareDns = class {
155
155
  const zoneId = await this.resolveZone(domain);
156
156
  await this.client().dns.delete(zoneId, id);
157
157
  }
158
+ /** `holocron doctor` has no specific domain to check — lists every zone the token can see instead. */
159
+ async whoami() {
160
+ return {
161
+ ok: true,
162
+ zones: (await this.client().zones.list()).length
163
+ };
164
+ }
158
165
  /**
159
166
  * Walk from full domain up to apex to find the Cloudflare zone.
160
167
  * E.g. "api.staging.example.com" tries:
@@ -204,6 +211,13 @@ var CloudflareWorkers = class {
204
211
  await this.client().workers.putScript(this.accountId, scriptName, script);
205
212
  await this.upsertRoute(`${hostname}/*`, scriptName);
206
213
  }
214
+ /** `holocron doctor` has no specific script to check — lists every script the token can see instead. */
215
+ async whoami() {
216
+ return {
217
+ ok: true,
218
+ scripts: (await this.client().workers.listScripts(this.accountId)).length
219
+ };
220
+ }
207
221
  async deployScript(name, config) {
208
222
  await this.client().workers.putScript(this.accountId, name, config.code);
209
223
  for (const [secretName, value] of Object.entries(config.secrets ?? {})) await this.client().workers.putSecret(this.accountId, name, secretName, value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-cloudflare",
3
- "version": "5.0.0-alpha.123",
3
+ "version": "5.0.0-alpha.125",
4
4
  "description": "Holocron plugin for Cloudflare. Implements the dns capability against Cloudflare's REST API — zone resolution, DNS record management.",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -30,9 +30,9 @@
30
30
  "dist"
31
31
  ],
32
32
  "devDependencies": {
33
- "@theholocron/cloudflare-client": "^1.38.0",
33
+ "@theholocron/cloudflare-client": "^1.39.0",
34
34
  "@theholocron/eslint-config": "^8.7.0",
35
- "@theholocron/http-client": "^1.38.0",
35
+ "@theholocron/http-client": "^1.39.0",
36
36
  "@theholocron/misc-utils": "^1.9.2",
37
37
  "@theholocron/tsconfig": "^8.7.0",
38
38
  "@theholocron/tsdown-config": "^8.7.0",
@@ -48,12 +48,12 @@
48
48
  "tsx": "4.23.12",
49
49
  "typescript": "^5.9.3",
50
50
  "vitest": "^4.1.11",
51
- "@theholocron/cli": "5.0.0-alpha.123"
51
+ "@theholocron/cli": "5.0.0-alpha.125"
52
52
  },
53
53
  "peerDependencies": {
54
- "@theholocron/cloudflare-client": "^1.38.0",
54
+ "@theholocron/cloudflare-client": "^1.39.0",
55
55
  "@theholocron/misc-utils": "^1.9.2",
56
- "@theholocron/cli": "5.0.0-alpha.123"
56
+ "@theholocron/cli": "5.0.0-alpha.125"
57
57
  },
58
58
  "peerDependenciesMeta": {
59
59
  "@theholocron/cloudflare-client": {}