effect-start 0.27.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Cookies.d.ts +46 -0
- package/dist/Cookies.d.ts.map +1 -0
- package/dist/Cookies.js +303 -0
- package/dist/Cookies.js.map +1 -0
- package/dist/Entity.d.ts +47 -0
- package/dist/Entity.d.ts.map +1 -0
- package/dist/Entity.js +238 -0
- package/dist/Entity.js.map +1 -0
- package/dist/Fetch.d.ts +69 -0
- package/dist/Fetch.d.ts.map +1 -0
- package/dist/Fetch.js +225 -0
- package/dist/Fetch.js.map +1 -0
- package/dist/FileRouter.d.ts +54 -0
- package/dist/FileRouter.d.ts.map +1 -0
- package/dist/FileRouter.js +158 -0
- package/dist/FileRouter.js.map +1 -0
- package/dist/FileRouterCodegen.d.ts +19 -0
- package/dist/FileRouterCodegen.d.ts.map +1 -0
- package/dist/FileRouterCodegen.js +216 -0
- package/dist/FileRouterCodegen.js.map +1 -0
- package/dist/FileSystem.d.ts +159 -0
- package/dist/FileSystem.d.ts.map +1 -0
- package/dist/FileSystem.js +73 -0
- package/dist/FileSystem.js.map +1 -0
- package/dist/GlobalLayer.d.ts +4 -0
- package/dist/GlobalLayer.d.ts.map +1 -0
- package/dist/GlobalLayer.js +51 -0
- package/dist/GlobalLayer.js.map +1 -0
- package/dist/PlatformRuntime.d.ts +30 -0
- package/dist/PlatformRuntime.d.ts.map +1 -0
- package/dist/PlatformRuntime.js +50 -0
- package/dist/PlatformRuntime.js.map +1 -0
- package/dist/Route.d.ts +98 -0
- package/dist/Route.d.ts.map +1 -0
- package/dist/Route.js +101 -0
- package/dist/Route.js.map +1 -0
- package/dist/RouteBody.d.ts +48 -0
- package/dist/RouteBody.d.ts.map +1 -0
- package/dist/RouteBody.js +68 -0
- package/dist/RouteBody.js.map +1 -0
- package/dist/RouteError.d.ts +99 -0
- package/dist/RouteError.d.ts.map +1 -0
- package/dist/RouteError.js +56 -0
- package/dist/RouteError.js.map +1 -0
- package/dist/RouteHook.d.ts +13 -0
- package/dist/RouteHook.d.ts.map +1 -0
- package/dist/RouteHook.js +40 -0
- package/dist/RouteHook.js.map +1 -0
- package/dist/RouteHttp.d.ts +22 -0
- package/dist/RouteHttp.d.ts.map +1 -0
- package/dist/RouteHttp.js +266 -0
- package/dist/RouteHttp.js.map +1 -0
- package/dist/RouteHttpTracer.d.ts +11 -0
- package/dist/RouteHttpTracer.d.ts.map +1 -0
- package/dist/RouteHttpTracer.js +63 -0
- package/dist/RouteHttpTracer.js.map +1 -0
- package/dist/RouteMount.d.ts +87 -0
- package/dist/RouteMount.d.ts.map +1 -0
- package/dist/RouteMount.js +64 -0
- package/dist/RouteMount.js.map +1 -0
- package/dist/RouteSchema.d.ts +87 -0
- package/dist/RouteSchema.d.ts.map +1 -0
- package/dist/RouteSchema.js +189 -0
- package/dist/RouteSchema.js.map +1 -0
- package/dist/RouteSse.d.ts +21 -0
- package/dist/RouteSse.d.ts.map +1 -0
- package/dist/RouteSse.js +76 -0
- package/dist/RouteSse.js.map +1 -0
- package/dist/RouteTree.d.ts +58 -0
- package/dist/RouteTree.d.ts.map +1 -0
- package/dist/RouteTree.js +94 -0
- package/dist/RouteTree.js.map +1 -0
- package/dist/RouteTrie.d.ts +21 -0
- package/dist/RouteTrie.d.ts.map +1 -0
- package/dist/RouteTrie.js +153 -0
- package/dist/RouteTrie.js.map +1 -0
- package/dist/Socket.d.ts +23 -0
- package/dist/Socket.d.ts.map +1 -0
- package/dist/Socket.js +29 -0
- package/dist/Socket.js.map +1 -0
- package/dist/Start.d.ts +82 -0
- package/dist/Start.d.ts.map +1 -0
- package/dist/Start.js +102 -0
- package/dist/Start.js.map +1 -0
- package/dist/System.d.ts +24 -0
- package/dist/System.d.ts.map +1 -0
- package/dist/System.js +31 -0
- package/dist/System.js.map +1 -0
- package/dist/Unique.d.ts +68 -0
- package/dist/Unique.d.ts.map +1 -0
- package/dist/Unique.js +225 -0
- package/dist/Unique.js.map +1 -0
- package/dist/_ChildProcess.d.ts +59 -0
- package/dist/_ChildProcess.d.ts.map +1 -0
- package/dist/_ChildProcess.js +30 -0
- package/dist/_ChildProcess.js.map +1 -0
- package/dist/_ContentNegotiation.d.ts +13 -0
- package/dist/_ContentNegotiation.d.ts.map +1 -0
- package/dist/_ContentNegotiation.js +360 -0
- package/dist/_ContentNegotiation.js.map +1 -0
- package/dist/_Development.d.ts +27 -0
- package/dist/_Development.d.ts.map +1 -0
- package/dist/_Development.js +57 -0
- package/dist/_Development.js.map +1 -0
- package/dist/_Docker.d.ts +51 -0
- package/dist/_Docker.d.ts.map +1 -0
- package/dist/_Docker.js +88 -0
- package/dist/_Docker.js.map +1 -0
- package/dist/_Effectify.d.ts +210 -0
- package/dist/_Effectify.d.ts.map +1 -0
- package/dist/_Effectify.js +20 -0
- package/dist/_Effectify.js.map +1 -0
- package/dist/_Http.d.ts +31 -0
- package/dist/_Http.d.ts.map +1 -0
- package/dist/_Http.js +73 -0
- package/dist/_Http.js.map +1 -0
- package/dist/_PathPattern.d.ts +146 -0
- package/dist/_PathPattern.d.ts.map +1 -0
- package/dist/_PathPattern.js +499 -0
- package/dist/_PathPattern.js.map +1 -0
- package/dist/_SchemaExtra.d.ts +4 -0
- package/dist/_SchemaExtra.d.ts.map +1 -0
- package/dist/_SchemaExtra.js +75 -0
- package/dist/_SchemaExtra.js.map +1 -0
- package/dist/_StartApp.d.ts +13 -0
- package/dist/_StartApp.d.ts.map +1 -0
- package/dist/_StartApp.js +4 -0
- package/dist/_StartApp.js.map +1 -0
- package/dist/_StreamExtra.d.ts +29 -0
- package/dist/_StreamExtra.d.ts.map +1 -0
- package/dist/_StreamExtra.js +101 -0
- package/dist/_StreamExtra.js.map +1 -0
- package/dist/_Values.d.ts +30 -0
- package/dist/_Values.d.ts.map +1 -0
- package/dist/_Values.js +46 -0
- package/dist/_Values.js.map +1 -0
- package/dist/bun/BunBundle.d.ts +12 -0
- package/dist/bun/BunBundle.d.ts.map +1 -0
- package/dist/bun/BunBundle.js +138 -0
- package/dist/bun/BunBundle.js.map +1 -0
- package/dist/bun/BunChildProcessSpawner.d.ts +4 -0
- package/dist/bun/BunChildProcessSpawner.d.ts.map +1 -0
- package/dist/bun/BunChildProcessSpawner.js +99 -0
- package/dist/bun/BunChildProcessSpawner.js.map +1 -0
- package/dist/bun/BunImportTrackerPlugin.d.ts +14 -0
- package/dist/bun/BunImportTrackerPlugin.d.ts.map +1 -0
- package/dist/bun/BunImportTrackerPlugin.js +70 -0
- package/dist/bun/BunImportTrackerPlugin.js.map +1 -0
- package/dist/bun/BunRoute.d.ts +49 -0
- package/dist/bun/BunRoute.d.ts.map +1 -0
- package/dist/bun/BunRoute.js +121 -0
- package/dist/bun/BunRoute.js.map +1 -0
- package/dist/bun/BunRuntime.d.ts +3 -0
- package/dist/bun/BunRuntime.d.ts.map +1 -0
- package/dist/bun/BunRuntime.js +30 -0
- package/dist/bun/BunRuntime.js.map +1 -0
- package/dist/bun/BunServer.d.ts +52 -0
- package/dist/bun/BunServer.d.ts.map +1 -0
- package/dist/bun/BunServer.js +262 -0
- package/dist/bun/BunServer.js.map +1 -0
- package/dist/bun/BunVirtualFilesPlugin.d.ts +5 -0
- package/dist/bun/BunVirtualFilesPlugin.d.ts.map +1 -0
- package/dist/bun/BunVirtualFilesPlugin.js +41 -0
- package/dist/bun/BunVirtualFilesPlugin.js.map +1 -0
- package/dist/bun/_BunEnhancedResolve.d.ts +46 -0
- package/dist/bun/_BunEnhancedResolve.d.ts.map +1 -0
- package/dist/bun/_BunEnhancedResolve.js +103 -0
- package/dist/bun/_BunEnhancedResolve.js.map +1 -0
- package/dist/bun/_empty.html +0 -0
- package/dist/bun/index.d.ts +6 -0
- package/dist/bun/index.d.ts.map +1 -0
- package/dist/bun/index.js +6 -0
- package/dist/bun/index.js.map +1 -0
- package/dist/bundler/Bundle.d.ts +62 -0
- package/dist/bundler/Bundle.d.ts.map +1 -0
- package/dist/bundler/Bundle.js +49 -0
- package/dist/bundler/Bundle.js.map +1 -0
- package/dist/bundler/BundleFiles.d.ts +14 -0
- package/dist/bundler/BundleFiles.d.ts.map +1 -0
- package/dist/bundler/BundleFiles.js +97 -0
- package/dist/bundler/BundleFiles.js.map +1 -0
- package/dist/bundler/BundleRoute.d.ts +28 -0
- package/dist/bundler/BundleRoute.d.ts.map +1 -0
- package/dist/bundler/BundleRoute.js +52 -0
- package/dist/bundler/BundleRoute.js.map +1 -0
- package/dist/cli/Argument.d.ts +26 -0
- package/dist/cli/Argument.d.ts.map +1 -0
- package/dist/cli/Argument.js +31 -0
- package/dist/cli/Argument.js.map +1 -0
- package/dist/cli/CliError.d.ts +15 -0
- package/dist/cli/CliError.d.ts.map +1 -0
- package/dist/cli/CliError.js +54 -0
- package/dist/cli/CliError.js.map +1 -0
- package/dist/cli/Command.d.ts +61 -0
- package/dist/cli/Command.d.ts.map +1 -0
- package/dist/cli/Command.js +453 -0
- package/dist/cli/Command.js.map +1 -0
- package/dist/cli/Flag.d.ts +32 -0
- package/dist/cli/Flag.d.ts.map +1 -0
- package/dist/cli/Flag.js +35 -0
- package/dist/cli/Flag.js.map +1 -0
- package/dist/cli/HelpDoc.d.ts +28 -0
- package/dist/cli/HelpDoc.d.ts.map +1 -0
- package/dist/cli/HelpDoc.js +40 -0
- package/dist/cli/HelpDoc.js.map +1 -0
- package/dist/cli/Param.d.ts +71 -0
- package/dist/cli/Param.d.ts.map +1 -0
- package/dist/cli/Param.js +236 -0
- package/dist/cli/Param.js.map +1 -0
- package/dist/cli/Primitive.d.ts +22 -0
- package/dist/cli/Primitive.d.ts.map +1 -0
- package/dist/cli/Primitive.js +73 -0
- package/dist/cli/Primitive.js.map +1 -0
- package/dist/cli/index.d.ts +8 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +8 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/client/Overlay.d.ts +3 -0
- package/dist/client/Overlay.d.ts.map +1 -0
- package/dist/client/Overlay.js +33 -0
- package/dist/client/Overlay.js.map +1 -0
- package/dist/client/ScrollState.d.ts +7 -0
- package/dist/client/ScrollState.d.ts.map +1 -0
- package/dist/client/ScrollState.js +95 -0
- package/dist/client/ScrollState.js.map +1 -0
- package/dist/client/index.d.ts +7 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +80 -0
- package/dist/client/index.js.map +1 -0
- package/dist/datastar/actions/fetch.d.ts +31 -0
- package/dist/datastar/actions/fetch.d.ts.map +1 -0
- package/dist/datastar/actions/fetch.js +404 -0
- package/dist/datastar/actions/fetch.js.map +1 -0
- package/dist/datastar/actions/peek.d.ts +2 -0
- package/dist/datastar/actions/peek.d.ts.map +1 -0
- package/dist/datastar/actions/peek.js +14 -0
- package/dist/datastar/actions/peek.js.map +1 -0
- package/dist/datastar/actions/setAll.d.ts +2 -0
- package/dist/datastar/actions/setAll.d.ts.map +1 -0
- package/dist/datastar/actions/setAll.js +13 -0
- package/dist/datastar/actions/setAll.js.map +1 -0
- package/dist/datastar/actions/toggleAll.d.ts +2 -0
- package/dist/datastar/actions/toggleAll.d.ts.map +1 -0
- package/dist/datastar/actions/toggleAll.js +13 -0
- package/dist/datastar/actions/toggleAll.js.map +1 -0
- package/dist/datastar/attributes/attr.d.ts +2 -0
- package/dist/datastar/attributes/attr.d.ts.map +1 -0
- package/dist/datastar/attributes/attr.js +49 -0
- package/dist/datastar/attributes/attr.js.map +1 -0
- package/dist/datastar/attributes/bind.d.ts +2 -0
- package/dist/datastar/attributes/bind.d.ts.map +1 -0
- package/dist/datastar/attributes/bind.js +176 -0
- package/dist/datastar/attributes/bind.js.map +1 -0
- package/dist/datastar/attributes/class.d.ts +2 -0
- package/dist/datastar/attributes/class.d.ts.map +1 -0
- package/dist/datastar/attributes/class.js +48 -0
- package/dist/datastar/attributes/class.js.map +1 -0
- package/dist/datastar/attributes/computed.d.ts +2 -0
- package/dist/datastar/attributes/computed.d.ts.map +1 -0
- package/dist/datastar/attributes/computed.js +27 -0
- package/dist/datastar/attributes/computed.js.map +1 -0
- package/dist/datastar/attributes/effect.d.ts +2 -0
- package/dist/datastar/attributes/effect.d.ts.map +1 -0
- package/dist/datastar/attributes/effect.js +10 -0
- package/dist/datastar/attributes/effect.js.map +1 -0
- package/dist/datastar/attributes/indicator.d.ts +2 -0
- package/dist/datastar/attributes/indicator.d.ts.map +1 -0
- package/dist/datastar/attributes/indicator.js +31 -0
- package/dist/datastar/attributes/indicator.js.map +1 -0
- package/dist/datastar/attributes/init.d.ts +2 -0
- package/dist/datastar/attributes/init.d.ts.map +1 -0
- package/dist/datastar/attributes/init.js +27 -0
- package/dist/datastar/attributes/init.js.map +1 -0
- package/dist/datastar/attributes/jsonSignals.d.ts +2 -0
- package/dist/datastar/attributes/jsonSignals.d.ts.map +1 -0
- package/dist/datastar/attributes/jsonSignals.js +31 -0
- package/dist/datastar/attributes/jsonSignals.js.map +1 -0
- package/dist/datastar/attributes/on.d.ts +2 -0
- package/dist/datastar/attributes/on.d.ts.map +1 -0
- package/dist/datastar/attributes/on.js +79 -0
- package/dist/datastar/attributes/on.js.map +1 -0
- package/dist/datastar/attributes/onIntersect.d.ts +2 -0
- package/dist/datastar/attributes/onIntersect.d.ts.map +1 -0
- package/dist/datastar/attributes/onIntersect.js +54 -0
- package/dist/datastar/attributes/onIntersect.js.map +1 -0
- package/dist/datastar/attributes/onInterval.d.ts +2 -0
- package/dist/datastar/attributes/onInterval.d.ts.map +1 -0
- package/dist/datastar/attributes/onInterval.js +31 -0
- package/dist/datastar/attributes/onInterval.js.map +1 -0
- package/dist/datastar/attributes/onSignalPatch.d.ts +2 -0
- package/dist/datastar/attributes/onSignalPatch.d.ts.map +1 -0
- package/dist/datastar/attributes/onSignalPatch.js +43 -0
- package/dist/datastar/attributes/onSignalPatch.js.map +1 -0
- package/dist/datastar/attributes/ref.d.ts +2 -0
- package/dist/datastar/attributes/ref.d.ts.map +1 -0
- package/dist/datastar/attributes/ref.js +11 -0
- package/dist/datastar/attributes/ref.js.map +1 -0
- package/dist/datastar/attributes/show.d.ts +2 -0
- package/dist/datastar/attributes/show.d.ts.map +1 -0
- package/dist/datastar/attributes/show.js +32 -0
- package/dist/datastar/attributes/show.js.map +1 -0
- package/dist/datastar/attributes/signals.d.ts +2 -0
- package/dist/datastar/attributes/signals.d.ts.map +1 -0
- package/dist/datastar/attributes/signals.js +18 -0
- package/dist/datastar/attributes/signals.js.map +1 -0
- package/dist/datastar/attributes/style.d.ts +2 -0
- package/dist/datastar/attributes/style.d.ts.map +1 -0
- package/dist/datastar/attributes/style.js +51 -0
- package/dist/datastar/attributes/style.js.map +1 -0
- package/dist/datastar/attributes/text.d.ts +2 -0
- package/dist/datastar/attributes/text.d.ts.map +1 -0
- package/dist/datastar/attributes/text.js +27 -0
- package/dist/datastar/attributes/text.js.map +1 -0
- package/dist/datastar/engine.d.ts +163 -0
- package/dist/datastar/engine.d.ts.map +1 -0
- package/dist/datastar/engine.js +1000 -0
- package/dist/datastar/engine.js.map +1 -0
- package/dist/datastar/index.d.ts +25 -0
- package/dist/datastar/index.d.ts.map +1 -0
- package/dist/datastar/index.js +25 -0
- package/dist/datastar/index.js.map +1 -0
- package/dist/datastar/utils.d.ts +52 -0
- package/dist/datastar/utils.d.ts.map +1 -0
- package/dist/datastar/utils.js +203 -0
- package/dist/datastar/utils.js.map +1 -0
- package/dist/datastar/watchers/patchElements.d.ts +2 -0
- package/dist/datastar/watchers/patchElements.d.ts.map +1 -0
- package/dist/datastar/watchers/patchElements.js +400 -0
- package/dist/datastar/watchers/patchElements.js.map +1 -0
- package/dist/datastar/watchers/patchSignals.d.ts +2 -0
- package/dist/datastar/watchers/patchSignals.d.ts.map +1 -0
- package/dist/datastar/watchers/patchSignals.js +15 -0
- package/dist/datastar/watchers/patchSignals.js.map +1 -0
- package/dist/experimental/EncryptedCookies.d.ts +49 -0
- package/dist/experimental/EncryptedCookies.d.ts.map +1 -0
- package/dist/experimental/EncryptedCookies.js +213 -0
- package/dist/experimental/EncryptedCookies.js.map +1 -0
- package/dist/experimental/index.d.ts +2 -0
- package/dist/experimental/index.d.ts.map +1 -0
- package/dist/experimental/index.js +2 -0
- package/dist/experimental/index.js.map +1 -0
- package/dist/hyper/Hyper.d.ts +26 -0
- package/dist/hyper/Hyper.d.ts.map +1 -0
- package/dist/hyper/Hyper.js +24 -0
- package/dist/hyper/Hyper.js.map +1 -0
- package/dist/hyper/HyperHtml.d.ts +24 -0
- package/dist/hyper/HyperHtml.d.ts.map +1 -0
- package/dist/hyper/HyperHtml.js +153 -0
- package/dist/hyper/HyperHtml.js.map +1 -0
- package/dist/hyper/HyperHtml.test.d.ts +2 -0
- package/dist/hyper/HyperHtml.test.d.ts.map +1 -0
- package/dist/hyper/HyperHtml.test.js +283 -0
- package/dist/hyper/HyperHtml.test.js.map +1 -0
- package/dist/hyper/HyperNode.d.ts +14 -0
- package/dist/hyper/HyperNode.d.ts.map +1 -0
- package/dist/hyper/HyperNode.js +12 -0
- package/dist/hyper/HyperNode.js.map +1 -0
- package/dist/hyper/HyperRoute.d.ts +9 -0
- package/dist/hyper/HyperRoute.d.ts.map +1 -0
- package/dist/hyper/HyperRoute.js +33 -0
- package/dist/hyper/HyperRoute.js.map +1 -0
- package/dist/hyper/HyperRoute.test.d.ts +2 -0
- package/dist/hyper/HyperRoute.test.d.ts.map +1 -0
- package/dist/hyper/HyperRoute.test.js +84 -0
- package/dist/hyper/HyperRoute.test.js.map +1 -0
- package/dist/hyper/html.d.ts +12 -0
- package/dist/hyper/html.d.ts.map +1 -0
- package/dist/hyper/html.js +31 -0
- package/dist/hyper/html.js.map +1 -0
- package/dist/hyper/index.d.ts +7 -0
- package/dist/hyper/index.d.ts.map +1 -0
- package/dist/hyper/index.js +6 -0
- package/dist/hyper/index.js.map +1 -0
- package/dist/hyper/jsx-runtime.d.ts +8 -0
- package/dist/hyper/jsx-runtime.d.ts.map +1 -0
- package/dist/hyper/jsx-runtime.js +9 -0
- package/dist/hyper/jsx-runtime.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/lint/plugin.d.ts +124 -0
- package/dist/lint/plugin.d.ts.map +1 -0
- package/dist/lint/plugin.js +533 -0
- package/dist/lint/plugin.js.map +1 -0
- package/dist/node/NodeFileSystem.d.ts +8 -0
- package/dist/node/NodeFileSystem.d.ts.map +1 -0
- package/dist/node/NodeFileSystem.js +412 -0
- package/dist/node/NodeFileSystem.js.map +1 -0
- package/dist/node/NodeUtils.d.ts +3 -0
- package/dist/node/NodeUtils.d.ts.map +1 -0
- package/dist/node/NodeUtils.js +21 -0
- package/dist/node/NodeUtils.js.map +1 -0
- package/dist/sql/SqlCache.d.ts +19 -0
- package/dist/sql/SqlCache.d.ts.map +1 -0
- package/dist/sql/SqlCache.js +35 -0
- package/dist/sql/SqlCache.js.map +1 -0
- package/dist/sql/SqlClient.d.ts +88 -0
- package/dist/sql/SqlClient.d.ts.map +1 -0
- package/dist/sql/SqlClient.js +171 -0
- package/dist/sql/SqlClient.js.map +1 -0
- package/dist/sql/SqlIntrospect.d.ts +92 -0
- package/dist/sql/SqlIntrospect.d.ts.map +1 -0
- package/dist/sql/SqlIntrospect.js +478 -0
- package/dist/sql/SqlIntrospect.js.map +1 -0
- package/dist/sql/bun/index.d.ts +6 -0
- package/dist/sql/bun/index.d.ts.map +1 -0
- package/dist/sql/bun/index.js +132 -0
- package/dist/sql/bun/index.js.map +1 -0
- package/dist/sql/index.d.ts +4 -0
- package/dist/sql/index.d.ts.map +1 -0
- package/dist/sql/index.js +4 -0
- package/dist/sql/index.js.map +1 -0
- package/dist/sql/libsql/index.d.ts +15 -0
- package/dist/sql/libsql/index.d.ts.map +1 -0
- package/dist/sql/libsql/index.js +132 -0
- package/dist/sql/libsql/index.js.map +1 -0
- package/dist/sql/mssql/index.d.ts +8 -0
- package/dist/sql/mssql/index.d.ts.map +1 -0
- package/dist/sql/mssql/index.js +145 -0
- package/dist/sql/mssql/index.js.map +1 -0
- package/dist/sql/postgres/index.d.ts +7 -0
- package/dist/sql/postgres/index.d.ts.map +1 -0
- package/dist/sql/postgres/index.js +136 -0
- package/dist/sql/postgres/index.js.map +1 -0
- package/dist/studio/Simulation.d.ts +3 -0
- package/dist/studio/Simulation.d.ts.map +1 -0
- package/dist/studio/Simulation.js +606 -0
- package/dist/studio/Simulation.js.map +1 -0
- package/dist/studio/Studio.d.ts +11 -0
- package/dist/studio/Studio.d.ts.map +1 -0
- package/dist/studio/Studio.js +30 -0
- package/dist/studio/Studio.js.map +1 -0
- package/dist/studio/StudioErrors.d.ts +4 -0
- package/dist/studio/StudioErrors.d.ts.map +1 -0
- package/dist/studio/StudioErrors.js +200 -0
- package/dist/studio/StudioErrors.js.map +1 -0
- package/dist/studio/StudioLogger.d.ts +2 -0
- package/dist/studio/StudioLogger.d.ts.map +1 -0
- package/dist/studio/StudioLogger.js +46 -0
- package/dist/studio/StudioLogger.js.map +1 -0
- package/dist/studio/StudioMetrics.d.ts +4 -0
- package/dist/studio/StudioMetrics.d.ts.map +1 -0
- package/dist/studio/StudioMetrics.js +62 -0
- package/dist/studio/StudioMetrics.js.map +1 -0
- package/dist/studio/StudioProcess.d.ts +4 -0
- package/dist/studio/StudioProcess.d.ts.map +1 -0
- package/dist/studio/StudioProcess.js +50 -0
- package/dist/studio/StudioProcess.js.map +1 -0
- package/dist/studio/StudioStore.d.ts +199 -0
- package/dist/studio/StudioStore.d.ts.map +1 -0
- package/dist/studio/StudioStore.js +307 -0
- package/dist/studio/StudioStore.js.map +1 -0
- package/dist/studio/StudioTracer.d.ts +4 -0
- package/dist/studio/StudioTracer.d.ts.map +1 -0
- package/dist/studio/StudioTracer.js +111 -0
- package/dist/studio/StudioTracer.js.map +1 -0
- package/dist/studio/index.d.ts +4 -0
- package/dist/studio/index.d.ts.map +1 -0
- package/dist/studio/index.js +4 -0
- package/dist/studio/index.js.map +1 -0
- package/dist/studio/routes/errors/route.d.ts +11 -0
- package/dist/studio/routes/errors/route.d.ts.map +1 -0
- package/dist/studio/routes/errors/route.js +43 -0
- package/dist/studio/routes/errors/route.js.map +1 -0
- package/dist/studio/routes/fiberDetail.d.ts +17 -0
- package/dist/studio/routes/fiberDetail.d.ts.map +1 -0
- package/dist/studio/routes/fiberDetail.js +35 -0
- package/dist/studio/routes/fiberDetail.js.map +1 -0
- package/dist/studio/routes/fibers/route.d.ts +11 -0
- package/dist/studio/routes/fibers/route.d.ts.map +1 -0
- package/dist/studio/routes/fibers/route.js +25 -0
- package/dist/studio/routes/fibers/route.js.map +1 -0
- package/dist/studio/routes/layout.d.ts +10 -0
- package/dist/studio/routes/layout.d.ts.map +1 -0
- package/dist/studio/routes/layout.html +340 -0
- package/dist/studio/routes/layout.js +4 -0
- package/dist/studio/routes/layout.js.map +1 -0
- package/dist/studio/routes/logs/route.d.ts +11 -0
- package/dist/studio/routes/logs/route.d.ts.map +1 -0
- package/dist/studio/routes/logs/route.js +30 -0
- package/dist/studio/routes/logs/route.js.map +1 -0
- package/dist/studio/routes/metrics/route.d.ts +11 -0
- package/dist/studio/routes/metrics/route.d.ts.map +1 -0
- package/dist/studio/routes/metrics/route.js +18 -0
- package/dist/studio/routes/metrics/route.js.map +1 -0
- package/dist/studio/routes/route.d.ts +7 -0
- package/dist/studio/routes/route.d.ts.map +1 -0
- package/dist/studio/routes/route.js +6 -0
- package/dist/studio/routes/route.js.map +1 -0
- package/dist/studio/routes/routes/route.d.ts +7 -0
- package/dist/studio/routes/routes/route.d.ts.map +1 -0
- package/dist/studio/routes/routes/route.js +21 -0
- package/dist/studio/routes/routes/route.js.map +1 -0
- package/dist/studio/routes/services/route.d.ts +7 -0
- package/dist/studio/routes/services/route.d.ts.map +1 -0
- package/dist/studio/routes/services/route.js +13 -0
- package/dist/studio/routes/services/route.js.map +1 -0
- package/dist/studio/routes/system/route.d.ts +11 -0
- package/dist/studio/routes/system/route.d.ts.map +1 -0
- package/dist/studio/routes/system/route.js +19 -0
- package/dist/studio/routes/system/route.js.map +1 -0
- package/dist/studio/routes/traceDetail.d.ts +17 -0
- package/dist/studio/routes/traceDetail.d.ts.map +1 -0
- package/dist/studio/routes/traceDetail.js +20 -0
- package/dist/studio/routes/traceDetail.js.map +1 -0
- package/dist/studio/routes/traces/route.d.ts +11 -0
- package/dist/studio/routes/traces/route.d.ts.map +1 -0
- package/dist/studio/routes/traces/route.js +30 -0
- package/dist/studio/routes/traces/route.js.map +1 -0
- package/dist/studio/routes/tree.d.ts +142 -0
- package/dist/studio/routes/tree.d.ts.map +1 -0
- package/dist/studio/routes/tree.js +28 -0
- package/dist/studio/routes/tree.js.map +1 -0
- package/dist/studio/ui/Errors.d.ts +5 -0
- package/dist/studio/ui/Errors.d.ts.map +1 -0
- package/dist/studio/ui/Errors.js +17 -0
- package/dist/studio/ui/Errors.js.map +1 -0
- package/dist/studio/ui/Fibers.d.ts +25 -0
- package/dist/studio/ui/Fibers.d.ts.map +1 -0
- package/dist/studio/ui/Fibers.js +134 -0
- package/dist/studio/ui/Fibers.js.map +1 -0
- package/dist/studio/ui/Logs.d.ts +5 -0
- package/dist/studio/ui/Logs.d.ts.map +1 -0
- package/dist/studio/ui/Logs.js +27 -0
- package/dist/studio/ui/Logs.js.map +1 -0
- package/dist/studio/ui/Metrics.d.ts +5 -0
- package/dist/studio/ui/Metrics.d.ts.map +1 -0
- package/dist/studio/ui/Metrics.js +27 -0
- package/dist/studio/ui/Metrics.js.map +1 -0
- package/dist/studio/ui/Routes.d.ts +9 -0
- package/dist/studio/ui/Routes.d.ts.map +1 -0
- package/dist/studio/ui/Routes.js +71 -0
- package/dist/studio/ui/Routes.js.map +1 -0
- package/dist/studio/ui/Services.d.ts +11 -0
- package/dist/studio/ui/Services.d.ts.map +1 -0
- package/dist/studio/ui/Services.js +247 -0
- package/dist/studio/ui/Services.js.map +1 -0
- package/dist/studio/ui/Shell.d.ts +11 -0
- package/dist/studio/ui/Shell.d.ts.map +1 -0
- package/dist/studio/ui/Shell.js +8 -0
- package/dist/studio/ui/Shell.js.map +1 -0
- package/dist/studio/ui/System.d.ts +5 -0
- package/dist/studio/ui/System.d.ts.map +1 -0
- package/dist/studio/ui/System.js +36 -0
- package/dist/studio/ui/System.js.map +1 -0
- package/dist/studio/ui/Traces.d.ts +13 -0
- package/dist/studio/ui/Traces.d.ts.map +1 -0
- package/dist/studio/ui/Traces.js +182 -0
- package/dist/studio/ui/Traces.js.map +1 -0
- package/dist/testing/TestLogger.d.ts +14 -0
- package/dist/testing/TestLogger.d.ts.map +1 -0
- package/dist/testing/TestLogger.js +33 -0
- package/dist/testing/TestLogger.js.map +1 -0
- package/dist/testing/index.d.ts +3 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +3 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/utils.d.ts +12 -0
- package/dist/testing/utils.d.ts.map +1 -0
- package/dist/testing/utils.js +79 -0
- package/dist/testing/utils.js.map +1 -0
- package/dist/x/cloudflare/CloudflareTunnel.d.ts +12 -0
- package/dist/x/cloudflare/CloudflareTunnel.d.ts.map +1 -0
- package/dist/x/cloudflare/CloudflareTunnel.js +31 -0
- package/dist/x/cloudflare/CloudflareTunnel.js.map +1 -0
- package/dist/x/cloudflare/index.d.ts +2 -0
- package/dist/x/cloudflare/index.d.ts.map +1 -0
- package/dist/x/cloudflare/index.js +2 -0
- package/dist/x/cloudflare/index.js.map +1 -0
- package/dist/x/tailscale/TailscaleTunnel.d.ts +16 -0
- package/dist/x/tailscale/TailscaleTunnel.d.ts.map +1 -0
- package/dist/x/tailscale/TailscaleTunnel.js +65 -0
- package/dist/x/tailscale/TailscaleTunnel.js.map +1 -0
- package/dist/x/tailscale/index.d.ts +2 -0
- package/dist/x/tailscale/index.d.ts.map +1 -0
- package/dist/x/tailscale/index.js +2 -0
- package/dist/x/tailscale/index.js.map +1 -0
- package/dist/x/tailwind/TailwindPlugin.d.ts +24 -0
- package/dist/x/tailwind/TailwindPlugin.d.ts.map +1 -0
- package/dist/x/tailwind/TailwindPlugin.js +220 -0
- package/dist/x/tailwind/TailwindPlugin.js.map +1 -0
- package/dist/x/tailwind/compile.d.ts +20 -0
- package/dist/x/tailwind/compile.d.ts.map +1 -0
- package/dist/x/tailwind/compile.js +155 -0
- package/dist/x/tailwind/compile.js.map +1 -0
- package/dist/x/tailwind/plugin.d.ts +3 -0
- package/dist/x/tailwind/plugin.d.ts.map +1 -0
- package/dist/x/tailwind/plugin.js +16 -0
- package/dist/x/tailwind/plugin.js.map +1 -0
- package/package.json +89 -26
- package/src/Cookies.ts +4 -8
- package/src/Entity.ts +24 -19
- package/src/Fetch.ts +128 -5
- package/src/FileRouter.ts +46 -49
- package/src/FileRouterCodegen.ts +9 -23
- package/src/FileSystem.ts +44 -67
- package/src/GlobalLayer.ts +85 -0
- package/src/PlatformRuntime.ts +8 -1
- package/src/Route.ts +2 -2
- package/src/RouteBody.ts +1 -1
- package/src/RouteHook.ts +1 -1
- package/src/RouteHttp.ts +133 -113
- package/src/RouteMount.ts +3 -3
- package/src/RouteSchema.ts +2 -2
- package/src/RouteSse.ts +28 -37
- package/src/RouteTree.ts +2 -2
- package/src/RouteTrie.ts +1 -1
- package/src/Socket.ts +17 -27
- package/src/Start.ts +67 -64
- package/src/System.ts +42 -9
- package/src/Unique.ts +59 -0
- package/src/{ChildProcess.ts → _ChildProcess.ts} +16 -28
- package/src/{Development.ts → _Development.ts} +16 -21
- package/src/_Docker.ts +190 -0
- package/src/{Effectify.ts → _Effectify.ts} +7 -10
- package/src/{Http.ts → _Http.ts} +0 -28
- package/src/{PathPattern.ts → _PathPattern.ts} +105 -0
- package/src/{SchemaExtra.ts → _SchemaExtra.ts} +3 -4
- package/src/bun/BunChildProcessSpawner.ts +10 -17
- package/src/bun/BunRoute.ts +6 -8
- package/src/bun/BunRuntime.ts +2 -8
- package/src/bun/BunServer.ts +57 -5
- package/src/bundler/BundleRoute.ts +2 -2
- package/src/cli/Argument.ts +45 -0
- package/src/cli/CliError.ts +68 -0
- package/src/cli/Command.ts +685 -0
- package/src/cli/Flag.ts +63 -0
- package/src/cli/HelpDoc.ts +67 -0
- package/src/cli/Param.ts +418 -0
- package/src/cli/Primitive.ts +94 -0
- package/src/cli/index.ts +7 -0
- package/src/datastar/watchers/patchElements.ts +3 -2
- package/src/hyper/HyperHtml.test.tsx +395 -0
- package/src/hyper/HyperNode.ts +1 -2
- package/src/hyper/HyperRoute.test.tsx +166 -0
- package/src/hyper/HyperRoute.ts +1 -1
- package/src/index.ts +1 -1
- package/src/lint/plugin.js +179 -125
- package/src/node/NodeFileSystem.ts +15 -14
- package/src/sql/SqlCache.ts +63 -0
- package/src/sql/SqlClient.ts +60 -15
- package/src/{SqlIntrospect.ts → sql/SqlIntrospect.ts} +13 -11
- package/src/sql/bun/index.ts +29 -27
- package/src/sql/index.ts +2 -0
- package/src/sql/libsql/index.ts +63 -29
- package/src/sql/mssql/index.ts +54 -58
- package/src/sql/postgres/index.ts +254 -0
- package/src/studio/Simulation.ts +776 -0
- package/src/studio/Studio.ts +47 -0
- package/src/studio/StudioErrors.ts +224 -0
- package/src/studio/StudioLogger.ts +52 -0
- package/src/studio/StudioMetrics.ts +72 -0
- package/src/studio/StudioProcess.ts +59 -0
- package/src/studio/StudioStore.ts +505 -0
- package/src/studio/StudioTracer.ts +128 -0
- package/src/studio/index.ts +3 -0
- package/src/studio/routes/errors/route.tsx +90 -0
- package/src/studio/routes/fiberDetail.tsx +51 -0
- package/src/studio/routes/fibers/route.tsx +46 -0
- package/src/studio/routes/layout.html +340 -0
- package/src/studio/routes/layout.tsx +4 -0
- package/src/studio/routes/logs/route.tsx +73 -0
- package/src/studio/routes/metrics/route.tsx +36 -0
- package/src/studio/routes/route.tsx +8 -0
- package/src/studio/routes/routes/route.tsx +30 -0
- package/src/studio/routes/services/route.tsx +21 -0
- package/src/studio/routes/system/route.tsx +43 -0
- package/src/studio/routes/traceDetail.tsx +30 -0
- package/src/studio/routes/traces/route.tsx +72 -0
- package/src/studio/routes/tree.ts +28 -0
- package/src/studio/ui/Errors.tsx +80 -0
- package/src/studio/ui/Fibers.tsx +336 -0
- package/src/studio/ui/Logs.tsx +50 -0
- package/src/studio/ui/Metrics.tsx +78 -0
- package/src/studio/ui/Routes.tsx +125 -0
- package/src/studio/ui/Services.tsx +273 -0
- package/src/studio/ui/Shell.tsx +74 -0
- package/src/studio/ui/System.tsx +141 -0
- package/src/studio/ui/Traces.tsx +419 -0
- package/src/testing/utils.ts +59 -0
- package/src/x/cloudflare/CloudflareTunnel.ts +1 -1
- package/src/x/tailscale/TailscaleTunnel.ts +6 -7
- package/src/x/tailwind/compile.ts +6 -1
- package/src/Commander.ts +0 -585
- package/src/FilePathPattern.ts +0 -115
- package/src/PlatformError.ts +0 -73
- package/src/TuplePathPattern.ts +0 -75
- package/src/sql/mssql/docker.ts +0 -117
- /package/src/{ContentNegotiation.ts → _ContentNegotiation.ts} +0 -0
- /package/src/{StartApp.ts → _StartApp.ts} +0 -0
- /package/src/{StreamExtra.ts → _StreamExtra.ts} +0 -0
- /package/src/{Values.ts → _Values.ts} +0 -0
package/src/Start.ts
CHANGED
|
@@ -2,30 +2,21 @@ import type * as FileSystem from "./FileSystem.ts"
|
|
|
2
2
|
import * as Context from "effect/Context"
|
|
3
3
|
import * as Deferred from "effect/Deferred"
|
|
4
4
|
import * as Effect from "effect/Effect"
|
|
5
|
+
import * as FiberId from "effect/FiberId"
|
|
5
6
|
import * as ExecutionStrategy from "effect/ExecutionStrategy"
|
|
6
7
|
import * as Exit from "effect/Exit"
|
|
7
8
|
import * as Function from "effect/Function"
|
|
8
9
|
import * as Layer from "effect/Layer"
|
|
9
10
|
import * as Scope from "effect/Scope"
|
|
10
11
|
import * as SynchronizedRef from "effect/SynchronizedRef"
|
|
11
|
-
import type * as ChildProcess from "./
|
|
12
|
+
import type * as ChildProcess from "./_ChildProcess.ts"
|
|
13
|
+
import * as MutableRef from "effect/MutableRef"
|
|
12
14
|
import * as BunRuntime from "./bun/BunRuntime.ts"
|
|
13
15
|
import * as BunServer from "./bun/BunServer.ts"
|
|
14
16
|
import * as NodeFileSystem from "./node/NodeFileSystem.ts"
|
|
15
17
|
import * as BunChildProcessSpawner from "./bun/BunChildProcessSpawner.ts"
|
|
16
|
-
import * as
|
|
17
|
-
|
|
18
|
-
export function layer<
|
|
19
|
-
Layers extends [Layer.Layer<never, any, any>, ...Array<Layer.Layer<never, any, any>>],
|
|
20
|
-
>(
|
|
21
|
-
...layers: Layers
|
|
22
|
-
): Layer.Layer<
|
|
23
|
-
{ [k in keyof Layers]: Layer.Layer.Success<Layers[k]> }[number],
|
|
24
|
-
{ [k in keyof Layers]: Layer.Layer.Error<Layers[k]> }[number],
|
|
25
|
-
{ [k in keyof Layers]: Layer.Layer.Context<Layers[k]> }[number]
|
|
26
|
-
> {
|
|
27
|
-
return Layer.mergeAll(...layers)
|
|
28
|
-
}
|
|
18
|
+
import * as PlatformRuntime from "./PlatformRuntime.ts"
|
|
19
|
+
import * as StartApp from "./_StartApp.ts"
|
|
29
20
|
|
|
30
21
|
/**
|
|
31
22
|
* Bundles layers together, wiring their dependencies automatically.
|
|
@@ -48,9 +39,7 @@ export function layer<
|
|
|
48
39
|
* @since 1.0.0
|
|
49
40
|
* @category constructors
|
|
50
41
|
*/
|
|
51
|
-
export function pack<
|
|
52
|
-
const Layers extends readonly [Layer.Layer.Any, ...Array<Layer.Layer.Any>],
|
|
53
|
-
>(
|
|
42
|
+
export function pack<const Layers extends readonly [Layer.Layer.Any, ...Array<Layer.Layer.Any>]>(
|
|
54
43
|
...layers: Layers & OrderedPack<NoInfer<Layers>, NoInfer<Layers>>
|
|
55
44
|
): Layer.Layer<
|
|
56
45
|
{ [K in keyof Layers]: Layer.Layer.Success<Layers[K]> }[number],
|
|
@@ -70,8 +59,7 @@ export function pack<
|
|
|
70
59
|
return result as AnyLayer
|
|
71
60
|
}
|
|
72
61
|
|
|
73
|
-
type Unsatisfied<Unmet, Success> =
|
|
74
|
-
Unmet extends Success ? Unmet : never
|
|
62
|
+
type Unsatisfied<Unmet, Success> = Unmet extends Success ? Unmet : never
|
|
75
63
|
|
|
76
64
|
type OrderedPack<
|
|
77
65
|
Layers extends readonly Layer.Layer.Any[],
|
|
@@ -81,18 +69,34 @@ type OrderedPack<
|
|
|
81
69
|
...infer Tail extends Layer.Layer.Any[],
|
|
82
70
|
]
|
|
83
71
|
? [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
72
|
+
[
|
|
73
|
+
Unsatisfied<
|
|
74
|
+
Exclude<
|
|
75
|
+
Layer.Layer.Context<Head>,
|
|
76
|
+
{ [K in keyof Tail]: Layer.Layer.Success<Tail[K]> }[number]
|
|
77
|
+
>,
|
|
78
|
+
{ [K in keyof All]: Layer.Layer.Success<All[K]> }[number]
|
|
79
|
+
>,
|
|
80
|
+
] extends [never]
|
|
81
|
+
? Head
|
|
82
|
+
: never,
|
|
83
|
+
...OrderedPack<Tail, All>,
|
|
84
|
+
]
|
|
94
85
|
: []
|
|
95
86
|
|
|
87
|
+
type BuildSuccess<Layers extends readonly Layer.Layer.Any[]> = {
|
|
88
|
+
[K in keyof Layers]: Layer.Layer.Success<Layers[K]>
|
|
89
|
+
}[number]
|
|
90
|
+
|
|
91
|
+
type BuildError<Layers extends readonly Layer.Layer.Any[]> = {
|
|
92
|
+
[K in keyof Layers]: Layer.Layer.Error<Layers[K]>
|
|
93
|
+
}[number]
|
|
94
|
+
|
|
95
|
+
type BuildContext<Layers extends readonly Layer.Layer.Any[]> = Exclude<
|
|
96
|
+
{ [K in keyof Layers]: Layer.Layer.Context<Layers[K]> }[number],
|
|
97
|
+
{ [K in keyof Layers]: Layer.Layer.Success<Layers[K]> }[number]
|
|
98
|
+
>
|
|
99
|
+
|
|
96
100
|
/**
|
|
97
101
|
* Like `pack`, but accepts layers in any order.
|
|
98
102
|
*
|
|
@@ -105,18 +109,9 @@ type OrderedPack<
|
|
|
105
109
|
* @since 1.0.0
|
|
106
110
|
* @category constructors
|
|
107
111
|
*/
|
|
108
|
-
export function build<
|
|
109
|
-
const Layers extends readonly [Layer.Layer.Any, ...Array<Layer.Layer.Any>],
|
|
110
|
-
>(
|
|
112
|
+
export function build<const Layers extends readonly [Layer.Layer.Any, ...Array<Layer.Layer.Any>]>(
|
|
111
113
|
...layers: Layers
|
|
112
|
-
): Layer.Layer<
|
|
113
|
-
{ [K in keyof Layers]: Layer.Layer.Success<Layers[K]> }[number],
|
|
114
|
-
{ [K in keyof Layers]: Layer.Layer.Error<Layers[K]> }[number],
|
|
115
|
-
Exclude<
|
|
116
|
-
{ [K in keyof Layers]: Layer.Layer.Context<Layers[K]> }[number],
|
|
117
|
-
{ [K in keyof Layers]: Layer.Layer.Success<Layers[K]> }[number]
|
|
118
|
-
>
|
|
119
|
-
> {
|
|
114
|
+
): Layer.Layer<BuildSuccess<Layers>, BuildError<Layers>, BuildContext<Layers>> {
|
|
120
115
|
type AnyLayer = Layer.Layer<any, any, any>
|
|
121
116
|
const layerArray = layers as unknown as ReadonlyArray<AnyLayer>
|
|
122
117
|
|
|
@@ -129,7 +124,7 @@ export function build<
|
|
|
129
124
|
const pending = new Set<AnyLayer>(layerArray)
|
|
130
125
|
|
|
131
126
|
for (let pass = 0; pass < layerArray.length && pending.size > 0; pass++) {
|
|
132
|
-
for (const layer of
|
|
127
|
+
for (const layer of pending) {
|
|
133
128
|
const childScope = yield* Scope.fork(scope, ExecutionStrategy.sequential)
|
|
134
129
|
const exit = yield* layer.pipe(
|
|
135
130
|
Layer.buildWithMemoMap(memoMap, childScope),
|
|
@@ -160,30 +155,22 @@ export function build<
|
|
|
160
155
|
|
|
161
156
|
return ctx
|
|
162
157
|
}),
|
|
163
|
-
|
|
164
|
-
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function layerDev() {
|
|
162
|
+
return Layer.mergeAll(NodeFileSystem.layer, BunChildProcessSpawner.layer)
|
|
165
163
|
}
|
|
166
164
|
|
|
167
|
-
export
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
never
|
|
177
|
-
> = Layer.mergeAll(
|
|
178
|
-
NodeFileSystem.layer,
|
|
179
|
-
BunChildProcessSpawner.layer,
|
|
180
|
-
Layer.effect(
|
|
181
|
-
StartApp.StartApp,
|
|
182
|
-
Deferred.make<BunServer.BunServer>().pipe(Effect.map((server) => ({ server }))),
|
|
183
|
-
),
|
|
184
|
-
)
|
|
185
|
-
|
|
186
|
-
export function serve<ROut, E, RIn extends PlatformServices>(
|
|
165
|
+
export function serve<
|
|
166
|
+
ROut,
|
|
167
|
+
E,
|
|
168
|
+
RIn extends
|
|
169
|
+
| BunServer.BunServer
|
|
170
|
+
| FileSystem.FileSystem
|
|
171
|
+
| ChildProcess.ChildProcessSpawner
|
|
172
|
+
| StartApp.StartApp,
|
|
173
|
+
>(
|
|
187
174
|
load: () => Promise<{
|
|
188
175
|
default: Layer.Layer<ROut, E, RIn>
|
|
189
176
|
}>,
|
|
@@ -195,7 +182,18 @@ export function serve<ROut, E, RIn extends PlatformServices>(
|
|
|
195
182
|
Layer.unwrapEffect,
|
|
196
183
|
)
|
|
197
184
|
|
|
198
|
-
const appLayerResolved = Function.pipe(
|
|
185
|
+
const appLayerResolved = Function.pipe(
|
|
186
|
+
appLayer,
|
|
187
|
+
Layer.provideMerge(
|
|
188
|
+
Layer.mergeAll(
|
|
189
|
+
layerDev(),
|
|
190
|
+
Layer.effect(
|
|
191
|
+
StartApp.StartApp,
|
|
192
|
+
Deferred.make<BunServer.BunServer>().pipe(Effect.map((server) => ({ server }))),
|
|
193
|
+
),
|
|
194
|
+
),
|
|
195
|
+
),
|
|
196
|
+
)
|
|
199
197
|
|
|
200
198
|
const composed = Function.pipe(
|
|
201
199
|
BunServer.layerStart(),
|
|
@@ -205,3 +203,8 @@ export function serve<ROut, E, RIn extends PlatformServices>(
|
|
|
205
203
|
|
|
206
204
|
return Function.pipe(composed, Layer.launch, BunRuntime.runMain)
|
|
207
205
|
}
|
|
206
|
+
|
|
207
|
+
export const mainFiberId: Effect.Effect<FiberId.FiberId> = Effect.sync(() => {
|
|
208
|
+
const fiber = MutableRef.get(PlatformRuntime.mainFiber)
|
|
209
|
+
return fiber ? fiber.id() : FiberId.none
|
|
210
|
+
})
|
package/src/System.ts
CHANGED
|
@@ -1,17 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Adapted from @effect/platform
|
|
3
|
+
*/
|
|
4
|
+
import * as Data from "effect/Data"
|
|
1
5
|
import * as Effect from "effect/Effect"
|
|
2
6
|
import type * as Scope from "effect/Scope"
|
|
7
|
+
import * as ChildProcess from "./_ChildProcess.ts"
|
|
3
8
|
|
|
4
|
-
|
|
5
|
-
|
|
9
|
+
export type Spawner = ChildProcess.ChildProcessSpawner
|
|
10
|
+
|
|
11
|
+
export type SystemErrorReason =
|
|
12
|
+
| "AlreadyExists"
|
|
13
|
+
| "BadArgument"
|
|
14
|
+
| "BadResource"
|
|
15
|
+
| "Busy"
|
|
16
|
+
| "InvalidData"
|
|
17
|
+
| "NotFound"
|
|
18
|
+
| "PermissionDenied"
|
|
19
|
+
| "TimedOut"
|
|
20
|
+
| "UnexpectedEof"
|
|
21
|
+
| "Unknown"
|
|
22
|
+
| "WouldBlock"
|
|
23
|
+
| "WriteZero"
|
|
24
|
+
|
|
25
|
+
export class SystemError extends Data.TaggedError("SystemError")<{
|
|
26
|
+
reason: SystemErrorReason
|
|
27
|
+
module: string
|
|
28
|
+
method: string
|
|
29
|
+
description?: string | undefined
|
|
30
|
+
syscall?: string | undefined
|
|
31
|
+
pathOrDescriptor?: string | number | undefined
|
|
32
|
+
cause?: unknown
|
|
33
|
+
}> {
|
|
34
|
+
get message(): string {
|
|
35
|
+
return `${this.reason}: ${this.module}.${this.method}${
|
|
36
|
+
this.pathOrDescriptor !== undefined ? ` (${this.pathOrDescriptor})` : ""
|
|
37
|
+
}${this.description ? `: ${this.description}` : ""}`
|
|
38
|
+
}
|
|
39
|
+
}
|
|
6
40
|
|
|
7
41
|
export const cwd: Effect.Effect<string> = Effect.sync(() => process.cwd())
|
|
8
42
|
|
|
9
|
-
export const which = (name: string): Effect.Effect<string,
|
|
43
|
+
export const which = (name: string): Effect.Effect<string, SystemError> =>
|
|
10
44
|
Effect.flatMap(
|
|
11
45
|
Effect.try({
|
|
12
46
|
try: () => Bun.which(name),
|
|
13
47
|
catch: (err) =>
|
|
14
|
-
new
|
|
48
|
+
new SystemError({
|
|
15
49
|
reason: "Unknown",
|
|
16
50
|
module: "System",
|
|
17
51
|
method: "which",
|
|
@@ -22,7 +56,7 @@ export const which = (name: string): Effect.Effect<string, PlatformError.SystemE
|
|
|
22
56
|
(path) =>
|
|
23
57
|
path === null
|
|
24
58
|
? Effect.fail(
|
|
25
|
-
new
|
|
59
|
+
new SystemError({
|
|
26
60
|
reason: "NotFound",
|
|
27
61
|
module: "System",
|
|
28
62
|
method: "which",
|
|
@@ -33,11 +67,10 @@ export const which = (name: string): Effect.Effect<string, PlatformError.SystemE
|
|
|
33
67
|
)
|
|
34
68
|
|
|
35
69
|
export const spawn = (
|
|
36
|
-
|
|
37
|
-
args?: ReadonlyArray<string>,
|
|
70
|
+
cmd: readonly [string, ...Array<string>],
|
|
38
71
|
options?: ChildProcess.Command.Options,
|
|
39
72
|
): Effect.Effect<
|
|
40
73
|
ChildProcess.ChildProcessHandle,
|
|
41
|
-
|
|
74
|
+
SystemError,
|
|
42
75
|
ChildProcess.ChildProcessSpawner | Scope.Scope
|
|
43
|
-
> => ChildProcess.spawn(ChildProcess.make(
|
|
76
|
+
> => ChildProcess.spawn(ChildProcess.make(cmd, options))
|
package/src/Unique.ts
CHANGED
|
@@ -4,6 +4,56 @@ export const ALPHABET_BASE64_URL =
|
|
|
4
4
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
|
|
5
5
|
export const ALPHABET_HEX = "0123456789abcdef"
|
|
6
6
|
|
|
7
|
+
interface SnowflakeState {
|
|
8
|
+
timestampMs: bigint
|
|
9
|
+
sequence: bigint
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface Snowflake {
|
|
13
|
+
(): bigint
|
|
14
|
+
readonly state: SnowflakeState
|
|
15
|
+
readonly timestamp: (id: bigint) => bigint
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function buildSnowflake(): {
|
|
19
|
+
(): bigint
|
|
20
|
+
readonly state: SnowflakeState
|
|
21
|
+
readonly timestamp: (id: bigint) => bigint
|
|
22
|
+
} {
|
|
23
|
+
const timestampBits = 48n
|
|
24
|
+
const seqBits = 16n
|
|
25
|
+
const seqMax = (1n << seqBits) - 1n
|
|
26
|
+
const timestampMask = (1n << timestampBits) - 1n
|
|
27
|
+
|
|
28
|
+
const fn = Object.assign(
|
|
29
|
+
() => {
|
|
30
|
+
const nowMs = BigInt(Date.now())
|
|
31
|
+
const timestampMs = nowMs > fn.state.timestampMs ? nowMs : fn.state.timestampMs
|
|
32
|
+
|
|
33
|
+
if (timestampMs > fn.state.timestampMs) {
|
|
34
|
+
fn.state.timestampMs = timestampMs
|
|
35
|
+
fn.state.sequence = 0n
|
|
36
|
+
} else {
|
|
37
|
+
fn.state.sequence += 1n
|
|
38
|
+
if (fn.state.sequence > seqMax) {
|
|
39
|
+
fn.state.timestampMs += 1n
|
|
40
|
+
fn.state.sequence = 0n
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return ((fn.state.timestampMs & timestampMask) << seqBits) | fn.state.sequence
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
state: {
|
|
48
|
+
timestampMs: 0n,
|
|
49
|
+
sequence: -1n,
|
|
50
|
+
},
|
|
51
|
+
timestamp: (id: bigint): bigint => id >> seqBits,
|
|
52
|
+
},
|
|
53
|
+
)
|
|
54
|
+
return fn
|
|
55
|
+
}
|
|
56
|
+
|
|
7
57
|
/**
|
|
8
58
|
* Generate a random string for ids, session tokens, and API keys.
|
|
9
59
|
* It uses human-friendly crockford base32 encoding (5 bit of entropy per char)
|
|
@@ -169,6 +219,15 @@ function toSafeTime(time: number): number {
|
|
|
169
219
|
return Math.max(0, Math.trunc(time))
|
|
170
220
|
}
|
|
171
221
|
|
|
222
|
+
/**
|
|
223
|
+
* Monotonic Snowflake variant:
|
|
224
|
+
* - 48-bit unix timestamp (ms)
|
|
225
|
+
* - 16-bit sequence
|
|
226
|
+
* - sequence resets on timestamp increment
|
|
227
|
+
* - over-capacity sequence carries into next millisecond
|
|
228
|
+
*/
|
|
229
|
+
export const snowflake = buildSnowflake()
|
|
230
|
+
|
|
172
231
|
/**
|
|
173
232
|
* Generate a nanoid-style random string.
|
|
174
233
|
*
|
|
@@ -13,18 +13,15 @@ import type * as Sink from "effect/Sink"
|
|
|
13
13
|
import type * as Stream from "effect/Stream"
|
|
14
14
|
import * as Utils from "effect/Utils"
|
|
15
15
|
|
|
16
|
-
import type * as
|
|
16
|
+
import type * as System from "./System.ts"
|
|
17
17
|
|
|
18
|
-
const TypeId
|
|
19
|
-
|
|
20
|
-
type TypeId = typeof TypeId
|
|
18
|
+
const TypeId = "~effect-start/ChildProcess/Command" as const
|
|
21
19
|
|
|
22
20
|
type Stdio = "pipe" | "inherit" | "ignore"
|
|
23
21
|
|
|
24
22
|
export interface Command extends Pipeable.Pipeable {
|
|
25
|
-
readonly [TypeId]: TypeId
|
|
26
|
-
readonly
|
|
27
|
-
readonly args: ReadonlyArray<string>
|
|
23
|
+
readonly [TypeId]: typeof TypeId
|
|
24
|
+
readonly cmd: readonly [string, ...Array<string>]
|
|
28
25
|
readonly cwd?: string
|
|
29
26
|
readonly env?: Record<string, string>
|
|
30
27
|
readonly stdin?: Stdio
|
|
@@ -32,11 +29,7 @@ export interface Command extends Pipeable.Pipeable {
|
|
|
32
29
|
readonly stderr?: Stdio
|
|
33
30
|
readonly detached?: boolean
|
|
34
31
|
[Symbol.iterator](): Effect.EffectGenerator<
|
|
35
|
-
Effect.Effect<
|
|
36
|
-
ChildProcessHandle,
|
|
37
|
-
PlatformError.PlatformError,
|
|
38
|
-
ChildProcessSpawner | Scope.Scope
|
|
39
|
-
>
|
|
32
|
+
Effect.Effect<ChildProcessHandle, System.SystemError, ChildProcessSpawner | Scope.Scope>
|
|
40
33
|
>
|
|
41
34
|
}
|
|
42
35
|
|
|
@@ -64,13 +57,11 @@ const CommandProto = {
|
|
|
64
57
|
export const isCommand = (u: unknown): u is Command => Predicate.hasProperty(u, TypeId)
|
|
65
58
|
|
|
66
59
|
export const make = (
|
|
67
|
-
|
|
68
|
-
args?: ReadonlyArray<string>,
|
|
60
|
+
cmd: readonly [string, ...Array<string>],
|
|
69
61
|
options?: Command.Options,
|
|
70
62
|
): Command =>
|
|
71
63
|
Object.assign(Object.create(CommandProto), {
|
|
72
|
-
|
|
73
|
-
args: args ?? [],
|
|
64
|
+
cmd,
|
|
74
65
|
...options,
|
|
75
66
|
})
|
|
76
67
|
|
|
@@ -119,12 +110,12 @@ export interface KillOptions {
|
|
|
119
110
|
|
|
120
111
|
export interface ChildProcessHandle {
|
|
121
112
|
readonly pid: number
|
|
122
|
-
readonly exitCode: Effect.Effect<number,
|
|
123
|
-
readonly isRunning: Effect.Effect<boolean,
|
|
124
|
-
readonly kill: (options?: KillOptions) => Effect.Effect<void,
|
|
125
|
-
readonly stdin: Sink.Sink<void, Uint8Array, never,
|
|
126
|
-
readonly stdout: Stream.Stream<Uint8Array,
|
|
127
|
-
readonly stderr: Stream.Stream<Uint8Array,
|
|
113
|
+
readonly exitCode: Effect.Effect<number, System.SystemError>
|
|
114
|
+
readonly isRunning: Effect.Effect<boolean, System.SystemError>
|
|
115
|
+
readonly kill: (options?: KillOptions) => Effect.Effect<void, System.SystemError>
|
|
116
|
+
readonly stdin: Sink.Sink<void, Uint8Array, never, System.SystemError>
|
|
117
|
+
readonly stdout: Stream.Stream<Uint8Array, System.SystemError>
|
|
118
|
+
readonly stderr: Stream.Stream<Uint8Array, System.SystemError>
|
|
128
119
|
}
|
|
129
120
|
|
|
130
121
|
export class ChildProcessSpawner extends Context.Tag("effect-start/ChildProcessSpawner")<
|
|
@@ -132,14 +123,11 @@ export class ChildProcessSpawner extends Context.Tag("effect-start/ChildProcessS
|
|
|
132
123
|
{
|
|
133
124
|
readonly spawn: (
|
|
134
125
|
command: Command,
|
|
135
|
-
) => Effect.Effect<ChildProcessHandle,
|
|
126
|
+
) => Effect.Effect<ChildProcessHandle, System.SystemError, Scope.Scope>
|
|
136
127
|
}
|
|
137
128
|
>() {}
|
|
138
129
|
|
|
139
130
|
export const spawn = (
|
|
140
131
|
command: Command,
|
|
141
|
-
): Effect.Effect<
|
|
142
|
-
|
|
143
|
-
PlatformError.PlatformError,
|
|
144
|
-
ChildProcessSpawner | Scope.Scope
|
|
145
|
-
> => Effect.flatMap(ChildProcessSpawner, (spawner) => spawner.spawn(command))
|
|
132
|
+
): Effect.Effect<ChildProcessHandle, System.SystemError, ChildProcessSpawner | Scope.Scope> =>
|
|
133
|
+
Effect.flatMap(ChildProcessSpawner, (spawner) => spawner.spawn(command))
|
|
@@ -7,7 +7,7 @@ import * as Layer from "effect/Layer"
|
|
|
7
7
|
import * as Option from "effect/Option"
|
|
8
8
|
import * as PubSub from "effect/PubSub"
|
|
9
9
|
import * as Stream from "effect/Stream"
|
|
10
|
-
import type * as
|
|
10
|
+
import type * as System from "./System.ts"
|
|
11
11
|
|
|
12
12
|
export type DevelopmentEvent =
|
|
13
13
|
| FileSystem.WatchEvent
|
|
@@ -37,19 +37,15 @@ export class Development extends Context.Tag("effect-start/Development")<
|
|
|
37
37
|
|
|
38
38
|
const SOURCE_FILENAME = /\.(tsx?|jsx?|html?|css|json)$/
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
const filterSourceFiles = (event: FileSystem.WatchEvent): boolean => {
|
|
41
41
|
return SOURCE_FILENAME.test(event.path)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
return event.path.endsWith("/")
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export const watchSource = (opts?: {
|
|
44
|
+
const watchSource = (opts?: {
|
|
49
45
|
path?: string
|
|
50
46
|
recursive?: boolean
|
|
51
47
|
filter?: (event: FileSystem.WatchEvent) => boolean
|
|
52
|
-
}): Stream.Stream<FileSystem.WatchEvent,
|
|
48
|
+
}): Stream.Stream<FileSystem.WatchEvent, System.SystemError, FileSystem.FileSystem> => {
|
|
53
49
|
const baseDir = opts?.path ?? process.cwd()
|
|
54
50
|
const customFilter = opts?.filter
|
|
55
51
|
|
|
@@ -70,7 +66,7 @@ export const watchSource = (opts?: {
|
|
|
70
66
|
)
|
|
71
67
|
}
|
|
72
68
|
|
|
73
|
-
|
|
69
|
+
const watch = (opts?: {
|
|
74
70
|
path?: string
|
|
75
71
|
recursive?: boolean
|
|
76
72
|
filter?: (event: FileSystem.WatchEvent) => boolean
|
|
@@ -98,7 +94,7 @@ export const watch = (opts?: {
|
|
|
98
94
|
return { events: devState.pubsub! } satisfies DevelopmentService
|
|
99
95
|
})
|
|
100
96
|
|
|
101
|
-
export const
|
|
97
|
+
export const layer = (opts?: {
|
|
102
98
|
path?: string
|
|
103
99
|
recursive?: boolean
|
|
104
100
|
filter?: (event: FileSystem.WatchEvent) => boolean
|
|
@@ -106,15 +102,14 @@ export const layerWatch = (opts?: {
|
|
|
106
102
|
|
|
107
103
|
export const option = Effect.serviceOption(Development)
|
|
108
104
|
|
|
109
|
-
export const
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}),
|
|
118
|
-
),
|
|
105
|
+
export const events: Stream.Stream<DevelopmentEvent> = Stream.unwrap(
|
|
106
|
+
Function.pipe(
|
|
107
|
+
option,
|
|
108
|
+
Effect.map(
|
|
109
|
+
Option.match({
|
|
110
|
+
onNone: () => Stream.empty,
|
|
111
|
+
onSome: (dev) => Stream.fromPubSub(dev.events),
|
|
112
|
+
}),
|
|
119
113
|
),
|
|
120
|
-
)
|
|
114
|
+
),
|
|
115
|
+
)
|