devflare 1.0.0-next.3 → 1.0.0-next.30
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 +15961 -1751
- package/README.md +389 -605
- package/bin/devflare.js +24 -14
- package/dist/account-fvf5gxc9.js +475 -0
- package/dist/api-2n6dd2ws.js +33 -0
- package/dist/bridge/client.d.ts +48 -6
- package/dist/bridge/client.d.ts.map +1 -1
- package/dist/bridge/gateway-runtime.d.ts +8 -0
- package/dist/bridge/gateway-runtime.d.ts.map +1 -0
- package/dist/bridge/index.d.ts +3 -3
- package/dist/bridge/index.d.ts.map +1 -1
- package/dist/bridge/log.d.ts +5 -0
- package/dist/bridge/log.d.ts.map +1 -0
- package/dist/bridge/miniflare.d.ts +74 -1
- package/dist/bridge/miniflare.d.ts.map +1 -1
- package/dist/bridge/proxy.d.ts +11 -10
- package/dist/bridge/proxy.d.ts.map +1 -1
- package/dist/bridge/server.d.ts +2 -1
- package/dist/bridge/server.d.ts.map +1 -1
- package/dist/bridge/v2/body-streams.d.ts +53 -0
- package/dist/bridge/v2/body-streams.d.ts.map +1 -0
- package/dist/bridge/v2/codec.d.ts +106 -0
- package/dist/bridge/v2/codec.d.ts.map +1 -0
- package/dist/bridge/v2/control-messages.d.ts +51 -0
- package/dist/bridge/v2/control-messages.d.ts.map +1 -0
- package/dist/bridge/v2/frames.d.ts +109 -0
- package/dist/bridge/v2/frames.d.ts.map +1 -0
- package/dist/bridge/v2/index.d.ts +11 -0
- package/dist/bridge/v2/index.d.ts.map +1 -0
- package/dist/bridge/v2/serialization.d.ts +48 -0
- package/dist/bridge/v2/serialization.d.ts.map +1 -0
- package/dist/bridge/v2/transport.d.ts +31 -0
- package/dist/bridge/v2/transport.d.ts.map +1 -0
- package/dist/bridge/v2/value-codec.d.ts +61 -0
- package/dist/bridge/v2/value-codec.d.ts.map +1 -0
- package/dist/bridge/{serialization.d.ts → v2/value-serialization.d.ts} +40 -18
- package/dist/bridge/v2/value-serialization.d.ts.map +1 -0
- package/dist/bridge/{protocol.d.ts → v2/wire.d.ts} +28 -4
- package/dist/bridge/v2/wire.d.ts.map +1 -0
- package/dist/bridge/v2/ws-relay.d.ts +53 -0
- package/dist/bridge/v2/ws-relay.d.ts.map +1 -0
- package/dist/browser-shim/handler.d.ts +1 -1
- package/dist/browser-shim/handler.d.ts.map +1 -1
- package/dist/browser-shim/server.d.ts +63 -0
- package/dist/browser-shim/server.d.ts.map +1 -1
- package/dist/browser.d.ts +4585 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +147 -0
- package/dist/build-x1fhfsgs.js +54 -0
- package/dist/bundler/defaults.d.ts +23 -0
- package/dist/bundler/defaults.d.ts.map +1 -0
- package/dist/bundler/do-bundler.d.ts +7 -0
- package/dist/bundler/do-bundler.d.ts.map +1 -1
- package/dist/bundler/index.d.ts +2 -0
- package/dist/bundler/index.d.ts.map +1 -1
- package/dist/bundler/rolldown-shared.d.ts +53 -0
- package/dist/bundler/rolldown-shared.d.ts.map +1 -0
- package/dist/bundler/worker-bundler.d.ts +13 -0
- package/dist/bundler/worker-bundler.d.ts.map +1 -0
- package/dist/bundler/worker-compat.d.ts +4 -0
- package/dist/bundler/worker-compat.d.ts.map +1 -0
- package/dist/cli/build-manifest.d.ts +66 -0
- package/dist/cli/build-manifest.d.ts.map +1 -0
- package/dist/cli/command-utils.d.ts +18 -0
- package/dist/cli/command-utils.d.ts.map +1 -0
- package/dist/cli/commands/account.d.ts +1 -1
- package/dist/cli/commands/account.d.ts.map +1 -1
- package/dist/cli/commands/build-artifacts.d.ts +40 -0
- package/dist/cli/commands/build-artifacts.d.ts.map +1 -0
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/config.d.ts +4 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/deploy/metadata.d.ts +18 -0
- package/dist/cli/commands/deploy/metadata.d.ts.map +1 -0
- package/dist/cli/commands/deploy/prepare.d.ts +23 -0
- package/dist/cli/commands/deploy/prepare.d.ts.map +1 -0
- package/dist/cli/commands/deploy/runtime.d.ts +4 -0
- package/dist/cli/commands/deploy/runtime.d.ts.map +1 -0
- package/dist/cli/commands/deploy/verification.d.ts +36 -0
- package/dist/cli/commands/deploy/verification.d.ts.map +1 -0
- package/dist/cli/commands/deploy.d.ts +2 -2
- package/dist/cli/commands/deploy.d.ts.map +1 -1
- package/dist/cli/commands/dev.d.ts +8 -0
- package/dist/cli/commands/dev.d.ts.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/login.d.ts +4 -0
- package/dist/cli/commands/login.d.ts.map +1 -0
- package/dist/cli/commands/previews-support/cleanup.d.ts +9 -0
- package/dist/cli/commands/previews-support/cleanup.d.ts.map +1 -0
- package/dist/cli/commands/previews-support/family.d.ts +10 -0
- package/dist/cli/commands/previews-support/family.d.ts.map +1 -0
- package/dist/cli/commands/previews-support/render.d.ts +8 -0
- package/dist/cli/commands/previews-support/render.d.ts.map +1 -0
- package/dist/cli/commands/previews-support/theme.d.ts +10 -0
- package/dist/cli/commands/previews-support/theme.d.ts.map +1 -0
- package/dist/cli/commands/previews-support/types.d.ts +70 -0
- package/dist/cli/commands/previews-support/types.d.ts.map +1 -0
- package/dist/cli/commands/previews.d.ts +4 -0
- package/dist/cli/commands/previews.d.ts.map +1 -0
- package/dist/cli/commands/productions.d.ts +4 -0
- package/dist/cli/commands/productions.d.ts.map +1 -0
- package/dist/cli/commands/secrets.d.ts +4 -0
- package/dist/cli/commands/secrets.d.ts.map +1 -0
- package/dist/cli/commands/token.d.ts +4 -0
- package/dist/cli/commands/token.d.ts.map +1 -0
- package/dist/cli/commands/type-generation/discovery.d.ts +7 -0
- package/dist/cli/commands/type-generation/discovery.d.ts.map +1 -0
- package/dist/cli/commands/type-generation/generator.d.ts +112 -0
- package/dist/cli/commands/type-generation/generator.d.ts.map +1 -0
- package/dist/cli/commands/type-generation/models.d.ts +27 -0
- package/dist/cli/commands/type-generation/models.d.ts.map +1 -0
- package/dist/cli/commands/types.d.ts.map +1 -1
- package/dist/cli/commands/worker.d.ts +4 -0
- package/dist/cli/commands/worker.d.ts.map +1 -0
- package/dist/cli/config-path.d.ts +6 -0
- package/dist/cli/config-path.d.ts.map +1 -0
- package/dist/cli/dependencies.d.ts +1 -0
- package/dist/cli/dependencies.d.ts.map +1 -1
- package/dist/cli/deploy-strategy.d.ts +17 -0
- package/dist/cli/deploy-strategy.d.ts.map +1 -0
- package/dist/cli/deploy-target.d.ts +17 -0
- package/dist/cli/deploy-target.d.ts.map +1 -0
- package/dist/cli/generated-artifacts.d.ts +12 -0
- package/dist/cli/generated-artifacts.d.ts.map +1 -0
- package/dist/cli/help-pages/pages/account.d.ts +3 -0
- package/dist/cli/help-pages/pages/account.d.ts.map +1 -0
- package/dist/cli/help-pages/pages/core.d.ts +4 -0
- package/dist/cli/help-pages/pages/core.d.ts.map +1 -0
- package/dist/cli/help-pages/pages/index.d.ts +3 -0
- package/dist/cli/help-pages/pages/index.d.ts.map +1 -0
- package/dist/cli/help-pages/pages/misc.d.ts +3 -0
- package/dist/cli/help-pages/pages/misc.d.ts.map +1 -0
- package/dist/cli/help-pages/pages/previews.d.ts +3 -0
- package/dist/cli/help-pages/pages/previews.d.ts.map +1 -0
- package/dist/cli/help-pages/pages/productions.d.ts +3 -0
- package/dist/cli/help-pages/pages/productions.d.ts.map +1 -0
- package/dist/cli/help-pages/render.d.ts +12 -0
- package/dist/cli/help-pages/render.d.ts.map +1 -0
- package/dist/cli/help-pages/shared.d.ts +15 -0
- package/dist/cli/help-pages/shared.d.ts.map +1 -0
- package/dist/cli/help-pages/types.d.ts +23 -0
- package/dist/cli/help-pages/types.d.ts.map +1 -0
- package/dist/cli/help.d.ts +6 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +12 -0
- package/dist/cli/package-metadata.d.ts +16 -0
- package/dist/cli/package-metadata.d.ts.map +1 -0
- package/dist/cli/preview-bindings.d.ts +49 -0
- package/dist/cli/preview-bindings.d.ts.map +1 -0
- package/dist/cli/preview.d.ts +10 -0
- package/dist/cli/preview.d.ts.map +1 -0
- package/dist/cli/ui.d.ts +37 -0
- package/dist/cli/ui.d.ts.map +1 -0
- package/dist/cli/workspace-build-guard.d.ts +14 -0
- package/dist/cli/workspace-build-guard.d.ts.map +1 -0
- package/dist/cloudflare/account-core.d.ts +6 -0
- package/dist/cloudflare/account-core.d.ts.map +1 -0
- package/dist/cloudflare/account-resources.d.ts +40 -0
- package/dist/cloudflare/account-resources.d.ts.map +1 -0
- package/dist/cloudflare/account-status.d.ts +11 -0
- package/dist/cloudflare/account-status.d.ts.map +1 -0
- package/dist/cloudflare/account-workers.d.ts +14 -0
- package/dist/cloudflare/account-workers.d.ts.map +1 -0
- package/dist/cloudflare/account.d.ts +7 -64
- package/dist/cloudflare/account.d.ts.map +1 -1
- package/dist/cloudflare/api.d.ts +71 -3
- package/dist/cloudflare/api.d.ts.map +1 -1
- package/dist/cloudflare/auth.d.ts.map +1 -1
- package/dist/cloudflare/index.d.ts +57 -2
- package/dist/cloudflare/index.d.ts.map +1 -1
- package/dist/cloudflare/index.js +49 -2
- package/dist/cloudflare/known-permission-group-ids.generated.d.ts +10 -0
- package/dist/cloudflare/known-permission-group-ids.generated.d.ts.map +1 -0
- package/dist/cloudflare/kv-namespace.d.ts +4 -0
- package/dist/cloudflare/kv-namespace.d.ts.map +1 -0
- package/dist/cloudflare/preferences.d.ts +7 -0
- package/dist/cloudflare/preferences.d.ts.map +1 -1
- package/dist/cloudflare/preview-registry-cache.d.ts +6 -0
- package/dist/cloudflare/preview-registry-cache.d.ts.map +1 -0
- package/dist/cloudflare/preview-registry-inference.d.ts +14 -0
- package/dist/cloudflare/preview-registry-inference.d.ts.map +1 -0
- package/dist/cloudflare/preview-registry-records.d.ts +4 -0
- package/dist/cloudflare/preview-registry-records.d.ts.map +1 -0
- package/dist/cloudflare/preview-registry-shape.d.ts +47 -0
- package/dist/cloudflare/preview-registry-shape.d.ts.map +1 -0
- package/dist/cloudflare/preview-registry-store.d.ts +14 -0
- package/dist/cloudflare/preview-registry-store.d.ts.map +1 -0
- package/dist/cloudflare/preview-registry-transport.d.ts +4 -0
- package/dist/cloudflare/preview-registry-transport.d.ts.map +1 -0
- package/dist/cloudflare/preview-registry-types.d.ts +103 -0
- package/dist/cloudflare/preview-registry-types.d.ts.map +1 -0
- package/dist/cloudflare/preview-registry.d.ts +42 -0
- package/dist/cloudflare/preview-registry.d.ts.map +1 -0
- package/dist/cloudflare/preview-urls.d.ts +3 -0
- package/dist/cloudflare/preview-urls.d.ts.map +1 -0
- package/dist/cloudflare/registry-schema.d.ts +253 -0
- package/dist/cloudflare/registry-schema.d.ts.map +1 -0
- package/dist/cloudflare/tokens.d.ts +44 -0
- package/dist/cloudflare/tokens.d.ts.map +1 -0
- package/dist/cloudflare/types.d.ts +124 -7
- package/dist/cloudflare/types.d.ts.map +1 -1
- package/dist/cloudflare/usage.d.ts +30 -2
- package/dist/cloudflare/usage.d.ts.map +1 -1
- package/dist/config/binding-resolution-helpers.d.ts +41 -0
- package/dist/config/binding-resolution-helpers.d.ts.map +1 -0
- package/dist/config/compatibility.d.ts +3 -0
- package/dist/config/compatibility.d.ts.map +1 -0
- package/dist/config/compiler/bindings.d.ts +14 -0
- package/dist/config/compiler/bindings.d.ts.map +1 -0
- package/dist/config/compiler/core-helpers.d.ts +6 -0
- package/dist/config/compiler/core-helpers.d.ts.map +1 -0
- package/dist/config/compiler/do-workers.d.ts +34 -0
- package/dist/config/compiler/do-workers.d.ts.map +1 -0
- package/dist/config/compiler/paths.d.ts +18 -0
- package/dist/config/compiler/paths.d.ts.map +1 -0
- package/dist/config/compiler/types.d.ts +267 -0
- package/dist/config/compiler/types.d.ts.map +1 -0
- package/dist/config/compiler.d.ts +22 -134
- package/dist/config/compiler.d.ts.map +1 -1
- package/dist/config/define.d.ts +7 -4
- package/dist/config/define.d.ts.map +1 -1
- package/dist/config/deploy-resources.d.ts +58 -0
- package/dist/config/deploy-resources.d.ts.map +1 -0
- package/dist/config/env-vars.d.ts +309 -0
- package/dist/config/env-vars.d.ts.map +1 -0
- package/dist/config/framework-providers.d.ts +9 -0
- package/dist/config/framework-providers.d.ts.map +1 -0
- package/dist/config/index.d.ts +12 -5
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/loader.d.ts +1 -0
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/local-dev-vars.d.ts +15 -0
- package/dist/config/local-dev-vars.d.ts.map +1 -0
- package/dist/config/preview-resources.d.ts +83 -0
- package/dist/config/preview-resources.d.ts.map +1 -0
- package/dist/config/preview.d.ts +31 -0
- package/dist/config/preview.d.ts.map +1 -0
- package/dist/config/ref.d.ts +14 -23
- package/dist/config/ref.d.ts.map +1 -1
- package/dist/config/resolve-phased.d.ts +72 -0
- package/dist/config/resolve-phased.d.ts.map +1 -0
- package/dist/config/resolve.d.ts +11 -0
- package/dist/config/resolve.d.ts.map +1 -0
- package/dist/config/resource-resolution.d.ts +80 -0
- package/dist/config/resource-resolution.d.ts.map +1 -0
- package/dist/config/schema-bindings.d.ts +1495 -0
- package/dist/config/schema-bindings.d.ts.map +1 -0
- package/dist/config/schema-build.d.ts +67 -0
- package/dist/config/schema-build.d.ts.map +1 -0
- package/dist/config/schema-env.d.ts +3005 -0
- package/dist/config/schema-env.d.ts.map +1 -0
- package/dist/config/schema-normalization.d.ts +184 -0
- package/dist/config/schema-normalization.d.ts.map +1 -0
- package/dist/config/schema-runtime.d.ts +500 -0
- package/dist/config/schema-runtime.d.ts.map +1 -0
- package/dist/config/schema-types-bindings-platform.d.ts +378 -0
- package/dist/config/schema-types-bindings-platform.d.ts.map +1 -0
- package/dist/config/schema-types-bindings-resources.d.ts +551 -0
- package/dist/config/schema-types-bindings-resources.d.ts.map +1 -0
- package/dist/config/schema-types-bindings.d.ts +254 -0
- package/dist/config/schema-types-bindings.d.ts.map +1 -0
- package/dist/config/schema-types-build.d.ts +86 -0
- package/dist/config/schema-types-build.d.ts.map +1 -0
- package/dist/config/schema-types-runtime.d.ts +917 -0
- package/dist/config/schema-types-runtime.d.ts.map +1 -0
- package/dist/config/schema-types.d.ts +390 -0
- package/dist/config/schema-types.d.ts.map +1 -0
- package/dist/config/schema.d.ts +4495 -2214
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/service-bindings-validation.d.ts +36 -0
- package/dist/config/service-bindings-validation.d.ts.map +1 -0
- package/dist/config-2d6x21jn.js +105 -0
- package/dist/config-entry.d.ts +7 -0
- package/dist/config-entry.d.ts.map +1 -0
- package/dist/config-entry.js +16 -0
- package/dist/decorators/durable-object.d.ts.map +1 -1
- package/dist/deploy-g85w9drn.js +1066 -0
- package/dist/dev-server/d1-migrations.d.ts +36 -0
- package/dist/dev-server/d1-migrations.d.ts.map +1 -0
- package/dist/dev-server/dev-server-state.d.ts +59 -0
- package/dist/dev-server/dev-server-state.d.ts.map +1 -0
- package/dist/dev-server/gateway-script.d.ts +21 -0
- package/dist/dev-server/gateway-script.d.ts.map +1 -0
- package/dist/dev-server/miniflare-bindings.d.ts +59 -0
- package/dist/dev-server/miniflare-bindings.d.ts.map +1 -0
- package/dist/dev-server/miniflare-dev-config.d.ts +36 -0
- package/dist/dev-server/miniflare-dev-config.d.ts.map +1 -0
- package/dist/dev-server/miniflare-log.d.ts +20 -0
- package/dist/dev-server/miniflare-log.d.ts.map +1 -0
- package/dist/dev-server/miniflare-worker-config.d.ts +74 -0
- package/dist/dev-server/miniflare-worker-config.d.ts.map +1 -0
- package/dist/dev-server/reload-queue.d.ts +13 -0
- package/dist/dev-server/reload-queue.d.ts.map +1 -0
- package/dist/dev-server/runtime-stdio.d.ts +8 -0
- package/dist/dev-server/runtime-stdio.d.ts.map +1 -0
- package/dist/dev-server/server-startup-helpers.d.ts +84 -0
- package/dist/dev-server/server-startup-helpers.d.ts.map +1 -0
- package/dist/dev-server/server.d.ts +2 -0
- package/dist/dev-server/server.d.ts.map +1 -1
- package/dist/dev-server/vite-process.d.ts +15 -0
- package/dist/dev-server/vite-process.d.ts.map +1 -0
- package/dist/dev-server/vite-utils.d.ts +19 -1
- package/dist/dev-server/vite-utils.d.ts.map +1 -1
- package/dist/dev-server/worker-source-watcher.d.ts +17 -0
- package/dist/dev-server/worker-source-watcher.d.ts.map +1 -0
- package/dist/dev-server/worker-surface-paths.d.ts +6 -0
- package/dist/dev-server/worker-surface-paths.d.ts.map +1 -0
- package/dist/dev-ymkq3thq.js +2609 -0
- package/dist/{doctor-fmgb3d28.js → doctor-sjrcz7x9.js} +104 -35
- package/dist/{durable-object-t4kbb0yt.js → durable-object-v3gsnybk.js} +1 -1
- package/dist/env.d.ts +10 -0
- package/dist/env.d.ts.map +1 -1
- package/dist/index-0gtmnw0m.js +895 -0
- package/dist/index-11p28kxx.js +256 -0
- package/dist/index-15fpa5tx.js +232 -0
- package/dist/index-1d4jg11n.js +542 -0
- package/dist/index-2sc756r1.js +1578 -0
- package/dist/index-3edvz3hs.js +124 -0
- package/dist/index-3jme4hgw.js +1234 -0
- package/dist/index-467tm7r4.js +1033 -0
- package/dist/index-5yvpk954.js +699 -0
- package/dist/index-627srx16.js +45 -0
- package/dist/index-62b3gt2g.js +12 -0
- package/dist/index-6sj0v0dk.js +2284 -0
- package/dist/index-706k4606.js +52 -0
- package/dist/index-7zfv1g9m.js +147 -0
- package/dist/index-85yjb686.js +413 -0
- package/dist/index-aabgympv.js +39 -0
- package/dist/{index-z14anrqp.js → index-aqrwyy57.js} +93 -31
- package/dist/index-c4jmfzz7.js +109 -0
- package/dist/index-c8p4njqy.js +479 -0
- package/dist/index-dm9q84c7.js +360 -0
- package/dist/index-fjmdb57t.js +581 -0
- package/dist/index-g4fcnwhc.js +1205 -0
- package/dist/{index-18hvb6gb.js → index-gn5wy09x.js} +13 -2
- package/dist/index-hpwa6vsw.js +239 -0
- package/dist/index-mg8vwqxf.js +514 -0
- package/dist/index-pmeashfz.js +476 -0
- package/dist/{index-07q6yxyc.js → index-q8f4kawk.js} +68 -32
- package/dist/index-qmmqww7h.js +133 -0
- package/dist/{index-rbht7m9r.js → index-qwgr4q7s.js} +2 -1
- package/dist/index-qz6nbwpw.js +111 -0
- package/dist/index-sqkbyw0c.js +1428 -0
- package/dist/index-stgn34cr.js +148 -0
- package/dist/index-t9y0sve5.js +155 -0
- package/dist/index-thwacc28.js +74 -0
- package/dist/index-vhqww6tt.js +307 -0
- package/dist/{index-1xpj0m4r.js → index-z9gy8w6b.js} +1 -1
- package/dist/index-za0r01bx.js +588 -0
- package/dist/index-zwmphmc5.js +185 -0
- package/dist/index.d.ts +3 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -269
- package/dist/{init-f9mgmew3.js → init-cwpergap.js} +63 -69
- package/dist/login-fthspvbx.js +77 -0
- package/dist/previews-aa16z2hj.js +1337 -0
- package/dist/productions-vemjgfz0.js +505 -0
- package/dist/runtime/context-events.d.ts +13 -0
- package/dist/runtime/context-events.d.ts.map +1 -0
- package/dist/runtime/context-types.d.ts +82 -0
- package/dist/runtime/context-types.d.ts.map +1 -0
- package/dist/runtime/context.d.ts +20 -44
- package/dist/runtime/context.d.ts.map +1 -1
- package/dist/runtime/exports.d.ts +70 -55
- package/dist/runtime/exports.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +8 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +108 -99
- package/dist/runtime/middleware.d.ts +102 -60
- package/dist/runtime/middleware.d.ts.map +1 -1
- package/dist/runtime/router/index.d.ts +7 -0
- package/dist/runtime/router/index.d.ts.map +1 -0
- package/dist/runtime/router/types.d.ts +24 -0
- package/dist/runtime/router/types.d.ts.map +1 -0
- package/dist/runtime/validation.d.ts +17 -3
- package/dist/runtime/validation.d.ts.map +1 -1
- package/dist/secrets/local-secrets.d.ts +46 -0
- package/dist/secrets/local-secrets.d.ts.map +1 -0
- package/dist/secrets-b0x50dd1.js +91 -0
- package/dist/shims/local-hyperdrive.d.ts +12 -0
- package/dist/shims/local-hyperdrive.d.ts.map +1 -0
- package/dist/shims/local-media-bindings.d.ts +19 -0
- package/dist/shims/local-media-bindings.d.ts.map +1 -0
- package/dist/shims/local-worker-loader.d.ts +3 -0
- package/dist/shims/local-worker-loader.d.ts.map +1 -0
- package/dist/sveltekit/index.js +169 -75
- package/dist/sveltekit/local-bindings.d.ts +4 -0
- package/dist/sveltekit/local-bindings.d.ts.map +1 -0
- package/dist/sveltekit/platform.d.ts +19 -1
- package/dist/sveltekit/platform.d.ts.map +1 -1
- package/dist/test/ai-search.d.ts +39 -0
- package/dist/test/ai-search.d.ts.map +1 -0
- package/dist/test/binding-hints.d.ts +11 -0
- package/dist/test/binding-hints.d.ts.map +1 -0
- package/dist/test/cf.d.ts +35 -21
- package/dist/test/cf.d.ts.map +1 -1
- package/dist/test/containers.d.ts +87 -0
- package/dist/test/containers.d.ts.map +1 -0
- package/dist/test/email.d.ts +16 -7
- package/dist/test/email.d.ts.map +1 -1
- package/dist/test/index.d.ts +5 -8
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/index.js +4641 -43
- package/dist/test/offline-bindings.d.ts +65 -0
- package/dist/test/offline-bindings.d.ts.map +1 -0
- package/dist/test/queue.d.ts.map +1 -1
- package/dist/test/remote-ai.d.ts.map +1 -1
- package/dist/test/remote-cloudflare.d.ts +13 -0
- package/dist/test/remote-cloudflare.d.ts.map +1 -0
- package/dist/test/remote-vectorize.d.ts.map +1 -1
- package/dist/test/resolve-service-bindings.d.ts +63 -3
- package/dist/test/resolve-service-bindings.d.ts.map +1 -1
- package/dist/test/scheduled.d.ts.map +1 -1
- package/dist/test/should-skip.d.ts +14 -18
- package/dist/test/should-skip.d.ts.map +1 -1
- package/dist/test/simple-context-bindings.d.ts +13 -0
- package/dist/test/simple-context-bindings.d.ts.map +1 -0
- package/dist/test/simple-context-durable-objects.d.ts +6 -0
- package/dist/test/simple-context-durable-objects.d.ts.map +1 -0
- package/dist/test/simple-context-env.d.ts +35 -0
- package/dist/test/simple-context-env.d.ts.map +1 -0
- package/dist/test/simple-context-gateway-script.d.ts +2 -0
- package/dist/test/simple-context-gateway-script.d.ts.map +1 -0
- package/dist/test/simple-context-handlers.d.ts +12 -0
- package/dist/test/simple-context-handlers.d.ts.map +1 -0
- package/dist/test/simple-context-lifecycle.d.ts +32 -0
- package/dist/test/simple-context-lifecycle.d.ts.map +1 -0
- package/dist/test/simple-context-mfconfig.d.ts +10 -0
- package/dist/test/simple-context-mfconfig.d.ts.map +1 -0
- package/dist/test/simple-context-multi-worker.d.ts +16 -0
- package/dist/test/simple-context-multi-worker.d.ts.map +1 -0
- package/dist/test/simple-context-paths.d.ts +40 -0
- package/dist/test/simple-context-paths.d.ts.map +1 -0
- package/dist/test/simple-context-runtime.d.ts +19 -0
- package/dist/test/simple-context-runtime.d.ts.map +1 -0
- package/dist/test/simple-context-startup.d.ts +11 -0
- package/dist/test/simple-context-startup.d.ts.map +1 -0
- package/dist/test/simple-context-transport.d.ts +14 -0
- package/dist/test/simple-context-transport.d.ts.map +1 -0
- package/dist/test/simple-context.d.ts +7 -26
- package/dist/test/simple-context.d.ts.map +1 -1
- package/dist/test/tail.d.ts +2 -1
- package/dist/test/tail.d.ts.map +1 -1
- package/dist/test/utilities/artifacts.d.ts +11 -0
- package/dist/test/utilities/artifacts.d.ts.map +1 -0
- package/dist/test/utilities/context.d.ts +39 -0
- package/dist/test/utilities/context.d.ts.map +1 -0
- package/dist/test/utilities/d1.d.ts +21 -0
- package/dist/test/utilities/d1.d.ts.map +1 -0
- package/dist/test/utilities/env.d.ts +40 -0
- package/dist/test/utilities/env.d.ts.map +1 -0
- package/dist/test/utilities/kv.d.ts +11 -0
- package/dist/test/utilities/kv.d.ts.map +1 -0
- package/dist/test/utilities/media.d.ts +16 -0
- package/dist/test/utilities/media.d.ts.map +1 -0
- package/dist/test/utilities/platform.d.ts +41 -0
- package/dist/test/utilities/platform.d.ts.map +1 -0
- package/dist/test/utilities/queue.d.ts +5 -0
- package/dist/test/utilities/queue.d.ts.map +1 -0
- package/dist/test/utilities/r2.d.ts +2 -0
- package/dist/test/utilities/r2.d.ts.map +1 -0
- package/dist/test/utilities/workflows.d.ts +26 -0
- package/dist/test/utilities/workflows.d.ts.map +1 -0
- package/dist/test/utilities.d.ts +10 -98
- package/dist/test/utilities.d.ts.map +1 -1
- package/dist/test/worker.d.ts +6 -0
- package/dist/test/worker.d.ts.map +1 -1
- package/dist/token-35jcdqq8.js +419 -0
- package/dist/transform/durable-object.d.ts.map +1 -1
- package/dist/transform/worker-entrypoint.d.ts +5 -0
- package/dist/transform/worker-entrypoint.d.ts.map +1 -1
- package/dist/types-03w8zkg6.js +705 -0
- package/dist/utils/entrypoint-discovery.d.ts +6 -3
- package/dist/utils/entrypoint-discovery.d.ts.map +1 -1
- package/dist/utils/resolve-package.d.ts.map +1 -1
- package/dist/utils/send-email.d.ts +15 -0
- package/dist/utils/send-email.d.ts.map +1 -0
- package/dist/utils/send-email.js +19 -0
- package/dist/vite/config-file.d.ts +25 -0
- package/dist/vite/config-file.d.ts.map +1 -0
- package/dist/vite/index.d.ts +1 -0
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +25 -331
- package/dist/vite/plugin-config-hook.d.ts +28 -0
- package/dist/vite/plugin-config-hook.d.ts.map +1 -0
- package/dist/vite/plugin-context.d.ts +27 -0
- package/dist/vite/plugin-context.d.ts.map +1 -0
- package/dist/vite/plugin-durable-objects.d.ts +18 -0
- package/dist/vite/plugin-durable-objects.d.ts.map +1 -0
- package/dist/vite/plugin-programmatic.d.ts +44 -0
- package/dist/vite/plugin-programmatic.d.ts.map +1 -0
- package/dist/vite/plugin-service-bindings.d.ts +13 -0
- package/dist/vite/plugin-service-bindings.d.ts.map +1 -0
- package/dist/vite/plugin-transform.d.ts +41 -0
- package/dist/vite/plugin-transform.d.ts.map +1 -0
- package/dist/vite/plugin.d.ts +10 -41
- package/dist/vite/plugin.d.ts.map +1 -1
- package/dist/worker-55q6b8nc.js +513 -0
- package/dist/worker-entry/composed-worker.d.ts +7 -0
- package/dist/worker-entry/composed-worker.d.ts.map +1 -0
- package/dist/worker-entry/durable-object-discovery.d.ts +20 -0
- package/dist/worker-entry/durable-object-discovery.d.ts.map +1 -0
- package/dist/worker-entry/extensions.d.ts +5 -0
- package/dist/worker-entry/extensions.d.ts.map +1 -0
- package/dist/worker-entry/routes.d.ts +22 -0
- package/dist/worker-entry/routes.d.ts.map +1 -0
- package/dist/worker-entry/surface-paths.d.ts +26 -0
- package/dist/worker-entry/surface-paths.d.ts.map +1 -0
- package/dist/{worker-entrypoint-m9th0rg0.js → worker-entrypoint-3rmzd4c1.js} +3 -1
- package/dist/workflows/local-workflow-entrypoints.d.ts +7 -0
- package/dist/workflows/local-workflow-entrypoints.d.ts.map +1 -0
- package/package.json +154 -115
- package/dist/account-rvrj687w.js +0 -397
- package/dist/bridge/protocol.d.ts.map +0 -1
- package/dist/bridge/serialization.d.ts.map +0 -1
- package/dist/browser-shim/worker.d.ts +0 -14
- package/dist/browser-shim/worker.d.ts.map +0 -1
- package/dist/build-mnf6v8gd.js +0 -53
- package/dist/deploy-nhceck39.js +0 -70
- package/dist/dev-pa8dhm20.js +0 -2162
- package/dist/index-67qcae0f.js +0 -183
- package/dist/index-ep3445yc.js +0 -2225
- package/dist/index-gz1gndna.js +0 -307
- package/dist/index-hcex3rgh.js +0 -266
- package/dist/index-m2q41jwa.js +0 -462
- package/dist/index-n7rs26ft.js +0 -77
- package/dist/index-pf5s73n9.js +0 -1413
- package/dist/index-tfyxa77h.js +0 -850
- package/dist/index-tk6ej9dj.js +0 -94
- package/dist/test/bridge-context.d.ts +0 -76
- package/dist/test/bridge-context.d.ts.map +0 -1
- package/dist/test/multi-worker-context.d.ts +0 -114
- package/dist/test/multi-worker-context.d.ts.map +0 -1
- package/dist/types-5nyrz1sz.js +0 -454
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveConfigForEnvironment
|
|
3
|
+
} from "./index-2sc756r1.js";
|
|
4
|
+
|
|
5
|
+
// src/cli/commands/previews-support/family.ts
|
|
6
|
+
function compareConfiguredWorkerFamilies(left, right) {
|
|
7
|
+
if (left.role === "primary" && right.role !== "primary") {
|
|
8
|
+
return -1;
|
|
9
|
+
}
|
|
10
|
+
if (left.role !== "primary" && right.role === "primary") {
|
|
11
|
+
return 1;
|
|
12
|
+
}
|
|
13
|
+
return left.baseName.localeCompare(right.baseName);
|
|
14
|
+
}
|
|
15
|
+
function comparePreviewScopeRows(left, right) {
|
|
16
|
+
const leftTime = left.updatedAt?.getTime() ?? 0;
|
|
17
|
+
const rightTime = right.updatedAt?.getTime() ?? 0;
|
|
18
|
+
if (rightTime !== leftTime) {
|
|
19
|
+
return rightTime - leftTime;
|
|
20
|
+
}
|
|
21
|
+
return left.scope.localeCompare(right.scope);
|
|
22
|
+
}
|
|
23
|
+
function collectConfiguredWorkerFamilies(config, environment) {
|
|
24
|
+
const resolvedConfig = resolveConfigForEnvironment(config, environment);
|
|
25
|
+
const families = new Map;
|
|
26
|
+
families.set(resolvedConfig.name, {
|
|
27
|
+
baseName: resolvedConfig.name,
|
|
28
|
+
roleLabel: "primary",
|
|
29
|
+
role: "primary"
|
|
30
|
+
});
|
|
31
|
+
for (const [bindingName, binding] of Object.entries(resolvedConfig.bindings?.services ?? {})) {
|
|
32
|
+
const existing = families.get(binding.service);
|
|
33
|
+
if (existing) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
families.set(binding.service, {
|
|
37
|
+
baseName: binding.service,
|
|
38
|
+
roleLabel: bindingName,
|
|
39
|
+
role: "service"
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return Array.from(families.values()).sort(compareConfiguredWorkerFamilies);
|
|
43
|
+
}
|
|
44
|
+
function getWorkerUrl(workerName, workersSubdomain) {
|
|
45
|
+
if (!workersSubdomain) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
return `https://${workerName}.${workersSubdomain}.workers.dev`;
|
|
49
|
+
}
|
|
50
|
+
function getWorkerScopeSuffix(workerName, baseName) {
|
|
51
|
+
if (!workerName.startsWith(`${baseName}-`)) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const suffix = workerName.slice(baseName.length + 1).trim();
|
|
55
|
+
return suffix || undefined;
|
|
56
|
+
}
|
|
57
|
+
function buildStableWorkerRowsFromLiveWorkers(families, workers, workersSubdomain) {
|
|
58
|
+
const workersByName = new Map(workers.map((worker) => [worker.name, worker]));
|
|
59
|
+
return families.map((family) => {
|
|
60
|
+
const worker = workersByName.get(family.baseName);
|
|
61
|
+
const status = worker ? "active" : "missing";
|
|
62
|
+
return {
|
|
63
|
+
workerName: family.baseName,
|
|
64
|
+
role: family.roleLabel,
|
|
65
|
+
status,
|
|
66
|
+
updatedAt: worker?.modifiedOn,
|
|
67
|
+
url: worker ? getWorkerUrl(family.baseName, workersSubdomain) : undefined
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function getDedicatedPreviewFamilyNamesFromWorkers(families, workers) {
|
|
72
|
+
const familyNames = new Set;
|
|
73
|
+
const workerNames = workers.map((worker) => worker.name);
|
|
74
|
+
for (const family of families) {
|
|
75
|
+
if (family.role === "primary") {
|
|
76
|
+
familyNames.add(family.baseName);
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
if (workerNames.some((workerName) => Boolean(getWorkerScopeSuffix(workerName, family.baseName)))) {
|
|
80
|
+
familyNames.add(family.baseName);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return familyNames;
|
|
84
|
+
}
|
|
85
|
+
function buildPreviewScopeRowsFromLiveWorkers(families, workers, workersSubdomain) {
|
|
86
|
+
const workersByName = new Map(workers.map((worker) => [worker.name, worker]));
|
|
87
|
+
const previewFamilyNames = getDedicatedPreviewFamilyNamesFromWorkers(families, workers);
|
|
88
|
+
const expectedFamilies = families.filter((family) => previewFamilyNames.has(family.baseName));
|
|
89
|
+
const workerCandidatesByScope = buildPreviewWorkerCandidatesByScope(families, workers);
|
|
90
|
+
return Array.from(workerCandidatesByScope.keys()).map((scope) => {
|
|
91
|
+
const resolvedFamilies = expectedFamilies.map((family) => ({
|
|
92
|
+
family,
|
|
93
|
+
worker: workersByName.get(`${family.baseName}-${scope}`)
|
|
94
|
+
}));
|
|
95
|
+
const presentFamilies = resolvedFamilies.filter((entry) => entry.worker);
|
|
96
|
+
const updatedAt = presentFamilies.reduce((latest, entry) => {
|
|
97
|
+
const currentDate = entry.worker?.modifiedOn;
|
|
98
|
+
if (!currentDate) {
|
|
99
|
+
return latest;
|
|
100
|
+
}
|
|
101
|
+
if (!latest || currentDate.getTime() > latest.getTime()) {
|
|
102
|
+
return currentDate;
|
|
103
|
+
}
|
|
104
|
+
return latest;
|
|
105
|
+
}, undefined);
|
|
106
|
+
const primaryEntry = resolvedFamilies.find((entry) => entry.family.role === "primary");
|
|
107
|
+
const entryWorker = primaryEntry?.worker ?? presentFamilies[0]?.worker;
|
|
108
|
+
const missingLabels = resolvedFamilies.filter((entry) => !entry.worker).map((entry) => entry.family.role === "primary" ? "primary" : entry.family.roleLabel);
|
|
109
|
+
const notes = [];
|
|
110
|
+
if (missingLabels.length > 0) {
|
|
111
|
+
notes.push(`missing ${missingLabels.join(", ")}`);
|
|
112
|
+
}
|
|
113
|
+
const strategy = "dedicated workers";
|
|
114
|
+
const status = presentFamilies.length === resolvedFamilies.length ? "ready" : "partial";
|
|
115
|
+
return {
|
|
116
|
+
scope,
|
|
117
|
+
strategy,
|
|
118
|
+
workersLabel: `${presentFamilies.length}/${resolvedFamilies.length}`,
|
|
119
|
+
status,
|
|
120
|
+
updatedAt,
|
|
121
|
+
notes: notes.length > 0 ? notes.join(" · ") : undefined,
|
|
122
|
+
entryUrl: entryWorker ? getWorkerUrl(entryWorker.name, workersSubdomain) : undefined
|
|
123
|
+
};
|
|
124
|
+
}).sort(comparePreviewScopeRows);
|
|
125
|
+
}
|
|
126
|
+
function buildPreviewWorkerCandidatesByScope(families, workers) {
|
|
127
|
+
const candidates = new Map;
|
|
128
|
+
for (const worker of workers) {
|
|
129
|
+
for (const family of families) {
|
|
130
|
+
const scope = getWorkerScopeSuffix(worker.name, family.baseName);
|
|
131
|
+
if (!scope) {
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
const names = candidates.get(scope) ?? new Set;
|
|
135
|
+
names.add(worker.name);
|
|
136
|
+
candidates.set(scope, names);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return new Map(Array.from(candidates.entries()).map(([scope, workerNames]) => {
|
|
140
|
+
return [scope, Array.from(workerNames).sort((left, right) => left.localeCompare(right))];
|
|
141
|
+
}));
|
|
142
|
+
}
|
|
143
|
+
function orderPreviewWorkerNamesForDeletion(workerNames, scope, families) {
|
|
144
|
+
const familyPriority = new Map;
|
|
145
|
+
for (const family of families) {
|
|
146
|
+
familyPriority.set(family.baseName, {
|
|
147
|
+
priority: family.role === "primary" ? 0 : 1,
|
|
148
|
+
roleLabel: family.roleLabel
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
const resolveFamilyForWorker = (workerName) => {
|
|
152
|
+
for (const family of families) {
|
|
153
|
+
if (getWorkerScopeSuffix(workerName, family.baseName) === scope) {
|
|
154
|
+
const resolved = familyPriority.get(family.baseName);
|
|
155
|
+
if (resolved) {
|
|
156
|
+
return {
|
|
157
|
+
priority: resolved.priority,
|
|
158
|
+
roleLabel: resolved.roleLabel,
|
|
159
|
+
baseName: family.baseName
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return {
|
|
165
|
+
priority: 2,
|
|
166
|
+
roleLabel: workerName
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
return [...workerNames].sort((left, right) => {
|
|
170
|
+
const leftFamily = resolveFamilyForWorker(left);
|
|
171
|
+
const rightFamily = resolveFamilyForWorker(right);
|
|
172
|
+
if (leftFamily.priority !== rightFamily.priority) {
|
|
173
|
+
return leftFamily.priority - rightFamily.priority;
|
|
174
|
+
}
|
|
175
|
+
if (leftFamily.roleLabel !== rightFamily.roleLabel) {
|
|
176
|
+
return leftFamily.roleLabel.localeCompare(rightFamily.roleLabel);
|
|
177
|
+
}
|
|
178
|
+
if (leftFamily.baseName && rightFamily.baseName && leftFamily.baseName !== rightFamily.baseName) {
|
|
179
|
+
return leftFamily.baseName.localeCompare(rightFamily.baseName);
|
|
180
|
+
}
|
|
181
|
+
return left.localeCompare(right);
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export { collectConfiguredWorkerFamilies, buildStableWorkerRowsFromLiveWorkers, buildPreviewScopeRowsFromLiveWorkers, buildPreviewWorkerCandidatesByScope, orderPreviewWorkerNamesForDeletion };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
export { defineConfig, loadConfig, compileConfig, stringifyConfig, configSchema, ConfigNotFoundError, ConfigValidationError, type DevflareConfig, type DevflareConfigInput } from './config';
|
|
2
|
-
export { ref,
|
|
1
|
+
export { defineConfig, preview, loadConfig, loadResolvedConfig, compileConfig, stringifyConfig, configSchema, ConfigNotFoundError, ConfigValidationError, ConfigResourceResolutionError, type DevflareConfig, type DevflareConfigInput, type PreviewScopeFn, type PreviewScopeOptions, type PreviewScopedName, type PreviewScopedNameOptions, type LoadResolvedConfigOptions } from './config';
|
|
2
|
+
export { ref, type RefResult, type WorkerBinding, type WorkerBindingAccessor } from './config';
|
|
3
3
|
export { workerName } from './workerName';
|
|
4
4
|
export { durableObject, getDurableObjectOptions, type DurableObjectOptions } from './decorators';
|
|
5
|
-
export { findDurableObjectClasses, findDurableObjectClassesDetailed, generateWrapper, transformDurableObject, type DOClassInfo, type WrapperOptions, type TransformResult } from './transform/durable-object';
|
|
6
|
-
export { transformWorkerEntrypoint, findExportedFunctions, shouldTransformWorker, generateRpcInterface, type ExportedFunction, type WorkerTransformOptions, type WorkerTransformResult } from './transform';
|
|
7
5
|
export { runCli, parseArgs } from './cli';
|
|
8
6
|
export type { ParsedArgs, CliOptions, CliResult } from './cli';
|
|
9
|
-
export {
|
|
10
|
-
export { env } from './env';
|
|
11
|
-
export { createTestContext, createMockTestContext, createMockKV, createMockD1, createMockR2, createMockQueue, createMockEnv, withTestContext, type TestContext, type TestContextOptions, type MockEnvOptions, createBridgeTestContext, stopBridgeTestContext, getBridgeTestContext, testEnv, type BridgeTestContext, type BridgeTestContextOptions } from './test';
|
|
7
|
+
export { env, vars } from './env';
|
|
12
8
|
export { defineConfig as default } from './config';
|
|
13
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACN,YAAY,EACZ,UAAU,EACV,aAAa,EACb,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,MAAM,UAAU,CAAA;AAGjB,OAAO,EACN,GAAG,EACH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACN,YAAY,EACZ,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,EACrB,6BAA6B,EAC7B,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,MAAM,UAAU,CAAA;AAGjB,OAAO,EACN,GAAG,EACH,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,MAAM,UAAU,CAAA;AAGjB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGzC,OAAO,EACN,aAAa,EACb,uBAAuB,EACvB,KAAK,oBAAoB,EACzB,MAAM,cAAc,CAAA;AAGrB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACzC,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG9D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAGjC,OAAO,EAAE,YAAY,IAAI,OAAO,EAAE,MAAM,UAAU,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,298 +1,63 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
createMockEnv,
|
|
5
|
-
createMockKV,
|
|
6
|
-
createMockQueue,
|
|
7
|
-
createMockR2,
|
|
8
|
-
createMockTestContext,
|
|
9
|
-
createTestContext,
|
|
10
|
-
env,
|
|
11
|
-
getBridgeTestContext,
|
|
12
|
-
stopBridgeTestContext,
|
|
13
|
-
testEnv,
|
|
14
|
-
withTestContext
|
|
15
|
-
} from "./index-ep3445yc.js";
|
|
16
|
-
import {
|
|
17
|
-
findExportedFunctions,
|
|
18
|
-
generateRpcInterface,
|
|
19
|
-
shouldTransformWorker,
|
|
20
|
-
transformWorkerEntrypoint
|
|
21
|
-
} from "./index-z14anrqp.js";
|
|
22
|
-
import"./index-tk6ej9dj.js";
|
|
23
|
-
import"./index-d8bdkx2h.js";
|
|
24
|
-
import"./index-rbht7m9r.js";
|
|
2
|
+
workerName
|
|
3
|
+
} from "./index-62b3gt2g.js";
|
|
25
4
|
import {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
import
|
|
32
|
-
server_default
|
|
33
|
-
} from "./index-m2q41jwa.js";
|
|
5
|
+
parseArgs,
|
|
6
|
+
runCli
|
|
7
|
+
} from "./index-sqkbyw0c.js";
|
|
8
|
+
import"./index-627srx16.js";
|
|
9
|
+
import"./index-stgn34cr.js";
|
|
10
|
+
import"./index-3t6rypgc.js";
|
|
34
11
|
import {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
getMiniflare,
|
|
39
|
-
initEnv,
|
|
40
|
-
setBindingHints,
|
|
41
|
-
startMiniflare,
|
|
42
|
-
startMiniflareFromConfig,
|
|
43
|
-
stopMiniflare
|
|
44
|
-
} from "./index-pf5s73n9.js";
|
|
12
|
+
env,
|
|
13
|
+
vars
|
|
14
|
+
} from "./index-qz6nbwpw.js";
|
|
45
15
|
import {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
16
|
+
durableObject,
|
|
17
|
+
getDurableObjectOptions
|
|
18
|
+
} from "./index-a855bdsx.js";
|
|
19
|
+
import"./index-6sj0v0dk.js";
|
|
20
|
+
import"./index-hpwa6vsw.js";
|
|
51
21
|
import {
|
|
52
22
|
compileConfig,
|
|
53
23
|
stringifyConfig
|
|
54
|
-
} from "./index-
|
|
24
|
+
} from "./index-5yvpk954.js";
|
|
55
25
|
import {
|
|
56
26
|
ConfigNotFoundError,
|
|
27
|
+
ConfigResourceResolutionError,
|
|
57
28
|
ConfigValidationError,
|
|
58
29
|
configSchema,
|
|
59
|
-
loadConfig
|
|
60
|
-
|
|
61
|
-
|
|
30
|
+
loadConfig,
|
|
31
|
+
loadResolvedConfig
|
|
32
|
+
} from "./index-2sc756r1.js";
|
|
33
|
+
import"./index-1d4jg11n.js";
|
|
34
|
+
import"./index-mg8vwqxf.js";
|
|
62
35
|
import {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
} from "./index-a855bdsx.js";
|
|
36
|
+
preview
|
|
37
|
+
} from "./index-c8p4njqy.js";
|
|
66
38
|
import {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if (typeof __DEVFLARE_WORKER_NAME__ !== "undefined") {
|
|
72
|
-
return __DEVFLARE_WORKER_NAME__;
|
|
73
|
-
}
|
|
74
|
-
if (typeof process !== "undefined" && process.env?.DEVFLARE_WORKER_NAME) {
|
|
75
|
-
return process.env.DEVFLARE_WORKER_NAME;
|
|
76
|
-
}
|
|
77
|
-
return "unknown";
|
|
78
|
-
})();
|
|
79
|
-
// src/cli/index.ts
|
|
80
|
-
import { createConsola } from "consola";
|
|
81
|
-
var COMMANDS = ["init", "dev", "build", "deploy", "types", "doctor", "account", "ai", "remote", "help", "version"];
|
|
82
|
-
var VERSION = "0.1.0";
|
|
83
|
-
function parseArgs(argv) {
|
|
84
|
-
const args = [];
|
|
85
|
-
const options = {};
|
|
86
|
-
let command = "help";
|
|
87
|
-
let unknownCommand;
|
|
88
|
-
let i = 0;
|
|
89
|
-
while (i < argv.length) {
|
|
90
|
-
const arg = argv[i];
|
|
91
|
-
if (arg === "--help" || arg === "-h") {
|
|
92
|
-
return { command: "help", args: [], options: {} };
|
|
93
|
-
}
|
|
94
|
-
if (arg === "--version" || arg === "-v") {
|
|
95
|
-
return { command: "version", args: [], options: {} };
|
|
96
|
-
}
|
|
97
|
-
if (arg.startsWith("-") && !/^-\d/.test(arg)) {
|
|
98
|
-
const isLongFlag = arg.startsWith("--");
|
|
99
|
-
const key = isLongFlag ? arg.slice(2) : arg.slice(1);
|
|
100
|
-
const nextArg = argv[i + 1];
|
|
101
|
-
if (nextArg && !nextArg.startsWith("-")) {
|
|
102
|
-
options[key] = nextArg;
|
|
103
|
-
i += 2;
|
|
104
|
-
} else {
|
|
105
|
-
options[key] = true;
|
|
106
|
-
i++;
|
|
107
|
-
}
|
|
108
|
-
} else if (!command || command === "help") {
|
|
109
|
-
if (COMMANDS.includes(arg)) {
|
|
110
|
-
command = arg;
|
|
111
|
-
} else {
|
|
112
|
-
command = "help";
|
|
113
|
-
unknownCommand = arg;
|
|
114
|
-
}
|
|
115
|
-
i++;
|
|
116
|
-
} else {
|
|
117
|
-
args.push(arg);
|
|
118
|
-
i++;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
return { command, args, options, unknownCommand };
|
|
122
|
-
}
|
|
123
|
-
function getHelpText() {
|
|
124
|
-
return `
|
|
125
|
-
devflare - Config Compiler + CLI Orchestrator for Cloudflare Workers
|
|
126
|
-
|
|
127
|
-
Usage:
|
|
128
|
-
devflare <command> [options]
|
|
129
|
-
|
|
130
|
-
Commands:
|
|
131
|
-
init [name] Create a new devflare project
|
|
132
|
-
dev Start development server
|
|
133
|
-
build Build for production
|
|
134
|
-
deploy Deploy to Cloudflare
|
|
135
|
-
types Generate TypeScript types
|
|
136
|
-
doctor Check project configuration
|
|
137
|
-
account View Cloudflare account info
|
|
138
|
-
ai View AI models and pricing
|
|
139
|
-
remote Manage remote test mode (AI, Vectorize)
|
|
140
|
-
|
|
141
|
-
Global Options:
|
|
142
|
-
-h, --help Show help
|
|
143
|
-
-v, --version Show version
|
|
144
|
-
--config <path> Path to config file
|
|
145
|
-
--debug Enable debug mode
|
|
146
|
-
|
|
147
|
-
Dev Command Options:
|
|
148
|
-
--port <port> Preferred Vite dev server port (default: 5173)
|
|
149
|
-
--persist Persist Miniflare storage data
|
|
150
|
-
--verbose Enable verbose logging
|
|
151
|
-
--log Log all output to .log-{datetime} file AND terminal
|
|
152
|
-
--log-temp Log all output to .log file (overwritten) AND terminal
|
|
153
|
-
|
|
154
|
-
Dev Server Features:
|
|
155
|
-
• Miniflare for ALL Cloudflare bindings (KV, D1, R2, DOs, Queues, AI)
|
|
156
|
-
• Optional Vite HMR when a local vite.config.* is present
|
|
157
|
-
• Rolldown for fast DO bundling with watch mode
|
|
158
|
-
• DO hot reload when files change (no restart needed)
|
|
159
|
-
• WebSocket bridge for seamless Node.js ↔ Miniflare communication
|
|
160
|
-
|
|
161
|
-
Examples:
|
|
162
|
-
devflare init my-app
|
|
163
|
-
devflare dev # Start worker-only or unified dev server
|
|
164
|
-
devflare dev --port 3000 # Custom Vite port when Vite is enabled
|
|
165
|
-
devflare dev --persist # Persist storage between restarts
|
|
166
|
-
devflare dev --log-temp # Log output to .log file
|
|
167
|
-
devflare build
|
|
168
|
-
devflare deploy --env production
|
|
169
|
-
`.trim();
|
|
170
|
-
}
|
|
171
|
-
async function runCli(argv, options = {}) {
|
|
172
|
-
const logger = createConsola({
|
|
173
|
-
level: options.silent ? -999 : 3,
|
|
174
|
-
formatOptions: {
|
|
175
|
-
date: false
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
const parsed = parseArgs(argv);
|
|
179
|
-
if (parsed.unknownCommand) {
|
|
180
|
-
logger.error(`Unknown command: ${parsed.unknownCommand}`);
|
|
181
|
-
logger.info("Run `devflare --help` for available commands");
|
|
182
|
-
return { exitCode: 1 };
|
|
183
|
-
}
|
|
184
|
-
switch (parsed.command) {
|
|
185
|
-
case "help":
|
|
186
|
-
logger.info(getHelpText());
|
|
187
|
-
return { exitCode: 0, output: getHelpText() };
|
|
188
|
-
case "version":
|
|
189
|
-
logger.info(`devflare v${VERSION}`);
|
|
190
|
-
return { exitCode: 0, output: VERSION };
|
|
191
|
-
case "init":
|
|
192
|
-
return runInit(parsed, logger, options);
|
|
193
|
-
case "dev":
|
|
194
|
-
return runDev(parsed, logger, options);
|
|
195
|
-
case "build":
|
|
196
|
-
return runBuild(parsed, logger, options);
|
|
197
|
-
case "deploy":
|
|
198
|
-
return runDeploy(parsed, logger, options);
|
|
199
|
-
case "types":
|
|
200
|
-
return runTypes(parsed, logger, options);
|
|
201
|
-
case "doctor":
|
|
202
|
-
return runDoctor(parsed, logger, options);
|
|
203
|
-
case "account":
|
|
204
|
-
return runAccount(parsed, logger, options);
|
|
205
|
-
case "ai":
|
|
206
|
-
return runAI();
|
|
207
|
-
case "remote":
|
|
208
|
-
return runRemote(parsed, logger, options);
|
|
209
|
-
default:
|
|
210
|
-
logger.error(`Unknown command: ${parsed.command}`);
|
|
211
|
-
return { exitCode: 1 };
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
async function runInit(parsed, logger, options) {
|
|
215
|
-
const { runInitCommand } = await import("./init-f9mgmew3.js");
|
|
216
|
-
return runInitCommand(parsed, logger, options);
|
|
217
|
-
}
|
|
218
|
-
async function runDev(parsed, logger, options) {
|
|
219
|
-
const { runDevCommand } = await import("./dev-pa8dhm20.js");
|
|
220
|
-
return runDevCommand(parsed, logger, options);
|
|
221
|
-
}
|
|
222
|
-
async function runBuild(parsed, logger, options) {
|
|
223
|
-
const { runBuildCommand } = await import("./build-mnf6v8gd.js");
|
|
224
|
-
return runBuildCommand(parsed, logger, options);
|
|
225
|
-
}
|
|
226
|
-
async function runDeploy(parsed, logger, options) {
|
|
227
|
-
const { runDeployCommand } = await import("./deploy-nhceck39.js");
|
|
228
|
-
return runDeployCommand(parsed, logger, options);
|
|
229
|
-
}
|
|
230
|
-
async function runTypes(parsed, logger, options) {
|
|
231
|
-
const { runTypesCommand } = await import("./types-5nyrz1sz.js");
|
|
232
|
-
return runTypesCommand(parsed, logger, options);
|
|
233
|
-
}
|
|
234
|
-
async function runDoctor(parsed, logger, options) {
|
|
235
|
-
const { runDoctorCommand } = await import("./doctor-fmgb3d28.js");
|
|
236
|
-
return runDoctorCommand(parsed, logger, options);
|
|
237
|
-
}
|
|
238
|
-
async function runAccount(parsed, logger, options) {
|
|
239
|
-
const { runAccountCommand } = await import("./account-rvrj687w.js");
|
|
240
|
-
return runAccountCommand(parsed, logger, options);
|
|
241
|
-
}
|
|
242
|
-
async function runAI() {
|
|
243
|
-
const { runAICommand } = await import("./ai-dx4fr9jh.js");
|
|
244
|
-
return runAICommand();
|
|
245
|
-
}
|
|
246
|
-
async function runRemote(parsed, logger, options) {
|
|
247
|
-
const { runRemoteCommand } = await import("./remote-q59qk463.js");
|
|
248
|
-
return runRemoteCommand(parsed, logger, options);
|
|
249
|
-
}
|
|
39
|
+
defineConfig,
|
|
40
|
+
ref
|
|
41
|
+
} from "./index-q8f4kawk.js";
|
|
42
|
+
import"./index-37x76zdn.js";
|
|
250
43
|
export {
|
|
251
44
|
workerName,
|
|
252
|
-
|
|
253
|
-
transformWorkerEntrypoint,
|
|
254
|
-
transformDurableObject,
|
|
255
|
-
testEnv,
|
|
45
|
+
vars,
|
|
256
46
|
stringifyConfig,
|
|
257
|
-
stopMiniflare,
|
|
258
|
-
stopBridgeTestContext,
|
|
259
|
-
startMiniflareFromConfig,
|
|
260
|
-
startMiniflare,
|
|
261
|
-
shouldTransformWorker,
|
|
262
|
-
setBindingHints,
|
|
263
|
-
serviceBinding,
|
|
264
47
|
runCli,
|
|
265
|
-
resolveRef,
|
|
266
48
|
ref,
|
|
49
|
+
preview,
|
|
267
50
|
parseArgs,
|
|
51
|
+
loadResolvedConfig,
|
|
268
52
|
loadConfig,
|
|
269
|
-
initEnv,
|
|
270
|
-
getMiniflare,
|
|
271
53
|
getDurableObjectOptions,
|
|
272
|
-
getClient,
|
|
273
|
-
getBridgeTestContext,
|
|
274
|
-
generateWrapper,
|
|
275
|
-
generateRpcInterface,
|
|
276
|
-
server_default as gateway,
|
|
277
|
-
findExportedFunctions,
|
|
278
|
-
findDurableObjectClassesDetailed,
|
|
279
|
-
findDurableObjectClasses,
|
|
280
54
|
env,
|
|
281
55
|
durableObject,
|
|
282
56
|
defineConfig,
|
|
283
57
|
defineConfig as default,
|
|
284
|
-
createTestContext,
|
|
285
|
-
createMockTestContext,
|
|
286
|
-
createMockR2,
|
|
287
|
-
createMockQueue,
|
|
288
|
-
createMockKV,
|
|
289
|
-
createMockEnv,
|
|
290
|
-
createMockD1,
|
|
291
|
-
createEnvProxy,
|
|
292
|
-
createBridgeTestContext,
|
|
293
58
|
configSchema,
|
|
294
59
|
compileConfig,
|
|
295
60
|
ConfigValidationError,
|
|
296
|
-
|
|
297
|
-
|
|
61
|
+
ConfigResourceResolutionError,
|
|
62
|
+
ConfigNotFoundError
|
|
298
63
|
};
|