@alchemy.run/modal 0.0.0 → 2.0.0-beta.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +96 -4
- package/lib/App.d.ts +143 -0
- package/lib/App.d.ts.map +1 -0
- package/lib/App.js +198 -0
- package/lib/App.js.map +1 -0
- package/lib/AuthProvider.d.ts +53 -0
- package/lib/AuthProvider.d.ts.map +1 -0
- package/lib/AuthProvider.js +209 -0
- package/lib/AuthProvider.js.map +1 -0
- package/lib/BindingHttp.d.ts +56 -0
- package/lib/BindingHttp.d.ts.map +1 -0
- package/lib/BindingHttp.js +50 -0
- package/lib/BindingHttp.js.map +1 -0
- package/lib/Blob.d.ts +34 -0
- package/lib/Blob.d.ts.map +1 -0
- package/lib/Blob.js +59 -0
- package/lib/Blob.js.map +1 -0
- package/lib/Bootstrap.d.ts +8 -0
- package/lib/Bootstrap.d.ts.map +1 -0
- package/lib/Bootstrap.js +26 -0
- package/lib/Bootstrap.js.map +1 -0
- package/lib/Cbor.d.ts +10 -0
- package/lib/Cbor.d.ts.map +1 -0
- package/lib/Cbor.js +177 -0
- package/lib/Cbor.js.map +1 -0
- package/lib/ConnectSandbox.d.ts +64 -0
- package/lib/ConnectSandbox.d.ts.map +1 -0
- package/lib/ConnectSandbox.js +33 -0
- package/lib/ConnectSandbox.js.map +1 -0
- package/lib/Container.d.ts +124 -0
- package/lib/Container.d.ts.map +1 -0
- package/lib/Container.js +1 -0
- package/lib/Container.js.map +1 -0
- package/lib/Contributions.d.ts +7 -0
- package/lib/Contributions.d.ts.map +1 -0
- package/lib/Contributions.js +6 -0
- package/lib/Contributions.js.map +1 -0
- package/lib/CreateDict.d.ts +83 -0
- package/lib/CreateDict.d.ts.map +1 -0
- package/lib/CreateDict.js +3 -0
- package/lib/CreateDict.js.map +1 -0
- package/lib/CreateDictHttp.d.ts +33 -0
- package/lib/CreateDictHttp.d.ts.map +1 -0
- package/lib/CreateDictHttp.js +67 -0
- package/lib/CreateDictHttp.js.map +1 -0
- package/lib/CreateImage.d.ts +98 -0
- package/lib/CreateImage.d.ts.map +1 -0
- package/lib/CreateImage.js +3 -0
- package/lib/CreateImage.js.map +1 -0
- package/lib/CreateImageHttp.d.ts +51 -0
- package/lib/CreateImageHttp.d.ts.map +1 -0
- package/lib/CreateImageHttp.js +87 -0
- package/lib/CreateImageHttp.js.map +1 -0
- package/lib/CreateQueue.d.ts +83 -0
- package/lib/CreateQueue.d.ts.map +1 -0
- package/lib/CreateQueue.js +3 -0
- package/lib/CreateQueue.js.map +1 -0
- package/lib/CreateQueueHttp.d.ts +31 -0
- package/lib/CreateQueueHttp.d.ts.map +1 -0
- package/lib/CreateQueueHttp.js +67 -0
- package/lib/CreateQueueHttp.js.map +1 -0
- package/lib/CreateSandbox.d.ts +186 -0
- package/lib/CreateSandbox.d.ts.map +1 -0
- package/lib/CreateSandbox.js +3 -0
- package/lib/CreateSandbox.js.map +1 -0
- package/lib/CreateSandboxHttp.d.ts +17 -0
- package/lib/CreateSandboxHttp.d.ts.map +1 -0
- package/lib/CreateSandboxHttp.js +117 -0
- package/lib/CreateSandboxHttp.js.map +1 -0
- package/lib/CreateSecret.d.ts +95 -0
- package/lib/CreateSecret.d.ts.map +1 -0
- package/lib/CreateSecret.js +3 -0
- package/lib/CreateSecret.js.map +1 -0
- package/lib/CreateSecretHttp.d.ts +24 -0
- package/lib/CreateSecretHttp.d.ts.map +1 -0
- package/lib/CreateSecretHttp.js +60 -0
- package/lib/CreateSecretHttp.js.map +1 -0
- package/lib/CreateVolume.d.ts +84 -0
- package/lib/CreateVolume.d.ts.map +1 -0
- package/lib/CreateVolume.js +3 -0
- package/lib/CreateVolume.js.map +1 -0
- package/lib/CreateVolumeHttp.d.ts +32 -0
- package/lib/CreateVolumeHttp.d.ts.map +1 -0
- package/lib/CreateVolumeHttp.js +69 -0
- package/lib/CreateVolumeHttp.js.map +1 -0
- package/lib/Credentials.d.ts +32 -0
- package/lib/Credentials.d.ts.map +1 -0
- package/lib/Credentials.js +44 -0
- package/lib/Credentials.js.map +1 -0
- package/lib/Dict.d.ts +147 -0
- package/lib/Dict.d.ts.map +1 -0
- package/lib/Dict.js +175 -0
- package/lib/Dict.js.map +1 -0
- package/lib/DictClient.d.ts +55 -0
- package/lib/DictClient.d.ts.map +1 -0
- package/lib/DictClient.js +89 -0
- package/lib/DictClient.js.map +1 -0
- package/lib/Domain.d.ts +86 -0
- package/lib/Domain.d.ts.map +1 -0
- package/lib/Domain.js +113 -0
- package/lib/Domain.js.map +1 -0
- package/lib/Endpoint.d.ts +181 -0
- package/lib/Endpoint.d.ts.map +1 -0
- package/lib/Endpoint.js +283 -0
- package/lib/Endpoint.js.map +1 -0
- package/lib/Environment.d.ts +174 -0
- package/lib/Environment.d.ts.map +1 -0
- package/lib/Environment.js +244 -0
- package/lib/Environment.js.map +1 -0
- package/lib/FetchServer.d.ts +105 -0
- package/lib/FetchServer.d.ts.map +1 -0
- package/lib/FetchServer.js +3 -0
- package/lib/FetchServer.js.map +1 -0
- package/lib/FetchServerHttp.d.ts +21 -0
- package/lib/FetchServerHttp.d.ts.map +1 -0
- package/lib/FetchServerHttp.js +84 -0
- package/lib/FetchServerHttp.js.map +1 -0
- package/lib/Function.d.ts +236 -0
- package/lib/Function.d.ts.map +1 -0
- package/lib/Function.js +273 -0
- package/lib/Function.js.map +1 -0
- package/lib/FunctionAutoscaler.d.ts +99 -0
- package/lib/FunctionAutoscaler.d.ts.map +1 -0
- package/lib/FunctionAutoscaler.js +136 -0
- package/lib/FunctionAutoscaler.js.map +1 -0
- package/lib/FunctionTarget.d.ts +61 -0
- package/lib/FunctionTarget.d.ts.map +1 -0
- package/lib/FunctionTarget.js +136 -0
- package/lib/FunctionTarget.js.map +1 -0
- package/lib/Image.d.ts +159 -0
- package/lib/Image.d.ts.map +1 -0
- package/lib/Image.js +203 -0
- package/lib/Image.js.map +1 -0
- package/lib/ImageBuild.d.ts +108 -0
- package/lib/ImageBuild.d.ts.map +1 -0
- package/lib/ImageBuild.js +157 -0
- package/lib/ImageBuild.js.map +1 -0
- package/lib/ImagePlan.d.ts +31 -0
- package/lib/ImagePlan.d.ts.map +1 -0
- package/lib/ImagePlan.js +70 -0
- package/lib/ImagePlan.js.map +1 -0
- package/lib/InferEnv.d.ts +26 -0
- package/lib/InferEnv.d.ts.map +1 -0
- package/lib/InferEnv.js +1 -0
- package/lib/InferEnv.js.map +1 -0
- package/lib/InvokeFunction.d.ts +186 -0
- package/lib/InvokeFunction.d.ts.map +1 -0
- package/lib/InvokeFunction.js +10 -0
- package/lib/InvokeFunction.js.map +1 -0
- package/lib/InvokeFunctionHttp.d.ts +39 -0
- package/lib/InvokeFunctionHttp.d.ts.map +1 -0
- package/lib/InvokeFunctionHttp.js +210 -0
- package/lib/InvokeFunctionHttp.js.map +1 -0
- package/lib/ModalBindings.d.ts +138 -0
- package/lib/ModalBindings.d.ts.map +1 -0
- package/lib/ModalBindings.js +223 -0
- package/lib/ModalBindings.js.map +1 -0
- package/lib/MountBucket.d.ts +80 -0
- package/lib/MountBucket.d.ts.map +1 -0
- package/lib/MountBucket.js +44 -0
- package/lib/MountBucket.js.map +1 -0
- package/lib/MountVolume.d.ts +77 -0
- package/lib/MountVolume.d.ts.map +1 -0
- package/lib/MountVolume.js +41 -0
- package/lib/MountVolume.js.map +1 -0
- package/lib/Mounts.d.ts +134 -0
- package/lib/Mounts.d.ts.map +1 -0
- package/lib/Mounts.js +87 -0
- package/lib/Mounts.js.map +1 -0
- package/lib/PersistentSandbox.d.ts +75 -0
- package/lib/PersistentSandbox.d.ts.map +1 -0
- package/lib/PersistentSandbox.js +93 -0
- package/lib/PersistentSandbox.js.map +1 -0
- package/lib/Providers.d.ts +23 -0
- package/lib/Providers.d.ts.map +1 -0
- package/lib/Providers.js +64 -0
- package/lib/Providers.js.map +1 -0
- package/lib/Proxy.d.ts +94 -0
- package/lib/Proxy.d.ts.map +1 -0
- package/lib/Proxy.js +132 -0
- package/lib/Proxy.js.map +1 -0
- package/lib/Queue.d.ts +147 -0
- package/lib/Queue.d.ts.map +1 -0
- package/lib/Queue.js +177 -0
- package/lib/Queue.js.map +1 -0
- package/lib/QueueClient.d.ts +64 -0
- package/lib/QueueClient.d.ts.map +1 -0
- package/lib/QueueClient.js +73 -0
- package/lib/QueueClient.js.map +1 -0
- package/lib/ReadApp.d.ts +85 -0
- package/lib/ReadApp.d.ts.map +1 -0
- package/lib/ReadApp.js +3 -0
- package/lib/ReadApp.js.map +1 -0
- package/lib/ReadAppHttp.d.ts +26 -0
- package/lib/ReadAppHttp.d.ts.map +1 -0
- package/lib/ReadAppHttp.js +106 -0
- package/lib/ReadAppHttp.js.map +1 -0
- package/lib/ReadDict.d.ts +39 -0
- package/lib/ReadDict.d.ts.map +1 -0
- package/lib/ReadDict.js +3 -0
- package/lib/ReadDict.js.map +1 -0
- package/lib/ReadDictHttp.d.ts +12 -0
- package/lib/ReadDictHttp.d.ts.map +1 -0
- package/lib/ReadDictHttp.js +23 -0
- package/lib/ReadDictHttp.js.map +1 -0
- package/lib/ReadFunction.d.ts +73 -0
- package/lib/ReadFunction.d.ts.map +1 -0
- package/lib/ReadFunction.js +3 -0
- package/lib/ReadFunction.js.map +1 -0
- package/lib/ReadFunctionHttp.d.ts +25 -0
- package/lib/ReadFunctionHttp.d.ts.map +1 -0
- package/lib/ReadFunctionHttp.js +63 -0
- package/lib/ReadFunctionHttp.js.map +1 -0
- package/lib/ReadQueue.d.ts +39 -0
- package/lib/ReadQueue.d.ts.map +1 -0
- package/lib/ReadQueue.js +3 -0
- package/lib/ReadQueue.js.map +1 -0
- package/lib/ReadQueueHttp.d.ts +12 -0
- package/lib/ReadQueueHttp.d.ts.map +1 -0
- package/lib/ReadQueueHttp.js +23 -0
- package/lib/ReadQueueHttp.js.map +1 -0
- package/lib/ReadServer.d.ts +72 -0
- package/lib/ReadServer.d.ts.map +1 -0
- package/lib/ReadServer.js +3 -0
- package/lib/ReadServer.js.map +1 -0
- package/lib/ReadServerHttp.d.ts +25 -0
- package/lib/ReadServerHttp.d.ts.map +1 -0
- package/lib/ReadServerHttp.js +70 -0
- package/lib/ReadServerHttp.js.map +1 -0
- package/lib/ReadVolume.d.ts +40 -0
- package/lib/ReadVolume.d.ts.map +1 -0
- package/lib/ReadVolume.js +3 -0
- package/lib/ReadVolume.js.map +1 -0
- package/lib/ReadVolumeHttp.d.ts +12 -0
- package/lib/ReadVolumeHttp.d.ts.map +1 -0
- package/lib/ReadVolumeHttp.js +24 -0
- package/lib/ReadVolumeHttp.js.map +1 -0
- package/lib/ReadWriteDict.d.ts +39 -0
- package/lib/ReadWriteDict.d.ts.map +1 -0
- package/lib/ReadWriteDict.js +3 -0
- package/lib/ReadWriteDict.js.map +1 -0
- package/lib/ReadWriteDictHttp.d.ts +12 -0
- package/lib/ReadWriteDictHttp.d.ts.map +1 -0
- package/lib/ReadWriteDictHttp.js +23 -0
- package/lib/ReadWriteDictHttp.js.map +1 -0
- package/lib/ReadWriteQueue.d.ts +40 -0
- package/lib/ReadWriteQueue.d.ts.map +1 -0
- package/lib/ReadWriteQueue.js +3 -0
- package/lib/ReadWriteQueue.js.map +1 -0
- package/lib/ReadWriteQueueHttp.d.ts +12 -0
- package/lib/ReadWriteQueueHttp.d.ts.map +1 -0
- package/lib/ReadWriteQueueHttp.js +23 -0
- package/lib/ReadWriteQueueHttp.js.map +1 -0
- package/lib/ReadWriteVolume.d.ts +40 -0
- package/lib/ReadWriteVolume.d.ts.map +1 -0
- package/lib/ReadWriteVolume.js +3 -0
- package/lib/ReadWriteVolume.js.map +1 -0
- package/lib/ReadWriteVolumeHttp.d.ts +12 -0
- package/lib/ReadWriteVolumeHttp.d.ts.map +1 -0
- package/lib/ReadWriteVolumeHttp.js +24 -0
- package/lib/ReadWriteVolumeHttp.js.map +1 -0
- package/lib/RuntimeOwner.d.ts +39 -0
- package/lib/RuntimeOwner.d.ts.map +1 -0
- package/lib/RuntimeOwner.js +85 -0
- package/lib/RuntimeOwner.js.map +1 -0
- package/lib/Sandbox.d.ts +215 -0
- package/lib/Sandbox.d.ts.map +1 -0
- package/lib/Sandbox.js +278 -0
- package/lib/Sandbox.js.map +1 -0
- package/lib/SandboxClient.d.ts +748 -0
- package/lib/SandboxClient.d.ts.map +1 -0
- package/lib/SandboxClient.js +710 -0
- package/lib/SandboxClient.js.map +1 -0
- package/lib/ScaleFunction.d.ts +54 -0
- package/lib/ScaleFunction.d.ts.map +1 -0
- package/lib/ScaleFunction.js +3 -0
- package/lib/ScaleFunction.js.map +1 -0
- package/lib/ScaleFunctionHttp.d.ts +21 -0
- package/lib/ScaleFunctionHttp.d.ts.map +1 -0
- package/lib/ScaleFunctionHttp.js +39 -0
- package/lib/ScaleFunctionHttp.js.map +1 -0
- package/lib/Secret.d.ts +170 -0
- package/lib/Secret.d.ts.map +1 -0
- package/lib/Secret.js +196 -0
- package/lib/Secret.js.map +1 -0
- package/lib/Server.d.ts +155 -0
- package/lib/Server.d.ts.map +1 -0
- package/lib/Server.js +184 -0
- package/lib/Server.js.map +1 -0
- package/lib/ServiceUser.d.ts +139 -0
- package/lib/ServiceUser.d.ts.map +1 -0
- package/lib/ServiceUser.js +210 -0
- package/lib/ServiceUser.js.map +1 -0
- package/lib/Volume.d.ts +170 -0
- package/lib/Volume.d.ts.map +1 -0
- package/lib/Volume.js +220 -0
- package/lib/Volume.js.map +1 -0
- package/lib/VolumeClient.d.ts +53 -0
- package/lib/VolumeClient.d.ts.map +1 -0
- package/lib/VolumeClient.js +22 -0
- package/lib/VolumeClient.js.map +1 -0
- package/lib/VolumeFiles.d.ts +94 -0
- package/lib/VolumeFiles.d.ts.map +1 -0
- package/lib/VolumeFiles.js +139 -0
- package/lib/VolumeFiles.js.map +1 -0
- package/lib/WebhookToken.d.ts +102 -0
- package/lib/WebhookToken.d.ts.map +1 -0
- package/lib/WebhookToken.js +176 -0
- package/lib/WebhookToken.js.map +1 -0
- package/lib/WorkspaceSettings.d.ts +70 -0
- package/lib/WorkspaceSettings.d.ts.map +1 -0
- package/lib/WorkspaceSettings.js +105 -0
- package/lib/WorkspaceSettings.js.map +1 -0
- package/lib/WriteApp.d.ts +38 -0
- package/lib/WriteApp.d.ts.map +1 -0
- package/lib/WriteApp.js +3 -0
- package/lib/WriteApp.js.map +1 -0
- package/lib/WriteAppHttp.d.ts +23 -0
- package/lib/WriteAppHttp.d.ts.map +1 -0
- package/lib/WriteAppHttp.js +36 -0
- package/lib/WriteAppHttp.js.map +1 -0
- package/lib/WriteDict.d.ts +39 -0
- package/lib/WriteDict.d.ts.map +1 -0
- package/lib/WriteDict.js +3 -0
- package/lib/WriteDict.js.map +1 -0
- package/lib/WriteDictHttp.d.ts +12 -0
- package/lib/WriteDictHttp.d.ts.map +1 -0
- package/lib/WriteDictHttp.js +23 -0
- package/lib/WriteDictHttp.js.map +1 -0
- package/lib/WriteQueue.d.ts +39 -0
- package/lib/WriteQueue.d.ts.map +1 -0
- package/lib/WriteQueue.js +3 -0
- package/lib/WriteQueue.js.map +1 -0
- package/lib/WriteQueueHttp.d.ts +12 -0
- package/lib/WriteQueueHttp.d.ts.map +1 -0
- package/lib/WriteQueueHttp.js +23 -0
- package/lib/WriteQueueHttp.js.map +1 -0
- package/lib/WriteSecret.d.ts +53 -0
- package/lib/WriteSecret.d.ts.map +1 -0
- package/lib/WriteSecret.js +3 -0
- package/lib/WriteSecret.js.map +1 -0
- package/lib/WriteSecretHttp.d.ts +23 -0
- package/lib/WriteSecretHttp.d.ts.map +1 -0
- package/lib/WriteSecretHttp.js +44 -0
- package/lib/WriteSecretHttp.js.map +1 -0
- package/lib/WriteVolume.d.ts +39 -0
- package/lib/WriteVolume.d.ts.map +1 -0
- package/lib/WriteVolume.js +3 -0
- package/lib/WriteVolume.js.map +1 -0
- package/lib/WriteVolumeHttp.d.ts +12 -0
- package/lib/WriteVolumeHttp.d.ts.map +1 -0
- package/lib/WriteVolumeHttp.js +24 -0
- package/lib/WriteVolumeHttp.js.map +1 -0
- package/lib/index.d.ts +80 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +78 -0
- package/lib/index.js.map +1 -0
- package/lib/internal/Declared.d.ts +29 -0
- package/lib/internal/Declared.d.ts.map +1 -0
- package/lib/internal/Declared.js +31 -0
- package/lib/internal/Declared.js.map +1 -0
- package/lib/internal/Deploy.d.ts +110 -0
- package/lib/internal/Deploy.d.ts.map +1 -0
- package/lib/internal/Deploy.js +230 -0
- package/lib/internal/Deploy.js.map +1 -0
- package/lib/internal/Entrypoint.d.ts +52 -0
- package/lib/internal/Entrypoint.d.ts.map +1 -0
- package/lib/internal/Entrypoint.js +193 -0
- package/lib/internal/Entrypoint.js.map +1 -0
- package/lib/internal/Rpc.d.ts +17 -0
- package/lib/internal/Rpc.d.ts.map +1 -0
- package/lib/internal/Rpc.js +49 -0
- package/lib/internal/Rpc.js.map +1 -0
- package/lib/internal/RpcAuth.d.ts +41 -0
- package/lib/internal/RpcAuth.d.ts.map +1 -0
- package/lib/internal/RpcAuth.js +100 -0
- package/lib/internal/RpcAuth.js.map +1 -0
- package/lib/internal/Runtime.d.ts +127 -0
- package/lib/internal/Runtime.d.ts.map +1 -0
- package/lib/internal/Runtime.js +246 -0
- package/lib/internal/Runtime.js.map +1 -0
- package/lib/internal/Tags.d.ts +19 -0
- package/lib/internal/Tags.d.ts.map +1 -0
- package/lib/internal/Tags.js +33 -0
- package/lib/internal/Tags.js.map +1 -0
- package/lib/internal/TcpConnect.d.ts +12 -0
- package/lib/internal/TcpConnect.d.ts.map +1 -0
- package/lib/internal/TcpConnect.js +46 -0
- package/lib/internal/TcpConnect.js.map +1 -0
- package/lib/internal/Transport.d.ts +13 -0
- package/lib/internal/Transport.d.ts.map +1 -0
- package/lib/internal/Transport.js +16 -0
- package/lib/internal/Transport.js.map +1 -0
- package/lib/internal.d.ts +71 -0
- package/lib/internal.d.ts.map +1 -0
- package/lib/internal.js +102 -0
- package/lib/internal.js.map +1 -0
- package/package.json +59 -3
- package/src/App.ts +262 -0
- package/src/AuthProvider.ts +295 -0
- package/src/BindingHttp.ts +112 -0
- package/src/Blob.ts +71 -0
- package/src/Bootstrap.ts +52 -0
- package/src/Cbor.ts +158 -0
- package/src/ConnectSandbox.ts +99 -0
- package/src/Container.ts +121 -0
- package/src/Contributions.ts +9 -0
- package/src/CreateDict.ts +95 -0
- package/src/CreateDictHttp.ts +91 -0
- package/src/CreateImage.ts +105 -0
- package/src/CreateImageHttp.ts +117 -0
- package/src/CreateQueue.ts +95 -0
- package/src/CreateQueueHttp.ts +91 -0
- package/src/CreateSandbox.ts +228 -0
- package/src/CreateSandboxHttp.ts +160 -0
- package/src/CreateSecret.ts +109 -0
- package/src/CreateSecretHttp.ts +83 -0
- package/src/CreateVolume.ts +96 -0
- package/src/CreateVolumeHttp.ts +93 -0
- package/src/Credentials.ts +74 -0
- package/src/Dict.ts +245 -0
- package/src/DictClient.ts +166 -0
- package/src/Domain.ts +147 -0
- package/src/Endpoint.ts +406 -0
- package/src/Environment.ts +373 -0
- package/src/FetchServer.ts +126 -0
- package/src/FetchServerHttp.ts +110 -0
- package/src/Function.ts +397 -0
- package/src/FunctionAutoscaler.ts +210 -0
- package/src/FunctionTarget.ts +181 -0
- package/src/Image.ts +281 -0
- package/src/ImageBuild.ts +228 -0
- package/src/ImagePlan.ts +78 -0
- package/src/InferEnv.ts +27 -0
- package/src/InvokeFunction.ts +211 -0
- package/src/InvokeFunctionHttp.ts +316 -0
- package/src/ModalBindings.ts +310 -0
- package/src/MountBucket.ts +137 -0
- package/src/MountVolume.ts +113 -0
- package/src/Mounts.ts +230 -0
- package/src/PersistentSandbox.ts +142 -0
- package/src/Providers.ts +100 -0
- package/src/Proxy.ts +191 -0
- package/src/Queue.ts +258 -0
- package/src/QueueClient.ts +149 -0
- package/src/ReadApp.ts +101 -0
- package/src/ReadAppHttp.ts +142 -0
- package/src/ReadDict.ts +44 -0
- package/src/ReadDictHttp.ts +27 -0
- package/src/ReadFunction.ts +107 -0
- package/src/ReadFunctionHttp.ts +91 -0
- package/src/ReadQueue.ts +44 -0
- package/src/ReadQueueHttp.ts +27 -0
- package/src/ReadServer.ts +98 -0
- package/src/ReadServerHttp.ts +101 -0
- package/src/ReadVolume.ts +45 -0
- package/src/ReadVolumeHttp.ts +28 -0
- package/src/ReadWriteDict.ts +44 -0
- package/src/ReadWriteDictHttp.ts +27 -0
- package/src/ReadWriteQueue.ts +45 -0
- package/src/ReadWriteQueueHttp.ts +27 -0
- package/src/ReadWriteVolume.ts +45 -0
- package/src/ReadWriteVolumeHttp.ts +28 -0
- package/src/RuntimeOwner.ts +111 -0
- package/src/Sandbox.ts +402 -0
- package/src/SandboxClient.ts +1404 -0
- package/src/ScaleFunction.ts +70 -0
- package/src/ScaleFunctionHttp.ts +54 -0
- package/src/Secret.ts +296 -0
- package/src/Server.ts +285 -0
- package/src/ServiceUser.ts +295 -0
- package/src/Volume.ts +320 -0
- package/src/VolumeClient.ts +108 -0
- package/src/VolumeFiles.ts +194 -0
- package/src/WebhookToken.ts +230 -0
- package/src/WorkspaceSettings.ts +160 -0
- package/src/WriteApp.ts +43 -0
- package/src/WriteAppHttp.ts +51 -0
- package/src/WriteDict.ts +44 -0
- package/src/WriteDictHttp.ts +27 -0
- package/src/WriteQueue.ts +44 -0
- package/src/WriteQueueHttp.ts +27 -0
- package/src/WriteSecret.ts +60 -0
- package/src/WriteSecretHttp.ts +56 -0
- package/src/WriteVolume.ts +44 -0
- package/src/WriteVolumeHttp.ts +28 -0
- package/src/globals.d.ts +2 -0
- package/src/index.ts +85 -0
- package/src/internal/Declared.ts +80 -0
- package/src/internal/Deploy.ts +309 -0
- package/src/internal/Entrypoint.ts +198 -0
- package/src/internal/Rpc.ts +59 -0
- package/src/internal/RpcAuth.ts +132 -0
- package/src/internal/Runtime.ts +386 -0
- package/src/internal/Tags.ts +44 -0
- package/src/internal/TcpConnect.ts +78 -0
- package/src/internal/Transport.ts +25 -0
- package/src/internal.ts +147 -0
package/src/Endpoint.ts
ADDED
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
import * as endpoint from "@distilled.cloud/modal/endpoint";
|
|
2
|
+
import { Unowned } from "alchemy/AdoptPolicy";
|
|
3
|
+
import { deepEqual, isResolved } from "alchemy/Diff";
|
|
4
|
+
import * as Provider from "alchemy/Provider";
|
|
5
|
+
import { Resource } from "alchemy/Resource";
|
|
6
|
+
import * as Data from "effect/Data";
|
|
7
|
+
import * as Effect from "effect/Effect";
|
|
8
|
+
import * as Redacted from "effect/Redacted";
|
|
9
|
+
import * as Schedule from "effect/Schedule";
|
|
10
|
+
import {
|
|
11
|
+
environmentNames,
|
|
12
|
+
envNameOf,
|
|
13
|
+
environmentOf,
|
|
14
|
+
isGeneratedName,
|
|
15
|
+
listAll,
|
|
16
|
+
type EnvironmentInput,
|
|
17
|
+
objectName,
|
|
18
|
+
} from "./internal.ts";
|
|
19
|
+
import { declarable } from "./internal/Declared.ts";
|
|
20
|
+
import type { Providers } from "./Providers.ts";
|
|
21
|
+
|
|
22
|
+
/** Provisioning failed, was cancelled, or didn't finish in time. */
|
|
23
|
+
export class EndpointProvisioningFailed extends Data.TaggedError(
|
|
24
|
+
"Modal.EndpointProvisioningFailed",
|
|
25
|
+
)<{
|
|
26
|
+
readonly endpointId: string;
|
|
27
|
+
readonly status: string;
|
|
28
|
+
readonly message: string;
|
|
29
|
+
}> {}
|
|
30
|
+
|
|
31
|
+
/** Where the model comes from. */
|
|
32
|
+
export type EndpointModel =
|
|
33
|
+
/** A model from Modal's catalog, by Hugging Face repo id (`"Qwen/Qwen3-8B"`). */
|
|
34
|
+
| { readonly repoId: string }
|
|
35
|
+
/** A Hugging Face repo, with a token for gated or private models. */
|
|
36
|
+
| {
|
|
37
|
+
readonly huggingface: string;
|
|
38
|
+
readonly revision?: string;
|
|
39
|
+
readonly token?: string | Redacted.Redacted<string>;
|
|
40
|
+
/** The catalog model it's derived from, for serving defaults. */
|
|
41
|
+
readonly baseModel: string;
|
|
42
|
+
}
|
|
43
|
+
/** Weights on a Modal Volume. */
|
|
44
|
+
| {
|
|
45
|
+
readonly volume: { readonly volumeId: string };
|
|
46
|
+
readonly path: string;
|
|
47
|
+
/** The catalog model it's derived from, for serving defaults. */
|
|
48
|
+
readonly baseModel: string;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type EndpointApi = "openai-chat-completions" | "openai-responses" | "anthropic-messages";
|
|
52
|
+
|
|
53
|
+
export interface EndpointProps {
|
|
54
|
+
/**
|
|
55
|
+
* Endpoint name, unique per environment. If omitted, one is generated from
|
|
56
|
+
* the stack, stage and logical ID. Changing it replaces the endpoint.
|
|
57
|
+
*/
|
|
58
|
+
name?: string;
|
|
59
|
+
/** Environment the endpoint runs in. Changing it replaces the endpoint. */
|
|
60
|
+
environment?: EnvironmentInput;
|
|
61
|
+
/** The model to serve. Changing it replaces the endpoint. */
|
|
62
|
+
model: EndpointModel;
|
|
63
|
+
/**
|
|
64
|
+
* APIs the endpoint speaks.
|
|
65
|
+
* @default ["openai-chat-completions"]
|
|
66
|
+
*/
|
|
67
|
+
apis?: EndpointApi[];
|
|
68
|
+
/**
|
|
69
|
+
* Inputs the model accepts.
|
|
70
|
+
* @default ["text"]
|
|
71
|
+
*/
|
|
72
|
+
inputs?: Array<"text" | "image" | "audio">;
|
|
73
|
+
/**
|
|
74
|
+
* `dedicated` runs on GPUs reserved for you (billed while running);
|
|
75
|
+
* `shared` runs on Modal's shared pool.
|
|
76
|
+
* @default "dedicated"
|
|
77
|
+
*/
|
|
78
|
+
servingMode?: "dedicated" | "shared";
|
|
79
|
+
/** Regions the model runs in. @default Modal picks */
|
|
80
|
+
regions?: string[];
|
|
81
|
+
/**
|
|
82
|
+
* The region requests enter through. Changing it replaces the endpoint.
|
|
83
|
+
* @default "us-west"
|
|
84
|
+
*/
|
|
85
|
+
routingRegion?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Serve without proxy authentication. Without it, callers send a
|
|
88
|
+
* `Modal.WebhookToken` as `Modal-Key` / `Modal-Secret`, and Modal only
|
|
89
|
+
* creates the endpoint once a webhook token with access to its environment
|
|
90
|
+
* exists (`EndpointProxyTokenRequired` otherwise): deploy the token first.
|
|
91
|
+
* @default false
|
|
92
|
+
*/
|
|
93
|
+
unauthenticated?: boolean;
|
|
94
|
+
/** Free-form description. */
|
|
95
|
+
description?: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface EndpointAttributes {
|
|
99
|
+
/** Endpoint ID. */
|
|
100
|
+
endpointId: string;
|
|
101
|
+
/** Endpoint name. */
|
|
102
|
+
name: string;
|
|
103
|
+
/** Environment name, or `undefined` for the workspace default. */
|
|
104
|
+
environment: string | undefined;
|
|
105
|
+
/** Base URL of the endpoint's APIs (`…/v1/chat/completions`, `…/v1/messages`). */
|
|
106
|
+
url: string;
|
|
107
|
+
/** Whether callers need a proxy auth token. */
|
|
108
|
+
requiresAuth: boolean;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* A Modal Endpoint: a managed model server that speaks the OpenAI Chat
|
|
113
|
+
* Completions, OpenAI Responses or Anthropic Messages API, from a catalog
|
|
114
|
+
* model, a Hugging Face repo, or weights on a Modal Volume.
|
|
115
|
+
*
|
|
116
|
+
* Reconcile waits until the endpoint is live, which takes minutes while the
|
|
117
|
+
* model loads. Modal can't change an endpoint in place, so any change
|
|
118
|
+
* replaces it.
|
|
119
|
+
*
|
|
120
|
+
* :::caution
|
|
121
|
+
* A dedicated endpoint reserves GPUs and is billed while it runs. Destroy it
|
|
122
|
+
* (or use `servingMode: "shared"`) when you're done.
|
|
123
|
+
* :::
|
|
124
|
+
*
|
|
125
|
+
* ### Serving a model
|
|
126
|
+
* **Example:** A catalog model behind the OpenAI API
|
|
127
|
+
* ```typescript
|
|
128
|
+
* import * as Modal from "@alchemy.run/modal";
|
|
129
|
+
*
|
|
130
|
+
* export const Qwen = Modal.Endpoint("Qwen", {
|
|
131
|
+
* model: { repoId: "Qwen/Qwen3-8B" },
|
|
132
|
+
* apis: ["openai-chat-completions", "anthropic-messages"],
|
|
133
|
+
* });
|
|
134
|
+
* ```
|
|
135
|
+
*
|
|
136
|
+
* **Example:** Fine-tuned weights from a Volume
|
|
137
|
+
* ```typescript
|
|
138
|
+
* import * as Modal from "@alchemy.run/modal";
|
|
139
|
+
*
|
|
140
|
+
* export const Weights = Modal.Volume("Weights", {});
|
|
141
|
+
* export const Tuned = Modal.Endpoint("Tuned", {
|
|
142
|
+
* model: { volume: Weights, path: "/checkpoints/final", baseModel: "Qwen/Qwen3-8B" },
|
|
143
|
+
* });
|
|
144
|
+
* ```
|
|
145
|
+
*
|
|
146
|
+
* ### Calling it
|
|
147
|
+
* **Example:** From a Cloudflare Worker with `Modal.FetchServer`
|
|
148
|
+
* ```typescript
|
|
149
|
+
* import * as Cloudflare from "@alchemy.run/cloudflare";
|
|
150
|
+
* import * as Modal from "@alchemy.run/modal";
|
|
151
|
+
* import * as Effect from "effect/Effect";
|
|
152
|
+
* import * as HttpClientRequest from "effect/http/HttpClientRequest";
|
|
153
|
+
* import * as HttpServerResponse from "effect/http/HttpServerResponse";
|
|
154
|
+
* import { Qwen } from "./Qwen.ts";
|
|
155
|
+
*
|
|
156
|
+
* export default class Chat extends Cloudflare.Worker<Chat>()(
|
|
157
|
+
* "Chat",
|
|
158
|
+
* { main: import.meta.url },
|
|
159
|
+
* Effect.gen(function* () {
|
|
160
|
+
* // Creates a webhook token for the Worker and sends it as Modal's proxy auth.
|
|
161
|
+
* const qwen = yield* Modal.FetchServer(Qwen);
|
|
162
|
+
* return {
|
|
163
|
+
* fetch: Effect.gen(function* () {
|
|
164
|
+
* const response = yield* qwen.fetch(
|
|
165
|
+
* HttpClientRequest.post("/v1/chat/completions").pipe(
|
|
166
|
+
* HttpClientRequest.bodyJsonUnsafe({
|
|
167
|
+
* model: "Qwen/Qwen3-8B",
|
|
168
|
+
* messages: [{ role: "user", content: "hi" }],
|
|
169
|
+
* }),
|
|
170
|
+
* ),
|
|
171
|
+
* );
|
|
172
|
+
* return HttpServerResponse.json(yield* response.json);
|
|
173
|
+
* }).pipe(Effect.orDie),
|
|
174
|
+
* };
|
|
175
|
+
* }).pipe(Effect.provide(Modal.FetchServerHttp)),
|
|
176
|
+
* ) {}
|
|
177
|
+
* ```
|
|
178
|
+
*
|
|
179
|
+
* @resource
|
|
180
|
+
* @product Endpoint
|
|
181
|
+
*/
|
|
182
|
+
export const Endpoint = declarable<Endpoint>()(Resource<Endpoint>("Modal.Endpoint"));
|
|
183
|
+
|
|
184
|
+
export type Endpoint = Resource<
|
|
185
|
+
"Modal.Endpoint",
|
|
186
|
+
EndpointProps,
|
|
187
|
+
EndpointAttributes,
|
|
188
|
+
never,
|
|
189
|
+
Providers
|
|
190
|
+
>;
|
|
191
|
+
|
|
192
|
+
const API = {
|
|
193
|
+
"openai-chat-completions": "ENDPOINT_API_SURFACE_OPENAI_CHAT_COMPLETIONS",
|
|
194
|
+
"openai-responses": "ENDPOINT_API_SURFACE_OPENAI_RESPONSES",
|
|
195
|
+
"anthropic-messages": "ENDPOINT_API_SURFACE_ANTHROPIC_MESSAGES",
|
|
196
|
+
} as const;
|
|
197
|
+
|
|
198
|
+
const INPUT = {
|
|
199
|
+
text: "ENDPOINT_INPUT_MODALITY_TEXT",
|
|
200
|
+
image: "ENDPOINT_INPUT_MODALITY_IMAGE",
|
|
201
|
+
audio: "ENDPOINT_INPUT_MODALITY_AUDIO",
|
|
202
|
+
} as const;
|
|
203
|
+
|
|
204
|
+
const modelSource = (model: EndpointModel): endpoint.EndpointModelSource => {
|
|
205
|
+
if ("repoId" in model) return { baseModelRepoId: model.repoId };
|
|
206
|
+
if ("huggingface" in model) {
|
|
207
|
+
return {
|
|
208
|
+
custom: {
|
|
209
|
+
baseModelRepoId: model.baseModel,
|
|
210
|
+
huggingface: {
|
|
211
|
+
repoId: model.huggingface,
|
|
212
|
+
revision: model.revision,
|
|
213
|
+
huggingfaceToken: model.token,
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
const volume = model.volume as { readonly volumeId?: string };
|
|
219
|
+
return {
|
|
220
|
+
custom: {
|
|
221
|
+
baseModelRepoId: model.baseModel,
|
|
222
|
+
modalVolume: { volumeId: volume.volumeId ?? "", modelPath: model.path },
|
|
223
|
+
},
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
/** Modal's default routing region (`modal endpoint create`'s). */
|
|
228
|
+
const DEFAULT_ROUTING_REGION = "us-west";
|
|
229
|
+
|
|
230
|
+
/** Props compared for replacement (credentials and references by value). */
|
|
231
|
+
const identity = (news: EndpointProps) => ({
|
|
232
|
+
environment: envNameOf(news.environment),
|
|
233
|
+
model: modelSource(news.model),
|
|
234
|
+
apis: news.apis ?? ["openai-chat-completions"],
|
|
235
|
+
inputs: news.inputs ?? ["text"],
|
|
236
|
+
servingMode: news.servingMode ?? "dedicated",
|
|
237
|
+
regions: news.regions,
|
|
238
|
+
routingRegion: news.routingRegion ?? DEFAULT_ROUTING_REGION,
|
|
239
|
+
unauthenticated: news.unauthenticated ?? false,
|
|
240
|
+
description: news.description,
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
export const EndpointProvider = () =>
|
|
244
|
+
Provider.effect(
|
|
245
|
+
Endpoint,
|
|
246
|
+
Effect.gen(function* () {
|
|
247
|
+
const info = Effect.fn(function* (endpointId: string) {
|
|
248
|
+
return yield* endpoint
|
|
249
|
+
.endpointGetInfo({ endpointId })
|
|
250
|
+
.pipe(Effect.catchTag("EndpointNotFound", () => Effect.undefined));
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
const lookup = Effect.fn(function* (name: string, env: string | undefined) {
|
|
254
|
+
const found = yield* endpoint
|
|
255
|
+
.endpointGetByName({ name, environmentName: environmentOf(env) })
|
|
256
|
+
.pipe(Effect.catchTag("EndpointNotFound", () => Effect.undefined));
|
|
257
|
+
if (!found?.endpointId) return undefined;
|
|
258
|
+
const details = yield* info(found.endpointId);
|
|
259
|
+
if (
|
|
260
|
+
!details?.info ||
|
|
261
|
+
details.info.lifecycle?.status === "ENDPOINT_LIFECYCLE_STATUS_STOPPED"
|
|
262
|
+
) {
|
|
263
|
+
return undefined;
|
|
264
|
+
}
|
|
265
|
+
return {
|
|
266
|
+
endpointId: found.endpointId,
|
|
267
|
+
name,
|
|
268
|
+
environment: env,
|
|
269
|
+
url: details.info.serviceUrl ?? "",
|
|
270
|
+
requiresAuth: details.info.requiresProxyAuth ?? true,
|
|
271
|
+
} satisfies EndpointAttributes;
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
/** Wait until live: model loads take minutes. */
|
|
275
|
+
const waitLive = Effect.fn(function* (endpointId: string) {
|
|
276
|
+
for (let attempt = 0; attempt < 120; attempt++) {
|
|
277
|
+
const details = yield* info(endpointId);
|
|
278
|
+
const status = details?.info?.status;
|
|
279
|
+
if (status === "ENDPOINT_STATUS_LIVE") return details!;
|
|
280
|
+
if (
|
|
281
|
+
status === "ENDPOINT_STATUS_FAILED" ||
|
|
282
|
+
status === "ENDPOINT_STATUS_CANCELLED" ||
|
|
283
|
+
status === "ENDPOINT_STATUS_STOPPED"
|
|
284
|
+
) {
|
|
285
|
+
return yield* new EndpointProvisioningFailed({
|
|
286
|
+
endpointId,
|
|
287
|
+
status,
|
|
288
|
+
message: `Modal endpoint ${endpointId} ended provisioning as ${status}`,
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
yield* Effect.sleep("15 seconds");
|
|
292
|
+
}
|
|
293
|
+
return yield* new EndpointProvisioningFailed({
|
|
294
|
+
endpointId,
|
|
295
|
+
status: "ENDPOINT_STATUS_PROVISIONING",
|
|
296
|
+
message: `Modal endpoint ${endpointId} wasn't live after 30 minutes`,
|
|
297
|
+
});
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
return {
|
|
301
|
+
stables: ["endpointId", "name", "environment"],
|
|
302
|
+
diff: Effect.fn(function* ({ id, news, olds, output }) {
|
|
303
|
+
if (!isResolved(news)) return undefined;
|
|
304
|
+
const name = yield* objectName(id, news.name);
|
|
305
|
+
if (output !== undefined && name !== output.name) return { action: "replace" } as const;
|
|
306
|
+
// Modal has no endpoint update: every change is a new endpoint.
|
|
307
|
+
if (olds !== undefined && !deepEqual(identity(news), identity(olds))) {
|
|
308
|
+
return { action: "replace" } as const;
|
|
309
|
+
}
|
|
310
|
+
return undefined;
|
|
311
|
+
}),
|
|
312
|
+
read: Effect.fn(function* ({ id, olds, output }) {
|
|
313
|
+
const name = output?.name ?? (yield* objectName(id, olds?.name));
|
|
314
|
+
const found = yield* lookup(name, output?.environment ?? envNameOf(olds?.environment));
|
|
315
|
+
if (!found) return undefined;
|
|
316
|
+
return output !== undefined || olds?.name === undefined ? found : Unowned(found);
|
|
317
|
+
}),
|
|
318
|
+
reconcile: Effect.fn(function* ({ id, news, output, session }) {
|
|
319
|
+
const name = output?.name ?? (yield* objectName(id, news.name));
|
|
320
|
+
const env = envNameOf(news.environment);
|
|
321
|
+
// Observe
|
|
322
|
+
const existing = yield* lookup(name, env);
|
|
323
|
+
let endpointId = existing?.endpointId;
|
|
324
|
+
// Ensure
|
|
325
|
+
if (endpointId === undefined) {
|
|
326
|
+
yield* session.note(`Creating endpoint ${name}...`);
|
|
327
|
+
const created = yield* endpoint
|
|
328
|
+
.createEndpoint({
|
|
329
|
+
name,
|
|
330
|
+
description: news.description,
|
|
331
|
+
environmentName: environmentOf(env),
|
|
332
|
+
model: modelSource(news.model),
|
|
333
|
+
apiSurfaces: (news.apis ?? ["openai-chat-completions"]).map((api) => API[api]),
|
|
334
|
+
inputModalities: (news.inputs ?? ["text"]).map((input) => INPUT[input]),
|
|
335
|
+
servingMode:
|
|
336
|
+
(news.servingMode ?? "dedicated") === "shared"
|
|
337
|
+
? "ENDPOINT_SERVING_MODE_SHARED"
|
|
338
|
+
: "ENDPOINT_SERVING_MODE_DEDICATED",
|
|
339
|
+
computeRegion: news.regions
|
|
340
|
+
? { explicit: { regions: news.regions } }
|
|
341
|
+
: { auto: {} },
|
|
342
|
+
// Modal routes an endpoint through exactly one region.
|
|
343
|
+
proxyRegions: [news.routingRegion ?? DEFAULT_ROUTING_REGION],
|
|
344
|
+
unauthenticated: news.unauthenticated ?? false,
|
|
345
|
+
sharedEndpointNoticeAcknowledged: news.servingMode === "shared" ? true : undefined,
|
|
346
|
+
})
|
|
347
|
+
.pipe(
|
|
348
|
+
// An endpoint creates an App, and Modal rate-limits App
|
|
349
|
+
// creation per workspace; wait it out, as `Modal.App` does.
|
|
350
|
+
Effect.retry({
|
|
351
|
+
while: (e) => e._tag === "TooManyRequests",
|
|
352
|
+
schedule: Schedule.spaced("5 seconds"),
|
|
353
|
+
times: 12,
|
|
354
|
+
}),
|
|
355
|
+
Effect.catchTag("EndpointAlreadyExists", () =>
|
|
356
|
+
lookup(name, env).pipe(
|
|
357
|
+
Effect.map((found) => ({ endpointId: found?.endpointId })),
|
|
358
|
+
),
|
|
359
|
+
),
|
|
360
|
+
);
|
|
361
|
+
endpointId = created.endpointId;
|
|
362
|
+
}
|
|
363
|
+
if (!endpointId) {
|
|
364
|
+
return yield* new EndpointProvisioningFailed({
|
|
365
|
+
endpointId: "",
|
|
366
|
+
status: "ENDPOINT_STATUS_UNSPECIFIED",
|
|
367
|
+
message: `Modal returned no endpoint for ${name}`,
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
yield* session.note(`Waiting for endpoint ${name} to go live...`);
|
|
371
|
+
const live = yield* waitLive(endpointId);
|
|
372
|
+
return {
|
|
373
|
+
endpointId,
|
|
374
|
+
name,
|
|
375
|
+
environment: env,
|
|
376
|
+
url: live.info?.serviceUrl ?? "",
|
|
377
|
+
requiresAuth: live.info?.requiresProxyAuth ?? true,
|
|
378
|
+
};
|
|
379
|
+
}),
|
|
380
|
+
list: Effect.fn(function* () {
|
|
381
|
+
const envs = yield* environmentNames;
|
|
382
|
+
const all: EndpointAttributes[] = [];
|
|
383
|
+
for (const env of envs) {
|
|
384
|
+
const items = yield* listAll(
|
|
385
|
+
(pagination) =>
|
|
386
|
+
endpoint
|
|
387
|
+
.listEndpoint({ environmentName: env, pagination })
|
|
388
|
+
.pipe(Effect.map((response) => response.items ?? [])),
|
|
389
|
+
(item) => item.updatedAt,
|
|
390
|
+
);
|
|
391
|
+
for (const item of items) {
|
|
392
|
+
if (!item.endpointId || !isGeneratedName(item.name)) continue;
|
|
393
|
+
const found = yield* lookup(item.name ?? "", env);
|
|
394
|
+
if (found) all.push(found);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
return all;
|
|
398
|
+
}),
|
|
399
|
+
delete: Effect.fn(function* ({ output }) {
|
|
400
|
+
yield* endpoint
|
|
401
|
+
.stopEndpoint({ endpointId: output.endpointId, source: "ENDPOINT_STOP_SOURCE_CLI" })
|
|
402
|
+
.pipe(Effect.catchTag("EndpointNotFound", () => Effect.void));
|
|
403
|
+
}),
|
|
404
|
+
};
|
|
405
|
+
}),
|
|
406
|
+
);
|