@alchemy.run/fly 0.0.0 → 2.0.0-beta.84
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 +57 -4
- package/lib/App.d.ts +230 -0
- package/lib/App.d.ts.map +1 -0
- package/lib/App.js +340 -0
- package/lib/App.js.map +1 -0
- package/lib/AuthProvider.d.ts +22 -0
- package/lib/AuthProvider.d.ts.map +1 -0
- package/lib/AuthProvider.js +48 -0
- package/lib/AuthProvider.js.map +1 -0
- package/lib/BindService.d.ts +159 -0
- package/lib/BindService.d.ts.map +1 -0
- package/lib/BindService.js +222 -0
- package/lib/BindService.js.map +1 -0
- package/lib/Bootstrap.d.ts +8 -0
- package/lib/Bootstrap.d.ts.map +1 -0
- package/lib/Bootstrap.js +41 -0
- package/lib/Bootstrap.js.map +1 -0
- package/lib/Bucket.d.ts +278 -0
- package/lib/Bucket.d.ts.map +1 -0
- package/lib/Bucket.js +658 -0
- package/lib/Bucket.js.map +1 -0
- package/lib/BucketBinding.d.ts +33 -0
- package/lib/BucketBinding.d.ts.map +1 -0
- package/lib/BucketBinding.js +70 -0
- package/lib/BucketBinding.js.map +1 -0
- package/lib/Catalog.d.ts +28 -0
- package/lib/Catalog.d.ts.map +1 -0
- package/lib/Catalog.js +31 -0
- package/lib/Catalog.js.map +1 -0
- package/lib/Certificate.d.ts +189 -0
- package/lib/Certificate.d.ts.map +1 -0
- package/lib/Certificate.js +380 -0
- package/lib/Certificate.js.map +1 -0
- package/lib/Checkpoint.d.ts +55 -0
- package/lib/Checkpoint.d.ts.map +1 -0
- package/lib/Checkpoint.js +3 -0
- package/lib/Checkpoint.js.map +1 -0
- package/lib/CheckpointHttp.d.ts +22 -0
- package/lib/CheckpointHttp.d.ts.map +1 -0
- package/lib/CheckpointHttp.js +53 -0
- package/lib/CheckpointHttp.js.map +1 -0
- package/lib/ConnectPostgres.d.ts +58 -0
- package/lib/ConnectPostgres.d.ts.map +1 -0
- package/lib/ConnectPostgres.js +13 -0
- package/lib/ConnectPostgres.js.map +1 -0
- package/lib/ConnectPostgresHttp.d.ts +26 -0
- package/lib/ConnectPostgresHttp.d.ts.map +1 -0
- package/lib/ConnectPostgresHttp.js +57 -0
- package/lib/ConnectPostgresHttp.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/Credentials.d.ts +33 -0
- package/lib/Credentials.d.ts.map +1 -0
- package/lib/Credentials.js +59 -0
- package/lib/Credentials.js.map +1 -0
- package/lib/Decrypt.d.ts +52 -0
- package/lib/Decrypt.d.ts.map +1 -0
- package/lib/Decrypt.js +3 -0
- package/lib/Decrypt.js.map +1 -0
- package/lib/DecryptHttp.d.ts +22 -0
- package/lib/DecryptHttp.d.ts.map +1 -0
- package/lib/DecryptHttp.js +43 -0
- package/lib/DecryptHttp.js.map +1 -0
- package/lib/DeleteObject.d.ts +29 -0
- package/lib/DeleteObject.d.ts.map +1 -0
- package/lib/DeleteObject.js +3 -0
- package/lib/DeleteObject.js.map +1 -0
- package/lib/DeleteObjectHttp.d.ts +12 -0
- package/lib/DeleteObjectHttp.d.ts.map +1 -0
- package/lib/DeleteObjectHttp.js +17 -0
- package/lib/DeleteObjectHttp.js.map +1 -0
- package/lib/Deployment.d.ts +51 -0
- package/lib/Deployment.d.ts.map +1 -0
- package/lib/Deployment.js +62 -0
- package/lib/Deployment.js.map +1 -0
- package/lib/DeploymentImages.d.ts +18 -0
- package/lib/DeploymentImages.d.ts.map +1 -0
- package/lib/DeploymentImages.js +61 -0
- package/lib/DeploymentImages.js.map +1 -0
- package/lib/DeploymentState.d.ts +17 -0
- package/lib/DeploymentState.d.ts.map +1 -0
- package/lib/DeploymentState.js +87 -0
- package/lib/DeploymentState.js.map +1 -0
- package/lib/Encrypt.d.ts +50 -0
- package/lib/Encrypt.d.ts.map +1 -0
- package/lib/Encrypt.js +3 -0
- package/lib/Encrypt.js.map +1 -0
- package/lib/EncryptHttp.d.ts +22 -0
- package/lib/EncryptHttp.d.ts.map +1 -0
- package/lib/EncryptHttp.js +39 -0
- package/lib/EncryptHttp.js.map +1 -0
- package/lib/Environment.d.ts +45 -0
- package/lib/Environment.d.ts.map +1 -0
- package/lib/Environment.js +43 -0
- package/lib/Environment.js.map +1 -0
- package/lib/Errors.d.ts +18 -0
- package/lib/Errors.d.ts.map +1 -0
- package/lib/Errors.js +13 -0
- package/lib/Errors.js.map +1 -0
- package/lib/Exec.d.ts +41 -0
- package/lib/Exec.d.ts.map +1 -0
- package/lib/Exec.js +3 -0
- package/lib/Exec.js.map +1 -0
- package/lib/ExecHttp.d.ts +22 -0
- package/lib/ExecHttp.d.ts.map +1 -0
- package/lib/ExecHttp.js +39 -0
- package/lib/ExecHttp.js.map +1 -0
- package/lib/GetObject.d.ts +34 -0
- package/lib/GetObject.d.ts.map +1 -0
- package/lib/GetObject.js +3 -0
- package/lib/GetObject.js.map +1 -0
- package/lib/GetObjectHttp.d.ts +12 -0
- package/lib/GetObjectHttp.d.ts.map +1 -0
- package/lib/GetObjectHttp.js +17 -0
- package/lib/GetObjectHttp.js.map +1 -0
- package/lib/GetSecret.d.ts +44 -0
- package/lib/GetSecret.d.ts.map +1 -0
- package/lib/GetSecret.js +3 -0
- package/lib/GetSecret.js.map +1 -0
- package/lib/GetSecretHttp.d.ts +22 -0
- package/lib/GetSecretHttp.d.ts.map +1 -0
- package/lib/GetSecretHttp.js +50 -0
- package/lib/GetSecretHttp.js.map +1 -0
- package/lib/HeadObject.d.ts +29 -0
- package/lib/HeadObject.d.ts.map +1 -0
- package/lib/HeadObject.js +3 -0
- package/lib/HeadObject.js.map +1 -0
- package/lib/HeadObjectHttp.d.ts +12 -0
- package/lib/HeadObjectHttp.d.ts.map +1 -0
- package/lib/HeadObjectHttp.js +17 -0
- package/lib/HeadObjectHttp.js.map +1 -0
- package/lib/IpAssignment.d.ts +258 -0
- package/lib/IpAssignment.d.ts.map +1 -0
- package/lib/IpAssignment.js +376 -0
- package/lib/IpAssignment.js.map +1 -0
- package/lib/ListObjectsV2.d.ts +29 -0
- package/lib/ListObjectsV2.d.ts.map +1 -0
- package/lib/ListObjectsV2.js +3 -0
- package/lib/ListObjectsV2.js.map +1 -0
- package/lib/ListObjectsV2Http.d.ts +12 -0
- package/lib/ListObjectsV2Http.d.ts.map +1 -0
- package/lib/ListObjectsV2Http.js +17 -0
- package/lib/ListObjectsV2Http.js.map +1 -0
- package/lib/ListSecrets.d.ts +53 -0
- package/lib/ListSecrets.d.ts.map +1 -0
- package/lib/ListSecrets.js +3 -0
- package/lib/ListSecrets.js.map +1 -0
- package/lib/ListSecretsHttp.d.ts +22 -0
- package/lib/ListSecretsHttp.d.ts.map +1 -0
- package/lib/ListSecretsHttp.js +35 -0
- package/lib/ListSecretsHttp.js.map +1 -0
- package/lib/Machine.d.ts +802 -0
- package/lib/Machine.d.ts.map +1 -0
- package/lib/Machine.js +773 -0
- package/lib/Machine.js.map +1 -0
- package/lib/MachineContainers.d.ts +44 -0
- package/lib/MachineContainers.d.ts.map +1 -0
- package/lib/MachineContainers.js +115 -0
- package/lib/MachineContainers.js.map +1 -0
- package/lib/Metadata.d.ts +109 -0
- package/lib/Metadata.d.ts.map +1 -0
- package/lib/Metadata.js +159 -0
- package/lib/Metadata.js.map +1 -0
- package/lib/MountVolume.d.ts +295 -0
- package/lib/MountVolume.d.ts.map +1 -0
- package/lib/MountVolume.js +20 -0
- package/lib/MountVolume.js.map +1 -0
- package/lib/Postgres.d.ts +298 -0
- package/lib/Postgres.d.ts.map +1 -0
- package/lib/Postgres.js +508 -0
- package/lib/Postgres.js.map +1 -0
- package/lib/PostgresMigrations.d.ts +35 -0
- package/lib/PostgresMigrations.d.ts.map +1 -0
- package/lib/PostgresMigrations.js +110 -0
- package/lib/PostgresMigrations.js.map +1 -0
- package/lib/Providers.d.ts +38 -0
- package/lib/Providers.d.ts.map +1 -0
- package/lib/Providers.js +95 -0
- package/lib/Providers.js.map +1 -0
- package/lib/PutObject.d.ts +35 -0
- package/lib/PutObject.d.ts.map +1 -0
- package/lib/PutObject.js +3 -0
- package/lib/PutObject.js.map +1 -0
- package/lib/PutObjectHttp.d.ts +12 -0
- package/lib/PutObjectHttp.d.ts.map +1 -0
- package/lib/PutObjectHttp.js +17 -0
- package/lib/PutObjectHttp.js.map +1 -0
- package/lib/ReadRedis.d.ts +26 -0
- package/lib/ReadRedis.d.ts.map +1 -0
- package/lib/ReadRedis.js +3 -0
- package/lib/ReadRedis.js.map +1 -0
- package/lib/ReadRedisHttp.d.ts +11 -0
- package/lib/ReadRedisHttp.d.ts.map +1 -0
- package/lib/ReadRedisHttp.js +15 -0
- package/lib/ReadRedisHttp.js.map +1 -0
- package/lib/ReadWriteRedis.d.ts +29 -0
- package/lib/ReadWriteRedis.d.ts.map +1 -0
- package/lib/ReadWriteRedis.js +3 -0
- package/lib/ReadWriteRedis.js.map +1 -0
- package/lib/ReadWriteRedisHttp.d.ts +11 -0
- package/lib/ReadWriteRedisHttp.d.ts.map +1 -0
- package/lib/ReadWriteRedisHttp.js +15 -0
- package/lib/ReadWriteRedisHttp.js.map +1 -0
- package/lib/Redis.d.ts +252 -0
- package/lib/Redis.d.ts.map +1 -0
- package/lib/Redis.js +608 -0
- package/lib/Redis.js.map +1 -0
- package/lib/RedisBinding.d.ts +7 -0
- package/lib/RedisBinding.d.ts.map +1 -0
- package/lib/RedisBinding.js +53 -0
- package/lib/RedisBinding.js.map +1 -0
- package/lib/RedisHttp.d.ts +8 -0
- package/lib/RedisHttp.d.ts.map +1 -0
- package/lib/RedisHttp.js +8 -0
- package/lib/RedisHttp.js.map +1 -0
- package/lib/Region.d.ts +16 -0
- package/lib/Region.d.ts.map +1 -0
- package/lib/Region.js +13 -0
- package/lib/Region.js.map +1 -0
- package/lib/Secret.d.ts +190 -0
- package/lib/Secret.d.ts.map +1 -0
- package/lib/Secret.js +310 -0
- package/lib/Secret.js.map +1 -0
- package/lib/SecretHttp.d.ts +54 -0
- package/lib/SecretHttp.d.ts.map +1 -0
- package/lib/SecretHttp.js +66 -0
- package/lib/SecretHttp.js.map +1 -0
- package/lib/SecretKey.d.ts +164 -0
- package/lib/SecretKey.d.ts.map +1 -0
- package/lib/SecretKey.js +277 -0
- package/lib/SecretKey.js.map +1 -0
- package/lib/SecretKeyHttp.d.ts +14 -0
- package/lib/SecretKeyHttp.d.ts.map +1 -0
- package/lib/SecretKeyHttp.js +5 -0
- package/lib/SecretKeyHttp.js.map +1 -0
- package/lib/Service.d.ts +1022 -0
- package/lib/Service.d.ts.map +1 -0
- package/lib/Service.js +1397 -0
- package/lib/Service.js.map +1 -0
- package/lib/Sign.d.ts +36 -0
- package/lib/Sign.d.ts.map +1 -0
- package/lib/Sign.js +3 -0
- package/lib/Sign.js.map +1 -0
- package/lib/SignHttp.d.ts +22 -0
- package/lib/SignHttp.d.ts.map +1 -0
- package/lib/SignHttp.js +36 -0
- package/lib/SignHttp.js.map +1 -0
- package/lib/Sprite.d.ts +283 -0
- package/lib/Sprite.d.ts.map +1 -0
- package/lib/Sprite.js +469 -0
- package/lib/Sprite.js.map +1 -0
- package/lib/SpriteHttp.d.ts +25 -0
- package/lib/SpriteHttp.d.ts.map +1 -0
- package/lib/SpriteHttp.js +33 -0
- package/lib/SpriteHttp.js.map +1 -0
- package/lib/Verify.d.ts +37 -0
- package/lib/Verify.d.ts.map +1 -0
- package/lib/Verify.js +3 -0
- package/lib/Verify.js.map +1 -0
- package/lib/VerifyHttp.d.ts +22 -0
- package/lib/VerifyHttp.d.ts.map +1 -0
- package/lib/VerifyHttp.js +38 -0
- package/lib/VerifyHttp.js.map +1 -0
- package/lib/Volume.d.ts +53 -0
- package/lib/Volume.d.ts.map +1 -0
- package/lib/Volume.js +188 -0
- package/lib/Volume.js.map +1 -0
- package/lib/VolumeSnapshot.d.ts +135 -0
- package/lib/VolumeSnapshot.d.ts.map +1 -0
- package/lib/VolumeSnapshot.js +213 -0
- package/lib/VolumeSnapshot.js.map +1 -0
- package/lib/Website/AssetDeployment.d.ts +43 -0
- package/lib/Website/AssetDeployment.d.ts.map +1 -0
- package/lib/Website/AssetDeployment.js +162 -0
- package/lib/Website/AssetDeployment.js.map +1 -0
- package/lib/Website/Astro.d.ts +87 -0
- package/lib/Website/Astro.d.ts.map +1 -0
- package/lib/Website/Astro.js +55 -0
- package/lib/Website/Astro.js.map +1 -0
- package/lib/Website/Foldkit.d.ts +52 -0
- package/lib/Website/Foldkit.d.ts.map +1 -0
- package/lib/Website/Foldkit.js +45 -0
- package/lib/Website/Foldkit.js.map +1 -0
- package/lib/Website/FrameworkSite.d.ts +175 -0
- package/lib/Website/FrameworkSite.d.ts.map +1 -0
- package/lib/Website/FrameworkSite.js +162 -0
- package/lib/Website/FrameworkSite.js.map +1 -0
- package/lib/Website/Nextjs.d.ts +54 -0
- package/lib/Website/Nextjs.d.ts.map +1 -0
- package/lib/Website/Nextjs.js +46 -0
- package/lib/Website/Nextjs.js.map +1 -0
- package/lib/Website/Nuxt.d.ts +51 -0
- package/lib/Website/Nuxt.d.ts.map +1 -0
- package/lib/Website/Nuxt.js +36 -0
- package/lib/Website/Nuxt.js.map +1 -0
- package/lib/Website/Octane.d.ts +49 -0
- package/lib/Website/Octane.d.ts.map +1 -0
- package/lib/Website/Octane.js +39 -0
- package/lib/Website/Octane.js.map +1 -0
- package/lib/Website/ReactRouter.d.ts +80 -0
- package/lib/Website/ReactRouter.d.ts.map +1 -0
- package/lib/Website/ReactRouter.js +70 -0
- package/lib/Website/ReactRouter.js.map +1 -0
- package/lib/Website/SolidStart.d.ts +93 -0
- package/lib/Website/SolidStart.d.ts.map +1 -0
- package/lib/Website/SolidStart.js +71 -0
- package/lib/Website/SolidStart.js.map +1 -0
- package/lib/Website/StaticSite.d.ts +155 -0
- package/lib/Website/StaticSite.d.ts.map +1 -0
- package/lib/Website/StaticSite.js +168 -0
- package/lib/Website/StaticSite.js.map +1 -0
- package/lib/Website/SvelteKit.d.ts +52 -0
- package/lib/Website/SvelteKit.d.ts.map +1 -0
- package/lib/Website/SvelteKit.js +37 -0
- package/lib/Website/SvelteKit.js.map +1 -0
- package/lib/Website/TanStackStart.d.ts +76 -0
- package/lib/Website/TanStackStart.d.ts.map +1 -0
- package/lib/Website/TanStackStart.js +66 -0
- package/lib/Website/TanStackStart.js.map +1 -0
- package/lib/Website/Vinext.d.ts +73 -0
- package/lib/Website/Vinext.d.ts.map +1 -0
- package/lib/Website/Vinext.js +67 -0
- package/lib/Website/Vinext.js.map +1 -0
- package/lib/Website/Vite.d.ts +103 -0
- package/lib/Website/Vite.d.ts.map +1 -0
- package/lib/Website/Vite.js +91 -0
- package/lib/Website/Vite.js.map +1 -0
- package/lib/Website/Vocs.d.ts +52 -0
- package/lib/Website/Vocs.d.ts.map +1 -0
- package/lib/Website/Vocs.js +38 -0
- package/lib/Website/Vocs.js.map +1 -0
- package/lib/Website/Waku.d.ts +64 -0
- package/lib/Website/Waku.d.ts.map +1 -0
- package/lib/Website/Waku.js +39 -0
- package/lib/Website/Waku.js.map +1 -0
- package/lib/Website/index.d.ts +17 -0
- package/lib/Website/index.d.ts.map +1 -0
- package/lib/Website/index.js +17 -0
- package/lib/Website/index.js.map +1 -0
- package/lib/WriteCertificates.d.ts +63 -0
- package/lib/WriteCertificates.d.ts.map +1 -0
- package/lib/WriteCertificates.js +3 -0
- package/lib/WriteCertificates.js.map +1 -0
- package/lib/WriteCertificatesHttp.d.ts +25 -0
- package/lib/WriteCertificatesHttp.d.ts.map +1 -0
- package/lib/WriteCertificatesHttp.js +67 -0
- package/lib/WriteCertificatesHttp.js.map +1 -0
- package/lib/WriteRedis.d.ts +26 -0
- package/lib/WriteRedis.d.ts.map +1 -0
- package/lib/WriteRedis.js +3 -0
- package/lib/WriteRedis.js.map +1 -0
- package/lib/WriteRedisHttp.d.ts +11 -0
- package/lib/WriteRedisHttp.d.ts.map +1 -0
- package/lib/WriteRedisHttp.js +15 -0
- package/lib/WriteRedisHttp.js.map +1 -0
- package/lib/WriteSecret.d.ts +68 -0
- package/lib/WriteSecret.d.ts.map +1 -0
- package/lib/WriteSecret.js +4 -0
- package/lib/WriteSecret.js.map +1 -0
- package/lib/WriteSecretHttp.d.ts +26 -0
- package/lib/WriteSecretHttp.d.ts.map +1 -0
- package/lib/WriteSecretHttp.js +54 -0
- package/lib/WriteSecretHttp.js.map +1 -0
- package/lib/bluegreen.d.ts +36 -0
- package/lib/bluegreen.d.ts.map +1 -0
- package/lib/bluegreen.js +458 -0
- package/lib/bluegreen.js.map +1 -0
- package/lib/hosted.d.ts +172 -0
- package/lib/hosted.d.ts.map +1 -0
- package/lib/hosted.js +458 -0
- package/lib/hosted.js.map +1 -0
- package/lib/index.d.ts +65 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +63 -0
- package/lib/index.js.map +1 -0
- package/lib/internal/RemoteBuilder.d.ts +28 -0
- package/lib/internal/RemoteBuilder.d.ts.map +1 -0
- package/lib/internal/RemoteBuilder.js +145 -0
- package/lib/internal/RemoteBuilder.js.map +1 -0
- package/lib/leases.d.ts +53 -0
- package/lib/leases.d.ts.map +1 -0
- package/lib/leases.js +279 -0
- package/lib/leases.js.map +1 -0
- package/lib/ports.d.ts +51 -0
- package/lib/ports.d.ts.map +1 -0
- package/lib/ports.js +123 -0
- package/lib/ports.js.map +1 -0
- package/lib/replicas.d.ts +270 -0
- package/lib/replicas.d.ts.map +1 -0
- package/lib/replicas.js +969 -0
- package/lib/replicas.js.map +1 -0
- package/lib/rpc.d.ts +35 -0
- package/lib/rpc.d.ts.map +1 -0
- package/lib/rpc.js +113 -0
- package/lib/rpc.js.map +1 -0
- package/package.json +83 -3
- package/src/App.ts +516 -0
- package/src/AuthProvider.ts +68 -0
- package/src/BindService.ts +304 -0
- package/src/Bootstrap.ts +66 -0
- package/src/Bucket.ts +916 -0
- package/src/BucketBinding.ts +128 -0
- package/src/Catalog.ts +43 -0
- package/src/Certificate.ts +548 -0
- package/src/Checkpoint.ts +69 -0
- package/src/CheckpointHttp.ts +66 -0
- package/src/ConnectPostgres.ts +68 -0
- package/src/ConnectPostgresHttp.ts +77 -0
- package/src/Contributions.ts +9 -0
- package/src/Credentials.ts +102 -0
- package/src/Decrypt.ts +62 -0
- package/src/DecryptHttp.ts +52 -0
- package/src/DeleteObject.ts +43 -0
- package/src/DeleteObjectHttp.ts +20 -0
- package/src/Deployment.ts +121 -0
- package/src/DeploymentImages.ts +84 -0
- package/src/DeploymentState.ts +104 -0
- package/src/Encrypt.ts +60 -0
- package/src/EncryptHttp.ts +48 -0
- package/src/Environment.ts +81 -0
- package/src/Errors.ts +14 -0
- package/src/Exec.ts +50 -0
- package/src/ExecHttp.ts +47 -0
- package/src/GetObject.ts +48 -0
- package/src/GetObjectHttp.ts +20 -0
- package/src/GetSecret.ts +48 -0
- package/src/GetSecretHttp.ts +60 -0
- package/src/HeadObject.ts +43 -0
- package/src/HeadObjectHttp.ts +20 -0
- package/src/IpAssignment.ts +522 -0
- package/src/ListObjectsV2.ts +43 -0
- package/src/ListObjectsV2Http.ts +20 -0
- package/src/ListSecrets.ts +57 -0
- package/src/ListSecretsHttp.ts +43 -0
- package/src/Machine.ts +1268 -0
- package/src/MachineContainers.ts +152 -0
- package/src/Metadata.ts +195 -0
- package/src/MountVolume.ts +315 -0
- package/src/Postgres.ts +777 -0
- package/src/PostgresMigrations.ts +153 -0
- package/src/Providers.ts +155 -0
- package/src/PutObject.ts +49 -0
- package/src/PutObjectHttp.ts +20 -0
- package/src/ReadRedis.ts +31 -0
- package/src/ReadRedisHttp.ts +18 -0
- package/src/ReadWriteRedis.ts +33 -0
- package/src/ReadWriteRedisHttp.ts +18 -0
- package/src/Redis.ts +820 -0
- package/src/RedisBinding.ts +64 -0
- package/src/RedisHttp.ts +11 -0
- package/src/Region.ts +44 -0
- package/src/Secret.ts +405 -0
- package/src/SecretHttp.ts +149 -0
- package/src/SecretKey.ts +389 -0
- package/src/SecretKeyHttp.ts +23 -0
- package/src/Service.ts +1934 -0
- package/src/Sign.ts +46 -0
- package/src/SignHttp.ts +44 -0
- package/src/Sprite.ts +671 -0
- package/src/SpriteHttp.ts +50 -0
- package/src/Verify.ts +47 -0
- package/src/VerifyHttp.ts +46 -0
- package/src/Volume.ts +264 -0
- package/src/VolumeSnapshot.ts +321 -0
- package/src/Website/AssetDeployment.ts +294 -0
- package/src/Website/Astro.ts +87 -0
- package/src/Website/Foldkit.ts +54 -0
- package/src/Website/FrameworkSite.ts +363 -0
- package/src/Website/Nextjs.ts +50 -0
- package/src/Website/Nuxt.ts +48 -0
- package/src/Website/Octane.ts +44 -0
- package/src/Website/ReactRouter.ts +76 -0
- package/src/Website/SolidStart.ts +90 -0
- package/src/Website/StaticSite.ts +275 -0
- package/src/Website/SvelteKit.ts +49 -0
- package/src/Website/TanStackStart.ts +72 -0
- package/src/Website/Vinext.ts +79 -0
- package/src/Website/Vite.ts +112 -0
- package/src/Website/Vocs.ts +50 -0
- package/src/Website/Waku.ts +65 -0
- package/src/Website/index.ts +16 -0
- package/src/WriteCertificates.ts +90 -0
- package/src/WriteCertificatesHttp.ts +93 -0
- package/src/WriteRedis.ts +31 -0
- package/src/WriteRedisHttp.ts +18 -0
- package/src/WriteSecret.ts +86 -0
- package/src/WriteSecretHttp.ts +71 -0
- package/src/bluegreen.ts +708 -0
- package/src/globals.d.ts +2 -0
- package/src/hosted.ts +668 -0
- package/src/index.ts +64 -0
- package/src/internal/RemoteBuilder.ts +224 -0
- package/src/leases.ts +437 -0
- package/src/ports.ts +177 -0
- package/src/replicas.ts +1480 -0
- package/src/rpc.ts +136 -0
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import * as Binding from "alchemy/Binding";
|
|
2
|
+
import type { Resource } from "alchemy/Resource";
|
|
3
|
+
import { makeFetchRpcStub, RPC_PATH_PREFIX, type Rpc } from "alchemy/Rpc";
|
|
4
|
+
import { CurrentRuntimeContext, type RuntimeContext, sanitizeKey } from "alchemy/RuntimeContext";
|
|
5
|
+
import { isYieldableEffectLike } from "alchemy/Util/effect";
|
|
6
|
+
import * as Data from "effect/Data";
|
|
7
|
+
import * as Effect from "effect/Effect";
|
|
8
|
+
import * as HttpClient from "effect/http/HttpClient";
|
|
9
|
+
import type * as HttpClientError from "effect/http/HttpClientError";
|
|
10
|
+
import * as HttpClientRequest from "effect/http/HttpClientRequest";
|
|
11
|
+
import type * as HttpClientResponse from "effect/http/HttpClientResponse";
|
|
12
|
+
import * as Redacted from "effect/Redacted";
|
|
13
|
+
import type { BoundTarget, ServiceBinding } from "./MountVolume.ts";
|
|
14
|
+
import { RPC_TOKEN_HEADER } from "./rpc.ts";
|
|
15
|
+
import type { Service } from "./Service.ts";
|
|
16
|
+
|
|
17
|
+
/** The deployed caller has no address for the bound Service. */
|
|
18
|
+
export class BoundServiceUnavailable extends Data.TaggedError("Fly.BoundServiceUnavailable")<{
|
|
19
|
+
service: string;
|
|
20
|
+
}> {
|
|
21
|
+
get message() {
|
|
22
|
+
return `No private address for Fly Service ${this.service}. It publishes no ports, or the caller was deployed before the binding existed.`;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Client for a Service bound with {@link bindService}: its RPC methods,
|
|
28
|
+
* plus `fetch` for its HTTP routes.
|
|
29
|
+
*/
|
|
30
|
+
export type ServiceClient<Shape> = Omit<Shape, "fetch" | "run"> & {
|
|
31
|
+
/**
|
|
32
|
+
* Send a request to the Service's `fetch` handler over Fly's private
|
|
33
|
+
* network. A relative URL such as `/users/u1` resolves against the
|
|
34
|
+
* Service's private address.
|
|
35
|
+
*/
|
|
36
|
+
fetch(
|
|
37
|
+
request: HttpClientRequest.HttpClientRequest,
|
|
38
|
+
): Effect.Effect<
|
|
39
|
+
HttpClientResponse.HttpClientResponse,
|
|
40
|
+
HttpClientError.HttpClientError | BoundServiceUnavailable,
|
|
41
|
+
RuntimeContext
|
|
42
|
+
>;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** A published port of a Service bound with {@link bindEndpoint}. */
|
|
46
|
+
export interface EndpointClient {
|
|
47
|
+
/** `{appName}.flycast`, the bound Service's private hostname. */
|
|
48
|
+
host: Effect.Effect<string, BoundServiceUnavailable, RuntimeContext>;
|
|
49
|
+
/** The published port. */
|
|
50
|
+
port: number;
|
|
51
|
+
/** `http://{appName}.flycast:{port}`, for a port that serves plain HTTP. */
|
|
52
|
+
url: Effect.Effect<string, BoundServiceUnavailable, RuntimeContext>;
|
|
53
|
+
/** An `HttpClient` whose relative requests go to {@link url}. */
|
|
54
|
+
client: HttpClient.HttpClient.With<HttpClientError.HttpClientError | BoundServiceUnavailable>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
type Target<Shape> = Service & Rpc<Shape>;
|
|
58
|
+
|
|
59
|
+
const isFlyHost = (value: unknown): value is Resource<string, any, any, ServiceBinding> =>
|
|
60
|
+
typeof value === "object" &&
|
|
61
|
+
value !== null &&
|
|
62
|
+
((value as { Type?: string }).Type === "Fly.Service" ||
|
|
63
|
+
(value as { Type?: string }).Type === "Fly.Machine");
|
|
64
|
+
|
|
65
|
+
/** Logical id without yielding the Service (the runtime has no engine). */
|
|
66
|
+
const logicalIdOf = (target: unknown): string => {
|
|
67
|
+
const id =
|
|
68
|
+
target !== null && (typeof target === "object" || typeof target === "function")
|
|
69
|
+
? (target as { LogicalId?: unknown }).LogicalId
|
|
70
|
+
: undefined;
|
|
71
|
+
return typeof id === "string" ? id : "";
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/** Machine env vars the caller's reconcile writes for a bound Service. */
|
|
75
|
+
export const boundTargetEnvKeys = (id: string) => ({
|
|
76
|
+
appName: sanitizeKey(`FLY_BIND_${id}_APP`),
|
|
77
|
+
url: sanitizeKey(`FLY_BIND_${id}_URL`),
|
|
78
|
+
token: sanitizeKey(`FLY_BIND_${id}_TOKEN`),
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Record the binding on the caller and transport the target's private
|
|
83
|
+
* address and caller token as Outputs. Returns runtime accessors for them.
|
|
84
|
+
*/
|
|
85
|
+
const bindTarget = Effect.fn(function* <Shape, Req>(
|
|
86
|
+
target: Target<Shape> | Effect.Effect<Target<Shape>, never, Req>,
|
|
87
|
+
port: number | undefined,
|
|
88
|
+
) {
|
|
89
|
+
const id = logicalIdOf(target);
|
|
90
|
+
const keys = boundTargetEnvKeys(id);
|
|
91
|
+
const ctx = yield* CurrentRuntimeContext;
|
|
92
|
+
if (!globalThis.__ALCHEMY_RUNTIME__) {
|
|
93
|
+
// Yielding registers the target and makes the caller depend on it.
|
|
94
|
+
const service = isYieldableEffectLike(target)
|
|
95
|
+
? yield* target as Effect.Effect<Target<Shape>, never, Req>
|
|
96
|
+
: target;
|
|
97
|
+
// The binding carries the target's Outputs. Unlike props, binding
|
|
98
|
+
// data may stay unresolved between cycle peers, so two Services can
|
|
99
|
+
// bind each other; the caller's reconcile writes them onto its Machines.
|
|
100
|
+
const host = yield* Binding.Host;
|
|
101
|
+
if (isFlyHost(host)) {
|
|
102
|
+
yield* host.bind`${service}`({
|
|
103
|
+
target: {
|
|
104
|
+
service: id,
|
|
105
|
+
appName: service.appName,
|
|
106
|
+
network: service.network,
|
|
107
|
+
privateUrl: service.privateUrl,
|
|
108
|
+
rpcToken: service.rpcToken,
|
|
109
|
+
port,
|
|
110
|
+
endpoints: service.endpoints,
|
|
111
|
+
} as unknown as BoundTarget,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// Captured at bind time: the host's runtime context reads the values
|
|
116
|
+
// transported onto the Machine.
|
|
117
|
+
const read = (key: string) =>
|
|
118
|
+
ctx === undefined ? Effect.succeed(undefined) : ctx.get<unknown>(key);
|
|
119
|
+
const required = (key: string) =>
|
|
120
|
+
read(key).pipe(
|
|
121
|
+
Effect.flatMap((value) =>
|
|
122
|
+
typeof value === "string" && value.length > 0
|
|
123
|
+
? Effect.succeed(value)
|
|
124
|
+
: Effect.fail(new BoundServiceUnavailable({ service: id })),
|
|
125
|
+
),
|
|
126
|
+
);
|
|
127
|
+
return {
|
|
128
|
+
appName: required(keys.appName),
|
|
129
|
+
url: required(keys.url),
|
|
130
|
+
token: read(keys.token).pipe(
|
|
131
|
+
Effect.map((value) =>
|
|
132
|
+
Redacted.isRedacted(value)
|
|
133
|
+
? String(Redacted.value(value))
|
|
134
|
+
: typeof value === "string"
|
|
135
|
+
? value
|
|
136
|
+
: "",
|
|
137
|
+
),
|
|
138
|
+
),
|
|
139
|
+
};
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
/** Resolve `path` (relative or placeholder-based) against `base`. */
|
|
143
|
+
const withBase = (base: string, url: string) => {
|
|
144
|
+
const path = url.replace(/^https?:\/\/[^/]+/, "");
|
|
145
|
+
return `${base.replace(/\/$/, "")}${path.startsWith("/") ? path : `/${path}`}`;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Bind another {@link Service} and get a typed client for it. The client
|
|
150
|
+
* calls the Service's methods (everything its program returns besides
|
|
151
|
+
* `fetch` and `run`) and forwards `fetch` requests, over Fly's private
|
|
152
|
+
* network.
|
|
153
|
+
*
|
|
154
|
+
* Binding makes the caller deploy after the Service and hands it the
|
|
155
|
+
* Service's private address and caller token. Only callers that bind a
|
|
156
|
+
* Service receive its token, so other Services on the same network cannot
|
|
157
|
+
* call its methods. Every call must also carry Fly's signed `Fly-Src`
|
|
158
|
+
* header from the same organization, so the public internet cannot call
|
|
159
|
+
* them. Calls are plain HTTP inside Fly's WireGuard-encrypted network.
|
|
160
|
+
*
|
|
161
|
+
* ### Call a private Service
|
|
162
|
+
* **Example:** Methods on the target
|
|
163
|
+
* ```typescript
|
|
164
|
+
* export default class Users extends Fly.Service<Users>()(
|
|
165
|
+
* "Users",
|
|
166
|
+
* { main: import.meta.url, public: false },
|
|
167
|
+
* Effect.gen(function* () {
|
|
168
|
+
* return {
|
|
169
|
+
* list: () => Effect.succeed(USERS),
|
|
170
|
+
* get: (id: string) =>
|
|
171
|
+
* Effect.succeed(USERS.find((user) => user.id === id)),
|
|
172
|
+
* };
|
|
173
|
+
* }),
|
|
174
|
+
* ) {}
|
|
175
|
+
* ```
|
|
176
|
+
*
|
|
177
|
+
* **Example:** Bind it and call a method
|
|
178
|
+
* ```typescript
|
|
179
|
+
* export default class Orders extends Fly.Service<Orders>()(
|
|
180
|
+
* "Orders",
|
|
181
|
+
* { main: import.meta.url, public: false },
|
|
182
|
+
* Effect.gen(function* () {
|
|
183
|
+
* const users = yield* Fly.bindService(Users);
|
|
184
|
+
* return {
|
|
185
|
+
* list: () =>
|
|
186
|
+
* Effect.forEach(ORDERS, (order) =>
|
|
187
|
+
* users
|
|
188
|
+
* .get(order.userId)
|
|
189
|
+
* .pipe(Effect.map((user) => ({ ...order, user }))),
|
|
190
|
+
* ),
|
|
191
|
+
* };
|
|
192
|
+
* }),
|
|
193
|
+
* ) {}
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* ### Stream and forward HTTP
|
|
197
|
+
* **Example:** A method that returns a Stream
|
|
198
|
+
* ```typescript
|
|
199
|
+
* const all = yield* users.streamAll().pipe(Stream.runCollect);
|
|
200
|
+
* ```
|
|
201
|
+
*
|
|
202
|
+
* **Example:** Send a request to the Service's `fetch`
|
|
203
|
+
* ```typescript
|
|
204
|
+
* const response = yield* users.fetch(HttpClientRequest.get("/users/u1"));
|
|
205
|
+
* ```
|
|
206
|
+
*
|
|
207
|
+
* ### Bind one port
|
|
208
|
+
* {@link bindEndpoint} targets one published port, such as an admin API
|
|
209
|
+
* or a raw TCP protocol. Deploy fails with `Fly.EndpointNotPublished`
|
|
210
|
+
* when the Service does not publish it.
|
|
211
|
+
*
|
|
212
|
+
* **Example:** An admin API on port 9000
|
|
213
|
+
* ```typescript
|
|
214
|
+
* const admin = yield* Fly.bindEndpoint(Users, { port: 9000 });
|
|
215
|
+
* const stats = yield* admin.client.get("/stats");
|
|
216
|
+
* const host = yield* admin.host; // "{appName}.flycast"
|
|
217
|
+
* ```
|
|
218
|
+
*
|
|
219
|
+
* ### Two Services that bind each other
|
|
220
|
+
* Declare each as a tag class with its method shape, and implement each
|
|
221
|
+
* in its own file as the default export of `.make`.
|
|
222
|
+
*
|
|
223
|
+
* **Example:** Ping and Pong
|
|
224
|
+
* ```typescript
|
|
225
|
+
* // src/services.ts
|
|
226
|
+
* export class Ping extends Fly.Service<Ping, Named>()("Ping") {}
|
|
227
|
+
* export class Pong extends Fly.Service<Pong, Named>()("Pong") {}
|
|
228
|
+
*
|
|
229
|
+
* // src/ping.ts
|
|
230
|
+
* export default Ping.make(
|
|
231
|
+
* { main: import.meta.url },
|
|
232
|
+
* Effect.gen(function* () {
|
|
233
|
+
* const pong = yield* Fly.bindService(Pong);
|
|
234
|
+
* return { name: () => Effect.succeed("ping") };
|
|
235
|
+
* }),
|
|
236
|
+
* );
|
|
237
|
+
* ```
|
|
238
|
+
*
|
|
239
|
+
* ### Errors
|
|
240
|
+
* Each fails the caller's deploy before the caller is created:
|
|
241
|
+
* `Fly.ServiceUnreachable` when the caller and the Service are on
|
|
242
|
+
* different networks, `Fly.ServiceNotBindable` when the Service publishes
|
|
243
|
+
* no ports, and `Fly.EndpointNotPublished` for a port it does not publish.
|
|
244
|
+
*
|
|
245
|
+
* @binding
|
|
246
|
+
* @product Service
|
|
247
|
+
*/
|
|
248
|
+
export const bindService = <Shape, Req = never>(
|
|
249
|
+
target: Target<Shape> | Effect.Effect<Target<Shape>, never, Req>,
|
|
250
|
+
): Effect.Effect<ServiceClient<Shape>, never, Req | HttpClient.HttpClient> =>
|
|
251
|
+
Effect.gen(function* () {
|
|
252
|
+
const http = yield* HttpClient.HttpClient;
|
|
253
|
+
const bound = yield* bindTarget(target, undefined);
|
|
254
|
+
const send = (request: HttpClientRequest.HttpClientRequest, isRpc: boolean) =>
|
|
255
|
+
Effect.gen(function* () {
|
|
256
|
+
const base = yield* bound.url;
|
|
257
|
+
let next = HttpClientRequest.setUrl(request, withBase(base, request.url));
|
|
258
|
+
if (isRpc) {
|
|
259
|
+
next = HttpClientRequest.setHeader(next, RPC_TOKEN_HEADER, yield* bound.token);
|
|
260
|
+
}
|
|
261
|
+
return yield* http.execute(next);
|
|
262
|
+
});
|
|
263
|
+
return makeFetchRpcStub<ServiceClient<Shape>>({
|
|
264
|
+
fetch: (request) =>
|
|
265
|
+
send(request, request.url.includes(RPC_PATH_PREFIX)) as Effect.Effect<
|
|
266
|
+
HttpClientResponse.HttpClientResponse,
|
|
267
|
+
unknown
|
|
268
|
+
>,
|
|
269
|
+
base: {
|
|
270
|
+
fetch: (request: HttpClientRequest.HttpClientRequest) => send(request, false),
|
|
271
|
+
},
|
|
272
|
+
});
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Bind one published port of another {@link Service}: an admin API on
|
|
277
|
+
* its own port, or a raw TCP protocol. Returns the port's private host,
|
|
278
|
+
* its URL when it serves plain HTTP, and an `HttpClient` whose relative
|
|
279
|
+
* requests go there. See {@link bindService}.
|
|
280
|
+
*/
|
|
281
|
+
export const bindEndpoint = <Shape, Req = never>(
|
|
282
|
+
target: Target<Shape> | Effect.Effect<Target<Shape>, never, Req>,
|
|
283
|
+
options: { port: number },
|
|
284
|
+
): Effect.Effect<EndpointClient, never, Req | HttpClient.HttpClient> =>
|
|
285
|
+
Effect.gen(function* () {
|
|
286
|
+
const http = yield* HttpClient.HttpClient;
|
|
287
|
+
const bound = yield* bindTarget(target, options.port);
|
|
288
|
+
const host = bound.appName.pipe(Effect.map((app) => `${app}.flycast`));
|
|
289
|
+
const url = host.pipe(
|
|
290
|
+
Effect.map((name) =>
|
|
291
|
+
options.port === 80 ? `http://${name}` : `http://${name}:${options.port}`,
|
|
292
|
+
),
|
|
293
|
+
);
|
|
294
|
+
return {
|
|
295
|
+
host,
|
|
296
|
+
port: options.port,
|
|
297
|
+
url,
|
|
298
|
+
client: HttpClient.mapRequestEffect(http, (request) =>
|
|
299
|
+
url.pipe(
|
|
300
|
+
Effect.map((base) => HttpClientRequest.setUrl(request, withBase(base, request.url))),
|
|
301
|
+
),
|
|
302
|
+
),
|
|
303
|
+
} satisfies EndpointClient;
|
|
304
|
+
});
|
package/src/Bootstrap.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Process bootstrap for `Fly.Service` and `Fly.Sprite` (a Node process
|
|
3
|
+
* serving the bundled program). The generated entry imports this module
|
|
4
|
+
* and the user's `main`, nothing else — see `alchemy/Runtime/Bootstrap` for why.
|
|
5
|
+
*/
|
|
6
|
+
import { NodeServices } from "@effect/platform-node";
|
|
7
|
+
import { NodeHttpServer } from "alchemy/Http";
|
|
8
|
+
import { reifyBoundConfigProvider } from "alchemy/Runtime";
|
|
9
|
+
import {
|
|
10
|
+
entrypointLayer,
|
|
11
|
+
resolveProgram,
|
|
12
|
+
runProcess,
|
|
13
|
+
stackFromEnv,
|
|
14
|
+
} from "alchemy/Runtime/Bootstrap";
|
|
15
|
+
import { ManagedHttpShutdown } from "alchemy/Runtime/ManagedHttpShutdown";
|
|
16
|
+
import * as ConfigProvider from "effect/ConfigProvider";
|
|
17
|
+
import * as Effect from "effect/Effect";
|
|
18
|
+
import * as FetchHttpClient from "effect/http/FetchHttpClient";
|
|
19
|
+
import * as Layer from "effect/Layer";
|
|
20
|
+
import * as Logger from "effect/Logger";
|
|
21
|
+
import * as Option from "effect/Option";
|
|
22
|
+
import * as Scope from "effect/Scope";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Resolve the bundled program (the runners registered via `host.run` /
|
|
26
|
+
* serve) and run it with a Node HTTP server bound to `PORT`, so the
|
|
27
|
+
* returned `{ fetch }` handler is actually served and `host.run` loops
|
|
28
|
+
* stay alive.
|
|
29
|
+
*/
|
|
30
|
+
export const bootstrap = (entrypoint: unknown): Promise<void> => {
|
|
31
|
+
const platform = Layer.mergeAll(
|
|
32
|
+
NodeServices.layer,
|
|
33
|
+
FetchHttpClient.layer,
|
|
34
|
+
Logger.layer([Logger.consolePretty()]),
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
const services = entrypointLayer(entrypoint).pipe(
|
|
38
|
+
Layer.provideMerge(stackFromEnv),
|
|
39
|
+
Layer.provideMerge(NodeHttpServer({ hostname: "0.0.0.0" })),
|
|
40
|
+
Layer.provideMerge(platform),
|
|
41
|
+
Layer.provideMerge(
|
|
42
|
+
Layer.succeed(
|
|
43
|
+
ConfigProvider.ConfigProvider,
|
|
44
|
+
reifyBoundConfigProvider(ConfigProvider.fromEnv(), process.env),
|
|
45
|
+
),
|
|
46
|
+
),
|
|
47
|
+
);
|
|
48
|
+
const program = Effect.gen(function* () {
|
|
49
|
+
const managed = yield* Effect.serviceOption(ManagedHttpShutdown);
|
|
50
|
+
if (Option.isNone(managed)) {
|
|
51
|
+
return yield* resolveProgram("program").pipe(Effect.provide(services), Effect.scoped);
|
|
52
|
+
}
|
|
53
|
+
// Initializer dependencies outlive both run finalizers and HTTP responses.
|
|
54
|
+
const context = yield* Layer.buildWithScope(services, managed.value.dependencies);
|
|
55
|
+
return yield* resolveProgram("program").pipe(
|
|
56
|
+
Effect.provideContext(context),
|
|
57
|
+
Scope.provide(managed.value.dependencies),
|
|
58
|
+
);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const timeout = process.env.ALCHEMY_FLY_SHUTDOWN_TIMEOUT_MS;
|
|
62
|
+
return runProcess("Fly service", program, {
|
|
63
|
+
managedHttpShutdownTimeoutMs:
|
|
64
|
+
timeout === undefined ? undefined : /^\d+$/.test(timeout) ? Number(timeout) : NaN,
|
|
65
|
+
});
|
|
66
|
+
};
|