devflare 1.0.0-next.42 → 1.0.0-next.43
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 → account-BJmkb7cc.js} +1 -1
- package/dist/_chunks/{build-D1l6a5Il.js → build-BkgjOmfq.js} +1 -1
- package/dist/_chunks/{build-artifacts-BUaq16e4.js → build-artifacts-HPThCdGT.js} +4 -4
- package/dist/_chunks/{cli-CgFqrDZd.js → cli-5ME5-Ibv.js} +12 -12
- package/dist/_chunks/{command-utils-BsfkmTqh.js → command-utils-CY3-veEo.js} +1 -1
- package/dist/_chunks/{compiler-uoyAQ8zW.js → compiler-By9RWzea.js} +40 -15
- package/dist/_chunks/{config-D5u-bEkn.js → config-bUY5vBYw.js} +3 -3
- package/dist/_chunks/{config-path-DCPto4XB.js → config-path-HP5NIFbF.js} +1 -1
- package/dist/_chunks/{deploy-DIDoW5u1.js → deploy-BrVu07KN.js} +6 -6
- package/dist/_chunks/{dev-BTSSETUX.js → dev-BbvjuXRA.js} +10 -8
- package/dist/_chunks/{doctor-C0g8X36G.js → doctor-7upvzze6.js} +2 -2
- package/dist/_chunks/{family-DXC5SdFK.js → family-C9iQ6WtW.js} +1 -1
- package/dist/_chunks/{loader-DLXO60RO.js → loader-CQyvmFM2.js} +4 -4
- package/dist/_chunks/{local-secrets-DMmEOygL.js → local-secrets-Bmm87slY.js} +1 -1
- package/dist/_chunks/{local-workflow-entrypoints-Wip3o1u8.js → local-workflow-entrypoints-ZFHiVbnX.js} +1 -1
- package/dist/_chunks/{login-BmnDzDlH.js → login-2V8AfKeG.js} +1 -1
- package/dist/_chunks/{preview-BhqDmq8I.js → preview-C3Cdr8an.js} +9 -3
- package/dist/_chunks/{preview-resources-DdXj8LMM.js → preview-resources-DMieqto4.js} +5 -4
- package/dist/_chunks/{previews-Dlr13x5M.js → previews-BXPrXEU9.js} +7 -7
- package/dist/_chunks/{productions-D3AnOHac.js → productions-fLG19eus.js} +3 -3
- package/dist/_chunks/{routes-BWi7h2xb.js → routes-DKc39Vlu.js} +4 -4
- package/dist/_chunks/{schema-normalization-DWVleVxo.js → schema-normalization-CCPigJ7K.js} +104 -12
- package/dist/_chunks/{secrets-70eN0Q6C.js → secrets-D1RcG79F.js} +1 -1
- package/dist/_chunks/{types-BgA5Hb4B.js → types-BJjtDDzl.js} +3 -3
- package/dist/_chunks/{vite-BszZvrKL.js → vite-CrBFLqH3.js} +5 -5
- package/dist/_chunks/{worker-CS1jgNFE.js → worker-DO4hIcJA.js} +4 -4
- package/dist/bridge/miniflare.d.ts.map +1 -1
- package/dist/browser.d.ts +466 -36
- package/dist/browser.d.ts.map +1 -1
- package/dist/cli/commands/type-generation/generator.d.ts +3 -3
- package/dist/cli/commands/type-generation/generator.d.ts.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/config/compiler/bindings.d.ts.map +1 -1
- package/dist/config/compiler/do-workers.d.ts.map +1 -1
- package/dist/config/compiler/types.d.ts +5 -0
- package/dist/config/compiler/types.d.ts.map +1 -1
- package/dist/config/deploy-resources.d.ts.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/preview-resources.d.ts +1 -1
- package/dist/config/preview-resources.d.ts.map +1 -1
- package/dist/config/preview.d.ts.map +1 -1
- package/dist/config/schema-bindings.d.ts +326 -14
- package/dist/config/schema-bindings.d.ts.map +1 -1
- package/dist/config/schema-env.d.ts +328 -24
- package/dist/config/schema-env.d.ts.map +1 -1
- package/dist/config/schema-normalization.d.ts +39 -1
- package/dist/config/schema-normalization.d.ts.map +1 -1
- package/dist/config/schema-types-bindings-resources.d.ts +220 -3
- package/dist/config/schema-types-bindings-resources.d.ts.map +1 -1
- package/dist/config/schema-types-bindings.d.ts +2 -2
- package/dist/config/schema-types-bindings.d.ts.map +1 -1
- package/dist/config/schema.d.ts +587 -47
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config-entry.js +1 -1
- package/dist/dev-server/miniflare-bindings.d.ts.map +1 -1
- package/dist/dev-server/miniflare-worker-config.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/sveltekit/index.js +3 -3
- package/dist/test/index.js +7 -7
- package/dist/test/resolve-service-bindings.d.ts.map +1 -1
- package/dist/test/simple-context-mfconfig.d.ts.map +1 -1
- package/dist/vite/index.js +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { a as setGlobalDefaultAccountId, i as getWorkspaceAccountId, o as setWor
|
|
|
3
3
|
import { t as account } from "./cloudflare-BaloqI3H.js";
|
|
4
4
|
import { a as DIM, c as RESET, i as CYAN_BOLD, r as CYAN } from "./colors-DiK6wPJ5.js";
|
|
5
5
|
import { c as formatCommand, d as green, f as logLine, g as yellow, h as whiteDim, l as formatLabelValue, n as bold, o as dim, p as logTable, r as createCliTheme } from "./ui-BUoZApvE.js";
|
|
6
|
-
import { n as getConfiguredAccountId } from "./command-utils-
|
|
6
|
+
import { n as getConfiguredAccountId } from "./command-utils-CY3-veEo.js";
|
|
7
7
|
//#region src/cli/commands/account.ts
|
|
8
8
|
const ACCOUNT_SUBCOMMANDS = [
|
|
9
9
|
"info",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as cyanBold, f as logLine, o as dim, r as createCliTheme } from "./ui-BUoZApvE.js";
|
|
2
|
-
import { t as prepareBuildArtifacts } from "./build-artifacts-
|
|
2
|
+
import { t as prepareBuildArtifacts } from "./build-artifacts-HPThCdGT.js";
|
|
3
3
|
//#region src/cli/commands/build.ts
|
|
4
4
|
async function runBuildCommand(parsed, logger, options) {
|
|
5
5
|
const theme = createCliTheme(parsed.options);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d as resolveConfigEnvVars } from "./preview-
|
|
2
|
-
import { r as loadConfig, u as resolveConfigForEnvironment } from "./loader-
|
|
3
|
-
import { c as writeWranglerConfig, i as isolateViteBuildOutputPaths$1, o as rebaseWranglerConfigPaths, t as compileBuildConfig } from "./compiler-
|
|
1
|
+
import { d as resolveConfigEnvVars } from "./preview-C3Cdr8an.js";
|
|
2
|
+
import { r as loadConfig, u as resolveConfigForEnvironment } from "./loader-CQyvmFM2.js";
|
|
3
|
+
import { c as writeWranglerConfig, i as isolateViteBuildOutputPaths$1, o as rebaseWranglerConfigPaths, t as compileBuildConfig } from "./compiler-By9RWzea.js";
|
|
4
4
|
import { f as logLine } from "./ui-BUoZApvE.js";
|
|
5
5
|
import { n as getPackageVersion } from "./package-metadata-DjHBLB-z.js";
|
|
6
6
|
import { t as resolvePackageSpecifier } from "./resolve-package-qizBfCIm.js";
|
|
7
|
-
import { i as writeGeneratedViteConfig, l as prepareComposedWorkerEntrypoint, n as resolveEffectiveViteProject } from "./vite-
|
|
7
|
+
import { i as writeGeneratedViteConfig, l as prepareComposedWorkerEntrypoint, n as resolveEffectiveViteProject } from "./vite-CrBFLqH3.js";
|
|
8
8
|
import { t as bundleWorkerEntry } from "./worker-bundler-dTTnYU3n.js";
|
|
9
9
|
import { t as detectViteProject } from "./vite-utils-OVLMV605.js";
|
|
10
10
|
import { t as getDependencies } from "./dependencies-C2oxFjU_.js";
|
|
@@ -1062,50 +1062,50 @@ async function runInit(parsed, logger, options) {
|
|
|
1062
1062
|
return runInitCommand(parsed, logger, options);
|
|
1063
1063
|
}
|
|
1064
1064
|
async function runDev(parsed, logger, options) {
|
|
1065
|
-
const { runDevCommand } = await import("./dev-
|
|
1065
|
+
const { runDevCommand } = await import("./dev-BbvjuXRA.js");
|
|
1066
1066
|
return runDevCommand(parsed, logger, options);
|
|
1067
1067
|
}
|
|
1068
1068
|
async function runBuild(parsed, logger, options) {
|
|
1069
|
-
const { runBuildCommand } = await import("./build-
|
|
1069
|
+
const { runBuildCommand } = await import("./build-BkgjOmfq.js");
|
|
1070
1070
|
return runBuildCommand(parsed, logger, options);
|
|
1071
1071
|
}
|
|
1072
1072
|
async function runDeploy(parsed, logger, options) {
|
|
1073
|
-
const { runDeployCommand } = await import("./deploy-
|
|
1073
|
+
const { runDeployCommand } = await import("./deploy-BrVu07KN.js");
|
|
1074
1074
|
return runDeployCommand(parsed, logger, {
|
|
1075
1075
|
...options,
|
|
1076
1076
|
requireExplicitDeployTarget: true
|
|
1077
1077
|
});
|
|
1078
1078
|
}
|
|
1079
1079
|
async function runTypes(parsed, logger, options) {
|
|
1080
|
-
const { runTypesCommand } = await import("./types-
|
|
1080
|
+
const { runTypesCommand } = await import("./types-BJjtDDzl.js");
|
|
1081
1081
|
return runTypesCommand(parsed, logger, options);
|
|
1082
1082
|
}
|
|
1083
1083
|
async function runDoctor(parsed, logger, options) {
|
|
1084
|
-
const { runDoctorCommand } = await import("./doctor-
|
|
1084
|
+
const { runDoctorCommand } = await import("./doctor-7upvzze6.js");
|
|
1085
1085
|
return runDoctorCommand(parsed, logger, options);
|
|
1086
1086
|
}
|
|
1087
1087
|
async function runConfig(parsed, logger, options) {
|
|
1088
|
-
const { runConfigCommand } = await import("./config-
|
|
1088
|
+
const { runConfigCommand } = await import("./config-bUY5vBYw.js");
|
|
1089
1089
|
return runConfigCommand(parsed, logger, options);
|
|
1090
1090
|
}
|
|
1091
1091
|
async function runAccount(parsed, logger, options) {
|
|
1092
|
-
const { runAccountCommand } = await import("./account-
|
|
1092
|
+
const { runAccountCommand } = await import("./account-BJmkb7cc.js");
|
|
1093
1093
|
return runAccountCommand(parsed, logger, options);
|
|
1094
1094
|
}
|
|
1095
1095
|
async function runLogin(parsed, logger, options) {
|
|
1096
|
-
const { runLoginCommand } = await import("./login-
|
|
1096
|
+
const { runLoginCommand } = await import("./login-2V8AfKeG.js");
|
|
1097
1097
|
return runLoginCommand(parsed, logger, options);
|
|
1098
1098
|
}
|
|
1099
1099
|
async function runPreviews(parsed, logger, options) {
|
|
1100
|
-
const { runPreviewsCommand } = await import("./previews-
|
|
1100
|
+
const { runPreviewsCommand } = await import("./previews-BXPrXEU9.js");
|
|
1101
1101
|
return runPreviewsCommand(parsed, logger, options);
|
|
1102
1102
|
}
|
|
1103
1103
|
async function runProductions(parsed, logger, options) {
|
|
1104
|
-
const { runProductionsCommand } = await import("./productions-
|
|
1104
|
+
const { runProductionsCommand } = await import("./productions-fLG19eus.js");
|
|
1105
1105
|
return runProductionsCommand(parsed, logger, options);
|
|
1106
1106
|
}
|
|
1107
1107
|
async function runWorker(parsed, logger, options) {
|
|
1108
|
-
const { runWorkerCommand } = await import("./worker-
|
|
1108
|
+
const { runWorkerCommand } = await import("./worker-DO4hIcJA.js");
|
|
1109
1109
|
return runWorkerCommand(parsed, logger, options);
|
|
1110
1110
|
}
|
|
1111
1111
|
async function runToken(parsed, logger, options) {
|
|
@@ -1113,7 +1113,7 @@ async function runToken(parsed, logger, options) {
|
|
|
1113
1113
|
return runTokenCommand(parsed, logger, options);
|
|
1114
1114
|
}
|
|
1115
1115
|
async function runSecrets(parsed, logger, options) {
|
|
1116
|
-
const { runSecretsCommand } = await import("./secrets-
|
|
1116
|
+
const { runSecretsCommand } = await import("./secrets-D1RcG79F.js");
|
|
1117
1117
|
return runSecretsCommand(parsed, logger, options);
|
|
1118
1118
|
}
|
|
1119
1119
|
async function runAI() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as resolveConfigPath, r as loadConfig } from "./loader-
|
|
1
|
+
import { i as resolveConfigPath, r as loadConfig } from "./loader-CQyvmFM2.js";
|
|
2
2
|
import { d as getPrimaryAccount, i as getWorkspaceAccountId, n as getEffectiveAccountId } from "./preferences-BKp_7XJx.js";
|
|
3
3
|
//#region src/cli/command-utils.ts
|
|
4
4
|
function asOptionalString(value) {
|
|
@@ -1,29 +1,43 @@
|
|
|
1
|
-
import { f as normalizeCompatibilityFlags, u as resolveConfigForEnvironment } from "./loader-
|
|
2
|
-
import { _ as
|
|
1
|
+
import { f as normalizeCompatibilityFlags, u as resolveConfigForEnvironment } from "./loader-CQyvmFM2.js";
|
|
2
|
+
import { _ as normalizeWorkflowBinding, a as normalizeD1Binding, c as normalizeHyperdriveBinding, d as normalizeMediaBinding, f as normalizeMtlsCertificateBinding, g as normalizeSecretsStoreBinding, h as normalizeR2Binding, i as normalizeArtifactsBinding, l as normalizeImagesBinding, m as normalizeQueueProducer, o as normalizeDOBinding, p as normalizePipelineBinding, r as getSingleBrowserBindingName, s as normalizeDispatchNamespaceBinding, u as normalizeKVBinding, y as browserBindingSchema } from "./schema-normalization-CCPigJ7K.js";
|
|
3
3
|
import { n as toWranglerSecretsConfig } from "./local-dev-vars-CTSa-wvF.js";
|
|
4
4
|
import { basename, isAbsolute, relative, resolve } from "pathe";
|
|
5
5
|
//#region src/config/compiler/bindings.ts
|
|
6
6
|
function getWranglerD1DatabaseBinding(bindingName, bindingConfig, options = {}) {
|
|
7
7
|
const normalized = normalizeD1Binding(bindingConfig);
|
|
8
|
+
const extras = {
|
|
9
|
+
...normalized.previewDatabaseId !== void 0 && { preview_database_id: normalized.previewDatabaseId },
|
|
10
|
+
...normalized.migrationsTable !== void 0 && { migrations_table: normalized.migrationsTable },
|
|
11
|
+
...normalized.migrationsDir !== void 0 && { migrations_dir: normalized.migrationsDir },
|
|
12
|
+
...normalized.remote !== void 0 && { remote: normalized.remote }
|
|
13
|
+
};
|
|
8
14
|
if (normalized.databaseId) return {
|
|
9
15
|
binding: bindingName,
|
|
10
|
-
database_id: normalized.databaseId
|
|
16
|
+
database_id: normalized.databaseId,
|
|
17
|
+
...extras
|
|
11
18
|
};
|
|
12
19
|
if (options.preserveNamedBindings && normalized.name) return {
|
|
13
20
|
binding: bindingName,
|
|
14
|
-
database_name: normalized.name
|
|
21
|
+
database_name: normalized.name,
|
|
22
|
+
...extras
|
|
15
23
|
};
|
|
16
24
|
throw new Error(`D1 binding "${bindingName}" is configured by name (${normalized.name}) and must be resolved before compiling Wrangler config. Use loadResolvedConfig() or resolveConfigResources() for build/deploy/automation flows.`);
|
|
17
25
|
}
|
|
18
26
|
function getWranglerKVNamespaceBinding(bindingName, bindingConfig, options = {}) {
|
|
19
27
|
const normalized = normalizeKVBinding(bindingConfig);
|
|
28
|
+
const extras = {
|
|
29
|
+
...normalized.previewId !== void 0 && { preview_id: normalized.previewId },
|
|
30
|
+
...normalized.remote !== void 0 && { remote: normalized.remote }
|
|
31
|
+
};
|
|
20
32
|
if (normalized.namespaceId) return {
|
|
21
33
|
binding: bindingName,
|
|
22
|
-
id: normalized.namespaceId
|
|
34
|
+
id: normalized.namespaceId,
|
|
35
|
+
...extras
|
|
23
36
|
};
|
|
24
37
|
if (options.preserveNamedBindings && normalized.name) return {
|
|
25
38
|
binding: bindingName,
|
|
26
|
-
name: normalized.name
|
|
39
|
+
name: normalized.name,
|
|
40
|
+
...extras
|
|
27
41
|
};
|
|
28
42
|
throw new Error(`KV binding "${bindingName}" is configured by name (${normalized.name}) and must be resolved before compiling Wrangler config. Use loadResolvedConfig() or resolveConfigResources() for build/deploy/automation flows.`);
|
|
29
43
|
}
|
|
@@ -62,10 +76,16 @@ function compileBindings(bindings, result, options = {}, defaultSecretsStoreId)
|
|
|
62
76
|
if (bindings.d1) result.d1_databases = Object.entries(bindings.d1).map(([binding, database_id]) => {
|
|
63
77
|
return getWranglerD1DatabaseBinding(binding, database_id, options);
|
|
64
78
|
});
|
|
65
|
-
if (bindings.r2) result.r2_buckets = Object.entries(bindings.r2).map(([binding,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
79
|
+
if (bindings.r2) result.r2_buckets = Object.entries(bindings.r2).map(([binding, config]) => {
|
|
80
|
+
const normalized = normalizeR2Binding(config);
|
|
81
|
+
return {
|
|
82
|
+
binding,
|
|
83
|
+
bucket_name: normalized.bucketName,
|
|
84
|
+
...normalized.previewBucketName !== void 0 && { preview_bucket_name: normalized.previewBucketName },
|
|
85
|
+
...normalized.jurisdiction !== void 0 && { jurisdiction: normalized.jurisdiction },
|
|
86
|
+
...normalized.remote !== void 0 && { remote: normalized.remote }
|
|
87
|
+
};
|
|
88
|
+
});
|
|
69
89
|
if (bindings.durableObjects) result.durable_objects = { bindings: Object.entries(bindings.durableObjects).map(([name, config]) => {
|
|
70
90
|
const normalized = normalizeDOBinding(config);
|
|
71
91
|
const binding = {
|
|
@@ -77,10 +97,14 @@ function compileBindings(bindings, result, options = {}, defaultSecretsStoreId)
|
|
|
77
97
|
}) };
|
|
78
98
|
if (bindings.queues) {
|
|
79
99
|
result.queues = {};
|
|
80
|
-
if (bindings.queues.producers) result.queues.producers = Object.entries(bindings.queues.producers).map(([binding,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
100
|
+
if (bindings.queues.producers) result.queues.producers = Object.entries(bindings.queues.producers).map(([binding, config]) => {
|
|
101
|
+
const normalized = normalizeQueueProducer(config);
|
|
102
|
+
return {
|
|
103
|
+
binding,
|
|
104
|
+
queue: normalized.queue,
|
|
105
|
+
...normalized.remote !== void 0 && { remote: normalized.remote }
|
|
106
|
+
};
|
|
107
|
+
});
|
|
84
108
|
if (bindings.queues.consumers) result.queues.consumers = bindings.queues.consumers.map((consumer) => ({
|
|
85
109
|
queue: consumer.queue,
|
|
86
110
|
...consumer.maxBatchSize && { max_batch_size: consumer.maxBatchSize },
|
|
@@ -179,7 +203,8 @@ function compileBindings(bindings, result, options = {}, defaultSecretsStoreId)
|
|
|
179
203
|
binding,
|
|
180
204
|
service: config.service,
|
|
181
205
|
...config.entrypoint && { entrypoint: config.entrypoint },
|
|
182
|
-
...config.environment && { environment: config.environment }
|
|
206
|
+
...config.environment && { environment: config.environment },
|
|
207
|
+
...config.remote !== void 0 && { remote: config.remote }
|
|
183
208
|
}));
|
|
184
209
|
if (bindings.ai?.binding) result.ai = {
|
|
185
210
|
binding: bindings.ai.binding,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as resolveConfigEnvVars } from "./preview-
|
|
2
|
-
import { a as ConfigResourceResolutionError, o as loadResolvedConfig, r as loadConfig, s as resolveResources } from "./loader-
|
|
3
|
-
import { n as compileConfig, t as compileBuildConfig } from "./compiler-
|
|
1
|
+
import { d as resolveConfigEnvVars } from "./preview-C3Cdr8an.js";
|
|
2
|
+
import { a as ConfigResourceResolutionError, o as loadResolvedConfig, r as loadConfig, s as resolveResources } from "./loader-CQyvmFM2.js";
|
|
3
|
+
import { n as compileConfig, t as compileBuildConfig } from "./compiler-By9RWzea.js";
|
|
4
4
|
//#region src/cli/commands/config.ts
|
|
5
5
|
function isSupportedFormat(value) {
|
|
6
6
|
return value === "devflare" || value === "wrangler";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as resolvePreviewIdentifier, d as resolveConfigEnvVars } from "./preview-
|
|
2
|
-
import { c as prepareConfigResourcesForDeploy, r as loadConfig, u as resolveConfigForEnvironment } from "./loader-
|
|
3
|
-
import { a as readWranglerConfig, c as writeWranglerConfig, n as compileConfig, o as rebaseWranglerConfigPaths, s as stringifyConfig, t as compileBuildConfig } from "./compiler-
|
|
1
|
+
import { a as resolvePreviewIdentifier, d as resolveConfigEnvVars } from "./preview-C3Cdr8an.js";
|
|
2
|
+
import { c as prepareConfigResourcesForDeploy, r as loadConfig, u as resolveConfigForEnvironment } from "./loader-CQyvmFM2.js";
|
|
3
|
+
import { a as readWranglerConfig, c as writeWranglerConfig, n as compileConfig, o as rebaseWranglerConfigPaths, s as stringifyConfig, t as compileBuildConfig } from "./compiler-By9RWzea.js";
|
|
4
4
|
import { d as getPrimaryAccount, n as getEffectiveAccountId } from "./preferences-BKp_7XJx.js";
|
|
5
5
|
import { D as listWorkerVersions, E as listWorkerDeployments, O as listWorkers, T as getWorkersSubdomain, c as reconcilePreviewRegistry, w as getWorkerVersionDetail, x as formatWorkersDevUrl } from "./preview-registry-ClAbLTHH.js";
|
|
6
6
|
import { _ as yellowBold, d as green, f as logLine, g as yellow, o as dim, r as createCliTheme } from "./ui-BUoZApvE.js";
|
|
7
7
|
import { n as getPackageVersion } from "./package-metadata-DjHBLB-z.js";
|
|
8
8
|
import { t as resolvePackageSpecifier } from "./resolve-package-qizBfCIm.js";
|
|
9
|
-
import { t as asOptionalString } from "./command-utils-
|
|
10
|
-
import { a as createBuildManifest, i as compareManifests, n as applyDeploymentStrategy, o as formatDriftWarning, r as describeDeploymentStrategy, s as readBuildManifest, t as prepareBuildArtifacts } from "./build-artifacts-
|
|
9
|
+
import { t as asOptionalString } from "./command-utils-CY3-veEo.js";
|
|
10
|
+
import { a as createBuildManifest, i as compareManifests, n as applyDeploymentStrategy, o as formatDriftWarning, r as describeDeploymentStrategy, s as readBuildManifest, t as prepareBuildArtifacts } from "./build-artifacts-HPThCdGT.js";
|
|
11
11
|
import { t as getDependencies } from "./dependencies-C2oxFjU_.js";
|
|
12
|
-
import { n as preparePreviewScopedResourcesForDeploy } from "./preview-resources-
|
|
12
|
+
import { n as preparePreviewScopedResourcesForDeploy } from "./preview-resources-DMieqto4.js";
|
|
13
13
|
import { mkdir, open, readFile, rm, writeFile } from "node:fs/promises";
|
|
14
14
|
import { basename, dirname, isAbsolute, join, resolve } from "pathe";
|
|
15
15
|
//#region src/config/service-bindings-validation.ts
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { c as getDevflareDotenvPaths, d as resolveConfigEnvVars, o as EnvVarResolutionError } from "./preview-
|
|
2
|
-
import { i as resolveConfigPath, r as loadConfig } from "./loader-
|
|
3
|
-
import { n as getLocalKVNamespaceIdentifier, r as getSingleBrowserBindingName, t as getLocalD1DatabaseIdentifier } from "./schema-normalization-
|
|
1
|
+
import { c as getDevflareDotenvPaths, d as resolveConfigEnvVars, o as EnvVarResolutionError } from "./preview-C3Cdr8an.js";
|
|
2
|
+
import { i as resolveConfigPath, r as loadConfig } from "./loader-CQyvmFM2.js";
|
|
3
|
+
import { h as normalizeR2Binding, n as getLocalKVNamespaceIdentifier, r as getSingleBrowserBindingName, t as getLocalD1DatabaseIdentifier } from "./schema-normalization-CCPigJ7K.js";
|
|
4
4
|
import { t as applyLocalDevVarsToConfig } from "./local-dev-vars-CTSa-wvF.js";
|
|
5
5
|
import { a as cyanBold, f as logLine, g as yellow, o as dim, r as createCliTheme } from "./ui-BUoZApvE.js";
|
|
6
6
|
import { clearLocalSendEmailBindings, setLocalSendEmailBindings } from "../utils/send-email.js";
|
|
7
|
-
import { C as buildWorkerLoadersConfig, S as buildVersionMetadataConfig, _ as buildQueueConsumers, b as buildSecretsStoreConfig, c as buildAiSearchInstancesConfig, d as buildDispatchNamespacesConfig, f as buildHyperdrivesConfig, g as buildPipelinesConfig, h as buildMtlsCertificatesConfig, l as buildAiSearchNamespacesConfig, m as buildMediaConfig, n as getRouteDirectoryCandidate, p as buildImagesConfig, s as resolveServiceBindings, t as discoverRoutes, u as buildArtifactsConfig, v as buildQueueProducers, w as buildWorkflowsConfig, x as buildSendEmailConfig, y as buildRateLimitsConfig } from "./routes-
|
|
7
|
+
import { C as buildWorkerLoadersConfig, S as buildVersionMetadataConfig, _ as buildQueueConsumers, b as buildSecretsStoreConfig, c as buildAiSearchInstancesConfig, d as buildDispatchNamespacesConfig, f as buildHyperdrivesConfig, g as buildPipelinesConfig, h as buildMtlsCertificatesConfig, l as buildAiSearchNamespacesConfig, m as buildMediaConfig, n as getRouteDirectoryCandidate, p as buildImagesConfig, s as resolveServiceBindings, t as discoverRoutes, u as buildArtifactsConfig, v as buildQueueProducers, w as buildWorkflowsConfig, x as buildSendEmailConfig, y as buildRateLimitsConfig } from "./routes-DKc39Vlu.js";
|
|
8
8
|
import { r as transformDurableObject } from "./durable-object-DMtH0XYX.js";
|
|
9
9
|
import { i as findFiles } from "./glob-CmQOvunB.js";
|
|
10
|
-
import { d as DEFAULT_FETCH_ENTRY_FILES, f as DEFAULT_QUEUE_ENTRY_FILES, g as discoverDurableObjectFiles, h as resolveWorkerSurfacePaths, i as writeGeneratedViteConfig, l as prepareComposedWorkerEntrypoint, m as hasWorkerSurfacePaths, n as resolveEffectiveViteProject, p as DEFAULT_SCHEDULED_ENTRY_FILES, u as DEFAULT_EMAIL_ENTRY_FILES } from "./vite-
|
|
10
|
+
import { d as DEFAULT_FETCH_ENTRY_FILES, f as DEFAULT_QUEUE_ENTRY_FILES, g as discoverDurableObjectFiles, h as resolveWorkerSurfacePaths, i as writeGeneratedViteConfig, l as prepareComposedWorkerEntrypoint, m as hasWorkerSurfacePaths, n as resolveEffectiveViteProject, p as DEFAULT_SCHEDULED_ENTRY_FILES, u as DEFAULT_EMAIL_ENTRY_FILES } from "./vite-CrBFLqH3.js";
|
|
11
11
|
import { a as createWorkerdBundlerDefaults, i as writeWorkerCompatibleBundle, n as ensureDebugShim, r as resolveWorkerCompatibleRolldownConfig, t as bundleWorkerEntry } from "./worker-bundler-dTTnYU3n.js";
|
|
12
|
-
import { t as bundleWorkflowEntrypointScript } from "./local-workflow-entrypoints-
|
|
13
|
-
import { n as buildLocalSecretWrappedBindingConfig } from "./local-secrets-
|
|
12
|
+
import { t as bundleWorkflowEntrypointScript } from "./local-workflow-entrypoints-ZFHiVbnX.js";
|
|
13
|
+
import { n as buildLocalSecretWrappedBindingConfig } from "./local-secrets-Bmm87slY.js";
|
|
14
14
|
import { t as buildLocalBindingShimServiceConfig } from "./local-media-bindings-DsAW4AMF.js";
|
|
15
15
|
import { i as waitForViteReady, n as resolveViteMode, r as stopSpawnedProcessTree, t as detectViteProject } from "./vite-utils-OVLMV605.js";
|
|
16
16
|
import { existsSync } from "node:fs";
|
|
@@ -1918,7 +1918,9 @@ function makeMiniflareWorker(context, options) {
|
|
|
1918
1918
|
...bindings.kv && { kvNamespaces: Object.fromEntries(Object.entries(bindings.kv).map(([bindingName, bindingConfig]) => {
|
|
1919
1919
|
return [bindingName, getLocalKVNamespaceIdentifier(bindingConfig)];
|
|
1920
1920
|
})) },
|
|
1921
|
-
...bindings.r2 && { r2Buckets: bindings.r2
|
|
1921
|
+
...bindings.r2 && { r2Buckets: Object.fromEntries(Object.entries(bindings.r2).map(([bindingName, bindingConfig]) => {
|
|
1922
|
+
return [bindingName, normalizeR2Binding(bindingConfig).bucketName];
|
|
1923
|
+
})) },
|
|
1922
1924
|
...bindings.d1 && { d1Databases: Object.fromEntries(Object.entries(bindings.d1).map(([bindingName, bindingConfig]) => {
|
|
1923
1925
|
return [bindingName, getLocalD1DatabaseIdentifier(bindingConfig)];
|
|
1924
1926
|
})) },
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { r as loadConfig } from "./loader-
|
|
1
|
+
import { r as loadConfig } from "./loader-CQyvmFM2.js";
|
|
2
2
|
import { d as green, f as logLine, g as yellow, m as red, n as bold, o as dim, r as createCliTheme } from "./ui-BUoZApvE.js";
|
|
3
3
|
import { n as getPackageVersion } from "./package-metadata-DjHBLB-z.js";
|
|
4
4
|
import { t as detectViteProject } from "./vite-utils-OVLMV605.js";
|
|
5
5
|
import { t as getDependencies } from "./dependencies-C2oxFjU_.js";
|
|
6
6
|
import { n as getGeneratedArtifactPaths } from "./generated-artifacts-dMJY4KAt.js";
|
|
7
|
-
import { n as formatSupportedConfigFilenames, r as resolveConfigCandidatePath } from "./config-path-
|
|
7
|
+
import { n as formatSupportedConfigFilenames, r as resolveConfigCandidatePath } from "./config-path-HP5NIFbF.js";
|
|
8
8
|
import { basename, dirname, relative, resolve } from "pathe";
|
|
9
9
|
//#region src/cli/commands/doctor.ts
|
|
10
10
|
async function runDoctorCommand(parsed, logger, options) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as resolveConfigForEnvironment } from "./loader-
|
|
1
|
+
import { u as resolveConfigForEnvironment } from "./loader-CQyvmFM2.js";
|
|
2
2
|
//#region src/cli/commands/previews-support/family.ts
|
|
3
3
|
function compareConfiguredWorkerFamilies(left, right) {
|
|
4
4
|
if (left.role === "primary" && right.role !== "primary") return -1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as isEnvVarDescriptor, n as materializePreviewScopedConfig, u as loadDevflareDotenvIntoProcess } from "./preview-
|
|
2
|
-
import { a as normalizeD1Binding, c as normalizeHyperdriveBinding,
|
|
1
|
+
import { l as isEnvVarDescriptor, n as materializePreviewScopedConfig, u as loadDevflareDotenvIntoProcess } from "./preview-C3Cdr8an.js";
|
|
2
|
+
import { a as normalizeD1Binding, c as normalizeHyperdriveBinding, h as normalizeR2Binding, m as normalizeQueueProducer, n as getLocalKVNamespaceIdentifier, t as getLocalD1DatabaseIdentifier, u as normalizeKVBinding, v as bindingsSchema } from "./schema-normalization-CCPigJ7K.js";
|
|
3
3
|
import { d as getPrimaryAccount, n as getEffectiveAccountId } from "./preferences-BKp_7XJx.js";
|
|
4
4
|
import { _ as listR2Buckets, g as listQueues, h as listKVNamespaces, i as createR2Bucket, m as listHyperdrives, n as createKVNamespace, p as listD1Databases, r as createQueue, t as createD1Database, v as listVectorizeIndexes } from "./account-resources-CsmVowJp.js";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
@@ -611,7 +611,7 @@ function resolveUniqueNames(values) {
|
|
|
611
611
|
function collectQueueNames(config) {
|
|
612
612
|
const queues = config.bindings?.queues;
|
|
613
613
|
if (!queues) return [];
|
|
614
|
-
return resolveUniqueNames([...Object.values(queues.producers ?? {}), ...(queues.consumers ?? []).flatMap((consumer) => [consumer.queue, consumer.deadLetterQueue])]);
|
|
614
|
+
return resolveUniqueNames([...Object.values(queues.producers ?? {}).map((producer) => normalizeQueueProducer(producer).queue), ...(queues.consumers ?? []).flatMap((consumer) => [consumer.queue, consumer.deadLetterQueue])]);
|
|
615
615
|
}
|
|
616
616
|
function collectVectorizeIndexNames(config) {
|
|
617
617
|
return resolveUniqueNames(Object.values(config.bindings?.vectorize ?? {}).map((binding) => binding.indexName));
|
|
@@ -710,7 +710,7 @@ async function prepareMaterializedConfigResourcesForDeploy(resolvedConfig, optio
|
|
|
710
710
|
const kvBindings = resolvedConfig.bindings?.kv;
|
|
711
711
|
const d1Bindings = resolvedConfig.bindings?.d1;
|
|
712
712
|
const hyperdriveBindings = resolvedConfig.bindings?.hyperdrive;
|
|
713
|
-
const r2Names = resolveUniqueNames(Object.values(resolvedConfig.bindings?.r2 ?? {}));
|
|
713
|
+
const r2Names = resolveUniqueNames(Object.values(resolvedConfig.bindings?.r2 ?? {}).map((bucket) => normalizeR2Binding(bucket).bucketName));
|
|
714
714
|
const queueNames = collectQueueNames(resolvedConfig);
|
|
715
715
|
const vectorizeNames = collectVectorizeIndexNames(resolvedConfig);
|
|
716
716
|
if (!kvBindings && !d1Bindings && !hyperdriveBindings && r2Names.length === 0 && queueNames.length === 0 && vectorizeNames.length === 0) return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as normalizeSecretsStoreBinding } from "./schema-normalization-CCPigJ7K.js";
|
|
2
2
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
//#region src/secrets/local-secrets.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as normalizeWorkflowBinding } from "./schema-normalization-CCPigJ7K.js";
|
|
2
2
|
import { i as findFiles, r as DEFAULT_WORKFLOW_PATTERN } from "./glob-CmQOvunB.js";
|
|
3
3
|
import { t as bundleWorkerEntry } from "./worker-bundler-dTTnYU3n.js";
|
|
4
4
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as account } from "./cloudflare-BaloqI3H.js";
|
|
2
2
|
import { d as green, f as logLine, g as yellow, h as whiteDim, o as dim, r as createCliTheme } from "./ui-BUoZApvE.js";
|
|
3
|
-
import { n as getConfiguredAccountId } from "./command-utils-
|
|
3
|
+
import { n as getConfiguredAccountId } from "./command-utils-CY3-veEo.js";
|
|
4
4
|
import { t as getDependencies } from "./dependencies-C2oxFjU_.js";
|
|
5
5
|
//#region src/cli/commands/login.ts
|
|
6
6
|
async function logResolvedAccount(cwd, logger, theme) {
|
|
@@ -406,12 +406,18 @@ function materializePreviewScopedConfig(config, options = {}) {
|
|
|
406
406
|
return typeof binding === "string" ? materializePreviewScopedString(binding, options) : binding;
|
|
407
407
|
}) } : {},
|
|
408
408
|
...bindings.r2 ? { r2: mapRecordValues(bindings.r2, (binding) => {
|
|
409
|
-
return materializePreviewScopedString(binding, options)
|
|
409
|
+
return typeof binding === "string" ? materializePreviewScopedString(binding, options) : {
|
|
410
|
+
...binding,
|
|
411
|
+
bucketName: materializePreviewScopedString(binding.bucketName, options)
|
|
412
|
+
};
|
|
410
413
|
}) } : {},
|
|
411
414
|
...bindings.queues ? { queues: {
|
|
412
415
|
...bindings.queues,
|
|
413
|
-
...bindings.queues.producers ? { producers: mapRecordValues(bindings.queues.producers, (
|
|
414
|
-
return materializePreviewScopedString(
|
|
416
|
+
...bindings.queues.producers ? { producers: mapRecordValues(bindings.queues.producers, (producer) => {
|
|
417
|
+
return typeof producer === "string" ? materializePreviewScopedString(producer, options) : {
|
|
418
|
+
...producer,
|
|
419
|
+
queue: materializePreviewScopedString(producer.queue, options)
|
|
420
|
+
};
|
|
415
421
|
}) } : {},
|
|
416
422
|
...bindings.queues.consumers ? { consumers: bindings.queues.consumers.map((consumer) => ({
|
|
417
423
|
...consumer,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { n as materializePreviewScopedConfig, r as materializePreviewScopedString, t as isPreviewScopedName } from "./preview-
|
|
2
|
-
import { l as mergeConfigForEnvironment } from "./loader-
|
|
1
|
+
import { n as materializePreviewScopedConfig, r as materializePreviewScopedString, t as isPreviewScopedName } from "./preview-C3Cdr8an.js";
|
|
2
|
+
import { l as mergeConfigForEnvironment } from "./loader-CQyvmFM2.js";
|
|
3
|
+
import { h as normalizeR2Binding, m as normalizeQueueProducer } from "./schema-normalization-CCPigJ7K.js";
|
|
3
4
|
import { d as getPrimaryAccount, n as getEffectiveAccountId } from "./preferences-BKp_7XJx.js";
|
|
4
5
|
import { _ as listR2Buckets, a as createVectorizeIndex, c as deleteKVNamespace, d as deleteVectorizeIndex, g as listQueues, h as listKVNamespaces, i as createR2Bucket, l as deleteQueue, m as listHyperdrives, n as createKVNamespace, o as deleteD1Database, p as listD1Databases, r as createQueue, s as deleteHyperdrive, t as createD1Database, u as deleteR2Bucket, v as listVectorizeIndexes } from "./account-resources-CsmVowJp.js";
|
|
5
6
|
//#region src/config/preview-resources.ts
|
|
@@ -155,11 +156,11 @@ function collectPreviewScopedResourcePlan(config, options = {}) {
|
|
|
155
156
|
return typeof bindingConfig === "string" ? createPreviewScopedResourceRef(bindingConfig, bindingName, options) : null;
|
|
156
157
|
}).filter((ref) => ref !== null);
|
|
157
158
|
if (bindings.r2) plan.r2 = Object.entries(bindings.r2).map(([bindingName, bindingConfig]) => {
|
|
158
|
-
return createPreviewScopedResourceRef(bindingConfig, bindingName, options);
|
|
159
|
+
return createPreviewScopedResourceRef(normalizeR2Binding(bindingConfig).bucketName, bindingName, options);
|
|
159
160
|
}).filter((ref) => ref !== null);
|
|
160
161
|
if (bindings.queues) {
|
|
161
162
|
const queueRefs = /* @__PURE__ */ new Map();
|
|
162
|
-
for (const
|
|
163
|
+
for (const producer of Object.values(bindings.queues.producers ?? {})) upsertPreviewScopedQueueRef(queueRefs, normalizeQueueProducer(producer).queue, options);
|
|
163
164
|
for (const consumer of bindings.queues.consumers ?? []) {
|
|
164
165
|
upsertPreviewScopedQueueRef(queueRefs, consumer.queue, options);
|
|
165
166
|
if (consumer.deadLetterQueue) upsertPreviewScopedQueueRef(queueRefs, consumer.deadLetterQueue, options);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { a as resolvePreviewIdentifier } from "./preview-
|
|
2
|
-
import { i as resolveConfigPath, o as loadResolvedConfig, r as loadConfig, t as ConfigNotFoundError } from "./loader-
|
|
3
|
-
import { t as compileBuildConfig } from "./compiler-
|
|
1
|
+
import { a as resolvePreviewIdentifier } from "./preview-C3Cdr8an.js";
|
|
2
|
+
import { i as resolveConfigPath, o as loadResolvedConfig, r as loadConfig, t as ConfigNotFoundError } from "./loader-CQyvmFM2.js";
|
|
3
|
+
import { t as compileBuildConfig } from "./compiler-By9RWzea.js";
|
|
4
4
|
import { t as account } from "./cloudflare-BaloqI3H.js";
|
|
5
5
|
import { _ as yellowBold, a as cyanBold, d as green, f as logLine, g as yellow, h as whiteDim, m as red, n as bold, o as dim, r as createCliTheme, u as formatTableLine } from "./ui-BUoZApvE.js";
|
|
6
|
-
import { i as resolveNamedSelection, r as resolveCloudflareAccountId, t as asOptionalString } from "./command-utils-
|
|
6
|
+
import { i as resolveNamedSelection, r as resolveCloudflareAccountId, t as asOptionalString } from "./command-utils-CY3-veEo.js";
|
|
7
7
|
import { t as getDependencies } from "./dependencies-C2oxFjU_.js";
|
|
8
|
-
import { t as cleanupPreviewScopedResources } from "./preview-resources-
|
|
9
|
-
import { t as findConfigPathsUnderDirectory } from "./config-path-
|
|
10
|
-
import { a as orderPreviewWorkerNamesForDeletion, i as collectConfiguredWorkerFamilies, n as buildPreviewWorkerCandidatesByScope, r as buildStableWorkerRowsFromLiveWorkers, t as buildPreviewScopeRowsFromLiveWorkers } from "./family-
|
|
8
|
+
import { t as cleanupPreviewScopedResources } from "./preview-resources-DMieqto4.js";
|
|
9
|
+
import { t as findConfigPathsUnderDirectory } from "./config-path-HP5NIFbF.js";
|
|
10
|
+
import { a as orderPreviewWorkerNamesForDeletion, i as collectConfiguredWorkerFamilies, n as buildPreviewWorkerCandidatesByScope, r as buildStableWorkerRowsFromLiveWorkers, t as buildPreviewScopeRowsFromLiveWorkers } from "./family-C9iQ6WtW.js";
|
|
11
11
|
//#region src/cli/preview-bindings.ts
|
|
12
12
|
function normalizeCell(value) {
|
|
13
13
|
return (value ?? "").trim().replace(/\s+/g, " ");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { r as loadConfig, t as ConfigNotFoundError } from "./loader-
|
|
1
|
+
import { r as loadConfig, t as ConfigNotFoundError } from "./loader-CQyvmFM2.js";
|
|
2
2
|
import { t as account } from "./cloudflare-BaloqI3H.js";
|
|
3
3
|
import { a as cyanBold, d as green, f as logLine, g as yellow, h as whiteDim, l as formatLabelValue, m as red, n as bold, o as dim, p as logTable, r as createCliTheme } from "./ui-BUoZApvE.js";
|
|
4
4
|
import { i as findFiles } from "./glob-CmQOvunB.js";
|
|
5
|
-
import { i as resolveNamedSelection, r as resolveCloudflareAccountId, t as asOptionalString } from "./command-utils-
|
|
5
|
+
import { i as resolveNamedSelection, r as resolveCloudflareAccountId, t as asOptionalString } from "./command-utils-CY3-veEo.js";
|
|
6
6
|
import { t as getDependencies } from "./dependencies-C2oxFjU_.js";
|
|
7
|
-
import { i as collectConfiguredWorkerFamilies } from "./family-
|
|
7
|
+
import { i as collectConfiguredWorkerFamilies } from "./family-C9iQ6WtW.js";
|
|
8
8
|
//#region src/cli/commands/productions.ts
|
|
9
9
|
const CLI_API_OPTIONS = { timeout: 1e4 };
|
|
10
10
|
const PRODUCTION_SUBCOMMANDS = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as configSchema } from "./loader-
|
|
2
|
-
import { c as normalizeHyperdriveBinding, d as normalizeMediaBinding, f as normalizeMtlsCertificateBinding, h as
|
|
1
|
+
import { d as configSchema } from "./loader-CQyvmFM2.js";
|
|
2
|
+
import { _ as normalizeWorkflowBinding, c as normalizeHyperdriveBinding, d as normalizeMediaBinding, f as normalizeMtlsCertificateBinding, g as normalizeSecretsStoreBinding, h as normalizeR2Binding, i as normalizeArtifactsBinding, l as normalizeImagesBinding, m as normalizeQueueProducer, n as getLocalKVNamespaceIdentifier, o as normalizeDOBinding, p as normalizePipelineBinding, s as normalizeDispatchNamespaceBinding, t as getLocalD1DatabaseIdentifier } from "./schema-normalization-CCPigJ7K.js";
|
|
3
3
|
import { n as findDurableObjectClasses } from "./durable-object-DMtH0XYX.js";
|
|
4
4
|
import { r as SUPPORTED_WORKER_EXTENSIONS, t as transformWorkerEntrypoint } from "./worker-entrypoint-CQW77lG8.js";
|
|
5
5
|
import { a as findFilesSync, i as findFiles, t as DEFAULT_DO_PATTERN } from "./glob-CmQOvunB.js";
|
|
@@ -11,7 +11,7 @@ import { dirname as dirname$1, join as join$1, resolve as resolve$1 } from "path
|
|
|
11
11
|
function buildQueueProducers(bindings) {
|
|
12
12
|
if (!bindings.queues?.producers) return;
|
|
13
13
|
const producers = {};
|
|
14
|
-
for (const [bindingName,
|
|
14
|
+
for (const [bindingName, producer] of Object.entries(bindings.queues.producers)) producers[bindingName] = { queueName: normalizeQueueProducer(producer).queue };
|
|
15
15
|
return producers;
|
|
16
16
|
}
|
|
17
17
|
function buildQueueConsumers(bindings) {
|
|
@@ -211,7 +211,7 @@ function buildReferencedWorkerRuntimeConfig(config) {
|
|
|
211
211
|
...config.compatibilityFlags && { compatibilityFlags: config.compatibilityFlags },
|
|
212
212
|
...config.vars && { bindings: config.vars },
|
|
213
213
|
...bindings.kv && { kvNamespaces: Object.fromEntries(Object.entries(bindings.kv).map(([bindingName, bindingConfig]) => [bindingName, getLocalKVNamespaceIdentifier(bindingConfig)])) },
|
|
214
|
-
...bindings.r2 && { r2Buckets: bindings.r2 },
|
|
214
|
+
...bindings.r2 && { r2Buckets: Object.fromEntries(Object.entries(bindings.r2).map(([bindingName, bindingConfig]) => [bindingName, normalizeR2Binding(bindingConfig).bucketName])) },
|
|
215
215
|
...bindings.d1 && { d1Databases: Object.fromEntries(Object.entries(bindings.d1).map(([bindingName, bindingConfig]) => [bindingName, getLocalD1DatabaseIdentifier(bindingConfig)])) },
|
|
216
216
|
...queueProducers && { queueProducers },
|
|
217
217
|
...queueConsumers && { queueConsumers },
|