alchemy 2.0.0-beta.44 → 2.0.0-beta.45
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/bin/exec.js +67 -8
- package/bin/exec.js.map +1 -1
- package/lib/AWS/Lambda/Function.d.ts +17 -0
- package/lib/AWS/Lambda/Function.d.ts.map +1 -1
- package/lib/AWS/Lambda/Function.js +61 -16
- package/lib/AWS/Lambda/Function.js.map +1 -1
- package/lib/AWS/Providers.d.ts +2 -1
- package/lib/AWS/Providers.d.ts.map +1 -1
- package/lib/AWS/Providers.js +3 -1
- package/lib/AWS/Providers.js.map +1 -1
- package/lib/Apply.js +17 -1
- package/lib/Apply.js.map +1 -1
- package/lib/Auth/AuthProvider.d.ts.map +1 -1
- package/lib/Auth/AuthProvider.js +24 -6
- package/lib/Auth/AuthProvider.js.map +1 -1
- package/lib/Auth/Credentials.d.ts.map +1 -1
- package/lib/Auth/Credentials.js +3 -3
- package/lib/Auth/Credentials.js.map +1 -1
- package/lib/Cli/commands/_shared.d.ts +13 -1
- package/lib/Cli/commands/_shared.d.ts.map +1 -1
- package/lib/Cli/commands/_shared.js +33 -2
- package/lib/Cli/commands/_shared.js.map +1 -1
- package/lib/Cli/commands/dev.d.ts.map +1 -1
- package/lib/Cli/commands/dev.js +10 -1
- package/lib/Cli/commands/dev.js.map +1 -1
- package/lib/Cli/commands/login.d.ts.map +1 -1
- package/lib/Cli/commands/login.js +19 -5
- package/lib/Cli/commands/login.js.map +1 -1
- package/lib/Cli/commands/profile.d.ts.map +1 -1
- package/lib/Cli/commands/profile.js +7 -27
- package/lib/Cli/commands/profile.js.map +1 -1
- package/lib/Cli/main.d.ts.map +1 -1
- package/lib/Cli/main.js +0 -2
- package/lib/Cli/main.js.map +1 -1
- package/lib/Cloudflare/AiGateway/AiGateway.d.ts +0 -2
- package/lib/Cloudflare/AiGateway/AiGateway.d.ts.map +1 -1
- package/lib/Cloudflare/AiGateway/AiGateway.js +2 -4
- package/lib/Cloudflare/AiGateway/AiGateway.js.map +1 -1
- package/lib/Cloudflare/BrowserRendering/BrowserRendering.d.ts +116 -0
- package/lib/Cloudflare/BrowserRendering/BrowserRendering.d.ts.map +1 -0
- package/lib/Cloudflare/BrowserRendering/BrowserRendering.js +92 -0
- package/lib/Cloudflare/BrowserRendering/BrowserRendering.js.map +1 -0
- package/lib/Cloudflare/BrowserRendering/BrowserRenderingBinding.d.ts +55 -0
- package/lib/Cloudflare/BrowserRendering/BrowserRenderingBinding.d.ts.map +1 -0
- package/lib/Cloudflare/BrowserRendering/BrowserRenderingBinding.js +55 -0
- package/lib/Cloudflare/BrowserRendering/BrowserRenderingBinding.js.map +1 -0
- package/lib/Cloudflare/BrowserRendering/index.d.ts +3 -0
- package/lib/Cloudflare/BrowserRendering/index.d.ts.map +1 -0
- package/lib/Cloudflare/BrowserRendering/index.js +3 -0
- package/lib/Cloudflare/BrowserRendering/index.js.map +1 -0
- package/lib/Cloudflare/Container/Container.d.ts +3 -3
- package/lib/Cloudflare/Container/Container.js +3 -3
- package/lib/Cloudflare/Container/StartContainer.d.ts.map +1 -1
- package/lib/Cloudflare/Container/StartContainer.js.map +1 -1
- package/lib/Cloudflare/D1/D1Database.d.ts +1 -0
- package/lib/Cloudflare/D1/D1Database.d.ts.map +1 -1
- package/lib/Cloudflare/D1/D1Database.js +2 -1
- package/lib/Cloudflare/D1/D1Database.js.map +1 -1
- package/lib/Cloudflare/D1/D1DatabaseBinding.js +1 -1
- package/lib/Cloudflare/D1/D1DatabaseBinding.js.map +1 -1
- package/lib/Cloudflare/Fetcher.d.ts.map +1 -1
- package/lib/Cloudflare/Fetcher.js +0 -2
- package/lib/Cloudflare/Fetcher.js.map +1 -1
- package/lib/Cloudflare/Hyperdrive/Hyperdrive.d.ts +1 -0
- package/lib/Cloudflare/Hyperdrive/Hyperdrive.d.ts.map +1 -1
- package/lib/Cloudflare/Hyperdrive/Hyperdrive.js +3 -0
- package/lib/Cloudflare/Hyperdrive/Hyperdrive.js.map +1 -1
- package/lib/Cloudflare/Hyperdrive/HyperdriveBinding.d.ts +3 -2
- package/lib/Cloudflare/Hyperdrive/HyperdriveBinding.d.ts.map +1 -1
- package/lib/Cloudflare/Hyperdrive/HyperdriveBinding.js +32 -33
- package/lib/Cloudflare/Hyperdrive/HyperdriveBinding.js.map +1 -1
- package/lib/Cloudflare/KV/KVNamespace.d.ts +1 -0
- package/lib/Cloudflare/KV/KVNamespace.d.ts.map +1 -1
- package/lib/Cloudflare/KV/KVNamespace.js +2 -0
- package/lib/Cloudflare/KV/KVNamespace.js.map +1 -1
- package/lib/Cloudflare/Local.js +1 -1
- package/lib/Cloudflare/Local.js.map +1 -1
- package/lib/Cloudflare/Providers.d.ts +2 -1
- package/lib/Cloudflare/Providers.d.ts.map +1 -1
- package/lib/Cloudflare/Providers.js +21 -17
- package/lib/Cloudflare/Providers.js.map +1 -1
- package/lib/Cloudflare/Queue/Queue.d.ts +1 -0
- package/lib/Cloudflare/Queue/Queue.d.ts.map +1 -1
- package/lib/Cloudflare/Queue/Queue.js +1 -0
- package/lib/Cloudflare/Queue/Queue.js.map +1 -1
- package/lib/Cloudflare/Queue/QueueConsumer.d.ts +2 -1
- package/lib/Cloudflare/Queue/QueueConsumer.d.ts.map +1 -1
- package/lib/Cloudflare/Queue/QueueConsumer.js +11 -3
- package/lib/Cloudflare/Queue/QueueConsumer.js.map +1 -1
- package/lib/Cloudflare/Queue/QueueEventSource.d.ts +30 -4
- package/lib/Cloudflare/Queue/QueueEventSource.d.ts.map +1 -1
- package/lib/Cloudflare/Queue/QueueEventSource.js +22 -1
- package/lib/Cloudflare/Queue/QueueEventSource.js.map +1 -1
- package/lib/Cloudflare/R2/R2Bucket.d.ts +1 -0
- package/lib/Cloudflare/R2/R2Bucket.d.ts.map +1 -1
- package/lib/Cloudflare/R2/R2Bucket.js +18 -0
- package/lib/Cloudflare/R2/R2Bucket.js.map +1 -1
- package/lib/Cloudflare/SecretsStore/Secret.d.ts.map +1 -1
- package/lib/Cloudflare/SecretsStore/Secret.js +13 -34
- package/lib/Cloudflare/SecretsStore/Secret.js.map +1 -1
- package/lib/Cloudflare/SecretsStore/SecretBinding.d.ts +3 -2
- package/lib/Cloudflare/SecretsStore/SecretBinding.d.ts.map +1 -1
- package/lib/Cloudflare/SecretsStore/SecretBinding.js +3 -2
- package/lib/Cloudflare/SecretsStore/SecretBinding.js.map +1 -1
- package/lib/Cloudflare/StateStore/Api.d.ts +5 -13
- package/lib/Cloudflare/StateStore/Api.d.ts.map +1 -1
- package/lib/Cloudflare/StateStore/Api.js +14 -8
- package/lib/Cloudflare/StateStore/Api.js.map +1 -1
- package/lib/Cloudflare/StateStore/State.d.ts.map +1 -1
- package/lib/Cloudflare/StateStore/State.js +45 -9
- package/lib/Cloudflare/StateStore/State.js.map +1 -1
- package/lib/Cloudflare/StateStore/Store.d.ts.map +1 -1
- package/lib/Cloudflare/StateStore/Store.js +5 -2
- package/lib/Cloudflare/StateStore/Store.js.map +1 -1
- package/lib/Cloudflare/VpcService/VpcService.d.ts +2 -2
- package/lib/Cloudflare/VpcService/VpcService.d.ts.map +1 -1
- package/lib/Cloudflare/Website/StaticSite.d.ts +5 -5
- package/lib/Cloudflare/Website/StaticSite.d.ts.map +1 -1
- package/lib/Cloudflare/Website/StaticSite.js +3 -0
- package/lib/Cloudflare/Website/StaticSite.js.map +1 -1
- package/lib/Cloudflare/Website/Vite.d.ts +5 -5
- package/lib/Cloudflare/Website/Vite.d.ts.map +1 -1
- package/lib/Cloudflare/Website/Vite.js.map +1 -1
- package/lib/Cloudflare/Workers/Assets.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Assets.js +1 -1
- package/lib/Cloudflare/Workers/Assets.js.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectBridge.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectBridge.js +4 -2
- package/lib/Cloudflare/Workers/DurableObjectBridge.js.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectNamespace.d.ts +183 -6
- package/lib/Cloudflare/Workers/DurableObjectNamespace.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/DurableObjectNamespace.js +279 -76
- package/lib/Cloudflare/Workers/DurableObjectNamespace.js.map +1 -1
- package/lib/Cloudflare/Workers/HttpServer.d.ts +6 -4
- package/lib/Cloudflare/Workers/HttpServer.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/HttpServer.js +20 -15
- package/lib/Cloudflare/Workers/HttpServer.js.map +1 -1
- package/lib/Cloudflare/Workers/InferEnv.d.ts +3 -2
- package/lib/Cloudflare/Workers/InferEnv.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts +4 -7
- package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js +111 -66
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js.map +1 -1
- package/lib/Cloudflare/Workers/Rpc.d.ts +16 -0
- package/lib/Cloudflare/Workers/Rpc.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Rpc.js +22 -0
- package/lib/Cloudflare/Workers/Rpc.js.map +1 -1
- package/lib/Cloudflare/Workers/RpcDurableObjectNamespace.d.ts +285 -0
- package/lib/Cloudflare/Workers/RpcDurableObjectNamespace.d.ts.map +1 -0
- package/lib/Cloudflare/Workers/RpcDurableObjectNamespace.js +288 -0
- package/lib/Cloudflare/Workers/RpcDurableObjectNamespace.js.map +1 -0
- package/lib/Cloudflare/Workers/RpcWorker.d.ts +305 -0
- package/lib/Cloudflare/Workers/RpcWorker.d.ts.map +1 -0
- package/lib/Cloudflare/Workers/RpcWorker.js +350 -0
- package/lib/Cloudflare/Workers/RpcWorker.js.map +1 -0
- package/lib/Cloudflare/Workers/Vite.d.ts +1 -1
- package/lib/Cloudflare/Workers/Vite.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Vite.js +2 -1
- package/lib/Cloudflare/Workers/Vite.js.map +1 -1
- package/lib/Cloudflare/Workers/Worker.d.ts +69 -24
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js +168 -47
- package/lib/Cloudflare/Workers/Worker.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts +1 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.js +158 -97
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBinding.d.ts +11 -23
- package/lib/Cloudflare/Workers/WorkerBinding.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBinding.js +3 -0
- package/lib/Cloudflare/Workers/WorkerBinding.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBridge.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBridge.js +5 -2
- package/lib/Cloudflare/Workers/WorkerBridge.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBundle.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBundle.js +4 -1
- package/lib/Cloudflare/Workers/WorkerBundle.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerRuntimeContext.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerRuntimeContext.js +9 -10
- package/lib/Cloudflare/Workers/WorkerRuntimeContext.js.map +1 -1
- package/lib/Cloudflare/Workers/Workflow.d.ts +5 -3
- package/lib/Cloudflare/Workers/Workflow.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Workflow.js +19 -1
- package/lib/Cloudflare/Workers/Workflow.js.map +1 -1
- package/lib/Cloudflare/Workers/index.d.ts +2 -0
- package/lib/Cloudflare/Workers/index.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/index.js +2 -0
- package/lib/Cloudflare/Workers/index.js.map +1 -1
- package/lib/Cloudflare/index.d.ts +1 -0
- package/lib/Cloudflare/index.d.ts.map +1 -1
- package/lib/Cloudflare/index.js +1 -0
- package/lib/Cloudflare/index.js.map +1 -1
- package/lib/Dependencies.d.ts +10 -0
- package/lib/Dependencies.d.ts.map +1 -0
- package/lib/Dependencies.js +1 -0
- package/lib/Dependencies.js.map +1 -0
- package/lib/Deploy.d.ts +2 -1
- package/lib/Deploy.d.ts.map +1 -1
- package/lib/Deploy.js +2 -2
- package/lib/Deploy.js.map +1 -1
- package/lib/Diff.d.ts +11 -0
- package/lib/Diff.d.ts.map +1 -1
- package/lib/Diff.js +11 -0
- package/lib/Diff.js.map +1 -1
- package/lib/Input.d.ts +2 -1
- package/lib/Input.d.ts.map +1 -1
- package/lib/KeyPair.d.ts +77 -0
- package/lib/KeyPair.d.ts.map +1 -0
- package/lib/KeyPair.js +102 -0
- package/lib/KeyPair.js.map +1 -0
- package/lib/Local/RpcProvider.d.ts +3 -1
- package/lib/Local/RpcProvider.d.ts.map +1 -1
- package/lib/Local/RpcProvider.js +28 -2
- package/lib/Local/RpcProvider.js.map +1 -1
- package/lib/Local/RpcServerEnvironment.js +1 -1
- package/lib/Local/RpcServerEnvironment.js.map +1 -1
- package/lib/Neon/Project.d.ts.map +1 -1
- package/lib/Neon/Project.js +14 -3
- package/lib/Neon/Project.js.map +1 -1
- package/lib/Output.d.ts.map +1 -1
- package/lib/Output.js +9 -2
- package/lib/Output.js.map +1 -1
- package/lib/Phase.d.ts +2 -1
- package/lib/Phase.d.ts.map +1 -1
- package/lib/Phase.js +6 -1
- package/lib/Phase.js.map +1 -1
- package/lib/Plan.d.ts.map +1 -1
- package/lib/Plan.js +14 -3
- package/lib/Plan.js.map +1 -1
- package/lib/Platform.d.ts +8 -6
- package/lib/Platform.d.ts.map +1 -1
- package/lib/Platform.js +33 -3
- package/lib/Platform.js.map +1 -1
- package/lib/Random.d.ts.map +1 -1
- package/lib/Random.js +9 -14
- package/lib/Random.js.map +1 -1
- package/lib/RuntimeContext.d.ts +21 -1
- package/lib/RuntimeContext.d.ts.map +1 -1
- package/lib/RuntimeContext.js +12 -0
- package/lib/RuntimeContext.js.map +1 -1
- package/lib/Stack.d.ts +3 -3
- package/lib/Stack.d.ts.map +1 -1
- package/lib/Stack.js.map +1 -1
- package/lib/State/HttpStateApi.d.ts +2 -2
- package/lib/State/StateEncoding.d.ts +8 -0
- package/lib/State/StateEncoding.d.ts.map +1 -1
- package/lib/State/StateEncoding.js +55 -5
- package/lib/State/StateEncoding.js.map +1 -1
- package/lib/Test/Bun.d.ts.map +1 -1
- package/lib/Test/Bun.js +0 -2
- package/lib/Test/Bun.js.map +1 -1
- package/lib/Test/Vitest.d.ts.map +1 -1
- package/lib/Test/Vitest.js +0 -2
- package/lib/Test/Vitest.js.map +1 -1
- package/lib/Util/Duration.d.ts +14 -0
- package/lib/Util/Duration.d.ts.map +1 -0
- package/lib/Util/Duration.js +18 -0
- package/lib/Util/Duration.js.map +1 -0
- package/lib/Util/index.d.ts +0 -6
- package/lib/Util/index.d.ts.map +1 -1
- package/lib/Util/index.js +0 -6
- package/lib/Util/index.js.map +1 -1
- package/lib/Util/types.d.ts +3 -1
- package/lib/Util/types.d.ts.map +1 -1
- package/lib/Util/types.js +5 -1
- package/lib/Util/types.js.map +1 -1
- package/lib/index.d.ts +2 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -3
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +20 -19
- package/src/AWS/Lambda/Function.ts +87 -34
- package/src/AWS/Providers.ts +3 -0
- package/src/Apply.ts +18 -1
- package/src/Auth/AuthProvider.ts +25 -5
- package/src/Auth/Credentials.ts +8 -7
- package/src/Cli/commands/_shared.ts +47 -4
- package/src/Cli/commands/dev.ts +13 -1
- package/src/Cli/commands/login.ts +20 -4
- package/src/Cli/commands/profile.ts +24 -34
- package/src/Cli/main.ts +0 -3
- package/src/Cloudflare/AiGateway/AiGateway.ts +2 -6
- package/src/Cloudflare/BrowserRendering/BrowserRendering.ts +132 -0
- package/src/Cloudflare/BrowserRendering/BrowserRenderingBinding.ts +137 -0
- package/src/Cloudflare/BrowserRendering/index.ts +11 -0
- package/src/Cloudflare/Container/Container.ts +3 -3
- package/src/Cloudflare/Container/StartContainer.ts +1 -2
- package/src/Cloudflare/D1/D1Database.ts +4 -1
- package/src/Cloudflare/D1/D1DatabaseBinding.ts +1 -1
- package/src/Cloudflare/Fetcher.ts +0 -2
- package/src/Cloudflare/Hyperdrive/Hyperdrive.ts +5 -0
- package/src/Cloudflare/Hyperdrive/HyperdriveBinding.ts +41 -43
- package/src/Cloudflare/KV/KVNamespace.ts +4 -0
- package/src/Cloudflare/Local.ts +1 -1
- package/src/Cloudflare/Providers.ts +25 -16
- package/src/Cloudflare/Queue/Queue.ts +3 -0
- package/src/Cloudflare/Queue/QueueConsumer.ts +23 -8
- package/src/Cloudflare/Queue/QueueEventSource.ts +33 -5
- package/src/Cloudflare/R2/R2Bucket.ts +26 -0
- package/src/Cloudflare/SecretsStore/Secret.ts +14 -41
- package/src/Cloudflare/SecretsStore/SecretBinding.ts +11 -11
- package/src/Cloudflare/StateStore/Api.ts +15 -15
- package/src/Cloudflare/StateStore/State.ts +68 -6
- package/src/Cloudflare/StateStore/Store.ts +5 -2
- package/src/Cloudflare/VpcService/VpcService.ts +2 -2
- package/src/Cloudflare/Website/StaticSite.ts +8 -10
- package/src/Cloudflare/Website/Vite.ts +4 -7
- package/src/Cloudflare/Workers/Assets.ts +1 -1
- package/src/Cloudflare/Workers/DurableObjectBridge.ts +7 -4
- package/src/Cloudflare/Workers/DurableObjectNamespace.ts +380 -121
- package/src/Cloudflare/Workers/HttpServer.ts +31 -25
- package/src/Cloudflare/Workers/InferEnv.ts +15 -8
- package/src/Cloudflare/Workers/LocalWorkerProvider.ts +139 -78
- package/src/Cloudflare/Workers/Rpc.ts +50 -0
- package/src/Cloudflare/Workers/RpcDurableObjectNamespace.ts +502 -0
- package/src/Cloudflare/Workers/RpcWorker.ts +562 -0
- package/src/Cloudflare/Workers/Vite.ts +2 -0
- package/src/Cloudflare/Workers/Worker.ts +274 -93
- package/src/Cloudflare/Workers/WorkerAsyncBindings.ts +158 -103
- package/src/Cloudflare/Workers/WorkerBinding.ts +10 -0
- package/src/Cloudflare/Workers/WorkerBridge.ts +7 -4
- package/src/Cloudflare/Workers/WorkerBundle.ts +4 -1
- package/src/Cloudflare/Workers/WorkerRuntimeContext.ts +8 -15
- package/src/Cloudflare/Workers/Workflow.ts +22 -3
- package/src/Cloudflare/Workers/index.ts +2 -0
- package/src/Cloudflare/index.ts +1 -0
- package/src/Dependencies.ts +10 -0
- package/src/Deploy.ts +3 -1
- package/src/Diff.ts +13 -0
- package/src/Input.ts +2 -0
- package/src/KeyPair.ts +146 -0
- package/src/Local/RpcProvider.ts +45 -1
- package/src/Local/RpcServerEnvironment.ts +1 -1
- package/src/Neon/Project.ts +16 -3
- package/src/Output.ts +8 -2
- package/src/Phase.ts +8 -0
- package/src/Plan.ts +16 -3
- package/src/Platform.ts +74 -27
- package/src/Random.ts +22 -27
- package/src/RuntimeContext.ts +23 -1
- package/src/Stack.ts +3 -3
- package/src/State/StateEncoding.ts +58 -7
- package/src/Test/Bun.ts +0 -3
- package/src/Test/Vitest.ts +0 -3
- package/src/Util/Duration.ts +21 -0
- package/src/Util/index.ts +0 -6
- package/src/Util/types.ts +9 -2
- package/src/index.ts +2 -3
- package/lib/Secret.d.ts +0 -50
- package/lib/Secret.d.ts.map +0 -1
- package/lib/Secret.js +0 -23
- package/lib/Secret.js.map +0 -1
- package/lib/Trait.d.ts +0 -43
- package/lib/Trait.d.ts.map +0 -1
- package/lib/Trait.js +0 -17
- package/lib/Trait.js.map +0 -1
- package/lib/Util/LocalhostDns.d.ts +0 -23
- package/lib/Util/LocalhostDns.d.ts.map +0 -1
- package/lib/Util/LocalhostDns.js +0 -46
- package/lib/Util/LocalhostDns.js.map +0 -1
- package/lib/Util/assert-never.d.ts +0 -12
- package/lib/Util/assert-never.d.ts.map +0 -1
- package/lib/Util/assert-never.js +0 -11
- package/lib/Util/assert-never.js.map +0 -1
- package/lib/Util/class.d.ts +0 -3
- package/lib/Util/class.d.ts.map +0 -1
- package/lib/Util/class.js +0 -1
- package/lib/Util/class.js.map +0 -1
- package/lib/Util/ignore.d.ts +0 -40
- package/lib/Util/ignore.d.ts.map +0 -1
- package/lib/Util/ignore.js +0 -591
- package/lib/Util/ignore.js.map +0 -1
- package/lib/Util/instance.d.ts +0 -4
- package/lib/Util/instance.d.ts.map +0 -1
- package/lib/Util/instance.js +0 -1
- package/lib/Util/instance.js.map +0 -1
- package/lib/Util/pointer.d.ts +0 -5
- package/lib/Util/pointer.d.ts.map +0 -1
- package/lib/Util/pointer.js +0 -1
- package/lib/Util/pointer.js.map +0 -1
- package/lib/Util/schema-to-type.d.ts +0 -42
- package/lib/Util/schema-to-type.d.ts.map +0 -1
- package/lib/Util/schema-to-type.js +0 -364
- package/lib/Util/schema-to-type.js.map +0 -1
- package/lib/Util/todo.d.ts +0 -3
- package/lib/Util/todo.d.ts.map +0 -1
- package/lib/Util/todo.js +0 -3
- package/lib/Util/todo.js.map +0 -1
- package/lib/Variable.d.ts +0 -29
- package/lib/Variable.d.ts.map +0 -1
- package/lib/Variable.js +0 -9
- package/lib/Variable.js.map +0 -1
- package/src/Secret.ts +0 -87
- package/src/Trait.ts +0 -105
- package/src/Util/LocalhostDns.ts +0 -52
- package/src/Util/assert-never.ts +0 -18
- package/src/Util/class.ts +0 -7
- package/src/Util/ignore.ts +0 -815
- package/src/Util/instance.ts +0 -9
- package/src/Util/pointer.ts +0 -5
- package/src/Util/schema-to-type.ts +0 -456
- package/src/Util/todo.ts +0 -4
- package/src/Variable.ts +0 -44
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as Duration from "effect/Duration";
|
|
1
2
|
import * as Redacted from "effect/Redacted";
|
|
2
3
|
import { isResource } from "../Resource.ts";
|
|
3
4
|
|
|
@@ -8,6 +9,40 @@ import { isResource } from "../Resource.ts";
|
|
|
8
9
|
*/
|
|
9
10
|
export const REDACTED_MARKER = "__redacted__";
|
|
10
11
|
|
|
12
|
+
/**
|
|
13
|
+
* JSON marker used to tag a `Duration` value when writing state.
|
|
14
|
+
* The reviver recognises objects with exactly this key and rebuilds
|
|
15
|
+
* a real `Duration` instance on read so that downstream code can call
|
|
16
|
+
* `Duration.toSeconds`, `Duration.toMillis`, etc. without first
|
|
17
|
+
* decoding `Duration.toJSON`'s `{_id,_tag,...}` shape.
|
|
18
|
+
*/
|
|
19
|
+
export const DURATION_MARKER = "__duration__";
|
|
20
|
+
|
|
21
|
+
const decodeDuration = (encoded: unknown): Duration.Duration | undefined => {
|
|
22
|
+
if (encoded === null || typeof encoded !== "object") return undefined;
|
|
23
|
+
const json = encoded as {
|
|
24
|
+
_tag?: "Millis" | "Nanos" | "Infinity" | "NegativeInfinity";
|
|
25
|
+
millis?: number;
|
|
26
|
+
nanos?: string;
|
|
27
|
+
};
|
|
28
|
+
switch (json._tag) {
|
|
29
|
+
case "Millis":
|
|
30
|
+
return json.millis !== undefined
|
|
31
|
+
? Duration.millis(json.millis)
|
|
32
|
+
: undefined;
|
|
33
|
+
case "Nanos":
|
|
34
|
+
return json.nanos !== undefined
|
|
35
|
+
? Duration.nanos(BigInt(json.nanos))
|
|
36
|
+
: undefined;
|
|
37
|
+
case "Infinity":
|
|
38
|
+
return Duration.infinity;
|
|
39
|
+
case "NegativeInfinity":
|
|
40
|
+
return Duration.zero; // Effect treats negatives as zero clamp
|
|
41
|
+
default:
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
11
46
|
/**
|
|
12
47
|
* Recursively encode a state value for JSON serialisation.
|
|
13
48
|
*
|
|
@@ -32,6 +67,16 @@ export const encodeState = (value: unknown): unknown => {
|
|
|
32
67
|
[REDACTED_MARKER]: encodeState(Redacted.value(value)),
|
|
33
68
|
};
|
|
34
69
|
}
|
|
70
|
+
if (Duration.isDuration(value)) {
|
|
71
|
+
// `JSON.stringify(Duration.seconds(N))` already invokes Duration.toJSON,
|
|
72
|
+
// but encodeState is also called for code paths that don't go through
|
|
73
|
+
// `JSON.stringify` (e.g. the HTTP state-store). Tag with our marker so
|
|
74
|
+
// the reviver can unambiguously rebuild a real Duration instance —
|
|
75
|
+
// Duration.toJSON's `{_id,_tag,...}` shape is NOT a valid Duration.Input.
|
|
76
|
+
return {
|
|
77
|
+
[DURATION_MARKER]: value.toJSON(),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
35
80
|
if (isResource(value)) {
|
|
36
81
|
return {
|
|
37
82
|
id: value.LogicalId,
|
|
@@ -56,13 +101,15 @@ export const encodeState = (value: unknown): unknown => {
|
|
|
56
101
|
* through {@link encodeState}. Intended for use with `JSON.parse`.
|
|
57
102
|
*/
|
|
58
103
|
export const reviveState = (_key: string, value: unknown): unknown => {
|
|
59
|
-
if (
|
|
60
|
-
value
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
104
|
+
if (value !== null && typeof value === "object" && !Array.isArray(value)) {
|
|
105
|
+
const obj = value as Record<string, unknown>;
|
|
106
|
+
if (REDACTED_MARKER in obj) {
|
|
107
|
+
return Redacted.make(obj[REDACTED_MARKER]);
|
|
108
|
+
}
|
|
109
|
+
if (DURATION_MARKER in obj) {
|
|
110
|
+
const decoded = decodeDuration(obj[DURATION_MARKER]);
|
|
111
|
+
if (decoded !== undefined) return decoded;
|
|
112
|
+
}
|
|
66
113
|
}
|
|
67
114
|
return value;
|
|
68
115
|
};
|
|
@@ -82,6 +129,10 @@ export const reviveStateRecursive = (value: unknown): unknown => {
|
|
|
82
129
|
if (keys.length === 1 && keys[0] === REDACTED_MARKER) {
|
|
83
130
|
return Redacted.make(reviveStateRecursive(obj[REDACTED_MARKER]));
|
|
84
131
|
}
|
|
132
|
+
if (keys.length === 1 && keys[0] === DURATION_MARKER) {
|
|
133
|
+
const decoded = decodeDuration(obj[DURATION_MARKER]);
|
|
134
|
+
if (decoded !== undefined) return decoded;
|
|
135
|
+
}
|
|
85
136
|
const result: Record<string, unknown> = {};
|
|
86
137
|
for (const [k, v] of Object.entries(obj)) {
|
|
87
138
|
result[k] = reviveStateRecursive(v);
|
package/src/Test/Bun.ts
CHANGED
|
@@ -7,11 +7,8 @@ import type { HookOptions } from "node:test";
|
|
|
7
7
|
import type { AlchemyContext } from "../AlchemyContext.ts";
|
|
8
8
|
import type { CompiledStack } from "../Stack.ts";
|
|
9
9
|
import type { Stage } from "../Stage.ts";
|
|
10
|
-
import { installLocalhostDns } from "../Util/LocalhostDns.ts";
|
|
11
10
|
import * as Core from "./Core.ts";
|
|
12
11
|
|
|
13
|
-
installLocalhostDns();
|
|
14
|
-
|
|
15
12
|
export type MakeOptions<ROut = any> = Core.MakeOptions<ROut>;
|
|
16
13
|
export type ScratchStack = Core.ScratchStack;
|
|
17
14
|
export type TestEffect<A, R = never> = Core.TestEffect<A, R>;
|
package/src/Test/Vitest.ts
CHANGED
|
@@ -12,11 +12,8 @@ import {
|
|
|
12
12
|
import type { AlchemyContext } from "../AlchemyContext.ts";
|
|
13
13
|
import type { CompiledStack } from "../Stack.ts";
|
|
14
14
|
import type { Stage } from "../Stage.ts";
|
|
15
|
-
import { installLocalhostDns } from "../Util/LocalhostDns.ts";
|
|
16
15
|
import * as Core from "./Core.ts";
|
|
17
16
|
|
|
18
|
-
installLocalhostDns();
|
|
19
|
-
|
|
20
17
|
export type MakeOptions<ROut = any> = Core.MakeOptions<ROut>;
|
|
21
18
|
export type ScratchStack = Core.ScratchStack;
|
|
22
19
|
export type TestEffect<A, R = never> = Core.TestEffect<A, R>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as Duration from "effect/Duration";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Convert a {@link Duration.Input} to whole, non-negative
|
|
5
|
+
* milliseconds. Returns `undefined` when `input` is `undefined`,
|
|
6
|
+
* so call sites can map through optional duration fields without
|
|
7
|
+
* a branch.
|
|
8
|
+
*/
|
|
9
|
+
export const toMillis = (input: Duration.Input | undefined) =>
|
|
10
|
+
input === undefined
|
|
11
|
+
? undefined
|
|
12
|
+
: Math.max(0, Math.ceil(Duration.toMillis(input)));
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Convert a {@link Duration.Input} to whole, non-negative seconds.
|
|
16
|
+
* Returns `undefined` when `input` is `undefined`.
|
|
17
|
+
*/
|
|
18
|
+
export const toSeconds = (input: Duration.Input | undefined) =>
|
|
19
|
+
input === undefined
|
|
20
|
+
? undefined
|
|
21
|
+
: Math.max(0, Math.ceil(Duration.toSeconds(input)));
|
package/src/Util/index.ts
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
export * from "./assert-never.ts";
|
|
2
1
|
export * from "./base32.ts";
|
|
3
2
|
export * from "./camel.ts";
|
|
4
|
-
export * from "./class.ts";
|
|
5
3
|
export * from "./data.ts";
|
|
6
4
|
export * from "./dedent.ts";
|
|
7
|
-
export * from "./instance.ts";
|
|
8
|
-
export * from "./pointer.ts";
|
|
9
|
-
export * from "./schema-to-type.ts";
|
|
10
5
|
export * from "./service.ts";
|
|
11
6
|
export * from "./sha256.ts";
|
|
12
7
|
export * from "./stable.ts";
|
|
13
|
-
export * from "./todo.ts";
|
|
14
8
|
export * from "./type.ts";
|
|
15
9
|
export * from "./types.ts";
|
|
16
10
|
export * from "./unknown.ts";
|
package/src/Util/types.ts
CHANGED
|
@@ -18,8 +18,15 @@ export const assertDefined = <T>(value: T | undefined, message: string): T => {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export const asEffect = <T, Err = never, Req = never>(
|
|
21
|
-
effect:
|
|
21
|
+
effect:
|
|
22
|
+
| T
|
|
23
|
+
| Effect.Effect<T, Err, Req>
|
|
24
|
+
| { asEffect: () => Effect.Effect<T, Err, Req> },
|
|
22
25
|
): Effect.Effect<T, Err, Req> =>
|
|
23
|
-
|
|
26
|
+
typeof (effect as any)?.asEffect === "function"
|
|
27
|
+
? (effect as any).asEffect()
|
|
28
|
+
: Effect.isEffect(effect)
|
|
29
|
+
? effect
|
|
30
|
+
: Effect.succeed(effect as T);
|
|
24
31
|
|
|
25
32
|
export type IsNever<T> = [T] extends [never] ? true : false;
|
package/src/index.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from "./Destroy.ts";
|
|
|
19
19
|
export * from "./Diff.ts";
|
|
20
20
|
export * from "./Input.ts";
|
|
21
21
|
export * from "./InstanceId.ts";
|
|
22
|
+
export * from "./KeyPair.ts";
|
|
22
23
|
export * from "./Namespace.ts";
|
|
23
24
|
export { stackRef } from "./Output.ts";
|
|
24
25
|
export type { Output } from "./Output.ts";
|
|
@@ -30,14 +31,11 @@ export * from "./Ref.ts";
|
|
|
30
31
|
export * as RemovalPolicy from "./RemovalPolicy.ts";
|
|
31
32
|
export * from "./Resource.ts";
|
|
32
33
|
export * as Schema from "./Schema.ts";
|
|
33
|
-
export { Secret } from "./Secret.ts";
|
|
34
34
|
export * as Server from "./Server/index.ts";
|
|
35
35
|
export * as Serverless from "./Serverless/index.ts";
|
|
36
36
|
export { Stack } from "./Stack.ts";
|
|
37
37
|
export * from "./Stage.ts";
|
|
38
38
|
export { inMemoryState, localState } from "./State/index.ts";
|
|
39
|
-
export * from "./Trait.ts";
|
|
40
|
-
export { Variable } from "./Variable.ts";
|
|
41
39
|
|
|
42
40
|
export * as Construct from "./Construct.ts";
|
|
43
41
|
|
|
@@ -45,6 +43,7 @@ export * as Construct from "./Construct.ts";
|
|
|
45
43
|
// downstream `.d.ts` emissions (fixes TS2883 in user files).
|
|
46
44
|
export { AuthProviders } from "./Auth/AuthProvider.ts";
|
|
47
45
|
export { Cli } from "./Cli/Cli.ts";
|
|
46
|
+
export type { Dependencies } from "./Dependencies.ts";
|
|
48
47
|
export type * from "./Platform.ts";
|
|
49
48
|
export { Platform } from "./Platform.ts";
|
|
50
49
|
export type { ProviderCollectionLike } from "./Provider.ts";
|
package/lib/Secret.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import * as Config from "effect/Config";
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import * as Redacted from "effect/Redacted";
|
|
4
|
-
import * as Output from "./Output.ts";
|
|
5
|
-
/**
|
|
6
|
-
* The shapes a {@link secret} can be derived from.
|
|
7
|
-
*
|
|
8
|
-
* - `string` — wrapped in `Redacted.make` and bound as a literal.
|
|
9
|
-
* - `Redacted<string>` — bound as-is.
|
|
10
|
-
* - `Effect<string | Redacted<string>>` — resolved at deploy time.
|
|
11
|
-
* - `Config<string | Redacted<string>>` — resolved against the active
|
|
12
|
-
* `ConfigProvider` at deploy time.
|
|
13
|
-
*/
|
|
14
|
-
export type SecretInput<R = never> = string | Redacted.Redacted<string> | Effect.Effect<string | Redacted.Redacted<string>, any, R> | Config.Config<string | Redacted.Redacted<string>>;
|
|
15
|
-
/**
|
|
16
|
-
* Bind a secret value into the active {@link RuntimeContext} (e.g. a
|
|
17
|
-
* Cloudflare Worker's `env`) under the given `name` so the resource
|
|
18
|
-
* provider deploys it as a secret (e.g. `secret_text` for Cloudflare).
|
|
19
|
-
*
|
|
20
|
-
* The result is an `Output<Redacted<string>>` — `yield*`-ing it returns
|
|
21
|
-
* an `Accessor<Redacted<string>>` that resolves the value at runtime.
|
|
22
|
-
*
|
|
23
|
-
* @example One-arg shortcut — reads `Config.redacted("API_KEY")`
|
|
24
|
-
* ```ts
|
|
25
|
-
* const apiKey = yield* Alchemy.Secret("API_KEY");
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @example From a literal
|
|
29
|
-
* ```ts
|
|
30
|
-
* const apiKey = yield* Alchemy.Secret("API_KEY", "sk-123");
|
|
31
|
-
* ```
|
|
32
|
-
*
|
|
33
|
-
* @example From an Effect
|
|
34
|
-
* ```ts
|
|
35
|
-
* const apiKey = yield* Alchemy.Secret(
|
|
36
|
-
* "API_KEY",
|
|
37
|
-
* Effect.succeed(Redacted.make("sk-123")),
|
|
38
|
-
* );
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* @example From a Config
|
|
42
|
-
* ```ts
|
|
43
|
-
* const apiKey = yield* Alchemy.Secret("API_KEY", Config.redacted("API_KEY"));
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
export declare function Secret(name: string): Output.Output<Redacted.Redacted<string>, never>;
|
|
47
|
-
export declare function Secret<R = never>(name: string, value: SecretInput<R>): Output.Output<Redacted.Redacted<string>, R>;
|
|
48
|
-
/** @internal */
|
|
49
|
-
export declare const toOutput: <T, R = never>(source: T | Effect.Effect<T, any, R> | Config.Config<T> | Output.Output<T, R>) => Output.Output<T, R>;
|
|
50
|
-
//# sourceMappingURL=Secret.d.ts.map
|
package/lib/Secret.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Secret.d.ts","sourceRoot":"","sources":["../src/Secret.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,KAAK,IAC7B,MAAM,GACN,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,GACzB,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,GACzD,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,MAAM,GACX,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC;AACnD,wBAAgB,MAAM,CAAC,CAAC,GAAG,KAAK,EAC9B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GACpB,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;AAe/C,gBAAgB;AAChB,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,CAAC,GAAG,KAAK,EACnC,QAAQ,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAC5E,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAWpB,CAAC"}
|
package/lib/Secret.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as Config from "effect/Config";
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import * as Redacted from "effect/Redacted";
|
|
4
|
-
import * as Output from "./Output.js";
|
|
5
|
-
export function Secret(name, value) {
|
|
6
|
-
const source = value ?? Config.redacted(name);
|
|
7
|
-
const base = toOutput(source);
|
|
8
|
-
return Output.named(base.pipe(Output.map((v) => (Redacted.isRedacted(v) ? v : Redacted.make(v)))), name);
|
|
9
|
-
}
|
|
10
|
-
/** @internal */
|
|
11
|
-
export const toOutput = (source) => {
|
|
12
|
-
if (Output.isOutput(source)) {
|
|
13
|
-
return source;
|
|
14
|
-
}
|
|
15
|
-
if (Config.isConfig(source)) {
|
|
16
|
-
return Output.asOutput(source);
|
|
17
|
-
}
|
|
18
|
-
if (Effect.isEffect(source)) {
|
|
19
|
-
return Output.asOutput(source);
|
|
20
|
-
}
|
|
21
|
-
return Output.asOutput(source);
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=Secret.js.map
|
package/lib/Secret.js.map
DELETED
|
@@ -1 +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7D,CAAC,CAAC"}
|
package/lib/Trait.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { ClassTuple } from ".//Util/class.ts";
|
|
2
|
-
import * as S from "./Schema.ts";
|
|
3
|
-
export declare function defineTrait<F extends TraitFn>(tag: NoInfer<ReturnType<F>["tag"]>, fn: F): TraitDef<F>;
|
|
4
|
-
export declare function defineTrait<T extends Trait>(tag: T["tag"], props: {
|
|
5
|
-
[k in keyof TraitProps<T>]: TraitProps<T>[k];
|
|
6
|
-
}): TraitDef<(<Target>(target: Target) => ApplyTrait<Target, T>)>;
|
|
7
|
-
export declare const applyTrait: <T extends Trait<any, any, any>>(tag: T["tag"], props: { [k in keyof TraitProps<T>]: TraitProps<T>[k]; }) => T;
|
|
8
|
-
export type AnyTrait = Trait<any, any, any>;
|
|
9
|
-
export type TraitFn<T extends AnyTrait = AnyTrait, Args extends any[] = any[]> = (...args: Args) => T;
|
|
10
|
-
export type TraitDef<Fn extends TraitFn = TraitFn> = Fn & {
|
|
11
|
-
/** @internal phantom */
|
|
12
|
-
trait: ReturnType<Fn>;
|
|
13
|
-
};
|
|
14
|
-
export interface Trait<Tag extends string = string, Errors extends any[] = never, Provides extends any[] = never> {
|
|
15
|
-
type?: "trait";
|
|
16
|
-
tag: Tag;
|
|
17
|
-
errors?: ClassTuple<Errors>;
|
|
18
|
-
provides?: ClassTuple<Provides>;
|
|
19
|
-
}
|
|
20
|
-
export type TraitError<A extends Trait<any, any, any>> = InstanceType<Exclude<A["errors"], undefined>[number]>;
|
|
21
|
-
export type TraitProps<A extends Trait<any, any, any>> = {
|
|
22
|
-
[k in keyof _TraitProps<A>]: _TraitProps<A>[k];
|
|
23
|
-
};
|
|
24
|
-
type _TraitProps<A extends Trait<any, any, any>> = Omit<A, "type" | "tag" | "provides" | "errors"> & (A["errors"] extends never | undefined ? {} : {
|
|
25
|
-
errors: Exclude<A["errors"], undefined>;
|
|
26
|
-
}) & (A["provides"] extends never | undefined ? {} : {
|
|
27
|
-
provides: Exclude<A["provides"], undefined>;
|
|
28
|
-
});
|
|
29
|
-
export type ApplyTrait<Target, T extends Trait<any, any, any>> = ([
|
|
30
|
-
Target
|
|
31
|
-
] extends [Annotated<infer s, infer t>] ? Annotated<s, T | t> : [Target] extends [S.Top] ? Annotated<Target, T> : [Target] extends [S.AnyClassSchema] ? Annotated<Target, T | Annotated.Unwrap<Target>> : Target) & {};
|
|
32
|
-
export type Annotated<S, T extends Trait<any, any, any>> = S & {
|
|
33
|
-
/** @internal phantom type */
|
|
34
|
-
S: S;
|
|
35
|
-
type: "annotated";
|
|
36
|
-
/** @internal phatom */
|
|
37
|
-
traits: T;
|
|
38
|
-
};
|
|
39
|
-
export declare namespace Annotated {
|
|
40
|
-
type Unwrap<T> = T extends Annotated<infer _, infer t> ? t : never;
|
|
41
|
-
}
|
|
42
|
-
export {};
|
|
43
|
-
//# sourceMappingURL=Trait.d.ts.map
|
package/lib/Trait.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Trait.d.ts","sourceRoot":"","sources":["../src/Trait.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,CAAC,SAAS,OAAO,EACnD,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAClC,EAAE,EAAE,CAAC,GACJ,QAAQ,CAAC,CAAC,CAAC,CAAC;AAEf,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,CAAC,SAAS,KAAK,EACjD,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,EACb,KAAK,EAAE;KACJ,CAAC,IAAI,MAAM,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC7C,GACA,QAAQ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,MAAM,CAAC,MAAM,CAAC,CAAC,GAC/C,MAAM,CAAC,GAAG,EAAE,CAAC;AAErB,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG;IAC7D,6BAA6B;IAC7B,CAAC,EAAE,CAAC,CAAC;IACL,IAAI,EAAE,WAAW,CAAC;IAClB,uBAAuB;IACvB,MAAM,EAAE,CAAC,CAAC;CACX,CAAC;AAEF,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,KAAY,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;CAC3E"}
|
package/lib/Trait.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as S from "./Schema.js";
|
|
2
|
-
export const applyTrait = (tag, props) => undefined;
|
|
3
|
-
// export declare namespace Traits {
|
|
4
|
-
// export type Of<C, Seen = never> = C extends Seen
|
|
5
|
-
// ? never
|
|
6
|
-
// : C extends Annotated<infer S, infer T>
|
|
7
|
-
// ? T | Of<S, Seen>
|
|
8
|
-
// : C extends AnyClassSchema
|
|
9
|
-
// ? OfFields<C["fields"], Seen | C>
|
|
10
|
-
// : C extends S.Struct<any>
|
|
11
|
-
// ? OfFields<C["fields"], Seen | C>
|
|
12
|
-
// : never;
|
|
13
|
-
// type OfFields<F extends S.Struct.Fields, Seen> = {
|
|
14
|
-
// [prop in keyof F]: Of<F[prop], Seen>;
|
|
15
|
-
// }[keyof F];
|
|
16
|
-
// }
|
|
17
|
-
//# sourceMappingURL=Trait.js.map
|
package/lib/Trait.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Trait.js","sourceRoot":"","sources":["../src/Trait.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAcjC,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,GAAa,EACb,KAEC,EACE,EAAE,CAAC,SAAU,CAAC;AAsEnB,oCAAoC;AACpC,qDAAqD;AACrD,cAAc;AACd,8CAA8C;AAC9C,0BAA0B;AAC1B,mCAAmC;AACnC,4CAA4C;AAC5C,oCAAoC;AACpC,8CAA8C;AAC9C,qBAAqB;AAErB,uDAAuD;AACvD,4CAA4C;AAC5C,gBAAgB;AAChB,IAAI"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Process-level DNS shim that makes `*.localhost` resolve to 127.0.0.1
|
|
3
|
-
* for any HTTP client that goes through undici (Node's global `fetch`,
|
|
4
|
-
* undici-based clients, etc.).
|
|
5
|
-
*
|
|
6
|
-
* Background: macOS's `getaddrinfo` does not honor RFC 6761 for arbitrary
|
|
7
|
-
* `*.localhost` names — only the bare `localhost` is mapped to loopback.
|
|
8
|
-
* The Cloudflare local proxy returns URLs like
|
|
9
|
-
* `http://my-worker.localhost:1337` and dispatches by the URL hostname,
|
|
10
|
-
* so we cannot rewrite the URL client-side to `127.0.0.1` (and `Host` is
|
|
11
|
-
* a forbidden fetch header). The fix is to make the host resolvable at
|
|
12
|
-
* the network layer.
|
|
13
|
-
*
|
|
14
|
-
* On Bun, `globalThis.fetch` is the native (Zig) implementation and does
|
|
15
|
-
* not consult undici's global dispatcher; Bun resolves `*.localhost`
|
|
16
|
-
* itself on Darwin/Linux, so this shim is effectively a no-op there for
|
|
17
|
-
* the global `fetch` and only matters if user code reaches for `undici`
|
|
18
|
-
* directly.
|
|
19
|
-
*
|
|
20
|
-
* Calling `installLocalhostDns()` is idempotent.
|
|
21
|
-
*/
|
|
22
|
-
export declare const installLocalhostDns: () => void;
|
|
23
|
-
//# sourceMappingURL=LocalhostDns.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LocalhostDns.d.ts","sourceRoot":"","sources":["../../src/Util/LocalhostDns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAYH,eAAO,MAAM,mBAAmB,QAAO,IAmBtC,CAAC"}
|
package/lib/Util/LocalhostDns.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Process-level DNS shim that makes `*.localhost` resolve to 127.0.0.1
|
|
3
|
-
* for any HTTP client that goes through undici (Node's global `fetch`,
|
|
4
|
-
* undici-based clients, etc.).
|
|
5
|
-
*
|
|
6
|
-
* Background: macOS's `getaddrinfo` does not honor RFC 6761 for arbitrary
|
|
7
|
-
* `*.localhost` names — only the bare `localhost` is mapped to loopback.
|
|
8
|
-
* The Cloudflare local proxy returns URLs like
|
|
9
|
-
* `http://my-worker.localhost:1337` and dispatches by the URL hostname,
|
|
10
|
-
* so we cannot rewrite the URL client-side to `127.0.0.1` (and `Host` is
|
|
11
|
-
* a forbidden fetch header). The fix is to make the host resolvable at
|
|
12
|
-
* the network layer.
|
|
13
|
-
*
|
|
14
|
-
* On Bun, `globalThis.fetch` is the native (Zig) implementation and does
|
|
15
|
-
* not consult undici's global dispatcher; Bun resolves `*.localhost`
|
|
16
|
-
* itself on Darwin/Linux, so this shim is effectively a no-op there for
|
|
17
|
-
* the global `fetch` and only matters if user code reaches for `undici`
|
|
18
|
-
* directly.
|
|
19
|
-
*
|
|
20
|
-
* Calling `installLocalhostDns()` is idempotent.
|
|
21
|
-
*/
|
|
22
|
-
import * as dns from "node:dns";
|
|
23
|
-
import * as undici from "undici";
|
|
24
|
-
let installed = false;
|
|
25
|
-
const isLocalhost = (hostname) => hostname === "localhost" ||
|
|
26
|
-
hostname === "[::1]" ||
|
|
27
|
-
hostname.endsWith(".localhost");
|
|
28
|
-
export const installLocalhostDns = () => {
|
|
29
|
-
if (installed)
|
|
30
|
-
return;
|
|
31
|
-
installed = true;
|
|
32
|
-
undici.setGlobalDispatcher(new undici.Agent({
|
|
33
|
-
connect: {
|
|
34
|
-
lookup: (hostname, options, cb) => {
|
|
35
|
-
if (isLocalhost(hostname)) {
|
|
36
|
-
if (options && options.all) {
|
|
37
|
-
return cb(null, [{ address: "127.0.0.1", family: 4 }]);
|
|
38
|
-
}
|
|
39
|
-
return cb(null, "127.0.0.1", 4);
|
|
40
|
-
}
|
|
41
|
-
return dns.lookup(hostname, options, cb);
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
}));
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=LocalhostDns.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LocalhostDns.js","sourceRoot":"","sources":["../../src/Util/LocalhostDns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,MAAM,WAAW,GAAG,CAAC,QAAgB,EAAW,EAAE,CAChD,QAAQ,KAAK,WAAW;IACxB,QAAQ,KAAK,OAAO;IACpB,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AAElC,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAS,EAAE;IAC5C,IAAI,SAAS;QAAE,OAAO;IACtB,SAAS,GAAG,IAAI,CAAC;IAEjB,MAAM,CAAC,mBAAmB,CACxB,IAAI,MAAM,CAAC,KAAK,CAAC;QACf,OAAO,EAAE;YACP,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE;gBAChC,IAAI,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC;oBAC1B,IAAI,OAAO,IAAK,OAA6B,CAAC,GAAG,EAAE,CAAC;wBAClD,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;oBACzD,CAAC;oBACD,OAAO,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;gBAClC,CAAC;gBACD,OAAO,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;YAC3C,CAAC;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
declare const UnexpectedValueError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
3
|
-
readonly _tag: "UnexpectedValueError";
|
|
4
|
-
} & Readonly<A>;
|
|
5
|
-
export declare class UnexpectedValueError extends UnexpectedValueError_base<{
|
|
6
|
-
message: string;
|
|
7
|
-
value: never;
|
|
8
|
-
}> {
|
|
9
|
-
}
|
|
10
|
-
export declare const assertNeverOrDie: (value: never) => Effect.Effect<never>;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=assert-never.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assert-never.d.ts","sourceRoot":"","sources":["../../src/Util/assert-never.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;;;;AAGxC,qBAAa,oBAAqB,SAAQ,0BAExC;IACA,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;CAAG;AAEL,eAAO,MAAM,gBAAgB,GAAI,OAAO,KAAK,KAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAOlE,CAAC"}
|
package/lib/Util/assert-never.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import * as Data from "effect/Data";
|
|
3
|
-
export class UnexpectedValueError extends Data.TaggedError("UnexpectedValueError") {
|
|
4
|
-
}
|
|
5
|
-
export const assertNeverOrDie = (value) => {
|
|
6
|
-
return Effect.die(new UnexpectedValueError({
|
|
7
|
-
message: `Unexpected value: ${value}`,
|
|
8
|
-
value,
|
|
9
|
-
}));
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=assert-never.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assert-never.js","sourceRoot":"","sources":["../../src/Util/assert-never.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,MAAM,OAAO,oBAAqB,SAAQ,IAAI,CAAC,WAAW,CACxD,sBAAsB,CAItB;CAAG;AAEL,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAY,EAAwB,EAAE;IACrE,OAAO,MAAM,CAAC,GAAG,CACf,IAAI,oBAAoB,CAAC;QACvB,OAAO,EAAE,qBAAqB,KAAK,EAAE;QACrC,KAAK;KACN,CAAC,CACH,CAAC;AACJ,CAAC,CAAC"}
|
package/lib/Util/class.d.ts
DELETED
package/lib/Util/class.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"class.d.ts","sourceRoot":"","sources":["../../src/Util/class.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,CAAC,CAAC,GAAG,GAAG,IACrB,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,GAC3B,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC;AAE1B,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,GAC3E,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,GAClC,EAAE,CAAC"}
|
package/lib/Util/class.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=class.js.map
|
package/lib/Util/class.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"class.js","sourceRoot":"","sources":["../../src/Util/class.ts"],"names":[],"mappings":""}
|
package/lib/Util/ignore.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
declare const isPathValid: (path: any) => any;
|
|
2
|
-
declare const _default: (options?: IgnoreOptions) => IgnoreInstance;
|
|
3
|
-
export default _default;
|
|
4
|
-
export { isPathValid };
|
|
5
|
-
type Pathname = string;
|
|
6
|
-
interface PatternParams {
|
|
7
|
-
pattern: string;
|
|
8
|
-
mark?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface IgnoreOptions {
|
|
11
|
-
ignorecase?: boolean;
|
|
12
|
-
/** For compatibility. */
|
|
13
|
-
ignoreCase?: boolean;
|
|
14
|
-
allowRelativePaths?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export interface IgnoreInstance {
|
|
17
|
-
add(patterns: string | IgnoreInstance | readonly (string | IgnoreInstance)[] | PatternParams): this;
|
|
18
|
-
filter(pathnames: readonly Pathname[]): Pathname[];
|
|
19
|
-
createFilter(): (pathname: Pathname) => boolean;
|
|
20
|
-
ignores(pathname: Pathname): boolean;
|
|
21
|
-
test(pathname: Pathname): {
|
|
22
|
-
ignored: boolean;
|
|
23
|
-
unignored: boolean;
|
|
24
|
-
rule?: {
|
|
25
|
-
pattern: string;
|
|
26
|
-
mark?: string;
|
|
27
|
-
negative: boolean;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
checkIgnore(pathname: Pathname): {
|
|
31
|
-
ignored: boolean;
|
|
32
|
-
unignored: boolean;
|
|
33
|
-
rule?: {
|
|
34
|
-
pattern: string;
|
|
35
|
-
mark?: string;
|
|
36
|
-
negative: boolean;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=ignore.d.ts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