devflare 1.0.0-next.64 → 1.0.0-next.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/_chunks/{account-Cflj6rw3.js → account-BHY3fvrA.js} +6 -6
- package/dist/_chunks/{account-resources-CsmVowJp.js → account-resources-BdKj8q1h.js} +3 -3
- package/dist/_chunks/{ai-CBEuLdoP.js → ai-CN_SREim.js} +1 -1
- package/dist/_chunks/{build-BZ6lIG7n.js → build-DCgW1i8g.js} +2 -2
- package/dist/_chunks/{build-artifacts-CXLdD1PE.js → build-artifacts-Btqs5gPy.js} +12 -12
- package/dist/_chunks/{cli-Bf3qZEGS.js → cli-CWKMIIcG.js} +63 -20
- package/dist/_chunks/{cloudflare-BaloqI3H.js → cloudflare-Ic5ubQza.js} +6 -6
- package/dist/_chunks/{command-utils-CSnoFdxM.js → command-utils-DjaaMQX7.js} +2 -2
- package/dist/_chunks/{compiler-CgIFPfRA.js → compiler-UxXQgEPq.js} +3 -3
- package/dist/_chunks/{config-path-C3ac6r66.js → config-path-CYGlwKDs.js} +2 -2
- package/dist/_chunks/{config-BwRb2_vD.js → config-zQd4jmXU.js} +3 -3
- package/dist/_chunks/{deploy-CujD7j-R.js → deploy-DqYme109.js} +13 -13
- package/dist/_chunks/dev-DOoDj7SJ.js +757 -0
- package/dist/_chunks/{doctor-n_eqvv52.js → doctor-CAsJ-rSZ.js} +7 -7
- package/dist/_chunks/{env-_QKteEYJ.js → env-DyL6JOXI.js} +1 -1
- package/dist/_chunks/{family-D3SV6I0N.js → family-BTTpTwUk.js} +1 -1
- package/dist/_chunks/{init-DnkJOmpW.js → init-DJ5y3mu5.js} +3 -3
- package/dist/_chunks/{loader-E_UGyTrJ.js → loader-BC0skbnH.js} +5 -5
- package/dist/_chunks/{local-secrets-6sMstHXw.js → local-secrets-C0n5oRgI.js} +1 -1
- package/dist/_chunks/{login-D9-EwpSA.js → login-CgNcbpEq.js} +4 -4
- package/dist/_chunks/{preferences-BKp_7XJx.js → preferences-CbYERA_m.js} +1 -1
- package/dist/_chunks/{preview-registry-ClAbLTHH.js → preview-registry-CTXU4mBc.js} +2 -2
- package/dist/_chunks/{preview-resources-D_aFwtZR.js → preview-resources-CQIu2-NY.js} +5 -5
- package/dist/_chunks/{previews-D-GPVCeq.js → previews-BIaw6NVC.js} +10 -10
- package/dist/_chunks/{productions-me2YvmWK.js → productions-CF8oQcX7.js} +7 -7
- package/dist/_chunks/{r2-presign-runtime-zTOLS0Ea.js → r2-presign-runtime-C75FkLMd.js} +4 -4
- package/dist/_chunks/{remote-CZnP-HLJ.js → remote-8jEHLVGg.js} +2 -2
- package/dist/_chunks/{resolve-package-qizBfCIm.js → resolve-package-DeJUGxoE.js} +1 -1
- package/dist/_chunks/{routes-BMU7ga_l.js → routes-CRXB3-iw.js} +6 -6
- package/dist/_chunks/{runtime-Ckf-KKc7.js → runtime-CuMe2D6n.js} +1 -1
- package/dist/_chunks/{secrets-CxVCXmdh.js → secrets-BJuEa9Jz.js} +1 -1
- package/dist/_chunks/{tail-aMFzd-2K.js → tail-DjGRt8gw.js} +4 -4
- package/dist/_chunks/{token-Dmi0KXyX.js → token-wmeF8-IQ.js} +4 -4
- package/dist/_chunks/{tokens-iVcgNXi-.js → tokens-KaEr4B8e.js} +1 -1
- package/dist/_chunks/{types-ByjwxoVA.js → types-BLGfxIq-.js} +9 -9
- package/dist/_chunks/{ui-BUoZApvE.js → ui-BhCdDC2N.js} +1 -1
- package/dist/_chunks/{usage-BBTGzjon.js → usage-rRusKejc.js} +2 -2
- package/dist/_chunks/{vite-BBiqD3k7.js → vite-Dxuhm1BP.js} +11 -11
- package/dist/_chunks/{dev-C3PpZ4zg.js → vite-process-BxZ8pb7i.js} +25 -766
- package/dist/_chunks/{worker-CtTVZeTH.js → worker-DgczaXVW.js} +6 -6
- package/dist/_chunks/workspace-CaTsTpDI.js +506 -0
- package/dist/_chunks/workspace-Ds3xMjOE.js +175 -0
- package/dist/browser.js +4 -4
- package/dist/cli/commands/workspace.d.ts +8 -0
- package/dist/cli/commands/workspace.d.ts.map +1 -0
- package/dist/cli/help-pages/pages/core.d.ts +1 -1
- package/dist/cli/help-pages/pages/core.d.ts.map +1 -1
- package/dist/cli/help-pages/shared.d.ts +1 -1
- package/dist/cli/help-pages/shared.d.ts.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cloudflare/index.js +3 -3
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/workspace.d.ts +282 -0
- package/dist/config/workspace.d.ts.map +1 -0
- package/dist/config-entry.js +1 -1
- package/dist/decorators/index.js +1 -1
- package/dist/dev-server/miniflare-dev-config.d.ts +8 -0
- package/dist/dev-server/miniflare-dev-config.d.ts.map +1 -1
- package/dist/dev-server/workspace/merge-config.d.ts +81 -0
- package/dist/dev-server/workspace/merge-config.d.ts.map +1 -0
- package/dist/dev-server/workspace/prepare-app.d.ts +84 -0
- package/dist/dev-server/workspace/prepare-app.d.ts.map +1 -0
- package/dist/dev-server/workspace/server.d.ts +47 -0
- package/dist/dev-server/workspace/server.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -8
- package/dist/runtime/index.js +3 -3
- package/dist/sveltekit/index.js +6 -6
- package/dist/test/index.js +17 -17
- package/dist/vite/index.js +1 -1
- package/package.json +1 -1
- package/dist/_chunks/{api-TzdliH-6.js → api-BKClUlUf.js} +0 -0
- package/dist/_chunks/{colors-DiK6wPJ5.js → colors-D0NVzAFN.js} +0 -0
- package/dist/_chunks/{context-CQkLyah9.js → context-ZQydom21.js} +0 -0
- package/dist/_chunks/{decorators-QmV57ixr.js → decorators-eXNZ1S0N.js} +0 -0
- package/dist/_chunks/{dependencies-C2oxFjU_.js → dependencies-wKqrxKV_.js} +0 -0
- package/dist/_chunks/{durable-object-DMtH0XYX.js → durable-object-DuMPM8re.js} +0 -0
- package/dist/_chunks/{generated-artifacts-dMJY4KAt.js → generated-artifacts-Bb13pGUG.js} +0 -0
- package/dist/_chunks/{glob-CmQOvunB.js → glob-DRw9sbfF.js} +0 -0
- package/dist/_chunks/{local-dev-vars-CTSa-wvF.js → local-dev-vars-BFLS-HoI.js} +1 -1
- package/dist/_chunks/{local-hyperdrive-CJ90j46O.js → local-hyperdrive-CcORzo76.js} +0 -0
- package/dist/_chunks/{local-media-bindings-DsAW4AMF.js → local-media-bindings-ZQe-epuw.js} +0 -0
- package/dist/_chunks/{package-metadata-DjHBLB-z.js → package-metadata-CLI488gB.js} +1 -1
- package/dist/_chunks/{preview-C3Cdr8an.js → preview-j9Kbx4-G.js} +1 -1
- /package/dist/_chunks/{remote-config-D39BY9ji.js → remote-config-Bw6qIVM4.js} +0 -0
- /package/dist/_chunks/{schema-normalization-Zgm4W6O6.js → schema-normalization-CTdiY17P.js} +0 -0
- /package/dist/_chunks/{vite-utils-OVLMV605.js → vite-utils-D8kPPxUy.js} +0 -0
- /package/dist/_chunks/{worker-bundler-dTTnYU3n.js → worker-bundler-Isj5jiW6.js} +0 -0
- /package/dist/_chunks/{worker-entrypoint-CQW77lG8.js → worker-entrypoint-C8j23t6d.js} +0 -0
- /package/dist/_chunks/{workerName-CFJsLZA-.js → workerName-kEXwmV2m.js} +0 -0
package/README.md
CHANGED
|
@@ -108,7 +108,7 @@ bun test tests/worker.test.ts
|
|
|
108
108
|
|
|
109
109
|
| Import | Use |
|
|
110
110
|
| --- | --- |
|
|
111
|
-
| `devflare` | Node-side utilities: `defineConfig`, `preview`, `loadConfig`, `loadResolvedConfig`, `compileConfig`, `stringifyConfig`, `configSchema`, `ConfigNotFoundError`, `ConfigValidationError`, `ConfigResourceResolutionError`, `ref()`, `workerName`, `env`, `vars`, `durableObject`, `getDurableObjectOptions`, `runCli`, `parseArgs` |
|
|
111
|
+
| `devflare` | Node-side utilities: `defineConfig`, `defineWorkspace`, `preview`, `loadConfig`, `loadResolvedConfig`, `compileConfig`, `stringifyConfig`, `configSchema`, `ConfigNotFoundError`, `ConfigValidationError`, `ConfigResourceResolutionError`, `ref()`, `workerName`, `env`, `vars`, `durableObject`, `getDurableObjectOptions`, `runCli`, `parseArgs` |
|
|
112
112
|
| `devflare/config` | Lightweight config-authoring entry (no CLI/bridge/test barrel): `defineConfig`, `env`, `preview`, `ref`, plus the config types. The full Node-side compiler and normalizer helpers live on the bare devflare import instead. |
|
|
113
113
|
| `devflare/runtime` | Worker-safe runtime helpers: `env`, `ctx`, `event`, `locals`, `sequence`, `defineFetchHandler`, `defineQueueHandler`, `defineScheduledHandler`, `markResolveStyle`, `markWorkerStyle`, `createResolveFetch`, `invokeFetchHandler`, `invokeFetchModule`, `matchFetchRoute`, `invokeRouteModules`, `createRouteResolve`, event creators and getters |
|
|
114
114
|
| `devflare/test` | Testing helpers: `createTestContext`, `env`, `cf`, `worker`, `queue`, `scheduled`, `email`, `tail`, `shouldSkip`, `createOfflineEnv`, `createOfflineBindings`, `describeOfflineSupport`, `getOfflineSupportMatrix`, `containers`, `detectContainerEngine`, `getContainerSkipReason`, `stopActiveContainers`, `createMockEnv`, `createMockKV`, `createMockD1`, `createMockR2`, `createMockQueue`, `createMockRateLimit`, `createMockVersionMetadata`, `createMockHyperdrive`, `createMockWorkerLoader`, `createMockMTLSCertificate`, `createMockDispatchNamespace`, `createMockWorkflow`, `createMockPipeline`, `createMockImagesBinding`, `createMockMediaBinding`, `createMockArtifacts`, `createMockAISearchInstance`, `createMockAISearchNamespace`, `createMockTestContext`, `withTestContext`, `resolveServiceBindings`, `resolveDOBindings`, `clearBundleCache` |
|
|
@@ -196,6 +196,7 @@ for examples with file paths.
|
|
|
196
196
|
| `devflare types` | generate `env.d.ts` |
|
|
197
197
|
| `devflare version` | print the installed version |
|
|
198
198
|
| `devflare worker` | run Worker control-plane helpers |
|
|
199
|
+
| `devflare workspace` | run several apps in one Miniflare with shared live bindings |
|
|
199
200
|
|
|
200
201
|
Useful local-first switches:
|
|
201
202
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as CloudflareAPIError, t as AuthenticationError } from "./api-
|
|
2
|
-
import { a as setGlobalDefaultAccountId, i as getWorkspaceAccountId, o as setWorkspaceAccountId, r as getGlobalDefaultAccountId } from "./preferences-
|
|
3
|
-
import { t as account } from "./cloudflare-
|
|
4
|
-
import { a as DIM, c as RESET, i as CYAN_BOLD, r as CYAN } from "./colors-
|
|
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-
|
|
6
|
-
import { n as getConfiguredAccountId } from "./command-utils-
|
|
1
|
+
import { n as CloudflareAPIError, t as AuthenticationError } from "./api-BKClUlUf.js";
|
|
2
|
+
import { a as setGlobalDefaultAccountId, i as getWorkspaceAccountId, o as setWorkspaceAccountId, r as getGlobalDefaultAccountId } from "./preferences-CbYERA_m.js";
|
|
3
|
+
import { t as account } from "./cloudflare-Ic5ubQza.js";
|
|
4
|
+
import { a as DIM, c as RESET, i as CYAN_BOLD, r as CYAN } from "./colors-D0NVzAFN.js";
|
|
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-BhCdDC2N.js";
|
|
6
|
+
import { n as getConfiguredAccountId } from "./command-utils-DjaaMQX7.js";
|
|
7
7
|
//#region src/cli/commands/account.ts
|
|
8
8
|
const ACCOUNT_SUBCOMMANDS = [
|
|
9
9
|
"info",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as apiGetAll, n as CloudflareAPIError, r as apiDelete, s as apiPost } from "./api-
|
|
1
|
+
import { a as apiGetAll, n as CloudflareAPIError, r as apiDelete, s as apiPost } from "./api-BKClUlUf.js";
|
|
2
2
|
//#region src/cloudflare/account-resources.ts
|
|
3
3
|
async function listKVNamespaces(accountId, options) {
|
|
4
4
|
return (await apiGetAll(`/accounts/${accountId}/storage/kv/namespaces`, options)).map((namespace) => ({
|
|
@@ -43,11 +43,11 @@ async function deleteD1Database(accountId, databaseId, options) {
|
|
|
43
43
|
await apiDelete(`/accounts/${accountId}/d1/database/${encodeURIComponent(databaseId)}`, options);
|
|
44
44
|
}
|
|
45
45
|
async function queryD1Database(accountId, databaseId, query, options) {
|
|
46
|
-
const { apiPost } = await import("./api-
|
|
46
|
+
const { apiPost } = await import("./api-BKClUlUf.js").then((n) => n.l);
|
|
47
47
|
return apiPost(`/accounts/${accountId}/d1/database/${databaseId}/query`, query, options);
|
|
48
48
|
}
|
|
49
49
|
async function rawD1DatabaseQuery(accountId, databaseId, query, options) {
|
|
50
|
-
const { apiPost } = await import("./api-
|
|
50
|
+
const { apiPost } = await import("./api-BKClUlUf.js").then((n) => n.l);
|
|
51
51
|
return apiPost(`/accounts/${accountId}/d1/database/${databaseId}/raw`, query, options);
|
|
52
52
|
}
|
|
53
53
|
async function listQueues(accountId, options) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DIM, c as RESET, l as WHITE, n as BOLD, t as BG_BLUE } from "./colors-
|
|
1
|
+
import { a as DIM, c as RESET, l as WHITE, n as BOLD, t as BG_BLUE } from "./colors-D0NVzAFN.js";
|
|
2
2
|
//#region src/cloudflare/pricing.ts
|
|
3
3
|
/** Cloudflare Workers AI pricing documentation URL */
|
|
4
4
|
const PRICING_DOCS_URL = "https://developers.cloudflare.com/workers-ai/platform/pricing/";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as cyanBold, f as logLine, o as dim, r as createCliTheme } from "./ui-
|
|
2
|
-
import { t as prepareBuildArtifacts } from "./build-artifacts-
|
|
1
|
+
import { a as cyanBold, f as logLine, o as dim, r as createCliTheme } from "./ui-BhCdDC2N.js";
|
|
2
|
+
import { t as prepareBuildArtifacts } from "./build-artifacts-Btqs5gPy.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,16 +1,16 @@
|
|
|
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-
|
|
4
|
-
import { f as logLine } from "./ui-
|
|
5
|
-
import { n as getPackageVersion } from "./package-metadata-
|
|
6
|
-
import { t as resolvePackageSpecifier } from "./resolve-package-
|
|
7
|
-
import { i as writeGeneratedViteConfig, l as prepareComposedWorkerEntrypoint, n as resolveEffectiveViteProject } from "./vite-
|
|
8
|
-
import { t as bundleWorkerEntry } from "./worker-bundler-
|
|
9
|
-
import { t as detectViteProject } from "./vite-utils-
|
|
10
|
-
import { t as getDependencies } from "./dependencies-
|
|
11
|
-
import { n as getGeneratedArtifactPaths, t as ensureGeneratedDirectory } from "./generated-artifacts-
|
|
12
|
-
import { readFile, writeFile } from "node:fs/promises";
|
|
1
|
+
import { d as resolveConfigEnvVars } from "./preview-j9Kbx4-G.js";
|
|
2
|
+
import { r as loadConfig, u as resolveConfigForEnvironment } from "./loader-BC0skbnH.js";
|
|
3
|
+
import { c as writeWranglerConfig, i as isolateViteBuildOutputPaths$1, o as rebaseWranglerConfigPaths, t as compileBuildConfig } from "./compiler-UxXQgEPq.js";
|
|
4
|
+
import { f as logLine } from "./ui-BhCdDC2N.js";
|
|
5
|
+
import { n as getPackageVersion } from "./package-metadata-CLI488gB.js";
|
|
6
|
+
import { t as resolvePackageSpecifier } from "./resolve-package-DeJUGxoE.js";
|
|
7
|
+
import { i as writeGeneratedViteConfig, l as prepareComposedWorkerEntrypoint, n as resolveEffectiveViteProject } from "./vite-Dxuhm1BP.js";
|
|
8
|
+
import { t as bundleWorkerEntry } from "./worker-bundler-Isj5jiW6.js";
|
|
9
|
+
import { t as detectViteProject } from "./vite-utils-D8kPPxUy.js";
|
|
10
|
+
import { t as getDependencies } from "./dependencies-wKqrxKV_.js";
|
|
11
|
+
import { n as getGeneratedArtifactPaths, t as ensureGeneratedDirectory } from "./generated-artifacts-Bb13pGUG.js";
|
|
13
12
|
import { dirname, relative, resolve } from "pathe";
|
|
13
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
14
14
|
import { createHash } from "node:crypto";
|
|
15
15
|
const BUILD_MANIFEST_FILENAME = "manifest.json";
|
|
16
16
|
/**
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { a as cyanBold, c as formatCommand, f as logLine, i as cyan, o as dim, r as createCliTheme, s as formatBullet, t as accent } from "./ui-
|
|
2
|
-
import { n as getPackageVersion } from "./package-metadata-
|
|
3
|
-
import { readFile, readdir, stat } from "node:fs/promises";
|
|
1
|
+
import { a as cyanBold, c as formatCommand, f as logLine, i as cyan, o as dim, r as createCliTheme, s as formatBullet, t as accent } from "./ui-BhCdDC2N.js";
|
|
2
|
+
import { n as getPackageVersion } from "./package-metadata-CLI488gB.js";
|
|
4
3
|
import { dirname, join } from "pathe";
|
|
4
|
+
import { readFile, readdir, stat } from "node:fs/promises";
|
|
5
5
|
import { createConsola } from "consola";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
//#region src/cli/help-pages/shared.ts
|
|
8
8
|
const COMMANDS = [
|
|
9
9
|
"init",
|
|
10
10
|
"dev",
|
|
11
|
+
"workspace",
|
|
11
12
|
"build",
|
|
12
13
|
"deploy",
|
|
13
14
|
"types",
|
|
@@ -249,6 +250,7 @@ const CORE_HELP_PAGES = [
|
|
|
249
250
|
subcommands: [
|
|
250
251
|
entry("init [name]", "Create a new devflare project"),
|
|
251
252
|
entry("dev", "Start the development server"),
|
|
253
|
+
entry("workspace dev", "Run several apps in one Miniflare with shared live bindings"),
|
|
252
254
|
entry("build", "Build for production"),
|
|
253
255
|
entry("deploy", "Deploy explicitly to production or preview"),
|
|
254
256
|
entry("types", "Generate TypeScript types"),
|
|
@@ -323,6 +325,42 @@ const CORE_HELP_PAGES = [
|
|
|
323
325
|
"`--log` and `--log-temp` still print to the terminal; they add a file mirror instead of redirecting output away."
|
|
324
326
|
]
|
|
325
327
|
},
|
|
328
|
+
{
|
|
329
|
+
path: ["workspace"],
|
|
330
|
+
summary: "Run several devflare apps in one shared local runtime",
|
|
331
|
+
usage: ["devflare workspace dev [--config <path>] [--no-persist] [--verbose] [--debug]"],
|
|
332
|
+
description: [
|
|
333
|
+
"Co-hosts every app listed in a `devflare.workspace.ts` manifest inside ONE Miniflare instance, so workers that bind the same D1/KV/R2/Durable Object id share LIVE state in dev — a write by one app is immediately visible to the others, exactly as they share one managed resource in production.",
|
|
334
|
+
"Each app is still exposed on its own browser-reachable origin via a per-app direct socket, so the cross-origin split (e.g. `ui.localhost` ↔ `api.ui.localhost`) is preserved. Vite apps are spawned as child processes pointed at the shared instance.",
|
|
335
|
+
"Strictly opt-in: it changes nothing about the per-app `devflare dev` path."
|
|
336
|
+
],
|
|
337
|
+
subcommands: [entry("dev", "Start the shared workspace dev server")],
|
|
338
|
+
options: [
|
|
339
|
+
entry("--config <path>", "Use a specific workspace manifest file"),
|
|
340
|
+
entry("--no-persist", "Keep workspace storage in-memory instead of `.devflare/workspace-data`"),
|
|
341
|
+
entry("--verbose", "Increase logging verbosity"),
|
|
342
|
+
entry("--debug", "Enable extra debug logging in the gateway workers")
|
|
343
|
+
],
|
|
344
|
+
examples: [entry("devflare workspace dev", "Start all manifest apps sharing one instance"), entry("devflare workspace dev --no-persist", "Run with ephemeral storage")],
|
|
345
|
+
notes: [
|
|
346
|
+
"Requires a `devflare.workspace.ts` at the current directory exporting `defineWorkspace({ apps: [...] })`.",
|
|
347
|
+
"Each app declares a `port` (pure worker) or `bridgePort` + `vitePort` (Vite app); those ports must be unique across the workspace.",
|
|
348
|
+
"Migrations run once per app against the shared store (the migration ledger dedupes shared files). Worker/DO hot reload inside the shared instance is not wired yet — restart to pick up worker source changes."
|
|
349
|
+
]
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
path: ["workspace", "dev"],
|
|
353
|
+
summary: "Start the shared workspace dev server",
|
|
354
|
+
usage: ["devflare workspace dev [--config <path>] [--no-persist] [--verbose] [--debug]"],
|
|
355
|
+
description: ["Loads the workspace manifest, prepares each app with the same pipeline `devflare dev` uses, merges their workers into one Miniflare instance with shared bindings, and exposes each app on its own direct socket."],
|
|
356
|
+
options: [
|
|
357
|
+
entry("--config <path>", "Use a specific workspace manifest file"),
|
|
358
|
+
entry("--no-persist", "Keep workspace storage in-memory"),
|
|
359
|
+
entry("--verbose", "Increase logging verbosity"),
|
|
360
|
+
entry("--debug", "Enable extra debug logging in the gateway workers")
|
|
361
|
+
],
|
|
362
|
+
examples: [entry("devflare workspace dev", "Start all manifest apps sharing one instance")]
|
|
363
|
+
},
|
|
326
364
|
{
|
|
327
365
|
path: ["build"],
|
|
328
366
|
summary: "Build production deployment artifacts",
|
|
@@ -1076,6 +1114,7 @@ async function runCli(argv, options = {}) {
|
|
|
1076
1114
|
}
|
|
1077
1115
|
case "init": return runInit(parsed, logger, options);
|
|
1078
1116
|
case "dev": return runDev(parsed, logger, options);
|
|
1117
|
+
case "workspace": return runWorkspace(parsed, logger, options);
|
|
1079
1118
|
case "build": return runBuild(parsed, logger, options);
|
|
1080
1119
|
case "deploy": return runDeploy(parsed, logger, options);
|
|
1081
1120
|
case "types": return runTypes(parsed, logger, options);
|
|
@@ -1097,74 +1136,78 @@ async function runCli(argv, options = {}) {
|
|
|
1097
1136
|
}
|
|
1098
1137
|
}
|
|
1099
1138
|
async function runInit(parsed, logger, options) {
|
|
1100
|
-
const { runInitCommand } = await import("./init-
|
|
1139
|
+
const { runInitCommand } = await import("./init-DJ5y3mu5.js");
|
|
1101
1140
|
return runInitCommand(parsed, logger, options);
|
|
1102
1141
|
}
|
|
1103
1142
|
async function runDev(parsed, logger, options) {
|
|
1104
|
-
const { runDevCommand } = await import("./dev-
|
|
1143
|
+
const { runDevCommand } = await import("./dev-DOoDj7SJ.js");
|
|
1105
1144
|
return runDevCommand(parsed, logger, options);
|
|
1106
1145
|
}
|
|
1146
|
+
async function runWorkspace(parsed, logger, options) {
|
|
1147
|
+
const { runWorkspaceCommand } = await import("./workspace-CaTsTpDI.js");
|
|
1148
|
+
return runWorkspaceCommand(parsed, logger, options);
|
|
1149
|
+
}
|
|
1107
1150
|
async function runBuild(parsed, logger, options) {
|
|
1108
|
-
const { runBuildCommand } = await import("./build-
|
|
1151
|
+
const { runBuildCommand } = await import("./build-DCgW1i8g.js");
|
|
1109
1152
|
return runBuildCommand(parsed, logger, options);
|
|
1110
1153
|
}
|
|
1111
1154
|
async function runDeploy(parsed, logger, options) {
|
|
1112
|
-
const { runDeployCommand } = await import("./deploy-
|
|
1155
|
+
const { runDeployCommand } = await import("./deploy-DqYme109.js");
|
|
1113
1156
|
return runDeployCommand(parsed, logger, {
|
|
1114
1157
|
...options,
|
|
1115
1158
|
requireExplicitDeployTarget: true
|
|
1116
1159
|
});
|
|
1117
1160
|
}
|
|
1118
1161
|
async function runTypes(parsed, logger, options) {
|
|
1119
|
-
const { runTypesCommand } = await import("./types-
|
|
1162
|
+
const { runTypesCommand } = await import("./types-BLGfxIq-.js");
|
|
1120
1163
|
return runTypesCommand(parsed, logger, options);
|
|
1121
1164
|
}
|
|
1122
1165
|
async function runDoctor(parsed, logger, options) {
|
|
1123
|
-
const { runDoctorCommand } = await import("./doctor-
|
|
1166
|
+
const { runDoctorCommand } = await import("./doctor-CAsJ-rSZ.js");
|
|
1124
1167
|
return runDoctorCommand(parsed, logger, options);
|
|
1125
1168
|
}
|
|
1126
1169
|
async function runConfig(parsed, logger, options) {
|
|
1127
|
-
const { runConfigCommand } = await import("./config-
|
|
1170
|
+
const { runConfigCommand } = await import("./config-zQd4jmXU.js");
|
|
1128
1171
|
return runConfigCommand(parsed, logger, options);
|
|
1129
1172
|
}
|
|
1130
1173
|
async function runAccount(parsed, logger, options) {
|
|
1131
|
-
const { runAccountCommand } = await import("./account-
|
|
1174
|
+
const { runAccountCommand } = await import("./account-BHY3fvrA.js");
|
|
1132
1175
|
return runAccountCommand(parsed, logger, options);
|
|
1133
1176
|
}
|
|
1134
1177
|
async function runLogin(parsed, logger, options) {
|
|
1135
|
-
const { runLoginCommand } = await import("./login-
|
|
1178
|
+
const { runLoginCommand } = await import("./login-CgNcbpEq.js");
|
|
1136
1179
|
return runLoginCommand(parsed, logger, options);
|
|
1137
1180
|
}
|
|
1138
1181
|
async function runPreviews(parsed, logger, options) {
|
|
1139
|
-
const { runPreviewsCommand } = await import("./previews-
|
|
1182
|
+
const { runPreviewsCommand } = await import("./previews-BIaw6NVC.js");
|
|
1140
1183
|
return runPreviewsCommand(parsed, logger, options);
|
|
1141
1184
|
}
|
|
1142
1185
|
async function runProductions(parsed, logger, options) {
|
|
1143
|
-
const { runProductionsCommand } = await import("./productions-
|
|
1186
|
+
const { runProductionsCommand } = await import("./productions-CF8oQcX7.js");
|
|
1144
1187
|
return runProductionsCommand(parsed, logger, options);
|
|
1145
1188
|
}
|
|
1146
1189
|
async function runWorker(parsed, logger, options) {
|
|
1147
|
-
const { runWorkerCommand } = await import("./worker-
|
|
1190
|
+
const { runWorkerCommand } = await import("./worker-DgczaXVW.js");
|
|
1148
1191
|
return runWorkerCommand(parsed, logger, options);
|
|
1149
1192
|
}
|
|
1150
1193
|
async function runToken(parsed, logger, options) {
|
|
1151
|
-
const { runTokenCommand } = await import("./token-
|
|
1194
|
+
const { runTokenCommand } = await import("./token-wmeF8-IQ.js");
|
|
1152
1195
|
return runTokenCommand(parsed, logger, options);
|
|
1153
1196
|
}
|
|
1154
1197
|
async function runSecrets(parsed, logger, options) {
|
|
1155
|
-
const { runSecretsCommand } = await import("./secrets-
|
|
1198
|
+
const { runSecretsCommand } = await import("./secrets-BJuEa9Jz.js");
|
|
1156
1199
|
return runSecretsCommand(parsed, logger, options);
|
|
1157
1200
|
}
|
|
1158
1201
|
async function runTail(parsed, logger, options) {
|
|
1159
|
-
const { runTailCommand } = await import("./tail-
|
|
1202
|
+
const { runTailCommand } = await import("./tail-DjGRt8gw.js");
|
|
1160
1203
|
return runTailCommand(parsed, logger, options);
|
|
1161
1204
|
}
|
|
1162
1205
|
async function runAI() {
|
|
1163
|
-
const { runAICommand } = await import("./ai-
|
|
1206
|
+
const { runAICommand } = await import("./ai-CN_SREim.js");
|
|
1164
1207
|
return runAICommand();
|
|
1165
1208
|
}
|
|
1166
1209
|
async function runRemote(parsed, logger, options) {
|
|
1167
|
-
const { runRemoteCommand } = await import("./remote-
|
|
1210
|
+
const { runRemoteCommand } = await import("./remote-8jEHLVGg.js");
|
|
1168
1211
|
return runRemoteCommand(parsed, logger, options);
|
|
1169
1212
|
}
|
|
1170
1213
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { g as isAuthenticated, h as hasWranglerConfig, m as getWranglerAuth, p as getApiToken } from "./api-
|
|
2
|
-
import { a as setGlobalDefaultAccountId, d as getPrimaryAccount, i as getWorkspaceAccountId, l as getAccountById, n as getEffectiveAccountId, o as setWorkspaceAccountId, r as getGlobalDefaultAccountId, t as clearGlobalDefaultAccountId, u as getAccounts } from "./preferences-
|
|
3
|
-
import { C as deleteWorker, D as listWorkerVersions, E as listWorkerDeployments, O as listWorkers, S as DEVFLARE_PREVIEW_REGISTRY_DATABASE, T as getWorkersSubdomain, a as listTrackedPreviewRecords, c as reconcilePreviewRegistry, i as listTrackedDeploymentRecords, k as renameWorker, l as retirePreviewRegistry, n as ensurePreviewRegistry, o as listTrackedPreviewScopeRecords, r as getPreviewRegistryContext, s as listTrackedRegistryState, t as cleanupPreviewRegistry, w as getWorkerVersionDetail } from "./preview-registry-
|
|
4
|
-
import { _ as listR2Buckets, b as rawD1DatabaseQuery, f as listAIModels, h as listKVNamespaces, m as listHyperdrives, p as listD1Databases, t as createD1Database, v as listVectorizeIndexes, y as queryD1Database } from "./account-resources-
|
|
5
|
-
import { a as getUsageSummary, c as recordUsage, d as setLimitsEnabled, f as shouldSkip, i as getUsage, l as resetUsage, n as getAllUsageSummaries, o as isWithinLimits, r as getLimits, s as recordTestUsage, t as canProceedWithTest, u as setLimits } from "./usage-
|
|
6
|
-
import { a as listAccountTokenPermissionGroups, i as listAccountOwnedAPITokens, n as deleteAccountOwnedAPIToken, o as normalizeDevflareTokenName, t as createAccountOwnedAPIToken } from "./tokens-
|
|
1
|
+
import { g as isAuthenticated, h as hasWranglerConfig, m as getWranglerAuth, p as getApiToken } from "./api-BKClUlUf.js";
|
|
2
|
+
import { a as setGlobalDefaultAccountId, d as getPrimaryAccount, i as getWorkspaceAccountId, l as getAccountById, n as getEffectiveAccountId, o as setWorkspaceAccountId, r as getGlobalDefaultAccountId, t as clearGlobalDefaultAccountId, u as getAccounts } from "./preferences-CbYERA_m.js";
|
|
3
|
+
import { C as deleteWorker, D as listWorkerVersions, E as listWorkerDeployments, O as listWorkers, S as DEVFLARE_PREVIEW_REGISTRY_DATABASE, T as getWorkersSubdomain, a as listTrackedPreviewRecords, c as reconcilePreviewRegistry, i as listTrackedDeploymentRecords, k as renameWorker, l as retirePreviewRegistry, n as ensurePreviewRegistry, o as listTrackedPreviewScopeRecords, r as getPreviewRegistryContext, s as listTrackedRegistryState, t as cleanupPreviewRegistry, w as getWorkerVersionDetail } from "./preview-registry-CTXU4mBc.js";
|
|
4
|
+
import { _ as listR2Buckets, b as rawD1DatabaseQuery, f as listAIModels, h as listKVNamespaces, m as listHyperdrives, p as listD1Databases, t as createD1Database, v as listVectorizeIndexes, y as queryD1Database } from "./account-resources-BdKj8q1h.js";
|
|
5
|
+
import { a as getUsageSummary, c as recordUsage, d as setLimitsEnabled, f as shouldSkip, i as getUsage, l as resetUsage, n as getAllUsageSummaries, o as isWithinLimits, r as getLimits, s as recordTestUsage, t as canProceedWithTest, u as setLimits } from "./usage-rRusKejc.js";
|
|
6
|
+
import { a as listAccountTokenPermissionGroups, i as listAccountOwnedAPITokens, n as deleteAccountOwnedAPIToken, o as normalizeDevflareTokenName, t as createAccountOwnedAPIToken } from "./tokens-KaEr4B8e.js";
|
|
7
7
|
//#region src/cloudflare/account-status.ts
|
|
8
8
|
const SERVICE_STATUS_TIMEOUT_MS = 1e4;
|
|
9
9
|
const serviceInventoryFetchers = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as resolveConfigPath, r as loadConfig } from "./loader-
|
|
2
|
-
import { d as getPrimaryAccount, i as getWorkspaceAccountId, n as getEffectiveAccountId } from "./preferences-
|
|
1
|
+
import { i as resolveConfigPath, r as loadConfig } from "./loader-BC0skbnH.js";
|
|
2
|
+
import { d as getPrimaryAccount, i as getWorkspaceAccountId, n as getEffectiveAccountId } from "./preferences-CbYERA_m.js";
|
|
3
3
|
//#region src/cli/command-utils.ts
|
|
4
4
|
function asOptionalString(value) {
|
|
5
5
|
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as normalizeCompatibilityFlags, u as resolveConfigForEnvironment } from "./loader-
|
|
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-
|
|
3
|
-
import { n as toWranglerSecretsConfig } from "./local-dev-vars-
|
|
1
|
+
import { p as normalizeCompatibilityFlags, u as resolveConfigForEnvironment } from "./loader-BC0skbnH.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-CTdiY17P.js";
|
|
3
|
+
import { n as toWranglerSecretsConfig } from "./local-dev-vars-BFLS-HoI.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 = {}) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as resolveConfigPath } from "./loader-
|
|
2
|
-
import { i as findFiles } from "./glob-
|
|
1
|
+
import { i as resolveConfigPath } from "./loader-BC0skbnH.js";
|
|
2
|
+
import { i as findFiles } from "./glob-DRw9sbfF.js";
|
|
3
3
|
import { stat } from "node:fs/promises";
|
|
4
4
|
//#region src/cli/config-path.ts
|
|
5
5
|
const CONFIG_FILE_EXTENSIONS = [
|
|
@@ -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-j9Kbx4-G.js";
|
|
2
|
+
import { a as ConfigResourceResolutionError, o as loadResolvedConfig, r as loadConfig, s as resolveResources } from "./loader-BC0skbnH.js";
|
|
3
|
+
import { n as compileConfig, t as compileBuildConfig } from "./compiler-UxXQgEPq.js";
|
|
4
4
|
//#region src/cli/commands/config.ts
|
|
5
5
|
function isSupportedFormat(value) {
|
|
6
6
|
return value === "devflare" || value === "wrangler";
|
|
@@ -1,17 +1,17 @@
|
|
|
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-
|
|
4
|
-
import { d as getPrimaryAccount, n as getEffectiveAccountId } from "./preferences-
|
|
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-
|
|
6
|
-
import { _ as yellowBold, d as green, f as logLine, g as yellow, o as dim, r as createCliTheme } from "./ui-
|
|
7
|
-
import { n as getPackageVersion } from "./package-metadata-
|
|
8
|
-
import { t as resolvePackageSpecifier } from "./resolve-package-
|
|
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-
|
|
11
|
-
import { t as getDependencies } from "./dependencies-
|
|
12
|
-
import { n as preparePreviewScopedResourcesForDeploy } from "./preview-resources-
|
|
13
|
-
import { mkdir, open, readFile, rm, writeFile } from "node:fs/promises";
|
|
1
|
+
import { a as resolvePreviewIdentifier, d as resolveConfigEnvVars } from "./preview-j9Kbx4-G.js";
|
|
2
|
+
import { c as prepareConfigResourcesForDeploy, r as loadConfig, u as resolveConfigForEnvironment } from "./loader-BC0skbnH.js";
|
|
3
|
+
import { a as readWranglerConfig, c as writeWranglerConfig, n as compileConfig, o as rebaseWranglerConfigPaths, s as stringifyConfig, t as compileBuildConfig } from "./compiler-UxXQgEPq.js";
|
|
4
|
+
import { d as getPrimaryAccount, n as getEffectiveAccountId } from "./preferences-CbYERA_m.js";
|
|
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-CTXU4mBc.js";
|
|
6
|
+
import { _ as yellowBold, d as green, f as logLine, g as yellow, o as dim, r as createCliTheme } from "./ui-BhCdDC2N.js";
|
|
7
|
+
import { n as getPackageVersion } from "./package-metadata-CLI488gB.js";
|
|
8
|
+
import { t as resolvePackageSpecifier } from "./resolve-package-DeJUGxoE.js";
|
|
9
|
+
import { t as asOptionalString } from "./command-utils-DjaaMQX7.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-Btqs5gPy.js";
|
|
11
|
+
import { t as getDependencies } from "./dependencies-wKqrxKV_.js";
|
|
12
|
+
import { n as preparePreviewScopedResourcesForDeploy } from "./preview-resources-CQIu2-NY.js";
|
|
14
13
|
import { basename, dirname, isAbsolute, join, resolve } from "pathe";
|
|
14
|
+
import { mkdir, open, readFile, rm, writeFile } from "node:fs/promises";
|
|
15
15
|
//#region src/config/service-bindings-validation.ts
|
|
16
16
|
var ServiceBindingValidationError = class extends Error {
|
|
17
17
|
code = "SERVICE_BINDING_VALIDATION_ERROR";
|