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,78 @@
|
|
|
1
|
+
import type * as TowerStore from "../TowerStore.ts"
|
|
2
|
+
|
|
3
|
+
function MetricValue(options: { metric: TowerStore.TowerMetricSnapshot }) {
|
|
4
|
+
if (options.metric.type === "counter" || options.metric.type === "gauge") {
|
|
5
|
+
return (
|
|
6
|
+
<div style="font-size:32px;font-weight:700;color:#e5e7eb;font-family:monospace;line-height:1.1">
|
|
7
|
+
{String(options.metric.value)}
|
|
8
|
+
</div>
|
|
9
|
+
)
|
|
10
|
+
}
|
|
11
|
+
if (options.metric.type === "histogram") {
|
|
12
|
+
const h = options.metric.value as { count: number; sum: number; min: number; max: number }
|
|
13
|
+
return (
|
|
14
|
+
<div style="display:grid;grid-template-columns:auto auto;gap:2px 12px;font-size:12px;font-family:monospace">
|
|
15
|
+
<span style="color:#6b7280">count</span>
|
|
16
|
+
<span style="color:#e5e7eb">{h.count}</span>
|
|
17
|
+
<span style="color:#6b7280">sum</span>
|
|
18
|
+
<span style="color:#e5e7eb">{h.sum.toFixed(2)}</span>
|
|
19
|
+
<span style="color:#6b7280">min</span>
|
|
20
|
+
<span style="color:#e5e7eb">{h.min.toFixed(2)}</span>
|
|
21
|
+
<span style="color:#6b7280">max</span>
|
|
22
|
+
<span style="color:#e5e7eb">{h.max.toFixed(2)}</span>
|
|
23
|
+
</div>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
if (options.metric.type === "frequency") {
|
|
27
|
+
const occ = options.metric.value as Record<string, number>
|
|
28
|
+
return (
|
|
29
|
+
<div style="display:grid;grid-template-columns:auto auto;gap:2px 12px;font-size:12px;font-family:monospace">
|
|
30
|
+
{Object.entries(occ)
|
|
31
|
+
.slice(0, 10)
|
|
32
|
+
.map(([k, v]) => (
|
|
33
|
+
<>
|
|
34
|
+
<span style="color:#6b7280">{k}</span>
|
|
35
|
+
<span style="color:#e5e7eb">{v}</span>
|
|
36
|
+
</>
|
|
37
|
+
))}
|
|
38
|
+
</div>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
return (
|
|
42
|
+
<pre style="font-size:11px;color:#9ca3af;margin:0;white-space:pre-wrap">
|
|
43
|
+
{JSON.stringify(options.metric.value, null, 2)}
|
|
44
|
+
</pre>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function MetricCard(options: { metric: TowerStore.TowerMetricSnapshot }) {
|
|
49
|
+
return (
|
|
50
|
+
<div style="background:#111827;border:1px solid #374151;border-radius:6px;padding:12px;min-width:200px">
|
|
51
|
+
<div style="display:flex;align-items:center;gap:8px;margin-bottom:8px">
|
|
52
|
+
<span style="color:#d1d5db;font-size:13px;font-weight:600">{options.metric.name}</span>
|
|
53
|
+
<span style="font-size:10px;padding:1px 6px;border-radius:4px;background:#1e3a5f;color:#60a5fa">
|
|
54
|
+
{options.metric.type}
|
|
55
|
+
</span>
|
|
56
|
+
</div>
|
|
57
|
+
<MetricValue metric={options.metric} />
|
|
58
|
+
{options.metric.tags.length > 0 && (
|
|
59
|
+
<div style="font-size:10px;color:#6b7280;margin-top:4px">
|
|
60
|
+
{options.metric.tags.map((t) => `${t.key}=${t.value}`).join(" ")}
|
|
61
|
+
</div>
|
|
62
|
+
)}
|
|
63
|
+
</div>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function MetricsGrid(options: { metrics: Array<TowerStore.TowerMetricSnapshot> }) {
|
|
68
|
+
if (options.metrics.length === 0) {
|
|
69
|
+
return <div class="empty">Waiting for metrics...</div>
|
|
70
|
+
}
|
|
71
|
+
return (
|
|
72
|
+
<>
|
|
73
|
+
{options.metrics.map((m) => (
|
|
74
|
+
<MetricCard metric={m} />
|
|
75
|
+
))}
|
|
76
|
+
</>
|
|
77
|
+
)
|
|
78
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
export interface RouteInfo {
|
|
2
|
+
readonly method: string
|
|
3
|
+
readonly path: string
|
|
4
|
+
readonly format: string | undefined
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function groupByPath(routes: Array<RouteInfo>): Array<{ path: string; routes: Array<RouteInfo> }> {
|
|
8
|
+
const byPath = new Map<string, Array<RouteInfo>>()
|
|
9
|
+
for (const r of routes) {
|
|
10
|
+
let group = byPath.get(r.path)
|
|
11
|
+
if (!group) {
|
|
12
|
+
group = []
|
|
13
|
+
byPath.set(r.path, group)
|
|
14
|
+
}
|
|
15
|
+
group.push(r)
|
|
16
|
+
}
|
|
17
|
+
return Array.from(byPath, ([path, routes]) => ({
|
|
18
|
+
path,
|
|
19
|
+
routes: routes.sort((a, b) => methodOrder.indexOf(a.method) - methodOrder.indexOf(b.method)),
|
|
20
|
+
})).sort((a, b) => a.path.localeCompare(b.path))
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function methodColor(method: string): string {
|
|
24
|
+
if (method === "GET") return "#22c55e"
|
|
25
|
+
if (method === "POST") return "#3b82f6"
|
|
26
|
+
if (method === "PUT") return "#f59e0b"
|
|
27
|
+
if (method === "DELETE") return "#ef4444"
|
|
28
|
+
if (method === "PATCH") return "#a855f7"
|
|
29
|
+
if (method === "*") return "#6b7280"
|
|
30
|
+
return "#94a3b8"
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function methodBg(method: string): string {
|
|
34
|
+
if (method === "GET") return "#052e16"
|
|
35
|
+
if (method === "POST") return "#172554"
|
|
36
|
+
if (method === "PUT") return "#422006"
|
|
37
|
+
if (method === "DELETE") return "#450a0a"
|
|
38
|
+
if (method === "PATCH") return "#3b0764"
|
|
39
|
+
return "#1e293b"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const methodOrder = ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS", "*"]
|
|
43
|
+
|
|
44
|
+
function MethodBadge(options: { method: string }) {
|
|
45
|
+
return (
|
|
46
|
+
<span
|
|
47
|
+
style={`font-size:10px;font-weight:700;font-family:monospace;padding:2px 6px;border-radius:3px;background:${methodBg(options.method)};color:${methodColor(options.method)};min-width:48px;text-align:center;display:inline-block`}
|
|
48
|
+
>
|
|
49
|
+
{options.method}
|
|
50
|
+
</span>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function FormatBadge(options: { format: string }) {
|
|
55
|
+
return (
|
|
56
|
+
<span style="font-size:10px;padding:1px 6px;border-radius:3px;background:#1e3a5f;color:#60a5fa">
|
|
57
|
+
{options.format}
|
|
58
|
+
</span>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function ColoredPath(options: { path: string }) {
|
|
63
|
+
const segments = options.path.split("/").filter(Boolean)
|
|
64
|
+
return (
|
|
65
|
+
<span style="font-family:monospace;font-size:13px">
|
|
66
|
+
{segments.length === 0 ? (
|
|
67
|
+
<span style="color:#e2e8f0">/</span>
|
|
68
|
+
) : (
|
|
69
|
+
segments.map((seg) => {
|
|
70
|
+
const isParam = seg.startsWith(":")
|
|
71
|
+
return (
|
|
72
|
+
<>
|
|
73
|
+
<span style="color:#475569">/</span>
|
|
74
|
+
<span style={isParam ? "color:#c084fc" : "color:#e2e8f0"}>{seg}</span>
|
|
75
|
+
</>
|
|
76
|
+
)
|
|
77
|
+
})
|
|
78
|
+
)}
|
|
79
|
+
</span>
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function PathGroup(options: { path: string; routes: Array<RouteInfo> }) {
|
|
84
|
+
return (
|
|
85
|
+
<div style="padding:8px 12px;border-bottom:1px solid #1e293b">
|
|
86
|
+
<div style="margin-bottom:4px">
|
|
87
|
+
<ColoredPath path={options.path} />
|
|
88
|
+
</div>
|
|
89
|
+
<div style="display:flex;flex-wrap:wrap;gap:4px">
|
|
90
|
+
{options.routes.map((r) => (
|
|
91
|
+
<div style="display:flex;align-items:center;gap:6px">
|
|
92
|
+
<MethodBadge method={r.method} />
|
|
93
|
+
{r.format && <FormatBadge format={r.format} />}
|
|
94
|
+
</div>
|
|
95
|
+
))}
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function RouteList(options: { routes: Array<RouteInfo> }) {
|
|
102
|
+
if (options.routes.length === 0) {
|
|
103
|
+
return <div class="empty">No routes registered</div>
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const groups = groupByPath(options.routes)
|
|
107
|
+
const routeCount = options.routes.length
|
|
108
|
+
const pathCount = groups.length
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<>
|
|
112
|
+
<div style="padding:8px 12px;border-bottom:1px solid #1e293b;display:flex;gap:16px;font-size:12px;color:#64748b">
|
|
113
|
+
<span>
|
|
114
|
+
{pathCount} path{pathCount !== 1 ? "s" : ""}
|
|
115
|
+
</span>
|
|
116
|
+
<span>
|
|
117
|
+
{routeCount} route{routeCount !== 1 ? "s" : ""}
|
|
118
|
+
</span>
|
|
119
|
+
</div>
|
|
120
|
+
{groups.map((g) => (
|
|
121
|
+
<PathGroup path={g.path} routes={g.routes} />
|
|
122
|
+
))}
|
|
123
|
+
</>
|
|
124
|
+
)
|
|
125
|
+
}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import * as Option from "effect/Option"
|
|
2
|
+
|
|
3
|
+
const EffectTypeIds: Record<symbol, string> = {
|
|
4
|
+
[Symbol.for("effect/Ref")]: "Ref",
|
|
5
|
+
[Symbol.for("effect/SynchronizedRef")]: "SynchronizedRef",
|
|
6
|
+
[Symbol.for("effect/QueueDequeue")]: "Dequeue",
|
|
7
|
+
[Symbol.for("effect/QueueEnqueue")]: "Enqueue",
|
|
8
|
+
[Symbol.for("effect/Pool")]: "Pool",
|
|
9
|
+
[Symbol.for("effect/Deferred")]: "Deferred",
|
|
10
|
+
[Symbol.for("effect/FiberRef")]: "FiberRef",
|
|
11
|
+
[Symbol.for("effect/Scope")]: "Scope",
|
|
12
|
+
[Symbol.for("effect/Tracer")]: "Tracer",
|
|
13
|
+
[Symbol.for("effect/Request/Cache")]: "RequestCache",
|
|
14
|
+
[Symbol.for("effect/Logger")]: "Logger",
|
|
15
|
+
[Symbol.for("effect/Supervisor")]: "Supervisor",
|
|
16
|
+
[Symbol.for("effect/Clock")]: "Clock",
|
|
17
|
+
[Symbol.for("effect/Random")]: "Random",
|
|
18
|
+
[Symbol.for("effect/KeyValueStore")]: "KeyValueStore",
|
|
19
|
+
[Symbol.for("effect/RateLimiter")]: "RateLimiter",
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function detectEffectType(value: unknown): string | undefined {
|
|
23
|
+
if (value === null || value === undefined || typeof value !== "object") return undefined
|
|
24
|
+
if ("publish" in value && "subscribe" in value && "offer" in value) return "PubSub"
|
|
25
|
+
for (const sym of Object.getOwnPropertySymbols(value)) {
|
|
26
|
+
const name = EffectTypeIds[sym]
|
|
27
|
+
if (name) return name
|
|
28
|
+
}
|
|
29
|
+
return undefined
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function inspectEffectValue(type: string, value: any): Record<string, unknown> {
|
|
33
|
+
const info: Record<string, unknown> = { _type: type }
|
|
34
|
+
try {
|
|
35
|
+
switch (type) {
|
|
36
|
+
case "PubSub": {
|
|
37
|
+
if (typeof value.capacity === "function") info.capacity = value.capacity()
|
|
38
|
+
if (typeof value.isActive === "function") info.active = value.isActive()
|
|
39
|
+
if (typeof value.unsafeSize === "function") {
|
|
40
|
+
const size = value.unsafeSize()
|
|
41
|
+
info.size = Option.isSome(size) ? size.value : "shutdown"
|
|
42
|
+
}
|
|
43
|
+
if (value.pubsub && typeof value.pubsub.subscriberCount === "number") {
|
|
44
|
+
info.subscribers = value.pubsub.subscriberCount
|
|
45
|
+
}
|
|
46
|
+
break
|
|
47
|
+
}
|
|
48
|
+
case "Enqueue":
|
|
49
|
+
case "Dequeue": {
|
|
50
|
+
if (typeof value.capacity === "function") info.capacity = value.capacity()
|
|
51
|
+
if (typeof value.isActive === "function") info.active = value.isActive()
|
|
52
|
+
if (typeof value.unsafeSize === "function") {
|
|
53
|
+
const size = value.unsafeSize()
|
|
54
|
+
info.size = Option.isSome(size) ? size.value : "shutdown"
|
|
55
|
+
}
|
|
56
|
+
break
|
|
57
|
+
}
|
|
58
|
+
case "Ref":
|
|
59
|
+
case "SynchronizedRef": {
|
|
60
|
+
if (value.ref && "current" in value.ref) {
|
|
61
|
+
const current = value.ref.current
|
|
62
|
+
info.value = safeSerialize(current)
|
|
63
|
+
}
|
|
64
|
+
break
|
|
65
|
+
}
|
|
66
|
+
case "Pool": {
|
|
67
|
+
if (typeof value.minSize === "number") info.minSize = value.minSize
|
|
68
|
+
if (typeof value.maxSize === "number") info.maxSize = value.maxSize
|
|
69
|
+
if (typeof value.concurrency === "number") info.concurrency = value.concurrency
|
|
70
|
+
if (value.items instanceof Set) info.items = value.items.size
|
|
71
|
+
if (value.available instanceof Set) info.available = value.available.size
|
|
72
|
+
if (value.invalidated instanceof Set) info.invalidated = value.invalidated.size
|
|
73
|
+
if (typeof value.waiters === "number") info.waiters = value.waiters
|
|
74
|
+
break
|
|
75
|
+
}
|
|
76
|
+
case "FiberRef": {
|
|
77
|
+
if ("initial" in value) info.initial = safeSerialize(value.initial)
|
|
78
|
+
break
|
|
79
|
+
}
|
|
80
|
+
case "Deferred": {
|
|
81
|
+
if ("state" in value && value.state) {
|
|
82
|
+
const state = value.state
|
|
83
|
+
if (typeof state === "object" && "_tag" in state) {
|
|
84
|
+
info.status = state._tag
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
break
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
} catch {
|
|
91
|
+
// ignore introspection errors
|
|
92
|
+
}
|
|
93
|
+
return info
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function safeSerialize(value: unknown): unknown {
|
|
97
|
+
if (value === null || value === undefined) return value
|
|
98
|
+
if (typeof value === "bigint") return `${value}n`
|
|
99
|
+
if (typeof value === "function") return "<function>"
|
|
100
|
+
if (typeof value === "symbol") return value.toString()
|
|
101
|
+
if (typeof value !== "object") return value
|
|
102
|
+
if (detectEffectType(value)) return `<${detectEffectType(value)}>`
|
|
103
|
+
if (Array.isArray(value)) return value.map(safeSerialize)
|
|
104
|
+
const proto = Object.getPrototypeOf(value)
|
|
105
|
+
if (proto !== null && proto !== Object.prototype)
|
|
106
|
+
return `<${proto.constructor?.name ?? "object"}>`
|
|
107
|
+
const out: Record<string, unknown> = {}
|
|
108
|
+
for (const [k, v] of Object.entries(value)) {
|
|
109
|
+
if (typeof v === "function") continue
|
|
110
|
+
out[k] = safeSerialize(v)
|
|
111
|
+
}
|
|
112
|
+
return out
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface ServiceEntry {
|
|
116
|
+
readonly key: string
|
|
117
|
+
readonly kind: string
|
|
118
|
+
readonly display: string
|
|
119
|
+
readonly type: "config" | "value" | "effect"
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function isJsonPrimitive(value: unknown): boolean {
|
|
123
|
+
if (value === null) return true
|
|
124
|
+
const t = typeof value
|
|
125
|
+
return t === "string" || t === "number" || t === "boolean" || t === "bigint"
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function isPlainJson(value: unknown): boolean {
|
|
129
|
+
if (isJsonPrimitive(value)) return true
|
|
130
|
+
if (Array.isArray(value)) return value.every(isPlainJson)
|
|
131
|
+
if (typeof value === "object" && value !== null) {
|
|
132
|
+
const proto = Object.getPrototypeOf(value)
|
|
133
|
+
if (proto !== null && proto !== Object.prototype) return false
|
|
134
|
+
return Object.values(value).every(isPlainJson)
|
|
135
|
+
}
|
|
136
|
+
return false
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function jsonReplacer(_key: string, v: unknown): unknown {
|
|
140
|
+
if (typeof v === "bigint") return `${v}n`
|
|
141
|
+
return v
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function collectDisplayValues(obj: unknown, prefix: string, out: Record<string, unknown>): void {
|
|
145
|
+
if (typeof obj === "function") return
|
|
146
|
+
if (isJsonPrimitive(obj) || Array.isArray(obj)) {
|
|
147
|
+
out[prefix] = safeSerialize(obj)
|
|
148
|
+
return
|
|
149
|
+
}
|
|
150
|
+
if (typeof obj === "object" && obj !== null) {
|
|
151
|
+
const et = detectEffectType(obj)
|
|
152
|
+
if (et) {
|
|
153
|
+
out[prefix || et] = inspectEffectValue(et, obj)
|
|
154
|
+
return
|
|
155
|
+
}
|
|
156
|
+
for (const [k, v] of Object.entries(obj)) {
|
|
157
|
+
if (typeof v === "function") continue
|
|
158
|
+
const path = prefix ? `${prefix}.${k}` : k
|
|
159
|
+
if (isPlainJson(v)) {
|
|
160
|
+
out[path] = safeSerialize(v)
|
|
161
|
+
} else if (typeof v === "object" && v !== null) {
|
|
162
|
+
collectDisplayValues(v, path, out)
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function kindColor(kind: string): { bg: string; fg: string } {
|
|
169
|
+
if (kind === "config") return { bg: "#2d1f0e", fg: "#fbbf24" }
|
|
170
|
+
if (kind === "effect") return { bg: "#2d1a3e", fg: "#c084fc" }
|
|
171
|
+
if (kind === "empty") return { bg: "#1f2937", fg: "#64748b" }
|
|
172
|
+
if (kind === "function") return { bg: "#1a2e1a", fg: "#4ade80" }
|
|
173
|
+
return { bg: "#1e3a5f", fg: "#60a5fa" }
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function ServiceRow(options: { entry: ServiceEntry }) {
|
|
177
|
+
const colors = kindColor(options.entry.type)
|
|
178
|
+
return (
|
|
179
|
+
<details class="tl-row">
|
|
180
|
+
<summary class="tl-summary tl-cols">
|
|
181
|
+
<span class="tl-cell tl-cell-status">
|
|
182
|
+
<span
|
|
183
|
+
style={`width:8px;height:8px;border-radius:50%;background:${colors.fg};display:block`}
|
|
184
|
+
/>
|
|
185
|
+
</span>
|
|
186
|
+
<span class="tl-cell tl-cell-name">{options.entry.key}</span>
|
|
187
|
+
<span class="tl-cell tl-cell-dur">
|
|
188
|
+
<span
|
|
189
|
+
style={`font-size:10px;padding:1px 6px;border-radius:4px;background:${colors.bg};color:${colors.fg}`}
|
|
190
|
+
>
|
|
191
|
+
{options.entry.kind}
|
|
192
|
+
</span>
|
|
193
|
+
</span>
|
|
194
|
+
</summary>
|
|
195
|
+
<div class="tl-body">
|
|
196
|
+
{options.entry.display ? (
|
|
197
|
+
<pre style="color:#e2e8f0;font-family:monospace;font-size:12px;margin:0;padding:8px;white-space:pre-wrap;word-break:break-all">
|
|
198
|
+
{options.entry.display}
|
|
199
|
+
</pre>
|
|
200
|
+
) : (
|
|
201
|
+
<div style="padding:4px 8px;color:#64748b;font-size:12px">No inspectable values</div>
|
|
202
|
+
)}
|
|
203
|
+
</div>
|
|
204
|
+
</details>
|
|
205
|
+
)
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export function ServiceList(options: { services: Array<ServiceEntry> }) {
|
|
209
|
+
if (options.services.length === 0) {
|
|
210
|
+
return <div class="empty">No services registered</div>
|
|
211
|
+
}
|
|
212
|
+
return (
|
|
213
|
+
<div class="tl-grid">
|
|
214
|
+
<div class="tl-header tl-cols">
|
|
215
|
+
<span class="tl-cell tl-cell-status" />
|
|
216
|
+
<span class="tl-cell tl-cell-name">Service</span>
|
|
217
|
+
<span class="tl-cell tl-cell-dur">Kind</span>
|
|
218
|
+
</div>
|
|
219
|
+
{options.services.map((s) => (
|
|
220
|
+
<ServiceRow entry={s} />
|
|
221
|
+
))}
|
|
222
|
+
</div>
|
|
223
|
+
)
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export function collectServices(unsafeMap: Map<string, any>): Array<ServiceEntry> {
|
|
227
|
+
const entries: Array<ServiceEntry> = []
|
|
228
|
+
for (const [key, value] of unsafeMap) {
|
|
229
|
+
const isConfig =
|
|
230
|
+
key.toLowerCase().includes("config") || key.toLowerCase().includes("configuration")
|
|
231
|
+
|
|
232
|
+
const effectType =
|
|
233
|
+
typeof value === "object" && value !== null ? detectEffectType(value) : undefined
|
|
234
|
+
if (effectType) {
|
|
235
|
+
const info = inspectEffectValue(effectType, value)
|
|
236
|
+
entries.push({
|
|
237
|
+
key,
|
|
238
|
+
kind: effectType,
|
|
239
|
+
display: JSON.stringify(info, jsonReplacer, 2),
|
|
240
|
+
type: "effect",
|
|
241
|
+
})
|
|
242
|
+
continue
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
if (typeof value === "function") {
|
|
246
|
+
entries.push({ key, kind: "function", display: "", type: "value" })
|
|
247
|
+
continue
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if (value === null || value === undefined) {
|
|
251
|
+
entries.push({ key, kind: "empty", display: "", type: "value" })
|
|
252
|
+
continue
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
const type = isConfig ? ("config" as const) : ("value" as const)
|
|
256
|
+
const plain: Record<string, unknown> = {}
|
|
257
|
+
collectDisplayValues(value, "", plain)
|
|
258
|
+
const display = Object.keys(plain).length > 0 ? JSON.stringify(plain, jsonReplacer, 2) : ""
|
|
259
|
+
|
|
260
|
+
let kind = "object"
|
|
261
|
+
if (typeof value !== "object") {
|
|
262
|
+
kind = typeof value
|
|
263
|
+
} else {
|
|
264
|
+
const proto = Object.getPrototypeOf(value)
|
|
265
|
+
if (proto && proto.constructor && proto.constructor.name !== "Object") {
|
|
266
|
+
kind = proto.constructor.name
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
entries.push({ key, kind: isConfig ? "config" : kind, display, type })
|
|
271
|
+
}
|
|
272
|
+
return entries.sort((a, b) => a.key.localeCompare(b.key))
|
|
273
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export type NavTab =
|
|
2
|
+
| "traces"
|
|
3
|
+
| "metrics"
|
|
4
|
+
| "logs"
|
|
5
|
+
| "errors"
|
|
6
|
+
| "fibers"
|
|
7
|
+
| "routes"
|
|
8
|
+
| "system"
|
|
9
|
+
| "services"
|
|
10
|
+
|
|
11
|
+
export function Sidebar(options: { prefix: string; active: NavTab }) {
|
|
12
|
+
return (
|
|
13
|
+
<div class="sidebar">
|
|
14
|
+
<div class="sidebar-title">Effect Tower</div>
|
|
15
|
+
<a
|
|
16
|
+
href={`${options.prefix}/traces`}
|
|
17
|
+
class={options.active === "traces" ? "nav-link active" : "nav-link"}
|
|
18
|
+
>
|
|
19
|
+
Traces
|
|
20
|
+
</a>
|
|
21
|
+
<a
|
|
22
|
+
href={`${options.prefix}/metrics`}
|
|
23
|
+
class={options.active === "metrics" ? "nav-link active" : "nav-link"}
|
|
24
|
+
>
|
|
25
|
+
Metrics
|
|
26
|
+
</a>
|
|
27
|
+
<a
|
|
28
|
+
href={`${options.prefix}/logs`}
|
|
29
|
+
class={options.active === "logs" ? "nav-link active" : "nav-link"}
|
|
30
|
+
>
|
|
31
|
+
Logs
|
|
32
|
+
</a>
|
|
33
|
+
<a
|
|
34
|
+
href={`${options.prefix}/errors`}
|
|
35
|
+
class={options.active === "errors" ? "nav-link active" : "nav-link"}
|
|
36
|
+
>
|
|
37
|
+
Errors
|
|
38
|
+
</a>
|
|
39
|
+
<a
|
|
40
|
+
href={`${options.prefix}/fibers`}
|
|
41
|
+
class={options.active === "fibers" ? "nav-link active" : "nav-link"}
|
|
42
|
+
>
|
|
43
|
+
Fibers
|
|
44
|
+
</a>
|
|
45
|
+
<a
|
|
46
|
+
href={`${options.prefix}/routes`}
|
|
47
|
+
class={options.active === "routes" ? "nav-link active" : "nav-link"}
|
|
48
|
+
>
|
|
49
|
+
Routes
|
|
50
|
+
</a>
|
|
51
|
+
<a
|
|
52
|
+
href={`${options.prefix}/system`}
|
|
53
|
+
class={options.active === "system" ? "nav-link active" : "nav-link"}
|
|
54
|
+
>
|
|
55
|
+
System
|
|
56
|
+
</a>
|
|
57
|
+
<a
|
|
58
|
+
href={`${options.prefix}/services`}
|
|
59
|
+
class={options.active === "services" ? "nav-link active" : "nav-link"}
|
|
60
|
+
>
|
|
61
|
+
Services
|
|
62
|
+
</a>
|
|
63
|
+
</div>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function Shell(options: { prefix: string; active: NavTab; children: any }) {
|
|
68
|
+
return (
|
|
69
|
+
<div class="shell">
|
|
70
|
+
<Sidebar prefix={options.prefix} active={options.active} />
|
|
71
|
+
<div class="content">{options.children}</div>
|
|
72
|
+
</div>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type * as TowerStore from "../TowerStore.ts"
|
|
2
|
+
|
|
3
|
+
function formatBytes(bytes: number): string {
|
|
4
|
+
if (bytes < 1024) return `${bytes}B`
|
|
5
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)}KB`
|
|
6
|
+
if (bytes < 1024 * 1024 * 1024) return `${(bytes / 1024 / 1024).toFixed(1)}MB`
|
|
7
|
+
return `${(bytes / 1024 / 1024 / 1024).toFixed(2)}GB`
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function formatUptime(seconds: number): string {
|
|
11
|
+
const d = Math.floor(seconds / 86400)
|
|
12
|
+
const h = Math.floor((seconds % 86400) / 3600)
|
|
13
|
+
const m = Math.floor((seconds % 3600) / 60)
|
|
14
|
+
const s = Math.floor(seconds % 60)
|
|
15
|
+
if (d > 0) return `${d}d ${h}h ${m}m`
|
|
16
|
+
if (h > 0) return `${h}h ${m}m ${s}s`
|
|
17
|
+
if (m > 0) return `${m}m ${s}s`
|
|
18
|
+
return `${s}s`
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function StatCard(options: { label: string; value: string; sub?: string }) {
|
|
22
|
+
return (
|
|
23
|
+
<div style="background:#111827;border:1px solid #374151;border-radius:6px;padding:12px;min-width:180px">
|
|
24
|
+
<div style="color:#9ca3af;font-size:11px;margin-bottom:4px">{options.label}</div>
|
|
25
|
+
<div style="color:#f3f4f6;font-size:22px;font-weight:700;font-family:monospace">
|
|
26
|
+
{options.value}
|
|
27
|
+
</div>
|
|
28
|
+
{options.sub && <div style="color:#6b7280;font-size:10px;margin-top:2px">{options.sub}</div>}
|
|
29
|
+
</div>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function BarMeter(options: { label: string; used: number; total: number }) {
|
|
34
|
+
const pct = options.total > 0 ? (options.used / options.total) * 100 : 0
|
|
35
|
+
const color = pct > 90 ? "#ef4444" : pct > 70 ? "#f59e0b" : "#22c55e"
|
|
36
|
+
return (
|
|
37
|
+
<div style="background:#111827;border:1px solid #374151;border-radius:6px;padding:12px">
|
|
38
|
+
<div style="display:flex;justify-content:space-between;margin-bottom:6px">
|
|
39
|
+
<span style="color:#9ca3af;font-size:11px">{options.label}</span>
|
|
40
|
+
<span style="color:#e5e7eb;font-size:11px;font-family:monospace">
|
|
41
|
+
{formatBytes(options.used)} / {formatBytes(options.total)}
|
|
42
|
+
</span>
|
|
43
|
+
</div>
|
|
44
|
+
<div style="height:8px;background:#1f2937;border-radius:4px;overflow:hidden">
|
|
45
|
+
<div
|
|
46
|
+
style={`width:${pct.toFixed(1)}%;height:100%;background:${color};border-radius:4px;transition:width .3s`}
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
<div style="color:#6b7280;font-size:10px;margin-top:2px;text-align:right">
|
|
50
|
+
{pct.toFixed(1)}%
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function SystemStatsView(options: { stats: TowerStore.ProcessStats }) {
|
|
57
|
+
const cpuTotal = options.stats.cpu.user + options.stats.cpu.system
|
|
58
|
+
return (
|
|
59
|
+
<>
|
|
60
|
+
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;padding:12px">
|
|
61
|
+
<StatCard
|
|
62
|
+
label="PID"
|
|
63
|
+
value={String(options.stats.pid)}
|
|
64
|
+
sub={`${options.stats.system.platform} ${options.stats.system.arch}`}
|
|
65
|
+
/>
|
|
66
|
+
<StatCard label="Uptime" value={formatUptime(options.stats.uptime)} />
|
|
67
|
+
<StatCard
|
|
68
|
+
label="CPU Time"
|
|
69
|
+
value={`${(cpuTotal / 1_000_000).toFixed(2)}s`}
|
|
70
|
+
sub={`user ${(options.stats.cpu.user / 1_000_000).toFixed(2)}s / sys ${(options.stats.cpu.system / 1_000_000).toFixed(2)}s`}
|
|
71
|
+
/>
|
|
72
|
+
<StatCard
|
|
73
|
+
label="Load Average"
|
|
74
|
+
value={options.stats.system.loadavg[0].toFixed(2)}
|
|
75
|
+
sub={`${options.stats.system.loadavg[0].toFixed(2)} / ${options.stats.system.loadavg[1].toFixed(2)} / ${options.stats.system.loadavg[2].toFixed(2)} (${options.stats.system.cpuCount} cores)`}
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px;padding:0 12px 12px">
|
|
79
|
+
<BarMeter
|
|
80
|
+
label="Heap Memory"
|
|
81
|
+
used={options.stats.memory.heapUsed}
|
|
82
|
+
total={options.stats.memory.heapTotal}
|
|
83
|
+
/>
|
|
84
|
+
<BarMeter
|
|
85
|
+
label="System Memory"
|
|
86
|
+
used={options.stats.system.totalmem - options.stats.system.freemem}
|
|
87
|
+
total={options.stats.system.totalmem}
|
|
88
|
+
/>
|
|
89
|
+
</div>
|
|
90
|
+
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;padding:0 12px 12px">
|
|
91
|
+
<StatCard label="RSS" value={formatBytes(options.stats.memory.rss)} />
|
|
92
|
+
<StatCard label="Peak RSS" value={formatBytes(options.stats.resourceUsage.maxRSS)} />
|
|
93
|
+
<StatCard label="External" value={formatBytes(options.stats.memory.external)} />
|
|
94
|
+
<StatCard label="Array Buffers" value={formatBytes(options.stats.memory.arrayBuffers)} />
|
|
95
|
+
</div>
|
|
96
|
+
<div style="padding:0 12px 12px">
|
|
97
|
+
<div style="background:#111827;border:1px solid #374151;border-radius:6px;padding:12px">
|
|
98
|
+
<div style="color:#9ca3af;font-size:11px;margin-bottom:8px">Resource Usage</div>
|
|
99
|
+
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:4px">
|
|
100
|
+
<div style="display:flex;justify-content:space-between;font-size:12px">
|
|
101
|
+
<span style="color:#6b7280">Page Faults (minor)</span>
|
|
102
|
+
<span style="color:#e5e7eb;font-family:monospace">
|
|
103
|
+
{options.stats.resourceUsage.minorPageFault}
|
|
104
|
+
</span>
|
|
105
|
+
</div>
|
|
106
|
+
<div style="display:flex;justify-content:space-between;font-size:12px">
|
|
107
|
+
<span style="color:#6b7280">Page Faults (major)</span>
|
|
108
|
+
<span style="color:#e5e7eb;font-family:monospace">
|
|
109
|
+
{options.stats.resourceUsage.majorPageFault}
|
|
110
|
+
</span>
|
|
111
|
+
</div>
|
|
112
|
+
<div style="display:flex;justify-content:space-between;font-size:12px">
|
|
113
|
+
<span style="color:#6b7280">FS Reads</span>
|
|
114
|
+
<span style="color:#e5e7eb;font-family:monospace">
|
|
115
|
+
{options.stats.resourceUsage.fsRead}
|
|
116
|
+
</span>
|
|
117
|
+
</div>
|
|
118
|
+
<div style="display:flex;justify-content:space-between;font-size:12px">
|
|
119
|
+
<span style="color:#6b7280">FS Writes</span>
|
|
120
|
+
<span style="color:#e5e7eb;font-family:monospace">
|
|
121
|
+
{options.stats.resourceUsage.fsWrite}
|
|
122
|
+
</span>
|
|
123
|
+
</div>
|
|
124
|
+
<div style="display:flex;justify-content:space-between;font-size:12px">
|
|
125
|
+
<span style="color:#6b7280">Context Switches (vol)</span>
|
|
126
|
+
<span style="color:#e5e7eb;font-family:monospace">
|
|
127
|
+
{options.stats.resourceUsage.voluntaryContextSwitches}
|
|
128
|
+
</span>
|
|
129
|
+
</div>
|
|
130
|
+
<div style="display:flex;justify-content:space-between;font-size:12px">
|
|
131
|
+
<span style="color:#6b7280">Context Switches (invol)</span>
|
|
132
|
+
<span style="color:#e5e7eb;font-family:monospace">
|
|
133
|
+
{options.stats.resourceUsage.involuntaryContextSwitches}
|
|
134
|
+
</span>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
</>
|
|
140
|
+
)
|
|
141
|
+
}
|