devflare 1.0.0-next.43 → 1.0.0-next.44
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/LLM.md +1342 -1
- package/dist/_chunks/{account-BJmkb7cc.js → account-Cdo_cRNv.js} +1 -1
- package/dist/_chunks/{build-BkgjOmfq.js → build-MzQbenXE.js} +1 -1
- package/dist/_chunks/{build-artifacts-HPThCdGT.js → build-artifacts-tD45Rwmx.js} +3 -3
- package/dist/_chunks/{cli-5ME5-Ibv.js → cli-BiDDz-RY.js} +12 -12
- package/dist/_chunks/{command-utils-CY3-veEo.js → command-utils-C48hJMln.js} +1 -1
- package/dist/_chunks/{compiler-By9RWzea.js → compiler-Dc97FkBg.js} +42 -2
- package/dist/_chunks/{config-bUY5vBYw.js → config-DQ_uWv37.js} +2 -2
- package/dist/_chunks/{config-path-HP5NIFbF.js → config-path-ePwIvHNX.js} +1 -1
- package/dist/_chunks/{deploy-BrVu07KN.js → deploy-BmtstRbc.js} +5 -5
- package/dist/_chunks/{dev-BbvjuXRA.js → dev-wVHYCbZF.js} +15 -8
- package/dist/_chunks/{doctor-7upvzze6.js → doctor-lFlh-olK.js} +2 -2
- package/dist/_chunks/{family-C9iQ6WtW.js → family-Dfb9VR9g.js} +1 -1
- package/dist/_chunks/{loader-CQyvmFM2.js → loader-RZhqzsRJ.js} +1 -1
- package/dist/_chunks/{local-secrets-Bmm87slY.js → local-secrets-DMPkmOn3.js} +1 -1
- package/dist/_chunks/{local-workflow-entrypoints-ZFHiVbnX.js → local-workflow-entrypoints-Cq_WJajd.js} +1 -1
- package/dist/_chunks/{login-2V8AfKeG.js → login-DnyfffOC.js} +1 -1
- package/dist/_chunks/{preview-resources-DMieqto4.js → preview-resources-xziKCynb.js} +2 -2
- package/dist/_chunks/{previews-BXPrXEU9.js → previews-wI-pW6HM.js} +6 -6
- package/dist/_chunks/{productions-fLG19eus.js → productions-BpROdhLN.js} +3 -3
- package/dist/_chunks/{routes-DKc39Vlu.js → routes-5OnFhKR2.js} +16 -3
- package/dist/_chunks/{schema-normalization-CCPigJ7K.js → schema-normalization-BCwTLTGp.js} +93 -2
- package/dist/_chunks/{secrets-D1RcG79F.js → secrets-DIpJGe6C.js} +1 -1
- package/dist/_chunks/{types-BJjtDDzl.js → types-Zn9vyUGA.js} +11 -3
- package/dist/_chunks/{vite-CrBFLqH3.js → vite-DLUELS0D.js} +4 -4
- package/dist/_chunks/{worker-DO4hIcJA.js → worker-rL5udcl9.js} +4 -4
- package/dist/browser.d.ts +352 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/cli/commands/type-generation/generator.d.ts +9 -0
- 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/types.d.ts +23 -0
- package/dist/config/compiler/types.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/schema-bindings.d.ts +218 -0
- package/dist/config/schema-bindings.d.ts.map +1 -1
- package/dist/config/schema-env.d.ts +244 -0
- package/dist/config/schema-env.d.ts.map +1 -1
- package/dist/config/schema-normalization.d.ts +44 -1
- package/dist/config/schema-normalization.d.ts.map +1 -1
- package/dist/config/schema-types-bindings-platform.d.ts +130 -0
- package/dist/config/schema-types-bindings-platform.d.ts.map +1 -1
- package/dist/config/schema-types-bindings.d.ts +40 -1
- package/dist/config/schema-types-bindings.d.ts.map +1 -1
- package/dist/config/schema.d.ts +442 -4
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/dev-server/miniflare-bindings.d.ts +6 -0
- package/dist/dev-server/miniflare-bindings.d.ts.map +1 -1
- package/dist/dev-server/miniflare-dev-config.d.ts.map +1 -1
- package/dist/dev-server/miniflare-worker-config.d.ts +5 -1
- package/dist/dev-server/miniflare-worker-config.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/sveltekit/index.js +3 -3
- package/dist/test/index.d.ts +1 -1
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/index.js +166 -8
- package/dist/test/offline-bindings.d.ts +5 -3
- package/dist/test/offline-bindings.d.ts.map +1 -1
- package/dist/test/utilities/stream-flagship.d.ts +27 -0
- package/dist/test/utilities/stream-flagship.d.ts.map +1 -0
- package/dist/test/utilities.d.ts +1 -0
- package/dist/test/utilities.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-C48hJMln.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-tD45Rwmx.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
1
|
import { d as resolveConfigEnvVars } from "./preview-C3Cdr8an.js";
|
|
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-
|
|
2
|
+
import { r as loadConfig, u as resolveConfigForEnvironment } from "./loader-RZhqzsRJ.js";
|
|
3
|
+
import { c as writeWranglerConfig, i as isolateViteBuildOutputPaths$1, o as rebaseWranglerConfigPaths, t as compileBuildConfig } from "./compiler-Dc97FkBg.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-DLUELS0D.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-wVHYCbZF.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-MzQbenXE.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-BmtstRbc.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-Zn9vyUGA.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-lFlh-olK.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-DQ_uWv37.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-Cdo_cRNv.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-DnyfffOC.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-wI-pW6HM.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-BpROdhLN.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-rL5udcl9.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-DIpJGe6C.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-RZhqzsRJ.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,5 +1,5 @@
|
|
|
1
|
-
import { f as normalizeCompatibilityFlags, u as resolveConfigForEnvironment } from "./loader-
|
|
2
|
-
import { _ as
|
|
1
|
+
import { f as normalizeCompatibilityFlags, u as resolveConfigForEnvironment } from "./loader-RZhqzsRJ.js";
|
|
2
|
+
import { C as browserBindingSchema, _ as normalizeSecretsStoreBinding, a as normalizeD1Binding, b as normalizeVpcServiceBinding, c as normalizeFlagshipBinding, d as normalizeKVBinding, f as normalizeMediaBinding, g as normalizeR2Binding, h as normalizeQueueProducer, i as normalizeArtifactsBinding, l as normalizeHyperdriveBinding, m as normalizePipelineBinding, o as normalizeDOBinding, p as normalizeMtlsCertificateBinding, r as getSingleBrowserBindingName, s as normalizeDispatchNamespaceBinding, u as normalizeImagesBinding, v as normalizeStreamBinding, x as normalizeWorkflowBinding, y as normalizeVpcNetworkBinding } from "./schema-normalization-BCwTLTGp.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
|
|
@@ -191,6 +191,46 @@ function compileBindings(bindings, result, options = {}, defaultSecretsStoreId)
|
|
|
191
191
|
...normalized.remote !== void 0 && { remote: normalized.remote }
|
|
192
192
|
};
|
|
193
193
|
});
|
|
194
|
+
if (bindings.stream) {
|
|
195
|
+
const [entry] = Object.entries(bindings.stream);
|
|
196
|
+
if (entry) {
|
|
197
|
+
const [binding, config] = entry;
|
|
198
|
+
const normalized = normalizeStreamBinding(binding, config);
|
|
199
|
+
result.stream = {
|
|
200
|
+
binding: normalized.binding,
|
|
201
|
+
...normalized.remote !== void 0 && { remote: normalized.remote }
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
if (bindings.vpcServices) result.vpc_services = Object.entries(bindings.vpcServices).map(([binding, config]) => {
|
|
206
|
+
const normalized = normalizeVpcServiceBinding(config);
|
|
207
|
+
return {
|
|
208
|
+
binding,
|
|
209
|
+
service_id: normalized.serviceId,
|
|
210
|
+
...normalized.remote !== void 0 && { remote: normalized.remote }
|
|
211
|
+
};
|
|
212
|
+
});
|
|
213
|
+
if (bindings.vpcNetworks) result.vpc_networks = Object.entries(bindings.vpcNetworks).map(([binding, config]) => {
|
|
214
|
+
const normalized = normalizeVpcNetworkBinding(config);
|
|
215
|
+
if (normalized.tunnelId !== void 0) return {
|
|
216
|
+
binding,
|
|
217
|
+
tunnel_id: normalized.tunnelId,
|
|
218
|
+
...normalized.remote !== void 0 && { remote: normalized.remote }
|
|
219
|
+
};
|
|
220
|
+
return {
|
|
221
|
+
binding,
|
|
222
|
+
network_id: normalized.networkId,
|
|
223
|
+
...normalized.remote !== void 0 && { remote: normalized.remote }
|
|
224
|
+
};
|
|
225
|
+
});
|
|
226
|
+
if (bindings.flagship) result.flagship = Object.entries(bindings.flagship).map(([binding, config]) => {
|
|
227
|
+
const normalized = normalizeFlagshipBinding(config);
|
|
228
|
+
return {
|
|
229
|
+
binding,
|
|
230
|
+
app_id: normalized.appId,
|
|
231
|
+
...normalized.remote !== void 0 && { remote: normalized.remote }
|
|
232
|
+
};
|
|
233
|
+
});
|
|
194
234
|
if (bindings.secretsStore) result.secrets_store_secrets = Object.entries(bindings.secretsStore).map(([binding, config]) => {
|
|
195
235
|
const normalized = normalizeSecretsStoreBinding(config, defaultSecretsStoreId, binding);
|
|
196
236
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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-
|
|
3
|
-
import { n as compileConfig, t as compileBuildConfig } from "./compiler-
|
|
2
|
+
import { a as ConfigResourceResolutionError, o as loadResolvedConfig, r as loadConfig, s as resolveResources } from "./loader-RZhqzsRJ.js";
|
|
3
|
+
import { n as compileConfig, t as compileBuildConfig } from "./compiler-Dc97FkBg.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
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-
|
|
3
|
-
import { a as readWranglerConfig, c as writeWranglerConfig, n as compileConfig, o as rebaseWranglerConfigPaths, s as stringifyConfig, t as compileBuildConfig } from "./compiler-
|
|
2
|
+
import { c as prepareConfigResourcesForDeploy, r as loadConfig, u as resolveConfigForEnvironment } from "./loader-RZhqzsRJ.js";
|
|
3
|
+
import { a as readWranglerConfig, c as writeWranglerConfig, n as compileConfig, o as rebaseWranglerConfigPaths, s as stringifyConfig, t as compileBuildConfig } from "./compiler-Dc97FkBg.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-C48hJMln.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-tD45Rwmx.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-xziKCynb.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
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-
|
|
3
|
-
import {
|
|
2
|
+
import { i as resolveConfigPath, r as loadConfig } from "./loader-RZhqzsRJ.js";
|
|
3
|
+
import { g as normalizeR2Binding, n as getLocalKVNamespaceIdentifier, r as getSingleBrowserBindingName, t as getLocalD1DatabaseIdentifier } from "./schema-normalization-BCwTLTGp.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
|
|
7
|
+
import { C as buildStreamConfig, E as buildWorkflowsConfig, S as buildSendEmailConfig, T as buildWorkerLoadersConfig, _ as buildPipelinesConfig, b as buildRateLimitsConfig, c as buildAiSearchInstancesConfig, d as buildDispatchNamespacesConfig, f as buildFlagshipConfig, g as buildMtlsCertificatesConfig, h as buildMediaConfig, l as buildAiSearchNamespacesConfig, m as buildImagesConfig, n as getRouteDirectoryCandidate, p as buildHyperdrivesConfig, s as resolveServiceBindings, t as discoverRoutes, u as buildArtifactsConfig, v as buildQueueConsumers, w as buildVersionMetadataConfig, x as buildSecretsStoreConfig, y as buildQueueProducers } from "./routes-5OnFhKR2.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-DLUELS0D.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-Cq_WJajd.js";
|
|
13
|
+
import { n as buildLocalSecretWrappedBindingConfig } from "./local-secrets-DMPkmOn3.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";
|
|
@@ -1905,7 +1905,7 @@ function buildServiceBindings(bindings, extraBindings = {}) {
|
|
|
1905
1905
|
* All inputs are passed explicitly (no closures over the caller's locals).
|
|
1906
1906
|
*/
|
|
1907
1907
|
function makeMiniflareWorker(context, options) {
|
|
1908
|
-
const { cwd, loadedConfig, bindings, sendEmailConfig, rateLimitsConfig, versionMetadataConfig, workerLoadersConfig, mtlsCertificatesConfig, dispatchNamespacesConfig, workflowsConfig, pipelinesConfig, hyperdrivesConfig, imagesConfig, mediaConfig, artifactsConfig, aiSearchNamespacesConfig, aiSearchInstancesConfig, secretsStoreConfig, localSecretWrappedBindingConfig, queueProducers } = context;
|
|
1908
|
+
const { cwd, loadedConfig, bindings, sendEmailConfig, rateLimitsConfig, versionMetadataConfig, workerLoadersConfig, mtlsCertificatesConfig, dispatchNamespacesConfig, workflowsConfig, pipelinesConfig, hyperdrivesConfig, imagesConfig, mediaConfig, streamConfig, flagshipConfig, artifactsConfig, aiSearchNamespacesConfig, aiSearchInstancesConfig, secretsStoreConfig, localSecretWrappedBindingConfig, queueProducers } = context;
|
|
1909
1909
|
const baseFlags = loadedConfig.compatibilityFlags ?? [];
|
|
1910
1910
|
const compatFlags = baseFlags.includes("nodejs_compat") ? baseFlags : [...baseFlags, "nodejs_compat"];
|
|
1911
1911
|
const workerBindings = loadedConfig.vars ?? {};
|
|
@@ -1936,6 +1936,8 @@ function makeMiniflareWorker(context, options) {
|
|
|
1936
1936
|
...hyperdrivesConfig && { hyperdrives: hyperdrivesConfig },
|
|
1937
1937
|
...imagesConfig && { images: imagesConfig },
|
|
1938
1938
|
...mediaConfig && { media: mediaConfig },
|
|
1939
|
+
...streamConfig && { stream: streamConfig },
|
|
1940
|
+
...flagshipConfig && { flagship: flagshipConfig },
|
|
1939
1941
|
...artifactsConfig && { artifacts: artifactsConfig },
|
|
1940
1942
|
...aiSearchNamespacesConfig && { aiSearchNamespaces: aiSearchNamespacesConfig },
|
|
1941
1943
|
...aiSearchInstancesConfig && { aiSearchInstances: aiSearchInstancesConfig },
|
|
@@ -2011,7 +2013,8 @@ function buildMiniflareDevConfig(input) {
|
|
|
2011
2013
|
d1Persist: persist ? `${persistPath}/d1` : void 0,
|
|
2012
2014
|
durableObjectsPersist: persist ? `${persistPath}/do` : void 0,
|
|
2013
2015
|
workflowsPersist: persist ? `${persistPath}/workflows` : void 0,
|
|
2014
|
-
imagesPersist: persist ? `${persistPath}/images` : void 0
|
|
2016
|
+
imagesPersist: persist ? `${persistPath}/images` : void 0,
|
|
2017
|
+
streamPersist: persist ? `${persistPath}/stream` : void 0
|
|
2015
2018
|
};
|
|
2016
2019
|
const localBindingShimServiceConfig = buildLocalBindingShimServiceConfig(loadedConfig);
|
|
2017
2020
|
const createServiceBindings = (extraBindings = {}) => buildServiceBindings(bindings, {
|
|
@@ -2030,6 +2033,8 @@ function buildMiniflareDevConfig(input) {
|
|
|
2030
2033
|
const hyperdrivesConfig = buildHyperdrivesConfig(bindings);
|
|
2031
2034
|
const imagesConfig = bindings.images ? void 0 : buildImagesConfig(bindings);
|
|
2032
2035
|
const mediaConfig = bindings.media ? void 0 : buildMediaConfig(bindings);
|
|
2036
|
+
const streamConfig = buildStreamConfig(bindings);
|
|
2037
|
+
const flagshipConfig = buildFlagshipConfig(bindings);
|
|
2033
2038
|
const artifactsConfig = buildArtifactsConfig(bindings);
|
|
2034
2039
|
const aiSearchNamespacesConfig = buildAiSearchNamespacesConfig(bindings);
|
|
2035
2040
|
const aiSearchInstancesConfig = buildAiSearchInstancesConfig(bindings);
|
|
@@ -2050,6 +2055,8 @@ function buildMiniflareDevConfig(input) {
|
|
|
2050
2055
|
hyperdrivesConfig,
|
|
2051
2056
|
imagesConfig,
|
|
2052
2057
|
mediaConfig,
|
|
2058
|
+
streamConfig,
|
|
2059
|
+
flagshipConfig,
|
|
2053
2060
|
artifactsConfig,
|
|
2054
2061
|
aiSearchNamespacesConfig,
|
|
2055
2062
|
aiSearchInstancesConfig,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { r as loadConfig } from "./loader-
|
|
1
|
+
import { r as loadConfig } from "./loader-RZhqzsRJ.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-ePwIvHNX.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-RZhqzsRJ.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
1
|
import { l as isEnvVarDescriptor, n as materializePreviewScopedConfig, u as loadDevflareDotenvIntoProcess } from "./preview-C3Cdr8an.js";
|
|
2
|
-
import {
|
|
2
|
+
import { S as bindingsSchema, a as normalizeD1Binding, d as normalizeKVBinding, g as normalizeR2Binding, h as normalizeQueueProducer, l as normalizeHyperdriveBinding, n as getLocalKVNamespaceIdentifier, t as getLocalD1DatabaseIdentifier } from "./schema-normalization-BCwTLTGp.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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as normalizeSecretsStoreBinding } from "./schema-normalization-BCwTLTGp.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 { x as normalizeWorkflowBinding } from "./schema-normalization-BCwTLTGp.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-C48hJMln.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) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as materializePreviewScopedConfig, r as materializePreviewScopedString, t as isPreviewScopedName } from "./preview-C3Cdr8an.js";
|
|
2
|
-
import { l as mergeConfigForEnvironment } from "./loader-
|
|
3
|
-
import {
|
|
2
|
+
import { l as mergeConfigForEnvironment } from "./loader-RZhqzsRJ.js";
|
|
3
|
+
import { g as normalizeR2Binding, h as normalizeQueueProducer } from "./schema-normalization-BCwTLTGp.js";
|
|
4
4
|
import { d as getPrimaryAccount, n as getEffectiveAccountId } from "./preferences-BKp_7XJx.js";
|
|
5
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";
|
|
6
6
|
//#region src/config/preview-resources.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
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-
|
|
3
|
-
import { t as compileBuildConfig } from "./compiler-
|
|
2
|
+
import { i as resolveConfigPath, o as loadResolvedConfig, r as loadConfig, t as ConfigNotFoundError } from "./loader-RZhqzsRJ.js";
|
|
3
|
+
import { t as compileBuildConfig } from "./compiler-Dc97FkBg.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-C48hJMln.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-xziKCynb.js";
|
|
9
|
+
import { t as findConfigPathsUnderDirectory } from "./config-path-ePwIvHNX.js";
|
|
10
|
+
import { a as orderPreviewWorkerNamesForDeletion, i as collectConfiguredWorkerFamilies, n as buildPreviewWorkerCandidatesByScope, r as buildStableWorkerRowsFromLiveWorkers, t as buildPreviewScopeRowsFromLiveWorkers } from "./family-Dfb9VR9g.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-RZhqzsRJ.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-C48hJMln.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-Dfb9VR9g.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 { _ as
|
|
1
|
+
import { d as configSchema } from "./loader-RZhqzsRJ.js";
|
|
2
|
+
import { _ as normalizeSecretsStoreBinding, c as normalizeFlagshipBinding, f as normalizeMediaBinding, g as normalizeR2Binding, h as normalizeQueueProducer, i as normalizeArtifactsBinding, l as normalizeHyperdriveBinding, m as normalizePipelineBinding, n as getLocalKVNamespaceIdentifier, o as normalizeDOBinding, p as normalizeMtlsCertificateBinding, s as normalizeDispatchNamespaceBinding, t as getLocalD1DatabaseIdentifier, u as normalizeImagesBinding, v as normalizeStreamBinding, x as normalizeWorkflowBinding } from "./schema-normalization-BCwTLTGp.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";
|
|
@@ -101,6 +101,19 @@ function buildMediaConfig(bindings) {
|
|
|
101
101
|
const [bindingName, binding] = entry;
|
|
102
102
|
return { binding: normalizeMediaBinding(bindingName, binding).binding };
|
|
103
103
|
}
|
|
104
|
+
function buildStreamConfig(bindings) {
|
|
105
|
+
if (!bindings.stream) return;
|
|
106
|
+
const [entry] = Object.entries(bindings.stream);
|
|
107
|
+
if (!entry) return;
|
|
108
|
+
const [bindingName, binding] = entry;
|
|
109
|
+
return { binding: normalizeStreamBinding(bindingName, binding).binding };
|
|
110
|
+
}
|
|
111
|
+
function buildFlagshipConfig(bindings) {
|
|
112
|
+
if (!bindings.flagship) return;
|
|
113
|
+
return Object.fromEntries(Object.entries(bindings.flagship).map(([bindingName, binding]) => {
|
|
114
|
+
return [bindingName, { app_id: normalizeFlagshipBinding(binding).appId }];
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
104
117
|
function buildArtifactsConfig(bindings) {
|
|
105
118
|
if (!bindings.artifacts) return;
|
|
106
119
|
return Object.fromEntries(Object.entries(bindings.artifacts).map(([bindingName, binding]) => {
|
|
@@ -793,4 +806,4 @@ async function discoverRoutes(cwd, config) {
|
|
|
793
806
|
};
|
|
794
807
|
}
|
|
795
808
|
//#endregion
|
|
796
|
-
export {
|
|
809
|
+
export { buildStreamConfig as C, buildWorkflowsConfig as E, buildSendEmailConfig as S, buildWorkerLoadersConfig as T, buildPipelinesConfig as _, hasServiceBindings as a, buildRateLimitsConfig as b, buildAiSearchInstancesConfig as c, buildDispatchNamespacesConfig as d, buildFlagshipConfig as f, buildMtlsCertificatesConfig as g, buildMediaConfig as h, hasCrossWorkerDOs as i, buildAiSearchNamespacesConfig as l, buildImagesConfig as m, getRouteDirectoryCandidate as n, resolveDOBindings as o, buildHyperdrivesConfig as p, clearBundleCache as r, resolveServiceBindings as s, discoverRoutes as t, buildArtifactsConfig as u, buildQueueConsumers as v, buildVersionMetadataConfig as w, buildSecretsStoreConfig as x, buildQueueProducers as y };
|
|
@@ -296,6 +296,45 @@ const artifactsBindingSchema = z.union([z.string().min(1), z.object({
|
|
|
296
296
|
remote: z.boolean().optional()
|
|
297
297
|
}).strict()]);
|
|
298
298
|
/**
|
|
299
|
+
* CF-2 — Cloudflare Stream binding (video upload/playback service).
|
|
300
|
+
* Mirrors the Images/Media singleton shape: `true` shorthand or `{ remote? }`.
|
|
301
|
+
*/
|
|
302
|
+
const streamBindingSchema = z.object({ remote: z.boolean().optional() }).strict().or(z.literal(true));
|
|
303
|
+
/**
|
|
304
|
+
* CF-2 — VPC service binding. Connects the Worker to a private service through
|
|
305
|
+
* a Cloudflare VPC connectivity service. Compiles to wrangler's `vpc_services`.
|
|
306
|
+
*/
|
|
307
|
+
const vpcServiceBindingSchema = z.object({
|
|
308
|
+
serviceId: z.string().min(1),
|
|
309
|
+
remote: z.boolean().optional()
|
|
310
|
+
}).strict();
|
|
311
|
+
/**
|
|
312
|
+
* CF-2 — VPC network binding routed through a Cloudflare Tunnel (`tunnelId`).
|
|
313
|
+
*/
|
|
314
|
+
const vpcNetworkByTunnelSchema = z.object({
|
|
315
|
+
tunnelId: z.string().min(1),
|
|
316
|
+
remote: z.boolean().optional()
|
|
317
|
+
}).strict();
|
|
318
|
+
/**
|
|
319
|
+
* CF-2 — VPC network binding routed through a network ID (`networkId`).
|
|
320
|
+
*/
|
|
321
|
+
const vpcNetworkByNetworkSchema = z.object({
|
|
322
|
+
networkId: z.string().min(1),
|
|
323
|
+
remote: z.boolean().optional()
|
|
324
|
+
}).strict();
|
|
325
|
+
/**
|
|
326
|
+
* CF-2 — VPC network binding. Use exactly one of `tunnelId` or `networkId`.
|
|
327
|
+
*/
|
|
328
|
+
const vpcNetworkBindingSchema = z.union([vpcNetworkByTunnelSchema, vpcNetworkByNetworkSchema]);
|
|
329
|
+
/**
|
|
330
|
+
* CF-2 — Flagship feature-flag binding. Compiles to wrangler's `flagship`
|
|
331
|
+
* array (`app_id`).
|
|
332
|
+
*/
|
|
333
|
+
const flagshipBindingSchema = z.object({
|
|
334
|
+
appId: z.string().min(1),
|
|
335
|
+
remote: z.boolean().optional()
|
|
336
|
+
}).strict();
|
|
337
|
+
/**
|
|
299
338
|
* All worker bindings configuration.
|
|
300
339
|
* Defines connections to Cloudflare services and resources.
|
|
301
340
|
*/
|
|
@@ -336,7 +375,17 @@ const bindingsSchema = z.object({
|
|
|
336
375
|
message: "Wrangler currently supports one Media Transformations binding per Worker"
|
|
337
376
|
});
|
|
338
377
|
}),
|
|
339
|
-
artifacts: z.record(z.string(), artifactsBindingSchema).optional()
|
|
378
|
+
artifacts: z.record(z.string(), artifactsBindingSchema).optional(),
|
|
379
|
+
stream: z.record(z.string(), streamBindingSchema).optional().superRefine((bindings, ctx) => {
|
|
380
|
+
if (!bindings || Object.keys(bindings).length <= 1) return;
|
|
381
|
+
ctx.addIssue({
|
|
382
|
+
code: z.ZodIssueCode.custom,
|
|
383
|
+
message: "Wrangler currently supports one Stream binding per Worker"
|
|
384
|
+
});
|
|
385
|
+
}),
|
|
386
|
+
vpcServices: z.record(z.string(), vpcServiceBindingSchema).optional(),
|
|
387
|
+
vpcNetworks: z.record(z.string(), vpcNetworkBindingSchema).optional(),
|
|
388
|
+
flagship: z.record(z.string(), flagshipBindingSchema).optional()
|
|
340
389
|
}).optional();
|
|
341
390
|
//#endregion
|
|
342
391
|
//#region src/config/schema-normalization.ts
|
|
@@ -536,6 +585,48 @@ function normalizeArtifactsBinding(config) {
|
|
|
536
585
|
};
|
|
537
586
|
}
|
|
538
587
|
/**
|
|
588
|
+
* Normalize a Stream binding to Wrangler's singleton binding object.
|
|
589
|
+
*/
|
|
590
|
+
function normalizeStreamBinding(binding, config) {
|
|
591
|
+
if (config === true) return { binding };
|
|
592
|
+
return {
|
|
593
|
+
binding,
|
|
594
|
+
...config.remote !== void 0 && { remote: config.remote }
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Normalize a VPC service binding to its object form.
|
|
599
|
+
*/
|
|
600
|
+
function normalizeVpcServiceBinding(config) {
|
|
601
|
+
return {
|
|
602
|
+
serviceId: config.serviceId,
|
|
603
|
+
...config.remote !== void 0 && { remote: config.remote }
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Normalize a VPC network binding to its object form. Exactly one of
|
|
608
|
+
* `tunnelId`/`networkId` is set, mirroring the wrangler `anyOf` schema.
|
|
609
|
+
*/
|
|
610
|
+
function normalizeVpcNetworkBinding(config) {
|
|
611
|
+
if ("tunnelId" in config) return {
|
|
612
|
+
tunnelId: config.tunnelId,
|
|
613
|
+
...config.remote !== void 0 && { remote: config.remote }
|
|
614
|
+
};
|
|
615
|
+
return {
|
|
616
|
+
networkId: config.networkId,
|
|
617
|
+
...config.remote !== void 0 && { remote: config.remote }
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* Normalize a Flagship binding to its object form.
|
|
622
|
+
*/
|
|
623
|
+
function normalizeFlagshipBinding(config) {
|
|
624
|
+
return {
|
|
625
|
+
appId: config.appId,
|
|
626
|
+
...config.remote !== void 0 && { remote: config.remote }
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
539
630
|
* Normalize a Secrets Store binding to its explicit store/name form.
|
|
540
631
|
*/
|
|
541
632
|
function normalizeSecretsStoreBinding(config, defaultStoreId, bindingName = "unknown") {
|
|
@@ -566,4 +657,4 @@ function getLocalD1DatabaseIdentifier(config) {
|
|
|
566
657
|
return normalized.databaseId ?? normalized.name ?? "";
|
|
567
658
|
}
|
|
568
659
|
//#endregion
|
|
569
|
-
export {
|
|
660
|
+
export { browserBindingSchema as C, bindingsSchema as S, normalizeSecretsStoreBinding as _, normalizeD1Binding as a, normalizeVpcServiceBinding as b, normalizeFlagshipBinding as c, normalizeKVBinding as d, normalizeMediaBinding as f, normalizeR2Binding as g, normalizeQueueProducer as h, normalizeArtifactsBinding as i, normalizeHyperdriveBinding as l, normalizePipelineBinding as m, getLocalKVNamespaceIdentifier as n, normalizeDOBinding as o, normalizeMtlsCertificateBinding as p, getSingleBrowserBindingName as r, normalizeDispatchNamespaceBinding as s, getLocalD1DatabaseIdentifier as t, normalizeImagesBinding as u, normalizeStreamBinding as v, normalizeWorkflowBinding as x, normalizeVpcNetworkBinding as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as listLocalSecrets, o as writeLocalSecret, r as deleteLocalSecret } from "./local-secrets-
|
|
1
|
+
import { i as listLocalSecrets, o as writeLocalSecret, r as deleteLocalSecret } from "./local-secrets-DMPkmOn3.js";
|
|
2
2
|
//#region src/cli/commands/secrets.ts
|
|
3
3
|
function getStringOption(options, key) {
|
|
4
4
|
const value = options[key];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as loadConfig } from "./loader-
|
|
2
|
-
import { o as normalizeDOBinding } from "./schema-normalization-
|
|
1
|
+
import { r as loadConfig } from "./loader-RZhqzsRJ.js";
|
|
2
|
+
import { o as normalizeDOBinding } from "./schema-normalization-BCwTLTGp.js";
|
|
3
3
|
import { n as bold, o as dim, r as createCliTheme } from "./ui-BUoZApvE.js";
|
|
4
4
|
import { n as findDurableObjectClasses } from "./durable-object-DMtH0XYX.js";
|
|
5
5
|
import { i as findFiles, n as DEFAULT_ENTRYPOINT_PATTERN, t as DEFAULT_DO_PATTERN } from "./glob-CmQOvunB.js";
|
|
6
6
|
import { n as discoverEntrypointsAsync, t as resolvePackageSpecifier } from "./resolve-package-qizBfCIm.js";
|
|
7
7
|
import { t as getDependencies } from "./dependencies-C2oxFjU_.js";
|
|
8
|
-
import { r as resolveConfigCandidatePath } from "./config-path-
|
|
8
|
+
import { r as resolveConfigCandidatePath } from "./config-path-ePwIvHNX.js";
|
|
9
9
|
import { readFile } from "node:fs/promises";
|
|
10
10
|
import { dirname, relative, resolve } from "pathe";
|
|
11
11
|
//#region src/cli/commands/type-generation/discovery.ts
|
|
@@ -235,6 +235,10 @@ function generateBindingMembers(config, doClassMap, crossWorkerDOMap, serviceBin
|
|
|
235
235
|
}
|
|
236
236
|
if (config.bindings.images) for (const binding of Object.keys(config.bindings.images)) lines.push(`${indent}${binding}: ImagesBinding`);
|
|
237
237
|
if (config.bindings.media) for (const binding of Object.keys(config.bindings.media)) lines.push(`${indent}${binding}: MediaBinding`);
|
|
238
|
+
if (config.bindings.stream) for (const binding of Object.keys(config.bindings.stream)) lines.push(`${indent}${binding}: StreamBinding`);
|
|
239
|
+
if (config.bindings.flagship) for (const binding of Object.keys(config.bindings.flagship)) lines.push(`${indent}${binding}: Flagship`);
|
|
240
|
+
if (config.bindings.vpcServices) for (const binding of Object.keys(config.bindings.vpcServices)) lines.push(`${indent}${binding}: Fetcher`);
|
|
241
|
+
if (config.bindings.vpcNetworks) for (const binding of Object.keys(config.bindings.vpcNetworks)) lines.push(`${indent}${binding}: Fetcher`);
|
|
238
242
|
if (config.bindings.artifacts) for (const binding of Object.keys(config.bindings.artifacts)) lines.push(`${indent}${binding}: Artifacts`);
|
|
239
243
|
if (config.bindings.secretsStore) for (const binding of Object.keys(config.bindings.secretsStore)) lines.push(`${indent}${binding}: SecretsStoreSecret`);
|
|
240
244
|
if (config.bindings.services) for (const binding of Object.keys(config.bindings.services)) {
|
|
@@ -315,6 +319,10 @@ function generateBindingTypes(config, discoveredDOs, discoveredEntrypoints, refe
|
|
|
315
319
|
if (config.bindings.workflows && Object.keys(config.bindings.workflows).length > 0) usedTypes.add("Workflow");
|
|
316
320
|
if (config.bindings.images && Object.keys(config.bindings.images).length > 0) usedTypes.add("ImagesBinding");
|
|
317
321
|
if (config.bindings.media && Object.keys(config.bindings.media).length > 0) usedTypes.add("MediaBinding");
|
|
322
|
+
if (config.bindings.stream && Object.keys(config.bindings.stream).length > 0) usedTypes.add("StreamBinding");
|
|
323
|
+
if (config.bindings.flagship && Object.keys(config.bindings.flagship).length > 0) usedTypes.add("Flagship");
|
|
324
|
+
if (config.bindings.vpcServices && Object.keys(config.bindings.vpcServices).length > 0) usedTypes.add("Fetcher");
|
|
325
|
+
if (config.bindings.vpcNetworks && Object.keys(config.bindings.vpcNetworks).length > 0) usedTypes.add("Fetcher");
|
|
318
326
|
if (config.bindings.artifacts && Object.keys(config.bindings.artifacts).length > 0) usedTypes.add("Artifacts");
|
|
319
327
|
if (config.bindings.secretsStore && Object.keys(config.bindings.secretsStore).length > 0) usedTypes.add("SecretsStoreSecret");
|
|
320
328
|
if (config.bindings.services) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { d as resolveConfigEnvVars } from "./preview-C3Cdr8an.js";
|
|
2
|
-
import { i as resolveConfigPath, o as loadResolvedConfig, r as loadConfig, s as resolveResources, u as resolveConfigForEnvironment } from "./loader-
|
|
3
|
-
import { o as normalizeDOBinding } from "./schema-normalization-
|
|
4
|
-
import { c as writeWranglerConfig, i as isolateViteBuildOutputPaths, n as compileConfig, o as rebaseWranglerConfigPaths, r as compileToProgrammaticConfig, t as compileBuildConfig } from "./compiler-
|
|
5
|
-
import { s as resolveServiceBindings, t as discoverRoutes } from "./routes-
|
|
2
|
+
import { i as resolveConfigPath, o as loadResolvedConfig, r as loadConfig, s as resolveResources, u as resolveConfigForEnvironment } from "./loader-RZhqzsRJ.js";
|
|
3
|
+
import { o as normalizeDOBinding } from "./schema-normalization-BCwTLTGp.js";
|
|
4
|
+
import { c as writeWranglerConfig, i as isolateViteBuildOutputPaths, n as compileConfig, o as rebaseWranglerConfigPaths, r as compileToProgrammaticConfig, t as compileBuildConfig } from "./compiler-Dc97FkBg.js";
|
|
5
|
+
import { s as resolveServiceBindings, t as discoverRoutes } from "./routes-5OnFhKR2.js";
|
|
6
6
|
import { n as findDurableObjectClasses } from "./durable-object-DMtH0XYX.js";
|
|
7
7
|
import { r as SUPPORTED_WORKER_EXTENSIONS } from "./worker-entrypoint-CQW77lG8.js";
|
|
8
8
|
import { i as findFiles, t as DEFAULT_DO_PATTERN } from "./glob-CmQOvunB.js";
|