@alchemy.run/modal 0.0.0 → 2.0.0-beta.86
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
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as secret from "@distilled.cloud/modal/secret";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as Layer from "effect/Layer";
|
|
4
|
+
import * as Redacted from "effect/Redacted";
|
|
5
|
+
import { makeModalBinding } from "./BindingHttp.js";
|
|
6
|
+
import { operations } from "./internal.js";
|
|
7
|
+
import { WriteSecret } from "./WriteSecret.js";
|
|
8
|
+
/** The operations the client calls, resolved by `ModalBindings.withCredentials`. */
|
|
9
|
+
const WriteSecretOps = operations({ getInfo: secret.secretGetInfo, update: secret.updateSecret });
|
|
10
|
+
/** A write client over a secret id. */
|
|
11
|
+
export const makeWriteSecretClient = (secretId, ops) => ({
|
|
12
|
+
secretId,
|
|
13
|
+
put: (env) => Effect.gen(function* () {
|
|
14
|
+
const id = yield* secretId;
|
|
15
|
+
const { metadata } = yield* ops.getInfo({ secretId: id });
|
|
16
|
+
const values = Object.entries(env).map(([key, value]) => ({
|
|
17
|
+
key,
|
|
18
|
+
value: Redacted.isRedacted(value) ? Redacted.value(value) : value,
|
|
19
|
+
}));
|
|
20
|
+
const removed = (metadata?.keys ?? []).filter((key) => !(key in env));
|
|
21
|
+
yield* ops.update({
|
|
22
|
+
secretId: id,
|
|
23
|
+
updates: [...values, ...removed.map((key) => ({ key }))],
|
|
24
|
+
});
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* {@link WriteSecret} over Modal's API. Grants the host's identity (a scoped
|
|
29
|
+
* `Modal.ServiceUser`) the `contributor` role on the secret's environment.
|
|
30
|
+
*
|
|
31
|
+
* @layer
|
|
32
|
+
* @product Secret
|
|
33
|
+
* @provides Modal.WriteSecret
|
|
34
|
+
*/
|
|
35
|
+
export const WriteSecretHttp = Layer.effect(WriteSecret, makeModalBinding({
|
|
36
|
+
tag: "Modal.WriteSecret",
|
|
37
|
+
operations: WriteSecretOps,
|
|
38
|
+
role: "contributor",
|
|
39
|
+
make: Effect.fn(function* (resource, ops) {
|
|
40
|
+
const secretId = yield* resource.secretId;
|
|
41
|
+
return makeWriteSecretClient(secretId, ops);
|
|
42
|
+
}),
|
|
43
|
+
}));
|
|
44
|
+
//# sourceMappingURL=WriteSecretHttp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WriteSecretHttp.js","sources":["../src/WriteSecretHttp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,WAAW,EAA0B,MAAM,kBAAkB,CAAC;AAEvE,oFAAoF;AACpF,MAAM,cAAc,GAAG,UAAU,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;AAIlG,uCAAuC;AACvC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,QAA+B,EAC/B,GAAmB,EACA,EAAE,CAAC,CAAC;IACvB,QAAQ;IACR,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CACX,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAClB,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC;QAC3B,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;QAC1D,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;YACxD,GAAG;YACH,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK;SAClE,CAAC,CAAC,CAAC;QACJ,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;QACtE,KAAK,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;YAChB,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;SACzD,CAAC,CAAC;IACL,CAAC,CAAC;CACL,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CACzC,WAAW,EACX,gBAAgB,CAAC;IACf,GAAG,EAAE,mBAAmB;IACxB,UAAU,EAAE,cAAc;IAC1B,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAgB,EAAE,GAAG;QAC9C,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAC1C,OAAO,qBAAqB,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC9C,CAAC,CAAC;CACH,CAAC,CACH,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as Binding from "alchemy/Binding";
|
|
2
|
+
import type * as Effect from "effect/Effect";
|
|
3
|
+
import type { Volume } from "./Volume.ts";
|
|
4
|
+
import type { WriteVolumeClient } from "./VolumeClient.ts";
|
|
5
|
+
export type { WriteVolumeClient } from "./VolumeClient.ts";
|
|
6
|
+
/**
|
|
7
|
+
* Write a Modal Volume's files from any runtime without mounting it: upload, remove and copy files over Modal's volume API. Sandboxes that mount the volume see the changes after they reload it.
|
|
8
|
+
*
|
|
9
|
+
* ### Bind a volume
|
|
10
|
+
* **Example:** Write from a Cloudflare Worker
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import * as Cloudflare from "@alchemy.run/cloudflare";
|
|
13
|
+
* import * as Modal from "@alchemy.run/modal";
|
|
14
|
+
* import * as Effect from "effect/Effect";
|
|
15
|
+
* import * as HttpServerResponse from "effect/http/HttpServerResponse";
|
|
16
|
+
* import { Workspace } from "./Storage.ts";
|
|
17
|
+
*
|
|
18
|
+
* export default class Api extends Cloudflare.Worker<Api>()(
|
|
19
|
+
* "Api",
|
|
20
|
+
* { main: import.meta.url },
|
|
21
|
+
* Effect.gen(function* () {
|
|
22
|
+
* const volume = yield* Modal.WriteVolume(Workspace);
|
|
23
|
+
* return {
|
|
24
|
+
* fetch: Effect.gen(function* () {
|
|
25
|
+
* yield* volume.writeFile("/inbox/task.json", JSON.stringify({ repo: "alchemy" }));
|
|
26
|
+
* return HttpServerResponse.text("written");
|
|
27
|
+
* }).pipe(Effect.orDie),
|
|
28
|
+
* };
|
|
29
|
+
* }).pipe(Effect.provide(Modal.WriteVolumeHttp)),
|
|
30
|
+
* ) {}
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @binding
|
|
34
|
+
* @product Volume
|
|
35
|
+
*/
|
|
36
|
+
export interface WriteVolume extends Binding.Service<WriteVolume, "Modal.WriteVolume", (volume: Volume) => Effect.Effect<WriteVolumeClient>> {
|
|
37
|
+
}
|
|
38
|
+
export declare const WriteVolume: WriteVolume;
|
|
39
|
+
//# sourceMappingURL=WriteVolume.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WriteVolume.d.ts","sources":["../src/WriteVolume.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,WAAY,SAAQ,OAAO,CAAC,OAAO,CAClD,WAAW,EACX,mBAAmB,EACnB,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CACrD;CAAG;AAEJ,eAAO,MAAM,WAAW,aAAoD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WriteVolume.js","sources":["../src/WriteVolume.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AA2C3C,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAc,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as Layer from "effect/Layer";
|
|
2
|
+
import { WriteVolume } from "./WriteVolume.ts";
|
|
3
|
+
/**
|
|
4
|
+
* {@link WriteVolume} over Modal's volume API. Grants the host's identity (a scoped
|
|
5
|
+
* `Modal.ServiceUser`) the `contributor` role on the volume's environment.
|
|
6
|
+
*
|
|
7
|
+
* @layer
|
|
8
|
+
* @product Volume
|
|
9
|
+
* @provides Modal.WriteVolume
|
|
10
|
+
*/
|
|
11
|
+
export declare const WriteVolumeHttp: Layer.Layer<WriteVolume, never, never>;
|
|
12
|
+
//# sourceMappingURL=WriteVolumeHttp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WriteVolumeHttp.d.ts","sources":["../src/WriteVolumeHttp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAKtC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,wCAW3B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Layer from "effect/Layer";
|
|
3
|
+
import { makeModalBinding } from "./BindingHttp.js";
|
|
4
|
+
import { makeWriteVolumeClient } from "./VolumeClient.js";
|
|
5
|
+
import { VolumeFileOps } from "./VolumeFiles.js";
|
|
6
|
+
import { WriteVolume } from "./WriteVolume.js";
|
|
7
|
+
/**
|
|
8
|
+
* {@link WriteVolume} over Modal's volume API. Grants the host's identity (a scoped
|
|
9
|
+
* `Modal.ServiceUser`) the `contributor` role on the volume's environment.
|
|
10
|
+
*
|
|
11
|
+
* @layer
|
|
12
|
+
* @product Volume
|
|
13
|
+
* @provides Modal.WriteVolume
|
|
14
|
+
*/
|
|
15
|
+
export const WriteVolumeHttp = Layer.effect(WriteVolume, makeModalBinding({
|
|
16
|
+
tag: "Modal.WriteVolume",
|
|
17
|
+
operations: VolumeFileOps,
|
|
18
|
+
role: "contributor",
|
|
19
|
+
make: Effect.fn(function* (volume, ops) {
|
|
20
|
+
const volumeId = yield* volume.volumeId;
|
|
21
|
+
return makeWriteVolumeClient(volumeId, ops);
|
|
22
|
+
}),
|
|
23
|
+
}));
|
|
24
|
+
//# sourceMappingURL=WriteVolumeHttp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WriteVolumeHttp.js","sources":["../src/WriteVolumeHttp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CACzC,WAAW,EACX,gBAAgB,CAAC;IACf,GAAG,EAAE,mBAAmB;IACxB,UAAU,EAAE,aAAa;IACzB,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAc,EAAE,GAAG;QAC5C,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACxC,OAAO,qBAAqB,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC9C,CAAC,CAAC;CACH,CAAC,CACH,CAAC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export * from "./App.ts";
|
|
2
|
+
export * from "./AuthProvider.ts";
|
|
3
|
+
export * from "./ConnectSandbox.ts";
|
|
4
|
+
export * from "./Container.ts";
|
|
5
|
+
export * from "./CreateDict.ts";
|
|
6
|
+
export * from "./CreateDictHttp.ts";
|
|
7
|
+
export * from "./CreateImage.ts";
|
|
8
|
+
export * from "./CreateImageHttp.ts";
|
|
9
|
+
export * from "./CreateQueue.ts";
|
|
10
|
+
export * from "./CreateQueueHttp.ts";
|
|
11
|
+
export * from "./CreateSandbox.ts";
|
|
12
|
+
export * from "./CreateSandboxHttp.ts";
|
|
13
|
+
export * from "./CreateSecret.ts";
|
|
14
|
+
export * from "./CreateSecretHttp.ts";
|
|
15
|
+
export * from "./CreateVolume.ts";
|
|
16
|
+
export * from "./CreateVolumeHttp.ts";
|
|
17
|
+
export * from "./Dict.ts";
|
|
18
|
+
export * from "./Domain.ts";
|
|
19
|
+
export * from "./Endpoint.ts";
|
|
20
|
+
export * from "./Environment.ts";
|
|
21
|
+
export * from "./FetchServer.ts";
|
|
22
|
+
export * from "./FetchServerHttp.ts";
|
|
23
|
+
export * from "./Function.ts";
|
|
24
|
+
export * from "./FunctionAutoscaler.ts";
|
|
25
|
+
export * from "./Image.ts";
|
|
26
|
+
export * from "./ImageBuild.ts";
|
|
27
|
+
export * from "./InvokeFunction.ts";
|
|
28
|
+
export * from "./InvokeFunctionHttp.ts";
|
|
29
|
+
export * from "./Providers.ts";
|
|
30
|
+
export * from "./PersistentSandbox.ts";
|
|
31
|
+
export * from "./MountBucket.ts";
|
|
32
|
+
export * from "./Mounts.ts";
|
|
33
|
+
export * from "./MountVolume.ts";
|
|
34
|
+
export * from "./Proxy.ts";
|
|
35
|
+
export * from "./RuntimeOwner.ts";
|
|
36
|
+
export * from "./Queue.ts";
|
|
37
|
+
export * from "./ReadApp.ts";
|
|
38
|
+
export * from "./ReadAppHttp.ts";
|
|
39
|
+
export * from "./ReadDict.ts";
|
|
40
|
+
export * from "./ReadDictHttp.ts";
|
|
41
|
+
export * from "./ReadFunction.ts";
|
|
42
|
+
export * from "./ReadFunctionHttp.ts";
|
|
43
|
+
export * from "./ReadQueue.ts";
|
|
44
|
+
export * from "./ReadQueueHttp.ts";
|
|
45
|
+
export * from "./ReadServer.ts";
|
|
46
|
+
export * from "./ReadServerHttp.ts";
|
|
47
|
+
export * from "./ReadVolume.ts";
|
|
48
|
+
export * from "./ReadVolumeHttp.ts";
|
|
49
|
+
export * from "./ReadWriteDict.ts";
|
|
50
|
+
export * from "./ReadWriteDictHttp.ts";
|
|
51
|
+
export * from "./ReadWriteQueue.ts";
|
|
52
|
+
export * from "./ReadWriteQueueHttp.ts";
|
|
53
|
+
export * from "./ReadWriteVolume.ts";
|
|
54
|
+
export * from "./ReadWriteVolumeHttp.ts";
|
|
55
|
+
export * from "./Sandbox.ts";
|
|
56
|
+
export * from "./SandboxClient.ts";
|
|
57
|
+
export * from "./ScaleFunction.ts";
|
|
58
|
+
export * from "./ScaleFunctionHttp.ts";
|
|
59
|
+
export * from "./Secret.ts";
|
|
60
|
+
export * from "./Server.ts";
|
|
61
|
+
export * from "./ServiceUser.ts";
|
|
62
|
+
export * from "./Volume.ts";
|
|
63
|
+
export * from "./VolumeFiles.ts";
|
|
64
|
+
export * from "./WebhookToken.ts";
|
|
65
|
+
export * from "./WorkspaceSettings.ts";
|
|
66
|
+
export * from "./WriteApp.ts";
|
|
67
|
+
export * from "./WriteAppHttp.ts";
|
|
68
|
+
export * from "./WriteDict.ts";
|
|
69
|
+
export * from "./WriteDictHttp.ts";
|
|
70
|
+
export * from "./WriteQueue.ts";
|
|
71
|
+
export * from "./WriteQueueHttp.ts";
|
|
72
|
+
export * from "./WriteSecret.ts";
|
|
73
|
+
export * from "./WriteSecretHttp.ts";
|
|
74
|
+
export * from "./WriteVolume.ts";
|
|
75
|
+
export * from "./WriteVolumeHttp.ts";
|
|
76
|
+
export type { InferEnv } from "./InferEnv.ts";
|
|
77
|
+
export { Credentials, CredentialsFromEnv, DEFAULT_API_BASE_URL, fromAuthProvider, fromToken, } from "./Credentials.ts";
|
|
78
|
+
export { DeployerHostIdentity, HostIdentity } from "./ModalBindings.ts";
|
|
79
|
+
export type { DictHandle, DictsClient } from "./CreateDict.ts";
|
|
80
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mB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a,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export * from "./App.js";
|
|
2
|
+
export * from "./AuthProvider.js";
|
|
3
|
+
export * from "./ConnectSandbox.js";
|
|
4
|
+
export * from "./Container.js";
|
|
5
|
+
export * from "./CreateDict.js";
|
|
6
|
+
export * from "./CreateDictHttp.js";
|
|
7
|
+
export * from "./CreateImage.js";
|
|
8
|
+
export * from "./CreateImageHttp.js";
|
|
9
|
+
export * from "./CreateQueue.js";
|
|
10
|
+
export * from "./CreateQueueHttp.js";
|
|
11
|
+
export * from "./CreateSandbox.js";
|
|
12
|
+
export * from "./CreateSandboxHttp.js";
|
|
13
|
+
export * from "./CreateSecret.js";
|
|
14
|
+
export * from "./CreateSecretHttp.js";
|
|
15
|
+
export * from "./CreateVolume.js";
|
|
16
|
+
export * from "./CreateVolumeHttp.js";
|
|
17
|
+
export * from "./Dict.js";
|
|
18
|
+
export * from "./Domain.js";
|
|
19
|
+
export * from "./Endpoint.js";
|
|
20
|
+
export * from "./Environment.js";
|
|
21
|
+
export * from "./FetchServer.js";
|
|
22
|
+
export * from "./FetchServerHttp.js";
|
|
23
|
+
export * from "./Function.js";
|
|
24
|
+
export * from "./FunctionAutoscaler.js";
|
|
25
|
+
export * from "./Image.js";
|
|
26
|
+
export * from "./ImageBuild.js";
|
|
27
|
+
export * from "./InvokeFunction.js";
|
|
28
|
+
export * from "./InvokeFunctionHttp.js";
|
|
29
|
+
export * from "./Providers.js";
|
|
30
|
+
export * from "./PersistentSandbox.js";
|
|
31
|
+
export * from "./MountBucket.js";
|
|
32
|
+
export * from "./Mounts.js";
|
|
33
|
+
export * from "./MountVolume.js";
|
|
34
|
+
export * from "./Proxy.js";
|
|
35
|
+
export * from "./RuntimeOwner.js";
|
|
36
|
+
export * from "./Queue.js";
|
|
37
|
+
export * from "./ReadApp.js";
|
|
38
|
+
export * from "./ReadAppHttp.js";
|
|
39
|
+
export * from "./ReadDict.js";
|
|
40
|
+
export * from "./ReadDictHttp.js";
|
|
41
|
+
export * from "./ReadFunction.js";
|
|
42
|
+
export * from "./ReadFunctionHttp.js";
|
|
43
|
+
export * from "./ReadQueue.js";
|
|
44
|
+
export * from "./ReadQueueHttp.js";
|
|
45
|
+
export * from "./ReadServer.js";
|
|
46
|
+
export * from "./ReadServerHttp.js";
|
|
47
|
+
export * from "./ReadVolume.js";
|
|
48
|
+
export * from "./ReadVolumeHttp.js";
|
|
49
|
+
export * from "./ReadWriteDict.js";
|
|
50
|
+
export * from "./ReadWriteDictHttp.js";
|
|
51
|
+
export * from "./ReadWriteQueue.js";
|
|
52
|
+
export * from "./ReadWriteQueueHttp.js";
|
|
53
|
+
export * from "./ReadWriteVolume.js";
|
|
54
|
+
export * from "./ReadWriteVolumeHttp.js";
|
|
55
|
+
export * from "./Sandbox.js";
|
|
56
|
+
export * from "./SandboxClient.js";
|
|
57
|
+
export * from "./ScaleFunction.js";
|
|
58
|
+
export * from "./ScaleFunctionHttp.js";
|
|
59
|
+
export * from "./Secret.js";
|
|
60
|
+
export * from "./Server.js";
|
|
61
|
+
export * from "./ServiceUser.js";
|
|
62
|
+
export * from "./Volume.js";
|
|
63
|
+
export * from "./VolumeFiles.js";
|
|
64
|
+
export * from "./WebhookToken.js";
|
|
65
|
+
export * from "./WorkspaceSettings.js";
|
|
66
|
+
export * from "./WriteApp.js";
|
|
67
|
+
export * from "./WriteAppHttp.js";
|
|
68
|
+
export * from "./WriteDict.js";
|
|
69
|
+
export * from "./WriteDictHttp.js";
|
|
70
|
+
export * from "./WriteQueue.js";
|
|
71
|
+
export * from "./WriteQueueHttp.js";
|
|
72
|
+
export * from "./WriteSecret.js";
|
|
73
|
+
export * from "./WriteSecretHttp.js";
|
|
74
|
+
export * from "./WriteVolume.js";
|
|
75
|
+
export * from "./WriteVolumeHttp.js";
|
|
76
|
+
export { Credentials, CredentialsFromEnv, DEFAULT_API_BASE_URL, fromAuthProvider, fromToken, } from "./Credentials.js";
|
|
77
|
+
export { DeployerHostIdentity, HostIdentity } from "./ModalBindings.js";
|
|
78
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,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AAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AAErC,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { PropsInput } from "alchemy/Input";
|
|
2
|
+
import * as Output from "alchemy/Output";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Redacted from "effect/Redacted";
|
|
5
|
+
import type { Providers } from "../Providers.ts";
|
|
6
|
+
type Leaf = string | number | boolean | bigint | symbol | null | undefined | Redacted.Redacted<any> | Uint8Array | Date | ((...args: any[]) => any);
|
|
7
|
+
/**
|
|
8
|
+
* A prop value, or the declaration of a resource that has it: `app: Backend`
|
|
9
|
+
* instead of `app: yield* Backend`, at any depth.
|
|
10
|
+
*/
|
|
11
|
+
export type Declared<T> = T extends Leaf ? T : T extends Output.Output<any> ? T : T extends ReadonlyArray<infer U> ? Declared<U>[] | Effect.Effect<T, never, Providers> : {
|
|
12
|
+
[K in keyof T]: Declared<T[K]>;
|
|
13
|
+
} | Effect.Effect<T, never, Providers>;
|
|
14
|
+
/** Props where any value may be a resource declaration. */
|
|
15
|
+
export type DeclaredProps<P> = {
|
|
16
|
+
[K in keyof PropsInput<P>]: Declared<PropsInput<P>[K]>;
|
|
17
|
+
};
|
|
18
|
+
/** Yield every declaration in `value`, at any depth. */
|
|
19
|
+
export declare const resolveDeclarations: (value: unknown) => Effect.Effect<unknown, never, Providers>;
|
|
20
|
+
/**
|
|
21
|
+
* Let a resource's props hold declarations of other resources, which are
|
|
22
|
+
* yielded when the resource is: `Modal.Image("Node", { app: Backend })`.
|
|
23
|
+
* Props without declarations are passed through unchanged.
|
|
24
|
+
*/
|
|
25
|
+
export declare const declarable: <R extends {
|
|
26
|
+
readonly Props: any;
|
|
27
|
+
}>() => <C extends object>(resource: C) => C & ((id: string, props: DeclaredProps<R["Props"]>) => Effect.Effect<R, never, Providers>);
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=Declared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Declared.d.ts","sources":["../../src/internal/Declared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAEzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,KAAK,IAAI,GACL,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,IAAI,GACJ,SAAS,GACT,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,GACtB,UAAU,GACV,IAAI,GACJ,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAC;AAE9B;;;GAGG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,GACpC,CAAC,GACD,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,GAC1B,CAAC,GACD,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAC9B,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,GAClD;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;AAEhF,2DAA2D;AAC3D,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,UAAU,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAgB1F,wDAAwD;AACxD,eAAO,MAAM,mBAAmB,UAAW,OAAO,KAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,CAY7D,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,UAAU,GACpB,CAAC,SAAS;IAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAA;CAAE,QACjC,CAAC,SAAS,MAAM,YACL,CAAC,KACV,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAM/E,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as Output from "alchemy/Output";
|
|
2
|
+
import { isResource } from "alchemy/Resource";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Redacted from "effect/Redacted";
|
|
5
|
+
const isPlain = (value) => typeof value === "object" &&
|
|
6
|
+
value !== null &&
|
|
7
|
+
(Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null);
|
|
8
|
+
/** A declaration still to be yielded: an Effect that isn't an Output or a resource. */
|
|
9
|
+
const isDeclaration = (value) => Effect.isEffect(value) && !Output.isOutput(value) && !isResource(value);
|
|
10
|
+
const hasDeclarations = (value) => isDeclaration(value) ||
|
|
11
|
+
(Array.isArray(value) && value.some(hasDeclarations)) ||
|
|
12
|
+
(isPlain(value) && !isResource(value) && Object.values(value).some(hasDeclarations));
|
|
13
|
+
/** Yield every declaration in `value`, at any depth. */
|
|
14
|
+
export const resolveDeclarations = (value) => isDeclaration(value)
|
|
15
|
+
? value
|
|
16
|
+
: Array.isArray(value)
|
|
17
|
+
? Effect.forEach(value, resolveDeclarations)
|
|
18
|
+
: isPlain(value) && !isResource(value) && hasDeclarations(value)
|
|
19
|
+
? Effect.map(Effect.forEach(Object.entries(value), ([key, entry]) => Effect.map(resolveDeclarations(entry), (resolved) => [key, resolved])), Object.fromEntries)
|
|
20
|
+
: Effect.succeed(value);
|
|
21
|
+
/**
|
|
22
|
+
* Let a resource's props hold declarations of other resources, which are
|
|
23
|
+
* yielded when the resource is: `Modal.Image("Node", { app: Backend })`.
|
|
24
|
+
* Props without declarations are passed through unchanged.
|
|
25
|
+
*/
|
|
26
|
+
export const declarable = () => (resource) => new Proxy(resource, {
|
|
27
|
+
apply: (target, self, args) => typeof args[0] === "string" && hasDeclarations(args[1])
|
|
28
|
+
? Reflect.apply(target, self, [args[0], resolveDeclarations(args[1])])
|
|
29
|
+
: Reflect.apply(target, self, args),
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=Declared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Declared.js","sources":["../../src/internal/Declared.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AA+B5C,MAAM,OAAO,GAAG,CAAC,KAAc,EAAoC,EAAE,CACnE,OAAO,KAAK,KAAK,QAAQ;IACzB,KAAK,KAA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BAAmB,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,QAAQ,CAAU,CAAC,CAC/E,EACD,MAAM,CAAC,WAAW,CACnB;YACH,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEhC;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GACrB,GAAsC,EAAE,CACxC,CACE,QAAW,EACiF,EAAE,CAC9F,IAAI,KAAK,CAAC,QAAiD,EAAE;IAC3D,KAAK,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,IAAe,EAAE,EAAE,CACvC,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACrD,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACtE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC;CACxC,CAAU,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import * as BuildPlan from "@alchemy.run/docker/BuildPlan";
|
|
2
|
+
import * as app from "@distilled.cloud/modal/app";
|
|
3
|
+
import * as mount from "@distilled.cloud/modal/mount";
|
|
4
|
+
import type * as Bundle from "alchemy/Bundle/Bundle";
|
|
5
|
+
import { type MountCapability } from "alchemy/Mount";
|
|
6
|
+
import * as Effect from "effect/Effect";
|
|
7
|
+
import { type ImageBuildSpec } from "../ImageBuild.ts";
|
|
8
|
+
declare const ModalDeployUnexpectedResponse_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 & {
|
|
9
|
+
readonly _tag: "Modal.DeployUnexpectedResponse";
|
|
10
|
+
} & Readonly<A>;
|
|
11
|
+
/** Modal returned a response without a field the deploy needs. */
|
|
12
|
+
export declare class ModalDeployUnexpectedResponse extends ModalDeployUnexpectedResponse_base<{
|
|
13
|
+
readonly message: string;
|
|
14
|
+
}> {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The Modal Python client whose container entrypoint runs the function.
|
|
18
|
+
* Modal publishes it as the global mount `modal-client-mount-<version>`.
|
|
19
|
+
*/
|
|
20
|
+
export declare const MODAL_CLIENT_VERSION = "1.6.3";
|
|
21
|
+
/** The Python version added to a base image without one. */
|
|
22
|
+
export declare const DEFAULT_PYTHON = "3.12";
|
|
23
|
+
/** Port the program listens on when the resource doesn't set one. */
|
|
24
|
+
export declare const DEFAULT_PORT = 8000;
|
|
25
|
+
/** The mount holding Modal's Python client, which runs the container entrypoint. */
|
|
26
|
+
export declare const clientMount: Effect.Effect<string, ModalDeployUnexpectedResponse | mount.MountGetOrCreateError, app.ModalOpContext>;
|
|
27
|
+
/**
|
|
28
|
+
* Upload {@link ENTRYPOINT_SOURCE} as a mount owned by the app. Modal stores
|
|
29
|
+
* files by content hash, so redeploys reuse it.
|
|
30
|
+
*/
|
|
31
|
+
export declare const entrypointMount: (appId: string) => Effect.Effect<string, import("@distilled.cloud/core/errors").BadGateway | import("@distilled.cloud/core/config").ConfigError | import("@distilled.cloud/core/errors").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/core/errors").InternalServerError | import("@distilled.cloud/core/protocol-http").InvalidInput | ModalDeployUnexpectedResponse | import("@distilled.cloud/modal/Errors").ModalParseError | mount.MountNotFound | import("@distilled.cloud/core/sdk-error").SdkError | import("@distilled.cloud/core/errors").ServiceUnavailable | import("@distilled.cloud/core/errors").TooManyRequests | import("@distilled.cloud/core/errors").Unauthorized | import("@distilled.cloud/modal/Errors").UnknownModalError, app.ModalOpContext>;
|
|
32
|
+
/** What a runtime's image is built from. */
|
|
33
|
+
export interface RuntimeImageInput {
|
|
34
|
+
readonly main: string;
|
|
35
|
+
readonly image?: string;
|
|
36
|
+
readonly commands?: ReadonlyArray<string>;
|
|
37
|
+
readonly handler?: string;
|
|
38
|
+
readonly build?: Bundle.BundleConfig;
|
|
39
|
+
readonly isExternal?: boolean;
|
|
40
|
+
readonly python?: string | false;
|
|
41
|
+
readonly builderVersion?: string;
|
|
42
|
+
readonly gpu?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Plan a runtime's image with the shared BuildPlan: the bundled program on
|
|
46
|
+
* its base image, without the image's `ENTRYPOINT`/`CMD` (Modal starts the
|
|
47
|
+
* container with its own Python entrypoint, which then runs the program).
|
|
48
|
+
*/
|
|
49
|
+
export declare const planRuntimeImage: (target: string, input: RuntimeImageInput, port: number, bootstrap: ((importPath: string) => string) | undefined, capabilities?: readonly MountCapability[] | undefined) => Effect.Effect<{
|
|
50
|
+
plan: {
|
|
51
|
+
hash: string;
|
|
52
|
+
platform: string;
|
|
53
|
+
dockerfile: import("@alchemy.run/docker/DockerfileParser").ParsedDockerfile;
|
|
54
|
+
base: string;
|
|
55
|
+
pull: import("@alchemy.run/docker/Registry").ImageRegistry | undefined;
|
|
56
|
+
instructions: readonly import("@alchemy.run/docker/DockerfileParser").Instruction[];
|
|
57
|
+
files: BuildPlan.ContextFile[];
|
|
58
|
+
args: Record<string, string>;
|
|
59
|
+
secrets: Record<string, import("effect/Redacted").Redacted<string>>;
|
|
60
|
+
warnings: string[];
|
|
61
|
+
};
|
|
62
|
+
command: string[];
|
|
63
|
+
hash: string;
|
|
64
|
+
warnings: string[];
|
|
65
|
+
spec: {
|
|
66
|
+
contextFiles: {
|
|
67
|
+
filename: string;
|
|
68
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
69
|
+
mode: number;
|
|
70
|
+
}[];
|
|
71
|
+
buildArgs: Readonly<Record<string, string>>;
|
|
72
|
+
commands: string[];
|
|
73
|
+
};
|
|
74
|
+
python: string | false;
|
|
75
|
+
}, import("@alchemy.run/docker/BuildHash").BuildHashInvalidProps | BuildPlan.BuildPlanError | Bundle.BundleError | import("@alchemy.run/docker/DockerfileParser").DockerfileSyntaxError | import("alchemy/Mount").MountUnsupported | import("effect/PlatformError").PlatformError | BuildPlan.UnsupportedDockerfile, import("effect/FileSystem").FileSystem | import("effect/Path").Path>;
|
|
76
|
+
/**
|
|
77
|
+
* Build a runtime's image: the base, a layer adding standalone Python
|
|
78
|
+
* (unless `python: false`), then the program.
|
|
79
|
+
*/
|
|
80
|
+
export declare const buildRuntimeImage: (appId: string, planned: {
|
|
81
|
+
readonly plan: BuildPlan.BuildPlan;
|
|
82
|
+
readonly spec: ImageBuildSpec;
|
|
83
|
+
readonly python: string | false;
|
|
84
|
+
}, options: {
|
|
85
|
+
readonly builderVersion?: string;
|
|
86
|
+
readonly gpu?: string;
|
|
87
|
+
readonly note?: (message: string) => Effect.Effect<void>;
|
|
88
|
+
}) => Effect.Effect<string, import("../Blob.ts").BlobTransferFailed | import("../ImageBuild.ts").ImageBuildFailed | import("../ImageBuild.ts").ImageBuildTimeout | import("../ImageBuild.ts").ImageBuildUnexpectedResponse | import("@distilled.cloud/modal/image").ImageNotFound | ModalDeployUnexpectedResponse | mount.MountGetOrCreateError, import("@distilled.cloud/modal/Credentials").Credentials | import("effect/http/HttpClient").HttpClient>;
|
|
89
|
+
/**
|
|
90
|
+
* Publish the App with `tag` pointing at `created` (or removed, when
|
|
91
|
+
* `created` is `undefined`), keeping every other function and class the
|
|
92
|
+
* App serves. Modal deploys an App as a whole, so a publish carries the full
|
|
93
|
+
* map read back from the App's current layout.
|
|
94
|
+
*
|
|
95
|
+
* A class function (one with a `classId`) is published as Modal's clients
|
|
96
|
+
* publish `@app.cls`: its service function under `<tag>.*` and its class
|
|
97
|
+
* under `<tag>`, where its containers look the class up.
|
|
98
|
+
*/
|
|
99
|
+
/** The service function name of the class `tag`, as Modal's clients name it. */
|
|
100
|
+
export declare const classTag: (tag: string) => string;
|
|
101
|
+
export declare const publishFunction: (target: {
|
|
102
|
+
readonly appId: string;
|
|
103
|
+
readonly appName: string | undefined;
|
|
104
|
+
}, tag: string, created: {
|
|
105
|
+
readonly functionId: string;
|
|
106
|
+
readonly definitionId: string | undefined;
|
|
107
|
+
readonly classId?: string | undefined;
|
|
108
|
+
} | undefined) => Effect.Effect<app.PublishAppResponse, app.AppNotFound | import("@distilled.cloud/core/errors").BadGateway | import("@distilled.cloud/core/config").ConfigError | import("@distilled.cloud/core/errors").GatewayTimeout | import("effect/http/HttpClientError").HttpClientError | import("@distilled.cloud/core/errors").InternalServerError | import("@distilled.cloud/core/protocol-http").InvalidInput | import("@distilled.cloud/modal/Errors").ModalParseError | import("@distilled.cloud/core/sdk-error").SdkError | import("@distilled.cloud/core/errors").ServiceUnavailable | import("@distilled.cloud/core/errors").TooManyRequests | import("@distilled.cloud/core/errors").Unauthorized | import("@distilled.cloud/modal/Errors").UnknownModalError, app.ModalOpContext>;
|
|
109
|
+
export {};
|
|
110
|
+
//# sourceMappingURL=Deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Deploy.d.ts","sources":["../../src/internal/Deploy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,GAAG,MAAM,4BAA4B,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,8BAA8B,CAAC;AAEtD,OAAO,KAAK,KAAK,MAAM,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,KAAK,eAAe,EAAqB,MAAM,eAAe,CAAC;AAGxE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAA6B,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;;;;AAWlF,kEAAkE;AAClE,qBAAa,6BAA8B,SAAQ,mCAEjD;IACA,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;CAAG;AAEL;;;GAGG;AACH,eA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