effect-start 0.27.0 → 0.28.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/ChildProcess.d.ts +60 -0
- package/dist/ChildProcess.d.ts.map +1 -0
- package/dist/ChildProcess.js +30 -0
- package/dist/ChildProcess.js.map +1 -0
- package/dist/Commander.d.ts +101 -0
- package/dist/Commander.d.ts.map +1 -0
- package/dist/Commander.js +327 -0
- package/dist/Commander.js.map +1 -0
- package/dist/ContentNegotiation.d.ts +13 -0
- package/dist/ContentNegotiation.d.ts.map +1 -0
- package/dist/ContentNegotiation.js +360 -0
- package/dist/ContentNegotiation.js.map +1 -0
- package/dist/Cookies.d.ts +78 -0
- package/dist/Cookies.d.ts.map +1 -0
- package/dist/Cookies.js +303 -0
- package/dist/Cookies.js.map +1 -0
- package/dist/Development.d.ts +42 -0
- package/dist/Development.d.ts.map +1 -0
- package/dist/Development.js +60 -0
- package/dist/Development.js.map +1 -0
- package/dist/Docker.d.ts +51 -0
- package/dist/Docker.d.ts.map +1 -0
- package/dist/Docker.js +88 -0
- package/dist/Docker.js.map +1 -0
- package/dist/Effectify.d.ts +210 -0
- package/dist/Effectify.d.ts.map +1 -0
- package/dist/Effectify.js +20 -0
- package/dist/Effectify.js.map +1 -0
- package/dist/Entity.d.ts +48 -0
- package/dist/Entity.d.ts.map +1 -0
- package/dist/Entity.js +235 -0
- package/dist/Entity.js.map +1 -0
- package/dist/Fetch.d.ts +50 -0
- package/dist/Fetch.d.ts.map +1 -0
- package/dist/Fetch.js +136 -0
- package/dist/Fetch.js.map +1 -0
- package/dist/FilePathPattern.d.ts +30 -0
- package/dist/FilePathPattern.d.ts.map +1 -0
- package/dist/FilePathPattern.js +87 -0
- package/dist/FilePathPattern.js.map +1 -0
- package/dist/FileRouter.d.ts +57 -0
- package/dist/FileRouter.d.ts.map +1 -0
- package/dist/FileRouter.js +149 -0
- package/dist/FileRouter.js.map +1 -0
- package/dist/FileRouterCodegen.d.ts +19 -0
- package/dist/FileRouterCodegen.d.ts.map +1 -0
- package/dist/FileRouterCodegen.js +228 -0
- package/dist/FileRouterCodegen.js.map +1 -0
- package/dist/FileSystem.d.ts +159 -0
- package/dist/FileSystem.d.ts.map +1 -0
- package/dist/FileSystem.js +71 -0
- package/dist/FileSystem.js.map +1 -0
- package/dist/GlobalLayer.d.ts +4 -0
- package/dist/GlobalLayer.d.ts.map +1 -0
- package/dist/GlobalLayer.js +51 -0
- package/dist/GlobalLayer.js.map +1 -0
- package/dist/Http.d.ts +38 -0
- package/dist/Http.d.ts.map +1 -0
- package/dist/Http.js +89 -0
- package/dist/Http.js.map +1 -0
- package/dist/PathPattern.d.ts +135 -0
- package/dist/PathPattern.d.ts.map +1 -0
- package/dist/PathPattern.js +414 -0
- package/dist/PathPattern.js.map +1 -0
- package/dist/PlatformError.d.ts +39 -0
- package/dist/PlatformError.d.ts.map +1 -0
- package/dist/PlatformError.js +26 -0
- package/dist/PlatformError.js.map +1 -0
- package/dist/PlatformRuntime.d.ts +30 -0
- package/dist/PlatformRuntime.d.ts.map +1 -0
- package/dist/PlatformRuntime.js +50 -0
- package/dist/PlatformRuntime.js.map +1 -0
- package/dist/Route.d.ts +98 -0
- package/dist/Route.d.ts.map +1 -0
- package/dist/Route.js +101 -0
- package/dist/Route.js.map +1 -0
- package/dist/RouteBody.d.ts +48 -0
- package/dist/RouteBody.d.ts.map +1 -0
- package/dist/RouteBody.js +68 -0
- package/dist/RouteBody.js.map +1 -0
- package/dist/RouteError.d.ts +99 -0
- package/dist/RouteError.d.ts.map +1 -0
- package/dist/RouteError.js +56 -0
- package/dist/RouteError.js.map +1 -0
- package/dist/RouteHook.d.ts +13 -0
- package/dist/RouteHook.d.ts.map +1 -0
- package/dist/RouteHook.js +40 -0
- package/dist/RouteHook.js.map +1 -0
- package/dist/RouteHttp.d.ts +22 -0
- package/dist/RouteHttp.d.ts.map +1 -0
- package/dist/RouteHttp.js +259 -0
- package/dist/RouteHttp.js.map +1 -0
- package/dist/RouteHttpTracer.d.ts +11 -0
- package/dist/RouteHttpTracer.d.ts.map +1 -0
- package/dist/RouteHttpTracer.js +63 -0
- package/dist/RouteHttpTracer.js.map +1 -0
- package/dist/RouteMount.d.ts +87 -0
- package/dist/RouteMount.d.ts.map +1 -0
- package/dist/RouteMount.js +64 -0
- package/dist/RouteMount.js.map +1 -0
- package/dist/RouteSchema.d.ts +87 -0
- package/dist/RouteSchema.d.ts.map +1 -0
- package/dist/RouteSchema.js +189 -0
- package/dist/RouteSchema.js.map +1 -0
- package/dist/RouteSse.d.ts +22 -0
- package/dist/RouteSse.d.ts.map +1 -0
- package/dist/RouteSse.js +80 -0
- package/dist/RouteSse.js.map +1 -0
- package/dist/RouteTree.d.ts +58 -0
- package/dist/RouteTree.d.ts.map +1 -0
- package/dist/RouteTree.js +94 -0
- package/dist/RouteTree.js.map +1 -0
- package/dist/RouteTrie.d.ts +21 -0
- package/dist/RouteTrie.d.ts.map +1 -0
- package/dist/RouteTrie.js +153 -0
- package/dist/RouteTrie.js.map +1 -0
- package/dist/SchemaExtra.d.ts +8 -0
- package/dist/SchemaExtra.d.ts.map +1 -0
- package/dist/SchemaExtra.js +75 -0
- package/dist/SchemaExtra.js.map +1 -0
- package/dist/Socket.d.ts +28 -0
- package/dist/Socket.d.ts.map +1 -0
- package/dist/Socket.js +30 -0
- package/dist/Socket.js.map +1 -0
- package/dist/SqlIntrospect.d.ts +92 -0
- package/dist/SqlIntrospect.d.ts.map +1 -0
- package/dist/SqlIntrospect.js +478 -0
- package/dist/SqlIntrospect.js.map +1 -0
- package/dist/Start.d.ts +90 -0
- package/dist/Start.d.ts.map +1 -0
- package/dist/Start.js +91 -0
- package/dist/Start.js.map +1 -0
- package/dist/StartApp.d.ts +13 -0
- package/dist/StartApp.d.ts.map +1 -0
- package/dist/StartApp.js +4 -0
- package/dist/StartApp.js.map +1 -0
- package/dist/StreamExtra.d.ts +29 -0
- package/dist/StreamExtra.d.ts.map +1 -0
- package/dist/StreamExtra.js +101 -0
- package/dist/StreamExtra.js.map +1 -0
- package/dist/System.d.ts +9 -0
- package/dist/System.d.ts.map +1 -0
- package/dist/System.js +61 -0
- package/dist/System.js.map +1 -0
- package/dist/TuplePathPattern.d.ts +10 -0
- package/dist/TuplePathPattern.d.ts.map +1 -0
- package/dist/TuplePathPattern.js +69 -0
- package/dist/TuplePathPattern.js.map +1 -0
- package/dist/Unique.d.ts +68 -0
- package/dist/Unique.d.ts.map +1 -0
- package/dist/Unique.js +225 -0
- package/dist/Unique.js.map +1 -0
- package/dist/Values.d.ts +30 -0
- package/dist/Values.d.ts.map +1 -0
- package/dist/Values.js +46 -0
- package/dist/Values.js.map +1 -0
- package/dist/bun/BunBundle.d.ts +12 -0
- package/dist/bun/BunBundle.d.ts.map +1 -0
- package/dist/bun/BunBundle.js +138 -0
- package/dist/bun/BunBundle.js.map +1 -0
- package/dist/bun/BunChildProcessSpawner.d.ts +4 -0
- package/dist/bun/BunChildProcessSpawner.d.ts.map +1 -0
- package/dist/bun/BunChildProcessSpawner.js +99 -0
- package/dist/bun/BunChildProcessSpawner.js.map +1 -0
- package/dist/bun/BunImportTrackerPlugin.d.ts +14 -0
- package/dist/bun/BunImportTrackerPlugin.d.ts.map +1 -0
- package/dist/bun/BunImportTrackerPlugin.js +70 -0
- package/dist/bun/BunImportTrackerPlugin.js.map +1 -0
- package/dist/bun/BunRoute.d.ts +49 -0
- package/dist/bun/BunRoute.d.ts.map +1 -0
- package/dist/bun/BunRoute.js +122 -0
- package/dist/bun/BunRoute.js.map +1 -0
- package/dist/bun/BunRuntime.d.ts +3 -0
- package/dist/bun/BunRuntime.d.ts.map +1 -0
- package/dist/bun/BunRuntime.js +30 -0
- package/dist/bun/BunRuntime.js.map +1 -0
- package/dist/bun/BunServer.d.ts +52 -0
- package/dist/bun/BunServer.d.ts.map +1 -0
- package/dist/bun/BunServer.js +262 -0
- package/dist/bun/BunServer.js.map +1 -0
- package/dist/bun/BunVirtualFilesPlugin.d.ts +5 -0
- package/dist/bun/BunVirtualFilesPlugin.d.ts.map +1 -0
- package/dist/bun/BunVirtualFilesPlugin.js +41 -0
- package/dist/bun/BunVirtualFilesPlugin.js.map +1 -0
- package/dist/bun/_BunEnhancedResolve.d.ts +46 -0
- package/dist/bun/_BunEnhancedResolve.d.ts.map +1 -0
- package/dist/bun/_BunEnhancedResolve.js +103 -0
- package/dist/bun/_BunEnhancedResolve.js.map +1 -0
- package/dist/bun/index.d.ts +6 -0
- package/dist/bun/index.d.ts.map +1 -0
- package/dist/bun/index.js +6 -0
- package/dist/bun/index.js.map +1 -0
- package/dist/bundler/Bundle.d.ts +62 -0
- package/dist/bundler/Bundle.d.ts.map +1 -0
- package/dist/bundler/Bundle.js +49 -0
- package/dist/bundler/Bundle.js.map +1 -0
- package/dist/bundler/BundleFiles.d.ts +14 -0
- package/dist/bundler/BundleFiles.d.ts.map +1 -0
- package/dist/bundler/BundleFiles.js +97 -0
- package/dist/bundler/BundleFiles.js.map +1 -0
- package/dist/bundler/BundleRoute.d.ts +27 -0
- package/dist/bundler/BundleRoute.d.ts.map +1 -0
- package/dist/bundler/BundleRoute.js +52 -0
- package/dist/bundler/BundleRoute.js.map +1 -0
- package/dist/client/Overlay.d.ts +3 -0
- package/dist/client/Overlay.d.ts.map +1 -0
- package/dist/client/Overlay.js +33 -0
- package/dist/client/Overlay.js.map +1 -0
- package/dist/client/ScrollState.d.ts +7 -0
- package/dist/client/ScrollState.d.ts.map +1 -0
- package/dist/client/ScrollState.js +95 -0
- package/dist/client/ScrollState.js.map +1 -0
- package/dist/client/index.d.ts +7 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +80 -0
- package/dist/client/index.js.map +1 -0
- package/dist/datastar/actions/fetch.d.ts +31 -0
- package/dist/datastar/actions/fetch.d.ts.map +1 -0
- package/dist/datastar/actions/fetch.js +404 -0
- package/dist/datastar/actions/fetch.js.map +1 -0
- package/dist/datastar/actions/peek.d.ts +2 -0
- package/dist/datastar/actions/peek.d.ts.map +1 -0
- package/dist/datastar/actions/peek.js +14 -0
- package/dist/datastar/actions/peek.js.map +1 -0
- package/dist/datastar/actions/setAll.d.ts +2 -0
- package/dist/datastar/actions/setAll.d.ts.map +1 -0
- package/dist/datastar/actions/setAll.js +13 -0
- package/dist/datastar/actions/setAll.js.map +1 -0
- package/dist/datastar/actions/toggleAll.d.ts +2 -0
- package/dist/datastar/actions/toggleAll.d.ts.map +1 -0
- package/dist/datastar/actions/toggleAll.js +13 -0
- package/dist/datastar/actions/toggleAll.js.map +1 -0
- package/dist/datastar/attributes/attr.d.ts +2 -0
- package/dist/datastar/attributes/attr.d.ts.map +1 -0
- package/dist/datastar/attributes/attr.js +49 -0
- package/dist/datastar/attributes/attr.js.map +1 -0
- package/dist/datastar/attributes/bind.d.ts +2 -0
- package/dist/datastar/attributes/bind.d.ts.map +1 -0
- package/dist/datastar/attributes/bind.js +176 -0
- package/dist/datastar/attributes/bind.js.map +1 -0
- package/dist/datastar/attributes/class.d.ts +2 -0
- package/dist/datastar/attributes/class.d.ts.map +1 -0
- package/dist/datastar/attributes/class.js +48 -0
- package/dist/datastar/attributes/class.js.map +1 -0
- package/dist/datastar/attributes/computed.d.ts +2 -0
- package/dist/datastar/attributes/computed.d.ts.map +1 -0
- package/dist/datastar/attributes/computed.js +27 -0
- package/dist/datastar/attributes/computed.js.map +1 -0
- package/dist/datastar/attributes/effect.d.ts +2 -0
- package/dist/datastar/attributes/effect.d.ts.map +1 -0
- package/dist/datastar/attributes/effect.js +10 -0
- package/dist/datastar/attributes/effect.js.map +1 -0
- package/dist/datastar/attributes/indicator.d.ts +2 -0
- package/dist/datastar/attributes/indicator.d.ts.map +1 -0
- package/dist/datastar/attributes/indicator.js +31 -0
- package/dist/datastar/attributes/indicator.js.map +1 -0
- package/dist/datastar/attributes/init.d.ts +2 -0
- package/dist/datastar/attributes/init.d.ts.map +1 -0
- package/dist/datastar/attributes/init.js +27 -0
- package/dist/datastar/attributes/init.js.map +1 -0
- package/dist/datastar/attributes/jsonSignals.d.ts +2 -0
- package/dist/datastar/attributes/jsonSignals.d.ts.map +1 -0
- package/dist/datastar/attributes/jsonSignals.js +31 -0
- package/dist/datastar/attributes/jsonSignals.js.map +1 -0
- package/dist/datastar/attributes/on.d.ts +2 -0
- package/dist/datastar/attributes/on.d.ts.map +1 -0
- package/dist/datastar/attributes/on.js +79 -0
- package/dist/datastar/attributes/on.js.map +1 -0
- package/dist/datastar/attributes/onIntersect.d.ts +2 -0
- package/dist/datastar/attributes/onIntersect.d.ts.map +1 -0
- package/dist/datastar/attributes/onIntersect.js +54 -0
- package/dist/datastar/attributes/onIntersect.js.map +1 -0
- package/dist/datastar/attributes/onInterval.d.ts +2 -0
- package/dist/datastar/attributes/onInterval.d.ts.map +1 -0
- package/dist/datastar/attributes/onInterval.js +31 -0
- package/dist/datastar/attributes/onInterval.js.map +1 -0
- package/dist/datastar/attributes/onSignalPatch.d.ts +2 -0
- package/dist/datastar/attributes/onSignalPatch.d.ts.map +1 -0
- package/dist/datastar/attributes/onSignalPatch.js +43 -0
- package/dist/datastar/attributes/onSignalPatch.js.map +1 -0
- package/dist/datastar/attributes/ref.d.ts +2 -0
- package/dist/datastar/attributes/ref.d.ts.map +1 -0
- package/dist/datastar/attributes/ref.js +11 -0
- package/dist/datastar/attributes/ref.js.map +1 -0
- package/dist/datastar/attributes/show.d.ts +2 -0
- package/dist/datastar/attributes/show.d.ts.map +1 -0
- package/dist/datastar/attributes/show.js +32 -0
- package/dist/datastar/attributes/show.js.map +1 -0
- package/dist/datastar/attributes/signals.d.ts +2 -0
- package/dist/datastar/attributes/signals.d.ts.map +1 -0
- package/dist/datastar/attributes/signals.js +18 -0
- package/dist/datastar/attributes/signals.js.map +1 -0
- package/dist/datastar/attributes/style.d.ts +2 -0
- package/dist/datastar/attributes/style.d.ts.map +1 -0
- package/dist/datastar/attributes/style.js +51 -0
- package/dist/datastar/attributes/style.js.map +1 -0
- package/dist/datastar/attributes/text.d.ts +2 -0
- package/dist/datastar/attributes/text.d.ts.map +1 -0
- package/dist/datastar/attributes/text.js +27 -0
- package/dist/datastar/attributes/text.js.map +1 -0
- package/dist/datastar/engine.d.ts +163 -0
- package/dist/datastar/engine.d.ts.map +1 -0
- package/dist/datastar/engine.js +1000 -0
- package/dist/datastar/engine.js.map +1 -0
- package/dist/datastar/index.d.ts +25 -0
- package/dist/datastar/index.d.ts.map +1 -0
- package/dist/datastar/index.js +25 -0
- package/dist/datastar/index.js.map +1 -0
- package/dist/datastar/utils.d.ts +52 -0
- package/dist/datastar/utils.d.ts.map +1 -0
- package/dist/datastar/utils.js +203 -0
- package/dist/datastar/utils.js.map +1 -0
- package/dist/datastar/watchers/patchElements.d.ts +2 -0
- package/dist/datastar/watchers/patchElements.d.ts.map +1 -0
- package/dist/datastar/watchers/patchElements.js +398 -0
- package/dist/datastar/watchers/patchElements.js.map +1 -0
- package/dist/datastar/watchers/patchSignals.d.ts +2 -0
- package/dist/datastar/watchers/patchSignals.d.ts.map +1 -0
- package/dist/datastar/watchers/patchSignals.js +15 -0
- package/dist/datastar/watchers/patchSignals.js.map +1 -0
- package/dist/experimental/EncryptedCookies.d.ts +49 -0
- package/dist/experimental/EncryptedCookies.d.ts.map +1 -0
- package/dist/experimental/EncryptedCookies.js +213 -0
- package/dist/experimental/EncryptedCookies.js.map +1 -0
- package/dist/experimental/index.d.ts +2 -0
- package/dist/experimental/index.d.ts.map +1 -0
- package/dist/experimental/index.js +2 -0
- package/dist/experimental/index.js.map +1 -0
- package/dist/hyper/Hyper.d.ts +26 -0
- package/dist/hyper/Hyper.d.ts.map +1 -0
- package/dist/hyper/Hyper.js +24 -0
- package/dist/hyper/Hyper.js.map +1 -0
- package/dist/hyper/HyperHtml.d.ts +24 -0
- package/dist/hyper/HyperHtml.d.ts.map +1 -0
- package/dist/hyper/HyperHtml.js +153 -0
- package/dist/hyper/HyperHtml.js.map +1 -0
- package/dist/hyper/HyperHtml.test.d.ts +2 -0
- package/dist/hyper/HyperHtml.test.d.ts.map +1 -0
- package/dist/hyper/HyperHtml.test.js +283 -0
- package/dist/hyper/HyperHtml.test.js.map +1 -0
- package/dist/hyper/HyperNode.d.ts +15 -0
- package/dist/hyper/HyperNode.d.ts.map +1 -0
- package/dist/hyper/HyperNode.js +12 -0
- package/dist/hyper/HyperNode.js.map +1 -0
- package/dist/hyper/HyperRoute.d.ts +9 -0
- package/dist/hyper/HyperRoute.d.ts.map +1 -0
- package/dist/hyper/HyperRoute.js +33 -0
- package/dist/hyper/HyperRoute.js.map +1 -0
- package/dist/hyper/HyperRoute.test.d.ts +2 -0
- package/dist/hyper/HyperRoute.test.d.ts.map +1 -0
- package/dist/hyper/HyperRoute.test.js +86 -0
- package/dist/hyper/HyperRoute.test.js.map +1 -0
- package/dist/hyper/html.d.ts +11 -0
- package/dist/hyper/html.d.ts.map +1 -0
- package/dist/hyper/html.js +31 -0
- package/dist/hyper/html.js.map +1 -0
- package/dist/hyper/index.d.ts +7 -0
- package/dist/hyper/index.d.ts.map +1 -0
- package/dist/hyper/index.js +6 -0
- package/dist/hyper/index.js.map +1 -0
- package/dist/hyper/jsx-runtime.d.ts +8 -0
- package/dist/hyper/jsx-runtime.d.ts.map +1 -0
- package/dist/hyper/jsx-runtime.js +9 -0
- package/dist/hyper/jsx-runtime.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/lint/plugin.d.ts +121 -0
- package/dist/lint/plugin.d.ts.map +1 -0
- package/dist/lint/plugin.js +537 -0
- package/dist/lint/plugin.js.map +1 -0
- package/dist/node/NodeFileSystem.d.ts +8 -0
- package/dist/node/NodeFileSystem.d.ts.map +1 -0
- package/dist/node/NodeFileSystem.js +411 -0
- package/dist/node/NodeFileSystem.js.map +1 -0
- package/dist/node/NodeUtils.d.ts +3 -0
- package/dist/node/NodeUtils.d.ts.map +1 -0
- package/dist/node/NodeUtils.js +21 -0
- package/dist/node/NodeUtils.js.map +1 -0
- package/dist/sql/SqlCache.d.ts +18 -0
- package/dist/sql/SqlCache.d.ts.map +1 -0
- package/dist/sql/SqlCache.js +31 -0
- package/dist/sql/SqlCache.js.map +1 -0
- package/dist/sql/SqlClient.d.ts +88 -0
- package/dist/sql/SqlClient.d.ts.map +1 -0
- package/dist/sql/SqlClient.js +171 -0
- package/dist/sql/SqlClient.js.map +1 -0
- package/dist/sql/bun/index.d.ts +6 -0
- package/dist/sql/bun/index.d.ts.map +1 -0
- package/dist/sql/bun/index.js +132 -0
- package/dist/sql/bun/index.js.map +1 -0
- package/dist/sql/index.d.ts +3 -0
- package/dist/sql/index.d.ts.map +1 -0
- package/dist/sql/index.js +3 -0
- package/dist/sql/index.js.map +1 -0
- package/dist/sql/libsql/index.d.ts +15 -0
- package/dist/sql/libsql/index.d.ts.map +1 -0
- package/dist/sql/libsql/index.js +132 -0
- package/dist/sql/libsql/index.js.map +1 -0
- package/dist/sql/mssql/index.d.ts +8 -0
- package/dist/sql/mssql/index.d.ts.map +1 -0
- package/dist/sql/mssql/index.js +145 -0
- package/dist/sql/mssql/index.js.map +1 -0
- package/dist/sql/postgres/index.d.ts +7 -0
- package/dist/sql/postgres/index.d.ts.map +1 -0
- package/dist/sql/postgres/index.js +136 -0
- package/dist/sql/postgres/index.js.map +1 -0
- package/dist/testing/TestLogger.d.ts +14 -0
- package/dist/testing/TestLogger.d.ts.map +1 -0
- package/dist/testing/TestLogger.js +33 -0
- package/dist/testing/TestLogger.js.map +1 -0
- package/dist/testing/index.d.ts +3 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +3 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/utils.d.ts +10 -0
- package/dist/testing/utils.d.ts.map +1 -0
- package/dist/testing/utils.js +40 -0
- package/dist/testing/utils.js.map +1 -0
- package/dist/tower/Simulation.d.ts +3 -0
- package/dist/tower/Simulation.d.ts.map +1 -0
- package/dist/tower/Simulation.js +606 -0
- package/dist/tower/Simulation.js.map +1 -0
- package/dist/tower/Tower.d.ts +11 -0
- package/dist/tower/Tower.d.ts.map +1 -0
- package/dist/tower/Tower.js +30 -0
- package/dist/tower/Tower.js.map +1 -0
- package/dist/tower/TowerErrors.d.ts +4 -0
- package/dist/tower/TowerErrors.d.ts.map +1 -0
- package/dist/tower/TowerErrors.js +200 -0
- package/dist/tower/TowerErrors.js.map +1 -0
- package/dist/tower/TowerLogger.d.ts +2 -0
- package/dist/tower/TowerLogger.d.ts.map +1 -0
- package/dist/tower/TowerLogger.js +46 -0
- package/dist/tower/TowerLogger.js.map +1 -0
- package/dist/tower/TowerMetrics.d.ts +4 -0
- package/dist/tower/TowerMetrics.d.ts.map +1 -0
- package/dist/tower/TowerMetrics.js +62 -0
- package/dist/tower/TowerMetrics.js.map +1 -0
- package/dist/tower/TowerProcess.d.ts +4 -0
- package/dist/tower/TowerProcess.d.ts.map +1 -0
- package/dist/tower/TowerProcess.js +50 -0
- package/dist/tower/TowerProcess.js.map +1 -0
- package/dist/tower/TowerStore.d.ts +199 -0
- package/dist/tower/TowerStore.d.ts.map +1 -0
- package/dist/tower/TowerStore.js +307 -0
- package/dist/tower/TowerStore.js.map +1 -0
- package/dist/tower/TowerTracer.d.ts +4 -0
- package/dist/tower/TowerTracer.d.ts.map +1 -0
- package/dist/tower/TowerTracer.js +111 -0
- package/dist/tower/TowerTracer.js.map +1 -0
- package/dist/tower/index.d.ts +4 -0
- package/dist/tower/index.d.ts.map +1 -0
- package/dist/tower/index.js +4 -0
- package/dist/tower/index.js.map +1 -0
- package/dist/tower/routes/errors/route.d.ts +11 -0
- package/dist/tower/routes/errors/route.d.ts.map +1 -0
- package/dist/tower/routes/errors/route.js +47 -0
- package/dist/tower/routes/errors/route.js.map +1 -0
- package/dist/tower/routes/fiberDetail.d.ts +17 -0
- package/dist/tower/routes/fiberDetail.d.ts.map +1 -0
- package/dist/tower/routes/fiberDetail.js +35 -0
- package/dist/tower/routes/fiberDetail.js.map +1 -0
- package/dist/tower/routes/fibers/route.d.ts +11 -0
- package/dist/tower/routes/fibers/route.d.ts.map +1 -0
- package/dist/tower/routes/fibers/route.js +27 -0
- package/dist/tower/routes/fibers/route.js.map +1 -0
- package/dist/tower/routes/layout.d.ts +10 -0
- package/dist/tower/routes/layout.d.ts.map +1 -0
- package/dist/tower/routes/layout.js +4 -0
- package/dist/tower/routes/layout.js.map +1 -0
- package/dist/tower/routes/logs/route.d.ts +11 -0
- package/dist/tower/routes/logs/route.d.ts.map +1 -0
- package/dist/tower/routes/logs/route.js +36 -0
- package/dist/tower/routes/logs/route.js.map +1 -0
- package/dist/tower/routes/metrics/route.d.ts +11 -0
- package/dist/tower/routes/metrics/route.d.ts.map +1 -0
- package/dist/tower/routes/metrics/route.js +20 -0
- package/dist/tower/routes/metrics/route.js.map +1 -0
- package/dist/tower/routes/route.d.ts +7 -0
- package/dist/tower/routes/route.d.ts.map +1 -0
- package/dist/tower/routes/route.js +6 -0
- package/dist/tower/routes/route.js.map +1 -0
- package/dist/tower/routes/routes/route.d.ts +7 -0
- package/dist/tower/routes/routes/route.d.ts.map +1 -0
- package/dist/tower/routes/routes/route.js +23 -0
- package/dist/tower/routes/routes/route.js.map +1 -0
- package/dist/tower/routes/services/route.d.ts +7 -0
- package/dist/tower/routes/services/route.d.ts.map +1 -0
- package/dist/tower/routes/services/route.js +15 -0
- package/dist/tower/routes/services/route.js.map +1 -0
- package/dist/tower/routes/system/route.d.ts +11 -0
- package/dist/tower/routes/system/route.d.ts.map +1 -0
- package/dist/tower/routes/system/route.js +21 -0
- package/dist/tower/routes/system/route.js.map +1 -0
- package/dist/tower/routes/traceDetail.d.ts +17 -0
- package/dist/tower/routes/traceDetail.d.ts.map +1 -0
- package/dist/tower/routes/traceDetail.js +20 -0
- package/dist/tower/routes/traceDetail.js.map +1 -0
- package/dist/tower/routes/traces/route.d.ts +11 -0
- package/dist/tower/routes/traces/route.d.ts.map +1 -0
- package/dist/tower/routes/traces/route.js +36 -0
- package/dist/tower/routes/traces/route.js.map +1 -0
- package/dist/tower/routes/tree.d.ts +142 -0
- package/dist/tower/routes/tree.d.ts.map +1 -0
- package/dist/tower/routes/tree.js +28 -0
- package/dist/tower/routes/tree.js.map +1 -0
- package/dist/tower/ui/Errors.d.ts +5 -0
- package/dist/tower/ui/Errors.d.ts.map +1 -0
- package/dist/tower/ui/Errors.js +30 -0
- package/dist/tower/ui/Errors.js.map +1 -0
- package/dist/tower/ui/Fibers.d.ts +25 -0
- package/dist/tower/ui/Fibers.d.ts.map +1 -0
- package/dist/tower/ui/Fibers.js +157 -0
- package/dist/tower/ui/Fibers.js.map +1 -0
- package/dist/tower/ui/Logs.d.ts +5 -0
- package/dist/tower/ui/Logs.d.ts.map +1 -0
- package/dist/tower/ui/Logs.js +28 -0
- package/dist/tower/ui/Logs.js.map +1 -0
- package/dist/tower/ui/Metrics.d.ts +5 -0
- package/dist/tower/ui/Metrics.d.ts.map +1 -0
- package/dist/tower/ui/Metrics.js +34 -0
- package/dist/tower/ui/Metrics.js.map +1 -0
- package/dist/tower/ui/Routes.d.ts +9 -0
- package/dist/tower/ui/Routes.d.ts.map +1 -0
- package/dist/tower/ui/Routes.js +79 -0
- package/dist/tower/ui/Routes.js.map +1 -0
- package/dist/tower/ui/Services.d.ts +11 -0
- package/dist/tower/ui/Services.d.ts.map +1 -0
- package/dist/tower/ui/Services.js +254 -0
- package/dist/tower/ui/Services.js.map +1 -0
- package/dist/tower/ui/Shell.d.ts +11 -0
- package/dist/tower/ui/Shell.d.ts.map +1 -0
- package/dist/tower/ui/Shell.js +12 -0
- package/dist/tower/ui/Shell.js.map +1 -0
- package/dist/tower/ui/System.d.ts +5 -0
- package/dist/tower/ui/System.d.ts.map +1 -0
- package/dist/tower/ui/System.js +65 -0
- package/dist/tower/ui/System.js.map +1 -0
- package/dist/tower/ui/Traces.d.ts +13 -0
- package/dist/tower/ui/Traces.d.ts.map +1 -0
- package/dist/tower/ui/Traces.js +219 -0
- package/dist/tower/ui/Traces.js.map +1 -0
- package/dist/x/cloudflare/CloudflareTunnel.d.ts +11 -0
- package/dist/x/cloudflare/CloudflareTunnel.d.ts.map +1 -0
- package/dist/x/cloudflare/CloudflareTunnel.js +31 -0
- package/dist/x/cloudflare/CloudflareTunnel.js.map +1 -0
- package/dist/x/cloudflare/index.d.ts +2 -0
- package/dist/x/cloudflare/index.d.ts.map +1 -0
- package/dist/x/cloudflare/index.js +2 -0
- package/dist/x/cloudflare/index.js.map +1 -0
- package/dist/x/tailscale/TailscaleTunnel.d.ts +16 -0
- package/dist/x/tailscale/TailscaleTunnel.d.ts.map +1 -0
- package/dist/x/tailscale/TailscaleTunnel.js +66 -0
- package/dist/x/tailscale/TailscaleTunnel.js.map +1 -0
- package/dist/x/tailscale/index.d.ts +2 -0
- package/dist/x/tailscale/index.d.ts.map +1 -0
- package/dist/x/tailscale/index.js +2 -0
- package/dist/x/tailscale/index.js.map +1 -0
- package/dist/x/tailwind/TailwindPlugin.d.ts +24 -0
- package/dist/x/tailwind/TailwindPlugin.d.ts.map +1 -0
- package/dist/x/tailwind/TailwindPlugin.js +220 -0
- package/dist/x/tailwind/TailwindPlugin.js.map +1 -0
- package/dist/x/tailwind/compile.d.ts +20 -0
- package/dist/x/tailwind/compile.d.ts.map +1 -0
- package/dist/x/tailwind/compile.js +155 -0
- package/dist/x/tailwind/compile.js.map +1 -0
- package/dist/x/tailwind/plugin.d.ts +3 -0
- package/dist/x/tailwind/plugin.d.ts.map +1 -0
- package/dist/x/tailwind/plugin.js +16 -0
- package/dist/x/tailwind/plugin.js.map +1 -0
- package/package.json +104 -23
- package/src/ChildProcess.ts +3 -6
- package/src/Docker.ts +190 -0
- package/src/Effectify.ts +7 -10
- package/src/FileSystem.ts +1 -4
- package/src/GlobalLayer.ts +85 -0
- package/src/PlatformRuntime.ts +8 -1
- package/src/RouteHook.ts +1 -1
- package/src/SqlIntrospect.ts +13 -11
- package/src/Start.ts +40 -29
- package/src/System.ts +60 -3
- package/src/Unique.ts +59 -0
- package/src/bun/BunChildProcessSpawner.ts +1 -8
- package/src/bun/BunRoute.ts +1 -0
- package/src/bun/BunRuntime.ts +2 -8
- package/src/bun/BunServer.ts +54 -2
- package/src/datastar/watchers/patchElements.ts +0 -1
- package/src/lint/plugin.js +146 -81
- package/src/sql/SqlCache.ts +50 -0
- package/src/sql/SqlClient.ts +59 -14
- package/src/sql/bun/index.ts +28 -26
- package/src/sql/index.ts +1 -0
- package/src/sql/libsql/index.ts +62 -28
- package/src/sql/mssql/index.ts +53 -57
- package/src/sql/postgres/index.ts +254 -0
- package/src/tower/Simulation.ts +776 -0
- package/src/tower/Tower.ts +47 -0
- package/src/tower/TowerErrors.ts +224 -0
- package/src/tower/TowerLogger.ts +52 -0
- package/src/tower/TowerMetrics.ts +72 -0
- package/src/tower/TowerProcess.ts +59 -0
- package/src/tower/TowerStore.ts +505 -0
- package/src/tower/TowerTracer.ts +128 -0
- package/src/tower/index.ts +3 -0
- package/src/tower/routes/errors/route.tsx +90 -0
- package/src/tower/routes/fiberDetail.tsx +51 -0
- package/src/tower/routes/fibers/route.tsx +46 -0
- package/src/tower/routes/layout.html +340 -0
- package/src/tower/routes/layout.tsx +4 -0
- package/src/tower/routes/logs/route.tsx +73 -0
- package/src/tower/routes/metrics/route.tsx +36 -0
- package/src/tower/routes/route.tsx +8 -0
- package/src/tower/routes/routes/route.tsx +30 -0
- package/src/tower/routes/services/route.tsx +21 -0
- package/src/tower/routes/system/route.tsx +43 -0
- package/src/tower/routes/traceDetail.tsx +30 -0
- package/src/tower/routes/traces/route.tsx +72 -0
- package/src/tower/routes/tree.ts +28 -0
- package/src/tower/ui/Errors.tsx +80 -0
- package/src/tower/ui/Fibers.tsx +336 -0
- package/src/tower/ui/Logs.tsx +50 -0
- package/src/tower/ui/Metrics.tsx +78 -0
- package/src/tower/ui/Routes.tsx +125 -0
- package/src/tower/ui/Services.tsx +273 -0
- package/src/tower/ui/Shell.tsx +74 -0
- package/src/tower/ui/System.tsx +141 -0
- package/src/tower/ui/Traces.tsx +419 -0
- package/src/x/cloudflare/CloudflareTunnel.ts +1 -1
- package/src/x/tailscale/TailscaleTunnel.ts +3 -3
- package/src/x/tailwind/compile.ts +6 -1
- package/src/sql/mssql/docker.ts +0 -117
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
import * as TowerStore from "../TowerStore.ts"
|
|
2
|
+
|
|
3
|
+
function formatDuration(ms: number | undefined): string {
|
|
4
|
+
if (ms == null) return "..."
|
|
5
|
+
if (ms < 1) return `${(ms * 1000).toFixed(0)}µs`
|
|
6
|
+
if (ms < 1000) return `${ms.toFixed(1)}ms`
|
|
7
|
+
return `${(ms / 1000).toFixed(2)}s`
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function statusColor(status: string): string {
|
|
11
|
+
if (status === "ok") return "#22c55e"
|
|
12
|
+
if (status === "error") return "#ef4444"
|
|
13
|
+
return "#eab308"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function KeyValue(options: { label: string; value: string | number | bigint | undefined | null }) {
|
|
17
|
+
if (options.value == null) return null
|
|
18
|
+
return (
|
|
19
|
+
<div style="display:flex;gap:8px;padding:4px 0;border-bottom:1px solid #1e293b;font-size:12px">
|
|
20
|
+
<span style="color:#64748b;min-width:120px">{options.label}</span>
|
|
21
|
+
<span style="color:#e2e8f0;font-family:monospace;word-break:break-all">
|
|
22
|
+
{String(options.value)}
|
|
23
|
+
</span>
|
|
24
|
+
</div>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function StatusBadge(options: { status: string }) {
|
|
29
|
+
const bg =
|
|
30
|
+
options.status === "ok" ? "#166534" : options.status === "error" ? "#7f1d1d" : "#713f12"
|
|
31
|
+
const fg =
|
|
32
|
+
options.status === "ok" ? "#4ade80" : options.status === "error" ? "#fca5a5" : "#fde047"
|
|
33
|
+
return (
|
|
34
|
+
<span style={`font-size:11px;padding:2px 8px;border-radius:4px;background:${bg};color:${fg}`}>
|
|
35
|
+
{options.status}
|
|
36
|
+
</span>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// --- Tree building ---
|
|
41
|
+
|
|
42
|
+
interface TreeSpan {
|
|
43
|
+
span: TowerStore.TowerSpan
|
|
44
|
+
depth: number
|
|
45
|
+
childCount: number
|
|
46
|
+
isLastChild: boolean
|
|
47
|
+
ancestorHasNextSibling: Array<boolean>
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function buildSpanTree(spans: Array<TowerStore.TowerSpan>): Array<TreeSpan> {
|
|
51
|
+
const byId = new Map<bigint, TowerStore.TowerSpan>()
|
|
52
|
+
const childrenOf = new Map<bigint, Array<TowerStore.TowerSpan>>()
|
|
53
|
+
|
|
54
|
+
for (const s of spans) {
|
|
55
|
+
byId.set(s.spanId, s)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const roots: Array<TowerStore.TowerSpan> = []
|
|
59
|
+
for (const s of spans) {
|
|
60
|
+
if (s.parentSpanId && byId.has(s.parentSpanId)) {
|
|
61
|
+
let children = childrenOf.get(s.parentSpanId)
|
|
62
|
+
if (!children) {
|
|
63
|
+
children = []
|
|
64
|
+
childrenOf.set(s.parentSpanId, children)
|
|
65
|
+
}
|
|
66
|
+
children.push(s)
|
|
67
|
+
} else {
|
|
68
|
+
roots.push(s)
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const sortByStart = (a: TowerStore.TowerSpan, b: TowerStore.TowerSpan) =>
|
|
73
|
+
Number(a.startTime - b.startTime)
|
|
74
|
+
|
|
75
|
+
roots.sort(sortByStart)
|
|
76
|
+
for (const children of childrenOf.values()) {
|
|
77
|
+
children.sort(sortByStart)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const result: Array<TreeSpan> = []
|
|
81
|
+
|
|
82
|
+
function walk(
|
|
83
|
+
span: TowerStore.TowerSpan,
|
|
84
|
+
depth: number,
|
|
85
|
+
isLast: boolean,
|
|
86
|
+
ancestors: Array<boolean>,
|
|
87
|
+
) {
|
|
88
|
+
const children = childrenOf.get(span.spanId) ?? []
|
|
89
|
+
result.push({
|
|
90
|
+
span,
|
|
91
|
+
depth,
|
|
92
|
+
childCount: children.length,
|
|
93
|
+
isLastChild: isLast,
|
|
94
|
+
ancestorHasNextSibling: [...ancestors],
|
|
95
|
+
})
|
|
96
|
+
for (let i = 0; i < children.length; i++) {
|
|
97
|
+
walk(children[i], depth + 1, i === children.length - 1, [...ancestors, !isLast])
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
for (let i = 0; i < roots.length; i++) {
|
|
102
|
+
walk(roots[i], 0, i === roots.length - 1, [])
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return result
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// --- Components ---
|
|
109
|
+
|
|
110
|
+
function TreeConnectors(options: { tree: TreeSpan }) {
|
|
111
|
+
if (options.tree.depth === 0) return null
|
|
112
|
+
|
|
113
|
+
const indent = options.tree.depth * 20
|
|
114
|
+
const elements: Array<any> = []
|
|
115
|
+
|
|
116
|
+
for (let i = 0; i < options.tree.ancestorHasNextSibling.length; i++) {
|
|
117
|
+
if (options.tree.ancestorHasNextSibling[i]) {
|
|
118
|
+
elements.push(<div class="wf-vline" style={`left:${i * 20 + 6}px`} />)
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (options.tree.isLastChild) {
|
|
123
|
+
elements.push(<div class="wf-elbow" style={`left:${(options.tree.depth - 1) * 20 + 6}px`} />)
|
|
124
|
+
} else {
|
|
125
|
+
elements.push(<div class="wf-vline" style={`left:${(options.tree.depth - 1) * 20 + 6}px`} />)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
elements.push(
|
|
129
|
+
<div class="wf-hline" style={`left:${(options.tree.depth - 1) * 20 + 6}px;top:50%`} />,
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
return (
|
|
133
|
+
<div class="wf-tree" style={`width:${indent}px;position:relative`}>
|
|
134
|
+
{elements}
|
|
135
|
+
</div>
|
|
136
|
+
)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function TimeAxis(options: { totalMs: number }) {
|
|
140
|
+
const ticks = 5
|
|
141
|
+
const labels: Array<string> = []
|
|
142
|
+
for (let i = 0; i <= ticks; i++) {
|
|
143
|
+
labels.push(formatDuration((options.totalMs / ticks) * i))
|
|
144
|
+
}
|
|
145
|
+
return (
|
|
146
|
+
<div class="wf-axis">
|
|
147
|
+
<div style="padding:4px 8px;color:#64748b;font-size:11px">Span</div>
|
|
148
|
+
<div class="wf-axis-ticks">
|
|
149
|
+
{labels.map((l) => (
|
|
150
|
+
<span>{l}</span>
|
|
151
|
+
))}
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
)
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function WaterfallRow(options: { tree: TreeSpan; totalMs: number; rootStart: bigint }) {
|
|
158
|
+
const s = options.tree.span
|
|
159
|
+
const offsetMs = Number(s.startTime - options.rootStart) / 1_000_000
|
|
160
|
+
const durMs = s.durationMs ?? 0
|
|
161
|
+
const leftPct = options.totalMs > 0 ? Math.min(100, (offsetMs / options.totalMs) * 100) : 0
|
|
162
|
+
const widthPct =
|
|
163
|
+
options.totalMs > 0
|
|
164
|
+
? Math.max(0.5, Math.min(100 - leftPct, (durMs / options.totalMs) * 100))
|
|
165
|
+
: 100
|
|
166
|
+
const color = statusColor(s.status)
|
|
167
|
+
|
|
168
|
+
const durLabelLeft = leftPct + widthPct + 0.5
|
|
169
|
+
|
|
170
|
+
return (
|
|
171
|
+
<div class="wf-row">
|
|
172
|
+
<div class="wf-name">
|
|
173
|
+
<TreeConnectors tree={options.tree} />
|
|
174
|
+
<span style="overflow:hidden;text-overflow:ellipsis">{s.name}</span>
|
|
175
|
+
{options.tree.childCount > 0 && <span class="wf-badge">{options.tree.childCount}</span>}
|
|
176
|
+
</div>
|
|
177
|
+
<div class="wf-bar-cell">
|
|
178
|
+
<div class="wf-bar" style={`left:${leftPct}%;width:${widthPct}%;background:${color}`} />
|
|
179
|
+
<div class="wf-dur" style={`left:${durLabelLeft}%`}>
|
|
180
|
+
{formatDuration(s.durationMs)}
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
)
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function MiniWaterfall(options: {
|
|
188
|
+
spans: Array<TowerStore.TowerSpan>
|
|
189
|
+
totalMs: number
|
|
190
|
+
rootStart: bigint
|
|
191
|
+
}) {
|
|
192
|
+
if (options.totalMs <= 0) return <div class="mini-wf" />
|
|
193
|
+
return (
|
|
194
|
+
<div class="mini-wf">
|
|
195
|
+
{options.spans.map((s) => {
|
|
196
|
+
const offsetMs = Number(s.startTime - options.rootStart) / 1_000_000
|
|
197
|
+
const durMs = s.durationMs ?? 0
|
|
198
|
+
const leftPct = Math.min(100, (offsetMs / options.totalMs) * 100)
|
|
199
|
+
const widthPct = Math.max(0.3, Math.min(100 - leftPct, (durMs / options.totalMs) * 100))
|
|
200
|
+
return (
|
|
201
|
+
<div
|
|
202
|
+
class="mini-wf-bar"
|
|
203
|
+
style={`left:${leftPct}%;width:${widthPct}%;background:${statusColor(s.status)}`}
|
|
204
|
+
/>
|
|
205
|
+
)
|
|
206
|
+
})}
|
|
207
|
+
</div>
|
|
208
|
+
)
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// --- Exports ---
|
|
212
|
+
|
|
213
|
+
export function groupByTraceId(
|
|
214
|
+
spans: Array<TowerStore.TowerSpan>,
|
|
215
|
+
): Map<bigint, Array<TowerStore.TowerSpan>> {
|
|
216
|
+
const groups = new Map<bigint, Array<TowerStore.TowerSpan>>()
|
|
217
|
+
for (const span of spans) {
|
|
218
|
+
let group = groups.get(span.traceId)
|
|
219
|
+
if (!group) {
|
|
220
|
+
group = []
|
|
221
|
+
groups.set(span.traceId, group)
|
|
222
|
+
}
|
|
223
|
+
group.push(span)
|
|
224
|
+
}
|
|
225
|
+
return groups
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export function TraceGroup(options: { spans: Array<TowerStore.TowerSpan> }) {
|
|
229
|
+
if (options.spans.length === 0) return null
|
|
230
|
+
const root = options.spans.find((s) => !s.parentSpanId) ?? options.spans[0]
|
|
231
|
+
const traceId = root.traceId
|
|
232
|
+
const totalMs = root.durationMs ?? 0
|
|
233
|
+
const rootStart = root.startTime
|
|
234
|
+
const hasError = options.spans.some((s) => s.status === "error")
|
|
235
|
+
const status = hasError ? "error" : root.status
|
|
236
|
+
|
|
237
|
+
return (
|
|
238
|
+
<details class="tl-row">
|
|
239
|
+
<summary class="tl-summary tl-cols">
|
|
240
|
+
<span class="tl-cell tl-cell-status">
|
|
241
|
+
<span
|
|
242
|
+
style={`width:8px;height:8px;border-radius:50%;background:${statusColor(status)};display:block`}
|
|
243
|
+
/>
|
|
244
|
+
</span>
|
|
245
|
+
<span class="tl-cell tl-cell-name">{root.name}</span>
|
|
246
|
+
<span class="tl-cell tl-cell-spans">{options.spans.length}</span>
|
|
247
|
+
<span class="tl-cell tl-cell-dur">{formatDuration(totalMs)}</span>
|
|
248
|
+
<span class="tl-cell tl-cell-id">{String(traceId).slice(0, 12)}</span>
|
|
249
|
+
</summary>
|
|
250
|
+
<div class="tl-body">
|
|
251
|
+
<div style="display:flex;gap:12px;align-items:center;margin-bottom:8px">
|
|
252
|
+
<a
|
|
253
|
+
href={`${TowerStore.store.prefix}/traces/${traceId}`}
|
|
254
|
+
style="color:#38bdf8;font-size:12px;text-decoration:none"
|
|
255
|
+
>
|
|
256
|
+
Full trace view
|
|
257
|
+
</a>
|
|
258
|
+
<StatusBadge status={status} />
|
|
259
|
+
<span style="color:#64748b;font-size:11px">
|
|
260
|
+
{options.spans.length} span{options.spans.length !== 1 ? "s" : ""}
|
|
261
|
+
</span>
|
|
262
|
+
<span style="color:#64748b;font-size:11px;font-family:monospace">
|
|
263
|
+
{formatDuration(totalMs)}
|
|
264
|
+
</span>
|
|
265
|
+
<span style="color:#475569;font-size:10px;font-family:monospace">{traceId}</span>
|
|
266
|
+
</div>
|
|
267
|
+
{options.spans.map((s) => {
|
|
268
|
+
const offsetMs = Number(s.startTime - rootStart) / 1_000_000
|
|
269
|
+
const leftPct = totalMs > 0 ? Math.min(100, (offsetMs / totalMs) * 100) : 0
|
|
270
|
+
const widthPct =
|
|
271
|
+
totalMs > 0
|
|
272
|
+
? Math.max(0.5, Math.min(100 - leftPct, ((s.durationMs ?? 0) / totalMs) * 100))
|
|
273
|
+
: 100
|
|
274
|
+
return (
|
|
275
|
+
<div style="display:flex;align-items:center;gap:8px;padding:2px 0;font-size:11px;font-family:monospace">
|
|
276
|
+
<span style={`color:${statusColor(s.status)};min-width:10px`}>
|
|
277
|
+
{s.parentSpanId ? " " : ""}
|
|
278
|
+
</span>
|
|
279
|
+
<span style="color:#d1d5db;min-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">
|
|
280
|
+
{s.name}
|
|
281
|
+
</span>
|
|
282
|
+
<div style="flex:1;height:10px;background:#1f2937;border-radius:2px;position:relative;overflow:hidden">
|
|
283
|
+
<div
|
|
284
|
+
style={`position:absolute;height:100%;border-radius:2px;background:${statusColor(s.status)};left:${leftPct}%;width:${widthPct}%`}
|
|
285
|
+
/>
|
|
286
|
+
</div>
|
|
287
|
+
<span style="color:#9ca3af;min-width:60px;text-align:right">
|
|
288
|
+
{formatDuration(s.durationMs)}
|
|
289
|
+
</span>
|
|
290
|
+
</div>
|
|
291
|
+
)
|
|
292
|
+
})}
|
|
293
|
+
</div>
|
|
294
|
+
</details>
|
|
295
|
+
)
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export function TraceGroups(options: { spans: Array<TowerStore.TowerSpan> }) {
|
|
299
|
+
const groups = groupByTraceId(options.spans)
|
|
300
|
+
const sorted = Array.from(groups.values())
|
|
301
|
+
.sort((a, b) => Number(b[0].startTime) - Number(a[0].startTime))
|
|
302
|
+
.slice(0, 50)
|
|
303
|
+
|
|
304
|
+
if (sorted.length === 0) {
|
|
305
|
+
return <div class="empty">Waiting for traces...</div>
|
|
306
|
+
}
|
|
307
|
+
return (
|
|
308
|
+
<div class="tl-grid">
|
|
309
|
+
<div class="tl-header tl-cols">
|
|
310
|
+
<span class="tl-cell tl-cell-status" />
|
|
311
|
+
<span class="tl-cell tl-cell-name">Name</span>
|
|
312
|
+
<span class="tl-cell tl-cell-spans">Spans</span>
|
|
313
|
+
<span class="tl-cell tl-cell-dur">Duration</span>
|
|
314
|
+
<span class="tl-cell tl-cell-id">Trace</span>
|
|
315
|
+
</div>
|
|
316
|
+
{sorted.map((group) => (
|
|
317
|
+
<TraceGroup spans={group} />
|
|
318
|
+
))}
|
|
319
|
+
</div>
|
|
320
|
+
)
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export function TraceDetail(options: { prefix: string; spans: Array<TowerStore.TowerSpan> }) {
|
|
324
|
+
if (options.spans.length === 0) {
|
|
325
|
+
return <div class="empty">Trace not found</div>
|
|
326
|
+
}
|
|
327
|
+
const root = options.spans.find((s) => !s.parentSpanId) ?? options.spans[0]
|
|
328
|
+
const traceId = root.traceId
|
|
329
|
+
const totalMs = root.durationMs ?? 0
|
|
330
|
+
const rootStart = root.startTime
|
|
331
|
+
const startDate = new Date(Number(rootStart) / 1_000_000)
|
|
332
|
+
const tree = buildSpanTree(options.spans)
|
|
333
|
+
|
|
334
|
+
return (
|
|
335
|
+
<>
|
|
336
|
+
<div style="padding:12px 16px;border-bottom:1px solid #1e293b">
|
|
337
|
+
<div style="display:flex;align-items:center;gap:8px;margin-bottom:8px">
|
|
338
|
+
<a
|
|
339
|
+
href={`${options.prefix}/traces`}
|
|
340
|
+
style="color:#64748b;text-decoration:none;font-size:12px"
|
|
341
|
+
>
|
|
342
|
+
Traces
|
|
343
|
+
</a>
|
|
344
|
+
<span style="color:#475569">/</span>
|
|
345
|
+
<span style="color:#e2e8f0;font-size:13px;font-family:monospace">{root.name}</span>
|
|
346
|
+
</div>
|
|
347
|
+
<div style="display:flex;gap:16px;font-size:12px;color:#94a3b8;align-items:center">
|
|
348
|
+
<StatusBadge status={root.status} />
|
|
349
|
+
<span>
|
|
350
|
+
{options.spans.length} span{options.spans.length !== 1 ? "s" : ""}
|
|
351
|
+
</span>
|
|
352
|
+
<span>{formatDuration(totalMs)}</span>
|
|
353
|
+
<span>{startDate.toLocaleTimeString("en", { hour12: false })}</span>
|
|
354
|
+
<span style="color:#475569;font-family:monospace;font-size:10px">{traceId}</span>
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
|
+
|
|
358
|
+
<div style="padding:8px 16px">
|
|
359
|
+
<MiniWaterfall spans={options.spans} totalMs={totalMs} rootStart={rootStart} />
|
|
360
|
+
</div>
|
|
361
|
+
|
|
362
|
+
<div style="padding:0 8px">
|
|
363
|
+
<TimeAxis totalMs={totalMs} />
|
|
364
|
+
<div class="wf-grid">
|
|
365
|
+
{tree.map((t) => (
|
|
366
|
+
<WaterfallRow tree={t} totalMs={totalMs} rootStart={rootStart} />
|
|
367
|
+
))}
|
|
368
|
+
</div>
|
|
369
|
+
</div>
|
|
370
|
+
|
|
371
|
+
<div style="padding:8px">
|
|
372
|
+
{tree.map((t) => {
|
|
373
|
+
const s = t.span
|
|
374
|
+
const stacktrace = s.attributes["code.stacktrace"] as string | undefined
|
|
375
|
+
const customAttrs = Object.entries(s.attributes).filter(([k]) => k !== "code.stacktrace")
|
|
376
|
+
|
|
377
|
+
return (
|
|
378
|
+
<details class="span-panel" style="margin-bottom:4px">
|
|
379
|
+
<summary class="span-panel-header">
|
|
380
|
+
<span
|
|
381
|
+
style={`width:8px;height:8px;border-radius:50%;background:${statusColor(s.status)};flex-shrink:0`}
|
|
382
|
+
/>
|
|
383
|
+
<span style="color:#e2e8f0;font-family:monospace;font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1">
|
|
384
|
+
{s.name}
|
|
385
|
+
</span>
|
|
386
|
+
<StatusBadge status={s.status} />
|
|
387
|
+
<span style="color:#64748b;font-size:11px;font-family:monospace;margin-left:auto">
|
|
388
|
+
{formatDuration(s.durationMs)}
|
|
389
|
+
</span>
|
|
390
|
+
</summary>
|
|
391
|
+
<div class="span-panel-body">
|
|
392
|
+
<KeyValue label="Span ID" value={s.spanId} />
|
|
393
|
+
<KeyValue label="Kind" value={s.kind} />
|
|
394
|
+
{s.parentSpanId && <KeyValue label="Parent" value={s.parentSpanId} />}
|
|
395
|
+
{stacktrace && <KeyValue label="Source" value={stacktrace} />}
|
|
396
|
+
{customAttrs.map(([k, v]) => (
|
|
397
|
+
<KeyValue label={k} value={String(v)} />
|
|
398
|
+
))}
|
|
399
|
+
{s.events.length > 0 && (
|
|
400
|
+
<div style="margin-top:4px">
|
|
401
|
+
<span style="color:#64748b;font-size:11px">Events:</span>
|
|
402
|
+
{s.events.map((ev) => (
|
|
403
|
+
<div style="padding:2px 0;font-size:11px;color:#94a3b8;font-family:monospace">
|
|
404
|
+
{ev.name}
|
|
405
|
+
{ev.attributes && (
|
|
406
|
+
<span style="color:#64748b"> {JSON.stringify(ev.attributes)}</span>
|
|
407
|
+
)}
|
|
408
|
+
</div>
|
|
409
|
+
))}
|
|
410
|
+
</div>
|
|
411
|
+
)}
|
|
412
|
+
</div>
|
|
413
|
+
</details>
|
|
414
|
+
)
|
|
415
|
+
})}
|
|
416
|
+
</div>
|
|
417
|
+
</>
|
|
418
|
+
)
|
|
419
|
+
}
|
|
@@ -20,7 +20,7 @@ export const start = (opts: {
|
|
|
20
20
|
opts.tunnelName,
|
|
21
21
|
].flatMap((v) => v)
|
|
22
22
|
|
|
23
|
-
const proc = yield* System.spawn(command, args)
|
|
23
|
+
const proc = yield* System.spawn([command, ...args])
|
|
24
24
|
|
|
25
25
|
yield* Effect.logInfo(
|
|
26
26
|
`Cloudflare tunnel started name=${opts.tunnelName} pid=${proc.pid} tunnelUrl=${
|
|
@@ -18,7 +18,7 @@ interface TailscaleStatus {
|
|
|
18
18
|
|
|
19
19
|
const getStatus = (command: string) =>
|
|
20
20
|
Effect.gen(function* () {
|
|
21
|
-
const proc = yield* System.spawn(command,
|
|
21
|
+
const proc = yield* System.spawn([command, "status", "--json"])
|
|
22
22
|
const exitCode = yield* proc.exitCode
|
|
23
23
|
|
|
24
24
|
if (exitCode !== 0) {
|
|
@@ -56,9 +56,9 @@ const serve = (opts: {
|
|
|
56
56
|
}) =>
|
|
57
57
|
Effect.gen(function* () {
|
|
58
58
|
const logPrefix = opts.logPrefix ?? "TailscaleTunnel: "
|
|
59
|
-
const
|
|
59
|
+
const subcommand = opts.public ? "funnel" : "serve"
|
|
60
60
|
|
|
61
|
-
const proc = yield* System.spawn(opts.command,
|
|
61
|
+
const proc = yield* System.spawn([opts.command, subcommand, String(opts.port)])
|
|
62
62
|
|
|
63
63
|
yield* Function.pipe(
|
|
64
64
|
Stream.merge(proc.stdout, proc.stderr),
|
|
@@ -29,7 +29,12 @@ function createCompileOptions(options: CompileOptions) {
|
|
|
29
29
|
return loadModule(id, base, options.onDependency, options.customJsResolver)
|
|
30
30
|
},
|
|
31
31
|
async loadStylesheet(id: string, sheetBase: string) {
|
|
32
|
-
let sheet = await loadStylesheet(
|
|
32
|
+
let sheet = await loadStylesheet(
|
|
33
|
+
id,
|
|
34
|
+
sheetBase,
|
|
35
|
+
options.onDependency,
|
|
36
|
+
options.customCssResolver,
|
|
37
|
+
)
|
|
33
38
|
|
|
34
39
|
return sheet
|
|
35
40
|
},
|
package/src/sql/mssql/docker.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect"
|
|
2
|
-
import * as Stream from "effect/Stream"
|
|
3
|
-
|
|
4
|
-
import type * as ChildProcess from "../../ChildProcess.ts"
|
|
5
|
-
import type * as PlatformError from "../../PlatformError.ts"
|
|
6
|
-
import type * as Mssql from "mssql"
|
|
7
|
-
import * as System from "../../System.ts"
|
|
8
|
-
import * as BunChildProcessSpawner from "../../bun/BunChildProcessSpawner.ts"
|
|
9
|
-
|
|
10
|
-
const PORT = 1433
|
|
11
|
-
const PASSWORD = "TestPass123"
|
|
12
|
-
const CONTAINER = "effect-start-mssql"
|
|
13
|
-
|
|
14
|
-
const exec = (
|
|
15
|
-
...args: Array<string>
|
|
16
|
-
): Effect.Effect<number, PlatformError.PlatformError, ChildProcess.ChildProcessSpawner> =>
|
|
17
|
-
Effect.scoped(
|
|
18
|
-
Effect.gen(function* () {
|
|
19
|
-
const handle = yield* System.spawn("docker", args, {
|
|
20
|
-
stdout: "ignore",
|
|
21
|
-
stderr: "inherit",
|
|
22
|
-
})
|
|
23
|
-
return yield* handle.exitCode
|
|
24
|
-
}),
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
const execStdout = (
|
|
28
|
-
...args: Array<string>
|
|
29
|
-
): Effect.Effect<string, PlatformError.PlatformError, ChildProcess.ChildProcessSpawner> =>
|
|
30
|
-
Effect.scoped(
|
|
31
|
-
Effect.gen(function* () {
|
|
32
|
-
const handle = yield* System.spawn("docker", args, {
|
|
33
|
-
stdout: "pipe",
|
|
34
|
-
stderr: "inherit",
|
|
35
|
-
})
|
|
36
|
-
const [stdout] = yield* Effect.all(
|
|
37
|
-
[handle.stdout.pipe(Stream.decodeText("utf-8"), Stream.mkString), handle.exitCode],
|
|
38
|
-
{ concurrency: 2 },
|
|
39
|
-
)
|
|
40
|
-
return stdout
|
|
41
|
-
}),
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
const containerRunning = execStdout("ps", "-q", "-f", `name=${CONTAINER}`).pipe(
|
|
45
|
-
Effect.map((stdout) => stdout.trim().length > 0),
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
const removeContainer = exec("rm", "-f", CONTAINER).pipe(Effect.ignore)
|
|
49
|
-
|
|
50
|
-
type MssqlModule = {
|
|
51
|
-
ConnectionPool: new (config: Mssql.config) => Mssql.ConnectionPool
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const loadMssql = () => import("mssql") as Promise<MssqlModule>
|
|
55
|
-
|
|
56
|
-
const canConnect = Effect.tryPromise({
|
|
57
|
-
try: async () => {
|
|
58
|
-
const { ConnectionPool } = await loadMssql()
|
|
59
|
-
const pool = new ConnectionPool({
|
|
60
|
-
server: "localhost",
|
|
61
|
-
user: "sa",
|
|
62
|
-
password: PASSWORD,
|
|
63
|
-
port: PORT,
|
|
64
|
-
options: { encrypt: true, trustServerCertificate: true, connectTimeout: 3000 },
|
|
65
|
-
})
|
|
66
|
-
await pool.connect()
|
|
67
|
-
await pool.close()
|
|
68
|
-
return true
|
|
69
|
-
},
|
|
70
|
-
catch: () => false as const,
|
|
71
|
-
}).pipe(Effect.orElseSucceed(() => false))
|
|
72
|
-
|
|
73
|
-
const waitReady = Effect.gen(function* () {
|
|
74
|
-
const deadline = Date.now() + 60_000
|
|
75
|
-
while (Date.now() < deadline) {
|
|
76
|
-
if (yield* canConnect) return
|
|
77
|
-
yield* Effect.sleep("2 seconds")
|
|
78
|
-
}
|
|
79
|
-
return yield* Effect.fail(new Error("Timed out waiting for MSSQL"))
|
|
80
|
-
})
|
|
81
|
-
|
|
82
|
-
const program = Effect.gen(function* () {
|
|
83
|
-
if (yield* containerRunning) {
|
|
84
|
-
yield* Effect.log("MSSQL container already running")
|
|
85
|
-
return
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
yield* removeContainer
|
|
89
|
-
|
|
90
|
-
yield* Effect.log("Starting MSSQL container...")
|
|
91
|
-
const code = yield* exec(
|
|
92
|
-
"run",
|
|
93
|
-
"-d",
|
|
94
|
-
"--name",
|
|
95
|
-
CONTAINER,
|
|
96
|
-
"-p",
|
|
97
|
-
`${PORT}:1433`,
|
|
98
|
-
"-e",
|
|
99
|
-
"ACCEPT_EULA=Y",
|
|
100
|
-
"-e",
|
|
101
|
-
`MSSQL_SA_PASSWORD=${PASSWORD}`,
|
|
102
|
-
"mcr.microsoft.com/azure-sql-edge",
|
|
103
|
-
)
|
|
104
|
-
if (code !== 0) {
|
|
105
|
-
return yield* Effect.fail(new Error(`docker run exited with code ${code}`))
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
yield* waitReady
|
|
109
|
-
yield* Effect.log("MSSQL ready")
|
|
110
|
-
})
|
|
111
|
-
|
|
112
|
-
const run = (effect: Effect.Effect<void, unknown, ChildProcess.ChildProcessSpawner>) =>
|
|
113
|
-
Effect.runPromise(Effect.provide(effect, BunChildProcessSpawner.layer))
|
|
114
|
-
|
|
115
|
-
export const start = () => run(program)
|
|
116
|
-
|
|
117
|
-
export const stop = () => run(removeContainer)
|