@theholocron/holocron-plugin-cloudflare 5.0.0-alpha.351 → 5.0.0-alpha.353
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 +3 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -64,8 +64,9 @@ Any combination of capabilities can be enabled together:
|
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
The `deployment`, `workers` and `tunnels` capabilities are only exposed when `accountId`
|
|
67
|
-
is resolvable — either passed explicitly in options or set
|
|
68
|
-
`CLOUDFLARE_ACCOUNT_ID` env var
|
|
67
|
+
is resolvable — either passed explicitly in options or set as the
|
|
68
|
+
`CLOUDFLARE_ACCOUNT_ID` env var or in a `credentials` provider's Environment (the option wins, then the
|
|
69
|
+
environment, then the provider).
|
|
69
70
|
|
|
70
71
|
## `dns` capability
|
|
71
72
|
|
package/dist/index.d.mts
CHANGED
|
@@ -135,7 +135,7 @@ export interface CloudflarePluginOptions extends ResolveTokenInput {
|
|
|
135
135
|
}
|
|
136
136
|
/** The shared state the Cloudflare plugin's capabilities and probes are built from. */
|
|
137
137
|
export interface PluginContext {
|
|
138
|
-
/** The options the plugin was created with, with `accountId` falling back to `CLOUDFLARE_ACCOUNT_ID
|
|
138
|
+
/** The options the plugin was created with, with `accountId` falling back to `CLOUDFLARE_ACCOUNT_ID` in the environment, then in the `credentials` providers' variables. */
|
|
139
139
|
options: CloudflarePluginOptions;
|
|
140
140
|
/** Memoized client — the token is resolved on first use, not at plugin load. */
|
|
141
141
|
client: () => CloudflareClient;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthError, ProviderApiError, connectionProbe, createResolveToken } from "@theholocron/cli";
|
|
1
|
+
import { AuthError, ProviderApiError, connectionProbe, createResolveToken, resolveValue } from "@theholocron/cli";
|
|
2
2
|
import { createCloudflareClient } from "@theholocron/cloudflare-client";
|
|
3
3
|
import { errorMessage } from "@theholocron/misc-utils";
|
|
4
4
|
// src/auth.ts
|
|
@@ -402,7 +402,7 @@ async function verifyToken(token, opts = {}) {
|
|
|
402
402
|
// src/index.ts
|
|
403
403
|
/** Builds the plugin context from its options; the API token is resolved lazily on the first client use. */
|
|
404
404
|
function createContext(options = {}) {
|
|
405
|
-
const accountId = options.accountId ??
|
|
405
|
+
const accountId = options.accountId ?? resolveValue(["CLOUDFLARE_ACCOUNT_ID"], options.env);
|
|
406
406
|
const opts = {
|
|
407
407
|
...options,
|
|
408
408
|
accountId
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/holocron-plugin-cloudflare",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.353",
|
|
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",
|
|
@@ -41,19 +41,20 @@
|
|
|
41
41
|
"tsx": "4.23.15",
|
|
42
42
|
"typescript": "^5.9.3",
|
|
43
43
|
"vitest": "^5.0.5",
|
|
44
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
44
|
+
"@theholocron/cli": "5.0.0-alpha.353",
|
|
45
45
|
"@theholocron/cloudflare-client": "^1.58.0-alpha.11",
|
|
46
|
-
"@theholocron/eslint-config": "^8.9.0-alpha.8",
|
|
47
46
|
"@theholocron/http-client": "^1.58.0-alpha.11",
|
|
47
|
+
"@theholocron/kyber": "5.0.0-alpha.353",
|
|
48
48
|
"@theholocron/misc-utils": "^1.17.0-alpha.1",
|
|
49
|
+
"@theholocron/vitest-config": "^8.9.0-alpha.8",
|
|
49
50
|
"@theholocron/tsdown-config": "^8.9.0-alpha.8",
|
|
50
|
-
"@theholocron/
|
|
51
|
-
"@theholocron/
|
|
51
|
+
"@theholocron/eslint-config": "^8.9.0-alpha.8",
|
|
52
|
+
"@theholocron/tsconfig": "^8.9.0-alpha.8"
|
|
52
53
|
},
|
|
53
54
|
"peerDependencies": {
|
|
54
55
|
"@theholocron/cloudflare-client": "^1.53.1",
|
|
55
56
|
"@theholocron/misc-utils": "^1.16.0",
|
|
56
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
57
|
+
"@theholocron/cli": "5.0.0-alpha.353"
|
|
57
58
|
},
|
|
58
59
|
"peerDependenciesMeta": {
|
|
59
60
|
"@theholocron/cloudflare-client": {}
|