@theholocron/holocron-plugin-cloudflare 3.45.1 → 3.45.3

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 -1
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -312,6 +312,12 @@ async function verifyToken(token, opts = {}) {
312
312
  ok: true,
313
313
  subject: `token ${result.id} (${result.status})`
314
314
  };
315
+ } catch {}
316
+ try {
317
+ return {
318
+ ok: true,
319
+ subject: `zone: ${(await client.zones.list({ per_page: 1 }))[0]?.name ?? "unknown"}`
320
+ };
315
321
  } catch (err) {
316
322
  return {
317
323
  ok: false,
@@ -365,6 +371,6 @@ function createPlugin(options = {}) {
365
371
  }
366
372
  };
367
373
  }
368
- const AUTH_HINT = "create an API token at https://dash.cloudflare.com/profile/api-tokens with Zone:Read, DNS:Edit, and Cloudflare Pages:Edit permissions, then run: holocron auth set cloudflare <TOKEN>";
374
+ const AUTH_HINT = "create an API token at https://dash.cloudflare.com/profile/api-tokens with Zone:Read, DNS:Edit, Cloudflare Pages:Edit, Workers Scripts:Edit (account-level), and Workers Routes:Edit (zone-level) permissions, then run: holocron auth set cloudflare <TOKEN>";
369
375
  //#endregion
370
376
  export { AUTH_HINT, AuthError, CloudflareDeployment, CloudflareDns, CloudflareWorkers, createCloudflareClient, createContext, createPlugin, deployment, dns, resolveToken, verifyToken, workersCapability };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-cloudflare",
3
- "version": "3.45.1",
3
+ "version": "3.45.3",
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",
@@ -46,11 +46,11 @@
46
46
  "tsx": "4.23.12",
47
47
  "typescript": "^5.9.3",
48
48
  "vitest": "^4.1.10",
49
- "@theholocron/cli": "3.45.1"
49
+ "@theholocron/cli": "3.45.3"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@theholocron/cloudflare-client": "^1.12.0",
53
- "@theholocron/cli": "3.45.1"
53
+ "@theholocron/cli": "3.45.3"
54
54
  },
55
55
  "peerDependenciesMeta": {
56
56
  "@theholocron/cloudflare-client": {}