devflare 1.0.0-next.5 → 1.0.0-next.51
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/LICENSE +21 -0
- package/LLM.md +17312 -2139
- package/README.md +397 -605
- package/bin/devflare.js +30 -14
- package/dist/_chunks/account-Csog80ie.js +462 -0
- package/dist/_chunks/account-resources-CsmVowJp.js +159 -0
- package/dist/_chunks/ai-CBEuLdoP.js +322 -0
- package/dist/_chunks/api-TzdliH-6.js +568 -0
- package/dist/_chunks/build-Ccza8VQz.js +24 -0
- package/dist/_chunks/build-artifacts-BNssqhxE.js +483 -0
- package/dist/_chunks/cli-CU7wSG1-.js +1163 -0
- package/dist/_chunks/cloudflare-BaloqI3H.js +157 -0
- package/dist/_chunks/colors-DiK6wPJ5.js +13 -0
- package/dist/_chunks/command-utils-_bGRraDR.js +45 -0
- package/dist/_chunks/compiler-BtLp9T9N.js +500 -0
- package/dist/_chunks/config-QU8UEWmA.js +78 -0
- package/dist/_chunks/config-path-1yI7BiDU.js +42 -0
- package/dist/_chunks/context-CX50Y2Kb.js +2250 -0
- package/dist/_chunks/decorators-QmV57ixr.js +19 -0
- package/dist/_chunks/dependencies-C2oxFjU_.js +57 -0
- package/dist/_chunks/deploy-aifBaMVv.js +1032 -0
- package/dist/_chunks/dev-DF_3baGr.js +3483 -0
- package/dist/_chunks/doctor-tR9kGT_Z.js +219 -0
- package/dist/_chunks/durable-object-DMtH0XYX.js +234 -0
- package/dist/_chunks/env-S0_nMVz1.js +125 -0
- package/dist/_chunks/family-DKPp4wqj.js +143 -0
- package/dist/_chunks/generated-artifacts-dMJY4KAt.js +32 -0
- package/dist/_chunks/glob-CmQOvunB.js +56 -0
- package/dist/_chunks/init-DnkJOmpW.js +165 -0
- package/dist/_chunks/loader-OQ2AWpqm.js +1308 -0
- package/dist/_chunks/local-dev-vars-CTSa-wvF.js +81 -0
- package/dist/_chunks/local-hyperdrive-CJ90j46O.js +119 -0
- package/dist/_chunks/local-media-bindings-DsAW4AMF.js +335 -0
- package/dist/_chunks/local-secrets-CYoHfvQ1.js +123 -0
- package/dist/_chunks/local-workflow-entrypoints-8d_mXh8T.js +90 -0
- package/dist/_chunks/login-rVWUZOKC.js +51 -0
- package/dist/_chunks/package-metadata-DjHBLB-z.js +39 -0
- package/dist/_chunks/preferences-BKp_7XJx.js +241 -0
- package/dist/_chunks/preview-C3Cdr8an.js +462 -0
- package/dist/_chunks/preview-registry-ClAbLTHH.js +1186 -0
- package/dist/_chunks/preview-resources-DRWR0gaB.js +359 -0
- package/dist/_chunks/previews-BxNq8Y_J.js +1134 -0
- package/dist/_chunks/productions-DK7xwbEs.js +411 -0
- package/dist/_chunks/ref-CYJNAAe_.js +178 -0
- package/dist/_chunks/remote-CZnP-HLJ.js +79 -0
- package/dist/_chunks/remote-config-D39BY9ji.js +132 -0
- package/dist/_chunks/resolve-package-qizBfCIm.js +152 -0
- package/dist/_chunks/rolldown-runtime-CvQ6eiug.js +14 -0
- package/dist/_chunks/routes-B6XiI8Sa.js +851 -0
- package/dist/_chunks/runtime-DL-Nz3k8.js +550 -0
- package/dist/_chunks/schema-normalization-GjhTATHL.js +666 -0
- package/dist/_chunks/secrets-qT1JaBGt.js +95 -0
- package/dist/_chunks/tail-CuWI04BL.js +239 -0
- package/dist/_chunks/token-Dmi0KXyX.js +333 -0
- package/dist/_chunks/tokens-iVcgNXi-.js +221 -0
- package/dist/_chunks/types-BquPXsFg.js +484 -0
- package/dist/_chunks/ui-BUoZApvE.js +103 -0
- package/dist/_chunks/usage-BBTGzjon.js +272 -0
- package/dist/_chunks/vite-D_wLDGBs.js +1267 -0
- package/dist/_chunks/vite-utils-OVLMV605.js +183 -0
- package/dist/_chunks/worker-DEF-e8LL.js +410 -0
- package/dist/_chunks/worker-bundler-dTTnYU3n.js +458 -0
- package/dist/_chunks/worker-entrypoint-CQW77lG8.js +247 -0
- package/dist/_chunks/workerName-CFJsLZA-.js +23 -0
- package/dist/bridge/client.d.ts +49 -7
- 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 +6 -6
- 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 +85 -2
- package/dist/bridge/miniflare.d.ts.map +1 -1
- package/dist/bridge/proxy.d.ts +12 -11
- 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 +46 -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} +32 -8
- 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 +2 -2
- package/dist/browser-shim/handler.d.ts.map +1 -1
- package/dist/browser-shim/index.d.ts +2 -2
- package/dist/browser-shim/server.d.ts +63 -0
- package/dist/browser-shim/server.d.ts.map +1 -1
- package/dist/browser.d.ts +5705 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +80 -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 +3 -1
- 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 +2 -2
- package/dist/cli/commands/account.d.ts.map +1 -1
- package/dist/cli/commands/ai.d.ts +1 -1
- package/dist/cli/commands/ai.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 +2 -2
- 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 +9 -1
- package/dist/cli/commands/dev.d.ts.map +1 -1
- package/dist/cli/commands/doctor.d.ts +2 -2
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/init.d.ts +2 -2
- 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/remote.d.ts +1 -1
- package/dist/cli/commands/remote.d.ts.map +1 -1
- package/dist/cli/commands/secrets.d.ts +4 -0
- package/dist/cli/commands/secrets.d.ts.map +1 -0
- package/dist/cli/commands/tail.d.ts +44 -0
- package/dist/cli/commands/tail.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 +121 -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 +2 -2
- 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 +2 -1
- 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/gradual-deploy.d.ts +49 -0
- package/dist/cli/gradual-deploy.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 +2 -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/cli/wrangler-auth.d.ts +1 -1
- 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 +1 -1
- package/dist/cloudflare/auth.d.ts.map +1 -1
- package/dist/cloudflare/index.d.ts +61 -6
- package/dist/cloudflare/index.d.ts.map +1 -1
- package/dist/cloudflare/index.js +4 -13
- 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/remote-config.d.ts.map +1 -1
- 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 +31 -3
- 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 +309 -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/cron.d.ts +19 -0
- package/dist/config/cron.d.ts.map +1 -0
- package/dist/config/define.d.ts +8 -5
- 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 +2 -1
- 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 +29 -0
- package/dist/config/preview.d.ts.map +1 -0
- package/dist/config/ref.d.ts +16 -25
- 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 +2087 -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 +3771 -0
- package/dist/config/schema-env.d.ts.map +1 -0
- package/dist/config/schema-normalization.d.ts +267 -0
- package/dist/config/schema-normalization.d.ts.map +1 -0
- package/dist/config/schema-runtime.d.ts +557 -0
- package/dist/config/schema-runtime.d.ts.map +1 -0
- package/dist/config/schema-types-bindings-platform.d.ts +520 -0
- package/dist/config/schema-types-bindings-platform.d.ts.map +1 -0
- package/dist/config/schema-types-bindings-resources.d.ts +802 -0
- package/dist/config/schema-types-bindings-resources.d.ts.map +1 -0
- package/dist/config/schema-types-bindings.d.ts +293 -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-server.d.ts +122 -0
- package/dist/config/schema-types-runtime-server.d.ts.map +1 -0
- package/dist/config/schema-types-runtime.d.ts +913 -0
- package/dist/config/schema-types-runtime.d.ts.map +1 -0
- package/dist/config/schema-types.d.ts +458 -0
- package/dist/config/schema-types.d.ts.map +1 -0
- package/dist/config/schema.d.ts +5699 -2021
- 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-entry.d.ts +7 -0
- package/dist/config-entry.d.ts.map +1 -0
- package/dist/config-entry.js +3 -0
- package/dist/decorators/durable-object.d.ts.map +1 -1
- package/dist/decorators/index.d.ts +2 -2
- package/dist/decorators/index.js +2 -9
- 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/index.d.ts +1 -1
- package/dist/dev-server/miniflare-bindings.d.ts +90 -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 +93 -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/env.d.ts +10 -0
- package/dist/env.d.ts.map +1 -1
- package/dist/index.d.ts +8 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -298
- 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 +10 -3
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +5 -111
- package/dist/runtime/middleware.d.ts +119 -67
- 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 +18 -4
- 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/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.d.ts +1 -1
- package/dist/sveltekit/index.d.ts.map +1 -1
- package/dist/sveltekit/index.js +313 -167
- 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 +20 -2
- 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/alarm.d.ts +55 -0
- package/dist/test/alarm.d.ts.map +1 -0
- package/dist/test/binding-hints.d.ts +10 -0
- package/dist/test/binding-hints.d.ts.map +1 -0
- package/dist/test/cf.d.ts +71 -35
- 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 +20 -21
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/index.js +4981 -70
- package/dist/test/offline-bindings.d.ts +115 -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 +64 -4
- 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 +8 -27
- package/dist/test/simple-context.d.ts.map +1 -1
- package/dist/test/tail.d.ts +3 -2
- package/dist/test/tail.d.ts.map +1 -1
- package/dist/test/utilities/analytics-engine.d.ts +22 -0
- package/dist/test/utilities/analytics-engine.d.ts.map +1 -0
- 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 +43 -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/stream-flagship.d.ts +27 -0
- package/dist/test/utilities/stream-flagship.d.ts.map +1 -0
- package/dist/test/utilities/vectorize.d.ts +38 -0
- package/dist/test/utilities/vectorize.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 +13 -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/transform/durable-object.d.ts.map +1 -1
- package/dist/transform/index.d.ts +2 -2
- package/dist/transform/worker-entrypoint.d.ts +5 -0
- package/dist/transform/worker-entrypoint.d.ts.map +1 -1
- package/dist/utils/entrypoint-discovery.d.ts +6 -3
- package/dist/utils/entrypoint-discovery.d.ts.map +1 -1
- package/dist/utils/glob.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 +163 -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 +3 -2
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +2 -339
- 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-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-entry/validate-fetch-style.d.ts +12 -0
- package/dist/worker-entry/validate-fetch-style.d.ts.map +1 -0
- package/dist/workflows/local-workflow-entrypoints.d.ts +7 -0
- package/dist/workflows/local-workflow-entrypoints.d.ts.map +1 -0
- package/package.json +159 -116
- package/R2.md +0 -170
- package/dist/account-rvrj687w.js +0 -397
- package/dist/ai-dx4fr9jh.js +0 -107
- 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-b9dmrj7b.js +0 -2417
- package/dist/doctor-fmgb3d28.js +0 -190
- package/dist/durable-object-t4kbb0yt.js +0 -13
- package/dist/index-07q6yxyc.js +0 -168
- package/dist/index-18hvb6gb.js +0 -194
- package/dist/index-1xpj0m4r.js +0 -57
- package/dist/index-37x76zdn.js +0 -4
- package/dist/index-3t6rypgc.js +0 -13
- package/dist/index-67qcae0f.js +0 -183
- package/dist/index-a855bdsx.js +0 -18
- package/dist/index-d8bdkx2h.js +0 -109
- 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-rbht7m9r.js +0 -36
- package/dist/index-tfyxa77h.js +0 -850
- package/dist/index-tk6ej9dj.js +0 -94
- package/dist/index-z14anrqp.js +0 -226
- package/dist/init-f9mgmew3.js +0 -186
- package/dist/remote-q59qk463.js +0 -97
- 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
- package/dist/worker-entrypoint-m9th0rg0.js +0 -13
package/dist/doctor-fmgb3d28.js
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
detectViteProject
|
|
3
|
-
} from "./index-18hvb6gb.js";
|
|
4
|
-
import {
|
|
5
|
-
loadConfig,
|
|
6
|
-
resolveConfigPath
|
|
7
|
-
} from "./index-hcex3rgh.js";
|
|
8
|
-
import {
|
|
9
|
-
getDependencies
|
|
10
|
-
} from "./index-1xpj0m4r.js";
|
|
11
|
-
import"./index-37x76zdn.js";
|
|
12
|
-
|
|
13
|
-
// src/cli/commands/doctor.ts
|
|
14
|
-
import { resolve } from "pathe";
|
|
15
|
-
async function runDoctorCommand(parsed, logger, options) {
|
|
16
|
-
const cwd = options.cwd || process.cwd();
|
|
17
|
-
const checks = [];
|
|
18
|
-
const { fs } = await getDependencies();
|
|
19
|
-
const viteProject = await detectViteProject(cwd, fs);
|
|
20
|
-
logger.info(`Running diagnostics...
|
|
21
|
-
`);
|
|
22
|
-
try {
|
|
23
|
-
const configPath = await resolveConfigPath(cwd);
|
|
24
|
-
checks.push({
|
|
25
|
-
name: "Config File",
|
|
26
|
-
status: "pass",
|
|
27
|
-
message: `Found: ${configPath}`
|
|
28
|
-
});
|
|
29
|
-
try {
|
|
30
|
-
const config = await loadConfig({ cwd });
|
|
31
|
-
checks.push({
|
|
32
|
-
name: "Config Valid",
|
|
33
|
-
status: "pass",
|
|
34
|
-
message: `Project: ${config.name}`
|
|
35
|
-
});
|
|
36
|
-
} catch (error) {
|
|
37
|
-
checks.push({
|
|
38
|
-
name: "Config Valid",
|
|
39
|
-
status: "fail",
|
|
40
|
-
message: error instanceof Error ? error.message : "Unknown error"
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
} catch {
|
|
44
|
-
checks.push({
|
|
45
|
-
name: "Config File",
|
|
46
|
-
status: "fail",
|
|
47
|
-
message: "devflare.config.ts not found. Run `devflare init` to create one."
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
const packageJsonPath = resolve(cwd, "package.json");
|
|
51
|
-
try {
|
|
52
|
-
await fs.access(packageJsonPath);
|
|
53
|
-
const content = await fs.readFile(packageJsonPath, "utf-8");
|
|
54
|
-
const pkg = JSON.parse(content);
|
|
55
|
-
checks.push({
|
|
56
|
-
name: "package.json",
|
|
57
|
-
status: "pass",
|
|
58
|
-
message: `Found: ${pkg.name || "unnamed"}`
|
|
59
|
-
});
|
|
60
|
-
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
61
|
-
if (deps.devflare) {
|
|
62
|
-
checks.push({
|
|
63
|
-
name: "devflare dep",
|
|
64
|
-
status: "pass",
|
|
65
|
-
message: `Version: ${deps.devflare}`
|
|
66
|
-
});
|
|
67
|
-
} else {
|
|
68
|
-
checks.push({
|
|
69
|
-
name: "devflare dep",
|
|
70
|
-
status: "warn",
|
|
71
|
-
message: "devflare not in dependencies"
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
} catch {
|
|
75
|
-
checks.push({
|
|
76
|
-
name: "package.json",
|
|
77
|
-
status: "fail",
|
|
78
|
-
message: "package.json not found"
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
if (viteProject.wantsViteIntegration) {
|
|
82
|
-
checks.push({
|
|
83
|
-
name: "Vite Integration",
|
|
84
|
-
status: "pass",
|
|
85
|
-
message: "Enabled for this package"
|
|
86
|
-
});
|
|
87
|
-
if (viteProject.hasLocalViteDependency) {
|
|
88
|
-
checks.push({
|
|
89
|
-
name: "vite dep",
|
|
90
|
-
status: "pass",
|
|
91
|
-
message: "Found in package.json"
|
|
92
|
-
});
|
|
93
|
-
} else {
|
|
94
|
-
checks.push({
|
|
95
|
-
name: "vite dep",
|
|
96
|
-
status: "warn",
|
|
97
|
-
message: "Not declared in this package.json (workspace-hoisted installs may still work)"
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
if (viteProject.hasLocalCloudflareVitePluginDependency) {
|
|
101
|
-
checks.push({
|
|
102
|
-
name: "@cloudflare/vite-plugin",
|
|
103
|
-
status: "pass",
|
|
104
|
-
message: "Found in package.json"
|
|
105
|
-
});
|
|
106
|
-
} else {
|
|
107
|
-
checks.push({
|
|
108
|
-
name: "@cloudflare/vite-plugin",
|
|
109
|
-
status: "warn",
|
|
110
|
-
message: "Not declared in this package.json"
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
if (viteProject.viteConfigPath) {
|
|
114
|
-
checks.push({
|
|
115
|
-
name: "Vite Config",
|
|
116
|
-
status: "pass",
|
|
117
|
-
message: `Found: ${viteProject.viteConfigPath}`
|
|
118
|
-
});
|
|
119
|
-
} else {
|
|
120
|
-
checks.push({
|
|
121
|
-
name: "Vite Config",
|
|
122
|
-
status: "warn",
|
|
123
|
-
message: "No vite.config found. Create one with @cloudflare/vite-plugin"
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
} else {
|
|
127
|
-
checks.push({
|
|
128
|
-
name: "Vite Integration",
|
|
129
|
-
status: "pass",
|
|
130
|
-
message: "Not enabled for this package (worker-only mode)"
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
try {
|
|
134
|
-
await fs.access(resolve(cwd, "tsconfig.json"));
|
|
135
|
-
checks.push({
|
|
136
|
-
name: "tsconfig.json",
|
|
137
|
-
status: "pass",
|
|
138
|
-
message: "Found"
|
|
139
|
-
});
|
|
140
|
-
} catch {
|
|
141
|
-
checks.push({
|
|
142
|
-
name: "tsconfig.json",
|
|
143
|
-
status: "warn",
|
|
144
|
-
message: "tsconfig.json not found"
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
try {
|
|
148
|
-
await fs.access(resolve(cwd, "wrangler.jsonc"));
|
|
149
|
-
checks.push({
|
|
150
|
-
name: "wrangler.jsonc",
|
|
151
|
-
status: "pass",
|
|
152
|
-
message: "Found (generated)"
|
|
153
|
-
});
|
|
154
|
-
} catch {
|
|
155
|
-
checks.push({
|
|
156
|
-
name: "wrangler.jsonc",
|
|
157
|
-
status: "warn",
|
|
158
|
-
message: "Not found. Run `devflare dev` or `devflare build` to generate."
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
let hasFailures = false;
|
|
162
|
-
let hasWarnings = false;
|
|
163
|
-
for (const check of checks) {
|
|
164
|
-
const icon = check.status === "pass" ? "✓" : check.status === "warn" ? "⚠" : "✗";
|
|
165
|
-
const color = check.status === "pass" ? "green" : check.status === "warn" ? "yellow" : "red";
|
|
166
|
-
if (check.status === "pass") {
|
|
167
|
-
logger.success(`${icon} ${check.name}: ${check.message}`);
|
|
168
|
-
} else if (check.status === "warn") {
|
|
169
|
-
logger.warn(`${icon} ${check.name}: ${check.message}`);
|
|
170
|
-
hasWarnings = true;
|
|
171
|
-
} else {
|
|
172
|
-
logger.error(`${icon} ${check.name}: ${check.message}`);
|
|
173
|
-
hasFailures = true;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
logger.info("");
|
|
177
|
-
if (hasFailures) {
|
|
178
|
-
logger.error("Some checks failed. Please fix the issues above.");
|
|
179
|
-
return { exitCode: 1 };
|
|
180
|
-
} else if (hasWarnings) {
|
|
181
|
-
logger.warn("All critical checks passed, but there are warnings.");
|
|
182
|
-
return { exitCode: 0 };
|
|
183
|
-
} else {
|
|
184
|
-
logger.success("All checks passed!");
|
|
185
|
-
return { exitCode: 0 };
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
export {
|
|
189
|
-
runDoctorCommand
|
|
190
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
findDurableObjectClasses,
|
|
3
|
-
findDurableObjectClassesDetailed,
|
|
4
|
-
generateWrapper,
|
|
5
|
-
transformDurableObject
|
|
6
|
-
} from "./index-gz1gndna.js";
|
|
7
|
-
import"./index-37x76zdn.js";
|
|
8
|
-
export {
|
|
9
|
-
transformDurableObject,
|
|
10
|
-
generateWrapper,
|
|
11
|
-
findDurableObjectClassesDetailed,
|
|
12
|
-
findDurableObjectClasses
|
|
13
|
-
};
|
package/dist/index-07q6yxyc.js
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
// src/config/define.ts
|
|
2
|
-
function defineConfig(config) {
|
|
3
|
-
if (typeof config === "function") {
|
|
4
|
-
const result = config();
|
|
5
|
-
if (result instanceof Promise) {
|
|
6
|
-
return result;
|
|
7
|
-
}
|
|
8
|
-
return result;
|
|
9
|
-
}
|
|
10
|
-
return config;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// src/config/ref.ts
|
|
14
|
-
var resolvedCache = new WeakMap;
|
|
15
|
-
var pendingResolutions = new WeakMap;
|
|
16
|
-
function ref(nameOrImport, maybeImport) {
|
|
17
|
-
const nameOverride = typeof nameOrImport === "string" ? nameOrImport : undefined;
|
|
18
|
-
const importFn = typeof nameOrImport === "function" ? nameOrImport : maybeImport;
|
|
19
|
-
if (!importFn) {
|
|
20
|
-
throw new Error("ref() requires an import function");
|
|
21
|
-
}
|
|
22
|
-
const fnSource = importFn.toString();
|
|
23
|
-
const importMatch = fnSource.match(/import\s*\(\s*['"]([^'"]+)['"]\s*\)/);
|
|
24
|
-
const configPath = importMatch?.[1] ?? "<pending>";
|
|
25
|
-
async function doResolve() {
|
|
26
|
-
const cached = resolvedCache.get(proxy);
|
|
27
|
-
if (cached)
|
|
28
|
-
return cached;
|
|
29
|
-
const pending = pendingResolutions.get(proxy);
|
|
30
|
-
if (pending)
|
|
31
|
-
return pending;
|
|
32
|
-
const promise = (async () => {
|
|
33
|
-
const module = await importFn();
|
|
34
|
-
const config = "default" in module ? module.default : module;
|
|
35
|
-
if (!config.name && !nameOverride) {
|
|
36
|
-
throw new Error('Referenced config must have a "name" property');
|
|
37
|
-
}
|
|
38
|
-
const resolved = {
|
|
39
|
-
name: nameOverride ?? config.name,
|
|
40
|
-
config,
|
|
41
|
-
configPath
|
|
42
|
-
};
|
|
43
|
-
resolvedCache.set(proxy, resolved);
|
|
44
|
-
return resolved;
|
|
45
|
-
})();
|
|
46
|
-
pendingResolutions.set(proxy, promise);
|
|
47
|
-
return promise;
|
|
48
|
-
}
|
|
49
|
-
function getResolved() {
|
|
50
|
-
const cached = resolvedCache.get(proxy);
|
|
51
|
-
if (cached)
|
|
52
|
-
return cached;
|
|
53
|
-
throw new Error("ref() not yet resolved. Call ref().resolve() first, or use top-level await " + "in your config file to resolve all refs before exporting.");
|
|
54
|
-
}
|
|
55
|
-
function createWorkerBinding(entrypoint) {
|
|
56
|
-
return {
|
|
57
|
-
get service() {
|
|
58
|
-
const cached = resolvedCache.get(proxy);
|
|
59
|
-
if (cached)
|
|
60
|
-
return cached.name;
|
|
61
|
-
if (nameOverride)
|
|
62
|
-
return nameOverride;
|
|
63
|
-
return "<pending>";
|
|
64
|
-
},
|
|
65
|
-
entrypoint,
|
|
66
|
-
__ref: proxy
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
const workerAccessor = new Proxy((entrypoint) => createWorkerBinding(entrypoint), {
|
|
70
|
-
get(target, prop) {
|
|
71
|
-
if (prop === "service") {
|
|
72
|
-
const cached = resolvedCache.get(proxy);
|
|
73
|
-
if (cached)
|
|
74
|
-
return cached.name;
|
|
75
|
-
if (nameOverride)
|
|
76
|
-
return nameOverride;
|
|
77
|
-
return "<pending>";
|
|
78
|
-
}
|
|
79
|
-
if (prop === "entrypoint")
|
|
80
|
-
return;
|
|
81
|
-
if (prop === "__ref")
|
|
82
|
-
return proxy;
|
|
83
|
-
return Reflect.get(target, prop);
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
function createDOBinding(bindingName) {
|
|
87
|
-
return {
|
|
88
|
-
get className() {
|
|
89
|
-
const cached = resolvedCache.get(proxy);
|
|
90
|
-
if (cached?.config.bindings?.durableObjects) {
|
|
91
|
-
const doBindings = cached.config.bindings.durableObjects;
|
|
92
|
-
const doConfig = doBindings[bindingName];
|
|
93
|
-
if (typeof doConfig === "string") {
|
|
94
|
-
return doConfig;
|
|
95
|
-
} else if (doConfig && typeof doConfig === "object" && "className" in doConfig) {
|
|
96
|
-
return doConfig.className;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
return bindingName;
|
|
100
|
-
},
|
|
101
|
-
get scriptName() {
|
|
102
|
-
const cached = resolvedCache.get(proxy);
|
|
103
|
-
if (cached)
|
|
104
|
-
return cached.name;
|
|
105
|
-
if (nameOverride)
|
|
106
|
-
return nameOverride;
|
|
107
|
-
return "<pending>";
|
|
108
|
-
},
|
|
109
|
-
__ref: proxy
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
const knownProps = new Set(["name", "config", "configPath", "worker", "__import", "__nameOverride", "resolve", "then"]);
|
|
113
|
-
const proxyTarget = {
|
|
114
|
-
get name() {
|
|
115
|
-
return getResolved().name;
|
|
116
|
-
},
|
|
117
|
-
get config() {
|
|
118
|
-
return getResolved().config;
|
|
119
|
-
},
|
|
120
|
-
configPath,
|
|
121
|
-
worker: workerAccessor,
|
|
122
|
-
__import: importFn,
|
|
123
|
-
__nameOverride: nameOverride,
|
|
124
|
-
resolve: doResolve
|
|
125
|
-
};
|
|
126
|
-
const proxy = new Proxy(proxyTarget, {
|
|
127
|
-
get(target, prop) {
|
|
128
|
-
if (typeof prop === "string" && knownProps.has(prop)) {
|
|
129
|
-
return Reflect.get(target, prop);
|
|
130
|
-
}
|
|
131
|
-
if (typeof prop === "symbol") {
|
|
132
|
-
return Reflect.get(target, prop);
|
|
133
|
-
}
|
|
134
|
-
if (typeof prop === "string" && /^[A-Z][A-Z0-9_]*$/.test(prop)) {
|
|
135
|
-
return createDOBinding(prop);
|
|
136
|
-
}
|
|
137
|
-
return Reflect.get(target, prop);
|
|
138
|
-
},
|
|
139
|
-
has(target, prop) {
|
|
140
|
-
if (typeof prop === "string") {
|
|
141
|
-
if (knownProps.has(prop))
|
|
142
|
-
return true;
|
|
143
|
-
if (/^[A-Z][A-Z0-9_]*$/.test(prop))
|
|
144
|
-
return true;
|
|
145
|
-
}
|
|
146
|
-
return Reflect.has(target, prop);
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
return proxy;
|
|
150
|
-
}
|
|
151
|
-
async function resolveRef(configImport, options) {
|
|
152
|
-
const result = options?.workerName ? ref(options.workerName, configImport) : ref(configImport);
|
|
153
|
-
await result.resolve();
|
|
154
|
-
return result;
|
|
155
|
-
}
|
|
156
|
-
function serviceBinding(refOrLegacy, options) {
|
|
157
|
-
if ("worker" in refOrLegacy) {
|
|
158
|
-
const entrypoint2 = options?.entrypoint;
|
|
159
|
-
return entrypoint2 ? refOrLegacy.worker(entrypoint2) : refOrLegacy.worker;
|
|
160
|
-
}
|
|
161
|
-
const entrypoint = options?.entrypoint ?? refOrLegacy.entrypoint;
|
|
162
|
-
return {
|
|
163
|
-
service: refOrLegacy.name,
|
|
164
|
-
...entrypoint && { entrypoint },
|
|
165
|
-
__ref: refOrLegacy
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
export { defineConfig, ref, resolveRef, serviceBinding };
|
package/dist/index-18hvb6gb.js
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__require
|
|
3
|
-
} from "./index-37x76zdn.js";
|
|
4
|
-
|
|
5
|
-
// src/dev-server/vite-utils.ts
|
|
6
|
-
import { resolve } from "pathe";
|
|
7
|
-
import { spawn } from "node:child_process";
|
|
8
|
-
var VITE_CONFIG_FILES = [
|
|
9
|
-
"vite.config.ts",
|
|
10
|
-
"vite.config.js",
|
|
11
|
-
"vite.config.mts",
|
|
12
|
-
"vite.config.mjs"
|
|
13
|
-
];
|
|
14
|
-
var ANSI_REGEX = /\x1b\[[0-9;]*m/g;
|
|
15
|
-
var LOCAL_VITE_URL_REGEX = /https?:\/\/(?:localhost|127\.0\.0\.1|\[::1\])(?::\d+)?\/?/i;
|
|
16
|
-
async function getNodeFs() {
|
|
17
|
-
return await import("node:fs/promises");
|
|
18
|
-
}
|
|
19
|
-
function safeParsePackageJson(content) {
|
|
20
|
-
try {
|
|
21
|
-
return JSON.parse(content);
|
|
22
|
-
} catch {
|
|
23
|
-
return {};
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
function readDependencyFlag(pkg, name) {
|
|
27
|
-
const dependencies = pkg.dependencies;
|
|
28
|
-
const devDependencies = pkg.devDependencies;
|
|
29
|
-
return Boolean(dependencies?.[name] ?? devDependencies?.[name]);
|
|
30
|
-
}
|
|
31
|
-
async function detectViteProject(cwd, fs) {
|
|
32
|
-
const fileSystem = fs ?? await getNodeFs();
|
|
33
|
-
let viteConfigPath = null;
|
|
34
|
-
for (const configName of VITE_CONFIG_FILES) {
|
|
35
|
-
const absolutePath = resolve(cwd, configName);
|
|
36
|
-
try {
|
|
37
|
-
await fileSystem.access(absolutePath);
|
|
38
|
-
viteConfigPath = absolutePath;
|
|
39
|
-
break;
|
|
40
|
-
} catch {
|
|
41
|
-
continue;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
let pkg = {};
|
|
45
|
-
try {
|
|
46
|
-
const packageJson = await fileSystem.readFile(resolve(cwd, "package.json"), "utf-8");
|
|
47
|
-
pkg = safeParsePackageJson(packageJson);
|
|
48
|
-
} catch {
|
|
49
|
-
pkg = {};
|
|
50
|
-
}
|
|
51
|
-
const hasLocalViteDependency = readDependencyFlag(pkg, "vite");
|
|
52
|
-
const hasLocalCloudflareVitePluginDependency = readDependencyFlag(pkg, "@cloudflare/vite-plugin");
|
|
53
|
-
const wantsViteIntegration = Boolean(viteConfigPath || hasLocalViteDependency || hasLocalCloudflareVitePluginDependency);
|
|
54
|
-
return {
|
|
55
|
-
viteConfigPath,
|
|
56
|
-
hasLocalViteDependency,
|
|
57
|
-
hasLocalCloudflareVitePluginDependency,
|
|
58
|
-
shouldStartVite: Boolean(viteConfigPath),
|
|
59
|
-
wantsViteIntegration
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function stripAnsi(value) {
|
|
63
|
-
return value.replace(ANSI_REGEX, "");
|
|
64
|
-
}
|
|
65
|
-
function extractViteReadyUrl(output) {
|
|
66
|
-
const cleaned = stripAnsi(output);
|
|
67
|
-
const lines = cleaned.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
|
|
68
|
-
for (const line of lines) {
|
|
69
|
-
if (!line.toLowerCase().includes("local:")) {
|
|
70
|
-
continue;
|
|
71
|
-
}
|
|
72
|
-
const match = line.match(LOCAL_VITE_URL_REGEX);
|
|
73
|
-
if (match) {
|
|
74
|
-
return match[0];
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
const fallbackMatch = cleaned.match(LOCAL_VITE_URL_REGEX);
|
|
78
|
-
return fallbackMatch?.[0] ?? null;
|
|
79
|
-
}
|
|
80
|
-
async function waitForViteReady(process, options = {}) {
|
|
81
|
-
const {
|
|
82
|
-
timeoutMs = 15000,
|
|
83
|
-
onStdout,
|
|
84
|
-
onStderr
|
|
85
|
-
} = options;
|
|
86
|
-
let combinedOutput = "";
|
|
87
|
-
return await new Promise((resolvePromise, rejectPromise) => {
|
|
88
|
-
let settled = false;
|
|
89
|
-
let timeout;
|
|
90
|
-
const settle = (resolver) => {
|
|
91
|
-
if (settled) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
settled = true;
|
|
95
|
-
clearTimeout(timeout);
|
|
96
|
-
resolver();
|
|
97
|
-
};
|
|
98
|
-
const inspectChunk = (chunk) => {
|
|
99
|
-
combinedOutput += typeof chunk === "string" ? chunk : chunk.toString("utf-8");
|
|
100
|
-
const readyUrl = extractViteReadyUrl(combinedOutput);
|
|
101
|
-
if (readyUrl) {
|
|
102
|
-
settle(() => resolvePromise(readyUrl));
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
process.stdout?.on("data", (chunk) => {
|
|
106
|
-
onStdout?.(chunk);
|
|
107
|
-
inspectChunk(chunk);
|
|
108
|
-
});
|
|
109
|
-
process.stderr?.on("data", (chunk) => {
|
|
110
|
-
onStderr?.(chunk);
|
|
111
|
-
inspectChunk(chunk);
|
|
112
|
-
});
|
|
113
|
-
process.on("error", (error) => {
|
|
114
|
-
settle(() => rejectPromise(error));
|
|
115
|
-
});
|
|
116
|
-
process.on("exit", (code, signal) => {
|
|
117
|
-
settle(() => {
|
|
118
|
-
const reason = signal ? `signal ${signal}` : `exit code ${code ?? "unknown"}`;
|
|
119
|
-
rejectPromise(new Error(`Vite exited before reporting a ready URL (${reason})`));
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
timeout = setTimeout(() => {
|
|
123
|
-
settle(() => resolvePromise(null));
|
|
124
|
-
}, timeoutMs);
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
async function defaultRunCommand(command, args) {
|
|
128
|
-
await new Promise((resolvePromise, rejectPromise) => {
|
|
129
|
-
const child = spawn(command, args, {
|
|
130
|
-
stdio: "ignore",
|
|
131
|
-
windowsHide: true
|
|
132
|
-
});
|
|
133
|
-
child.on("error", rejectPromise);
|
|
134
|
-
child.on("exit", () => resolvePromise());
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
function waitForProcessExit(process, timeoutMs) {
|
|
138
|
-
if (process.killed) {
|
|
139
|
-
return Promise.resolve(true);
|
|
140
|
-
}
|
|
141
|
-
return new Promise((resolvePromise) => {
|
|
142
|
-
let settled = false;
|
|
143
|
-
let timeout;
|
|
144
|
-
const settle = (value) => {
|
|
145
|
-
if (settled) {
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
settled = true;
|
|
149
|
-
clearTimeout(timeout);
|
|
150
|
-
resolvePromise(value);
|
|
151
|
-
};
|
|
152
|
-
process.on("exit", () => settle(true));
|
|
153
|
-
timeout = setTimeout(() => {
|
|
154
|
-
settle(false);
|
|
155
|
-
}, timeoutMs);
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
async function stopSpawnedProcessTree(process, options = {}) {
|
|
159
|
-
const {
|
|
160
|
-
platform = globalThis.process?.platform ?? "linux",
|
|
161
|
-
timeoutMs = 3000,
|
|
162
|
-
runCommand = defaultRunCommand
|
|
163
|
-
} = options;
|
|
164
|
-
if (platform === "win32" && process.pid) {
|
|
165
|
-
try {
|
|
166
|
-
await runCommand("taskkill", ["/pid", String(process.pid), "/t", "/f"]);
|
|
167
|
-
} catch {
|
|
168
|
-
try {
|
|
169
|
-
process.kill("SIGTERM");
|
|
170
|
-
} catch {
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
await waitForProcessExit(process, timeoutMs);
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
try {
|
|
178
|
-
process.kill("SIGTERM");
|
|
179
|
-
} catch {
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
const exited = await waitForProcessExit(process, timeoutMs);
|
|
183
|
-
if (exited) {
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
try {
|
|
187
|
-
process.kill("SIGKILL");
|
|
188
|
-
} catch {
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
await waitForProcessExit(process, timeoutMs);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
export { detectViteProject, waitForViteReady, stopSpawnedProcessTree };
|
package/dist/index-1xpj0m4r.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__require
|
|
3
|
-
} from "./index-37x76zdn.js";
|
|
4
|
-
|
|
5
|
-
// src/cli/dependencies.ts
|
|
6
|
-
async function createRealDependencies() {
|
|
7
|
-
const fs = await import("node:fs/promises");
|
|
8
|
-
const { execa, execaCommand } = await import("execa");
|
|
9
|
-
const { spawn } = await import("node:child_process");
|
|
10
|
-
return {
|
|
11
|
-
fs,
|
|
12
|
-
exec: {
|
|
13
|
-
exec: async (command, args = [], options = {}) => {
|
|
14
|
-
const result = await execa(command, args, options);
|
|
15
|
-
return {
|
|
16
|
-
exitCode: result.exitCode ?? 0,
|
|
17
|
-
stdout: String(result.stdout ?? ""),
|
|
18
|
-
stderr: String(result.stderr ?? ""),
|
|
19
|
-
failed: result.failed,
|
|
20
|
-
killed: false,
|
|
21
|
-
signal: result.signal
|
|
22
|
-
};
|
|
23
|
-
},
|
|
24
|
-
spawn: (command, args = [], options = {}) => {
|
|
25
|
-
const child = spawn(command, args, {
|
|
26
|
-
cwd: options.cwd,
|
|
27
|
-
stdio: options.stdio ?? "pipe",
|
|
28
|
-
env: options.env,
|
|
29
|
-
shell: true
|
|
30
|
-
});
|
|
31
|
-
const wrapper = {
|
|
32
|
-
pid: child.pid,
|
|
33
|
-
stdout: child.stdout,
|
|
34
|
-
stderr: child.stderr,
|
|
35
|
-
get killed() {
|
|
36
|
-
return child.killed;
|
|
37
|
-
},
|
|
38
|
-
kill: (signal) => child.kill(signal),
|
|
39
|
-
on: (event, handler) => {
|
|
40
|
-
child.on(event, handler);
|
|
41
|
-
return wrapper;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
return wrapper;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
var _deps = null;
|
|
50
|
-
async function getDependencies() {
|
|
51
|
-
if (!_deps) {
|
|
52
|
-
_deps = await createRealDependencies();
|
|
53
|
-
}
|
|
54
|
-
return _deps;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export { getDependencies };
|
package/dist/index-37x76zdn.js
DELETED
package/dist/index-3t6rypgc.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// src/cli/colors.ts
|
|
2
|
-
var BOLD = "\x1B[1m";
|
|
3
|
-
var DIM = "\x1B[2m";
|
|
4
|
-
var RESET = "\x1B[0m";
|
|
5
|
-
var CYAN = "\x1B[36m";
|
|
6
|
-
var CYAN_BOLD = "\x1B[1;36m";
|
|
7
|
-
var WHITE = "\x1B[97m";
|
|
8
|
-
var GREEN = "\x1B[32m";
|
|
9
|
-
var RED = "\x1B[31m";
|
|
10
|
-
var YELLOW = "\x1B[33m";
|
|
11
|
-
var BG_BLUE = "\x1B[44m";
|
|
12
|
-
|
|
13
|
-
export { BOLD, DIM, RESET, CYAN, CYAN_BOLD, WHITE, GREEN, RED, YELLOW, BG_BLUE };
|