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/lint/plugin.js
CHANGED
|
@@ -9,19 +9,19 @@ export default {
|
|
|
9
9
|
version: "0.1.0",
|
|
10
10
|
},
|
|
11
11
|
rules: {
|
|
12
|
-
"
|
|
12
|
+
"namespace-import": {
|
|
13
13
|
meta: {
|
|
14
14
|
type: "suggestion",
|
|
15
15
|
docs: {
|
|
16
16
|
description:
|
|
17
|
-
"Enforce namespace imports
|
|
17
|
+
"Enforce namespace imports with matching aliases for capitalized modules and specific forced modules",
|
|
18
18
|
},
|
|
19
|
-
fixable: "code",
|
|
20
|
-
hasSuggestions: true,
|
|
21
19
|
schema: [],
|
|
22
20
|
messages: {
|
|
23
21
|
preferNamespace:
|
|
24
|
-
'Use namespace import for module "{{source}}": import
|
|
22
|
+
'Use namespace import for module "{{source}}": import * as {{baseName}} from "{{source}}"',
|
|
23
|
+
mismatch:
|
|
24
|
+
'Namespace import alias "{{alias}}" does not match module basename "{{baseName}}"',
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
27
|
create(context) {
|
|
@@ -36,61 +36,33 @@ export default {
|
|
|
36
36
|
const forced = forceNamespace.has(source)
|
|
37
37
|
if (!forced && !isCapitalized(baseName)) return
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
const isNamespace =
|
|
40
|
+
node.specifiers.length === 1 && node.specifiers[0].type === "ImportNamespaceSpecifier"
|
|
41
|
+
|
|
42
|
+
if (isNamespace) {
|
|
43
|
+
if (!isLocalImport(source)) return
|
|
44
|
+
const alias = node.specifiers[0].local.name
|
|
45
|
+
if (alias === baseName) return
|
|
46
|
+
|
|
47
|
+
context.report({
|
|
48
|
+
node,
|
|
49
|
+
messageId: "mismatch",
|
|
50
|
+
data: { alias, baseName },
|
|
51
|
+
})
|
|
44
52
|
return
|
|
45
53
|
}
|
|
46
54
|
|
|
47
|
-
// Skip if there are no specifiers (side-effect import)
|
|
48
55
|
if (node.specifiers.length === 0) return
|
|
49
56
|
|
|
50
|
-
// Skip if it's only a default import (not applicable for forced modules)
|
|
51
57
|
if (!forced) {
|
|
52
58
|
const hasNamedImports = node.specifiers.some((s) => s.type === "ImportSpecifier")
|
|
53
59
|
if (!hasNamedImports) return
|
|
54
60
|
}
|
|
55
61
|
|
|
56
|
-
const typePrefix = node.importKind === "type" ? "type " : ""
|
|
57
|
-
|
|
58
|
-
const sourceCode = context.sourceCode || context.getSourceCode()
|
|
59
|
-
|
|
60
62
|
context.report({
|
|
61
63
|
node,
|
|
62
64
|
messageId: "preferNamespace",
|
|
63
|
-
data: { source, baseName
|
|
64
|
-
fix(fixer) {
|
|
65
|
-
const fixes = [
|
|
66
|
-
fixer.replaceText(
|
|
67
|
-
node,
|
|
68
|
-
`import ${typePrefix}* as ${baseName} from "${source}"`,
|
|
69
|
-
),
|
|
70
|
-
]
|
|
71
|
-
|
|
72
|
-
for (const specifier of node.specifiers) {
|
|
73
|
-
if (specifier.type !== "ImportSpecifier") continue
|
|
74
|
-
const localName = specifier.local.name
|
|
75
|
-
const importedName = specifier.imported.name
|
|
76
|
-
|
|
77
|
-
for (const variable of sourceCode.getDeclaredVariables(specifier)) {
|
|
78
|
-
for (const ref of variable.references) {
|
|
79
|
-
if (ref.identifier.range[0] === specifier.local.range[0]) continue
|
|
80
|
-
fixes.push(
|
|
81
|
-
fixer.replaceTextRange(
|
|
82
|
-
ref.identifier.range,
|
|
83
|
-
localName !== importedName
|
|
84
|
-
? `${baseName}.${importedName}`
|
|
85
|
-
: `${baseName}.${localName}`,
|
|
86
|
-
),
|
|
87
|
-
)
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return fixes
|
|
93
|
-
},
|
|
65
|
+
data: { source, baseName },
|
|
94
66
|
})
|
|
95
67
|
},
|
|
96
68
|
}
|
|
@@ -243,18 +215,15 @@ export default {
|
|
|
243
215
|
const ancestors = sourceCode.getAncestors(node)
|
|
244
216
|
const parent = ancestors[ancestors.length - 1]
|
|
245
217
|
if (!parent) return false
|
|
246
|
-
if (parent.type === "MethodDefinition" || parent.type === "Property" && parent.method)
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
parent.init === node
|
|
250
|
-
) return true
|
|
218
|
+
if (parent.type === "MethodDefinition" || (parent.type === "Property" && parent.method))
|
|
219
|
+
return true
|
|
220
|
+
if (parent.type === "VariableDeclarator" && parent.init === node) return true
|
|
251
221
|
return false
|
|
252
222
|
}
|
|
253
223
|
|
|
254
224
|
function checkParams(node) {
|
|
255
225
|
for (const param of node.params) {
|
|
256
|
-
const pattern =
|
|
257
|
-
param.type === "AssignmentPattern" ? param.left : param
|
|
226
|
+
const pattern = param.type === "AssignmentPattern" ? param.left : param
|
|
258
227
|
if (pattern.type !== "ObjectPattern") continue
|
|
259
228
|
|
|
260
229
|
const baseName = isDefinition(node) ? "options" : "v"
|
|
@@ -262,84 +231,77 @@ export default {
|
|
|
262
231
|
const name = findUnusedName(outerScope, baseName)
|
|
263
232
|
|
|
264
233
|
const hasPropertyDefaults = pattern.properties.some(
|
|
265
|
-
(prop) =>
|
|
266
|
-
prop.type !== "RestElement" &&
|
|
267
|
-
prop.value.type === "AssignmentPattern",
|
|
234
|
+
(prop) => prop.type !== "RestElement" && prop.value.type === "AssignmentPattern",
|
|
268
235
|
)
|
|
269
236
|
|
|
270
237
|
context.report({
|
|
271
238
|
node: pattern,
|
|
272
239
|
messageId: "noDestructuredParam",
|
|
273
|
-
fix: hasPropertyDefaults
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
? prop.value.left
|
|
302
|
-
: prop.value
|
|
303
|
-
if (localNode.type === "Identifier") {
|
|
304
|
-
localToKey.set(localNode.name, keyName)
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
for (const variable of fnScope.variables) {
|
|
309
|
-
const keyName = localToKey.get(variable.name)
|
|
310
|
-
if (keyName === undefined) continue
|
|
311
|
-
|
|
312
|
-
for (const ref of variable.references) {
|
|
313
|
-
if (ref.identifier.range[0] >= pattern.range[0] &&
|
|
314
|
-
ref.identifier.range[1] <= pattern.range[1]) continue
|
|
315
|
-
|
|
316
|
-
const ancestors = sourceCode.getAncestors(ref.identifier)
|
|
317
|
-
const parent = ancestors[ancestors.length - 1]
|
|
318
|
-
if (
|
|
319
|
-
parent &&
|
|
320
|
-
parent.type === "Property" &&
|
|
321
|
-
parent.shorthand &&
|
|
322
|
-
parent.value === ref.identifier
|
|
323
|
-
) {
|
|
324
|
-
fixes.push(
|
|
325
|
-
fixer.replaceTextRange(
|
|
326
|
-
parent.range,
|
|
327
|
-
keyName + ": " + name + "." + keyName,
|
|
328
|
-
),
|
|
329
|
-
)
|
|
330
|
-
} else {
|
|
331
|
-
fixes.push(
|
|
332
|
-
fixer.replaceTextRange(
|
|
333
|
-
ref.identifier.range,
|
|
334
|
-
name + "." + keyName,
|
|
335
|
-
),
|
|
336
|
-
)
|
|
240
|
+
fix: hasPropertyDefaults
|
|
241
|
+
? undefined
|
|
242
|
+
: (fixer) => {
|
|
243
|
+
const fixes = []
|
|
244
|
+
|
|
245
|
+
const typeAnnotation = pattern.typeAnnotation
|
|
246
|
+
? sourceCode.getText(pattern.typeAnnotation)
|
|
247
|
+
: ""
|
|
248
|
+
const hasDefault = param.type === "AssignmentPattern"
|
|
249
|
+
const defaultValue = hasDefault ? " = " + sourceCode.getText(param.right) : ""
|
|
250
|
+
|
|
251
|
+
fixes.push(
|
|
252
|
+
fixer.replaceTextRange(param.range, name + typeAnnotation + defaultValue),
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
const fnScope = sourceCode.getScope(node)
|
|
256
|
+
const localToKey = new Map()
|
|
257
|
+
for (const prop of pattern.properties) {
|
|
258
|
+
if (prop.type === "RestElement") continue
|
|
259
|
+
const keyName =
|
|
260
|
+
prop.key.type === "Identifier"
|
|
261
|
+
? prop.key.name
|
|
262
|
+
: sourceCode.getText(prop.key)
|
|
263
|
+
const localNode =
|
|
264
|
+
prop.value.type === "AssignmentPattern" ? prop.value.left : prop.value
|
|
265
|
+
if (localNode.type === "Identifier") {
|
|
266
|
+
localToKey.set(localNode.name, keyName)
|
|
267
|
+
}
|
|
337
268
|
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
269
|
|
|
341
|
-
|
|
342
|
-
|
|
270
|
+
for (const variable of fnScope.variables) {
|
|
271
|
+
const keyName = localToKey.get(variable.name)
|
|
272
|
+
if (keyName === undefined) continue
|
|
273
|
+
|
|
274
|
+
for (const ref of variable.references) {
|
|
275
|
+
if (
|
|
276
|
+
ref.identifier.range[0] >= pattern.range[0] &&
|
|
277
|
+
ref.identifier.range[1] <= pattern.range[1]
|
|
278
|
+
)
|
|
279
|
+
continue
|
|
280
|
+
|
|
281
|
+
const ancestors = sourceCode.getAncestors(ref.identifier)
|
|
282
|
+
const parent = ancestors[ancestors.length - 1]
|
|
283
|
+
if (
|
|
284
|
+
parent &&
|
|
285
|
+
parent.type === "Property" &&
|
|
286
|
+
parent.shorthand &&
|
|
287
|
+
parent.value === ref.identifier
|
|
288
|
+
) {
|
|
289
|
+
fixes.push(
|
|
290
|
+
fixer.replaceTextRange(
|
|
291
|
+
parent.range,
|
|
292
|
+
keyName + ": " + name + "." + keyName,
|
|
293
|
+
),
|
|
294
|
+
)
|
|
295
|
+
} else {
|
|
296
|
+
fixes.push(
|
|
297
|
+
fixer.replaceTextRange(ref.identifier.range, name + "." + keyName),
|
|
298
|
+
)
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
return fixes
|
|
304
|
+
},
|
|
343
305
|
})
|
|
344
306
|
}
|
|
345
307
|
}
|
|
@@ -352,6 +314,90 @@ export default {
|
|
|
352
314
|
},
|
|
353
315
|
},
|
|
354
316
|
|
|
317
|
+
"test-effects": {
|
|
318
|
+
meta: {
|
|
319
|
+
type: "suggestion",
|
|
320
|
+
docs: {
|
|
321
|
+
description:
|
|
322
|
+
"Disallow await Effect.runPromise(...) in test callbacks. Use Effect.gen(...).pipe(Effect.runPromise) as the return value instead.",
|
|
323
|
+
},
|
|
324
|
+
schema: [],
|
|
325
|
+
messages: {
|
|
326
|
+
noAwaitRunPromise:
|
|
327
|
+
"Avoid Effect.runPromise in async test callbacks. Use () => Effect.gen(function*() { ... }).pipe(Effect.runPromise) instead.",
|
|
328
|
+
scopedWrapping: "Use .pipe(Effect.scoped) instead of Effect.scoped(...) wrapping.",
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
create(context) {
|
|
332
|
+
const filename = context.filename || context.getFilename()
|
|
333
|
+
if (!filename.endsWith(".test.ts") && !filename.endsWith(".test.tsx")) {
|
|
334
|
+
return {}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
function isTestCallback(node) {
|
|
338
|
+
const sourceCode = context.sourceCode || context.getSourceCode()
|
|
339
|
+
const ancestors = sourceCode.getAncestors(node)
|
|
340
|
+
const parent = ancestors[ancestors.length - 1]
|
|
341
|
+
if (!parent || parent.type !== "CallExpression") return false
|
|
342
|
+
const callee = parent.callee
|
|
343
|
+
return (
|
|
344
|
+
callee.type === "MemberExpression" &&
|
|
345
|
+
callee.object.type === "Identifier" &&
|
|
346
|
+
callee.object.name === "test" &&
|
|
347
|
+
callee.property.type === "Identifier" &&
|
|
348
|
+
(callee.property.name === "it" || callee.property.name === "test")
|
|
349
|
+
)
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
function findEnclosingAsyncTestCallback(node) {
|
|
353
|
+
const sourceCode = context.sourceCode || context.getSourceCode()
|
|
354
|
+
const ancestors = sourceCode.getAncestors(node)
|
|
355
|
+
for (let i = ancestors.length - 1; i >= 0; i--) {
|
|
356
|
+
const ancestor = ancestors[i]
|
|
357
|
+
if (
|
|
358
|
+
(ancestor.type === "ArrowFunctionExpression" ||
|
|
359
|
+
ancestor.type === "FunctionExpression") &&
|
|
360
|
+
ancestor.async
|
|
361
|
+
) {
|
|
362
|
+
return isTestCallback(ancestor) ? ancestor : undefined
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
return {
|
|
368
|
+
CallExpression(node) {
|
|
369
|
+
if (
|
|
370
|
+
node.callee.type === "MemberExpression" &&
|
|
371
|
+
node.callee.object.type === "Identifier" &&
|
|
372
|
+
node.callee.object.name === "Effect" &&
|
|
373
|
+
node.callee.property.type === "Identifier" &&
|
|
374
|
+
node.callee.property.name === "scoped" &&
|
|
375
|
+
node.arguments.length === 1
|
|
376
|
+
) {
|
|
377
|
+
context.report({
|
|
378
|
+
node,
|
|
379
|
+
messageId: "scopedWrapping",
|
|
380
|
+
})
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
MemberExpression(node) {
|
|
384
|
+
if (
|
|
385
|
+
node.object.type === "Identifier" &&
|
|
386
|
+
node.object.name === "Effect" &&
|
|
387
|
+
node.property.type === "Identifier" &&
|
|
388
|
+
node.property.name === "runPromise" &&
|
|
389
|
+
findEnclosingAsyncTestCallback(node)
|
|
390
|
+
) {
|
|
391
|
+
context.report({
|
|
392
|
+
node,
|
|
393
|
+
messageId: "noAwaitRunPromise",
|
|
394
|
+
})
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
|
|
355
401
|
"test-assertion-newline": {
|
|
356
402
|
meta: {
|
|
357
403
|
type: "layout",
|
|
@@ -549,10 +595,18 @@ function getBaseName(source) {
|
|
|
549
595
|
// Strip file extension (.ts, .tsx, .js, .jsx, .mjs, .cjs)
|
|
550
596
|
last = last.replace(/\.(ts|tsx|js|jsx|mjs|cjs)$/, "")
|
|
551
597
|
|
|
598
|
+
// Strip leading underscores (private module convention)
|
|
599
|
+
last = last.replace(/^_+/, "")
|
|
600
|
+
|
|
552
601
|
return last
|
|
553
602
|
}
|
|
554
603
|
|
|
604
|
+
function isLocalImport(source) {
|
|
605
|
+
return source.startsWith(".") || source.startsWith("/")
|
|
606
|
+
}
|
|
607
|
+
|
|
555
608
|
function isCapitalized(name) {
|
|
609
|
+
if (name.length > 0 && name[0] === "_") return isCapitalized(name.slice(1))
|
|
556
610
|
return name.length > 0 && name[0] >= "A" && name[0] <= "Z"
|
|
557
611
|
}
|
|
558
612
|
|
|
@@ -12,11 +12,12 @@ import * as NCrypto from "node:crypto"
|
|
|
12
12
|
import * as NFS from "node:fs"
|
|
13
13
|
import * as NOS from "node:os"
|
|
14
14
|
import * as NPath from "node:path"
|
|
15
|
-
import * as
|
|
16
|
-
import * as Effectify from "../
|
|
15
|
+
import * as System from "../System.ts"
|
|
16
|
+
import * as Effectify from "../_Effectify.ts"
|
|
17
17
|
|
|
18
18
|
const handleBadArgument = (method: string) => (cause: unknown) =>
|
|
19
|
-
new
|
|
19
|
+
new System.SystemError({
|
|
20
|
+
reason: "BadArgument",
|
|
20
21
|
module: "FileSystem",
|
|
21
22
|
method,
|
|
22
23
|
cause,
|
|
@@ -324,7 +325,7 @@ const makeFile = (() => {
|
|
|
324
325
|
)
|
|
325
326
|
}
|
|
326
327
|
|
|
327
|
-
private writeAllChunk(buffer: Uint8Array): Effect.Effect<void,
|
|
328
|
+
private writeAllChunk(buffer: Uint8Array): Effect.Effect<void, System.SystemError> {
|
|
328
329
|
return Effect.flatMap(
|
|
329
330
|
Effect.suspend(() =>
|
|
330
331
|
nodeWriteAll(
|
|
@@ -338,7 +339,7 @@ const makeFile = (() => {
|
|
|
338
339
|
(bytesWritten) => {
|
|
339
340
|
if (bytesWritten === 0) {
|
|
340
341
|
return Effect.fail(
|
|
341
|
-
new
|
|
342
|
+
new System.SystemError({
|
|
342
343
|
module: "FileSystem",
|
|
343
344
|
method: "writeAll",
|
|
344
345
|
reason: "WriteZero",
|
|
@@ -398,7 +399,7 @@ const readDirectory = (path: string, options?: FileSystem.ReadDirectoryOptions)
|
|
|
398
399
|
})
|
|
399
400
|
|
|
400
401
|
const readFile = (path: string) =>
|
|
401
|
-
Effect.async<Uint8Array,
|
|
402
|
+
Effect.async<Uint8Array, System.SystemError>((resume, signal) => {
|
|
402
403
|
try {
|
|
403
404
|
NFS.readFile(path, { signal }, (err, data) => {
|
|
404
405
|
if (err) {
|
|
@@ -508,7 +509,7 @@ const utimes = (() => {
|
|
|
508
509
|
})()
|
|
509
510
|
|
|
510
511
|
const watchNode = (path: string, options?: FileSystem.WatchOptions) =>
|
|
511
|
-
Stream.asyncScoped<FileSystem.WatchEvent,
|
|
512
|
+
Stream.asyncScoped<FileSystem.WatchEvent, System.SystemError>((emit) =>
|
|
512
513
|
Effect.acquireRelease(
|
|
513
514
|
Effect.sync(() => {
|
|
514
515
|
const watcher = NFS.watch(path, { recursive: options?.recursive }, (event, path) => {
|
|
@@ -534,7 +535,7 @@ const watchNode = (path: string, options?: FileSystem.WatchOptions) =>
|
|
|
534
535
|
})
|
|
535
536
|
watcher.on("error", (error) => {
|
|
536
537
|
emit.fail(
|
|
537
|
-
new
|
|
538
|
+
new System.SystemError({
|
|
538
539
|
module: "FileSystem",
|
|
539
540
|
reason: "Unknown",
|
|
540
541
|
method: "watch",
|
|
@@ -568,7 +569,7 @@ const watch = (
|
|
|
568
569
|
)
|
|
569
570
|
|
|
570
571
|
const writeFile = (path: string, data: Uint8Array, options?: FileSystem.WriteFileOptions) =>
|
|
571
|
-
Effect.async<void,
|
|
572
|
+
Effect.async<void, System.SystemError>((resume, signal) => {
|
|
572
573
|
try {
|
|
573
574
|
NFS.writeFile(
|
|
574
575
|
path,
|
|
@@ -624,14 +625,14 @@ const make = Effect.map(Effect.serviceOption(FileSystem.WatchBackend), (backend)
|
|
|
624
625
|
|
|
625
626
|
export const layer = Layer.effect(FileSystem.FileSystem, make)
|
|
626
627
|
|
|
627
|
-
export {
|
|
628
|
+
export { System as Error }
|
|
628
629
|
|
|
629
|
-
export function handleErrnoException(module:
|
|
630
|
+
export function handleErrnoException(module: System.SystemError["module"], method: string) {
|
|
630
631
|
return function (
|
|
631
632
|
err: NodeJS.ErrnoException,
|
|
632
633
|
[path]: [path: NFS.PathLike | number, ...args: Array<any>],
|
|
633
|
-
):
|
|
634
|
-
let reason:
|
|
634
|
+
): System.SystemError {
|
|
635
|
+
let reason: System.SystemErrorReason = "Unknown"
|
|
635
636
|
|
|
636
637
|
switch (err.code) {
|
|
637
638
|
case "ENOENT":
|
|
@@ -663,7 +664,7 @@ export function handleErrnoException(module: PlatformError.SystemError["module"]
|
|
|
663
664
|
break
|
|
664
665
|
}
|
|
665
666
|
|
|
666
|
-
return new
|
|
667
|
+
return new System.SystemError({
|
|
667
668
|
reason,
|
|
668
669
|
module,
|
|
669
670
|
method,
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as Cache from "effect/Cache"
|
|
2
|
+
import * as Context from "effect/Context"
|
|
3
|
+
import type * as Duration from "effect/Duration"
|
|
4
|
+
import * as Effect from "effect/Effect"
|
|
5
|
+
import * as Layer from "effect/Layer"
|
|
6
|
+
import type * as SqlClient from "./SqlClient.ts"
|
|
7
|
+
|
|
8
|
+
type SqlCacheInstance = Cache.Cache<string, ReadonlyArray<any>>
|
|
9
|
+
|
|
10
|
+
export class SqlCache extends Context.Tag("effect-start/SqlCache")<SqlCache, SqlCacheInstance>() {}
|
|
11
|
+
|
|
12
|
+
export function layer(cache: SqlCacheInstance): Layer.Layer<SqlCache>
|
|
13
|
+
export function layer(options: {
|
|
14
|
+
readonly capacity: number
|
|
15
|
+
readonly timeToLive: Duration.DurationInput
|
|
16
|
+
}): Layer.Layer<SqlCache>
|
|
17
|
+
export function layer(
|
|
18
|
+
cacheOrOptions:
|
|
19
|
+
| SqlCacheInstance
|
|
20
|
+
| { readonly capacity: number; readonly timeToLive: Duration.DurationInput },
|
|
21
|
+
): Layer.Layer<SqlCache> {
|
|
22
|
+
if (Cache.CacheTypeId in cacheOrOptions) {
|
|
23
|
+
return Layer.succeed(SqlCache, cacheOrOptions as SqlCacheInstance)
|
|
24
|
+
}
|
|
25
|
+
const options = cacheOrOptions as {
|
|
26
|
+
readonly capacity: number
|
|
27
|
+
readonly timeToLive: Duration.DurationInput
|
|
28
|
+
}
|
|
29
|
+
return Layer.effect(
|
|
30
|
+
SqlCache,
|
|
31
|
+
Cache.make<string, ReadonlyArray<any>>({
|
|
32
|
+
capacity: options.capacity,
|
|
33
|
+
timeToLive: options.timeToLive,
|
|
34
|
+
lookup: (key) => Effect.die(`cache miss without populate for key: ${key}`),
|
|
35
|
+
}),
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function withCache(
|
|
40
|
+
cache: SqlCacheInstance,
|
|
41
|
+
): <A extends object>(
|
|
42
|
+
self: SqlClient.SqlEffect<A>,
|
|
43
|
+
) => Effect.Effect<ReadonlyArray<A>, SqlClient.SqlError>
|
|
44
|
+
export function withCache(): <A extends object>(
|
|
45
|
+
self: SqlClient.SqlEffect<A>,
|
|
46
|
+
) => Effect.Effect<ReadonlyArray<A>, SqlClient.SqlError, SqlCache>
|
|
47
|
+
export function withCache(cache?: SqlCacheInstance) {
|
|
48
|
+
return <A extends object>(self: SqlClient.SqlEffect<A>) => {
|
|
49
|
+
const key = JSON.stringify({ sql: self.sql, parameters: self.parameters })
|
|
50
|
+
if (cache) {
|
|
51
|
+
return Effect.flatMap(cache.getOption(key), (option) => {
|
|
52
|
+
if (option._tag === "Some") return Effect.succeed(option.value as ReadonlyArray<A>)
|
|
53
|
+
return Effect.tap(self, (result) => cache.set(key, result))
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
return Effect.flatMap(SqlCache, (c) =>
|
|
57
|
+
Effect.flatMap(c.getOption(key), (option) => {
|
|
58
|
+
if (option._tag === "Some") return Effect.succeed(option.value as ReadonlyArray<A>)
|
|
59
|
+
return Effect.tap(self, (result) => c.set(key, result))
|
|
60
|
+
}),
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
}
|