alchemy 2.0.0-beta.62 → 2.0.0-beta.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/bin/exec.js +1959 -70
- package/bin/exec.js.map +1 -1
- package/lib/AWS/AuthProvider.js +1 -1
- package/lib/AWS/AuthProvider.js.map +1 -1
- package/lib/AWS/EC2/hosted.d.ts.map +1 -1
- package/lib/AWS/EC2/hosted.js +2 -1
- package/lib/AWS/EC2/hosted.js.map +1 -1
- package/lib/AWS/ECS/Task.d.ts.map +1 -1
- package/lib/AWS/ECS/Task.js +2 -1
- package/lib/AWS/ECS/Task.js.map +1 -1
- package/lib/AWS/Lambda/Function.d.ts.map +1 -1
- package/lib/AWS/Lambda/Function.js +13 -40
- package/lib/AWS/Lambda/Function.js.map +1 -1
- package/lib/AWS/Lambda/MicrovmRuntimeContext.d.ts.map +1 -1
- package/lib/AWS/Lambda/MicrovmRuntimeContext.js +9 -21
- package/lib/AWS/Lambda/MicrovmRuntimeContext.js.map +1 -1
- package/lib/Action.d.ts +8 -0
- package/lib/Action.d.ts.map +1 -1
- package/lib/Action.js +16 -5
- package/lib/Action.js.map +1 -1
- package/lib/ActionRuntimeContext.d.ts +14 -0
- package/lib/ActionRuntimeContext.d.ts.map +1 -0
- package/lib/ActionRuntimeContext.js +56 -0
- package/lib/ActionRuntimeContext.js.map +1 -0
- package/lib/Apply.d.ts.map +1 -1
- package/lib/Apply.js +40 -6
- package/lib/Apply.js.map +1 -1
- package/lib/Auth/AuthProvider.d.ts +3 -3
- package/lib/Auth/AuthProvider.d.ts.map +1 -1
- package/lib/Auth/AuthProvider.js +1 -1
- package/lib/Auth/AuthProvider.js.map +1 -1
- package/lib/Auth/Lock.d.ts.map +1 -1
- package/lib/Auth/Lock.js +5 -2
- package/lib/Auth/Lock.js.map +1 -1
- package/lib/Bundle/PurePlugin.d.ts.map +1 -1
- package/lib/Bundle/PurePlugin.js +26 -1
- package/lib/Bundle/PurePlugin.js.map +1 -1
- package/lib/Bundle/Vite.d.ts +2 -0
- package/lib/Bundle/Vite.d.ts.map +1 -1
- package/lib/Bundle/Vite.js +24 -1
- package/lib/Bundle/Vite.js.map +1 -1
- package/lib/Cli/LoggingCli.d.ts.map +1 -1
- package/lib/Cli/LoggingCli.js +7 -4
- package/lib/Cli/LoggingCli.js.map +1 -1
- package/lib/Cli/commands/_shared.d.ts +19 -0
- package/lib/Cli/commands/_shared.d.ts.map +1 -1
- package/lib/Cli/commands/_shared.js +22 -0
- package/lib/Cli/commands/_shared.js.map +1 -1
- package/lib/Cli/commands/login.d.ts +7 -3
- package/lib/Cli/commands/login.d.ts.map +1 -1
- package/lib/Cli/commands/login.js +70 -12
- 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 -20
- package/lib/Cli/commands/profile.js.map +1 -1
- package/lib/Cloudflare/AI/LanguageModel.js +21 -4
- package/lib/Cloudflare/AI/LanguageModel.js.map +1 -1
- package/lib/Cloudflare/AI/QuerySearchLocal.d.ts +37 -0
- package/lib/Cloudflare/AI/QuerySearchLocal.d.ts.map +1 -0
- package/lib/Cloudflare/AI/QuerySearchLocal.js +53 -0
- package/lib/Cloudflare/AI/QuerySearchLocal.js.map +1 -0
- package/lib/Cloudflare/AI/QuerySearchNamespaceLocal.d.ts +35 -0
- package/lib/Cloudflare/AI/QuerySearchNamespaceLocal.d.ts.map +1 -0
- package/lib/Cloudflare/AI/QuerySearchNamespaceLocal.js +47 -0
- package/lib/Cloudflare/AI/QuerySearchNamespaceLocal.js.map +1 -0
- package/lib/Cloudflare/AI/SearchHttpClient.d.ts +34 -0
- package/lib/Cloudflare/AI/SearchHttpClient.d.ts.map +1 -0
- package/lib/Cloudflare/AI/SearchHttpClient.js +262 -0
- package/lib/Cloudflare/AI/SearchHttpClient.js.map +1 -0
- package/lib/Cloudflare/AI/index.d.ts +2 -0
- package/lib/Cloudflare/AI/index.d.ts.map +1 -1
- package/lib/Cloudflare/AI/index.js +2 -0
- package/lib/Cloudflare/AI/index.js.map +1 -1
- package/lib/Cloudflare/Auth/AuthProvider.js +1 -1
- package/lib/Cloudflare/Auth/AuthProvider.js.map +1 -1
- package/lib/Cloudflare/Containers/ContainerBundle.d.ts.map +1 -1
- package/lib/Cloudflare/Containers/ContainerBundle.js +11 -1
- package/lib/Cloudflare/Containers/ContainerBundle.js.map +1 -1
- package/lib/Cloudflare/Containers/ContainerPlatform.d.ts.map +1 -1
- package/lib/Cloudflare/Containers/ContainerPlatform.js +12 -33
- package/lib/Cloudflare/Containers/ContainerPlatform.js.map +1 -1
- package/lib/Cloudflare/D1/QueryDatabaseHttpClient.d.ts +24 -0
- package/lib/Cloudflare/D1/QueryDatabaseHttpClient.d.ts.map +1 -0
- package/lib/Cloudflare/D1/QueryDatabaseHttpClient.js +106 -0
- package/lib/Cloudflare/D1/QueryDatabaseHttpClient.js.map +1 -0
- package/lib/Cloudflare/D1/QueryDatabaseLocal.d.ts +38 -0
- package/lib/Cloudflare/D1/QueryDatabaseLocal.d.ts.map +1 -0
- package/lib/Cloudflare/D1/QueryDatabaseLocal.js +54 -0
- package/lib/Cloudflare/D1/QueryDatabaseLocal.js.map +1 -0
- package/lib/Cloudflare/D1/index.d.ts +1 -0
- package/lib/Cloudflare/D1/index.d.ts.map +1 -1
- package/lib/Cloudflare/D1/index.js +1 -0
- package/lib/Cloudflare/D1/index.js.map +1 -1
- package/lib/Cloudflare/DNS/DnsHttp.d.ts +16 -1
- package/lib/Cloudflare/DNS/DnsHttp.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/DnsHttp.js +6 -1
- package/lib/Cloudflare/DNS/DnsHttp.js.map +1 -1
- package/lib/Cloudflare/DNS/DnsLocal.d.ts +22 -0
- package/lib/Cloudflare/DNS/DnsLocal.d.ts.map +1 -0
- package/lib/Cloudflare/DNS/DnsLocal.js +31 -0
- package/lib/Cloudflare/DNS/DnsLocal.js.map +1 -0
- package/lib/Cloudflare/DNS/ReadDnsHttp.d.ts +3 -3
- package/lib/Cloudflare/DNS/ReadDnsHttp.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/ReadDnsHttp.js +3 -4
- package/lib/Cloudflare/DNS/ReadDnsHttp.js.map +1 -1
- package/lib/Cloudflare/DNS/ReadDnsLocal.d.ts +32 -0
- package/lib/Cloudflare/DNS/ReadDnsLocal.d.ts.map +1 -0
- package/lib/Cloudflare/DNS/ReadDnsLocal.js +35 -0
- package/lib/Cloudflare/DNS/ReadDnsLocal.js.map +1 -0
- package/lib/Cloudflare/DNS/ReadWriteDnsHttp.d.ts +3 -3
- package/lib/Cloudflare/DNS/ReadWriteDnsHttp.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/ReadWriteDnsHttp.js +4 -4
- package/lib/Cloudflare/DNS/ReadWriteDnsHttp.js.map +1 -1
- package/lib/Cloudflare/DNS/ReadWriteDnsLocal.d.ts +40 -0
- package/lib/Cloudflare/DNS/ReadWriteDnsLocal.d.ts.map +1 -0
- package/lib/Cloudflare/DNS/ReadWriteDnsLocal.js +43 -0
- package/lib/Cloudflare/DNS/ReadWriteDnsLocal.js.map +1 -0
- package/lib/Cloudflare/DNS/WriteDnsHttp.d.ts +3 -3
- package/lib/Cloudflare/DNS/WriteDnsHttp.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/WriteDnsHttp.js +3 -4
- package/lib/Cloudflare/DNS/WriteDnsHttp.js.map +1 -1
- package/lib/Cloudflare/DNS/WriteDnsLocal.d.ts +38 -0
- package/lib/Cloudflare/DNS/WriteDnsLocal.d.ts.map +1 -0
- package/lib/Cloudflare/DNS/WriteDnsLocal.js +41 -0
- package/lib/Cloudflare/DNS/WriteDnsLocal.js.map +1 -0
- package/lib/Cloudflare/DNS/index.d.ts +3 -0
- package/lib/Cloudflare/DNS/index.d.ts.map +1 -1
- package/lib/Cloudflare/DNS/index.js +3 -0
- package/lib/Cloudflare/DNS/index.js.map +1 -1
- package/lib/Cloudflare/Flagship/ReadFlagsHttpClient.d.ts +27 -0
- package/lib/Cloudflare/Flagship/ReadFlagsHttpClient.d.ts.map +1 -0
- package/lib/Cloudflare/Flagship/ReadFlagsHttpClient.js +86 -0
- package/lib/Cloudflare/Flagship/ReadFlagsHttpClient.js.map +1 -0
- package/lib/Cloudflare/Flagship/ReadFlagsLocal.d.ts +41 -0
- package/lib/Cloudflare/Flagship/ReadFlagsLocal.d.ts.map +1 -0
- package/lib/Cloudflare/Flagship/ReadFlagsLocal.js +57 -0
- package/lib/Cloudflare/Flagship/ReadFlagsLocal.js.map +1 -0
- package/lib/Cloudflare/Flagship/index.d.ts +1 -0
- package/lib/Cloudflare/Flagship/index.d.ts.map +1 -1
- package/lib/Cloudflare/Flagship/index.js +1 -0
- package/lib/Cloudflare/Flagship/index.js.map +1 -1
- package/lib/Cloudflare/KV/NamespaceHttp.d.ts +16 -1
- package/lib/Cloudflare/KV/NamespaceHttp.d.ts.map +1 -1
- package/lib/Cloudflare/KV/NamespaceHttp.js +8 -2
- package/lib/Cloudflare/KV/NamespaceHttp.js.map +1 -1
- package/lib/Cloudflare/KV/NamespaceLocal.d.ts +22 -0
- package/lib/Cloudflare/KV/NamespaceLocal.d.ts.map +1 -0
- package/lib/Cloudflare/KV/NamespaceLocal.js +32 -0
- package/lib/Cloudflare/KV/NamespaceLocal.js.map +1 -0
- package/lib/Cloudflare/KV/ReadNamespaceHttp.d.ts +2 -2
- package/lib/Cloudflare/KV/ReadNamespaceHttp.d.ts.map +1 -1
- package/lib/Cloudflare/KV/ReadNamespaceHttp.js +5 -6
- package/lib/Cloudflare/KV/ReadNamespaceHttp.js.map +1 -1
- package/lib/Cloudflare/KV/ReadNamespaceLocal.d.ts +27 -0
- package/lib/Cloudflare/KV/ReadNamespaceLocal.d.ts.map +1 -0
- package/lib/Cloudflare/KV/ReadNamespaceLocal.js +30 -0
- package/lib/Cloudflare/KV/ReadNamespaceLocal.js.map +1 -0
- package/lib/Cloudflare/KV/ReadWriteNamespaceHttp.d.ts +3 -3
- package/lib/Cloudflare/KV/ReadWriteNamespaceHttp.d.ts.map +1 -1
- package/lib/Cloudflare/KV/ReadWriteNamespaceHttp.js +6 -6
- package/lib/Cloudflare/KV/ReadWriteNamespaceHttp.js.map +1 -1
- package/lib/Cloudflare/KV/ReadWriteNamespaceLocal.d.ts +34 -0
- package/lib/Cloudflare/KV/ReadWriteNamespaceLocal.d.ts.map +1 -0
- package/lib/Cloudflare/KV/ReadWriteNamespaceLocal.js +37 -0
- package/lib/Cloudflare/KV/ReadWriteNamespaceLocal.js.map +1 -0
- package/lib/Cloudflare/KV/WriteNamespaceHttp.d.ts +2 -2
- package/lib/Cloudflare/KV/WriteNamespaceHttp.d.ts.map +1 -1
- package/lib/Cloudflare/KV/WriteNamespaceHttp.js +5 -6
- package/lib/Cloudflare/KV/WriteNamespaceHttp.js.map +1 -1
- package/lib/Cloudflare/KV/WriteNamespaceLocal.d.ts +27 -0
- package/lib/Cloudflare/KV/WriteNamespaceLocal.d.ts.map +1 -0
- package/lib/Cloudflare/KV/WriteNamespaceLocal.js +30 -0
- package/lib/Cloudflare/KV/WriteNamespaceLocal.js.map +1 -0
- package/lib/Cloudflare/KV/index.d.ts +3 -0
- package/lib/Cloudflare/KV/index.d.ts.map +1 -1
- package/lib/Cloudflare/KV/index.js +3 -0
- package/lib/Cloudflare/KV/index.js.map +1 -1
- package/lib/Cloudflare/Queues/QueueHttp.d.ts +20 -1
- package/lib/Cloudflare/Queues/QueueHttp.d.ts.map +1 -1
- package/lib/Cloudflare/Queues/QueueHttp.js +2 -2
- package/lib/Cloudflare/Queues/QueueHttp.js.map +1 -1
- package/lib/Cloudflare/Queues/WriteQueueHttp.d.ts +9 -3
- package/lib/Cloudflare/Queues/WriteQueueHttp.d.ts.map +1 -1
- package/lib/Cloudflare/Queues/WriteQueueHttp.js +11 -6
- package/lib/Cloudflare/Queues/WriteQueueHttp.js.map +1 -1
- package/lib/Cloudflare/Queues/WriteQueueLocal.d.ts +36 -0
- package/lib/Cloudflare/Queues/WriteQueueLocal.d.ts.map +1 -0
- package/lib/Cloudflare/Queues/WriteQueueLocal.js +51 -0
- package/lib/Cloudflare/Queues/WriteQueueLocal.js.map +1 -0
- package/lib/Cloudflare/Queues/index.d.ts +1 -0
- package/lib/Cloudflare/Queues/index.d.ts.map +1 -1
- package/lib/Cloudflare/Queues/index.js +1 -0
- package/lib/Cloudflare/Queues/index.js.map +1 -1
- package/lib/Cloudflare/R2/BucketHttp.d.ts +15 -1
- package/lib/Cloudflare/R2/BucketHttp.d.ts.map +1 -1
- package/lib/Cloudflare/R2/BucketHttp.js +3 -3
- package/lib/Cloudflare/R2/BucketHttp.js.map +1 -1
- package/lib/Cloudflare/R2/BucketLocal.d.ts +21 -0
- package/lib/Cloudflare/R2/BucketLocal.d.ts.map +1 -0
- package/lib/Cloudflare/R2/BucketLocal.js +32 -0
- package/lib/Cloudflare/R2/BucketLocal.js.map +1 -0
- package/lib/Cloudflare/R2/ReadBucketHttp.d.ts +2 -2
- package/lib/Cloudflare/R2/ReadBucketHttp.d.ts.map +1 -1
- package/lib/Cloudflare/R2/ReadBucketHttp.js +4 -4
- package/lib/Cloudflare/R2/ReadBucketHttp.js.map +1 -1
- package/lib/Cloudflare/R2/ReadBucketLocal.d.ts +27 -0
- package/lib/Cloudflare/R2/ReadBucketLocal.d.ts.map +1 -0
- package/lib/Cloudflare/R2/ReadBucketLocal.js +30 -0
- package/lib/Cloudflare/R2/ReadBucketLocal.js.map +1 -0
- package/lib/Cloudflare/R2/ReadWriteBucketHttp.d.ts +2 -2
- package/lib/Cloudflare/R2/ReadWriteBucketHttp.d.ts.map +1 -1
- package/lib/Cloudflare/R2/ReadWriteBucketHttp.js +5 -4
- package/lib/Cloudflare/R2/ReadWriteBucketHttp.js.map +1 -1
- package/lib/Cloudflare/R2/ReadWriteBucketLocal.d.ts +30 -0
- package/lib/Cloudflare/R2/ReadWriteBucketLocal.d.ts.map +1 -0
- package/lib/Cloudflare/R2/ReadWriteBucketLocal.js +33 -0
- package/lib/Cloudflare/R2/ReadWriteBucketLocal.js.map +1 -0
- package/lib/Cloudflare/R2/WriteBucketHttp.d.ts +2 -2
- package/lib/Cloudflare/R2/WriteBucketHttp.d.ts.map +1 -1
- package/lib/Cloudflare/R2/WriteBucketHttp.js +4 -4
- package/lib/Cloudflare/R2/WriteBucketHttp.js.map +1 -1
- package/lib/Cloudflare/R2/WriteBucketLocal.d.ts +27 -0
- package/lib/Cloudflare/R2/WriteBucketLocal.d.ts.map +1 -0
- package/lib/Cloudflare/R2/WriteBucketLocal.js +30 -0
- package/lib/Cloudflare/R2/WriteBucketLocal.js.map +1 -0
- package/lib/Cloudflare/R2/index.d.ts +3 -0
- package/lib/Cloudflare/R2/index.d.ts.map +1 -1
- package/lib/Cloudflare/R2/index.js +3 -0
- package/lib/Cloudflare/R2/index.js.map +1 -1
- package/lib/Cloudflare/StateStore/Api.d.ts +2 -0
- package/lib/Cloudflare/Tunnel/ReadTunnel.d.ts +3 -3
- package/lib/Cloudflare/Tunnel/ReadTunnel.d.ts.map +1 -1
- package/lib/Cloudflare/Tunnel/ReadTunnel.js +7 -8
- package/lib/Cloudflare/Tunnel/ReadTunnel.js.map +1 -1
- package/lib/Cloudflare/Tunnel/ReadTunnelLocal.d.ts +29 -0
- package/lib/Cloudflare/Tunnel/ReadTunnelLocal.d.ts.map +1 -0
- package/lib/Cloudflare/Tunnel/ReadTunnelLocal.js +30 -0
- package/lib/Cloudflare/Tunnel/ReadTunnelLocal.js.map +1 -0
- package/lib/Cloudflare/Tunnel/ReadWriteTunnel.d.ts +3 -3
- package/lib/Cloudflare/Tunnel/ReadWriteTunnel.d.ts.map +1 -1
- package/lib/Cloudflare/Tunnel/ReadWriteTunnel.js +4 -4
- package/lib/Cloudflare/Tunnel/ReadWriteTunnel.js.map +1 -1
- package/lib/Cloudflare/Tunnel/ReadWriteTunnelLocal.d.ts +35 -0
- package/lib/Cloudflare/Tunnel/ReadWriteTunnelLocal.d.ts.map +1 -0
- package/lib/Cloudflare/Tunnel/ReadWriteTunnelLocal.js +36 -0
- package/lib/Cloudflare/Tunnel/ReadWriteTunnelLocal.js.map +1 -0
- package/lib/Cloudflare/Tunnel/TunnelBinding.d.ts +17 -1
- package/lib/Cloudflare/Tunnel/TunnelBinding.d.ts.map +1 -1
- package/lib/Cloudflare/Tunnel/TunnelBinding.js +7 -1
- package/lib/Cloudflare/Tunnel/TunnelBinding.js.map +1 -1
- package/lib/Cloudflare/Tunnel/TunnelLocalBinding.d.ts +19 -0
- package/lib/Cloudflare/Tunnel/TunnelLocalBinding.d.ts.map +1 -0
- package/lib/Cloudflare/Tunnel/TunnelLocalBinding.js +29 -0
- package/lib/Cloudflare/Tunnel/TunnelLocalBinding.js.map +1 -0
- package/lib/Cloudflare/Tunnel/WarpConnector.d.ts +3 -3
- package/lib/Cloudflare/Tunnel/WarpConnector.d.ts.map +1 -1
- package/lib/Cloudflare/Tunnel/WarpConnector.js +7 -4
- package/lib/Cloudflare/Tunnel/WarpConnector.js.map +1 -1
- package/lib/Cloudflare/Tunnel/WriteTunnel.d.ts +3 -3
- package/lib/Cloudflare/Tunnel/WriteTunnel.d.ts.map +1 -1
- package/lib/Cloudflare/Tunnel/WriteTunnel.js +7 -8
- package/lib/Cloudflare/Tunnel/WriteTunnel.js.map +1 -1
- package/lib/Cloudflare/Tunnel/WriteTunnelLocal.d.ts +29 -0
- package/lib/Cloudflare/Tunnel/WriteTunnelLocal.d.ts.map +1 -0
- package/lib/Cloudflare/Tunnel/WriteTunnelLocal.js +30 -0
- package/lib/Cloudflare/Tunnel/WriteTunnelLocal.js.map +1 -0
- package/lib/Cloudflare/Tunnel/index.d.ts +3 -0
- package/lib/Cloudflare/Tunnel/index.d.ts.map +1 -1
- package/lib/Cloudflare/Tunnel/index.js +3 -0
- package/lib/Cloudflare/Tunnel/index.js.map +1 -1
- package/lib/Cloudflare/Vectorize/SearchIndexHttpClient.d.ts +30 -0
- package/lib/Cloudflare/Vectorize/SearchIndexHttpClient.d.ts.map +1 -0
- package/lib/Cloudflare/Vectorize/SearchIndexHttpClient.js +100 -0
- package/lib/Cloudflare/Vectorize/SearchIndexHttpClient.js.map +1 -0
- package/lib/Cloudflare/Vectorize/SearchIndexLocal.d.ts +42 -0
- package/lib/Cloudflare/Vectorize/SearchIndexLocal.d.ts.map +1 -0
- package/lib/Cloudflare/Vectorize/SearchIndexLocal.js +58 -0
- package/lib/Cloudflare/Vectorize/SearchIndexLocal.js.map +1 -0
- package/lib/Cloudflare/Vectorize/index.d.ts +1 -0
- package/lib/Cloudflare/Vectorize/index.d.ts.map +1 -1
- package/lib/Cloudflare/Vectorize/index.js +1 -0
- package/lib/Cloudflare/Vectorize/index.js.map +1 -1
- package/lib/Cloudflare/Workers/BrowserHttpClient.d.ts +32 -0
- package/lib/Cloudflare/Workers/BrowserHttpClient.d.ts.map +1 -0
- package/lib/Cloudflare/Workers/BrowserHttpClient.js +100 -0
- package/lib/Cloudflare/Workers/BrowserHttpClient.js.map +1 -0
- package/lib/Cloudflare/Workers/BrowserLocal.d.ts +37 -0
- package/lib/Cloudflare/Workers/BrowserLocal.d.ts.map +1 -0
- package/lib/Cloudflare/Workers/BrowserLocal.js +53 -0
- package/lib/Cloudflare/Workers/BrowserLocal.js.map +1 -0
- package/lib/Cloudflare/Workers/ConfigProvider.d.ts +8 -0
- package/lib/Cloudflare/Workers/ConfigProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/ConfigProvider.js +10 -1
- package/lib/Cloudflare/Workers/ConfigProvider.js.map +1 -1
- package/lib/Cloudflare/Workers/DurableObject.d.ts +137 -3
- package/lib/Cloudflare/Workers/DurableObject.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/DurableObject.js +141 -6
- package/lib/Cloudflare/Workers/DurableObject.js.map +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts +2 -185
- package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Vite.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Vite.js +81 -2
- package/lib/Cloudflare/Workers/Vite.js.map +1 -1
- package/lib/Cloudflare/Workers/Worker.d.ts +15 -1
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.js +2 -1
- package/lib/Cloudflare/Workers/WorkerAsyncBindings.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBinding.d.ts +22 -1
- package/lib/Cloudflare/Workers/WorkerBinding.d.ts.map +1 -1
- 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 +7 -2
- package/lib/Cloudflare/Workers/WorkerBridge.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerProvider.d.ts +81 -0
- package/lib/Cloudflare/Workers/WorkerProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerProvider.js +450 -61
- package/lib/Cloudflare/Workers/WorkerProvider.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerRuntimeContext.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerRuntimeContext.js +11 -37
- package/lib/Cloudflare/Workers/WorkerRuntimeContext.js.map +1 -1
- package/lib/Cloudflare/Workers/index.d.ts +1 -0
- package/lib/Cloudflare/Workers/index.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/index.js +1 -0
- package/lib/Cloudflare/Workers/index.js.map +1 -1
- package/lib/Diff.d.ts +16 -0
- package/lib/Diff.d.ts.map +1 -1
- package/lib/Diff.js +33 -0
- package/lib/Diff.js.map +1 -1
- package/lib/GitHub/Secrets.d.ts +1 -1
- package/lib/GitHub/Secrets.js +1 -1
- package/lib/GitHub/Variables.d.ts +1 -1
- package/lib/GitHub/Variables.js +1 -1
- package/lib/Local/RpcSerialization.d.ts.map +1 -1
- package/lib/Local/RpcSerialization.js +6 -2
- package/lib/Local/RpcSerialization.js.map +1 -1
- package/lib/Local/RpcSpawner.d.ts.map +1 -1
- package/lib/Local/RpcSpawner.js +14 -8
- package/lib/Local/RpcSpawner.js.map +1 -1
- package/lib/Neon/AuthProvider.js +1 -1
- package/lib/Neon/AuthProvider.js.map +1 -1
- package/lib/Plan.d.ts.map +1 -1
- package/lib/Plan.js +11 -4
- package/lib/Plan.js.map +1 -1
- package/lib/Planetscale/Database.d.ts +2 -1
- package/lib/Planetscale/Database.d.ts.map +1 -1
- package/lib/Planetscale/MySQL/MySQLClusterSize.d.ts +41 -3
- package/lib/Planetscale/MySQL/MySQLClusterSize.d.ts.map +1 -1
- package/lib/Planetscale/MySQL/MySQLClusterSize.js +88 -11
- package/lib/Planetscale/MySQL/MySQLClusterSize.js.map +1 -1
- package/lib/Planetscale/MySQL/MySQLDatabase.d.ts +14 -0
- package/lib/Planetscale/MySQL/MySQLDatabase.d.ts.map +1 -1
- package/lib/Planetscale/MySQL/MySQLDatabase.js +24 -11
- package/lib/Planetscale/MySQL/MySQLDatabase.js.map +1 -1
- package/lib/Platform.d.ts.map +1 -1
- package/lib/Platform.js +11 -1
- package/lib/Platform.js.map +1 -1
- package/lib/Runtime.d.ts +23 -0
- package/lib/Runtime.d.ts.map +1 -1
- package/lib/Runtime.js +83 -0
- package/lib/Runtime.js.map +1 -1
- package/lib/RuntimeContext.d.ts +46 -0
- package/lib/RuntimeContext.d.ts.map +1 -1
- package/lib/RuntimeContext.js +60 -0
- package/lib/RuntimeContext.js.map +1 -1
- package/lib/Server/Process.d.ts +1 -1
- package/lib/Server/Process.d.ts.map +1 -1
- package/lib/Server/Process.js +8 -8
- package/lib/Server/Process.js.map +1 -1
- package/lib/Stack.js +1 -1
- package/lib/Stack.js.map +1 -1
- package/lib/State/HttpStateApi.d.ts +10 -10
- package/lib/Test/Alchemy.d.ts +74 -0
- package/lib/Test/Alchemy.d.ts.map +1 -0
- package/lib/Test/Alchemy.js +143 -0
- package/lib/Test/Alchemy.js.map +1 -0
- package/lib/Util/cached-function.d.ts +1 -1
- package/lib/Util/cached-function.d.ts.map +1 -1
- package/lib/Util/cached-function.js +2 -2
- package/lib/Util/cached-function.js.map +1 -1
- package/lib/Util/proxy-chain.js +3 -0
- package/lib/Util/proxy-chain.js.map +1 -1
- package/package.json +10 -10
- package/src/AWS/AuthProvider.ts +1 -1
- package/src/AWS/EC2/hosted.ts +2 -1
- package/src/AWS/ECS/Task.ts +2 -1
- package/src/AWS/Lambda/Function.ts +13 -47
- package/src/AWS/Lambda/MicrovmRuntimeContext.ts +11 -38
- package/src/Action.ts +39 -6
- package/src/ActionRuntimeContext.ts +68 -0
- package/src/Apply.ts +46 -8
- package/src/Auth/AuthProvider.ts +1 -1
- package/src/Auth/Lock.ts +5 -2
- package/src/Bundle/PurePlugin.ts +34 -1
- package/src/Bundle/Vite.ts +51 -1
- package/src/Cli/LoggingCli.ts +7 -4
- package/src/Cli/commands/_shared.ts +52 -0
- package/src/Cli/commands/login.ts +90 -14
- package/src/Cli/commands/profile.ts +7 -41
- package/src/Cloudflare/AI/LanguageModel.ts +25 -5
- package/src/Cloudflare/AI/QuerySearchLocal.ts +66 -0
- package/src/Cloudflare/AI/QuerySearchNamespaceLocal.ts +60 -0
- package/src/Cloudflare/AI/SearchHttpClient.ts +423 -0
- package/src/Cloudflare/AI/index.ts +2 -0
- package/src/Cloudflare/Auth/AuthProvider.ts +1 -1
- package/src/Cloudflare/Containers/ContainerBundle.ts +11 -1
- package/src/Cloudflare/Containers/ContainerPlatform.ts +14 -52
- package/src/Cloudflare/D1/QueryDatabaseHttpClient.ts +176 -0
- package/src/Cloudflare/D1/QueryDatabaseLocal.ts +66 -0
- package/src/Cloudflare/D1/index.ts +1 -0
- package/src/Cloudflare/DNS/DnsHttp.ts +24 -2
- package/src/Cloudflare/DNS/DnsLocal.ts +41 -0
- package/src/Cloudflare/DNS/ReadDnsHttp.ts +4 -5
- package/src/Cloudflare/DNS/ReadDnsLocal.ts +38 -0
- package/src/Cloudflare/DNS/ReadWriteDnsHttp.ts +5 -5
- package/src/Cloudflare/DNS/ReadWriteDnsLocal.ts +46 -0
- package/src/Cloudflare/DNS/WriteDnsHttp.ts +4 -5
- package/src/Cloudflare/DNS/WriteDnsLocal.ts +44 -0
- package/src/Cloudflare/DNS/index.ts +3 -0
- package/src/Cloudflare/Flagship/ReadFlagsHttpClient.ts +183 -0
- package/src/Cloudflare/Flagship/ReadFlagsLocal.ts +69 -0
- package/src/Cloudflare/Flagship/index.ts +1 -0
- package/src/Cloudflare/KV/NamespaceHttp.ts +25 -2
- package/src/Cloudflare/KV/NamespaceLocal.ts +42 -0
- package/src/Cloudflare/KV/ReadNamespaceHttp.ts +7 -6
- package/src/Cloudflare/KV/ReadNamespaceLocal.ts +35 -0
- package/src/Cloudflare/KV/ReadWriteNamespaceHttp.ts +11 -6
- package/src/Cloudflare/KV/ReadWriteNamespaceLocal.ts +42 -0
- package/src/Cloudflare/KV/WriteNamespaceHttp.ts +7 -6
- package/src/Cloudflare/KV/WriteNamespaceLocal.ts +35 -0
- package/src/Cloudflare/KV/index.ts +3 -0
- package/src/Cloudflare/Queues/QueueHttp.ts +24 -2
- package/src/Cloudflare/Queues/WriteQueueHttp.ts +16 -7
- package/src/Cloudflare/Queues/WriteQueueLocal.ts +64 -0
- package/src/Cloudflare/Queues/index.ts +1 -0
- package/src/Cloudflare/R2/BucketHttp.ts +20 -3
- package/src/Cloudflare/R2/BucketLocal.ts +47 -0
- package/src/Cloudflare/R2/ReadBucketHttp.ts +10 -5
- package/src/Cloudflare/R2/ReadBucketLocal.ts +33 -0
- package/src/Cloudflare/R2/ReadWriteBucketHttp.ts +11 -5
- package/src/Cloudflare/R2/ReadWriteBucketLocal.ts +36 -0
- package/src/Cloudflare/R2/WriteBucketHttp.ts +10 -5
- package/src/Cloudflare/R2/WriteBucketLocal.ts +33 -0
- package/src/Cloudflare/R2/index.ts +3 -0
- package/src/Cloudflare/Tunnel/ReadTunnel.ts +8 -9
- package/src/Cloudflare/Tunnel/ReadTunnelLocal.ts +33 -0
- package/src/Cloudflare/Tunnel/ReadWriteTunnel.ts +5 -5
- package/src/Cloudflare/Tunnel/ReadWriteTunnelLocal.ts +39 -0
- package/src/Cloudflare/Tunnel/TunnelBinding.ts +26 -2
- package/src/Cloudflare/Tunnel/TunnelLocalBinding.ts +38 -0
- package/src/Cloudflare/Tunnel/WarpConnector.ts +8 -5
- package/src/Cloudflare/Tunnel/WriteTunnel.ts +8 -9
- package/src/Cloudflare/Tunnel/WriteTunnelLocal.ts +33 -0
- package/src/Cloudflare/Tunnel/index.ts +3 -0
- package/src/Cloudflare/Vectorize/SearchIndexHttpClient.ts +183 -0
- package/src/Cloudflare/Vectorize/SearchIndexLocal.ts +70 -0
- package/src/Cloudflare/Vectorize/index.ts +1 -0
- package/src/Cloudflare/Workers/BrowserHttpClient.ts +201 -0
- package/src/Cloudflare/Workers/BrowserLocal.ts +65 -0
- package/src/Cloudflare/Workers/ConfigProvider.ts +15 -1
- package/src/Cloudflare/Workers/DurableObject.ts +227 -6
- package/src/Cloudflare/Workers/Vite.ts +93 -11
- package/src/Cloudflare/Workers/Worker.ts +19 -1
- package/src/Cloudflare/Workers/WorkerAsyncBindings.ts +6 -5
- package/src/Cloudflare/Workers/WorkerBinding.ts +20 -1
- package/src/Cloudflare/Workers/WorkerBridge.ts +12 -2
- package/src/Cloudflare/Workers/WorkerProvider.ts +664 -117
- package/src/Cloudflare/Workers/WorkerRuntimeContext.ts +14 -45
- package/src/Cloudflare/Workers/index.ts +1 -0
- package/src/Diff.ts +33 -0
- package/src/GitHub/Secrets.ts +1 -1
- package/src/GitHub/Variables.ts +1 -1
- package/src/Local/RpcSerialization.ts +6 -2
- package/src/Local/RpcSpawner.ts +21 -8
- package/src/Neon/AuthProvider.ts +1 -1
- package/src/Plan.ts +17 -4
- package/src/Planetscale/Database.ts +2 -1
- package/src/Planetscale/MySQL/MySQLClusterSize.ts +120 -21
- package/src/Planetscale/MySQL/MySQLDatabase.ts +84 -44
- package/src/Platform.ts +12 -3
- package/src/Runtime.ts +92 -0
- package/src/RuntimeContext.ts +79 -0
- package/src/Server/Process.ts +11 -18
- package/src/Stack.ts +1 -1
- package/src/Test/Alchemy.ts +282 -0
- package/src/Util/cached-function.ts +5 -5
- package/src/Util/proxy-chain.ts +3 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import type * as HttpClient from "effect/unstable/http/HttpClient";
|
|
3
|
+
import { CloudflareEnvironment } from "../CloudflareEnvironment.ts";
|
|
4
|
+
import type { Credentials } from "../Credentials.ts";
|
|
5
|
+
import type { TunnelAuth } from "./TunnelBinding.ts";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Shared scaffolding for the `*Local` tunnel services.
|
|
9
|
+
*
|
|
10
|
+
* Instead of minting a scoped {@link AccountApiToken} (the `*Binding` path), it
|
|
11
|
+
* captures the ambient current-credentials context available during stack-eval
|
|
12
|
+
* and builds a {@link TunnelAuth} that provides those credentials directly to
|
|
13
|
+
* the cfd_tunnel HTTP ops. It then delegates to the same client builders the
|
|
14
|
+
* `*Binding` variant uses.
|
|
15
|
+
*
|
|
16
|
+
* NOT exported from `index.ts` — this is internal scaffolding shared by the
|
|
17
|
+
* three access-level Local layers.
|
|
18
|
+
*/
|
|
19
|
+
export const makeLocalTunnelClient = <Client>(
|
|
20
|
+
makeClient: (auth: TunnelAuth) => Client,
|
|
21
|
+
) =>
|
|
22
|
+
Effect.gen(function* () {
|
|
23
|
+
// Account + credentials are ambient during stack-eval (the stack's
|
|
24
|
+
// providers layer). Capture the full context so cfd_tunnel HTTP ops can run
|
|
25
|
+
// with the current credentials — no `host.bind`, no minted token.
|
|
26
|
+
const { accountId } = yield* yield* CloudflareEnvironment;
|
|
27
|
+
const context = yield* Effect.context<
|
|
28
|
+
Credentials | HttpClient.HttpClient
|
|
29
|
+
>();
|
|
30
|
+
|
|
31
|
+
return Effect.fn(function* () {
|
|
32
|
+
const auth: TunnelAuth = {
|
|
33
|
+
authorize: (eff) => eff.pipe(Effect.provideContext(context)),
|
|
34
|
+
accountId: Effect.succeed(accountId),
|
|
35
|
+
};
|
|
36
|
+
return makeClient(auth);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
@@ -6,6 +6,7 @@ import * as Redacted from "effect/Redacted";
|
|
|
6
6
|
import * as Stream from "effect/Stream";
|
|
7
7
|
|
|
8
8
|
import { Unowned } from "../../AdoptPolicy.ts";
|
|
9
|
+
import { isResolved } from "../../Diff.ts";
|
|
9
10
|
import { createPhysicalName } from "../../PhysicalName.ts";
|
|
10
11
|
import * as Provider from "../../Provider.ts";
|
|
11
12
|
import { Resource } from "../../Resource.ts";
|
|
@@ -19,7 +20,7 @@ export interface WarpConnectorProps {
|
|
|
19
20
|
/**
|
|
20
21
|
* User-friendly name for the WARP Connector tunnel. Tunnel names are
|
|
21
22
|
* unique per account, which makes the name the resource's identity
|
|
22
|
-
* during adoption and state recovery.
|
|
23
|
+
* during adoption and state recovery. Changing it replaces the tunnel.
|
|
23
24
|
*
|
|
24
25
|
* @default ${app}-${stage}-${id}
|
|
25
26
|
*/
|
|
@@ -85,9 +86,9 @@ export type WarpConnector = Resource<
|
|
|
85
86
|
* ```
|
|
86
87
|
*
|
|
87
88
|
* @section Renaming
|
|
88
|
-
* @example
|
|
89
|
+
* @example Replace with a new name
|
|
89
90
|
* ```typescript
|
|
90
|
-
* // Renaming
|
|
91
|
+
* // Renaming creates a new tunnel with a new tunnelId.
|
|
91
92
|
* const connector = yield* Cloudflare.Tunnel.WarpConnector("SiteA", {
|
|
92
93
|
* name: "site-a-connector-v2",
|
|
93
94
|
* });
|
|
@@ -107,12 +108,14 @@ export const WarpConnectorProvider = () =>
|
|
|
107
108
|
Provider.succeed(WarpConnector, {
|
|
108
109
|
stables: ["tunnelId", "accountId", "createdAt"],
|
|
109
110
|
|
|
110
|
-
diff: Effect.fn(function* ({ output }) {
|
|
111
|
+
diff: Effect.fn(function* ({ olds, news, output }) {
|
|
111
112
|
const { accountId } = yield* yield* CloudflareEnvironment;
|
|
112
113
|
if ((output?.accountId ?? accountId) !== accountId) {
|
|
113
114
|
return { action: "replace" } as const;
|
|
114
115
|
}
|
|
115
|
-
|
|
116
|
+
if (isResolved(news) && olds !== undefined && olds.name !== news.name) {
|
|
117
|
+
return { action: "replace" } as const;
|
|
118
|
+
}
|
|
116
119
|
return undefined;
|
|
117
120
|
}),
|
|
118
121
|
|
|
@@ -17,8 +17,7 @@ import * as Binding from "../../Binding.ts";
|
|
|
17
17
|
import type { Worker } from "../Workers/Worker.ts";
|
|
18
18
|
import type { CloudflareEnvironment } from "../CloudflareEnvironment.ts";
|
|
19
19
|
import type { RuntimeContext } from "../../RuntimeContext.ts";
|
|
20
|
-
import { type
|
|
21
|
-
import { authorizeWith } from "../HttpClientUtils.ts";
|
|
20
|
+
import { type TunnelAuth } from "./TunnelBinding.ts";
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
23
|
* Binding that lets a Worker create, update, and delete Cloudflare Tunnels at
|
|
@@ -137,33 +136,33 @@ export interface WriteTunnelClient {
|
|
|
137
136
|
>;
|
|
138
137
|
}
|
|
139
138
|
|
|
140
|
-
/** Build the write client over
|
|
141
|
-
export const writeClient = (
|
|
142
|
-
const authorize =
|
|
139
|
+
/** Build the write client over an injectable {@link TunnelAuth}. */
|
|
140
|
+
export const writeClient = (auth: TunnelAuth): WriteTunnelClient => {
|
|
141
|
+
const { authorize } = auth;
|
|
143
142
|
return {
|
|
144
143
|
create: Effect.fn("Cloudflare.Tunnel.create")(function* (request) {
|
|
145
|
-
const accountId = yield*
|
|
144
|
+
const accountId = yield* auth.accountId;
|
|
146
145
|
return yield* authorize(
|
|
147
146
|
zeroTrust.createTunnelCloudflared({ accountId, ...request }),
|
|
148
147
|
);
|
|
149
148
|
}),
|
|
150
149
|
update: Effect.fn("Cloudflare.Tunnel.update")(
|
|
151
150
|
function* (tunnelId, request) {
|
|
152
|
-
const accountId = yield*
|
|
151
|
+
const accountId = yield* auth.accountId;
|
|
153
152
|
return yield* authorize(
|
|
154
153
|
zeroTrust.patchTunnelCloudflared({ accountId, tunnelId, ...request }),
|
|
155
154
|
);
|
|
156
155
|
},
|
|
157
156
|
),
|
|
158
157
|
delete: Effect.fn("Cloudflare.Tunnel.delete")(function* (tunnelId) {
|
|
159
|
-
const accountId = yield*
|
|
158
|
+
const accountId = yield* auth.accountId;
|
|
160
159
|
return yield* authorize(
|
|
161
160
|
zeroTrust.deleteTunnelCloudflared({ accountId, tunnelId }),
|
|
162
161
|
);
|
|
163
162
|
}),
|
|
164
163
|
putConfiguration: Effect.fn("Cloudflare.Tunnel.putConfiguration")(
|
|
165
164
|
function* (tunnelId, config) {
|
|
166
|
-
const accountId = yield*
|
|
165
|
+
const accountId = yield* auth.accountId;
|
|
167
166
|
return yield* authorize(
|
|
168
167
|
zeroTrust.putTunnelCloudflaredConfiguration({
|
|
169
168
|
accountId,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as Layer from "effect/Layer";
|
|
2
|
+
import { makeLocalTunnelClient } from "./TunnelLocalBinding.ts";
|
|
3
|
+
import { WriteTunnel, writeClient } from "./WriteTunnel.ts";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Local implementation of the {@link WriteTunnel} binding — creates, updates,
|
|
7
|
+
* and deletes Cloudflare Tunnels over the cfd_tunnel HTTP API using the
|
|
8
|
+
* **current credentials** instead of a native Worker binding
|
|
9
|
+
* (`WriteTunnelBinding`) or a scoped API token. No `host.bind`, no minted
|
|
10
|
+
* token, no Worker host.
|
|
11
|
+
*
|
|
12
|
+
* Provide it on an {@link Action} (or any deploy-time Effect) so you can mutate
|
|
13
|
+
* tunnels with the same `create`/`update`/`delete`/`putConfiguration` client
|
|
14
|
+
* you'd use inside a Worker.
|
|
15
|
+
*
|
|
16
|
+
* @example Provision a tunnel from an Action
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const Provision = Alchemy.Action(
|
|
19
|
+
* "Provision",
|
|
20
|
+
* Effect.gen(function* () {
|
|
21
|
+
* const tunnels = yield* Cloudflare.Tunnel.WriteTunnel();
|
|
22
|
+
* return Effect.fn(function* () {
|
|
23
|
+
* const tunnel = yield* tunnels.create({ name: "on-demand-tunnel" });
|
|
24
|
+
* return tunnel.result?.id;
|
|
25
|
+
* });
|
|
26
|
+
* }).pipe(Effect.provide(Cloudflare.Tunnel.WriteTunnelLocal)),
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export const WriteTunnelLocal = Layer.effect(
|
|
31
|
+
WriteTunnel,
|
|
32
|
+
makeLocalTunnelClient(writeClient),
|
|
33
|
+
);
|
|
@@ -5,9 +5,12 @@ export * from "./Tunnel.ts";
|
|
|
5
5
|
export * from "./TunnelBinding.ts";
|
|
6
6
|
export * from "./ReadTunnel.ts";
|
|
7
7
|
export * from "./ReadTunnelBinding.ts";
|
|
8
|
+
export * from "./ReadTunnelLocal.ts";
|
|
8
9
|
export * from "./ReadWriteTunnel.ts";
|
|
9
10
|
export * from "./ReadWriteTunnelBinding.ts";
|
|
11
|
+
export * from "./ReadWriteTunnelLocal.ts";
|
|
10
12
|
export * from "./WriteTunnel.ts";
|
|
11
13
|
export * from "./WriteTunnelBinding.ts";
|
|
14
|
+
export * from "./WriteTunnelLocal.ts";
|
|
12
15
|
export * from "./VirtualNetwork.ts";
|
|
13
16
|
export * from "./WarpConnector.ts";
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import type * as runtime from "@cloudflare/workers-types";
|
|
2
|
+
import * as vectorize from "@distilled.cloud/cloudflare/vectorize";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import type * as HttpClient from "effect/unstable/http/HttpClient";
|
|
5
|
+
import type { Credentials } from "../Credentials.ts";
|
|
6
|
+
import type { SearchIndexClient } from "./SearchIndex.ts";
|
|
7
|
+
|
|
8
|
+
// Shared HTTP scaffolding for the Vectorize `SearchIndex` binding. NOT
|
|
9
|
+
// re-exported from `index.ts` — only the contract and the impl layers are
|
|
10
|
+
// public. A future token-scoped `SearchIndexHttp` layer reuses this builder
|
|
11
|
+
// with an auth minted from an `AccountApiToken`; `SearchIndexLocal` builds the
|
|
12
|
+
// auth from the ambient current-credentials context.
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Injectable auth shared by the Local (current-credentials) impl and a future
|
|
16
|
+
* Http (scoped-token) impl. `authorize` discharges the
|
|
17
|
+
* `Credentials | HttpClient` requirement of a distilled op; `accountId` is the
|
|
18
|
+
* Cloudflare account the ops run against.
|
|
19
|
+
*/
|
|
20
|
+
export interface SearchIndexAuth {
|
|
21
|
+
authorize: <A, E>(
|
|
22
|
+
eff: Effect.Effect<A, E, Credentials | HttpClient.HttpClient>,
|
|
23
|
+
) => Effect.Effect<A, E>;
|
|
24
|
+
accountId: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Build a {@link SearchIndexClient} over the Vectorize HTTP API.
|
|
29
|
+
*
|
|
30
|
+
* `indexName` is an Effect so the resolution stays deferred to each call —
|
|
31
|
+
* inside an Action it resolves through the apply-time RuntimeContext. The
|
|
32
|
+
* credentials are provided ONLY around the distilled op (via `auth.authorize`),
|
|
33
|
+
* never around the name accessor, matching the D1 / KV Local variants. `orDie`
|
|
34
|
+
* mirrors the native binding, whose client methods surface transport failures
|
|
35
|
+
* as defects.
|
|
36
|
+
*
|
|
37
|
+
* Two methods have no Cloudflare HTTP equivalent and `Effect.die`:
|
|
38
|
+
* - `raw` — there is no HTTP-backed `runtime.Vectorize` object to hand back.
|
|
39
|
+
* - `queryById` — the HTTP query endpoint only accepts a raw vector, not an id.
|
|
40
|
+
*/
|
|
41
|
+
export const makeHttpSearchIndexClient = (
|
|
42
|
+
auth: SearchIndexAuth,
|
|
43
|
+
indexName: Effect.Effect<string>,
|
|
44
|
+
): SearchIndexClient => {
|
|
45
|
+
const { accountId } = auth;
|
|
46
|
+
const local = <A, E>(
|
|
47
|
+
fn: (
|
|
48
|
+
name: string,
|
|
49
|
+
) => Effect.Effect<A, E, Credentials | HttpClient.HttpClient>,
|
|
50
|
+
): Effect.Effect<A> =>
|
|
51
|
+
Effect.flatMap(indexName, (name) => auth.authorize(fn(name))).pipe(
|
|
52
|
+
Effect.orDie,
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
return {
|
|
56
|
+
raw: Effect.die(
|
|
57
|
+
new Error(
|
|
58
|
+
"SearchIndex over HTTP: `raw` is not available — use a native Worker binding (SearchIndexBinding) for direct access.",
|
|
59
|
+
),
|
|
60
|
+
),
|
|
61
|
+
describe: () =>
|
|
62
|
+
local((name) =>
|
|
63
|
+
vectorize
|
|
64
|
+
.infoIndex({ accountId, indexName: name })
|
|
65
|
+
.pipe(Effect.map(toIndexInfo)),
|
|
66
|
+
),
|
|
67
|
+
query: (vector, options) =>
|
|
68
|
+
local((name) =>
|
|
69
|
+
vectorize
|
|
70
|
+
.queryIndex({
|
|
71
|
+
accountId,
|
|
72
|
+
indexName: name,
|
|
73
|
+
vector: Array.from(vector),
|
|
74
|
+
topK: options?.topK,
|
|
75
|
+
returnValues: options?.returnValues,
|
|
76
|
+
returnMetadata: toReturnMetadata(options?.returnMetadata),
|
|
77
|
+
filter: options?.filter,
|
|
78
|
+
})
|
|
79
|
+
.pipe(Effect.map(toMatches)),
|
|
80
|
+
),
|
|
81
|
+
queryById: () =>
|
|
82
|
+
Effect.die(
|
|
83
|
+
new Error(
|
|
84
|
+
"SearchIndex over HTTP: `queryById` is not supported — the HTTP query endpoint only accepts a raw query vector. Fetch the vector with `getByIds` and pass its values to `query`.",
|
|
85
|
+
),
|
|
86
|
+
),
|
|
87
|
+
insert: (vectors) =>
|
|
88
|
+
local((name) =>
|
|
89
|
+
vectorize
|
|
90
|
+
.insertIndex({
|
|
91
|
+
accountId,
|
|
92
|
+
indexName: name,
|
|
93
|
+
body: toNdjsonBlob(vectors),
|
|
94
|
+
})
|
|
95
|
+
.pipe(Effect.map(toMutation)),
|
|
96
|
+
),
|
|
97
|
+
upsert: (vectors) =>
|
|
98
|
+
local((name) =>
|
|
99
|
+
vectorize
|
|
100
|
+
.upsertIndex({
|
|
101
|
+
accountId,
|
|
102
|
+
indexName: name,
|
|
103
|
+
body: toNdjsonBlob(vectors),
|
|
104
|
+
})
|
|
105
|
+
.pipe(Effect.map(toMutation)),
|
|
106
|
+
),
|
|
107
|
+
deleteByIds: (ids) =>
|
|
108
|
+
local((name) =>
|
|
109
|
+
vectorize
|
|
110
|
+
.deleteByIdsIndex({ accountId, indexName: name, ids })
|
|
111
|
+
.pipe(Effect.map(toMutation)),
|
|
112
|
+
),
|
|
113
|
+
getByIds: (ids) =>
|
|
114
|
+
local((name) =>
|
|
115
|
+
vectorize
|
|
116
|
+
.getByIdsIndex({ accountId, indexName: name, ids })
|
|
117
|
+
.pipe(
|
|
118
|
+
Effect.map((result) => (result ?? []) as runtime.VectorizeVector[]),
|
|
119
|
+
),
|
|
120
|
+
),
|
|
121
|
+
} satisfies SearchIndexClient;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
// ── shape adapters (runtime types <-> distilled HTTP types) ─────────────────
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Serialize vectors to an ndjson Blob — the raw `application/x-ndjson` request
|
|
128
|
+
* body of the Vectorize v2 insert/upsert endpoints.
|
|
129
|
+
*/
|
|
130
|
+
const toNdjsonBlob = (vectors: runtime.VectorizeVector[]): Blob =>
|
|
131
|
+
new Blob([toNdjson(vectors)]);
|
|
132
|
+
|
|
133
|
+
/** Serialize vectors to ndjson — one JSON vector per line. */
|
|
134
|
+
const toNdjson = (vectors: runtime.VectorizeVector[]): string =>
|
|
135
|
+
vectors
|
|
136
|
+
.map((v) =>
|
|
137
|
+
JSON.stringify({
|
|
138
|
+
id: v.id,
|
|
139
|
+
// A `VectorFloatArray` (Float32Array) would `JSON.stringify` to an
|
|
140
|
+
// object, not an array — normalize to a plain number array.
|
|
141
|
+
values: Array.from(v.values),
|
|
142
|
+
...(v.namespace !== undefined ? { namespace: v.namespace } : {}),
|
|
143
|
+
...(v.metadata !== undefined ? { metadata: v.metadata } : {}),
|
|
144
|
+
}),
|
|
145
|
+
)
|
|
146
|
+
.join("\n");
|
|
147
|
+
|
|
148
|
+
const toReturnMetadata = (
|
|
149
|
+
value: runtime.VectorizeQueryOptions["returnMetadata"],
|
|
150
|
+
): "none" | "indexed" | "all" | undefined =>
|
|
151
|
+
value === undefined
|
|
152
|
+
? undefined
|
|
153
|
+
: typeof value === "boolean"
|
|
154
|
+
? value
|
|
155
|
+
? "all"
|
|
156
|
+
: "none"
|
|
157
|
+
: value;
|
|
158
|
+
|
|
159
|
+
const toMutation = (r: {
|
|
160
|
+
mutationId?: string | null;
|
|
161
|
+
}): runtime.VectorizeAsyncMutation => ({ mutationId: r.mutationId ?? "" });
|
|
162
|
+
|
|
163
|
+
const toIndexInfo = (
|
|
164
|
+
r: vectorize.InfoIndexResponse,
|
|
165
|
+
): runtime.VectorizeIndexInfo =>
|
|
166
|
+
({
|
|
167
|
+
vectorCount: r.vectorCount ?? 0,
|
|
168
|
+
dimensions: r.dimensions ?? 0,
|
|
169
|
+
processedUpToDatetime: r.processedUpToDatetime ?? undefined,
|
|
170
|
+
processedUpToMutation: r.processedUpToMutation ?? undefined,
|
|
171
|
+
}) as unknown as runtime.VectorizeIndexInfo;
|
|
172
|
+
|
|
173
|
+
const toMatches = (r: vectorize.QueryIndexResponse): runtime.VectorizeMatches =>
|
|
174
|
+
({
|
|
175
|
+
count: r.count ?? r.matches?.length ?? 0,
|
|
176
|
+
matches: (r.matches ?? []).map((m) => ({
|
|
177
|
+
id: m.id ?? "",
|
|
178
|
+
score: m.score ?? 0,
|
|
179
|
+
...(m.values != null ? { values: m.values } : {}),
|
|
180
|
+
...(m.namespace != null ? { namespace: m.namespace } : {}),
|
|
181
|
+
...(m.metadata != null ? { metadata: m.metadata } : {}),
|
|
182
|
+
})),
|
|
183
|
+
}) as unknown as runtime.VectorizeMatches;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { Credentials } from "@distilled.cloud/cloudflare/Credentials";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as Layer from "effect/Layer";
|
|
4
|
+
import type * as HttpClient from "effect/unstable/http/HttpClient";
|
|
5
|
+
import { CloudflareEnvironment } from "../CloudflareEnvironment.ts";
|
|
6
|
+
import { SearchIndex } from "./SearchIndex.ts";
|
|
7
|
+
import {
|
|
8
|
+
type SearchIndexAuth,
|
|
9
|
+
makeHttpSearchIndexClient,
|
|
10
|
+
} from "./SearchIndexHttpClient.ts";
|
|
11
|
+
import type { Index } from "./VectorizeIndex.ts";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Local implementation of the {@link SearchIndex} binding — talks to a
|
|
15
|
+
* Vectorize index over the Cloudflare HTTP API using the **current
|
|
16
|
+
* credentials** instead of a native Worker binding (`SearchIndexBinding`).
|
|
17
|
+
*
|
|
18
|
+
* Provide it on an {@link Action} (or any deploy-time Effect) so you can
|
|
19
|
+
* insert, upsert, query, and fetch vectors with the same client you'd use
|
|
20
|
+
* inside a Worker — no Worker host, no `host.bind`, no minted token:
|
|
21
|
+
*
|
|
22
|
+
* @example Seeding an index from an Action
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const Seed = Alchemy.Action(
|
|
25
|
+
* "Seed",
|
|
26
|
+
* Effect.gen(function* () {
|
|
27
|
+
* const vec = yield* Cloudflare.Vectorize.SearchIndex(index);
|
|
28
|
+
* return Effect.fn(function* () {
|
|
29
|
+
* yield* vec.upsert([
|
|
30
|
+
* { id: "1", values: [0.1, 0.2, 0.3, 0.4] },
|
|
31
|
+
* { id: "2", values: [0.9, 0.8, 0.7, 0.6] },
|
|
32
|
+
* ]);
|
|
33
|
+
* const matches = yield* vec.query([0.1, 0.2, 0.3, 0.4], { topK: 1 });
|
|
34
|
+
* return matches;
|
|
35
|
+
* });
|
|
36
|
+
* }).pipe(Effect.provide(Cloudflare.Vectorize.SearchIndexLocal)),
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* The index name is resolved at apply time through the ambient
|
|
41
|
+
* {@link RuntimeContext} (in an Action, that's the resolve context the engine
|
|
42
|
+
* provides around the body), so `SearchIndex(index)` works even though the
|
|
43
|
+
* index is created in the same deploy.
|
|
44
|
+
*
|
|
45
|
+
* `raw` and `queryById` have no Cloudflare HTTP equivalent and `Effect.die` —
|
|
46
|
+
* see {@link makeHttpSearchIndexClient}.
|
|
47
|
+
*/
|
|
48
|
+
export const SearchIndexLocal = Layer.effect(
|
|
49
|
+
SearchIndex,
|
|
50
|
+
Effect.gen(function* () {
|
|
51
|
+
// Account + credentials are ambient during stack-eval (the stack's
|
|
52
|
+
// providers layer). Capture the full context so the HTTP ops run with the
|
|
53
|
+
// current credentials — no `host.bind`, no minted token.
|
|
54
|
+
const { accountId } = yield* yield* CloudflareEnvironment;
|
|
55
|
+
const context = yield* Effect.context<
|
|
56
|
+
Credentials | HttpClient.HttpClient
|
|
57
|
+
>();
|
|
58
|
+
const auth: SearchIndexAuth = {
|
|
59
|
+
authorize: (eff) => eff.pipe(Effect.provideContext(context)),
|
|
60
|
+
accountId,
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return Effect.fn(function* (index: Index) {
|
|
64
|
+
// Deferred accessor — resolves the index name against the tracker at
|
|
65
|
+
// apply time (in an Action, that's the engine's resolve context).
|
|
66
|
+
const indexName = yield* index.indexName;
|
|
67
|
+
return makeHttpSearchIndexClient(auth, indexName);
|
|
68
|
+
});
|
|
69
|
+
}),
|
|
70
|
+
);
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import * as browser from "@distilled.cloud/cloudflare/browser-rendering";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as Stream from "effect/Stream";
|
|
4
|
+
import type * as HttpClient from "effect/unstable/http/HttpClient";
|
|
5
|
+
import type { RuntimeContext } from "../../RuntimeContext.ts";
|
|
6
|
+
import type { Credentials } from "../Credentials.ts";
|
|
7
|
+
import {
|
|
8
|
+
type BrowserClient,
|
|
9
|
+
type BrowserContentResult,
|
|
10
|
+
BrowserError,
|
|
11
|
+
type BrowserJsonResult,
|
|
12
|
+
type BrowserLinksResult,
|
|
13
|
+
type BrowserMarkdownResult,
|
|
14
|
+
type BrowserScrapeResult,
|
|
15
|
+
type BrowserSnapshotResult,
|
|
16
|
+
} from "./Browser.ts";
|
|
17
|
+
|
|
18
|
+
// Shared HTTP scaffolding for the Browser Rendering binding. NOT re-exported
|
|
19
|
+
// from `index.ts` — only the contract and the impl layers are public. A future
|
|
20
|
+
// token-scoped `BrowserHttp` layer reuses this builder with an auth minted from
|
|
21
|
+
// an `AccountApiToken`; `BrowserLocal` builds the auth from the ambient
|
|
22
|
+
// current-credentials context.
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Injectable auth shared by the Local (current-credentials) impl and a future
|
|
26
|
+
* Http (scoped-token) impl. `authorize` discharges the
|
|
27
|
+
* `Credentials | HttpClient` requirement of a distilled op; `accountId` is the
|
|
28
|
+
* Cloudflare account the ops run against.
|
|
29
|
+
*/
|
|
30
|
+
export interface BrowserAuth {
|
|
31
|
+
authorize: <A, E>(
|
|
32
|
+
eff: Effect.Effect<A, E, Credentials | HttpClient.HttpClient>,
|
|
33
|
+
) => Effect.Effect<A, E>;
|
|
34
|
+
accountId: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** A byte stream produced by a binary {@link BrowserClient} action. */
|
|
38
|
+
type BrowserByteStream = Stream.Stream<
|
|
39
|
+
Uint8Array,
|
|
40
|
+
BrowserError,
|
|
41
|
+
RuntimeContext
|
|
42
|
+
>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Build a {@link BrowserClient} over the Browser Rendering REST data-plane
|
|
46
|
+
* (`/accounts/{id}/browser-rendering/*`).
|
|
47
|
+
*
|
|
48
|
+
* The following client members `Effect.die` (or fail the stream) because they
|
|
49
|
+
* have no Cloudflare REST equivalent — use a native `BrowserBinding` inside a
|
|
50
|
+
* deployed Worker for them:
|
|
51
|
+
* - `raw` / `fetch` — the raw `BrowserRun` transport used by
|
|
52
|
+
* `@cloudflare/puppeteer` is a Worker-runtime object, not an HTTP call.
|
|
53
|
+
* - `screenshot` / `pdf` — the binary endpoints stream image/PDF bytes, which
|
|
54
|
+
* the distilled REST codec models as JSON status, not a byte stream.
|
|
55
|
+
*
|
|
56
|
+
* Because the REST data-plane only returns the action `result` (not the
|
|
57
|
+
* runtime binding's `meta` envelope), `content`/`snapshot` populate `meta`
|
|
58
|
+
* with a best-effort placeholder.
|
|
59
|
+
*/
|
|
60
|
+
export const makeHttpBrowserClient = (auth: BrowserAuth): BrowserClient => {
|
|
61
|
+
// Run a distilled Browser Rendering op with the injected auth and surface
|
|
62
|
+
// transport/API failures as {@link BrowserError} (matching the native
|
|
63
|
+
// binding's declared error channel).
|
|
64
|
+
const run = <A, E>(
|
|
65
|
+
eff: Effect.Effect<A, E, Credentials | HttpClient.HttpClient>,
|
|
66
|
+
): Effect.Effect<A, BrowserError, RuntimeContext> =>
|
|
67
|
+
auth.authorize(eff).pipe(
|
|
68
|
+
Effect.mapError(
|
|
69
|
+
(cause) =>
|
|
70
|
+
new BrowserError({
|
|
71
|
+
message: "Browser Rendering request failed",
|
|
72
|
+
cause,
|
|
73
|
+
}),
|
|
74
|
+
),
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
// The cf option types (`url`/`html` + puppeteer options) are structurally the
|
|
78
|
+
// REST request body; add the account id and let distilled's encoder drop any
|
|
79
|
+
// fields it doesn't model.
|
|
80
|
+
const req = (options: unknown) =>
|
|
81
|
+
({ accountId: auth.accountId, ...(options as object) }) as never;
|
|
82
|
+
|
|
83
|
+
const content = (options: unknown) =>
|
|
84
|
+
run(browser.createContent(req(options))).pipe(
|
|
85
|
+
Effect.map(
|
|
86
|
+
(result): BrowserContentResult => ({
|
|
87
|
+
success: true,
|
|
88
|
+
result,
|
|
89
|
+
meta: { status: 200, title: "" },
|
|
90
|
+
}),
|
|
91
|
+
),
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
const markdown = (options: unknown) =>
|
|
95
|
+
run(browser.createMarkdown(req(options))).pipe(
|
|
96
|
+
Effect.map(
|
|
97
|
+
(result): BrowserMarkdownResult => ({ success: true, result }),
|
|
98
|
+
),
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
const links = (options: unknown) =>
|
|
102
|
+
run(browser.createLink(req(options))).pipe(
|
|
103
|
+
Effect.map(
|
|
104
|
+
(result): BrowserLinksResult => ({
|
|
105
|
+
success: true,
|
|
106
|
+
result: [...result],
|
|
107
|
+
}),
|
|
108
|
+
),
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
const json = (options: unknown) =>
|
|
112
|
+
run(browser.createJson(req(options))).pipe(
|
|
113
|
+
Effect.map((result): BrowserJsonResult => ({ success: true, result })),
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
const scrape = (options: unknown) =>
|
|
117
|
+
run(browser.createScrape(req(options))).pipe(
|
|
118
|
+
Effect.map(
|
|
119
|
+
(result): BrowserScrapeResult => ({
|
|
120
|
+
success: true,
|
|
121
|
+
result: result.map((item) => ({
|
|
122
|
+
selector: item.selector,
|
|
123
|
+
// distilled models per-selector `results` as a single object; the
|
|
124
|
+
// native shape is an array of matched elements.
|
|
125
|
+
results: (Array.isArray(item.results)
|
|
126
|
+
? item.results
|
|
127
|
+
: [
|
|
128
|
+
item.results,
|
|
129
|
+
]) as BrowserScrapeResult["result"][number]["results"],
|
|
130
|
+
})),
|
|
131
|
+
}),
|
|
132
|
+
),
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
const snapshot = (options: unknown) =>
|
|
136
|
+
run(browser.createSnapshot(req(options))).pipe(
|
|
137
|
+
Effect.map(
|
|
138
|
+
(result): BrowserSnapshotResult => ({
|
|
139
|
+
success: true,
|
|
140
|
+
result: {
|
|
141
|
+
content: result.content ?? "",
|
|
142
|
+
screenshot: result.screenshot ?? "",
|
|
143
|
+
},
|
|
144
|
+
meta: { status: 200, title: "" },
|
|
145
|
+
}),
|
|
146
|
+
),
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
// Binary actions have no REST byte-stream equivalent through the distilled
|
|
150
|
+
// codec — fail the stream with a defect explaining the native-binding path.
|
|
151
|
+
const binaryUnsupported = (action: string): BrowserByteStream =>
|
|
152
|
+
Stream.fromEffect(
|
|
153
|
+
Effect.die(
|
|
154
|
+
new Error(
|
|
155
|
+
`Browser over HTTP: '${action}' returns binary data and is only available inside a Worker via the native BrowserBinding; the HTTP client supports the JSON quick actions (content/markdown/scrape/links/snapshot/json).`,
|
|
156
|
+
),
|
|
157
|
+
),
|
|
158
|
+
) as BrowserByteStream;
|
|
159
|
+
|
|
160
|
+
const quickAction = ((action: string, options: unknown) => {
|
|
161
|
+
switch (action) {
|
|
162
|
+
case "content":
|
|
163
|
+
return content(options);
|
|
164
|
+
case "markdown":
|
|
165
|
+
return markdown(options);
|
|
166
|
+
case "links":
|
|
167
|
+
return links(options);
|
|
168
|
+
case "json":
|
|
169
|
+
return json(options);
|
|
170
|
+
case "scrape":
|
|
171
|
+
return scrape(options);
|
|
172
|
+
case "snapshot":
|
|
173
|
+
return snapshot(options);
|
|
174
|
+
default:
|
|
175
|
+
return binaryUnsupported(action);
|
|
176
|
+
}
|
|
177
|
+
}) as BrowserClient["quickAction"];
|
|
178
|
+
|
|
179
|
+
return {
|
|
180
|
+
raw: Effect.die(
|
|
181
|
+
new Error(
|
|
182
|
+
"Browser over HTTP: `raw` (the native BrowserRun binding) is only available inside a deployed Worker — use BrowserBinding.",
|
|
183
|
+
),
|
|
184
|
+
),
|
|
185
|
+
fetch: () =>
|
|
186
|
+
Effect.die(
|
|
187
|
+
new Error(
|
|
188
|
+
"Browser over HTTP: `fetch` proxies the raw Browser Run transport used by @cloudflare/puppeteer and is only available inside a Worker via BrowserBinding.",
|
|
189
|
+
),
|
|
190
|
+
),
|
|
191
|
+
quickAction,
|
|
192
|
+
screenshot: () => binaryUnsupported("screenshot"),
|
|
193
|
+
pdf: () => binaryUnsupported("pdf"),
|
|
194
|
+
content,
|
|
195
|
+
scrape,
|
|
196
|
+
links,
|
|
197
|
+
snapshot,
|
|
198
|
+
json,
|
|
199
|
+
markdown,
|
|
200
|
+
} satisfies BrowserClient;
|
|
201
|
+
};
|