devflare 1.0.0-next.39 → 1.0.0-next.40
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/_chunks/account-BtWcv3X9.js +462 -0
- package/dist/_chunks/account-resources-CsmVowJp.js +159 -0
- package/dist/_chunks/ai-CBEuLdoP.js +322 -0
- package/dist/_chunks/api-TzdliH-6.js +568 -0
- package/dist/_chunks/build-3T6O4uIg.js +24 -0
- package/dist/_chunks/build-artifacts-8TqBSQkG.js +483 -0
- package/dist/_chunks/cli-BTF1X4SG.js +1128 -0
- package/dist/_chunks/cloudflare-BaloqI3H.js +157 -0
- package/dist/_chunks/colors-DiK6wPJ5.js +13 -0
- package/dist/_chunks/command-utils-BsfkmTqh.js +45 -0
- package/dist/_chunks/compiler-uoyAQ8zW.js +424 -0
- package/dist/_chunks/config-D5u-bEkn.js +78 -0
- package/dist/_chunks/config-path-DCPto4XB.js +42 -0
- package/dist/_chunks/context-CX50Y2Kb.js +2250 -0
- package/dist/_chunks/decorators-QmV57ixr.js +19 -0
- package/dist/_chunks/dependencies-C2oxFjU_.js +57 -0
- package/dist/_chunks/deploy-DMTr6JeR.js +915 -0
- package/dist/_chunks/dev-CvRHmRFZ.js +3456 -0
- package/dist/_chunks/doctor-DIG8DoFU.js +219 -0
- package/dist/_chunks/durable-object-DMtH0XYX.js +234 -0
- package/dist/_chunks/env-S0_nMVz1.js +125 -0
- package/dist/_chunks/family-DXC5SdFK.js +143 -0
- package/dist/_chunks/generated-artifacts-dMJY4KAt.js +32 -0
- package/dist/_chunks/glob-CmQOvunB.js +56 -0
- package/dist/_chunks/init-3moXTgpb.js +165 -0
- package/dist/_chunks/loader-DLXO60RO.js +1153 -0
- package/dist/_chunks/local-dev-vars-CTSa-wvF.js +81 -0
- package/dist/_chunks/local-hyperdrive-CJ90j46O.js +119 -0
- package/dist/_chunks/local-media-bindings-DsAW4AMF.js +335 -0
- package/dist/_chunks/local-secrets-DMmEOygL.js +123 -0
- package/dist/_chunks/local-workflow-entrypoints-Wip3o1u8.js +90 -0
- package/dist/_chunks/login-BmnDzDlH.js +51 -0
- package/dist/_chunks/package-metadata-DAuCkyvK.js +39 -0
- package/dist/_chunks/preferences-BKp_7XJx.js +241 -0
- package/dist/_chunks/preview-BhqDmq8I.js +456 -0
- package/dist/_chunks/preview-registry-ClAbLTHH.js +1186 -0
- package/dist/_chunks/preview-resources-DdXj8LMM.js +358 -0
- package/dist/_chunks/previews-Dlr13x5M.js +1134 -0
- package/dist/_chunks/productions-D3AnOHac.js +411 -0
- package/dist/_chunks/ref-CYJNAAe_.js +178 -0
- package/dist/_chunks/remote-CZnP-HLJ.js +79 -0
- package/dist/_chunks/remote-config-D39BY9ji.js +132 -0
- package/dist/_chunks/resolve-package-Y84HB3Nt.js +133 -0
- package/dist/_chunks/rolldown-runtime-CvQ6eiug.js +14 -0
- package/dist/_chunks/routes-C3FqES2W.js +796 -0
- package/dist/_chunks/runtime-FvXvfuZ2.js +550 -0
- package/dist/_chunks/schema-normalization-DWVleVxo.js +477 -0
- package/dist/_chunks/secrets-70eN0Q6C.js +95 -0
- package/dist/_chunks/token-kguIDmej.js +333 -0
- package/dist/_chunks/tokens-iVcgNXi-.js +221 -0
- package/dist/_chunks/types-OrLbzv4I.js +476 -0
- package/dist/_chunks/ui-BUoZApvE.js +103 -0
- package/dist/_chunks/usage-BBTGzjon.js +272 -0
- package/dist/_chunks/vite-CsI0E-uV.js +1235 -0
- package/dist/_chunks/vite-utils-OVLMV605.js +183 -0
- package/dist/_chunks/worker-CS1jgNFE.js +410 -0
- package/dist/_chunks/worker-bundler-dTTnYU3n.js +458 -0
- package/dist/_chunks/worker-entrypoint-CQW77lG8.js +247 -0
- package/dist/_chunks/workerName-CFJsLZA-.js +23 -0
- package/dist/bridge/index.d.ts +6 -6
- package/dist/bridge/miniflare.d.ts +2 -2
- package/dist/bridge/proxy.d.ts +1 -1
- package/dist/bridge/v2/body-streams.d.ts +1 -1
- package/dist/bridge/v2/codec.d.ts +4 -4
- package/dist/bridge/v2/index.d.ts +10 -10
- package/dist/bridge/v2/serialization.d.ts +1 -1
- package/dist/bridge/v2/value-codec.d.ts +1 -1
- package/dist/bridge/v2/value-serialization.d.ts.map +1 -1
- package/dist/bridge/v2/ws-relay.d.ts +3 -3
- package/dist/browser-shim/index.d.ts +2 -2
- package/dist/browser.d.ts +70 -70
- package/dist/browser.js +74 -2462
- package/dist/bundler/do-bundler.d.ts +1 -1
- package/dist/bundler/index.d.ts +3 -3
- package/dist/bundler/rolldown-shared.d.ts +1 -1
- package/dist/bundler/worker-bundler.d.ts +1 -1
- package/dist/cli/build-manifest.d.ts +1 -1
- package/dist/cli/command-utils.d.ts +1 -1
- package/dist/cli/commands/account.d.ts +1 -1
- package/dist/cli/commands/ai.d.ts +1 -1
- package/dist/cli/commands/build-artifacts.d.ts +5 -5
- package/dist/cli/commands/build.d.ts +1 -1
- package/dist/cli/commands/config.d.ts +1 -1
- package/dist/cli/commands/deploy/prepare.d.ts +2 -2
- package/dist/cli/commands/deploy/runtime.d.ts +1 -1
- package/dist/cli/commands/deploy/verification.d.ts +1 -1
- package/dist/cli/commands/deploy.d.ts +1 -1
- package/dist/cli/commands/dev.d.ts +1 -1
- package/dist/cli/commands/doctor.d.ts +1 -1
- package/dist/cli/commands/init.d.ts +1 -1
- package/dist/cli/commands/login.d.ts +1 -1
- package/dist/cli/commands/previews-support/cleanup.d.ts +1 -1
- package/dist/cli/commands/previews-support/family.d.ts +3 -3
- package/dist/cli/commands/previews-support/render.d.ts +3 -3
- package/dist/cli/commands/previews-support/theme.d.ts +2 -2
- package/dist/cli/commands/previews-support/types.d.ts +2 -2
- package/dist/cli/commands/previews.d.ts +1 -1
- package/dist/cli/commands/productions.d.ts +1 -1
- package/dist/cli/commands/remote.d.ts +1 -1
- package/dist/cli/commands/secrets.d.ts +1 -1
- package/dist/cli/commands/token.d.ts +1 -1
- package/dist/cli/commands/type-generation/discovery.d.ts +2 -2
- package/dist/cli/commands/type-generation/generator.d.ts +3 -3
- package/dist/cli/commands/type-generation/models.d.ts +1 -1
- package/dist/cli/commands/types.d.ts +1 -1
- package/dist/cli/commands/worker.d.ts +1 -1
- package/dist/cli/deploy-strategy.d.ts +1 -1
- package/dist/cli/deploy-target.d.ts +1 -1
- package/dist/cli/help-pages/pages/account.d.ts +1 -1
- package/dist/cli/help-pages/pages/core.d.ts +1 -1
- package/dist/cli/help-pages/pages/index.d.ts +1 -1
- package/dist/cli/help-pages/pages/misc.d.ts +1 -1
- package/dist/cli/help-pages/pages/previews.d.ts +1 -1
- package/dist/cli/help-pages/pages/productions.d.ts +1 -1
- package/dist/cli/help-pages/render.d.ts +2 -2
- package/dist/cli/help-pages/shared.d.ts +1 -1
- package/dist/cli/help.d.ts +2 -2
- package/dist/cli/index.js +2 -1383
- package/dist/cli/preview-bindings.d.ts +3 -3
- package/dist/cli/preview.d.ts +1 -1
- package/dist/cli/wrangler-auth.d.ts +1 -1
- package/dist/cloudflare/account-core.d.ts +2 -2
- package/dist/cloudflare/account-resources.d.ts +2 -2
- package/dist/cloudflare/account-status.d.ts +1 -1
- package/dist/cloudflare/account-workers.d.ts +2 -2
- package/dist/cloudflare/account.d.ts +7 -7
- package/dist/cloudflare/auth.d.ts +1 -1
- package/dist/cloudflare/index.d.ts +13 -13
- package/dist/cloudflare/index.js +4 -59
- package/dist/cloudflare/kv-namespace.d.ts +1 -1
- package/dist/cloudflare/preview-registry-cache.d.ts +1 -1
- package/dist/cloudflare/preview-registry-inference.d.ts +2 -2
- package/dist/cloudflare/preview-registry-records.d.ts +3 -3
- package/dist/cloudflare/preview-registry-shape.d.ts +2 -2
- package/dist/cloudflare/preview-registry-store.d.ts +3 -3
- package/dist/cloudflare/preview-registry-transport.d.ts +2 -2
- package/dist/cloudflare/preview-registry-types.d.ts +2 -2
- package/dist/cloudflare/preview-registry.d.ts +5 -5
- package/dist/cloudflare/tokens.d.ts +2 -2
- package/dist/cloudflare/usage.d.ts +2 -2
- package/dist/config/binding-resolution-helpers.d.ts +1 -1
- package/dist/config/compiler/bindings.d.ts +2 -2
- package/dist/config/compiler/core-helpers.d.ts +2 -2
- package/dist/config/compiler/do-workers.d.ts +2 -2
- package/dist/config/compiler/paths.d.ts +1 -1
- package/dist/config/compiler.d.ts +6 -6
- package/dist/config/define.d.ts +2 -2
- package/dist/config/deploy-resources.d.ts +5 -5
- package/dist/config/env-vars.d.ts +1 -1
- package/dist/config/framework-providers.d.ts +1 -1
- package/dist/config/index.d.ts +12 -12
- package/dist/config/loader.d.ts +2 -2
- package/dist/config/local-dev-vars.d.ts +1 -1
- package/dist/config/preview-resources.d.ts +4 -4
- package/dist/config/preview.d.ts +1 -1
- package/dist/config/ref.d.ts +2 -2
- package/dist/config/resolve-phased.d.ts +4 -4
- package/dist/config/resolve.d.ts +1 -1
- package/dist/config/resource-resolution.d.ts +6 -6
- package/dist/config/schema-env.d.ts +20 -20
- package/dist/config/schema-normalization.d.ts +1 -1
- package/dist/config/schema-types-bindings.d.ts +4 -4
- package/dist/config/schema-types-build.d.ts +1 -1
- package/dist/config/schema-types.d.ts +7 -7
- package/dist/config/schema.d.ts +46 -46
- package/dist/config/service-bindings-validation.d.ts +1 -1
- package/dist/config-entry.d.ts +6 -6
- package/dist/config-entry.js +3 -8
- package/dist/decorators/index.d.ts +2 -2
- package/dist/decorators/index.js +2 -9
- package/dist/dev-server/d1-migrations.d.ts +1 -1
- package/dist/dev-server/dev-server-state.d.ts +6 -6
- package/dist/dev-server/gateway-script.d.ts +1 -1
- package/dist/dev-server/index.d.ts +1 -1
- package/dist/dev-server/miniflare-bindings.d.ts +1 -1
- package/dist/dev-server/miniflare-dev-config.d.ts +5 -5
- package/dist/dev-server/miniflare-worker-config.d.ts +3 -3
- package/dist/dev-server/server-startup-helpers.d.ts +6 -6
- package/dist/dev-server/worker-surface-paths.d.ts +2 -2
- package/dist/index.d.ts +8 -8
- package/dist/index.js +9 -22
- package/dist/runtime/context-events.d.ts +1 -1
- package/dist/runtime/context.d.ts +3 -3
- package/dist/runtime/exports.d.ts +2 -2
- package/dist/runtime/index.d.ts +10 -10
- package/dist/runtime/index.js +5 -57
- package/dist/runtime/middleware.d.ts +1 -1
- package/dist/runtime/router/index.d.ts +3 -3
- package/dist/runtime/validation.d.ts +1 -1
- package/dist/secrets/local-secrets.d.ts +1 -1
- package/dist/shims/local-media-bindings.d.ts +1 -1
- package/dist/sveltekit/index.d.ts +1 -1
- package/dist/sveltekit/index.js +327 -9
- package/dist/sveltekit/local-bindings.d.ts +1 -1
- package/dist/sveltekit/platform.d.ts +1 -1
- package/dist/test/binding-hints.d.ts +2 -2
- package/dist/test/cf.d.ts +19 -19
- package/dist/test/index.d.ts +18 -18
- package/dist/test/index.js +4495 -46
- package/dist/test/offline-bindings.d.ts +3 -3
- package/dist/test/resolve-service-bindings.d.ts +1 -1
- package/dist/test/simple-context-bindings.d.ts +1 -1
- package/dist/test/simple-context-durable-objects.d.ts +1 -1
- package/dist/test/simple-context-env.d.ts +2 -2
- package/dist/test/simple-context-handlers.d.ts +2 -2
- package/dist/test/simple-context-lifecycle.d.ts +2 -2
- package/dist/test/simple-context-mfconfig.d.ts +1 -1
- package/dist/test/simple-context-multi-worker.d.ts +2 -2
- package/dist/test/simple-context-runtime.d.ts +1 -1
- package/dist/test/simple-context-startup.d.ts +1 -1
- package/dist/test/simple-context.d.ts +1 -1
- package/dist/test/utilities/env.d.ts +3 -3
- package/dist/test/utilities.d.ts +10 -10
- package/dist/test/worker.d.ts +1 -1
- package/dist/transform/index.d.ts +2 -2
- package/dist/utils/send-email.js +163 -19
- package/dist/vite/config-file.d.ts +2 -2
- package/dist/vite/index.d.ts +3 -3
- package/dist/vite/index.js +2 -31
- package/dist/vite/plugin-config-hook.d.ts +1 -1
- package/dist/vite/plugin-context.d.ts +3 -3
- package/dist/vite/plugin-durable-objects.d.ts +2 -2
- package/dist/vite/plugin-programmatic.d.ts +1 -1
- package/dist/vite/plugin-service-bindings.d.ts +2 -2
- package/dist/vite/plugin.d.ts +3 -3
- package/dist/worker-entry/composed-worker.d.ts +1 -1
- package/dist/worker-entry/routes.d.ts +2 -2
- package/dist/worker-entry/surface-paths.d.ts +1 -1
- package/dist/workflows/local-workflow-entrypoints.d.ts +1 -1
- package/package.json +5 -3
- package/dist/account-4tgh03a8.js +0 -484
- package/dist/ai-r3zqmxan.js +0 -261
- package/dist/api-6z01z734.js +0 -33
- package/dist/build-kw625v84.js +0 -51
- package/dist/config-ghk2bxj3.js +0 -102
- package/dist/deploy-9kee65n9.js +0 -1062
- package/dist/dev-x8zr249a.js +0 -3569
- package/dist/doctor-0ng5qrr1.js +0 -258
- package/dist/durable-object-0ybmg08a.js +0 -13
- package/dist/index-04wh9bxx.js +0 -514
- package/dist/index-0cc05hzv.js +0 -74
- package/dist/index-2yv7w548.js +0 -185
- package/dist/index-37x76zdn.js +0 -4
- package/dist/index-3cpzsr47.js +0 -125
- package/dist/index-3t6rypgc.js +0 -13
- package/dist/index-4mmpccrb.js +0 -309
- package/dist/index-5dkjffqz.js +0 -25
- package/dist/index-5hy7jmv3.js +0 -890
- package/dist/index-627srx16.js +0 -45
- package/dist/index-7m557715.js +0 -283
- package/dist/index-a8pnvg3r.js +0 -52
- package/dist/index-aabgympv.js +0 -39
- package/dist/index-atwc3csp.js +0 -256
- package/dist/index-cv4cvrxe.js +0 -2046
- package/dist/index-h7r11y4a.js +0 -539
- package/dist/index-hvtd936d.js +0 -1229
- package/dist/index-kcp7y951.js +0 -136
- package/dist/index-maw0jjnn.js +0 -147
- package/dist/index-mek9msfv.js +0 -705
- package/dist/index-n4xkaymm.js +0 -236
- package/dist/index-nkk59p3y.js +0 -579
- package/dist/index-phcrvs6d.js +0 -342
- package/dist/index-se4kw8tm.js +0 -460
- package/dist/index-x8s9rwfh.js +0 -2020
- package/dist/index-y7w3x9p1.js +0 -18
- package/dist/index-z9gy8w6b.js +0 -57
- package/dist/index-zdd0d9qa.js +0 -199
- package/dist/init-tb8jqgvr.js +0 -180
- package/dist/login-4h1sfsed.js +0 -75
- package/dist/previews-qr7c5j8h.js +0 -1336
- package/dist/productions-xpmd6bw8.js +0 -505
- package/dist/remote-kqcvhnfx.js +0 -192
- package/dist/secrets-6wbdsdek.js +0 -89
- package/dist/token-yp1qa70y.js +0 -419
- package/dist/types-15yv4cj3.js +0 -701
- package/dist/worker-1yg72jxg.js +0 -510
- package/dist/worker-entrypoint-y8s9kdcx.js +0 -15
package/dist/index-04wh9bxx.js
DELETED
|
@@ -1,514 +0,0 @@
|
|
|
1
|
-
// src/cloudflare/auth.ts
|
|
2
|
-
import { execSync } from "node:child_process";
|
|
3
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
4
|
-
import { homedir } from "node:os";
|
|
5
|
-
import { join } from "node:path";
|
|
6
|
-
import { parse as parseToml } from "smol-toml";
|
|
7
|
-
var WRANGLER_CONFIG_FILE = "config/default.toml";
|
|
8
|
-
var EXPIRY_BUFFER_MS = 5 * 60 * 1000;
|
|
9
|
-
var cachedToken = null;
|
|
10
|
-
var cacheExpiresAt = 0;
|
|
11
|
-
function invalidateToken() {
|
|
12
|
-
cachedToken = null;
|
|
13
|
-
cacheExpiresAt = 0;
|
|
14
|
-
}
|
|
15
|
-
function getWranglerConfigPaths() {
|
|
16
|
-
const paths = [];
|
|
17
|
-
if (process.platform === "win32" && process.env.APPDATA) {
|
|
18
|
-
paths.push(join(process.env.APPDATA, "xdg.config", ".wrangler", WRANGLER_CONFIG_FILE));
|
|
19
|
-
}
|
|
20
|
-
if (process.env.XDG_CONFIG_HOME) {
|
|
21
|
-
paths.push(join(process.env.XDG_CONFIG_HOME, ".wrangler", WRANGLER_CONFIG_FILE));
|
|
22
|
-
}
|
|
23
|
-
paths.push(join(homedir(), ".wrangler", WRANGLER_CONFIG_FILE));
|
|
24
|
-
return paths;
|
|
25
|
-
}
|
|
26
|
-
function getWranglerConfigPath() {
|
|
27
|
-
const paths = getWranglerConfigPaths();
|
|
28
|
-
for (const path of paths) {
|
|
29
|
-
if (existsSync(path)) {
|
|
30
|
-
return path;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
function hasWranglerConfig() {
|
|
36
|
-
return getWranglerConfigPath() !== null;
|
|
37
|
-
}
|
|
38
|
-
function parseSimpleToml(content) {
|
|
39
|
-
let parsed;
|
|
40
|
-
try {
|
|
41
|
-
parsed = parseToml(content);
|
|
42
|
-
} catch {
|
|
43
|
-
return {};
|
|
44
|
-
}
|
|
45
|
-
const result = {};
|
|
46
|
-
for (const [key, value] of Object.entries(parsed)) {
|
|
47
|
-
if (typeof value === "string") {
|
|
48
|
-
result[key] = value;
|
|
49
|
-
} else if (typeof value === "number" || typeof value === "boolean") {
|
|
50
|
-
result[key] = String(value);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return result;
|
|
54
|
-
}
|
|
55
|
-
function readWranglerConfig() {
|
|
56
|
-
const configPath = getWranglerConfigPath();
|
|
57
|
-
if (!configPath || !existsSync(configPath)) {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
try {
|
|
61
|
-
const content = readFileSync(configPath, "utf-8");
|
|
62
|
-
const config = parseSimpleToml(content);
|
|
63
|
-
const token = config.oauth_token;
|
|
64
|
-
const expirationTime = config.expiration_time;
|
|
65
|
-
if (token && expirationTime) {
|
|
66
|
-
return {
|
|
67
|
-
token,
|
|
68
|
-
expiresAt: new Date(expirationTime)
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
return null;
|
|
72
|
-
} catch {
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
async function getWranglerAuth() {
|
|
77
|
-
const config = readWranglerConfig();
|
|
78
|
-
if (!config)
|
|
79
|
-
return null;
|
|
80
|
-
const configPath = getWranglerConfigPath();
|
|
81
|
-
if (!configPath)
|
|
82
|
-
return null;
|
|
83
|
-
try {
|
|
84
|
-
const content = readFileSync(configPath, "utf-8");
|
|
85
|
-
const parsed = parseSimpleToml(content);
|
|
86
|
-
return {
|
|
87
|
-
oauthToken: parsed.oauth_token,
|
|
88
|
-
refreshToken: parsed.refresh_token,
|
|
89
|
-
expiresAt: config.expiresAt
|
|
90
|
-
};
|
|
91
|
-
} catch {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
function refreshWranglerToken() {
|
|
96
|
-
try {
|
|
97
|
-
const result = execSync("bunx wrangler auth token", {
|
|
98
|
-
encoding: "utf-8",
|
|
99
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
100
|
-
timeout: 15000
|
|
101
|
-
});
|
|
102
|
-
const lines = result.trim().split(/\r?\n/).filter((l) => l.trim().length > 0);
|
|
103
|
-
const token = lines[lines.length - 1]?.trim();
|
|
104
|
-
if (token && token.length >= 20 && !token.includes("wrangler") && !token.includes("⛅")) {
|
|
105
|
-
return token;
|
|
106
|
-
}
|
|
107
|
-
return null;
|
|
108
|
-
} catch {
|
|
109
|
-
return null;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
async function getApiToken(forceRefresh = false) {
|
|
113
|
-
if (!forceRefresh && cachedToken && Date.now() < cacheExpiresAt) {
|
|
114
|
-
return cachedToken;
|
|
115
|
-
}
|
|
116
|
-
const envToken = process.env.CLOUDFLARE_API_TOKEN;
|
|
117
|
-
if (envToken) {
|
|
118
|
-
return envToken;
|
|
119
|
-
}
|
|
120
|
-
if (!forceRefresh) {
|
|
121
|
-
const config = readWranglerConfig();
|
|
122
|
-
if (config) {
|
|
123
|
-
const now = Date.now();
|
|
124
|
-
const expiresAt = config.expiresAt.getTime();
|
|
125
|
-
if (now < expiresAt - EXPIRY_BUFFER_MS) {
|
|
126
|
-
cachedToken = config.token;
|
|
127
|
-
cacheExpiresAt = expiresAt - EXPIRY_BUFFER_MS;
|
|
128
|
-
return config.token;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
const refreshedToken = refreshWranglerToken();
|
|
133
|
-
if (refreshedToken) {
|
|
134
|
-
cachedToken = refreshedToken;
|
|
135
|
-
cacheExpiresAt = Date.now() + EXPIRY_BUFFER_MS;
|
|
136
|
-
return refreshedToken;
|
|
137
|
-
}
|
|
138
|
-
return null;
|
|
139
|
-
}
|
|
140
|
-
async function isAuthenticated() {
|
|
141
|
-
const token = await getApiToken();
|
|
142
|
-
return token !== null;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// src/cloudflare/api.ts
|
|
146
|
-
var API_BASE = "https://api.cloudflare.com/client/v4";
|
|
147
|
-
var DEFAULT_TIMEOUT = 1e4;
|
|
148
|
-
|
|
149
|
-
class CloudflareAPIError extends Error {
|
|
150
|
-
code;
|
|
151
|
-
errors;
|
|
152
|
-
constructor(message, code, errors) {
|
|
153
|
-
super(message);
|
|
154
|
-
this.code = code;
|
|
155
|
-
this.errors = errors;
|
|
156
|
-
this.name = "CloudflareAPIError";
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
class AuthenticationError extends Error {
|
|
161
|
-
constructor(message = "Not authenticated. Run: devflare login") {
|
|
162
|
-
super(message);
|
|
163
|
-
this.name = "AuthenticationError";
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
async function fetchWithTimeout(url, init, timeoutMs) {
|
|
167
|
-
const controller = new AbortController;
|
|
168
|
-
const abortTimeoutId = setTimeout(() => controller.abort(), timeoutMs);
|
|
169
|
-
let rejectTimeoutId = null;
|
|
170
|
-
const timeoutPromise = new Promise((_, reject) => {
|
|
171
|
-
rejectTimeoutId = setTimeout(() => reject(new Error(`Request timed out after ${timeoutMs}ms`)), timeoutMs);
|
|
172
|
-
});
|
|
173
|
-
try {
|
|
174
|
-
const response = await Promise.race([
|
|
175
|
-
fetch(url, { ...init, signal: controller.signal }),
|
|
176
|
-
timeoutPromise
|
|
177
|
-
]);
|
|
178
|
-
return response;
|
|
179
|
-
} finally {
|
|
180
|
-
clearTimeout(abortTimeoutId);
|
|
181
|
-
if (rejectTimeoutId) {
|
|
182
|
-
clearTimeout(rejectTimeoutId);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
function tryParseJson(text) {
|
|
187
|
-
if (text.length === 0)
|
|
188
|
-
return { ok: false };
|
|
189
|
-
try {
|
|
190
|
-
return { ok: true, value: JSON.parse(text) };
|
|
191
|
-
} catch {
|
|
192
|
-
return { ok: false };
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
function isEnvelopeShape(value) {
|
|
196
|
-
if (!value || typeof value !== "object")
|
|
197
|
-
return false;
|
|
198
|
-
const record = value;
|
|
199
|
-
return typeof record.success === "boolean" && Array.isArray(record.errors) && Array.isArray(record.messages) && "result" in record;
|
|
200
|
-
}
|
|
201
|
-
function coerceBareResultEnvelope(value, response) {
|
|
202
|
-
if (!response.ok)
|
|
203
|
-
return null;
|
|
204
|
-
if (!value || typeof value !== "object")
|
|
205
|
-
return null;
|
|
206
|
-
const record = value;
|
|
207
|
-
if (!("result" in record))
|
|
208
|
-
return null;
|
|
209
|
-
return {
|
|
210
|
-
success: true,
|
|
211
|
-
errors: [],
|
|
212
|
-
messages: [],
|
|
213
|
-
result: record.result,
|
|
214
|
-
...record.result_info && typeof record.result_info === "object" ? { result_info: record.result_info } : {}
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
function envelopeFailureError(response, envelope, endpoint) {
|
|
218
|
-
const first = envelope.errors[0];
|
|
219
|
-
const message = first ? `Cloudflare ${endpoint} failed (${first.code}): ${first.message}` : `Cloudflare ${endpoint} failed`;
|
|
220
|
-
return new CloudflareAPIError(message, response.status, envelope.errors);
|
|
221
|
-
}
|
|
222
|
-
async function decodeCloudflareEnvelope(response, opts) {
|
|
223
|
-
if (opts.allow404 === true && response.status === 404) {
|
|
224
|
-
return null;
|
|
225
|
-
}
|
|
226
|
-
const text = await response.text();
|
|
227
|
-
const parsed = tryParseJson(text);
|
|
228
|
-
if (!parsed.ok) {
|
|
229
|
-
throw new CloudflareAPIError(`Cloudflare API returned an invalid JSON response. Body: ${truncateBody(text)}`, response.status, []);
|
|
230
|
-
}
|
|
231
|
-
if (!isEnvelopeShape(parsed.value)) {
|
|
232
|
-
const coerced = coerceBareResultEnvelope(parsed.value, response);
|
|
233
|
-
if (coerced) {
|
|
234
|
-
return coerced;
|
|
235
|
-
}
|
|
236
|
-
throw new CloudflareAPIError(`Cloudflare ${opts.endpoint} returned a non-envelope JSON response. Body: ${truncateBody(text)}`, response.status, []);
|
|
237
|
-
}
|
|
238
|
-
return parsed.value;
|
|
239
|
-
}
|
|
240
|
-
function truncateBody(text, max = 500) {
|
|
241
|
-
const trimmed = text.trim();
|
|
242
|
-
if (trimmed.length <= max)
|
|
243
|
-
return trimmed;
|
|
244
|
-
return `${trimmed.slice(0, max)}…[truncated, total ${trimmed.length} chars]`;
|
|
245
|
-
}
|
|
246
|
-
async function parseCloudflareEnvelope(response, opts) {
|
|
247
|
-
const envelope = await decodeCloudflareEnvelope(response, opts);
|
|
248
|
-
if (envelope === null) {
|
|
249
|
-
return null;
|
|
250
|
-
}
|
|
251
|
-
if (!envelope.success) {
|
|
252
|
-
throw envelopeFailureError(response, envelope, opts.endpoint);
|
|
253
|
-
}
|
|
254
|
-
return envelope.result;
|
|
255
|
-
}
|
|
256
|
-
async function parseRawJson(response, opts) {
|
|
257
|
-
const text = await response.text();
|
|
258
|
-
const parsed = tryParseJson(text);
|
|
259
|
-
if (!parsed.ok) {
|
|
260
|
-
throw new CloudflareAPIError(`Cloudflare ${opts.endpoint} returned an invalid JSON response.`, response.status, []);
|
|
261
|
-
}
|
|
262
|
-
return parsed.value;
|
|
263
|
-
}
|
|
264
|
-
function createCloudflareAuthSession(opts = {}) {
|
|
265
|
-
const provider = opts.tokenProvider ?? ((forceRefresh) => getApiToken(forceRefresh));
|
|
266
|
-
const onInvalidate = opts.onInvalidate ?? invalidateToken;
|
|
267
|
-
return {
|
|
268
|
-
async getAuthHeader(forceRefresh = false) {
|
|
269
|
-
const token = await provider(forceRefresh);
|
|
270
|
-
if (!token) {
|
|
271
|
-
throw new AuthenticationError;
|
|
272
|
-
}
|
|
273
|
-
return `Bearer ${token}`;
|
|
274
|
-
},
|
|
275
|
-
invalidate() {
|
|
276
|
-
onInvalidate();
|
|
277
|
-
}
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
var defaultAuthSession = createCloudflareAuthSession({});
|
|
281
|
-
async function resolveAuthHeader(options, forceRefresh = false) {
|
|
282
|
-
if (options?.token) {
|
|
283
|
-
return `Bearer ${options.token}`;
|
|
284
|
-
}
|
|
285
|
-
return defaultAuthSession.getAuthHeader(forceRefresh);
|
|
286
|
-
}
|
|
287
|
-
function isAuthError(response, envelope) {
|
|
288
|
-
if (response.status === 401)
|
|
289
|
-
return true;
|
|
290
|
-
if (!envelope.success && envelope.errors?.some((e) => e.code === 1e4 || e.message?.toLowerCase().includes("authentication") || e.message?.toLowerCase().includes("token"))) {
|
|
291
|
-
return true;
|
|
292
|
-
}
|
|
293
|
-
return false;
|
|
294
|
-
}
|
|
295
|
-
var RETRYABLE_STATUS = new Set([408, 425, 429, 500, 502, 503, 504]);
|
|
296
|
-
var RETRY_BASE_DELAY_MS = 250;
|
|
297
|
-
var RETRY_MAX_ATTEMPTS = 4;
|
|
298
|
-
function shouldRetryResponse(response) {
|
|
299
|
-
return RETRYABLE_STATUS.has(response.status);
|
|
300
|
-
}
|
|
301
|
-
function backoffDelayMs(attempt, retryAfterHeader) {
|
|
302
|
-
if (retryAfterHeader) {
|
|
303
|
-
const parsed = Number(retryAfterHeader);
|
|
304
|
-
if (Number.isFinite(parsed) && parsed > 0) {
|
|
305
|
-
return Math.min(parsed * 1000, 1e4);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
const base = RETRY_BASE_DELAY_MS * 2 ** attempt;
|
|
309
|
-
const jitter = Math.random() * RETRY_BASE_DELAY_MS;
|
|
310
|
-
return Math.min(base + jitter, 1e4);
|
|
311
|
-
}
|
|
312
|
-
async function requestCloudflareJson(path, request, options) {
|
|
313
|
-
const endpoint = `${request.method} ${path}`;
|
|
314
|
-
const makeRequest = async (forceRefresh) => {
|
|
315
|
-
const authorization = await resolveAuthHeader(options, forceRefresh);
|
|
316
|
-
const headers = new Headers({
|
|
317
|
-
Authorization: authorization,
|
|
318
|
-
"Content-Type": "application/json"
|
|
319
|
-
});
|
|
320
|
-
const response = await fetchWithTimeout(`${API_BASE}${path}`, {
|
|
321
|
-
method: request.method,
|
|
322
|
-
headers,
|
|
323
|
-
...request.body !== undefined ? { body: JSON.stringify(request.body) } : {}
|
|
324
|
-
}, options?.timeout ?? DEFAULT_TIMEOUT);
|
|
325
|
-
const envelope = await decodeCloudflareEnvelope(response, { endpoint });
|
|
326
|
-
return { response, envelope };
|
|
327
|
-
};
|
|
328
|
-
let result = null;
|
|
329
|
-
let lastError = null;
|
|
330
|
-
for (let attempt = 0;attempt < RETRY_MAX_ATTEMPTS; attempt++) {
|
|
331
|
-
try {
|
|
332
|
-
result = await makeRequest(false);
|
|
333
|
-
} catch (error) {
|
|
334
|
-
lastError = error;
|
|
335
|
-
if (attempt < RETRY_MAX_ATTEMPTS - 1) {
|
|
336
|
-
await new Promise((r) => setTimeout(r, backoffDelayMs(attempt, null)));
|
|
337
|
-
continue;
|
|
338
|
-
}
|
|
339
|
-
throw error;
|
|
340
|
-
}
|
|
341
|
-
const current = result;
|
|
342
|
-
if (!shouldRetryResponse(current.response) || attempt === RETRY_MAX_ATTEMPTS - 1) {
|
|
343
|
-
break;
|
|
344
|
-
}
|
|
345
|
-
await new Promise((r) => setTimeout(r, backoffDelayMs(attempt, current.response.headers.get("retry-after"))));
|
|
346
|
-
}
|
|
347
|
-
if (!result) {
|
|
348
|
-
throw lastError ?? new Error(`Cloudflare API request failed: ${endpoint}`);
|
|
349
|
-
}
|
|
350
|
-
if (request.allowAuthRetry === true && isAuthError(result.response, result.envelope) && !options?.token) {
|
|
351
|
-
defaultAuthSession.invalidate();
|
|
352
|
-
result = await makeRequest(true);
|
|
353
|
-
}
|
|
354
|
-
return result;
|
|
355
|
-
}
|
|
356
|
-
async function requestCloudflareResult(path, request, options) {
|
|
357
|
-
const { response, envelope } = await requestCloudflareJson(path, request, options);
|
|
358
|
-
if (!envelope.success) {
|
|
359
|
-
throw envelopeFailureError(response, envelope, `${request.method} ${path}`);
|
|
360
|
-
}
|
|
361
|
-
return envelope.result;
|
|
362
|
-
}
|
|
363
|
-
async function apiGet(path, options) {
|
|
364
|
-
return requestCloudflareResult(path, {
|
|
365
|
-
method: "GET",
|
|
366
|
-
allowAuthRetry: true
|
|
367
|
-
}, options);
|
|
368
|
-
}
|
|
369
|
-
async function apiPost(path, body, options) {
|
|
370
|
-
return requestCloudflareResult(path, {
|
|
371
|
-
method: "POST",
|
|
372
|
-
body
|
|
373
|
-
}, options);
|
|
374
|
-
}
|
|
375
|
-
async function apiPut(path, body, options) {
|
|
376
|
-
return requestCloudflareResult(path, {
|
|
377
|
-
method: "PUT",
|
|
378
|
-
body
|
|
379
|
-
}, options);
|
|
380
|
-
}
|
|
381
|
-
async function apiPatch(path, body, options) {
|
|
382
|
-
return requestCloudflareResult(path, {
|
|
383
|
-
method: "PATCH",
|
|
384
|
-
body
|
|
385
|
-
}, options);
|
|
386
|
-
}
|
|
387
|
-
async function apiDelete(path, options) {
|
|
388
|
-
return requestCloudflareResult(path, {
|
|
389
|
-
method: "DELETE"
|
|
390
|
-
}, options);
|
|
391
|
-
}
|
|
392
|
-
var DEFAULT_PAGINATION_MAX_PAGES = 500;
|
|
393
|
-
var DEFAULT_PAGINATION_PAGE_SIZE = 50;
|
|
394
|
-
async function apiGetAll(path, options) {
|
|
395
|
-
const results = [];
|
|
396
|
-
let page = 1;
|
|
397
|
-
let cursor;
|
|
398
|
-
const perPage = options?.pageSize ?? DEFAULT_PAGINATION_PAGE_SIZE;
|
|
399
|
-
const maxPages = options?.maxPages ?? DEFAULT_PAGINATION_MAX_PAGES;
|
|
400
|
-
const seenCursors = new Set;
|
|
401
|
-
const extractPaginatedItems = (result) => {
|
|
402
|
-
if (Array.isArray(result)) {
|
|
403
|
-
return result;
|
|
404
|
-
}
|
|
405
|
-
if (!result || typeof result !== "object") {
|
|
406
|
-
throw new Error("Expected paginated Cloudflare API result to be an array or an object containing an array.");
|
|
407
|
-
}
|
|
408
|
-
const arrayEntries = Object.entries(result).filter(([, value]) => Array.isArray(value));
|
|
409
|
-
if (arrayEntries.length !== 1) {
|
|
410
|
-
throw new Error("Expected paginated Cloudflare API result object to contain exactly one array property.");
|
|
411
|
-
}
|
|
412
|
-
return arrayEntries[0][1];
|
|
413
|
-
};
|
|
414
|
-
while (page <= maxPages) {
|
|
415
|
-
const separator = path.includes("?") ? "&" : "?";
|
|
416
|
-
const pagedPath = cursor ? `${path}${separator}cursor=${encodeURIComponent(cursor)}&per_page=${perPage}` : `${path}${separator}page=${page}&per_page=${perPage}`;
|
|
417
|
-
const { response, envelope } = await requestCloudflareJson(pagedPath, {
|
|
418
|
-
method: "GET",
|
|
419
|
-
allowAuthRetry: true
|
|
420
|
-
}, options);
|
|
421
|
-
if (!envelope.success) {
|
|
422
|
-
throw envelopeFailureError(response, envelope, `GET ${pagedPath}`);
|
|
423
|
-
}
|
|
424
|
-
const pageResults = extractPaginatedItems(envelope.result);
|
|
425
|
-
results.push(...pageResults);
|
|
426
|
-
if (!envelope.result_info) {
|
|
427
|
-
break;
|
|
428
|
-
}
|
|
429
|
-
if (pageResults.length === 0) {
|
|
430
|
-
break;
|
|
431
|
-
}
|
|
432
|
-
const nextCursor = envelope.result_info.cursor?.trim();
|
|
433
|
-
if (nextCursor) {
|
|
434
|
-
if (seenCursors.has(nextCursor)) {
|
|
435
|
-
break;
|
|
436
|
-
}
|
|
437
|
-
seenCursors.add(nextCursor);
|
|
438
|
-
cursor = nextCursor;
|
|
439
|
-
continue;
|
|
440
|
-
}
|
|
441
|
-
if (cursor) {
|
|
442
|
-
break;
|
|
443
|
-
}
|
|
444
|
-
if (envelope.result_info.total_count !== undefined) {
|
|
445
|
-
if (results.length >= envelope.result_info.total_count) {
|
|
446
|
-
break;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
if (envelope.result_info.total_pages !== undefined) {
|
|
450
|
-
if (page >= envelope.result_info.total_pages) {
|
|
451
|
-
break;
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
page++;
|
|
455
|
-
}
|
|
456
|
-
if (page > maxPages) {
|
|
457
|
-
const lastPageLikelyFull = results.length % perPage === 0 && results.length > 0;
|
|
458
|
-
if (lastPageLikelyFull) {
|
|
459
|
-
console.warn(`[devflare] apiGetAll capped at ${maxPages} pages for ${path}. Results may be truncated; pass { maxPages } to raise the cap.`);
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
return results;
|
|
463
|
-
}
|
|
464
|
-
async function requestKVValue(accountId, namespaceId, key, request, options) {
|
|
465
|
-
const authorization = await resolveAuthHeader(options);
|
|
466
|
-
const encodedKey = encodeURIComponent(key);
|
|
467
|
-
const url = `${API_BASE}/accounts/${accountId}/storage/kv/namespaces/${namespaceId}/values/${encodedKey}`;
|
|
468
|
-
return fetchWithTimeout(url, {
|
|
469
|
-
method: request.method,
|
|
470
|
-
headers: {
|
|
471
|
-
Authorization: authorization,
|
|
472
|
-
...request.method === "PUT" ? { "Content-Type": "text/plain" } : {}
|
|
473
|
-
},
|
|
474
|
-
...request.method === "PUT" ? { body: request.value } : {}
|
|
475
|
-
}, options?.timeout ?? DEFAULT_TIMEOUT);
|
|
476
|
-
}
|
|
477
|
-
async function throwKVValueError(response, endpoint) {
|
|
478
|
-
await parseCloudflareEnvelope(response, { endpoint });
|
|
479
|
-
throw new CloudflareAPIError(`Cloudflare ${endpoint} failed`, response.status, []);
|
|
480
|
-
}
|
|
481
|
-
async function kvGet(accountId, namespaceId, key, options) {
|
|
482
|
-
const response = await requestKVValue(accountId, namespaceId, key, {
|
|
483
|
-
method: "GET"
|
|
484
|
-
}, options);
|
|
485
|
-
if (response.status === 404) {
|
|
486
|
-
return null;
|
|
487
|
-
}
|
|
488
|
-
if (!response.ok) {
|
|
489
|
-
await throwKVValueError(response, "KV read");
|
|
490
|
-
}
|
|
491
|
-
return response.text();
|
|
492
|
-
}
|
|
493
|
-
async function kvPut(accountId, namespaceId, key, value, options) {
|
|
494
|
-
const response = await requestKVValue(accountId, namespaceId, key, {
|
|
495
|
-
method: "PUT",
|
|
496
|
-
value
|
|
497
|
-
}, options);
|
|
498
|
-
if (!response.ok) {
|
|
499
|
-
await throwKVValueError(response, "KV write");
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
async function kvDelete(accountId, namespaceId, key, options) {
|
|
503
|
-
const response = await requestKVValue(accountId, namespaceId, key, {
|
|
504
|
-
method: "DELETE"
|
|
505
|
-
}, options);
|
|
506
|
-
if (response.status === 404) {
|
|
507
|
-
return;
|
|
508
|
-
}
|
|
509
|
-
if (!response.ok) {
|
|
510
|
-
await throwKVValueError(response, "KV delete");
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
export { hasWranglerConfig, getWranglerAuth, getApiToken, isAuthenticated, CloudflareAPIError, AuthenticationError, parseCloudflareEnvelope, parseRawJson, createCloudflareAuthSession, apiGet, apiPost, apiPut, apiPatch, apiDelete, apiGetAll, kvGet, kvPut, kvDelete };
|
package/dist/index-0cc05hzv.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
loadConfig,
|
|
3
|
-
resolveConfigPath
|
|
4
|
-
} from "./index-x8s9rwfh.js";
|
|
5
|
-
import {
|
|
6
|
-
getEffectiveAccountId,
|
|
7
|
-
getPrimaryAccount,
|
|
8
|
-
getWorkspaceAccountId
|
|
9
|
-
} from "./index-h7r11y4a.js";
|
|
10
|
-
|
|
11
|
-
// src/cli/command-utils.ts
|
|
12
|
-
function asOptionalString(value) {
|
|
13
|
-
return typeof value === "string" && value.trim() ? value.trim() : undefined;
|
|
14
|
-
}
|
|
15
|
-
function resolveNamedSelection(options) {
|
|
16
|
-
if (options.explicitValue) {
|
|
17
|
-
return {
|
|
18
|
-
value: options.explicitValue,
|
|
19
|
-
source: "option"
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
if (options.fallbackValue) {
|
|
23
|
-
return {
|
|
24
|
-
value: options.fallbackValue,
|
|
25
|
-
source: "arg"
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
if (options.configuredValue) {
|
|
29
|
-
return {
|
|
30
|
-
value: options.configuredValue,
|
|
31
|
-
source: "config"
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
value: undefined,
|
|
36
|
-
source: "none"
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
async function getConfiguredAccountId(cwd) {
|
|
40
|
-
const workspaceAccountId = getWorkspaceAccountId();
|
|
41
|
-
if (workspaceAccountId) {
|
|
42
|
-
return workspaceAccountId;
|
|
43
|
-
}
|
|
44
|
-
const envAccountId = process.env.CLOUDFLARE_ACCOUNT_ID?.trim();
|
|
45
|
-
if (envAccountId) {
|
|
46
|
-
return envAccountId;
|
|
47
|
-
}
|
|
48
|
-
const configPath = await resolveConfigPath(cwd);
|
|
49
|
-
if (!configPath) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
try {
|
|
53
|
-
const config = await loadConfig({ cwd });
|
|
54
|
-
return config.accountId;
|
|
55
|
-
} catch {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
async function resolveCloudflareAccountId(options) {
|
|
60
|
-
if (options.explicitAccountId) {
|
|
61
|
-
return options.explicitAccountId;
|
|
62
|
-
}
|
|
63
|
-
if (options.configuredAccountId) {
|
|
64
|
-
return options.configuredAccountId;
|
|
65
|
-
}
|
|
66
|
-
const primaryAccount = await getPrimaryAccount(options.apiOptions);
|
|
67
|
-
if (!primaryAccount) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
const effective = await getEffectiveAccountId(primaryAccount.id);
|
|
71
|
-
return effective.accountId;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export { asOptionalString, resolveNamedSelection, getConfiguredAccountId, resolveCloudflareAccountId };
|