@alchemy.run/fly 0.0.0-stage → 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 +61 -2
- 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 +97 -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,54 @@
|
|
|
1
|
+
import { frameworkSite, type FrameworkSiteProps } from "./FrameworkSite.ts";
|
|
2
|
+
import type { ViteProps } from "./Vite.ts";
|
|
3
|
+
|
|
4
|
+
/** Configuration for a Foldkit website. */
|
|
5
|
+
export interface FoldkitProps extends FrameworkSiteProps {
|
|
6
|
+
/** Serializable overrides merged over vite.config.*. */
|
|
7
|
+
vite?: ViteProps["vite"];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Deploy a [Foldkit](https://foldkit.dev) application to Fly Machines.
|
|
12
|
+
* Browser-only apps use SPA routing. With `ssr.build` enabled in the
|
|
13
|
+
* Foldkit Vite plugin, prerendered pages and assets are served first,
|
|
14
|
+
* followed by Foldkit's generated request handler for SSR and hybrid routes.
|
|
15
|
+
*
|
|
16
|
+
* The build uses `@alchemy.run/frontend-frameworks/foldkit` and the
|
|
17
|
+
* project's Vite configuration. No application adapter is required.
|
|
18
|
+
* Native Foldkit development and live reload run without cloud resources;
|
|
19
|
+
* `Alchemy.remote()` opts into a live deployment during development.
|
|
20
|
+
*
|
|
21
|
+
* ### Creating a Website
|
|
22
|
+
* **Example:** SPA, SSR, or prerendered Foldkit application
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const site = yield* Fly.Website.Foldkit("Web", {
|
|
25
|
+
* rootDir: "./app",
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* ### Server Configuration
|
|
30
|
+
* **Example:** Runtime environment for server-rendered pages
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const site = yield* Fly.Website.Foldkit("Web", {
|
|
33
|
+
* rootDir: "./app",
|
|
34
|
+
* env: { API_BASE: "https://api.example.com" },
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @resource
|
|
39
|
+
* @product Website
|
|
40
|
+
*/
|
|
41
|
+
export const Foldkit = (id: string, props: FoldkitProps = {}) =>
|
|
42
|
+
frameworkSite(id, props, {
|
|
43
|
+
name: "Foldkit",
|
|
44
|
+
framework: "@alchemy.run/frontend-frameworks/foldkit",
|
|
45
|
+
target: "@alchemy.run/frontend-frameworks/foldkit/node",
|
|
46
|
+
options: {
|
|
47
|
+
vite: props.vite,
|
|
48
|
+
notFoundHandling:
|
|
49
|
+
props.assets?.notFoundHandling === "single-page-application"
|
|
50
|
+
? "spa"
|
|
51
|
+
: props.assets?.notFoundHandling,
|
|
52
|
+
htmlHandling: props.assets?.htmlHandling,
|
|
53
|
+
},
|
|
54
|
+
});
|
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
import { AlchemyContext } from "alchemy/AlchemyContext";
|
|
2
|
+
import type { MemoOptions } from "alchemy/Command/Memo";
|
|
3
|
+
import * as Namespace from "alchemy/Namespace";
|
|
4
|
+
import * as Output from "alchemy/Output";
|
|
5
|
+
import { ProviderModePolicy } from "alchemy/ProviderMode";
|
|
6
|
+
import { initialCwd } from "alchemy/Util/Node";
|
|
7
|
+
import {
|
|
8
|
+
staticConfigFromAssets,
|
|
9
|
+
type WebsiteAssetsProps,
|
|
10
|
+
type WebsiteNotFoundHandling,
|
|
11
|
+
} from "alchemy/Website/assets";
|
|
12
|
+
import { packSiteExtraFiles } from "alchemy/Website/packExtraFiles";
|
|
13
|
+
import { Server as FrameworkServer, type ServerDevProps } from "alchemy/Website/Server";
|
|
14
|
+
import * as Data from "effect/Data";
|
|
15
|
+
import * as Effect from "effect/Effect";
|
|
16
|
+
import * as FileSystem from "effect/FileSystem";
|
|
17
|
+
import * as Path from "effect/Path";
|
|
18
|
+
import * as Redacted from "effect/Redacted";
|
|
19
|
+
import { App } from "../App.ts";
|
|
20
|
+
import { Bucket } from "../Bucket.ts";
|
|
21
|
+
import { Certificate } from "../Certificate.ts";
|
|
22
|
+
import { IpAssignment } from "../IpAssignment.ts";
|
|
23
|
+
import type { Providers } from "../Providers.ts";
|
|
24
|
+
import { Service, type ServiceProps } from "../Service.ts";
|
|
25
|
+
import { AssetDeployment } from "./AssetDeployment.ts";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A resource-valued prop: the resource itself, or an Effect that produces
|
|
29
|
+
* it (so `yield* App(...)` and `App(...)` both type-check).
|
|
30
|
+
*/
|
|
31
|
+
export type Ref<T> = T | Effect.Effect<T, never, Providers>;
|
|
32
|
+
|
|
33
|
+
export type { ServerDevProps, WebsiteAssetsProps, WebsiteNotFoundHandling };
|
|
34
|
+
export { staticConfigFromAssets };
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Props shared by every Fly framework website composite.
|
|
38
|
+
*/
|
|
39
|
+
export interface FrameworkSiteProps {
|
|
40
|
+
/** Deployment strategy forwarded to the hosted Fly Service. */
|
|
41
|
+
deploy?: ServiceProps["deploy"];
|
|
42
|
+
/** Process shutdown policy. The framework server must handle the signal. */
|
|
43
|
+
shutdown?: ServiceProps["shutdown"];
|
|
44
|
+
/** Named Machine readiness checks. */
|
|
45
|
+
checks?: ServiceProps["checks"];
|
|
46
|
+
/** Override proxy services and their routing health checks. */
|
|
47
|
+
services?: ServiceProps["services"];
|
|
48
|
+
/**
|
|
49
|
+
* Project root directory (the directory containing `package.json`).
|
|
50
|
+
* @default "."
|
|
51
|
+
*/
|
|
52
|
+
rootDir?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Controls which files are hashed to decide whether the build re-runs.
|
|
55
|
+
* @default true
|
|
56
|
+
*/
|
|
57
|
+
memo?: MemoOptions | boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Parent Fly App. Accepts a `Fly.App` or an Effect that produces one.
|
|
60
|
+
* When omitted, a `Fly.App` is created under this site's namespace.
|
|
61
|
+
*/
|
|
62
|
+
app?: Ref<App>;
|
|
63
|
+
/**
|
|
64
|
+
* Process environment for the hosted server. Not Cloudflare Worker
|
|
65
|
+
* bindings — values become Machine env vars. Accepts `Output`s
|
|
66
|
+
* (e.g. `VITE_API_URL: api.url`).
|
|
67
|
+
*/
|
|
68
|
+
env?: Record<string, string | Redacted.Redacted<string> | Output.Output<string | undefined>>;
|
|
69
|
+
/**
|
|
70
|
+
* Static-asset routing (`notFoundHandling`, `htmlHandling`). Hashed
|
|
71
|
+
* client files are uploaded to Tigris regardless of this bag.
|
|
72
|
+
*/
|
|
73
|
+
assets?: WebsiteAssetsProps;
|
|
74
|
+
/**
|
|
75
|
+
* Options for the local dev server that runs this site under
|
|
76
|
+
* `alchemy dev`.
|
|
77
|
+
*/
|
|
78
|
+
dev?: ServerDevProps;
|
|
79
|
+
/**
|
|
80
|
+
* Optional custom hostname. Requests ACME (`Fly.Certificate`) on the
|
|
81
|
+
* App. `url` becomes `https://<domain>` (existing DNS only for v1).
|
|
82
|
+
*/
|
|
83
|
+
domain?: string;
|
|
84
|
+
/**
|
|
85
|
+
* User-defined tags. Accepted for API parity; Fly Services do not
|
|
86
|
+
* surface resource tags.
|
|
87
|
+
*/
|
|
88
|
+
tags?: Record<string, string>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Per-framework wiring for {@link makeFrameworkSite}. */
|
|
92
|
+
export interface FrameworkSiteConfig {
|
|
93
|
+
/** Display name used in error messages (e.g. `"SvelteKit"`). */
|
|
94
|
+
name: string;
|
|
95
|
+
/** Framework-integration module specifier. */
|
|
96
|
+
framework: string;
|
|
97
|
+
/** Node deploy-target module specifier. */
|
|
98
|
+
target: string;
|
|
99
|
+
/**
|
|
100
|
+
* Framework-specific build options forwarded to the integration (e.g.
|
|
101
|
+
* `{ kit }`, `{ nuxt }`, `{ astro }`). Must be JSON-serializable.
|
|
102
|
+
*/
|
|
103
|
+
options?: Record<string, unknown> | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Assets-only routing forwarded to the Node target (Vite SPA fallback).
|
|
106
|
+
* `spa` also publishes client files to Tigris at `/`.
|
|
107
|
+
*/
|
|
108
|
+
static?: { spa?: boolean; errorPage?: string } | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* Vocs/Waku: serve `about/index.html` at `/about`.
|
|
111
|
+
* @default "none"
|
|
112
|
+
*/
|
|
113
|
+
htmlHandling?: "none" | "drop-trailing-slash";
|
|
114
|
+
/**
|
|
115
|
+
* Packages installed into the Machine image with `npm install` instead
|
|
116
|
+
* of bundling (Next.js needs `next`).
|
|
117
|
+
*/
|
|
118
|
+
install?: string[] | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Skip baking `clientDirectory` at `/app/dist`. Next.js serves `.next`
|
|
121
|
+
* from the image root instead.
|
|
122
|
+
*/
|
|
123
|
+
skipClientAssets?: boolean | undefined;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface FrameworkSite {
|
|
127
|
+
/**
|
|
128
|
+
* Public site URL. Local framework URL under `alchemy dev`;
|
|
129
|
+
* `https://{app}.fly.dev` (or `https://{domain}`) on deploy.
|
|
130
|
+
*/
|
|
131
|
+
url: string | Output.Output<string | undefined> | undefined;
|
|
132
|
+
/** Parent Fly App. `undefined` during `alchemy dev`. */
|
|
133
|
+
app: App | undefined;
|
|
134
|
+
/** Hosted Fly Service. `undefined` during `alchemy dev`. */
|
|
135
|
+
service: Service | undefined;
|
|
136
|
+
/** Shared Anycast IPv4 so `{app}.fly.dev` answers. */
|
|
137
|
+
ip: IpAssignment | undefined;
|
|
138
|
+
/** ACME certificate when {@link FrameworkSiteProps.domain} is set. */
|
|
139
|
+
certificate: Certificate | undefined;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export class FrameworkSiteError extends Data.TaggedError("FrameworkSiteError")<{
|
|
143
|
+
readonly framework: string;
|
|
144
|
+
readonly message: string;
|
|
145
|
+
readonly cause?: unknown;
|
|
146
|
+
}> {}
|
|
147
|
+
|
|
148
|
+
const DEFAULT_PORT = 3000;
|
|
149
|
+
|
|
150
|
+
const resolveRef = <T>(ref: Ref<T>): Effect.Effect<T, never, Providers> =>
|
|
151
|
+
Effect.isEffect(ref) ? ref : Effect.succeed(ref);
|
|
152
|
+
|
|
153
|
+
const envRecord = (
|
|
154
|
+
env:
|
|
155
|
+
| Record<string, string | Redacted.Redacted<string> | Output.Output<string | undefined>>
|
|
156
|
+
| undefined,
|
|
157
|
+
): Record<string, string | Output.Output<string | undefined>> | undefined => {
|
|
158
|
+
if (env === undefined) return undefined;
|
|
159
|
+
return Object.fromEntries(
|
|
160
|
+
Object.entries(env).map(([key, value]) => [
|
|
161
|
+
key,
|
|
162
|
+
Redacted.isRedacted(value) ? Redacted.value(value) : value,
|
|
163
|
+
]),
|
|
164
|
+
);
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
const runFrameworkSite = Effect.fn("Fly.Website.FrameworkSite")(function* (
|
|
168
|
+
_id: string,
|
|
169
|
+
props: FrameworkSiteProps,
|
|
170
|
+
config: FrameworkSiteConfig,
|
|
171
|
+
) {
|
|
172
|
+
const ctx = yield* AlchemyContext;
|
|
173
|
+
const remoted = yield* ProviderModePolicy;
|
|
174
|
+
const isLocal = ctx.dev && remoted !== true;
|
|
175
|
+
const path = yield* Path.Path;
|
|
176
|
+
const fs = yield* FileSystem.FileSystem;
|
|
177
|
+
|
|
178
|
+
const build = yield* FrameworkServer("Build", {
|
|
179
|
+
framework: config.framework,
|
|
180
|
+
target: config.target,
|
|
181
|
+
root: props.rootDir,
|
|
182
|
+
env: envRecord(props.env),
|
|
183
|
+
options: config.options,
|
|
184
|
+
memo: props.memo,
|
|
185
|
+
dev: props.dev,
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
if (isLocal) {
|
|
189
|
+
return {
|
|
190
|
+
url: build.url,
|
|
191
|
+
app: undefined,
|
|
192
|
+
service: undefined,
|
|
193
|
+
ip: undefined,
|
|
194
|
+
certificate: undefined,
|
|
195
|
+
} satisfies FrameworkSite;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// The build runs at APPLY time (`Website.Server` is a resource), so its
|
|
199
|
+
// attributes are Outputs here — derive every deploy input lazily and let
|
|
200
|
+
// the engine resolve them once the build has produced real paths. Reading
|
|
201
|
+
// `build.distDir` eagerly in the composite body would observe an Output
|
|
202
|
+
// proxy, not a string.
|
|
203
|
+
const buildOut = Output.mapEffect(
|
|
204
|
+
([serverEntry, distDir]: [string | undefined, string | undefined]) =>
|
|
205
|
+
Effect.gen(function* () {
|
|
206
|
+
if (serverEntry === undefined || distDir === undefined) {
|
|
207
|
+
return yield* Effect.die(
|
|
208
|
+
new FrameworkSiteError({
|
|
209
|
+
framework: config.framework,
|
|
210
|
+
message: `The ${config.name} build produced no Node serve entry (serverModules[0]). The Node deploy target should write serve-node.mjs.`,
|
|
211
|
+
}),
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
const main = path.resolve(initialCwd, serverEntry);
|
|
215
|
+
if (!(yield* fs.exists(main).pipe(Effect.orElseSucceed(() => false)))) {
|
|
216
|
+
return yield* Effect.die(
|
|
217
|
+
new FrameworkSiteError({
|
|
218
|
+
framework: config.framework,
|
|
219
|
+
message: `The ${config.name} build produced no server entry at ${main}`,
|
|
220
|
+
}),
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
return { distDir: path.resolve(initialCwd, distDir), main };
|
|
224
|
+
}),
|
|
225
|
+
)(
|
|
226
|
+
Output.all(
|
|
227
|
+
build.serverEntry as unknown as Output.Output<string | undefined>,
|
|
228
|
+
build.distDir as unknown as Output.Output<string | undefined>,
|
|
229
|
+
) as unknown as Output.Output<[string | undefined, string | undefined]>,
|
|
230
|
+
);
|
|
231
|
+
const main = Output.map(buildOut, (out) => out.main);
|
|
232
|
+
|
|
233
|
+
const extraFiles = Output.mapEffect((out: { distDir: string; main: string }) =>
|
|
234
|
+
packSiteExtraFiles(out.distDir, config.skipClientAssets === true ? "next" : "client"),
|
|
235
|
+
)(buildOut);
|
|
236
|
+
|
|
237
|
+
const app = props.app !== undefined ? yield* resolveRef(props.app) : yield* App("App");
|
|
238
|
+
|
|
239
|
+
const ip = yield* IpAssignment("Shared", {
|
|
240
|
+
app,
|
|
241
|
+
type: "shared_v4",
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
// SPA: hashed `/assets` at Tigris. HTML and unknown paths stay on
|
|
245
|
+
// origin (NodeServe `notFoundHandling: "spa"`). Intercepting `/` with
|
|
246
|
+
// Tigris hangs SPA fallbacks — Fly does not rewrite `/counter/42` to
|
|
247
|
+
// `index.html`.
|
|
248
|
+
let statics:
|
|
249
|
+
| Output.Output<
|
|
250
|
+
| Array<{
|
|
251
|
+
guestPath: string;
|
|
252
|
+
urlPrefix: string;
|
|
253
|
+
tigrisBucket?: string;
|
|
254
|
+
indexDocument?: string;
|
|
255
|
+
}>
|
|
256
|
+
| undefined
|
|
257
|
+
>
|
|
258
|
+
| undefined;
|
|
259
|
+
if (config.static?.spa === true) {
|
|
260
|
+
const clientDir = Output.map(
|
|
261
|
+
build.clientDir as unknown as Output.Output<string | undefined>,
|
|
262
|
+
(dir) => {
|
|
263
|
+
if (dir === undefined) {
|
|
264
|
+
throw new FrameworkSiteError({
|
|
265
|
+
framework: config.framework,
|
|
266
|
+
message: `The ${config.name} build produced no client assets directory`,
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
return path.resolve(initialCwd, dir);
|
|
270
|
+
},
|
|
271
|
+
);
|
|
272
|
+
const bucket = yield* Bucket("Assets", { public: true });
|
|
273
|
+
yield* AssetDeployment("Files", {
|
|
274
|
+
bucket,
|
|
275
|
+
sourcePath: clientDir as unknown as string,
|
|
276
|
+
purge: true,
|
|
277
|
+
});
|
|
278
|
+
statics = Output.mapEffect(([clientDir, bucketName]: [string, string]) =>
|
|
279
|
+
Effect.gen(function* () {
|
|
280
|
+
const assetsDir = path.join(clientDir, "assets");
|
|
281
|
+
const exists = yield* fs.exists(assetsDir).pipe(Effect.orElseSucceed(() => false));
|
|
282
|
+
return exists
|
|
283
|
+
? [
|
|
284
|
+
{
|
|
285
|
+
guestPath: "/assets",
|
|
286
|
+
urlPrefix: "/assets",
|
|
287
|
+
tigrisBucket: bucketName,
|
|
288
|
+
},
|
|
289
|
+
]
|
|
290
|
+
: undefined;
|
|
291
|
+
}),
|
|
292
|
+
)(
|
|
293
|
+
Output.all(
|
|
294
|
+
clientDir,
|
|
295
|
+
bucket.name as unknown as Output.Output<string>,
|
|
296
|
+
) as unknown as Output.Output<[string, string]>,
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
const service = yield* Service("Service", {
|
|
301
|
+
app,
|
|
302
|
+
deploy: props.deploy,
|
|
303
|
+
shutdown: props.shutdown,
|
|
304
|
+
checks: props.checks,
|
|
305
|
+
services: props.services,
|
|
306
|
+
main: main as unknown as string,
|
|
307
|
+
port: DEFAULT_PORT,
|
|
308
|
+
// Node + nitro SSR needs more than the Machine default 256MB.
|
|
309
|
+
guest: { memoryMb: 512 },
|
|
310
|
+
isExternal: true,
|
|
311
|
+
env: props.env,
|
|
312
|
+
extraFiles: extraFiles as unknown as Array<{
|
|
313
|
+
source: string;
|
|
314
|
+
dest: string;
|
|
315
|
+
}>,
|
|
316
|
+
statics: statics as unknown as
|
|
317
|
+
| Array<{
|
|
318
|
+
guestPath: string;
|
|
319
|
+
urlPrefix: string;
|
|
320
|
+
tigrisBucket?: string;
|
|
321
|
+
indexDocument?: string;
|
|
322
|
+
}>
|
|
323
|
+
| undefined,
|
|
324
|
+
build:
|
|
325
|
+
config.install !== undefined && config.install.length > 0
|
|
326
|
+
? { install: config.install }
|
|
327
|
+
: undefined,
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
const certificate =
|
|
331
|
+
props.domain !== undefined
|
|
332
|
+
? yield* Certificate("Certificate", {
|
|
333
|
+
app,
|
|
334
|
+
hostname: props.domain,
|
|
335
|
+
kind: "acme",
|
|
336
|
+
})
|
|
337
|
+
: undefined;
|
|
338
|
+
|
|
339
|
+
const url = props.domain !== undefined ? `https://${props.domain}` : app.url;
|
|
340
|
+
|
|
341
|
+
return { url, app, service, ip, certificate };
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Shared implementation behind the Fly framework website composites:
|
|
346
|
+
* `Website.Server` runs the framework toolchain (dev sidecar / production
|
|
347
|
+
* build), then a live deploy hosts `serve-node.mjs` on a Fly.Service.
|
|
348
|
+
*
|
|
349
|
+
* Callers pipe `Namespace.push(id)` themselves (the composites do).
|
|
350
|
+
*
|
|
351
|
+
* Composite-level tagged errors (`FrameworkSiteError`, filesystem) are
|
|
352
|
+
* defects — `Alchemy.Stack` only admits `ConfigError` on the user
|
|
353
|
+
* effect, same as Cloudflare/AWS Website composites.
|
|
354
|
+
*/
|
|
355
|
+
export const makeFrameworkSite = (
|
|
356
|
+
id: string,
|
|
357
|
+
props: FrameworkSiteProps,
|
|
358
|
+
config: FrameworkSiteConfig,
|
|
359
|
+
) => runFrameworkSite(id, props, config).pipe(Effect.orDie);
|
|
360
|
+
|
|
361
|
+
/** Push {@link id} then run {@link makeFrameworkSite}. */
|
|
362
|
+
export const frameworkSite = (id: string, props: FrameworkSiteProps, config: FrameworkSiteConfig) =>
|
|
363
|
+
makeFrameworkSite(id, props, config).pipe(Namespace.push(id));
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { frameworkSite, type FrameworkSiteProps } from "./FrameworkSite.ts";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The Next.js-on-Node framework module (`next build` + a custom
|
|
5
|
+
* `next({ dev: false })` server). Not OpenNext.
|
|
6
|
+
*/
|
|
7
|
+
export const NEXTJS_NODE_FRAMEWORK_SPECIFIER = "@alchemy.run/frontend-frameworks/nextjs/node";
|
|
8
|
+
|
|
9
|
+
export interface NextjsProps extends FrameworkSiteProps {}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Deploy a Next.js application to Fly as a long-running Node process:
|
|
13
|
+
* `next build`, then a serve entry that `import("next")` +
|
|
14
|
+
* `next({ dev: false }).prepare()` + `getRequestHandler()`. The `.next`
|
|
15
|
+
* output (and `public/` when present) is baked into the image; `next` is
|
|
16
|
+
* installed unbundled.
|
|
17
|
+
*
|
|
18
|
+
* Do not use OpenNext AWS/CF wrappers — those are Lambda/workerd.
|
|
19
|
+
*
|
|
20
|
+
* During `alchemy dev` the site is `next dev` and no cloud resources are
|
|
21
|
+
* declared; `Alchemy.remote()` opts back into the live Service path.
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
* ### Creating Next.js Sites
|
|
25
|
+
* **Example:** Basic Next.js App
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const site = yield* Fly.Website.Nextjs("Web", {
|
|
28
|
+
* rootDir: "./app",
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* **Example:** Custom Domain
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const site = yield* Fly.Website.Nextjs("Web", {
|
|
35
|
+
* rootDir: "./app",
|
|
36
|
+
* domain: "app.example.com",
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @resource
|
|
41
|
+
* @product Website
|
|
42
|
+
*/
|
|
43
|
+
export const Nextjs = (id: string, props: NextjsProps = {}) =>
|
|
44
|
+
frameworkSite(id, props, {
|
|
45
|
+
name: "Next.js",
|
|
46
|
+
framework: NEXTJS_NODE_FRAMEWORK_SPECIFIER,
|
|
47
|
+
target: NEXTJS_NODE_FRAMEWORK_SPECIFIER,
|
|
48
|
+
install: ["next", "react", "react-dom"],
|
|
49
|
+
skipClientAssets: true,
|
|
50
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { frameworkSite, type FrameworkSiteProps } from "./FrameworkSite.ts";
|
|
2
|
+
|
|
3
|
+
/** The framework-integration package that drives the Nuxt build. */
|
|
4
|
+
export const NUXT_FRAMEWORK_SPECIFIER = "@alchemy.run/frontend-frameworks/nuxt";
|
|
5
|
+
|
|
6
|
+
/** The Node container deploy target for the Nuxt build. */
|
|
7
|
+
export const NUXT_NODE_TARGET_SPECIFIER = "@alchemy.run/frontend-frameworks/nuxt/node";
|
|
8
|
+
|
|
9
|
+
export interface NuxtProps extends FrameworkSiteProps {
|
|
10
|
+
/**
|
|
11
|
+
* Nuxt config overrides merged over the project's own `nuxt.config.ts`
|
|
12
|
+
* (highest-priority layer). `nitro.preset` is owned by the Node deploy
|
|
13
|
+
* target and may not be set here.
|
|
14
|
+
*/
|
|
15
|
+
nuxt?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Deploy a Nuxt application to Fly: the nitro Node server on a Machine,
|
|
20
|
+
* static assets (prerendered pages included) baked into the image.
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* ### Creating Nuxt Sites
|
|
24
|
+
* **Example:** Basic Nuxt App
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const site = yield* Fly.Website.Nuxt("Web", {
|
|
27
|
+
* rootDir: "./app",
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* **Example:** Custom Domain
|
|
32
|
+
* ```typescript
|
|
33
|
+
* const site = yield* Fly.Website.Nuxt("Web", {
|
|
34
|
+
* rootDir: "./app",
|
|
35
|
+
* domain: "app.example.com",
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @resource
|
|
40
|
+
* @product Website
|
|
41
|
+
*/
|
|
42
|
+
export const Nuxt = (id: string, props: NuxtProps = {}) =>
|
|
43
|
+
frameworkSite(id, props, {
|
|
44
|
+
name: "Nuxt",
|
|
45
|
+
framework: NUXT_FRAMEWORK_SPECIFIER,
|
|
46
|
+
target: NUXT_NODE_TARGET_SPECIFIER,
|
|
47
|
+
options: props.nuxt ? { nuxt: props.nuxt } : undefined,
|
|
48
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { frameworkSite, type FrameworkSiteProps } from "./FrameworkSite.ts";
|
|
2
|
+
|
|
3
|
+
/** The framework-integration package that drives the Octane build. */
|
|
4
|
+
export const OCTANE_FRAMEWORK_SPECIFIER = "@alchemy.run/frontend-frameworks/octane";
|
|
5
|
+
|
|
6
|
+
/** The Node container deploy target for the Octane build. */
|
|
7
|
+
export const OCTANE_NODE_TARGET_SPECIFIER = "@alchemy.run/frontend-frameworks/octane/node";
|
|
8
|
+
|
|
9
|
+
export interface OctaneProps extends FrameworkSiteProps {}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Deploy an [OctaneJS](https://octanejs.dev) application to Fly: Octane's
|
|
13
|
+
* SSR server on a Machine, static assets baked into the image.
|
|
14
|
+
*
|
|
15
|
+
* `Fly.Website.Octane` selects hosting and automatically wraps Octane's
|
|
16
|
+
* default native Node output. Keep compiler and route settings in
|
|
17
|
+
* `octane.config.ts` without an adapter. The legacy Node marker adapter
|
|
18
|
+
* remains optional for existing projects.
|
|
19
|
+
*
|
|
20
|
+
* ### Creating Octane Sites
|
|
21
|
+
* **Example:** Basic Octane App
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const site = yield* Fly.Website.Octane("Web", {
|
|
24
|
+
* rootDir: "./app",
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* **Example:** Custom Domain
|
|
29
|
+
* ```typescript
|
|
30
|
+
* const site = yield* Fly.Website.Octane("Web", {
|
|
31
|
+
* rootDir: "./app",
|
|
32
|
+
* domain: "app.example.com",
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @resource
|
|
37
|
+
* @product Website
|
|
38
|
+
*/
|
|
39
|
+
export const Octane = (id: string, props: OctaneProps = {}) =>
|
|
40
|
+
frameworkSite(id, props, {
|
|
41
|
+
name: "Octane",
|
|
42
|
+
framework: OCTANE_FRAMEWORK_SPECIFIER,
|
|
43
|
+
target: OCTANE_NODE_TARGET_SPECIFIER,
|
|
44
|
+
});
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { frameworkSite, type FrameworkSiteProps } from "./FrameworkSite.ts";
|
|
2
|
+
|
|
3
|
+
/** The framework-integration package that drives the React Router build. */
|
|
4
|
+
export const REACT_ROUTER_FRAMEWORK_SPECIFIER = "@alchemy.run/frontend-frameworks/react-router";
|
|
5
|
+
|
|
6
|
+
/** The Node container deploy target for the React Router build. */
|
|
7
|
+
export const REACT_ROUTER_NODE_TARGET_SPECIFIER =
|
|
8
|
+
"@alchemy.run/frontend-frameworks/react-router/node";
|
|
9
|
+
|
|
10
|
+
export interface ReactRouterProps extends FrameworkSiteProps {}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Deploy a [React Router](https://reactrouter.com) v7 app (framework mode)
|
|
14
|
+
* to Fly: the SSR server on a Machine, static assets baked into the image,
|
|
15
|
+
* served assets-first then the framework handler.
|
|
16
|
+
*
|
|
17
|
+
* The build runs through
|
|
18
|
+
* `@alchemy.run/frontend-frameworks/react-router` with the
|
|
19
|
+
* `@alchemy.run/frontend-frameworks/react-router/node` deploy target — both
|
|
20
|
+
* must be installed in your project, alongside `@react-router/dev`,
|
|
21
|
+
* `react-router`, and `vite`.
|
|
22
|
+
*
|
|
23
|
+
* Your `vite.config.ts` needs no adapter wiring. React Router's server
|
|
24
|
+
* build is a `ServerBuild` manifest rather than a request handler, so the
|
|
25
|
+
* integration wraps the manifest with `createRequestHandler` and packages
|
|
26
|
+
* the resulting fetch handler as a Node HTTP server on port 3000.
|
|
27
|
+
*
|
|
28
|
+
* React Server Components (React Router's `unstable` RSC plugin) and
|
|
29
|
+
* multi-environment builds are not supported yet — the build fails with an
|
|
30
|
+
* actionable error when more than one server entry is emitted.
|
|
31
|
+
*
|
|
32
|
+
*
|
|
33
|
+
* ### Creating React Router Sites
|
|
34
|
+
* **Example:** Basic React Router App
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const site = yield* Fly.Website.ReactRouter("Web", {
|
|
37
|
+
* rootDir: "./app",
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* **Example:** Custom Domain
|
|
42
|
+
* ```typescript
|
|
43
|
+
* const site = yield* Fly.Website.ReactRouter("Web", {
|
|
44
|
+
* rootDir: "./app",
|
|
45
|
+
* domain: "app.example.com",
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* ### Server Configuration
|
|
50
|
+
* **Example:** Process Environment
|
|
51
|
+
* ```typescript
|
|
52
|
+
* const site = yield* Fly.Website.ReactRouter("Web", {
|
|
53
|
+
* rootDir: "./app",
|
|
54
|
+
* env: {
|
|
55
|
+
* GREETING: "Hello from React Router on Fly!",
|
|
56
|
+
* },
|
|
57
|
+
* });
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* **Example:** Read An Environment Variable From A Loader
|
|
61
|
+
* ```typescript
|
|
62
|
+
* // app/routes/home.tsx
|
|
63
|
+
* export function loader() {
|
|
64
|
+
* return { greeting: process.env.GREETING ?? "Hello!" };
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @resource
|
|
69
|
+
* @product Website
|
|
70
|
+
*/
|
|
71
|
+
export const ReactRouter = (id: string, props: ReactRouterProps = {}) =>
|
|
72
|
+
frameworkSite(id, props, {
|
|
73
|
+
name: "ReactRouter",
|
|
74
|
+
framework: REACT_ROUTER_FRAMEWORK_SPECIFIER,
|
|
75
|
+
target: REACT_ROUTER_NODE_TARGET_SPECIFIER,
|
|
76
|
+
});
|