effect-start 0.28.0 → 0.30.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/README.md +1 -1
- 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/Development.d.ts +7 -21
- package/dist/Development.d.ts.map +1 -1
- package/dist/Development.js +6 -8
- package/dist/Development.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 +15 -4
- package/dist/Fetch.d.ts.map +1 -1
- package/dist/Fetch.js +74 -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 +38 -29
- 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 +2 -2
- package/dist/GlobalLayer.js.map +1 -1
- package/dist/Html.d.ts +32 -0
- package/dist/Html.d.ts.map +1 -0
- package/dist/{hyper/HyperHtml.js → Html.js} +45 -26
- package/dist/Html.js.map +1 -0
- package/dist/PlatformRuntime.d.ts.map +1 -1
- package/dist/PlatformRuntime.js.map +1 -1
- package/dist/Route.d.ts +22 -9
- package/dist/Route.d.ts.map +1 -1
- package/dist/Route.js +25 -4
- package/dist/Route.js.map +1 -1
- package/dist/RouteBody.d.ts +14 -7
- package/dist/RouteBody.d.ts.map +1 -1
- package/dist/RouteBody.js +38 -27
- 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 +56 -32
- 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 +2 -2
- 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/{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 +2 -2
- package/dist/bun/BunRoute.d.ts.map +1 -1
- package/dist/bun/BunRoute.js +108 -40
- 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/cloudflare/CloudflareTunnel.d.ts +12 -0
- package/dist/cloudflare/CloudflareTunnel.d.ts.map +1 -0
- package/dist/{x/cloudflare → cloudflare}/CloudflareTunnel.js +1 -1
- package/dist/cloudflare/CloudflareTunnel.js.map +1 -0
- package/dist/cloudflare/index.d.ts.map +1 -0
- package/dist/cloudflare/index.js.map +1 -0
- 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/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/jsx-runtime.d.ts +8 -0
- package/dist/jsx-runtime.d.ts.map +1 -0
- package/dist/{hyper/jsx-runtime.js → jsx-runtime.js} +2 -2
- package/dist/jsx-runtime.js.map +1 -0
- 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/routes/logs → studio/routes/errors}/route.d.ts +1 -1
- package/dist/{tower/routes/metrics → studio/routes/errors}/route.d.ts.map +1 -1
- package/dist/studio/routes/errors/route.js +42 -0
- 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 +8 -9
- 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 +24 -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/routes/errors → 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 +29 -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/studio/routes/metrics/route.js +17 -0
- package/dist/studio/routes/metrics/route.js.map +1 -0
- package/dist/{tower → studio}/routes/route.d.ts +2 -2
- 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 +3 -6
- 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 +12 -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 +18 -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/studio/routes/traceDetail.js +19 -0
- 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 +29 -0
- package/dist/studio/routes/traces/route.js.map +1 -0
- package/dist/{tower → studio}/routes/tree.d.ts +47 -47
- 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 +7 -7
- 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/{tower → studio}/ui/Routes.d.ts +1 -1
- 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/{tower → studio}/ui/Services.d.ts +1 -1
- 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/{tower → studio}/ui/Shell.d.ts +2 -2
- 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/tailscale/TailscaleTunnel.d.ts +16 -0
- package/dist/tailscale/TailscaleTunnel.d.ts.map +1 -0
- package/dist/{x/tailscale → tailscale}/TailscaleTunnel.js +4 -5
- package/dist/tailscale/TailscaleTunnel.js.map +1 -0
- package/dist/tailscale/index.d.ts.map +1 -0
- package/dist/tailscale/index.js.map +1 -0
- package/dist/{x/tailwind → tailwind}/TailwindPlugin.d.ts +5 -5
- package/dist/tailwind/TailwindPlugin.d.ts.map +1 -0
- package/dist/tailwind/TailwindPlugin.js.map +1 -0
- package/dist/tailwind/compile.d.ts.map +1 -0
- package/dist/{x/tailwind → tailwind}/compile.js +1 -1
- package/dist/tailwind/compile.js.map +1 -0
- package/dist/tailwind/index.d.ts +3 -0
- package/dist/tailwind/index.d.ts.map +1 -0
- package/dist/tailwind/index.js +3 -0
- package/dist/tailwind/index.js.map +1 -0
- package/dist/tailwind/plugin.d.ts.map +1 -0
- package/dist/{x/tailwind → tailwind}/plugin.js +1 -1
- package/dist/{x/tailwind → tailwind}/plugin.js.map +1 -1
- 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/package.json +53 -71
- package/src/Cookies.ts +4 -8
- package/src/Development.ts +21 -21
- package/src/Entity.ts +24 -19
- package/src/Fetch.ts +101 -5
- package/src/FileRouter.ts +45 -48
- package/src/FileRouterCodegen.ts +9 -23
- package/src/FileSystem.ts +43 -63
- package/src/GlobalLayer.ts +4 -2
- package/src/{hyper/HyperHtml.ts → Html.ts} +90 -30
- package/src/Route.ts +69 -13
- package/src/RouteBody.ts +88 -63
- package/src/RouteHttp.ts +152 -114
- package/src/RouteMount.ts +4 -4
- 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 +41 -65
- package/src/{ChildProcess.ts → _ChildProcess.ts} +14 -23
- 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 +130 -45
- package/src/bun/BunServer.ts +4 -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/{x/cloudflare → cloudflare}/CloudflareTunnel.ts +1 -1
- package/src/datastar/watchers/patchElements.ts +4 -2
- package/src/index.ts +2 -0
- package/src/jsx-runtime.ts +15 -0
- package/src/{hyper/jsx.d.ts → jsx.d.ts} +3 -3
- 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 +7 -8
- package/src/{tower → studio}/routes/fiberDetail.tsx +9 -10
- package/src/{tower → studio}/routes/fibers/route.tsx +13 -14
- package/src/studio/routes/layout.html +340 -0
- package/src/{tower → studio}/routes/logs/route.tsx +7 -8
- package/src/{tower → studio}/routes/metrics/route.tsx +8 -9
- package/src/studio/routes/route.tsx +8 -0
- package/src/{tower → studio}/routes/routes/route.tsx +3 -4
- package/src/{tower → studio}/routes/services/route.tsx +3 -4
- package/src/{tower → studio}/routes/system/route.tsx +8 -9
- package/src/{tower → studio}/routes/traceDetail.tsx +6 -7
- package/src/{tower → studio}/routes/traces/route.tsx +8 -9
- 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/{x/tailscale → tailscale}/TailscaleTunnel.ts +4 -5
- package/src/{x/tailwind → tailwind}/compile.ts +1 -1
- package/src/tailwind/index.ts +2 -0
- package/src/{x/tailwind → tailwind}/plugin.ts +1 -1
- package/src/testing/utils.ts +59 -0
- 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/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/hyper/Hyper.d.ts +0 -26
- package/dist/hyper/Hyper.d.ts.map +0 -1
- package/dist/hyper/Hyper.js +0 -24
- package/dist/hyper/Hyper.js.map +0 -1
- package/dist/hyper/HyperHtml.d.ts +0 -24
- package/dist/hyper/HyperHtml.d.ts.map +0 -1
- package/dist/hyper/HyperHtml.js.map +0 -1
- package/dist/hyper/HyperHtml.test.d.ts +0 -2
- package/dist/hyper/HyperHtml.test.d.ts.map +0 -1
- package/dist/hyper/HyperHtml.test.js +0 -283
- package/dist/hyper/HyperHtml.test.js.map +0 -1
- package/dist/hyper/HyperNode.d.ts +0 -15
- package/dist/hyper/HyperNode.d.ts.map +0 -1
- package/dist/hyper/HyperNode.js +0 -12
- package/dist/hyper/HyperNode.js.map +0 -1
- package/dist/hyper/HyperRoute.d.ts +0 -9
- package/dist/hyper/HyperRoute.d.ts.map +0 -1
- package/dist/hyper/HyperRoute.js +0 -33
- package/dist/hyper/HyperRoute.js.map +0 -1
- package/dist/hyper/HyperRoute.test.d.ts +0 -2
- package/dist/hyper/HyperRoute.test.d.ts.map +0 -1
- package/dist/hyper/HyperRoute.test.js +0 -86
- package/dist/hyper/HyperRoute.test.js.map +0 -1
- package/dist/hyper/html.d.ts +0 -11
- package/dist/hyper/html.d.ts.map +0 -1
- package/dist/hyper/html.js +0 -31
- package/dist/hyper/html.js.map +0 -1
- package/dist/hyper/index.d.ts +0 -7
- package/dist/hyper/index.d.ts.map +0 -1
- package/dist/hyper/index.js +0 -6
- package/dist/hyper/index.js.map +0 -1
- package/dist/hyper/jsx-runtime.d.ts +0 -8
- package/dist/hyper/jsx-runtime.d.ts.map +0 -1
- package/dist/hyper/jsx-runtime.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 +0 -47
- 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 +0 -20
- 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 +0 -20
- 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/dist/x/cloudflare/CloudflareTunnel.d.ts +0 -11
- package/dist/x/cloudflare/CloudflareTunnel.d.ts.map +0 -1
- package/dist/x/cloudflare/CloudflareTunnel.js.map +0 -1
- package/dist/x/cloudflare/index.d.ts.map +0 -1
- package/dist/x/cloudflare/index.js.map +0 -1
- package/dist/x/tailscale/TailscaleTunnel.d.ts +0 -16
- package/dist/x/tailscale/TailscaleTunnel.d.ts.map +0 -1
- package/dist/x/tailscale/TailscaleTunnel.js.map +0 -1
- package/dist/x/tailscale/index.d.ts.map +0 -1
- package/dist/x/tailscale/index.js.map +0 -1
- package/dist/x/tailwind/TailwindPlugin.d.ts.map +0 -1
- package/dist/x/tailwind/TailwindPlugin.js.map +0 -1
- package/dist/x/tailwind/compile.d.ts.map +0 -1
- package/dist/x/tailwind/compile.js.map +0 -1
- package/dist/x/tailwind/plugin.d.ts.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/hyper/Hyper.ts +0 -55
- package/src/hyper/HyperNode.ts +0 -34
- package/src/hyper/HyperRoute.ts +0 -59
- package/src/hyper/html.ts +0 -47
- package/src/hyper/index.ts +0 -6
- package/src/hyper/jsx-runtime.ts +0 -15
- package/src/tower/Tower.ts +0 -47
- package/src/tower/index.ts +0 -3
- package/src/tower/routes/route.tsx +0 -8
- /package/dist/{x/cloudflare → cloudflare}/index.d.ts +0 -0
- /package/dist/{x/cloudflare → cloudflare}/index.js +0 -0
- /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/{x/tailscale → tailscale}/index.d.ts +0 -0
- /package/dist/{x/tailscale → tailscale}/index.js +0 -0
- /package/dist/{x/tailwind → tailwind}/TailwindPlugin.js +0 -0
- /package/dist/{x/tailwind → tailwind}/compile.d.ts +0 -0
- /package/dist/{x/tailwind → tailwind}/plugin.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/{x/cloudflare → cloudflare}/index.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/{x/tailscale → tailscale}/index.ts +0 -0
- /package/src/{x/tailwind → tailwind}/TailwindPlugin.ts +0 -0
|
@@ -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(
|
|
@@ -8,16 +8,16 @@ import * as Schema from "effect/Schema"
|
|
|
8
8
|
import * as Unique from "../Unique.ts"
|
|
9
9
|
import * as SqlClient from "../sql/SqlClient.ts"
|
|
10
10
|
|
|
11
|
-
export let store:
|
|
12
|
-
Symbol.for("effect-start/
|
|
11
|
+
export let store: StudioStoreShape = GlobalValue.globalValue(
|
|
12
|
+
Symbol.for("effect-start/StudioStore"),
|
|
13
13
|
() => ({
|
|
14
|
-
prefix: "/
|
|
14
|
+
prefix: "/studio",
|
|
15
15
|
sql: undefined as unknown as SqlClient.SqlClient,
|
|
16
|
-
events: Effect.runSync(PubSub.unbounded<
|
|
16
|
+
events: Effect.runSync(PubSub.unbounded<StudioEvent>()),
|
|
17
17
|
spanCapacity: 1000,
|
|
18
18
|
logCapacity: 5000,
|
|
19
19
|
errorCapacity: 1000,
|
|
20
|
-
metrics: [] as Array<
|
|
20
|
+
metrics: [] as Array<StudioMetricSnapshot>,
|
|
21
21
|
process: undefined as ProcessStats | undefined,
|
|
22
22
|
}),
|
|
23
23
|
)
|
|
@@ -32,7 +32,7 @@ export const nextSpanId = () => nextPackedId()
|
|
|
32
32
|
|
|
33
33
|
export const nextTraceId = () => nextPackedId()
|
|
34
34
|
|
|
35
|
-
export interface
|
|
35
|
+
export interface StudioSpan {
|
|
36
36
|
readonly spanId: bigint
|
|
37
37
|
readonly traceId: bigint
|
|
38
38
|
readonly fiberId: string | undefined
|
|
@@ -47,7 +47,7 @@ export interface TowerSpan {
|
|
|
47
47
|
readonly events: Array<{ name: string; startTime: bigint; attributes?: Record<string, unknown> }>
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
export interface
|
|
50
|
+
export interface StudioLog {
|
|
51
51
|
readonly id: bigint
|
|
52
52
|
readonly level: "DEBUG" | "INFO" | "WARNING" | "ERROR" | "FATAL"
|
|
53
53
|
readonly message: string
|
|
@@ -87,7 +87,7 @@ export interface ProcessStats {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
export interface
|
|
90
|
+
export interface StudioErrorDetail {
|
|
91
91
|
readonly kind: "fail" | "die"
|
|
92
92
|
readonly tag: string | undefined
|
|
93
93
|
readonly message: string
|
|
@@ -95,15 +95,15 @@ export interface TowerErrorDetail {
|
|
|
95
95
|
readonly span: string | undefined
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
export interface
|
|
98
|
+
export interface StudioError {
|
|
99
99
|
readonly id: bigint
|
|
100
100
|
readonly fiberId: string
|
|
101
101
|
readonly interrupted: boolean
|
|
102
102
|
readonly prettyPrint: string
|
|
103
|
-
readonly details: Array<
|
|
103
|
+
readonly details: Array<StudioErrorDetail>
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
export interface
|
|
106
|
+
export interface StudioMetricSnapshot {
|
|
107
107
|
readonly name: string
|
|
108
108
|
readonly type: "counter" | "gauge" | "histogram" | "summary" | "frequency"
|
|
109
109
|
readonly value: unknown
|
|
@@ -111,12 +111,12 @@ export interface TowerMetricSnapshot {
|
|
|
111
111
|
readonly timestamp: number
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
export type
|
|
115
|
-
| { readonly _tag: "SpanStart"; readonly span:
|
|
116
|
-
| { readonly _tag: "SpanEnd"; readonly span:
|
|
117
|
-
| { readonly _tag: "Log"; readonly log:
|
|
118
|
-
| { readonly _tag: "Error"; readonly error:
|
|
119
|
-
| { readonly _tag: "MetricsSnapshot"; readonly metrics: Array<
|
|
114
|
+
export type StudioEvent =
|
|
115
|
+
| { readonly _tag: "SpanStart"; readonly span: StudioSpan }
|
|
116
|
+
| { readonly _tag: "SpanEnd"; readonly span: StudioSpan }
|
|
117
|
+
| { readonly _tag: "Log"; readonly log: StudioLog }
|
|
118
|
+
| { readonly _tag: "Error"; readonly error: StudioError }
|
|
119
|
+
| { readonly _tag: "MetricsSnapshot"; readonly metrics: Array<StudioMetricSnapshot> }
|
|
120
120
|
| { readonly _tag: "ProcessSnapshot"; readonly stats: ProcessStats }
|
|
121
121
|
|
|
122
122
|
export interface FiberContext {
|
|
@@ -125,14 +125,14 @@ export interface FiberContext {
|
|
|
125
125
|
readonly annotations: Record<string, unknown>
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
export interface
|
|
128
|
+
export interface StudioStoreShape {
|
|
129
129
|
prefix: string
|
|
130
130
|
readonly sql: SqlClient.SqlClient
|
|
131
|
-
readonly events: PubSub.PubSub<
|
|
131
|
+
readonly events: PubSub.PubSub<StudioEvent>
|
|
132
132
|
readonly spanCapacity: number
|
|
133
133
|
readonly logCapacity: number
|
|
134
134
|
readonly errorCapacity: number
|
|
135
|
-
metrics: Array<
|
|
135
|
+
metrics: Array<StudioMetricSnapshot>
|
|
136
136
|
process: ProcessStats | undefined
|
|
137
137
|
}
|
|
138
138
|
|
|
@@ -143,12 +143,12 @@ export function fiberIdCounter(): number {
|
|
|
143
143
|
return MutableRef.get(counter)
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
export class
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
export class StudioStore extends Context.Tag("effect-start/StudioStore")<
|
|
147
|
+
StudioStore,
|
|
148
|
+
StudioStoreShape
|
|
149
149
|
>() {}
|
|
150
150
|
|
|
151
|
-
export interface
|
|
151
|
+
export interface StudioStoreOptions {
|
|
152
152
|
readonly spanCapacity?: number
|
|
153
153
|
readonly logCapacity?: number
|
|
154
154
|
readonly errorCapacity?: number
|
|
@@ -195,10 +195,10 @@ const DDL = [
|
|
|
195
195
|
]
|
|
196
196
|
|
|
197
197
|
export function layer(
|
|
198
|
-
options?:
|
|
199
|
-
): Layer.Layer<
|
|
198
|
+
options?: StudioStoreOptions,
|
|
199
|
+
): Layer.Layer<StudioStore, SqlClient.SqlError, SqlClient.SqlClient> {
|
|
200
200
|
return Layer.effect(
|
|
201
|
-
|
|
201
|
+
StudioStore,
|
|
202
202
|
Effect.gen(function* () {
|
|
203
203
|
const sql = yield* SqlClient.SqlClient
|
|
204
204
|
for (const ddl of DDL) {
|
|
@@ -287,8 +287,8 @@ export const FiberRow = Schema.Struct({
|
|
|
287
287
|
})
|
|
288
288
|
type FiberRow = typeof FiberRow.Type
|
|
289
289
|
|
|
290
|
-
function deserializeSpan(row: SpanRow):
|
|
291
|
-
const events = reviveBigint(JSON.parse(row.events)) as
|
|
290
|
+
function deserializeSpan(row: SpanRow): StudioSpan {
|
|
291
|
+
const events = reviveBigint(JSON.parse(row.events)) as StudioSpan["events"]
|
|
292
292
|
return {
|
|
293
293
|
spanId: BigInt(row.spanId),
|
|
294
294
|
traceId: BigInt(row.traceId),
|
|
@@ -299,16 +299,16 @@ function deserializeSpan(row: SpanRow): TowerSpan {
|
|
|
299
299
|
startTime: BigInt(row.startTime),
|
|
300
300
|
endTime: row.endTime ? BigInt(row.endTime) : undefined,
|
|
301
301
|
durationMs: row.durationMs ?? undefined,
|
|
302
|
-
status: row.status as
|
|
302
|
+
status: row.status as StudioSpan["status"],
|
|
303
303
|
attributes: JSON.parse(row.attributes),
|
|
304
304
|
events,
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
function deserializeLog(row: LogRow):
|
|
308
|
+
function deserializeLog(row: LogRow): StudioLog {
|
|
309
309
|
return {
|
|
310
310
|
id: BigInt(row.id),
|
|
311
|
-
level: row.level as
|
|
311
|
+
level: row.level as StudioLog["level"],
|
|
312
312
|
message: row.message,
|
|
313
313
|
fiberId: row.fiberId,
|
|
314
314
|
cause: row.cause ?? undefined,
|
|
@@ -317,7 +317,7 @@ function deserializeLog(row: LogRow): TowerLog {
|
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
function deserializeError(row: ErrorRow):
|
|
320
|
+
function deserializeError(row: ErrorRow): StudioError {
|
|
321
321
|
return {
|
|
322
322
|
id: BigInt(row.id),
|
|
323
323
|
fiberId: row.fiberId,
|
|
@@ -327,7 +327,7 @@ function deserializeError(row: ErrorRow): TowerError {
|
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
-
export function insertSpan(sql: SqlClient.SqlClient, span:
|
|
330
|
+
export function insertSpan(sql: SqlClient.SqlClient, span: StudioSpan) {
|
|
331
331
|
return sql`INSERT INTO Span ${sql({
|
|
332
332
|
spanId: span.spanId,
|
|
333
333
|
traceId: span.traceId,
|
|
@@ -344,7 +344,7 @@ export function insertSpan(sql: SqlClient.SqlClient, span: TowerSpan) {
|
|
|
344
344
|
})}`
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
export function updateSpan(sql: SqlClient.SqlClient, span:
|
|
347
|
+
export function updateSpan(sql: SqlClient.SqlClient, span: StudioSpan) {
|
|
348
348
|
return sql`UPDATE Span SET
|
|
349
349
|
endTime = ${span.endTime?.toString() ?? null},
|
|
350
350
|
durationMs = ${span.durationMs ?? null},
|
|
@@ -354,7 +354,7 @@ export function updateSpan(sql: SqlClient.SqlClient, span: TowerSpan) {
|
|
|
354
354
|
WHERE spanId = ${span.spanId}`
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
export function insertLog(sql: SqlClient.SqlClient, log:
|
|
357
|
+
export function insertLog(sql: SqlClient.SqlClient, log: StudioLog) {
|
|
358
358
|
return sql`INSERT INTO Log ${sql({
|
|
359
359
|
id: log.id,
|
|
360
360
|
level: log.level,
|
|
@@ -366,7 +366,7 @@ export function insertLog(sql: SqlClient.SqlClient, log: TowerLog) {
|
|
|
366
366
|
})}`
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
-
export function insertError(sql: SqlClient.SqlClient, error:
|
|
369
|
+
export function insertError(sql: SqlClient.SqlClient, error: StudioError) {
|
|
370
370
|
return sql`INSERT INTO Error ${sql({
|
|
371
371
|
id: error.id,
|
|
372
372
|
fiberId: error.fiberId,
|
|
@@ -6,9 +6,9 @@ import * as Layer from "effect/Layer"
|
|
|
6
6
|
import * as Option from "effect/Option"
|
|
7
7
|
import * as PubSub from "effect/PubSub"
|
|
8
8
|
import * as Tracer from "effect/Tracer"
|
|
9
|
-
import * as
|
|
9
|
+
import * as StudioStore from "./StudioStore.ts"
|
|
10
10
|
|
|
11
|
-
const publish = (store:
|
|
11
|
+
const publish = (store: StudioStore.StudioStoreShape, event: StudioStore.StudioEvent) =>
|
|
12
12
|
Effect.runSync(PubSub.publish(store.events, event))
|
|
13
13
|
|
|
14
14
|
const fromTracerId = (id: string): bigint | undefined => {
|
|
@@ -19,7 +19,7 @@ const fromTracerId = (id: string): bigint | undefined => {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
const make = (store:
|
|
22
|
+
const make = (store: StudioStore.StudioStoreShape): Tracer.Tracer =>
|
|
23
23
|
Tracer.make({
|
|
24
24
|
span(name, parent, context, links, startTime, kind, options) {
|
|
25
25
|
const parentSpanId =
|
|
@@ -27,8 +27,8 @@ const make = (store: TowerStore.TowerStoreShape): Tracer.Tracer =>
|
|
|
27
27
|
? fromTracerId(parent.value.spanId)
|
|
28
28
|
: undefined
|
|
29
29
|
const parentTraceId = Option.isSome(parent) ? fromTracerId(parent.value.traceId) : undefined
|
|
30
|
-
const traceId = parentTraceId ??
|
|
31
|
-
const spanId =
|
|
30
|
+
const traceId = parentTraceId ?? StudioStore.nextTraceId()
|
|
31
|
+
const spanId = StudioStore.nextSpanId()
|
|
32
32
|
|
|
33
33
|
const attributes: Record<string, unknown> = {}
|
|
34
34
|
const currentFiber = Fiber.getCurrentFiber()
|
|
@@ -45,7 +45,7 @@ const make = (store: TowerStore.TowerStoreShape): Tracer.Tracer =>
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
const
|
|
48
|
+
const studioSpan: StudioStore.StudioSpan = {
|
|
49
49
|
spanId,
|
|
50
50
|
traceId,
|
|
51
51
|
fiberId,
|
|
@@ -60,13 +60,13 @@ const make = (store: TowerStore.TowerStoreShape): Tracer.Tracer =>
|
|
|
60
60
|
events: [],
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
StudioStore.runWrite(
|
|
64
64
|
Effect.zipRight(
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
StudioStore.insertSpan(store.sql, studioSpan),
|
|
66
|
+
StudioStore.evict(store.sql, "Span", store.spanCapacity),
|
|
67
67
|
),
|
|
68
68
|
)
|
|
69
|
-
publish(store, { _tag: "SpanStart", span:
|
|
69
|
+
publish(store, { _tag: "SpanStart", span: studioSpan })
|
|
70
70
|
|
|
71
71
|
const attrs = new Map<string, unknown>(Object.entries(attributes))
|
|
72
72
|
const spanLinks = [...links]
|
|
@@ -79,35 +79,35 @@ const make = (store: TowerStore.TowerStoreShape): Tracer.Tracer =>
|
|
|
79
79
|
parent,
|
|
80
80
|
context,
|
|
81
81
|
get status(): Tracer.SpanStatus {
|
|
82
|
-
if (
|
|
82
|
+
if (studioSpan.endTime != null) {
|
|
83
83
|
return {
|
|
84
84
|
_tag: "Ended",
|
|
85
|
-
startTime:
|
|
86
|
-
endTime:
|
|
85
|
+
startTime: studioSpan.startTime,
|
|
86
|
+
endTime: studioSpan.endTime,
|
|
87
87
|
exit: Exit.void,
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
return { _tag: "Started", startTime:
|
|
90
|
+
return { _tag: "Started", startTime: studioSpan.startTime }
|
|
91
91
|
},
|
|
92
92
|
attributes: attrs,
|
|
93
93
|
links: spanLinks,
|
|
94
94
|
sampled: true,
|
|
95
95
|
kind,
|
|
96
96
|
end(endTime, exit) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
publish(store, { _tag: "SpanEnd", span:
|
|
97
|
+
studioSpan.endTime = endTime
|
|
98
|
+
studioSpan.durationMs = Number(endTime - studioSpan.startTime) / 1_000_000
|
|
99
|
+
studioSpan.status = Exit.isSuccess(exit) ? "ok" : "error"
|
|
100
|
+
StudioStore.runWrite(StudioStore.updateSpan(store.sql, studioSpan))
|
|
101
|
+
publish(store, { _tag: "SpanEnd", span: studioSpan })
|
|
102
102
|
},
|
|
103
103
|
attribute(key, value) {
|
|
104
104
|
attrs.set(key, value)
|
|
105
|
-
;(
|
|
106
|
-
|
|
105
|
+
;(studioSpan.attributes as Record<string, unknown>)[key] = value
|
|
106
|
+
StudioStore.runWrite(StudioStore.updateSpan(store.sql, studioSpan))
|
|
107
107
|
},
|
|
108
108
|
event(name, startTime, attributes) {
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
studioSpan.events.push({ name, startTime, attributes })
|
|
110
|
+
StudioStore.runWrite(StudioStore.updateSpan(store.sql, studioSpan))
|
|
111
111
|
},
|
|
112
112
|
addLinks(newLinks) {
|
|
113
113
|
spanLinks.push(...newLinks)
|
|
@@ -120,9 +120,9 @@ const make = (store: TowerStore.TowerStoreShape): Tracer.Tracer =>
|
|
|
120
120
|
},
|
|
121
121
|
})
|
|
122
122
|
|
|
123
|
-
export const layer: Layer.Layer<never, never,
|
|
123
|
+
export const layer: Layer.Layer<never, never, StudioStore.StudioStore> = Layer.unwrapEffect(
|
|
124
124
|
Effect.gen(function* () {
|
|
125
|
-
const store = yield*
|
|
125
|
+
const store = yield* StudioStore.StudioStore
|
|
126
126
|
return Layer.setTracer(make(store))
|
|
127
127
|
}),
|
|
128
128
|
)
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import * as Stream from "effect/Stream"
|
|
2
2
|
import * as Route from "../../../Route.ts"
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
5
|
-
import * as TowerStore from "../../TowerStore.ts"
|
|
3
|
+
import * as Html from "../../../Html.ts"
|
|
4
|
+
import * as StudioStore from "../../StudioStore.ts"
|
|
6
5
|
import * as Errors from "../../ui/Errors.tsx"
|
|
7
6
|
import * as Shell from "../../ui/Shell.tsx"
|
|
8
7
|
|
|
9
|
-
const prefix =
|
|
8
|
+
const prefix = StudioStore.store.prefix
|
|
10
9
|
|
|
11
10
|
export default Route.get(
|
|
12
|
-
|
|
11
|
+
Route.html(function* (ctx) {
|
|
13
12
|
const url = new URL(ctx.request.url)
|
|
14
13
|
const search = url.searchParams.get("errorSearch") || ""
|
|
15
14
|
const tag = url.searchParams.get("errorTag") || ""
|
|
16
|
-
const allErrors = yield*
|
|
15
|
+
const allErrors = yield* StudioStore.allErrors(StudioStore.store.sql)
|
|
17
16
|
const tagSet = new Set<string>()
|
|
18
17
|
for (const error of allErrors) {
|
|
19
18
|
for (const d of error.details) {
|
|
@@ -73,10 +72,10 @@ export default Route.get(
|
|
|
73
72
|
)
|
|
74
73
|
}),
|
|
75
74
|
Route.sse(
|
|
76
|
-
Stream.fromPubSub(
|
|
75
|
+
Stream.fromPubSub(StudioStore.store.events).pipe(
|
|
77
76
|
Stream.filter((e) => e._tag === "Error"),
|
|
78
77
|
Stream.map((e) => {
|
|
79
|
-
const html =
|
|
78
|
+
const html = Html.renderToString(<Errors.ErrorLine error={e.error} />).replace(
|
|
80
79
|
/\n/g,
|
|
81
80
|
"",
|
|
82
81
|
)
|
|
@@ -2,22 +2,21 @@ import * as Schema from "effect/Schema"
|
|
|
2
2
|
import * as Route from "../../Route.ts"
|
|
3
3
|
import * as RouteSchema from "../../RouteSchema.ts"
|
|
4
4
|
import * as Unique from "../../Unique.ts"
|
|
5
|
-
import * as
|
|
6
|
-
import * as TowerStore from "../TowerStore.ts"
|
|
5
|
+
import * as StudioStore from "../StudioStore.ts"
|
|
7
6
|
import * as Fibers from "../ui/Fibers.tsx"
|
|
8
7
|
import * as Shell from "../ui/Shell.tsx"
|
|
9
8
|
|
|
10
9
|
export default Route.get(
|
|
11
10
|
RouteSchema.schemaPathParams(Schema.Struct({ id: Schema.String })),
|
|
12
|
-
|
|
11
|
+
Route.html(function* (ctx) {
|
|
13
12
|
const fiberId = ctx.pathParams.id
|
|
14
13
|
const fiberName = fiberId.startsWith("#") ? fiberId : `#${fiberId}`
|
|
15
14
|
|
|
16
|
-
const fiberLogs = yield*
|
|
17
|
-
const fiberSpans = yield*
|
|
15
|
+
const fiberLogs = yield* StudioStore.logsByFiberId(StudioStore.store.sql, fiberName)
|
|
16
|
+
const fiberSpans = yield* StudioStore.spansByFiberId(StudioStore.store.sql, fiberName)
|
|
18
17
|
|
|
19
18
|
const fiberNum = parseInt(fiberName.slice(1), 10)
|
|
20
|
-
const counter =
|
|
19
|
+
const counter = StudioStore.fiberIdCounter()
|
|
21
20
|
let alive: "alive" | "dead" | "unknown" = "unknown"
|
|
22
21
|
if (!isNaN(fiberNum)) {
|
|
23
22
|
if (fiberNum < counter) alive = "dead"
|
|
@@ -31,13 +30,13 @@ export default Route.get(
|
|
|
31
30
|
else if (fiberNum < counter) alive = "dead"
|
|
32
31
|
}
|
|
33
32
|
|
|
34
|
-
const parents = yield*
|
|
35
|
-
const fiberContext = yield*
|
|
33
|
+
const parents = yield* StudioStore.getParentChain(StudioStore.store.sql, fiberName)
|
|
34
|
+
const fiberContext = yield* StudioStore.getFiberContext(StudioStore.store.sql, fiberName)
|
|
36
35
|
|
|
37
36
|
return (
|
|
38
|
-
<Shell.Shell prefix={
|
|
37
|
+
<Shell.Shell prefix={StudioStore.store.prefix} active="fibers">
|
|
39
38
|
<Fibers.FiberDetail
|
|
40
|
-
prefix={
|
|
39
|
+
prefix={StudioStore.store.prefix}
|
|
41
40
|
fiberId={fiberName}
|
|
42
41
|
logs={fiberLogs}
|
|
43
42
|
spans={fiberSpans}
|
|
@@ -1,39 +1,38 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect"
|
|
2
2
|
import * as Stream from "effect/Stream"
|
|
3
3
|
import * as Route from "../../../Route.ts"
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
6
|
-
import * as TowerStore from "../../TowerStore.ts"
|
|
4
|
+
import * as Html from "../../../Html.ts"
|
|
5
|
+
import * as StudioStore from "../../StudioStore.ts"
|
|
7
6
|
import * as Fibers from "../../ui/Fibers.tsx"
|
|
8
7
|
import * as Shell from "../../ui/Shell.tsx"
|
|
9
8
|
|
|
10
9
|
export default Route.get(
|
|
11
|
-
|
|
12
|
-
const logs = yield*
|
|
13
|
-
const spans = yield*
|
|
10
|
+
Route.html(function* () {
|
|
11
|
+
const logs = yield* StudioStore.allLogs(StudioStore.store.sql)
|
|
12
|
+
const spans = yield* StudioStore.allSpans(StudioStore.store.sql)
|
|
14
13
|
const fibers = Fibers.collectFibers(logs, spans)
|
|
15
14
|
return (
|
|
16
|
-
<Shell.Shell prefix={
|
|
15
|
+
<Shell.Shell prefix={StudioStore.store.prefix} active="fibers">
|
|
17
16
|
<div style="display:flex;flex-direction:column;flex:1;overflow:hidden">
|
|
18
17
|
<div class="tab-header">Fibers</div>
|
|
19
18
|
<div id="fibers-container" class="tab-body">
|
|
20
|
-
<Fibers.FiberList fibers={fibers} prefix={
|
|
19
|
+
<Fibers.FiberList fibers={fibers} prefix={StudioStore.store.prefix} />
|
|
21
20
|
</div>
|
|
22
|
-
<div data-init={`@get('${
|
|
21
|
+
<div data-init={`@get('${StudioStore.store.prefix}/fibers')`} />
|
|
23
22
|
</div>
|
|
24
23
|
</Shell.Shell>
|
|
25
24
|
)
|
|
26
25
|
}),
|
|
27
26
|
Route.sse(
|
|
28
|
-
Stream.fromPubSub(
|
|
27
|
+
Stream.fromPubSub(StudioStore.store.events).pipe(
|
|
29
28
|
Stream.filter((e) => e._tag === "SpanStart" || e._tag === "SpanEnd" || e._tag === "Log"),
|
|
30
29
|
Stream.mapEffect(() =>
|
|
31
30
|
Effect.gen(function* () {
|
|
32
|
-
const logs = yield*
|
|
33
|
-
const spans = yield*
|
|
31
|
+
const logs = yield* StudioStore.allLogs(StudioStore.store.sql)
|
|
32
|
+
const spans = yield* StudioStore.allSpans(StudioStore.store.sql)
|
|
34
33
|
const fibers = Fibers.collectFibers(logs, spans)
|
|
35
|
-
const html =
|
|
36
|
-
<Fibers.FiberList fibers={fibers} prefix={
|
|
34
|
+
const html = Html.renderToString(
|
|
35
|
+
<Fibers.FiberList fibers={fibers} prefix={StudioStore.store.prefix} />,
|
|
37
36
|
).replace(/\n/g, "")
|
|
38
37
|
return {
|
|
39
38
|
event: "datastar-patch-elements",
|