@vibesdotdev/host-bun 0.0.0-stage → 1.0.0-rc.3
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/LICENSE +18 -0
- package/README.md +222 -2
- package/dist/applet-serve-host/applet-serve-host.impl.bun.d.ts +6 -0
- package/dist/applet-serve-host/applet-serve-host.impl.bun.d.ts.map +1 -0
- package/dist/applet-serve-host/applet-serve-host.impl.bun.js +80 -0
- package/dist/applet-serve-host/applet-serve-host.impl.bun.js.map +1 -0
- package/dist/applet-serve-host/applet-serve-host.plugin.d.ts +22 -0
- package/dist/applet-serve-host/applet-serve-host.plugin.d.ts.map +1 -0
- package/dist/applet-serve-host/applet-serve-host.plugin.js +42 -0
- package/dist/applet-serve-host/applet-serve-host.plugin.js.map +1 -0
- package/dist/applet-serve-host/index.d.ts +7 -0
- package/dist/applet-serve-host/index.d.ts.map +1 -0
- package/dist/applet-serve-host/index.js +7 -0
- package/dist/applet-serve-host/index.js.map +1 -0
- package/dist/applet-serve-host/stylesheet.compiler.d.ts +7 -0
- package/dist/applet-serve-host/stylesheet.compiler.d.ts.map +1 -0
- package/dist/applet-serve-host/stylesheet.compiler.js +63 -0
- package/dist/applet-serve-host/stylesheet.compiler.js.map +1 -0
- package/dist/atlas-migrations/register-atlas-host-migrations.d.ts +21 -0
- package/dist/atlas-migrations/register-atlas-host-migrations.d.ts.map +1 -0
- package/dist/atlas-migrations/register-atlas-host-migrations.js +148 -0
- package/dist/atlas-migrations/register-atlas-host-migrations.js.map +1 -0
- package/dist/buffered-capture.d.ts +4 -0
- package/dist/buffered-capture.d.ts.map +1 -0
- package/dist/buffered-capture.impl.bun.d.ts +18 -0
- package/dist/buffered-capture.impl.bun.d.ts.map +1 -0
- package/dist/buffered-capture.impl.bun.js +148 -0
- package/dist/buffered-capture.impl.bun.js.map +1 -0
- package/dist/buffered-capture.js +5 -0
- package/dist/buffered-capture.js.map +1 -0
- package/dist/bun-environment.impl.bun.d.ts +231 -0
- package/dist/bun-environment.impl.bun.d.ts.map +1 -0
- package/dist/bun-environment.impl.bun.js +352 -0
- package/dist/bun-environment.impl.bun.js.map +1 -0
- package/dist/cache-redis/cache-redis-connector.impl.bun.d.ts +20 -0
- package/dist/cache-redis/cache-redis-connector.impl.bun.d.ts.map +1 -0
- package/dist/cache-redis/cache-redis-connector.impl.bun.js +30 -0
- package/dist/cache-redis/cache-redis-connector.impl.bun.js.map +1 -0
- package/dist/cache-redis/cache-redis-connector.plugin.d.ts +21 -0
- package/dist/cache-redis/cache-redis-connector.plugin.d.ts.map +1 -0
- package/dist/cache-redis/cache-redis-connector.plugin.js +32 -0
- package/dist/cache-redis/cache-redis-connector.plugin.js.map +1 -0
- package/dist/cli-checkout.impl.bun.d.ts +13 -0
- package/dist/cli-checkout.impl.bun.d.ts.map +1 -0
- package/dist/cli-checkout.impl.bun.js +26 -0
- package/dist/cli-checkout.impl.bun.js.map +1 -0
- package/dist/docs/runtime-environment-bun.docs.descriptor.d.ts +19 -0
- package/dist/docs/runtime-environment-bun.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/runtime-environment-bun.docs.descriptor.js +116 -0
- package/dist/docs/runtime-environment-bun.docs.descriptor.js.map +1 -0
- package/dist/filesystem/adapter.impl.bun.d.ts +15 -0
- package/dist/filesystem/adapter.impl.bun.d.ts.map +1 -0
- package/dist/filesystem/adapter.impl.bun.js +11 -0
- package/dist/filesystem/adapter.impl.bun.js.map +1 -0
- package/dist/filesystem/host-primitives.impl.bun.d.ts +12 -0
- package/dist/filesystem/host-primitives.impl.bun.d.ts.map +1 -0
- package/dist/filesystem/host-primitives.impl.bun.js +96 -0
- package/dist/filesystem/host-primitives.impl.bun.js.map +1 -0
- package/dist/filesystem/register.d.ts +12 -0
- package/dist/filesystem/register.d.ts.map +1 -0
- package/dist/filesystem/register.js +6 -0
- package/dist/filesystem/register.js.map +1 -0
- package/dist/filesystem/rooted-exclusive.impl.bun.d.ts +4 -0
- package/dist/filesystem/rooted-exclusive.impl.bun.d.ts.map +1 -0
- package/dist/filesystem/rooted-exclusive.impl.bun.js +135 -0
- package/dist/filesystem/rooted-exclusive.impl.bun.js.map +1 -0
- package/dist/held-launch/abi.impl.bun.d.ts +175 -0
- package/dist/held-launch/abi.impl.bun.d.ts.map +1 -0
- package/dist/held-launch/abi.impl.bun.js +476 -0
- package/dist/held-launch/abi.impl.bun.js.map +1 -0
- package/dist/held-launch/execution.impl.bun.d.ts +48 -0
- package/dist/held-launch/execution.impl.bun.d.ts.map +1 -0
- package/dist/held-launch/execution.impl.bun.js +375 -0
- package/dist/held-launch/execution.impl.bun.js.map +1 -0
- package/dist/held-launch/library.impl.bun.d.ts +23 -0
- package/dist/held-launch/library.impl.bun.d.ts.map +1 -0
- package/dist/held-launch/library.impl.bun.js +178 -0
- package/dist/held-launch/library.impl.bun.js.map +1 -0
- package/dist/held-launch/schemas.d.ts +10 -0
- package/dist/held-launch/schemas.d.ts.map +1 -0
- package/dist/held-launch/schemas.js +3 -0
- package/dist/held-launch/schemas.js.map +1 -0
- package/dist/held-launch/streams.impl.bun.d.ts +38 -0
- package/dist/held-launch/streams.impl.bun.d.ts.map +1 -0
- package/dist/held-launch/streams.impl.bun.js +183 -0
- package/dist/held-launch/streams.impl.bun.js.map +1 -0
- package/dist/host-channel.impl.bun.d.ts +25 -0
- package/dist/host-channel.impl.bun.d.ts.map +1 -0
- package/dist/host-channel.impl.bun.js +40 -0
- package/dist/host-channel.impl.bun.js.map +1 -0
- package/dist/host-client.impl.bun.d.ts +31 -0
- package/dist/host-client.impl.bun.d.ts.map +1 -0
- package/dist/host-client.impl.bun.js +39 -0
- package/dist/host-client.impl.bun.js.map +1 -0
- package/dist/host-credentials.d.ts +38 -0
- package/dist/host-credentials.d.ts.map +1 -0
- package/dist/host-credentials.js +44 -0
- package/dist/host-credentials.js.map +1 -0
- package/dist/host-loader.impl.bun.d.ts +12 -0
- package/dist/host-loader.impl.bun.d.ts.map +1 -0
- package/dist/host-loader.impl.bun.js +83 -0
- package/dist/host-loader.impl.bun.js.map +1 -0
- package/dist/host-signal.impl.bun.d.ts +11 -0
- package/dist/host-signal.impl.bun.d.ts.map +1 -0
- package/dist/host-signal.impl.bun.js +28 -0
- package/dist/host-signal.impl.bun.js.map +1 -0
- package/dist/http-listener.impl.bun.d.ts +8 -0
- package/dist/http-listener.impl.bun.d.ts.map +1 -0
- package/dist/http-listener.impl.bun.js +44 -0
- package/dist/http-listener.impl.bun.js.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +314 -0
- package/dist/index.js.map +1 -0
- package/dist/local-execution.impl.bun.d.ts +47 -0
- package/dist/local-execution.impl.bun.d.ts.map +1 -0
- package/dist/local-execution.impl.bun.js +150 -0
- package/dist/local-execution.impl.bun.js.map +1 -0
- package/dist/logging/file-host.impl.bun.d.ts +4 -0
- package/dist/logging/file-host.impl.bun.d.ts.map +1 -0
- package/dist/logging/file-host.impl.bun.js +36 -0
- package/dist/logging/file-host.impl.bun.js.map +1 -0
- package/dist/logging/logging.plugin.d.ts +12 -0
- package/dist/logging/logging.plugin.d.ts.map +1 -0
- package/dist/logging/logging.plugin.js +20 -0
- package/dist/logging/logging.plugin.js.map +1 -0
- package/dist/native/held-launch/aarch64-apple-darwin/libvibes_held_launch.dylib +0 -0
- package/dist/native/held-launch/aarch64-apple-darwin/manifest.json +237 -0
- package/dist/native/held-launch/aarch64-apple-darwin/vibes-held-launch +0 -0
- package/dist/native/held-launch/aarch64-unknown-linux-gnu/libvibes_held_launch.so +0 -0
- package/dist/native/held-launch/aarch64-unknown-linux-gnu/manifest.json +237 -0
- package/dist/native/held-launch/aarch64-unknown-linux-gnu/vibes-held-launch +0 -0
- package/dist/native/held-launch/x86_64-apple-darwin/libvibes_held_launch.dylib +0 -0
- package/dist/native/held-launch/x86_64-apple-darwin/manifest.json +237 -0
- package/dist/native/held-launch/x86_64-apple-darwin/vibes-held-launch +0 -0
- package/dist/native/held-launch/x86_64-unknown-linux-gnu/libvibes_held_launch.so +0 -0
- package/dist/native/held-launch/x86_64-unknown-linux-gnu/manifest.json +237 -0
- package/dist/native/held-launch/x86_64-unknown-linux-gnu/vibes-held-launch +0 -0
- package/dist/native-image.consumer.plugin.d.ts +4 -0
- package/dist/native-image.consumer.plugin.d.ts.map +1 -0
- package/dist/native-image.consumer.plugin.js +14 -0
- package/dist/native-image.consumer.plugin.js.map +1 -0
- package/dist/native-image.d.ts +79 -0
- package/dist/native-image.d.ts.map +1 -0
- package/dist/native-image.impl.consumer.d.ts +15 -0
- package/dist/native-image.impl.consumer.d.ts.map +1 -0
- package/dist/native-image.impl.consumer.js +86 -0
- package/dist/native-image.impl.consumer.js.map +1 -0
- package/dist/native-image.js +19 -0
- package/dist/native-image.js.map +1 -0
- package/dist/native-library.consumer.plugin.d.ts +6 -0
- package/dist/native-library.consumer.plugin.d.ts.map +1 -0
- package/dist/native-library.consumer.plugin.js +33 -0
- package/dist/native-library.consumer.plugin.js.map +1 -0
- package/dist/native-library.impl.consumer.d.ts +14 -0
- package/dist/native-library.impl.consumer.d.ts.map +1 -0
- package/dist/native-library.impl.consumer.js +46 -0
- package/dist/native-library.impl.consumer.js.map +1 -0
- package/dist/native-network/index.d.ts +3 -0
- package/dist/native-network/index.d.ts.map +1 -0
- package/dist/native-network/index.js +3 -0
- package/dist/native-network/index.js.map +1 -0
- package/dist/native-network/native-host.d.ts +4 -0
- package/dist/native-network/native-host.d.ts.map +1 -0
- package/dist/native-network/native-host.js +14 -0
- package/dist/native-network/native-host.js.map +1 -0
- package/dist/native-network/native-network.descriptor.d.ts +4 -0
- package/dist/native-network/native-network.descriptor.d.ts.map +1 -0
- package/dist/native-network/native-network.descriptor.js +11 -0
- package/dist/native-network/native-network.descriptor.js.map +1 -0
- package/dist/native-network/native-network.impl.bun.d.ts +19 -0
- package/dist/native-network/native-network.impl.bun.d.ts.map +1 -0
- package/dist/native-network/native-network.impl.bun.js +190 -0
- package/dist/native-network/native-network.impl.bun.js.map +1 -0
- package/dist/native-network/native-network.plugin.d.ts +6 -0
- package/dist/native-network/native-network.plugin.d.ts.map +1 -0
- package/dist/native-network/native-network.plugin.js +27 -0
- package/dist/native-network/native-network.plugin.js.map +1 -0
- package/dist/package-plugins/index.d.ts +11 -0
- package/dist/package-plugins/index.d.ts.map +1 -0
- package/dist/package-plugins/index.js +11 -0
- package/dist/package-plugins/index.js.map +1 -0
- package/dist/package-plugins/package-plugins.capability.bun.d.ts +11 -0
- package/dist/package-plugins/package-plugins.capability.bun.d.ts.map +1 -0
- package/dist/package-plugins/package-plugins.capability.bun.js +14 -0
- package/dist/package-plugins/package-plugins.capability.bun.js.map +1 -0
- package/dist/package-plugins/primitives.impl.bun.d.ts +11 -0
- package/dist/package-plugins/primitives.impl.bun.d.ts.map +1 -0
- package/dist/package-plugins/primitives.impl.bun.js +32 -0
- package/dist/package-plugins/primitives.impl.bun.js.map +1 -0
- package/dist/package-plugins/read-admission.impl.bun.d.ts +11 -0
- package/dist/package-plugins/read-admission.impl.bun.d.ts.map +1 -0
- package/dist/package-plugins/read-admission.impl.bun.js +224 -0
- package/dist/package-plugins/read-admission.impl.bun.js.map +1 -0
- package/dist/package-plugins/schemas.d.ts +28 -0
- package/dist/package-plugins/schemas.d.ts.map +1 -0
- package/dist/package-plugins/schemas.js +3 -0
- package/dist/package-plugins/schemas.js.map +1 -0
- package/dist/process/launch-artifacts.impl.bun.d.ts +11 -0
- package/dist/process/launch-artifacts.impl.bun.d.ts.map +1 -0
- package/dist/process/launch-artifacts.impl.bun.js +25 -0
- package/dist/process/launch-artifacts.impl.bun.js.map +1 -0
- package/dist/process/process-probe.impl.bun.d.ts +15 -0
- package/dist/process/process-probe.impl.bun.d.ts.map +1 -0
- package/dist/process/process-probe.impl.bun.js +35 -0
- package/dist/process/process-probe.impl.bun.js.map +1 -0
- package/dist/process/runtime-process.impl.bun.d.ts +20 -0
- package/dist/process/runtime-process.impl.bun.d.ts.map +1 -0
- package/dist/process/runtime-process.impl.bun.js +42 -0
- package/dist/process/runtime-process.impl.bun.js.map +1 -0
- package/dist/process/schemas.d.ts +9 -0
- package/dist/process/schemas.d.ts.map +1 -0
- package/dist/process/schemas.js +3 -0
- package/dist/process/schemas.js.map +1 -0
- package/dist/process/spawn.impl.bun.d.ts +31 -0
- package/dist/process/spawn.impl.bun.d.ts.map +1 -0
- package/dist/process/spawn.impl.bun.js +66 -0
- package/dist/process/spawn.impl.bun.js.map +1 -0
- package/dist/process/which.impl.bun.d.ts +16 -0
- package/dist/process/which.impl.bun.d.ts.map +1 -0
- package/dist/process/which.impl.bun.js +25 -0
- package/dist/process/which.impl.bun.js.map +1 -0
- package/dist/pty.adapter.impl.bun.d.ts +17 -0
- package/dist/pty.adapter.impl.bun.d.ts.map +1 -0
- package/dist/pty.adapter.impl.bun.js +102 -0
- package/dist/pty.adapter.impl.bun.js.map +1 -0
- package/dist/pty.darwin.impl.bun.d.ts +11 -0
- package/dist/pty.darwin.impl.bun.d.ts.map +1 -0
- package/dist/pty.darwin.impl.bun.js +200 -0
- package/dist/pty.darwin.impl.bun.js.map +1 -0
- package/dist/pty.node-host.impl.bun.d.ts +10 -0
- package/dist/pty.node-host.impl.bun.d.ts.map +1 -0
- package/dist/pty.node-host.impl.bun.js +42 -0
- package/dist/pty.node-host.impl.bun.js.map +1 -0
- package/dist/resolution-root.impl.bun.d.ts +170 -0
- package/dist/resolution-root.impl.bun.d.ts.map +1 -0
- package/dist/resolution-root.impl.bun.js +373 -0
- package/dist/resolution-root.impl.bun.js.map +1 -0
- package/dist/restricted-execute.darwin.impl.bun.d.ts +19 -0
- package/dist/restricted-execute.darwin.impl.bun.d.ts.map +1 -0
- package/dist/restricted-execute.darwin.impl.bun.js +459 -0
- package/dist/restricted-execute.darwin.impl.bun.js.map +1 -0
- package/dist/runtime-plugin-host/daemon-execution.worker-shim.bun.d.ts +2 -0
- package/dist/runtime-plugin-host/daemon-execution.worker-shim.bun.d.ts.map +1 -0
- package/dist/runtime-plugin-host/daemon-execution.worker-shim.bun.js +31 -0
- package/dist/runtime-plugin-host/daemon-execution.worker-shim.bun.js.map +1 -0
- package/dist/runtime-plugin-host/host-hot-reload.consumer.d.ts +20 -0
- package/dist/runtime-plugin-host/host-hot-reload.consumer.d.ts.map +1 -0
- package/dist/runtime-plugin-host/host-hot-reload.consumer.js +236 -0
- package/dist/runtime-plugin-host/host-hot-reload.consumer.js.map +1 -0
- package/dist/runtime-plugin-host/hot-plugin-build.worker.consumer.d.ts +2 -0
- package/dist/runtime-plugin-host/hot-plugin-build.worker.consumer.d.ts.map +1 -0
- package/dist/runtime-plugin-host/hot-plugin-build.worker.consumer.js +66 -0
- package/dist/runtime-plugin-host/hot-plugin-build.worker.consumer.js.map +1 -0
- package/dist/runtime-plugin-host/hot-plugin-module.consumer.d.ts +45 -0
- package/dist/runtime-plugin-host/hot-plugin-module.consumer.d.ts.map +1 -0
- package/dist/runtime-plugin-host/hot-plugin-module.consumer.js +490 -0
- package/dist/runtime-plugin-host/hot-plugin-module.consumer.js.map +1 -0
- package/dist/runtime-plugin-host/hot-reload.consumer.d.ts +83 -0
- package/dist/runtime-plugin-host/hot-reload.consumer.d.ts.map +1 -0
- package/dist/runtime-plugin-host/hot-reload.consumer.js +168 -0
- package/dist/runtime-plugin-host/hot-reload.consumer.js.map +1 -0
- package/dist/runtime-plugin-host/reclaim.impl.bun.d.ts +37 -0
- package/dist/runtime-plugin-host/reclaim.impl.bun.d.ts.map +1 -0
- package/dist/runtime-plugin-host/reclaim.impl.bun.js +159 -0
- package/dist/runtime-plugin-host/reclaim.impl.bun.js.map +1 -0
- package/dist/runtime-plugin-host/runtime-plugin-host.impl.bun.d.ts +4 -0
- package/dist/runtime-plugin-host/runtime-plugin-host.impl.bun.d.ts.map +1 -0
- package/dist/runtime-plugin-host/runtime-plugin-host.impl.bun.js +181 -0
- package/dist/runtime-plugin-host/runtime-plugin-host.impl.bun.js.map +1 -0
- package/dist/runtime-plugin-host/runtime-plugin-host.plugin.d.ts +17 -0
- package/dist/runtime-plugin-host/runtime-plugin-host.plugin.d.ts.map +1 -0
- package/dist/runtime-plugin-host/runtime-plugin-host.plugin.js +36 -0
- package/dist/runtime-plugin-host/runtime-plugin-host.plugin.js.map +1 -0
- package/dist/runtime-plugin-host/runtime-thread.impl.bun.d.ts +53 -0
- package/dist/runtime-plugin-host/runtime-thread.impl.bun.d.ts.map +1 -0
- package/dist/runtime-plugin-host/runtime-thread.impl.bun.js +249 -0
- package/dist/runtime-plugin-host/runtime-thread.impl.bun.js.map +1 -0
- package/dist/runtime-plugin-host/runtime-thread.shim.bun.d.ts +2 -0
- package/dist/runtime-plugin-host/runtime-thread.shim.bun.d.ts.map +1 -0
- package/dist/runtime-plugin-host/runtime-thread.shim.bun.js +56 -0
- package/dist/runtime-plugin-host/runtime-thread.shim.bun.js.map +1 -0
- package/dist/runtime-plugin-host/schemas.d.ts +437 -0
- package/dist/runtime-plugin-host/schemas.d.ts.map +1 -0
- package/dist/runtime-plugin-host/schemas.js +54 -0
- package/dist/runtime-plugin-host/schemas.js.map +1 -0
- package/dist/runtime-plugin-host/source-watcher.consumer.d.ts +109 -0
- package/dist/runtime-plugin-host/source-watcher.consumer.d.ts.map +1 -0
- package/dist/runtime-plugin-host/source-watcher.consumer.js +383 -0
- package/dist/runtime-plugin-host/source-watcher.consumer.js.map +1 -0
- package/dist/schemas/environment.d.ts +197 -0
- package/dist/schemas/environment.d.ts.map +1 -0
- package/dist/schemas/environment.js +7 -0
- package/dist/schemas/environment.js.map +1 -0
- package/dist/schemas/host-resources.d.ts +85 -0
- package/dist/schemas/host-resources.d.ts.map +1 -0
- package/dist/schemas/host-resources.js +22 -0
- package/dist/schemas/host-resources.js.map +1 -0
- package/dist/schemas/native-image.d.ts +128 -0
- package/dist/schemas/native-image.d.ts.map +1 -0
- package/dist/schemas/native-image.js +45 -0
- package/dist/schemas/native-image.js.map +1 -0
- package/dist/schemas/native-network.d.ts +56 -0
- package/dist/schemas/native-network.d.ts.map +1 -0
- package/dist/schemas/native-network.js +55 -0
- package/dist/schemas/native-network.js.map +1 -0
- package/dist/schemas/restricted-execute.d.ts +40 -0
- package/dist/schemas/restricted-execute.d.ts.map +1 -0
- package/dist/schemas/restricted-execute.js +14 -0
- package/dist/schemas/restricted-execute.js.map +1 -0
- package/dist/schemas/runtime-socket.d.ts +8 -0
- package/dist/schemas/runtime-socket.d.ts.map +1 -0
- package/dist/schemas/runtime-socket.js +7 -0
- package/dist/schemas/runtime-socket.js.map +1 -0
- package/dist/schemas/self-spawn.d.ts +11 -0
- package/dist/schemas/self-spawn.d.ts.map +1 -0
- package/dist/schemas/self-spawn.js +3 -0
- package/dist/schemas/self-spawn.js.map +1 -0
- package/dist/schemas/standard-output.d.ts +6 -0
- package/dist/schemas/standard-output.d.ts.map +1 -0
- package/dist/schemas/standard-output.js +2 -0
- package/dist/schemas/standard-output.js.map +1 -0
- package/dist/schemas/telemetry.d.ts +25 -0
- package/dist/schemas/telemetry.d.ts.map +1 -0
- package/dist/schemas/telemetry.js +10 -0
- package/dist/schemas/telemetry.js.map +1 -0
- package/dist/schemas/test-environment.d.ts +27 -0
- package/dist/schemas/test-environment.d.ts.map +1 -0
- package/dist/schemas/test-environment.js +2 -0
- package/dist/schemas/test-environment.js.map +1 -0
- package/dist/serve-stall-start.d.ts +8 -0
- package/dist/serve-stall-start.d.ts.map +1 -0
- package/dist/serve-stall-start.js +88 -0
- package/dist/serve-stall-start.js.map +1 -0
- package/dist/serve-stall.d.ts +11 -0
- package/dist/serve-stall.d.ts.map +1 -0
- package/dist/serve-stall.js +19 -0
- package/dist/serve-stall.js.map +1 -0
- package/dist/serve-stall.plugin.d.ts +10 -0
- package/dist/serve-stall.plugin.d.ts.map +1 -0
- package/dist/serve-stall.plugin.js +34 -0
- package/dist/serve-stall.plugin.js.map +1 -0
- package/dist/services/account-home.d.ts +39 -0
- package/dist/services/account-home.d.ts.map +1 -0
- package/dist/services/account-home.js +152 -0
- package/dist/services/account-home.js.map +1 -0
- package/dist/services/cli-process-host.d.ts +50 -0
- package/dist/services/cli-process-host.d.ts.map +1 -0
- package/dist/services/cli-process-host.js +88 -0
- package/dist/services/cli-process-host.js.map +1 -0
- package/dist/services/compatibility-host.impl.bun.d.ts +4 -0
- package/dist/services/compatibility-host.impl.bun.d.ts.map +1 -0
- package/dist/services/compatibility-host.impl.bun.js +24 -0
- package/dist/services/compatibility-host.impl.bun.js.map +1 -0
- package/dist/services/executable-identity.impl.bun.d.ts +164 -0
- package/dist/services/executable-identity.impl.bun.d.ts.map +1 -0
- package/dist/services/executable-identity.impl.bun.js +73 -0
- package/dist/services/executable-identity.impl.bun.js.map +1 -0
- package/dist/services/fatal-signals.impl.bun.d.ts +15 -0
- package/dist/services/fatal-signals.impl.bun.d.ts.map +1 -0
- package/dist/services/fatal-signals.impl.bun.js +61 -0
- package/dist/services/fatal-signals.impl.bun.js.map +1 -0
- package/dist/services/graph-freshness.impl.bun.d.ts +108 -0
- package/dist/services/graph-freshness.impl.bun.d.ts.map +1 -0
- package/dist/services/graph-freshness.impl.bun.js +49 -0
- package/dist/services/graph-freshness.impl.bun.js.map +1 -0
- package/dist/services/host-identity.capability.bun.d.ts +10 -0
- package/dist/services/host-identity.capability.bun.d.ts.map +1 -0
- package/dist/services/host-identity.capability.bun.js +27 -0
- package/dist/services/host-identity.capability.bun.js.map +1 -0
- package/dist/services/host-identity.impl.bun.d.ts +53 -0
- package/dist/services/host-identity.impl.bun.d.ts.map +1 -0
- package/dist/services/host-identity.impl.bun.js +76 -0
- package/dist/services/host-identity.impl.bun.js.map +1 -0
- package/dist/services/host-resources.impl.bun.d.ts +49 -0
- package/dist/services/host-resources.impl.bun.d.ts.map +1 -0
- package/dist/services/host-resources.impl.bun.js +144 -0
- package/dist/services/host-resources.impl.bun.js.map +1 -0
- package/dist/services/http-fetch.impl.bun.d.ts +10 -0
- package/dist/services/http-fetch.impl.bun.d.ts.map +1 -0
- package/dist/services/http-fetch.impl.bun.js +38 -0
- package/dist/services/http-fetch.impl.bun.js.map +1 -0
- package/dist/services/output-plane.impl.bun.d.ts +6 -0
- package/dist/services/output-plane.impl.bun.d.ts.map +1 -0
- package/dist/services/output-plane.impl.bun.js +26 -0
- package/dist/services/output-plane.impl.bun.js.map +1 -0
- package/dist/services/process-action-lifetime.consumer.d.ts +47 -0
- package/dist/services/process-action-lifetime.consumer.d.ts.map +1 -0
- package/dist/services/process-action-lifetime.consumer.js +68 -0
- package/dist/services/process-action-lifetime.consumer.js.map +1 -0
- package/dist/services/process-view.impl.bun.d.ts +18 -0
- package/dist/services/process-view.impl.bun.d.ts.map +1 -0
- package/dist/services/process-view.impl.bun.js +17 -0
- package/dist/services/process-view.impl.bun.js.map +1 -0
- package/dist/services/runtime-host-signals.impl.bun.d.ts +8 -0
- package/dist/services/runtime-host-signals.impl.bun.d.ts.map +1 -0
- package/dist/services/runtime-host-signals.impl.bun.js +29 -0
- package/dist/services/runtime-host-signals.impl.bun.js.map +1 -0
- package/dist/services/runtime-http-listener.impl.bun.d.ts +14 -0
- package/dist/services/runtime-http-listener.impl.bun.d.ts.map +1 -0
- package/dist/services/runtime-http-listener.impl.bun.js +463 -0
- package/dist/services/runtime-http-listener.impl.bun.js.map +1 -0
- package/dist/services/runtime-path.impl.bun.d.ts +16 -0
- package/dist/services/runtime-path.impl.bun.d.ts.map +1 -0
- package/dist/services/runtime-path.impl.bun.js +34 -0
- package/dist/services/runtime-path.impl.bun.js.map +1 -0
- package/dist/services/runtime-scoped-values.impl.bun.d.ts +4 -0
- package/dist/services/runtime-scoped-values.impl.bun.d.ts.map +1 -0
- package/dist/services/runtime-scoped-values.impl.bun.js +7 -0
- package/dist/services/runtime-scoped-values.impl.bun.js.map +1 -0
- package/dist/services/runtime-socket-datagram.impl.bun.d.ts +15 -0
- package/dist/services/runtime-socket-datagram.impl.bun.d.ts.map +1 -0
- package/dist/services/runtime-socket-datagram.impl.bun.js +19 -0
- package/dist/services/runtime-socket-datagram.impl.bun.js.map +1 -0
- package/dist/services/runtime-socket.impl.bun.d.ts +20 -0
- package/dist/services/runtime-socket.impl.bun.d.ts.map +1 -0
- package/dist/services/runtime-socket.impl.bun.js +47 -0
- package/dist/services/runtime-socket.impl.bun.js.map +1 -0
- package/dist/services/runtime-stdio.impl.bun.d.ts +11 -0
- package/dist/services/runtime-stdio.impl.bun.d.ts.map +1 -0
- package/dist/services/runtime-stdio.impl.bun.js +37 -0
- package/dist/services/runtime-stdio.impl.bun.js.map +1 -0
- package/dist/services/self-spawn.impl.bun.d.ts +39 -0
- package/dist/services/self-spawn.impl.bun.d.ts.map +1 -0
- package/dist/services/self-spawn.impl.bun.js +58 -0
- package/dist/services/self-spawn.impl.bun.js.map +1 -0
- package/dist/services/standard-output.d.ts +100 -0
- package/dist/services/standard-output.d.ts.map +1 -0
- package/dist/services/standard-output.js +35 -0
- package/dist/services/standard-output.js.map +1 -0
- package/dist/services/user-environment.impl.bun.d.ts +19 -0
- package/dist/services/user-environment.impl.bun.d.ts.map +1 -0
- package/dist/services/user-environment.impl.bun.js +117 -0
- package/dist/services/user-environment.impl.bun.js.map +1 -0
- package/dist/services/workspace-env.d.ts +30 -0
- package/dist/services/workspace-env.d.ts.map +1 -0
- package/dist/services/workspace-env.js +45 -0
- package/dist/services/workspace-env.js.map +1 -0
- package/dist/services/workspace-root-probe.impl.bun.d.ts +14 -0
- package/dist/services/workspace-root-probe.impl.bun.d.ts.map +1 -0
- package/dist/services/workspace-root-probe.impl.bun.js +27 -0
- package/dist/services/workspace-root-probe.impl.bun.js.map +1 -0
- package/dist/session-members.impl.bun.d.ts +22 -0
- package/dist/session-members.impl.bun.d.ts.map +1 -0
- package/dist/session-members.impl.bun.js +74 -0
- package/dist/session-members.impl.bun.js.map +1 -0
- package/dist/sqlite-driver/index.d.ts +7 -0
- package/dist/sqlite-driver/index.d.ts.map +1 -0
- package/dist/sqlite-driver/index.js +7 -0
- package/dist/sqlite-driver/index.js.map +1 -0
- package/dist/sqlite-driver/sqlite-driver.impl.bun.d.ts +6 -0
- package/dist/sqlite-driver/sqlite-driver.impl.bun.d.ts.map +1 -0
- package/dist/sqlite-driver/sqlite-driver.impl.bun.js +269 -0
- package/dist/sqlite-driver/sqlite-driver.impl.bun.js.map +1 -0
- package/dist/sqlite-driver/sqlite-driver.plugin.d.ts +22 -0
- package/dist/sqlite-driver/sqlite-driver.plugin.d.ts.map +1 -0
- package/dist/sqlite-driver/sqlite-driver.plugin.js +44 -0
- package/dist/sqlite-driver/sqlite-driver.plugin.js.map +1 -0
- package/dist/telemetry/telemetry.d.ts +34 -0
- package/dist/telemetry/telemetry.d.ts.map +1 -0
- package/dist/telemetry/telemetry.js +2 -0
- package/dist/telemetry/telemetry.js.map +1 -0
- package/dist/telemetry/telemetry.plugin.d.ts +4 -0
- package/dist/telemetry/telemetry.plugin.d.ts.map +1 -0
- package/dist/telemetry/telemetry.plugin.js +78 -0
- package/dist/telemetry/telemetry.plugin.js.map +1 -0
- package/dist/terminal-pty-bridge.impl.bun.d.ts +31 -0
- package/dist/terminal-pty-bridge.impl.bun.d.ts.map +1 -0
- package/dist/terminal-pty-bridge.impl.bun.js +333 -0
- package/dist/terminal-pty-bridge.impl.bun.js.map +1 -0
- package/dist/test-tooling/lazy-environment.impl.bun.d.ts +16 -0
- package/dist/test-tooling/lazy-environment.impl.bun.d.ts.map +1 -0
- package/dist/test-tooling/lazy-environment.impl.bun.js +36 -0
- package/dist/test-tooling/lazy-environment.impl.bun.js.map +1 -0
- package/dist/test-tooling/starttls-refusal.d.ts +7 -0
- package/dist/test-tooling/starttls-refusal.d.ts.map +1 -0
- package/dist/test-tooling/starttls-refusal.js +50 -0
- package/dist/test-tooling/starttls-refusal.js.map +1 -0
- package/dist/test-tooling/svelte-client-preload.impl.bun.d.ts +2 -0
- package/dist/test-tooling/svelte-client-preload.impl.bun.d.ts.map +1 -0
- package/dist/test-tooling/svelte-client-preload.impl.bun.js +4 -0
- package/dist/test-tooling/svelte-client-preload.impl.bun.js.map +1 -0
- package/dist/test-tooling/svelte-compiler.impl.bun.d.ts +10 -0
- package/dist/test-tooling/svelte-compiler.impl.bun.d.ts.map +1 -0
- package/dist/test-tooling/svelte-compiler.impl.bun.js +33 -0
- package/dist/test-tooling/svelte-compiler.impl.bun.js.map +1 -0
- package/dist/test-tooling/svelte-server-preload.impl.bun.d.ts +2 -0
- package/dist/test-tooling/svelte-server-preload.impl.bun.d.ts.map +1 -0
- package/dist/test-tooling/svelte-server-preload.impl.bun.js +4 -0
- package/dist/test-tooling/svelte-server-preload.impl.bun.js.map +1 -0
- package/dist/test-tooling/test-environment.impl.bun.d.ts +45 -0
- package/dist/test-tooling/test-environment.impl.bun.d.ts.map +1 -0
- package/dist/test-tooling/test-environment.impl.bun.js +163 -0
- package/dist/test-tooling/test-environment.impl.bun.js.map +1 -0
- package/dist/test-tooling/test-process-root.impl.bun.d.ts +4 -0
- package/dist/test-tooling/test-process-root.impl.bun.d.ts.map +1 -0
- package/dist/test-tooling/test-process-root.impl.bun.js +65 -0
- package/dist/test-tooling/test-process-root.impl.bun.js.map +1 -0
- package/dist/test-tooling/unix-http.impl.bun.d.ts +28 -0
- package/dist/test-tooling/unix-http.impl.bun.d.ts.map +1 -0
- package/dist/test-tooling/unix-http.impl.bun.js +181 -0
- package/dist/test-tooling/unix-http.impl.bun.js.map +1 -0
- package/dist/transpiler/transpiler.plugin.d.ts +10 -0
- package/dist/transpiler/transpiler.plugin.d.ts.map +1 -0
- package/dist/transpiler/transpiler.plugin.js +18 -0
- package/dist/transpiler/transpiler.plugin.js.map +1 -0
- package/native/held-launch/Cargo.toml +23 -0
- package/native/held-launch/abi-manifest.json +234 -0
- package/native/held-launch/src/bin/vibes-held-launch.rs +35 -0
- package/native/held-launch/src/events.rs +99 -0
- package/native/held-launch/src/lib.rs +528 -0
- package/native/held-launch/symbols.golden +21 -0
- package/package.json +313 -4
- package/resources/restricted-supervisor.impl.bun.d.mts +3 -0
- package/resources/restricted-supervisor.impl.bun.mjs +49 -0
- package/resources/serve-stall-watch.impl.bun.d.mts +3 -0
- package/resources/serve-stall-watch.impl.bun.mjs +51 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy-environment.impl.bun.js","sourceRoot":"","sources":["../../src/test-tooling/lazy-environment.impl.bun.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAM5C,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAMhD,8GAA8G;AAC9G,SAAS,iBAAiB;IACzB,iGAAiG;IACjG,OAAO,QAAQ,CAAC,uBAAuB,CAAsB,CAAC;AAC/D,CAAC;AACD,SAAS,oBAAoB;IAC5B,oHAAoH;IACpH,OAAO,QAAQ,CAAC,uCAAuC,CAAyB,CAAC;AAClF,CAAC;AACD,SAAS,kBAAkB;IAC1B,gHAAgH;IAChH,OAAO,QAAQ,CAAC,qCAAqC,CAAuB,CAAC;AAC9E,CAAC;AAED,gFAAgF;AAChF,MAAM,CAAC,MAAM,iCAAiC,GAA8B,CAAC,GAAG,IAAI,EAAE,EAAE,CACvF,iBAAiB,EAAE,CAAC,iCAAiC,CAAC,GAAG,IAAI,CAAC,CAAC;AAEhE,uFAAuF;AACvF,MAAM,CAAC,MAAM,uBAAuB,GAAiC,CAAC,GAAG,IAAI,EAAE,EAAE,CAChF,oBAAoB,EAAE,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAAC,CAAC;AAEzD,mFAAmF;AACnF,MAAM,CAAC,MAAM,qBAAqB,GAA+B,CAAC,GAAG,IAAI,EAAE,EAAE,CAC5E,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,GAAG,IAAI,CAAC,CAAC;AAErD,yHAAyH;AACzH,MAAM,UAAU,iCAAiC,CAAC,OAA8C;IAC/F,OAAO,iCAAiC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AACxG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starttls-refusal.d.ts","sourceRoot":"","sources":["../../src/test-tooling/starttls-refusal.ts"],"names":[],"mappings":"AAIA,wBAAsB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;;;;;GAqCxE"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** A loopback-only peer which refuses STARTTLS; no real account or credentials. */
|
|
2
|
+
import { createServer } from 'node:net';
|
|
3
|
+
import * as z from 'zod/v4';
|
|
4
|
+
export async function createStartTlsRefusalPeer(protocol) {
|
|
5
|
+
const commands = [];
|
|
6
|
+
const peers = new Set();
|
|
7
|
+
const server = createServer(socket => {
|
|
8
|
+
peers.add(socket);
|
|
9
|
+
socket.on('close', () => peers.delete(socket));
|
|
10
|
+
socket.on('error', error => { throw error; });
|
|
11
|
+
socket.write(protocol === 'smtp' ? '220 fixture ESMTP\r\n' : '* OK fixture ready\r\n');
|
|
12
|
+
let pending = '';
|
|
13
|
+
socket.on('data', bytes => {
|
|
14
|
+
pending += bytes.toString();
|
|
15
|
+
while (pending.includes('\r\n')) {
|
|
16
|
+
const end = pending.indexOf('\r\n');
|
|
17
|
+
const line = pending.slice(0, end);
|
|
18
|
+
pending = pending.slice(end + 2);
|
|
19
|
+
commands.push(line);
|
|
20
|
+
if (protocol === 'smtp') {
|
|
21
|
+
if (/^EHLO/i.test(line))
|
|
22
|
+
socket.write('250-fixture\r\n250 AUTH PLAIN LOGIN\r\n');
|
|
23
|
+
else if (/^QUIT/i.test(line))
|
|
24
|
+
socket.end('221 goodbye\r\n');
|
|
25
|
+
else
|
|
26
|
+
socket.write('454 TLS unavailable\r\n');
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
const tag = line.split(' ')[0];
|
|
30
|
+
if (/ CAPABILITY/i.test(line))
|
|
31
|
+
socket.write('* CAPABILITY IMAP4rev1 AUTH=PLAIN\r\n' + tag + ' OK capability\r\n');
|
|
32
|
+
else if (/ LOGOUT/i.test(line))
|
|
33
|
+
socket.end('* BYE goodbye\r\n' + tag + ' OK logout\r\n');
|
|
34
|
+
else
|
|
35
|
+
socket.write(tag + ' NO TLS unavailable\r\n');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
await new Promise((resolve, reject) => { server.once('error', reject); server.listen(0, '127.0.0.1', resolve); });
|
|
41
|
+
const address = z.object({ port: z.number().int().positive() }).parse(server.address());
|
|
42
|
+
return { host: '127.0.0.1', port: address.port, commands,
|
|
43
|
+
close: async () => {
|
|
44
|
+
for (const peer of peers)
|
|
45
|
+
peer.destroy();
|
|
46
|
+
await new Promise((resolve, reject) => server.close(error => error ? reject(error) : resolve()));
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=starttls-refusal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starttls-refusal.js","sourceRoot":"","sources":["../../src/test-tooling/starttls-refusal.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,EAAC,YAAY,EAAc,MAAM,UAAU,CAAC;AACnD,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,QAAyB;IACrE,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,EAAE;QACjC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAClB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAC/C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,GAAE,MAAM,K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
|
|
1
|
+
/** Preload: compile Svelte modules and components for the browser runtime (`generate: 'client'`). */
|
|
2
|
+
import { registerSvelteCompiler } from "./svelte-compiler.impl.bun.js";
|
|
3
|
+
registerSvelteCompiler({ generate: 'client' });
|
|
4
|
+
//# sourceMappingURL=svelte-client-preload.impl.bun.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svelte-client-preload.impl.bun.js","sourceRoot":"","sources":["../../src/test-tooling/svelte-client-preload.impl.bun.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,sBAAsB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type SvelteGeneration = 'client' | 'server';
|
|
2
|
+
export interface SvelteCompilerOptions {
|
|
3
|
+
/** The code the compiler generates for every Svelte module and component loaded after registration. */
|
|
4
|
+
readonly generate: SvelteGeneration;
|
|
5
|
+
/** The plugin's name, for runs that register more than one. */
|
|
6
|
+
readonly name?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Register the compile plugin for this process; modules loaded afterwards are compiled. */
|
|
9
|
+
export declare function registerSvelteCompiler(options: SvelteCompilerOptions): void;
|
|
10
|
+
//# sourceMappingURL=svelte-compiler.impl.bun.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svelte-compiler.impl.bun.d.ts","sourceRoot":"","sources":["../../src/test-tooling/svelte-compiler.impl.bun.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEnD,MAAM,WAAW,qBAAqB;IACrC,uGAAuG;IACvG,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,4FAA4F;AAC5F,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAe3E"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test tooling for packages whose tests exercise real Svelte modules: a Bun
|
|
3
|
+
* plugin that compiles `*.svelte.ts` modules and `*.svelte` components with the
|
|
4
|
+
* actual Svelte compiler as they load, so no rune or context stub stands in for
|
|
5
|
+
* Svelte. A package wires it once from its `bunfig.toml` (the Bun test runner's
|
|
6
|
+
* declared boot config) through one of the two preload entries, never by
|
|
7
|
+
* importing `bun` from a test:
|
|
8
|
+
*
|
|
9
|
+
* preload = ["@vibesdotdev/host-bun/test-tooling/svelte-server-preload"]
|
|
10
|
+
*
|
|
11
|
+
* Which generation a test needs is the preload it names: `client` for the
|
|
12
|
+
* browser runtime, `server` for server rendering.
|
|
13
|
+
*/
|
|
14
|
+
import { plugin, Transpiler } from 'bun';
|
|
15
|
+
import { compile, compileModule } from 'svelte/compiler';
|
|
16
|
+
/** Register the compile plugin for this process; modules loaded afterwards are compiled. */
|
|
17
|
+
export function registerSvelteCompiler(options) {
|
|
18
|
+
const { generate } = options;
|
|
19
|
+
plugin({
|
|
20
|
+
name: options.name ?? `runtime-environment-bun-svelte-${generate}`,
|
|
21
|
+
setup(build) {
|
|
22
|
+
build.onLoad({ filter: /\.svelte\.ts$/ }, async ({ path }) => {
|
|
23
|
+
const javascript = new Transpiler({ loader: 'ts' }).transformSync(await Bun.file(path).text());
|
|
24
|
+
return { contents: compileModule(javascript, { filename: path, generate }).js.code, loader: 'js' };
|
|
25
|
+
});
|
|
26
|
+
build.onLoad({ filter: /\.svelte$/ }, async ({ path }) => ({
|
|
27
|
+
contents: compile(await Bun.file(path).text(), { filename: path, generate }).js.code,
|
|
28
|
+
loader: 'js'
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=svelte-compiler.impl.bun.js.map
|
|
@@ -0,0 +1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AI;gBACpF,MAAM,EAAE,IAAI;aACZ,CAAC,CAAC,CAAC;QACL,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svelte-server-preload.impl.bun.d.ts","sourceRoot":"","sources":["../../src/test-tooling/svelte-server-preload.impl.bun.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Preload: compile Svelte modules and components for server rendering (`generate: 'server'`). */
|
|
2
|
+
import { registerSvelteCompiler } from "./svelte-compiler.impl.bun.js";
|
|
3
|
+
registerSvelteCompiler({ generate: 'server' });
|
|
4
|
+
//# sourceMappingURL=svelte-server-preload.impl.bun.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svelte-server-preload.impl.bun.js","sourceRoot":"","sources":["../../src/test-tooling/svelte-server-preload.impl.bun.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,sBAAsB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type RuntimeEnvironmentImplementation, type RuntimePlugin, type RuntimeScopedValues, type VibesRuntime } from '@vibesdotdev/kernel';
|
|
2
|
+
import { type DeclaredTestExecutionRuntimeOptions, type DeclaredTestParent, type DeclaredTestStdio, type DeclaredTestWorkspace } from '@vibesdotdev/execution-local/test-environment';
|
|
3
|
+
import type { BunDeclaredTestEnvironmentOptions } from '../schemas/test-environment.ts';
|
|
4
|
+
export { TEST_CLI_SCOPE, createRecordingStdio } from '@vibesdotdev/execution-local/test-environment';
|
|
5
|
+
export type { DeclaredTestExecutionRuntimeOptions, DeclaredTestParent, DeclaredTestStdio, DeclaredTestWorkspace, RecordedConsoleCall, RecordingStdio } from '@vibesdotdev/execution-local/test-environment';
|
|
6
|
+
export type { BunDeclaredTestEnvironmentOptions, BunDeclaredTestEnvironmentOptions as DeclaredTestEnvironmentOptions } from '../schemas/test-environment.ts';
|
|
7
|
+
/** Native stdio observations of this process, at the declared far boundary. */
|
|
8
|
+
export declare function createDeclaredTestStdio(): DeclaredTestStdio;
|
|
9
|
+
/** Path mechanics for a declared test platform, with explicit captured roots. */
|
|
10
|
+
export declare function createDeclaredTestPathMechanics(platform: 'posix' | 'win32', home: string): {
|
|
11
|
+
fileURLToPath: (url: string | URL) => string;
|
|
12
|
+
homedir(): string;
|
|
13
|
+
tmpdir(): string;
|
|
14
|
+
join: (...paths: string[]) => string;
|
|
15
|
+
resolve: (...paths: string[]) => string;
|
|
16
|
+
relative: (from: string, to: string) => string;
|
|
17
|
+
dirname: (path: string) => string;
|
|
18
|
+
basename: (path: string, suffix?: string) => string;
|
|
19
|
+
extname: (path: string) => string;
|
|
20
|
+
isAbsolute: (path: string) => boolean;
|
|
21
|
+
normalize: (path: string) => string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A disposable native workspace under the caller's owned absolute parent, or
|
|
25
|
+
* inside this process's temporary root without one.
|
|
26
|
+
*/
|
|
27
|
+
export declare function createDeclaredTestWorkspace(parent?: string | URL): DeclaredTestWorkspace;
|
|
28
|
+
/** An owned parent for this package's test workspaces under the absolute `base`. */
|
|
29
|
+
export declare function createDeclaredTestParent(base: string | URL): DeclaredTestParent;
|
|
30
|
+
/** Request isolation over Bun's async context, with the same validated public port. */
|
|
31
|
+
export declare function createDeclaredTestScopedValues(): RuntimeScopedValues;
|
|
32
|
+
export declare function createDeclaredTestEnvironment(options?: BunDeclaredTestEnvironmentOptions): RuntimeEnvironmentImplementation;
|
|
33
|
+
/**
|
|
34
|
+
* The declared test environment as the environment plugin
|
|
35
|
+
* `bootstrapVibesRuntime({ environment })` registers (rc02-rc03 §2.1).
|
|
36
|
+
*/
|
|
37
|
+
export declare function createDeclaredTestEnvironmentPlugin(options?: BunDeclaredTestEnvironmentOptions): RuntimePlugin;
|
|
38
|
+
/** A fresh host root runtime with a declared test environment registered. */
|
|
39
|
+
export declare function createDeclaredTestRuntime(options?: BunDeclaredTestEnvironmentOptions): VibesRuntime;
|
|
40
|
+
/**
|
|
41
|
+
* The declared test host's execution root: the canonical boot entry over the
|
|
42
|
+
* environment the caller composed, owned and ready.
|
|
43
|
+
*/
|
|
44
|
+
export declare function createDeclaredTestExecutionRuntime(options: DeclaredTestExecutionRuntimeOptions): Promise<VibesRuntime>;
|
|
45
|
+
//# sourceMappingURL=test-environment.impl.bun.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-environment.impl.bun.d.ts","sourceRoot":"","sources":["../../src/test-tooling/test-environment.impl.bun.ts"],"names":[],"mappings":"AAkBA,OAAO,EAEN,KAAK,gCAAgC,EAErC,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGN,KAAK,mCAAmC,EAExC,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,MAAM,+CAA+C,CAAC;AAQvD,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,gCAAgC,CAAC;AAExF,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AACrG,YAAY,EACX,mCAAmC,EACnC,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,MAAM,+CAA+C,CAAC;AACvD,YAAY,EAAE,iCAAiC,EAAE,iCAAiC,IAAI,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAmF7J,+EAA+E;AAC/E,wBAAgB,uBAAuB,IAAI,iBAAiB,CAE3D;AAED,iFAAiF;AACjF,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM;yBAGlE,MAAM,GAAG,GAAG;;;;;;;;;;;EAElC;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,qBAAqB,CAExF;AAED,oFAAoF;AACpF,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,GAAG,kBAAkB,CAE/E;AAED,uFAAuF;AACvF,wBAAgB,8BAA8B,IAAI,mBAAmB,CAEpE;AAED,wBAAgB,6BAA6B,CAAC,OAAO,GAAE,iCAAsC,GAAG,gCAAgC,CAE/H;AAED;;;GAGG;AACH,wBAAgB,mCAAmC,CAAC,OAAO,GAAE,iCAAsC,GAAG,aAAa,CAElH;AAED,6EAA6E;AAC7E,wBAAgB,yBAAyB,CAAC,OAAO,GAAE,iCAAsC,GAAG,YAAY,CAEvG;AAED;;;GAGG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,mCAAmC,GAAG,OAAO,CAAC,YAAY,CAAC,CAEtH"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
2
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
4
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
return path;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* The Bun host's declared test environment: the kernel's declared test host
|
|
11
|
+
* (`@vibesdotdev/execution-local/test-environment`, which owns every declared fact,
|
|
12
|
+
* validation and refusal) composed with Bun's own primitives: its plain
|
|
13
|
+
* loader, `AsyncLocalStorage`, clock, workspace probe, stdio, request values,
|
|
14
|
+
* native process owner, SQLite driver, filesystem and file logging, and its fixtures (`createBunHostLoader` for a declared
|
|
15
|
+
* workspace, inside Bun's per-process test root).
|
|
16
|
+
*
|
|
17
|
+
* This package's tests use it; it offers the same names as every host's
|
|
18
|
+
* declared test environment.
|
|
19
|
+
*/
|
|
20
|
+
import { getVibesClient, runtimeClientKind } from '@vibesdotdev/kernel/client';
|
|
21
|
+
import { BunHostClient, bunHostClientDescriptor } from "../host-client.impl.bun.js";
|
|
22
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
23
|
+
import { chmodSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readlinkSync, rmSync, symlinkSync, utimesSync, writeFileSync } from 'node:fs';
|
|
24
|
+
import path from 'node:path';
|
|
25
|
+
import { fileURLToPath } from 'node:url';
|
|
26
|
+
import { performance } from 'node:perf_hooks';
|
|
27
|
+
import { composeHostEnv } from '@vibesdotdev/kernel';
|
|
28
|
+
import { createDeclaredTestHost, declaredTestPathMechanics } from '@vibesdotdev/execution-local/test-environment';
|
|
29
|
+
import { createBunHostLoader } from "../host-loader.impl.bun.js";
|
|
30
|
+
import { createBunWorkspaceRootProbe } from "../services/workspace-root-probe.impl.bun.js";
|
|
31
|
+
import { createBunRuntimeScopedValues } from "../services/runtime-scoped-values.impl.bun.js";
|
|
32
|
+
import { registerBunSqliteDriver } from "../sqlite-driver/sqlite-driver.plugin.js";
|
|
33
|
+
import { registerBunHostFileSystem } from "../filesystem/register.js";
|
|
34
|
+
import { bunLoggingPlugin } from "../logging/logging.plugin.js";
|
|
35
|
+
import { bunTestProcessRoot } from "./test-process-root.impl.bun.js";
|
|
36
|
+
export { TEST_CLI_SCOPE, createRecordingStdio } from '@vibesdotdev/execution-local/test-environment';
|
|
37
|
+
/** A declared workspace's loader: the Bun host loader, with a bare `from` resolving from the workspace root. */
|
|
38
|
+
function createWorkspaceLoader(root) {
|
|
39
|
+
const host = createBunHostLoader();
|
|
40
|
+
const resolveFrom = host.resolveSpecifier;
|
|
41
|
+
const importVersion = host.importModuleVersion;
|
|
42
|
+
return {
|
|
43
|
+
...host,
|
|
44
|
+
importModule: (specifier, from = root) => host.importModule(specifier, from),
|
|
45
|
+
importModuleVersion: importVersion && ((specifier, version, from = root) => importVersion(specifier, version, from)),
|
|
46
|
+
resolveSpecifier: resolveFrom && ((specifier, from = root) => resolveFrom(specifier, from))
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/** Bun's fixture mechanics inside its per-process test root. */
|
|
50
|
+
const bunFixtures = {
|
|
51
|
+
isAbsolute: (file) => path.isAbsolute(file),
|
|
52
|
+
resolve: (...segments) => path.resolve(...segments),
|
|
53
|
+
join: (...segments) => path.join(...segments),
|
|
54
|
+
dirname: (file) => path.dirname(file),
|
|
55
|
+
separator: path.sep,
|
|
56
|
+
mkdirp(directory) { mkdirSync(directory, { recursive: true }); },
|
|
57
|
+
mkdtemp: (prefixPath) => mkdtempSync(prefixPath),
|
|
58
|
+
writeFile(file, contents) { writeFileSync(file, contents); },
|
|
59
|
+
readFile: (file) => readFileSync(file, 'utf8'),
|
|
60
|
+
chmod(file, mode) { chmodSync(file, mode); },
|
|
61
|
+
utimes(file, accessed, modified) { utimesSync(file, accessed, modified); },
|
|
62
|
+
symlink(target, link) { symlinkSync(target, link); },
|
|
63
|
+
readlink: (file) => readlinkSync(file),
|
|
64
|
+
lstat(file) {
|
|
65
|
+
const entry = lstatSync(file, { throwIfNoEntry: false });
|
|
66
|
+
if (!entry)
|
|
67
|
+
return undefined;
|
|
68
|
+
return {
|
|
69
|
+
kind: entry.isSymbolicLink() ? 'symlink' : entry.isDirectory() ? 'directory' : 'file',
|
|
70
|
+
mode: entry.mode, modifiedMs: entry.mtimeMs, size: entry.size
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
remove(file) { rmSync(file, { recursive: true, force: true }); },
|
|
74
|
+
createProcessDirectory: (prefix) => bunTestProcessRoot.createDirectory(prefix),
|
|
75
|
+
isHostTemporaryDirectory: (candidate) => bunTestProcessRoot.isHostTemporaryDirectory(candidate),
|
|
76
|
+
ownUntilProcessExit: (owned) => bunTestProcessRoot.ownUntilExit(owned),
|
|
77
|
+
loader: createWorkspaceLoader
|
|
78
|
+
};
|
|
79
|
+
const importLoader = {
|
|
80
|
+
importModule: (specifier) => import(__rewriteRelativeImportExtension(specifier))
|
|
81
|
+
};
|
|
82
|
+
/** The kernel's declared test host over Bun's primitives. */
|
|
83
|
+
const bunDeclaredTestHost = createDeclaredTestHost({
|
|
84
|
+
loader: importLoader,
|
|
85
|
+
monotonicNow: () => performance.now(),
|
|
86
|
+
asyncContext: () => new AsyncLocalStorage(),
|
|
87
|
+
workspaceProbe: createBunWorkspaceRootProbe,
|
|
88
|
+
nativeStdio: () => ({ stdout: process.stdout, console }),
|
|
89
|
+
hostStdio: () => ({ stdout: process.stdout, stderr: process.stderr, console }),
|
|
90
|
+
scopedValues: createBunRuntimeScopedValues,
|
|
91
|
+
async createProcess(runtime, facts) {
|
|
92
|
+
const { createBunRuntimeProcess } = await import("../process/runtime-process.impl.bun.js");
|
|
93
|
+
const cwd = facts.cwd;
|
|
94
|
+
return createBunRuntimeProcess(() => runtime.getEnvSnapshot(), {
|
|
95
|
+
platform: facts.platform,
|
|
96
|
+
childEnv: () => composeHostEnv(runtime),
|
|
97
|
+
lifecycle: runtime.lifecycle,
|
|
98
|
+
hostCwd: cwd ? () => cwd : undefined
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
async registerHostServices(runtime, options) {
|
|
102
|
+
if (!runtime.hasKind(runtimeClientKind.id))
|
|
103
|
+
runtime.registerKind(runtimeClientKind);
|
|
104
|
+
runtime.registerDescriptor(runtimeClientKind.id, bunHostClientDescriptor);
|
|
105
|
+
runtime.registerLoader(runtimeClientKind.id, bunHostClientDescriptor.id, async () => ({ impl: BunHostClient }));
|
|
106
|
+
await getVibesClient(bunHostClientDescriptor.id, runtime);
|
|
107
|
+
// LocalDB's SQLite driver kind, implemented over bun:sqlite (loaded on first resolve),
|
|
108
|
+
// and the filesystem kind with this host's adapter.
|
|
109
|
+
(options.sqliteDriver ?? registerBunSqliteDriver)(runtime);
|
|
110
|
+
await (options.hostFileSystem ?? registerBunHostFileSystem)(runtime);
|
|
111
|
+
// The host's log files: Logging's file outputs over this host's own file primitives.
|
|
112
|
+
await runtime.registerPlugin(bunLoggingPlugin(options.logging));
|
|
113
|
+
},
|
|
114
|
+
fixtures: bunFixtures
|
|
115
|
+
});
|
|
116
|
+
/** Native stdio observations of this process, at the declared far boundary. */
|
|
117
|
+
export function createDeclaredTestStdio() {
|
|
118
|
+
return bunDeclaredTestHost.stdio();
|
|
119
|
+
}
|
|
120
|
+
/** Path mechanics for a declared test platform, with explicit captured roots. */
|
|
121
|
+
export function createDeclaredTestPathMechanics(platform, home) {
|
|
122
|
+
return {
|
|
123
|
+
...declaredTestPathMechanics(platform === 'win32' ? path.win32 : path.posix, platform, home),
|
|
124
|
+
fileURLToPath: (url) => fileURLToPath(url, { windows: platform === 'win32' })
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* A disposable native workspace under the caller's owned absolute parent, or
|
|
129
|
+
* inside this process's temporary root without one.
|
|
130
|
+
*/
|
|
131
|
+
export function createDeclaredTestWorkspace(parent) {
|
|
132
|
+
return bunDeclaredTestHost.workspace(parent instanceof URL ? fileURLToPath(parent) : parent);
|
|
133
|
+
}
|
|
134
|
+
/** An owned parent for this package's test workspaces under the absolute `base`. */
|
|
135
|
+
export function createDeclaredTestParent(base) {
|
|
136
|
+
return bunDeclaredTestHost.parent(base instanceof URL ? fileURLToPath(base) : base);
|
|
137
|
+
}
|
|
138
|
+
/** Request isolation over Bun's async context, with the same validated public port. */
|
|
139
|
+
export function createDeclaredTestScopedValues() {
|
|
140
|
+
return bunDeclaredTestHost.scopedValues();
|
|
141
|
+
}
|
|
142
|
+
export function createDeclaredTestEnvironment(options = {}) {
|
|
143
|
+
return bunDeclaredTestHost.environment(options);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The declared test environment as the environment plugin
|
|
147
|
+
* `bootstrapVibesRuntime({ environment })` registers (rc02-rc03 §2.1).
|
|
148
|
+
*/
|
|
149
|
+
export function createDeclaredTestEnvironmentPlugin(options = {}) {
|
|
150
|
+
return bunDeclaredTestHost.environmentPlugin(options);
|
|
151
|
+
}
|
|
152
|
+
/** A fresh host root runtime with a declared test environment registered. */
|
|
153
|
+
export function createDeclaredTestRuntime(options = {}) {
|
|
154
|
+
return bunDeclaredTestHost.runtime(options);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* The declared test host's execution root: the canonical boot entry over the
|
|
158
|
+
* environment the caller composed, owned and ready.
|
|
159
|
+
*/
|
|
160
|
+
export function createDeclaredTestExecutionRuntime(options) {
|
|
161
|
+
return bunDeclaredTestHost.executionRuntime(options);
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=test-environment.impl.bun.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-environment.impl.bun.js","sourceRoot":"","sources":["../../src/test-tooling/test-environment.impl.bun.ts"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnJ,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACN,cAAc,EAMd,MAAM,qBAAqB,CAAC;AAC7B,OAAO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C;AAC3C,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,UAA6C,EAAE;IAC5F,OAAO,mBAAmB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AACjD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mCAAmC,CAAC,UAA6C,EAAE;IAClG,OAAO,mBAAmB,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;AACvD,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,yBAAyB,CAAC,UAA6C,EAAE;IACxF,OAAO,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC7C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kCAAkC,CAAC,OAA4C;IAC9F,OAAO,mBAAmB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type TestProcessRootOwner } from '@vibesdotdev/execution-local/test-environment';
|
|
2
|
+
/** This process's one per-process root owner on the Bun host. */
|
|
3
|
+
export declare const bunTestProcessRoot: TestProcessRootOwner;
|
|
4
|
+
//# sourceMappingURL=test-process-root.impl.bun.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-process-root.impl.bun.d.ts","sourceRoot":"","sources":["../../src/test-tooling/test-process-root.impl.bun.ts"],"names":[],"mappings":"AAaA,OAAO,EAAqD,KAAK,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAkC7I,iEAAiE;AACjE,eAAO,MAAM,kBAAkB,EAAE,oBAe/B,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Bun host's per-process test root: Bun's own process, filesystem and
|
|
3
|
+
* spawn calls, composed by the kernel's base (`createTestProcessRootOwner`),
|
|
4
|
+
* which owns the root's naming, the dead-root sweep, the exit release, the
|
|
5
|
+
* reaper's argv and the prefix rule. A process that also loads another
|
|
6
|
+
* host's test tooling names the same `<pid>-<start>` root and shares it.
|
|
7
|
+
*/
|
|
8
|
+
import { mkdirSync, mkdtempSync, readdirSync, realpathSync, rmSync } from 'node:fs';
|
|
9
|
+
import { tmpdir } from 'node:os';
|
|
10
|
+
import { join, resolve } from 'node:path';
|
|
11
|
+
import { performance } from 'node:perf_hooks';
|
|
12
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
13
|
+
import { attemptNative, readOrAbsent } from '@vibesdotdev/execution-local';
|
|
14
|
+
import { createTestProcessRootOwner, testProcessReaperArgv } from '@vibesdotdev/execution-local/test-environment';
|
|
15
|
+
/** `ESRCH` is the one confirmed death; any other probe failure (`EPERM`) propagates. */
|
|
16
|
+
function isAlive(pid) {
|
|
17
|
+
const probe = attemptNative(() => process.kill(pid, 0));
|
|
18
|
+
if ('value' in probe)
|
|
19
|
+
return true;
|
|
20
|
+
if (probe.failure.code === 'ESRCH')
|
|
21
|
+
return false;
|
|
22
|
+
throw probe.failure.cause;
|
|
23
|
+
}
|
|
24
|
+
/** Launch the kernel's detached reaper with Bun's own spawn; nothing is inherited but the arguments. */
|
|
25
|
+
function startReaper(pid, root) {
|
|
26
|
+
if (process.platform === 'win32')
|
|
27
|
+
return;
|
|
28
|
+
// The launching shell exits as soon as it has backgrounded the loop, so this waits only for that.
|
|
29
|
+
const launch = attemptNative(() => Bun.spawnSync([...testProcessReaperArgv(pid, root)], {
|
|
30
|
+
stdin: 'ignore',
|
|
31
|
+
stdout: 'ignore',
|
|
32
|
+
stderr: 'ignore',
|
|
33
|
+
env: {},
|
|
34
|
+
timeout: 10_000
|
|
35
|
+
}));
|
|
36
|
+
if ('failure' in launch) {
|
|
37
|
+
throw new CapabilityError('The test process root reaper could not start.', 'UNAVAILABLE', {
|
|
38
|
+
reason: 'test-process-reaper-unavailable', cause: launch.failure.cause
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
if (launch.value.exitCode !== 0) {
|
|
42
|
+
throw new CapabilityError('The test process root reaper could not start.', 'UNAVAILABLE', {
|
|
43
|
+
reason: 'test-process-reaper-unavailable',
|
|
44
|
+
details: { status: launch.value.exitCode, signal: launch.value.signalCode ?? null }
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/** This process's one per-process root owner on the Bun host. */
|
|
49
|
+
export const bunTestProcessRoot = createTestProcessRootOwner({
|
|
50
|
+
tmpdir: () => tmpdir(),
|
|
51
|
+
pid: () => process.pid,
|
|
52
|
+
startMs: () => performance.timeOrigin,
|
|
53
|
+
isAlive,
|
|
54
|
+
entries: (directory) => readOrAbsent(() => readdirSync(directory), ['ENOENT'], []),
|
|
55
|
+
mkdirp(path) { mkdirSync(path, { recursive: true }); },
|
|
56
|
+
mkdtemp: (prefixPath) => mkdtempSync(prefixPath),
|
|
57
|
+
realpath: (path) => realpathSync(path),
|
|
58
|
+
realpathOrAbsent: (path) => readOrAbsent(() => realpathSync(path), ['ENOENT'], null),
|
|
59
|
+
remove(path) { rmSync(path, { recursive: true, force: true }); },
|
|
60
|
+
join: (...paths) => join(...paths),
|
|
61
|
+
resolve: (...paths) => resolve(...paths),
|
|
62
|
+
onExit(release) { process.once('exit', release); },
|
|
63
|
+
startReaper
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=test-process-root.impl.bun.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-process-root.impl.bun.js","sourceRoot":"","sources":["../../src/test-tooling/test-process-root.impl.bun.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACpF,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAq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AAK,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;IACxC,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAClD,WAAW;CACX,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface UnixHttpDeclaration {
|
|
2
|
+
/** Same canonical disposable root admitted by the execution provider. */
|
|
3
|
+
readonly writableRoot: string;
|
|
4
|
+
/** Opt in to following redirects, only between declared origins. Default: the
|
|
5
|
+
* real redirect response is returned for the caller to choose. A redirect to
|
|
6
|
+
* an undeclared origin refuses; it never reaches DNS or TCP. */
|
|
7
|
+
readonly followRedirects?: boolean;
|
|
8
|
+
/** Logical HTTP origins are explicit fixture inputs, never discovered. */
|
|
9
|
+
readonly endpoints: readonly Readonly<{
|
|
10
|
+
origin: string;
|
|
11
|
+
socket: string;
|
|
12
|
+
}>[];
|
|
13
|
+
}
|
|
14
|
+
/** Real server on one exact declared endpoint. Importing this Bun-only public
|
|
15
|
+
* entrypoint on an unsupported engine fails native module admission rather
|
|
16
|
+
* than using a Web fetch implementation that might ignore the unix option.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createUnixHttpServer(input: UnixHttpDeclaration, origin: string, handler: (request: Request) => Response | Promise<Response>): Bun.Server<undefined>;
|
|
19
|
+
export declare function createUnixHttpFetch(input: UnixHttpDeclaration): typeof fetch;
|
|
20
|
+
/** Scoped bridge for owners that use standard Web fetch. Install only inside
|
|
21
|
+
* a separately protected, isolated workload; it never modifies response data
|
|
22
|
+
* or feature code. Overlapping owners and foreign changes fail visibly.
|
|
23
|
+
*/
|
|
24
|
+
export declare function installUnixHttpTransport(input: UnixHttpDeclaration): {
|
|
25
|
+
fetch: typeof fetch;
|
|
26
|
+
[Symbol.dispose](): void;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=unix-http.impl.bun.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unix-http.impl.bun.d.ts","sourceRoot":"","sources":["../../src/test-tooling/unix-http.impl.bun.ts"],"names":[],"mappings":"AAsCA,MAAM,WAAW,mBAAmB;IACnC,yEAAyE;IACzE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;;oEAEgE;IAChE,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,0EAA0E;IAC1E,QAAQ,CAAC,SAAS,EAAE,SAAS,QAAQ,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;CAC5E;AA8BD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,EAC9E,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,yBAI3D;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,KAAK,CAgE5E;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,mBAAmB;;;EAiBlE"}
|