effect-start 0.28.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 +9 -41
- package/dist/Cookies.d.ts.map +1 -1
- package/dist/Cookies.js +2 -2
- package/dist/Cookies.js.map +1 -1
- package/dist/Entity.d.ts +5 -6
- package/dist/Entity.d.ts.map +1 -1
- package/dist/Entity.js +10 -7
- package/dist/Entity.js.map +1 -1
- package/dist/Fetch.d.ts +23 -4
- package/dist/Fetch.d.ts.map +1 -1
- package/dist/Fetch.js +90 -1
- package/dist/Fetch.js.map +1 -1
- package/dist/FileRouter.d.ts +4 -7
- package/dist/FileRouter.d.ts.map +1 -1
- package/dist/FileRouter.js +39 -30
- package/dist/FileRouter.js.map +1 -1
- package/dist/FileRouterCodegen.d.ts +2 -2
- package/dist/FileRouterCodegen.d.ts.map +1 -1
- package/dist/FileRouterCodegen.js +9 -21
- package/dist/FileRouterCodegen.js.map +1 -1
- package/dist/FileSystem.d.ts +39 -39
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +5 -3
- package/dist/FileSystem.js.map +1 -1
- package/dist/GlobalLayer.d.ts +2 -2
- package/dist/GlobalLayer.d.ts.map +1 -1
- package/dist/GlobalLayer.js +1 -1
- package/dist/GlobalLayer.js.map +1 -1
- package/dist/PlatformRuntime.d.ts.map +1 -1
- package/dist/PlatformRuntime.js.map +1 -1
- package/dist/Route.d.ts +2 -2
- package/dist/Route.d.ts.map +1 -1
- package/dist/Route.js +1 -1
- package/dist/Route.js.map +1 -1
- package/dist/RouteBody.d.ts +1 -1
- package/dist/RouteBody.d.ts.map +1 -1
- package/dist/RouteBody.js.map +1 -1
- package/dist/RouteError.js.map +1 -1
- package/dist/RouteHook.d.ts.map +1 -1
- package/dist/RouteHook.js.map +1 -1
- package/dist/RouteHttp.d.ts +1 -1
- package/dist/RouteHttp.d.ts.map +1 -1
- package/dist/RouteHttp.js +38 -31
- package/dist/RouteHttp.js.map +1 -1
- package/dist/RouteHttpTracer.d.ts.map +1 -1
- package/dist/RouteHttpTracer.js.map +1 -1
- package/dist/RouteMount.d.ts +2 -2
- package/dist/RouteMount.d.ts.map +1 -1
- package/dist/RouteMount.js +1 -1
- package/dist/RouteMount.js.map +1 -1
- package/dist/RouteSchema.d.ts +2 -2
- package/dist/RouteSchema.d.ts.map +1 -1
- package/dist/RouteSchema.js +2 -2
- package/dist/RouteSchema.js.map +1 -1
- package/dist/RouteSse.d.ts +9 -10
- package/dist/RouteSse.d.ts.map +1 -1
- package/dist/RouteSse.js +8 -12
- package/dist/RouteSse.js.map +1 -1
- package/dist/RouteTree.d.ts +2 -2
- package/dist/RouteTree.d.ts.map +1 -1
- package/dist/RouteTree.js +2 -2
- package/dist/RouteTree.js.map +1 -1
- package/dist/RouteTrie.js +1 -1
- package/dist/RouteTrie.js.map +1 -1
- package/dist/Socket.d.ts +13 -18
- package/dist/Socket.d.ts.map +1 -1
- package/dist/Socket.js +12 -13
- package/dist/Socket.js.map +1 -1
- package/dist/Start.d.ts +15 -23
- package/dist/Start.d.ts.map +1 -1
- package/dist/Start.js +17 -6
- package/dist/Start.js.map +1 -1
- package/dist/System.d.ts +20 -5
- package/dist/System.d.ts.map +1 -1
- package/dist/System.js +12 -42
- package/dist/System.js.map +1 -1
- package/dist/Unique.d.ts.map +1 -1
- package/dist/Unique.js.map +1 -1
- package/dist/{ChildProcess.d.ts → _ChildProcess.d.ts} +14 -15
- package/dist/_ChildProcess.d.ts.map +1 -0
- package/dist/{ChildProcess.js → _ChildProcess.js} +2 -2
- package/dist/_ChildProcess.js.map +1 -0
- package/dist/{ContentNegotiation.d.ts → _ContentNegotiation.d.ts} +1 -1
- package/dist/_ContentNegotiation.d.ts.map +1 -0
- package/dist/{ContentNegotiation.js → _ContentNegotiation.js} +1 -1
- 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 → _Development.js} +6 -9
- package/dist/_Development.js.map +1 -0
- package/dist/{Docker.d.ts → _Docker.d.ts} +2 -2
- package/dist/_Docker.d.ts.map +1 -0
- package/dist/{Docker.js → _Docker.js} +1 -1
- package/dist/_Docker.js.map +1 -0
- package/dist/{Effectify.d.ts → _Effectify.d.ts} +1 -1
- package/dist/_Effectify.d.ts.map +1 -0
- package/dist/{Effectify.js → _Effectify.js} +1 -1
- package/dist/_Effectify.js.map +1 -0
- package/dist/{Http.d.ts → _Http.d.ts} +1 -8
- package/dist/_Http.d.ts.map +1 -0
- package/dist/{Http.js → _Http.js} +1 -17
- package/dist/_Http.js.map +1 -0
- package/dist/{PathPattern.d.ts → _PathPattern.d.ts} +12 -1
- package/dist/_PathPattern.d.ts.map +1 -0
- package/dist/{PathPattern.js → _PathPattern.js} +86 -1
- 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 → _SchemaExtra.js} +4 -4
- package/dist/_SchemaExtra.js.map +1 -0
- package/dist/{StartApp.d.ts → _StartApp.d.ts} +1 -1
- package/dist/_StartApp.d.ts.map +1 -0
- package/dist/{StartApp.js → _StartApp.js} +1 -1
- package/dist/_StartApp.js.map +1 -0
- package/dist/{StreamExtra.d.ts → _StreamExtra.d.ts} +5 -5
- package/dist/_StreamExtra.d.ts.map +1 -0
- package/dist/{StreamExtra.js → _StreamExtra.js} +1 -1
- package/dist/_StreamExtra.js.map +1 -0
- package/dist/{Values.d.ts → _Values.d.ts} +3 -3
- package/dist/_Values.d.ts.map +1 -0
- package/dist/{Values.js → _Values.js} +1 -1
- package/dist/_Values.js.map +1 -0
- package/dist/bun/BunBundle.d.ts +2 -2
- package/dist/bun/BunBundle.d.ts.map +1 -1
- package/dist/bun/BunBundle.js.map +1 -1
- package/dist/bun/BunChildProcessSpawner.d.ts +1 -1
- package/dist/bun/BunChildProcessSpawner.d.ts.map +1 -1
- package/dist/bun/BunChildProcessSpawner.js +9 -9
- package/dist/bun/BunChildProcessSpawner.js.map +1 -1
- package/dist/bun/BunImportTrackerPlugin.d.ts +2 -2
- package/dist/bun/BunImportTrackerPlugin.d.ts.map +1 -1
- package/dist/bun/BunImportTrackerPlugin.js.map +1 -1
- package/dist/bun/BunRoute.d.ts +1 -1
- package/dist/bun/BunRoute.d.ts.map +1 -1
- package/dist/bun/BunRoute.js +6 -7
- package/dist/bun/BunRoute.js.map +1 -1
- package/dist/bun/BunRuntime.js.map +1 -1
- package/dist/bun/BunServer.d.ts +5 -5
- package/dist/bun/BunServer.d.ts.map +1 -1
- package/dist/bun/BunServer.js +3 -3
- package/dist/bun/BunServer.js.map +1 -1
- package/dist/bun/BunVirtualFilesPlugin.js.map +1 -1
- package/dist/bun/_BunEnhancedResolve.d.ts.map +1 -1
- package/dist/bun/_BunEnhancedResolve.js.map +1 -1
- package/dist/bun/_empty.html +0 -0
- package/dist/bundler/Bundle.d.ts +2 -2
- package/dist/bundler/Bundle.d.ts.map +1 -1
- package/dist/bundler/Bundle.js.map +1 -1
- package/dist/bundler/BundleFiles.d.ts +1 -1
- package/dist/bundler/BundleFiles.d.ts.map +1 -1
- package/dist/bundler/BundleFiles.js.map +1 -1
- package/dist/bundler/BundleRoute.d.ts +6 -5
- package/dist/bundler/BundleRoute.d.ts.map +1 -1
- package/dist/bundler/BundleRoute.js +2 -2
- package/dist/bundler/BundleRoute.js.map +1 -1
- 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.js.map +1 -1
- package/dist/client/ScrollState.js.map +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/datastar/actions/fetch.js.map +1 -1
- package/dist/datastar/actions/peek.js.map +1 -1
- package/dist/datastar/actions/setAll.js.map +1 -1
- package/dist/datastar/actions/toggleAll.js.map +1 -1
- package/dist/datastar/attributes/attr.js.map +1 -1
- package/dist/datastar/attributes/bind.js.map +1 -1
- package/dist/datastar/attributes/class.js.map +1 -1
- package/dist/datastar/attributes/computed.js.map +1 -1
- package/dist/datastar/attributes/indicator.js.map +1 -1
- package/dist/datastar/attributes/init.js.map +1 -1
- package/dist/datastar/attributes/jsonSignals.js.map +1 -1
- package/dist/datastar/attributes/on.js.map +1 -1
- package/dist/datastar/attributes/onIntersect.js.map +1 -1
- package/dist/datastar/attributes/onInterval.js.map +1 -1
- package/dist/datastar/attributes/onSignalPatch.js.map +1 -1
- package/dist/datastar/attributes/ref.js.map +1 -1
- package/dist/datastar/attributes/show.js.map +1 -1
- package/dist/datastar/attributes/signals.js.map +1 -1
- package/dist/datastar/attributes/style.js.map +1 -1
- package/dist/datastar/attributes/text.js.map +1 -1
- package/dist/datastar/engine.d.ts +5 -5
- package/dist/datastar/engine.d.ts.map +1 -1
- package/dist/datastar/engine.js.map +1 -1
- package/dist/datastar/utils.d.ts +1 -1
- package/dist/datastar/utils.d.ts.map +1 -1
- package/dist/datastar/utils.js.map +1 -1
- package/dist/datastar/watchers/patchElements.js +3 -1
- package/dist/datastar/watchers/patchElements.js.map +1 -1
- package/dist/datastar/watchers/patchSignals.js.map +1 -1
- package/dist/experimental/EncryptedCookies.d.ts +4 -4
- package/dist/experimental/EncryptedCookies.d.ts.map +1 -1
- package/dist/experimental/EncryptedCookies.js.map +1 -1
- package/dist/hyper/Hyper.js.map +1 -1
- package/dist/hyper/HyperHtml.js.map +1 -1
- package/dist/hyper/HyperHtml.test.js.map +1 -1
- package/dist/hyper/HyperNode.d.ts +1 -2
- package/dist/hyper/HyperNode.d.ts.map +1 -1
- package/dist/hyper/HyperNode.js +1 -1
- package/dist/hyper/HyperNode.js.map +1 -1
- package/dist/hyper/HyperRoute.js.map +1 -1
- package/dist/hyper/HyperRoute.test.js +11 -13
- package/dist/hyper/HyperRoute.test.js.map +1 -1
- package/dist/hyper/html.d.ts +5 -4
- package/dist/hyper/html.d.ts.map +1 -1
- package/dist/hyper/html.js.map +1 -1
- package/dist/hyper/jsx-runtime.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lint/plugin.d.ts +18 -15
- package/dist/lint/plugin.d.ts.map +1 -1
- package/dist/lint/plugin.js +76 -80
- package/dist/lint/plugin.js.map +1 -1
- package/dist/node/NodeFileSystem.d.ts +3 -3
- package/dist/node/NodeFileSystem.d.ts.map +1 -1
- package/dist/node/NodeFileSystem.js +8 -7
- package/dist/node/NodeFileSystem.js.map +1 -1
- package/dist/node/NodeUtils.d.ts.map +1 -1
- package/dist/node/NodeUtils.js.map +1 -1
- package/dist/sql/SqlCache.d.ts +1 -0
- package/dist/sql/SqlCache.d.ts.map +1 -1
- package/dist/sql/SqlCache.js +5 -1
- package/dist/sql/SqlCache.js.map +1 -1
- package/dist/sql/SqlClient.js +1 -1
- package/dist/sql/SqlClient.js.map +1 -1
- package/dist/{SqlIntrospect.d.ts → sql/SqlIntrospect.d.ts} +3 -3
- package/dist/sql/SqlIntrospect.d.ts.map +1 -0
- package/dist/{SqlIntrospect.js → sql/SqlIntrospect.js} +1 -1
- package/dist/sql/SqlIntrospect.js.map +1 -0
- package/dist/sql/bun/index.d.ts +3 -3
- package/dist/sql/bun/index.d.ts.map +1 -1
- package/dist/sql/bun/index.js +1 -1
- package/dist/sql/bun/index.js.map +1 -1
- package/dist/sql/index.d.ts +1 -0
- package/dist/sql/index.d.ts.map +1 -1
- package/dist/sql/index.js +1 -0
- package/dist/sql/index.js.map +1 -1
- package/dist/sql/libsql/index.d.ts +1 -1
- package/dist/sql/libsql/index.d.ts.map +1 -1
- package/dist/sql/libsql/index.js +2 -2
- package/dist/sql/libsql/index.js.map +1 -1
- package/dist/sql/mssql/index.d.ts +3 -3
- package/dist/sql/mssql/index.d.ts.map +1 -1
- package/dist/sql/mssql/index.js +1 -1
- package/dist/sql/mssql/index.js.map +1 -1
- package/dist/sql/postgres/index.d.ts +1 -1
- package/dist/sql/postgres/index.d.ts.map +1 -1
- package/dist/sql/postgres/index.js.map +1 -1
- package/dist/studio/Simulation.d.ts.map +1 -0
- package/dist/studio/Simulation.js.map +1 -0
- package/dist/{tower/Tower.d.ts → studio/Studio.d.ts} +4 -4
- 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/{tower/TowerErrors.js → studio/StudioErrors.js} +6 -6
- package/dist/studio/StudioErrors.js.map +1 -0
- package/dist/{tower/TowerLogger.d.ts → studio/StudioLogger.d.ts} +1 -1
- package/dist/studio/StudioLogger.d.ts.map +1 -0
- package/dist/{tower/TowerLogger.js → studio/StudioLogger.js} +7 -7
- 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/{tower/TowerMetrics.js → studio/StudioMetrics.js} +3 -3
- 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/{tower/TowerProcess.js → studio/StudioProcess.js} +3 -3
- package/dist/studio/StudioProcess.js.map +1 -0
- package/dist/{tower/TowerStore.d.ts → studio/StudioStore.d.ts} +33 -33
- package/dist/studio/StudioStore.d.ts.map +1 -0
- package/dist/{tower/TowerStore.js → studio/StudioStore.js} +5 -5
- 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/{tower/TowerTracer.js → studio/StudioTracer.js} +21 -21
- 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/{tower → studio}/routes/errors/route.d.ts +1 -1
- package/dist/{tower/routes/metrics → studio/routes/errors}/route.d.ts.map +1 -1
- package/dist/{tower → studio}/routes/errors/route.js +5 -9
- package/dist/studio/routes/errors/route.js.map +1 -0
- package/dist/{tower → studio}/routes/fiberDetail.d.ts +1 -1
- package/dist/studio/routes/fiberDetail.d.ts.map +1 -0
- package/dist/{tower → studio}/routes/fiberDetail.js +7 -7
- package/dist/studio/routes/fiberDetail.js.map +1 -0
- package/dist/{tower/routes/traces → studio/routes/fibers}/route.d.ts +1 -1
- 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.map +1 -0
- package/{src/tower → dist/studio}/routes/layout.html +1 -1
- package/dist/studio/routes/layout.js.map +1 -0
- package/dist/{tower → studio}/routes/logs/route.d.ts +1 -1
- 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/{tower → studio}/routes/metrics/route.d.ts +1 -1
- package/dist/studio/routes/metrics/route.d.ts.map +1 -0
- package/dist/{tower → studio}/routes/metrics/route.js +3 -5
- package/dist/studio/routes/metrics/route.js.map +1 -0
- package/dist/{tower → studio}/routes/route.d.ts +1 -1
- 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/{tower → studio}/routes/routes/route.d.ts +1 -1
- package/dist/studio/routes/routes/route.d.ts.map +1 -0
- package/dist/{tower → studio}/routes/routes/route.js +2 -4
- package/dist/studio/routes/routes/route.js.map +1 -0
- package/dist/{tower → studio}/routes/services/route.d.ts +1 -1
- 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/{tower → studio}/routes/system/route.d.ts +1 -1
- 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/{tower → studio}/routes/traceDetail.d.ts +1 -1
- package/dist/studio/routes/traceDetail.d.ts.map +1 -0
- package/dist/{tower → studio}/routes/traceDetail.js +4 -4
- package/dist/studio/routes/traceDetail.js.map +1 -0
- package/dist/{tower/routes/fibers → studio/routes/traces}/route.d.ts +1 -1
- 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/{tower → studio}/routes/tree.d.ts +46 -46
- package/dist/studio/routes/tree.d.ts.map +1 -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/{tower → studio}/ui/Fibers.d.ts +5 -5
- 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/{tower → studio}/ui/Logs.js +2 -3
- 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/{tower → studio}/ui/Metrics.js +4 -11
- package/dist/studio/ui/Metrics.js.map +1 -0
- package/dist/studio/ui/Routes.d.ts.map +1 -0
- package/dist/{tower → studio}/ui/Routes.js +4 -12
- package/dist/studio/ui/Routes.js.map +1 -0
- package/dist/studio/ui/Services.d.ts.map +1 -0
- package/dist/{tower → studio}/ui/Services.js +2 -9
- package/dist/studio/ui/Services.js.map +1 -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.js.map +1 -1
- package/dist/testing/utils.d.ts +3 -1
- package/dist/testing/utils.d.ts.map +1 -1
- package/dist/testing/utils.js +39 -0
- package/dist/testing/utils.js.map +1 -1
- package/dist/x/cloudflare/CloudflareTunnel.d.ts +8 -7
- package/dist/x/cloudflare/CloudflareTunnel.d.ts.map +1 -1
- package/dist/x/cloudflare/CloudflareTunnel.js.map +1 -1
- package/dist/x/tailscale/TailscaleTunnel.d.ts +9 -9
- package/dist/x/tailscale/TailscaleTunnel.d.ts.map +1 -1
- package/dist/x/tailscale/TailscaleTunnel.js +3 -4
- package/dist/x/tailscale/TailscaleTunnel.js.map +1 -1
- package/dist/x/tailwind/TailwindPlugin.d.ts +5 -5
- package/dist/x/tailwind/TailwindPlugin.d.ts.map +1 -1
- package/dist/x/tailwind/TailwindPlugin.js.map +1 -1
- package/dist/x/tailwind/compile.js.map +1 -1
- package/dist/x/tailwind/plugin.js.map +1 -1
- package/package.json +42 -60
- 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 +43 -63
- package/src/GlobalLayer.ts +1 -1
- package/src/Route.ts +2 -2
- package/src/RouteBody.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 +39 -47
- package/src/System.ts +40 -64
- package/src/{ChildProcess.ts → _ChildProcess.ts} +13 -22
- package/src/{Development.ts → _Development.ts} +16 -21
- package/src/{Docker.ts → _Docker.ts} +1 -1
- 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 +9 -9
- package/src/bun/BunRoute.ts +5 -8
- package/src/bun/BunServer.ts +3 -3
- 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 +4 -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 +86 -97
- package/src/node/NodeFileSystem.ts +15 -14
- package/src/sql/SqlCache.ts +14 -1
- package/src/sql/SqlClient.ts +1 -1
- package/src/{SqlIntrospect.ts → sql/SqlIntrospect.ts} +1 -1
- package/src/sql/bun/index.ts +1 -1
- package/src/sql/index.ts +1 -0
- package/src/sql/libsql/index.ts +1 -1
- package/src/sql/mssql/index.ts +1 -1
- package/src/studio/Studio.ts +47 -0
- package/src/{tower/TowerErrors.ts → studio/StudioErrors.ts} +13 -13
- package/src/{tower/TowerLogger.ts → studio/StudioLogger.ts} +10 -10
- package/src/{tower/TowerMetrics.ts → studio/StudioMetrics.ts} +5 -5
- package/src/{tower/TowerProcess.ts → studio/StudioProcess.ts} +4 -4
- package/src/{tower/TowerStore.ts → studio/StudioStore.ts} +37 -37
- package/src/{tower/TowerTracer.ts → studio/StudioTracer.ts} +25 -25
- package/src/studio/index.ts +3 -0
- package/src/{tower → studio}/routes/errors/route.tsx +4 -4
- package/src/{tower → studio}/routes/fiberDetail.tsx +8 -8
- package/src/{tower → studio}/routes/fibers/route.tsx +10 -10
- package/src/studio/routes/layout.html +340 -0
- package/src/{tower → studio}/routes/logs/route.tsx +4 -4
- package/src/{tower → studio}/routes/metrics/route.tsx +5 -5
- package/src/studio/routes/route.tsx +8 -0
- package/src/{tower → studio}/routes/routes/route.tsx +2 -2
- package/src/{tower → studio}/routes/services/route.tsx +2 -2
- package/src/{tower → studio}/routes/system/route.tsx +5 -5
- package/src/{tower → studio}/routes/traceDetail.tsx +5 -5
- package/src/{tower → studio}/routes/traces/route.tsx +5 -5
- package/src/{tower → studio}/ui/Errors.tsx +3 -3
- package/src/{tower → studio}/ui/Fibers.tsx +7 -7
- package/src/{tower → studio}/ui/Logs.tsx +3 -3
- package/src/{tower → studio}/ui/Metrics.tsx +4 -4
- package/src/{tower → studio}/ui/Shell.tsx +1 -1
- package/src/{tower → studio}/ui/System.tsx +2 -2
- package/src/{tower → studio}/ui/Traces.tsx +16 -16
- package/src/testing/utils.ts +59 -0
- package/src/x/tailscale/TailscaleTunnel.ts +3 -4
- package/dist/ChildProcess.d.ts.map +0 -1
- package/dist/ChildProcess.js.map +0 -1
- package/dist/Commander.d.ts +0 -101
- package/dist/Commander.d.ts.map +0 -1
- package/dist/Commander.js +0 -327
- package/dist/Commander.js.map +0 -1
- package/dist/ContentNegotiation.d.ts.map +0 -1
- package/dist/ContentNegotiation.js.map +0 -1
- package/dist/Development.d.ts +0 -42
- package/dist/Development.d.ts.map +0 -1
- package/dist/Development.js.map +0 -1
- package/dist/Docker.d.ts.map +0 -1
- package/dist/Docker.js.map +0 -1
- package/dist/Effectify.d.ts.map +0 -1
- package/dist/Effectify.js.map +0 -1
- package/dist/FilePathPattern.d.ts +0 -30
- package/dist/FilePathPattern.d.ts.map +0 -1
- package/dist/FilePathPattern.js +0 -87
- package/dist/FilePathPattern.js.map +0 -1
- package/dist/Http.d.ts.map +0 -1
- package/dist/Http.js.map +0 -1
- package/dist/PathPattern.d.ts.map +0 -1
- package/dist/PathPattern.js.map +0 -1
- package/dist/PlatformError.d.ts +0 -39
- package/dist/PlatformError.d.ts.map +0 -1
- package/dist/PlatformError.js +0 -26
- package/dist/PlatformError.js.map +0 -1
- package/dist/SchemaExtra.d.ts +0 -8
- package/dist/SchemaExtra.d.ts.map +0 -1
- package/dist/SchemaExtra.js.map +0 -1
- package/dist/SqlIntrospect.d.ts.map +0 -1
- package/dist/SqlIntrospect.js.map +0 -1
- package/dist/StartApp.d.ts.map +0 -1
- package/dist/StartApp.js.map +0 -1
- package/dist/StreamExtra.d.ts.map +0 -1
- package/dist/StreamExtra.js.map +0 -1
- package/dist/TuplePathPattern.d.ts +0 -10
- package/dist/TuplePathPattern.d.ts.map +0 -1
- package/dist/TuplePathPattern.js +0 -69
- package/dist/TuplePathPattern.js.map +0 -1
- package/dist/Values.d.ts.map +0 -1
- package/dist/Values.js.map +0 -1
- package/dist/tower/Simulation.d.ts.map +0 -1
- package/dist/tower/Simulation.js.map +0 -1
- package/dist/tower/Tower.d.ts.map +0 -1
- package/dist/tower/Tower.js +0 -30
- package/dist/tower/Tower.js.map +0 -1
- package/dist/tower/TowerErrors.d.ts +0 -4
- package/dist/tower/TowerErrors.d.ts.map +0 -1
- package/dist/tower/TowerErrors.js.map +0 -1
- package/dist/tower/TowerLogger.d.ts.map +0 -1
- package/dist/tower/TowerLogger.js.map +0 -1
- package/dist/tower/TowerMetrics.d.ts +0 -4
- package/dist/tower/TowerMetrics.d.ts.map +0 -1
- package/dist/tower/TowerMetrics.js.map +0 -1
- package/dist/tower/TowerProcess.d.ts +0 -4
- package/dist/tower/TowerProcess.d.ts.map +0 -1
- package/dist/tower/TowerProcess.js.map +0 -1
- package/dist/tower/TowerStore.d.ts.map +0 -1
- package/dist/tower/TowerStore.js.map +0 -1
- package/dist/tower/TowerTracer.d.ts +0 -4
- package/dist/tower/TowerTracer.d.ts.map +0 -1
- package/dist/tower/TowerTracer.js.map +0 -1
- package/dist/tower/index.d.ts +0 -4
- package/dist/tower/index.d.ts.map +0 -1
- package/dist/tower/index.js +0 -4
- package/dist/tower/index.js.map +0 -1
- package/dist/tower/routes/errors/route.d.ts.map +0 -1
- package/dist/tower/routes/errors/route.js.map +0 -1
- package/dist/tower/routes/fiberDetail.d.ts.map +0 -1
- package/dist/tower/routes/fiberDetail.js.map +0 -1
- package/dist/tower/routes/fibers/route.d.ts.map +0 -1
- package/dist/tower/routes/fibers/route.js +0 -27
- package/dist/tower/routes/fibers/route.js.map +0 -1
- package/dist/tower/routes/layout.d.ts.map +0 -1
- package/dist/tower/routes/layout.js.map +0 -1
- package/dist/tower/routes/logs/route.d.ts.map +0 -1
- package/dist/tower/routes/logs/route.js +0 -36
- package/dist/tower/routes/logs/route.js.map +0 -1
- package/dist/tower/routes/metrics/route.js.map +0 -1
- package/dist/tower/routes/route.d.ts.map +0 -1
- package/dist/tower/routes/route.js +0 -6
- package/dist/tower/routes/route.js.map +0 -1
- package/dist/tower/routes/routes/route.d.ts.map +0 -1
- package/dist/tower/routes/routes/route.js.map +0 -1
- package/dist/tower/routes/services/route.d.ts.map +0 -1
- package/dist/tower/routes/services/route.js +0 -15
- package/dist/tower/routes/services/route.js.map +0 -1
- package/dist/tower/routes/system/route.d.ts.map +0 -1
- package/dist/tower/routes/system/route.js +0 -21
- package/dist/tower/routes/system/route.js.map +0 -1
- package/dist/tower/routes/traceDetail.d.ts.map +0 -1
- package/dist/tower/routes/traceDetail.js.map +0 -1
- package/dist/tower/routes/traces/route.d.ts.map +0 -1
- package/dist/tower/routes/traces/route.js +0 -36
- package/dist/tower/routes/traces/route.js.map +0 -1
- package/dist/tower/routes/tree.d.ts.map +0 -1
- package/dist/tower/routes/tree.js.map +0 -1
- package/dist/tower/ui/Errors.d.ts +0 -5
- package/dist/tower/ui/Errors.d.ts.map +0 -1
- package/dist/tower/ui/Errors.js +0 -30
- package/dist/tower/ui/Errors.js.map +0 -1
- package/dist/tower/ui/Fibers.d.ts.map +0 -1
- package/dist/tower/ui/Fibers.js +0 -157
- package/dist/tower/ui/Fibers.js.map +0 -1
- package/dist/tower/ui/Logs.d.ts +0 -5
- package/dist/tower/ui/Logs.d.ts.map +0 -1
- package/dist/tower/ui/Logs.js.map +0 -1
- package/dist/tower/ui/Metrics.d.ts +0 -5
- package/dist/tower/ui/Metrics.d.ts.map +0 -1
- package/dist/tower/ui/Metrics.js.map +0 -1
- package/dist/tower/ui/Routes.d.ts.map +0 -1
- package/dist/tower/ui/Routes.js.map +0 -1
- package/dist/tower/ui/Services.d.ts.map +0 -1
- package/dist/tower/ui/Services.js.map +0 -1
- package/dist/tower/ui/Shell.d.ts.map +0 -1
- package/dist/tower/ui/Shell.js +0 -12
- package/dist/tower/ui/Shell.js.map +0 -1
- package/dist/tower/ui/System.d.ts +0 -5
- package/dist/tower/ui/System.d.ts.map +0 -1
- package/dist/tower/ui/System.js +0 -65
- package/dist/tower/ui/System.js.map +0 -1
- package/dist/tower/ui/Traces.d.ts +0 -13
- package/dist/tower/ui/Traces.d.ts.map +0 -1
- package/dist/tower/ui/Traces.js +0 -219
- package/dist/tower/ui/Traces.js.map +0 -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/tower/Tower.ts +0 -47
- package/src/tower/index.ts +0 -3
- package/src/tower/routes/route.tsx +0 -8
- /package/dist/{tower → studio}/Simulation.d.ts +0 -0
- /package/dist/{tower → studio}/Simulation.js +0 -0
- /package/dist/{tower → studio}/routes/layout.d.ts +0 -0
- /package/dist/{tower → studio}/routes/layout.js +0 -0
- /package/dist/{tower → studio}/routes/tree.js +0 -0
- /package/dist/{tower → studio}/ui/Routes.d.ts +0 -0
- /package/dist/{tower → studio}/ui/Services.d.ts +0 -0
- /package/dist/{tower → studio}/ui/Shell.d.ts +0 -0
- /package/src/{ContentNegotiation.ts → _ContentNegotiation.ts} +0 -0
- /package/src/{Effectify.ts → _Effectify.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/{tower → studio}/Simulation.ts +0 -0
- /package/src/{tower → studio}/routes/layout.tsx +0 -0
- /package/src/{tower → studio}/routes/tree.ts +0 -0
- /package/src/{tower → studio}/ui/Routes.tsx +0 -0
- /package/src/{tower → studio}/ui/Services.tsx +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,58 +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(node, `import ${typePrefix}* as ${baseName} from "${source}"`),
|
|
67
|
-
]
|
|
68
|
-
|
|
69
|
-
for (const specifier of node.specifiers) {
|
|
70
|
-
if (specifier.type !== "ImportSpecifier") continue
|
|
71
|
-
const localName = specifier.local.name
|
|
72
|
-
const importedName = specifier.imported.name
|
|
73
|
-
|
|
74
|
-
for (const variable of sourceCode.getDeclaredVariables(specifier)) {
|
|
75
|
-
for (const ref of variable.references) {
|
|
76
|
-
if (ref.identifier.range[0] === specifier.local.range[0]) continue
|
|
77
|
-
fixes.push(
|
|
78
|
-
fixer.replaceTextRange(
|
|
79
|
-
ref.identifier.range,
|
|
80
|
-
localName !== importedName
|
|
81
|
-
? `${baseName}.${importedName}`
|
|
82
|
-
: `${baseName}.${localName}`,
|
|
83
|
-
),
|
|
84
|
-
)
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return fixes
|
|
90
|
-
},
|
|
65
|
+
data: { source, baseName },
|
|
91
66
|
})
|
|
92
67
|
},
|
|
93
68
|
}
|
|
@@ -339,75 +314,85 @@ export default {
|
|
|
339
314
|
},
|
|
340
315
|
},
|
|
341
316
|
|
|
342
|
-
"
|
|
317
|
+
"test-effects": {
|
|
343
318
|
meta: {
|
|
344
319
|
type: "suggestion",
|
|
345
320
|
docs: {
|
|
346
321
|
description:
|
|
347
|
-
"
|
|
322
|
+
"Disallow await Effect.runPromise(...) in test callbacks. Use Effect.gen(...).pipe(Effect.runPromise) as the return value instead.",
|
|
348
323
|
},
|
|
349
|
-
fixable: "code",
|
|
350
324
|
schema: [],
|
|
351
325
|
messages: {
|
|
352
|
-
|
|
353
|
-
|
|
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.",
|
|
354
329
|
},
|
|
355
330
|
},
|
|
356
331
|
create(context) {
|
|
357
|
-
const
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
for (const spec of node.specifiers) {
|
|
362
|
-
importNames.add(spec.local.name)
|
|
363
|
-
}
|
|
332
|
+
const filename = context.filename || context.getFilename()
|
|
333
|
+
if (!filename.endsWith(".test.ts") && !filename.endsWith(".test.tsx")) {
|
|
334
|
+
return {}
|
|
335
|
+
}
|
|
364
336
|
|
|
365
|
-
|
|
366
|
-
|
|
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
|
+
}
|
|
367
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]
|
|
368
357
|
if (
|
|
369
|
-
|
|
370
|
-
|
|
358
|
+
(ancestor.type === "ArrowFunctionExpression" ||
|
|
359
|
+
ancestor.type === "FunctionExpression") &&
|
|
360
|
+
ancestor.async
|
|
371
361
|
) {
|
|
372
|
-
return
|
|
362
|
+
return isTestCallback(ancestor) ? ancestor : undefined
|
|
373
363
|
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
374
366
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
fixes.push(fixer.replaceTextRange(ref.identifier.range, baseName))
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
return fixes
|
|
409
|
-
},
|
|
410
|
-
})
|
|
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
|
+
}
|
|
411
396
|
},
|
|
412
397
|
}
|
|
413
398
|
},
|
|
@@ -610,6 +595,9 @@ function getBaseName(source) {
|
|
|
610
595
|
// Strip file extension (.ts, .tsx, .js, .jsx, .mjs, .cjs)
|
|
611
596
|
last = last.replace(/\.(ts|tsx|js|jsx|mjs|cjs)$/, "")
|
|
612
597
|
|
|
598
|
+
// Strip leading underscores (private module convention)
|
|
599
|
+
last = last.replace(/^_+/, "")
|
|
600
|
+
|
|
613
601
|
return last
|
|
614
602
|
}
|
|
615
603
|
|
|
@@ -618,6 +606,7 @@ function isLocalImport(source) {
|
|
|
618
606
|
}
|
|
619
607
|
|
|
620
608
|
function isCapitalized(name) {
|
|
609
|
+
if (name.length > 0 && name[0] === "_") return isCapitalized(name.slice(1))
|
|
621
610
|
return name.length > 0 && name[0] >= "A" && name[0] <= "Z"
|
|
622
611
|
}
|
|
623
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,
|
package/src/sql/SqlCache.ts
CHANGED
|
@@ -9,10 +9,23 @@ type SqlCacheInstance = Cache.Cache<string, ReadonlyArray<any>>
|
|
|
9
9
|
|
|
10
10
|
export class SqlCache extends Context.Tag("effect-start/SqlCache")<SqlCache, SqlCacheInstance>() {}
|
|
11
11
|
|
|
12
|
+
export function layer(cache: SqlCacheInstance): Layer.Layer<SqlCache>
|
|
12
13
|
export function layer(options: {
|
|
13
14
|
readonly capacity: number
|
|
14
15
|
readonly timeToLive: Duration.DurationInput
|
|
15
|
-
}): Layer.Layer<SqlCache>
|
|
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
|
+
}
|
|
16
29
|
return Layer.effect(
|
|
17
30
|
SqlCache,
|
|
18
31
|
Cache.make<string, ReadonlyArray<any>>({
|
package/src/sql/SqlClient.ts
CHANGED
|
@@ -6,7 +6,7 @@ import * as Exit from "effect/Exit"
|
|
|
6
6
|
import * as FiberRef from "effect/FiberRef"
|
|
7
7
|
import * as GlobalValue from "effect/GlobalValue"
|
|
8
8
|
import type * as Scope from "effect/Scope"
|
|
9
|
-
import * as Values from "../
|
|
9
|
+
import * as Values from "../_Values.ts"
|
|
10
10
|
|
|
11
11
|
export class SqlError extends Data.TaggedError("SqlError")<{
|
|
12
12
|
readonly code: string
|
package/src/sql/bun/index.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as GlobalValue from "effect/GlobalValue"
|
|
|
5
5
|
import * as Layer from "effect/Layer"
|
|
6
6
|
import * as Option from "effect/Option"
|
|
7
7
|
import * as SqlClient from "../SqlClient.ts"
|
|
8
|
-
import * as Values from "../../
|
|
8
|
+
import * as Values from "../../_Values.ts"
|
|
9
9
|
|
|
10
10
|
const errorCode = (error: unknown): string => {
|
|
11
11
|
const e = error as any
|
package/src/sql/index.ts
CHANGED
package/src/sql/libsql/index.ts
CHANGED
|
@@ -7,7 +7,7 @@ import * as Layer from "effect/Layer"
|
|
|
7
7
|
import * as Option from "effect/Option"
|
|
8
8
|
import type * as Libsql from "@libsql/client"
|
|
9
9
|
import * as SqlClient from "../SqlClient.ts"
|
|
10
|
-
import * as Values from "../../
|
|
10
|
+
import * as Values from "../../_Values.ts"
|
|
11
11
|
|
|
12
12
|
type ConfigOrValue<T> = T | Config.Config<T>
|
|
13
13
|
|
package/src/sql/mssql/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ import * as Layer from "effect/Layer"
|
|
|
6
6
|
import * as Option from "effect/Option"
|
|
7
7
|
import * as Mssql from "mssql"
|
|
8
8
|
import * as SqlClient from "../SqlClient.ts"
|
|
9
|
-
import * as Values from "../../
|
|
9
|
+
import * as Values from "../../_Values.ts"
|
|
10
10
|
|
|
11
11
|
const wrapError = (error: unknown): SqlClient.SqlError =>
|
|
12
12
|
new SqlClient.SqlError({
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect"
|
|
2
|
+
import * as Layer from "effect/Layer"
|
|
3
|
+
import * as Route from "../Route.ts"
|
|
4
|
+
import * as RouteTree from "../RouteTree.ts"
|
|
5
|
+
import * as sqlBun from "../sql/bun/index.ts"
|
|
6
|
+
import type * as SqlClient from "../sql/SqlClient.ts"
|
|
7
|
+
import * as StudioErrors from "./StudioErrors.ts"
|
|
8
|
+
import * as StudioLogger from "./StudioLogger.ts"
|
|
9
|
+
import * as StudioMetrics from "./StudioMetrics.ts"
|
|
10
|
+
import * as StudioProcess from "./StudioProcess.ts"
|
|
11
|
+
import * as StudioStore from "./StudioStore.ts"
|
|
12
|
+
import * as StudioTracer from "./StudioTracer.ts"
|
|
13
|
+
import consoleRoutes from "./routes/tree.ts"
|
|
14
|
+
|
|
15
|
+
export function layer(
|
|
16
|
+
options?: StudioStore.StudioStoreOptions & {
|
|
17
|
+
readonly sqlLayer?: Layer.Layer<SqlClient.SqlClient, SqlClient.SqlError>
|
|
18
|
+
},
|
|
19
|
+
): Layer.Layer<StudioStore.StudioStore> {
|
|
20
|
+
const sqlLayer =
|
|
21
|
+
options?.sqlLayer ?? sqlBun.layer({ adapter: "sqlite" as const, filename: ":memory:" })
|
|
22
|
+
const store = StudioStore.layer(options).pipe(Layer.provide(sqlLayer), Layer.orDie)
|
|
23
|
+
const features = Layer.mergeAll(
|
|
24
|
+
StudioTracer.layer,
|
|
25
|
+
StudioLogger.layer,
|
|
26
|
+
StudioMetrics.layer,
|
|
27
|
+
StudioErrors.layer,
|
|
28
|
+
StudioProcess.layer,
|
|
29
|
+
).pipe(Layer.provide(store))
|
|
30
|
+
return Layer.merge(store, features)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function layerRoutes(options?: { prefix?: string }) {
|
|
34
|
+
const prefix = options?.prefix ?? "/studio"
|
|
35
|
+
|
|
36
|
+
return Layer.effect(
|
|
37
|
+
Route.Routes,
|
|
38
|
+
Effect.gen(function* () {
|
|
39
|
+
const existing = yield* Route.Routes
|
|
40
|
+
StudioStore.store.prefix = prefix
|
|
41
|
+
const tree = Route.tree({
|
|
42
|
+
[prefix as "/"]: consoleRoutes,
|
|
43
|
+
})
|
|
44
|
+
return RouteTree.merge(existing, tree)
|
|
45
|
+
}),
|
|
46
|
+
)
|
|
47
|
+
}
|
|
@@ -11,7 +11,7 @@ import * as PubSub from "effect/PubSub"
|
|
|
11
11
|
import type * as Context from "effect/Context"
|
|
12
12
|
import type * as Fiber from "effect/Fiber"
|
|
13
13
|
import * as Supervisor from "effect/Supervisor"
|
|
14
|
-
import * as
|
|
14
|
+
import * as StudioStore from "./StudioStore.ts"
|
|
15
15
|
|
|
16
16
|
function safeSerialize(value: unknown, depth = 0): unknown {
|
|
17
17
|
if (depth > 4) return "<deep>"
|
|
@@ -122,8 +122,8 @@ function extractSpanName(error: unknown): string | undefined {
|
|
|
122
122
|
return undefined
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
function extractDetails(cause: Cause.Cause<unknown>): Array<
|
|
126
|
-
const details: Array<
|
|
125
|
+
function extractDetails(cause: Cause.Cause<unknown>): Array<StudioStore.StudioErrorDetail> {
|
|
126
|
+
const details: Array<StudioStore.StudioErrorDetail> = []
|
|
127
127
|
|
|
128
128
|
const failures = Chunk.toArray(Cause.failures(cause))
|
|
129
129
|
for (const error of failures) {
|
|
@@ -150,7 +150,7 @@ function extractDetails(cause: Cause.Cause<unknown>): Array<TowerStore.TowerErro
|
|
|
150
150
|
return details
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
function make(store:
|
|
153
|
+
function make(store: StudioStore.StudioStoreShape): Supervisor.Supervisor<void> {
|
|
154
154
|
return new (class extends Supervisor.AbstractSupervisor<void> {
|
|
155
155
|
value = Effect.void
|
|
156
156
|
|
|
@@ -183,8 +183,8 @@ function make(store: TowerStore.TowerStoreShape): Supervisor.Supervisor<void> {
|
|
|
183
183
|
annotations[key] = value
|
|
184
184
|
})
|
|
185
185
|
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
StudioStore.runWrite(
|
|
187
|
+
StudioStore.upsertFiber(
|
|
188
188
|
store.sql,
|
|
189
189
|
childId,
|
|
190
190
|
parentId !== childId ? parentId : undefined,
|
|
@@ -197,17 +197,17 @@ function make(store: TowerStore.TowerStoreShape): Supervisor.Supervisor<void> {
|
|
|
197
197
|
|
|
198
198
|
onEnd<A, E>(exit: Exit.Exit<A, E>, fiber: Fiber.RuntimeFiber<A, E>) {
|
|
199
199
|
if (Exit.isFailure(exit) && !Cause.isInterruptedOnly(exit.cause)) {
|
|
200
|
-
const error:
|
|
201
|
-
id:
|
|
200
|
+
const error: StudioStore.StudioError = {
|
|
201
|
+
id: StudioStore.nextErrorId(),
|
|
202
202
|
fiberId: FiberId.threadName(fiber.id()),
|
|
203
203
|
interrupted: Cause.isInterrupted(exit.cause),
|
|
204
204
|
prettyPrint: Cause.pretty(exit.cause, { renderErrorCause: true }),
|
|
205
205
|
details: extractDetails(exit.cause),
|
|
206
206
|
}
|
|
207
|
-
|
|
207
|
+
StudioStore.runWrite(
|
|
208
208
|
Effect.zipRight(
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
StudioStore.insertError(store.sql, error),
|
|
210
|
+
StudioStore.evict(store.sql, "Error", store.errorCapacity),
|
|
211
211
|
),
|
|
212
212
|
)
|
|
213
213
|
Effect.runSync(PubSub.publish(store.events, { _tag: "Error", error }))
|
|
@@ -216,9 +216,9 @@ function make(store: TowerStore.TowerStoreShape): Supervisor.Supervisor<void> {
|
|
|
216
216
|
})()
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
export const layer: Layer.Layer<never, never,
|
|
219
|
+
export const layer: Layer.Layer<never, never, StudioStore.StudioStore> = Layer.unwrapEffect(
|
|
220
220
|
Effect.gen(function* () {
|
|
221
|
-
const store = yield*
|
|
221
|
+
const store = yield* StudioStore.StudioStore
|
|
222
222
|
return Supervisor.addSupervisor(make(store))
|
|
223
223
|
}),
|
|
224
224
|
)
|
|
@@ -5,14 +5,14 @@ import * as HashMap from "effect/HashMap"
|
|
|
5
5
|
import * as List from "effect/List"
|
|
6
6
|
import * as Logger from "effect/Logger"
|
|
7
7
|
import * as PubSub from "effect/PubSub"
|
|
8
|
-
import * as
|
|
8
|
+
import * as StudioStore from "./StudioStore.ts"
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
const store =
|
|
10
|
+
const studioLogger = Logger.make((options) => {
|
|
11
|
+
const store = StudioStore.store
|
|
12
12
|
if (!store.sql) return
|
|
13
13
|
|
|
14
14
|
try {
|
|
15
|
-
const levelMap: Record<string,
|
|
15
|
+
const levelMap: Record<string, StudioStore.StudioLog["level"]> = {
|
|
16
16
|
Debug: "DEBUG",
|
|
17
17
|
Info: "INFO",
|
|
18
18
|
Warning: "WARNING",
|
|
@@ -30,8 +30,8 @@ const towerLogger = Logger.make((options) => {
|
|
|
30
30
|
ann[k] = v
|
|
31
31
|
})
|
|
32
32
|
|
|
33
|
-
const log:
|
|
34
|
-
id:
|
|
33
|
+
const log: StudioStore.StudioLog = {
|
|
34
|
+
id: StudioStore.nextLogId(),
|
|
35
35
|
level,
|
|
36
36
|
message: String(options.message),
|
|
37
37
|
fiberId: FiberId.threadName(options.fiberId),
|
|
@@ -39,14 +39,14 @@ const towerLogger = Logger.make((options) => {
|
|
|
39
39
|
spans: spanNames,
|
|
40
40
|
annotations: ann,
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
StudioStore.runWrite(
|
|
43
43
|
Effect.zipRight(
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
StudioStore.insertLog(store.sql, log),
|
|
45
|
+
StudioStore.evict(store.sql, "Log", store.logCapacity),
|
|
46
46
|
),
|
|
47
47
|
)
|
|
48
48
|
Effect.runSync(PubSub.publish(store.events, { _tag: "Log", log }))
|
|
49
49
|
} catch (_) {}
|
|
50
50
|
})
|
|
51
51
|
|
|
52
|
-
export const layer = Logger.add(
|
|
52
|
+
export const layer = Logger.add(studioLogger)
|
|
@@ -4,22 +4,22 @@ import * as Metric from "effect/Metric"
|
|
|
4
4
|
import * as MetricKeyType from "effect/MetricKeyType"
|
|
5
5
|
import * as PubSub from "effect/PubSub"
|
|
6
6
|
import * as Schedule from "effect/Schedule"
|
|
7
|
-
import * as
|
|
7
|
+
import * as StudioStore from "./StudioStore.ts"
|
|
8
8
|
|
|
9
|
-
export const layer: Layer.Layer<never, never,
|
|
9
|
+
export const layer: Layer.Layer<never, never, StudioStore.StudioStore> = Layer.scopedDiscard(
|
|
10
10
|
Effect.gen(function* () {
|
|
11
|
-
const store = yield*
|
|
11
|
+
const store = yield* StudioStore.StudioStore
|
|
12
12
|
|
|
13
13
|
yield* Effect.forkScoped(
|
|
14
14
|
Effect.schedule(
|
|
15
15
|
Effect.sync(() => {
|
|
16
16
|
const pairs = Metric.unsafeSnapshot()
|
|
17
|
-
const snapshots: Array<
|
|
17
|
+
const snapshots: Array<StudioStore.StudioMetricSnapshot> = []
|
|
18
18
|
|
|
19
19
|
for (const pair of pairs) {
|
|
20
20
|
const key = pair.metricKey
|
|
21
21
|
const state = pair.metricState as any
|
|
22
|
-
let type:
|
|
22
|
+
let type: StudioStore.StudioMetricSnapshot["type"] = "counter"
|
|
23
23
|
let value: unknown = 0
|
|
24
24
|
|
|
25
25
|
if (MetricKeyType.CounterKeyTypeTypeId in key.keyType) {
|
|
@@ -3,9 +3,9 @@ import * as Effect from "effect/Effect"
|
|
|
3
3
|
import * as Layer from "effect/Layer"
|
|
4
4
|
import * as PubSub from "effect/PubSub"
|
|
5
5
|
import * as Schedule from "effect/Schedule"
|
|
6
|
-
import * as
|
|
6
|
+
import * as StudioStore from "./StudioStore.ts"
|
|
7
7
|
|
|
8
|
-
function snapshot():
|
|
8
|
+
function snapshot(): StudioStore.ProcessStats {
|
|
9
9
|
const mem = process.memoryUsage()
|
|
10
10
|
const cpu = process.cpuUsage()
|
|
11
11
|
const res = process.resourceUsage()
|
|
@@ -41,9 +41,9 @@ function snapshot(): TowerStore.ProcessStats {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
export const layer: Layer.Layer<never, never,
|
|
44
|
+
export const layer: Layer.Layer<never, never, StudioStore.StudioStore> = Layer.scopedDiscard(
|
|
45
45
|
Effect.gen(function* () {
|
|
46
|
-
const store = yield*
|
|
46
|
+
const store = yield* StudioStore.StudioStore
|
|
47
47
|
|
|
48
48
|
yield* Effect.forkScoped(
|
|
49
49
|
Effect.schedule(
|