@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,90 @@
|
|
|
1
|
+
import { frameworkSite, type FrameworkSiteProps } from "./FrameworkSite.ts";
|
|
2
|
+
|
|
3
|
+
/** The framework-integration package that drives the SolidStart build. */
|
|
4
|
+
export const SOLIDSTART_FRAMEWORK_SPECIFIER = "@alchemy.run/frontend-frameworks/solidstart";
|
|
5
|
+
|
|
6
|
+
/** The Node container deploy target for the SolidStart build. */
|
|
7
|
+
export const SOLIDSTART_NODE_TARGET_SPECIFIER = "@alchemy.run/frontend-frameworks/solidstart/node";
|
|
8
|
+
|
|
9
|
+
export interface SolidStartProps extends FrameworkSiteProps {
|
|
10
|
+
/**
|
|
11
|
+
* Nitro options forwarded into the nitro plugin the integration appends
|
|
12
|
+
* (prerendering, route rules, storage, ...). `preset` is owned by the
|
|
13
|
+
* Node deploy target and may not be set here. JSON-serializable values
|
|
14
|
+
* only — no functions or plugin instances.
|
|
15
|
+
*
|
|
16
|
+
* This is a prop (rather than project config) because the integration
|
|
17
|
+
* owns the nitro plugin instance: a `nitroV2Plugin()` in your project's
|
|
18
|
+
* `vite.config.*` is rejected, so this prop is the one home for nitro
|
|
19
|
+
* options — and it accepts values derived from other resources' Outputs,
|
|
20
|
+
* which a config file cannot.
|
|
21
|
+
*/
|
|
22
|
+
nitro?: Record<string, unknown>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Deploy a [SolidStart](https://start.solidjs.com) application to Fly: the
|
|
27
|
+
* SSR server on a Machine, static assets (prerendered pages included)
|
|
28
|
+
* baked into the image, served assets-first then the framework handler.
|
|
29
|
+
*
|
|
30
|
+
* The build runs through `@alchemy.run/frontend-frameworks/solidstart` with
|
|
31
|
+
* the `@alchemy.run/frontend-frameworks/solidstart/node` deploy target —
|
|
32
|
+
* both must be installed in your project, alongside `@solidjs/start` and
|
|
33
|
+
* `@solidjs/vite-plugin-nitro-2`.
|
|
34
|
+
*
|
|
35
|
+
* Your `vite.config.ts` needs no adapter wiring: the integration drives the
|
|
36
|
+
* project's own `vite build` and appends its own nitro plugin instance
|
|
37
|
+
* carrying nitro's `node` preset.
|
|
38
|
+
*
|
|
39
|
+
*
|
|
40
|
+
* ### Creating SolidStart Sites
|
|
41
|
+
* **Example:** Basic SolidStart App
|
|
42
|
+
* ```typescript
|
|
43
|
+
* const site = yield* Fly.Website.SolidStart("Web", {
|
|
44
|
+
* rootDir: "./app",
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* **Example:** Custom Domain
|
|
49
|
+
* ```typescript
|
|
50
|
+
* const site = yield* Fly.Website.SolidStart("Web", {
|
|
51
|
+
* rootDir: "./app",
|
|
52
|
+
* domain: "app.example.com",
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* ### Server Configuration
|
|
57
|
+
* **Example:** Process Environment
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const site = yield* Fly.Website.SolidStart("Web", {
|
|
60
|
+
* rootDir: "./app",
|
|
61
|
+
* env: {
|
|
62
|
+
* GREETING: "Hello from SolidStart on Fly!",
|
|
63
|
+
* },
|
|
64
|
+
* });
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* ### Prerendering
|
|
68
|
+
* The integration owns the nitro plugin instance (a `nitroV2Plugin()` in
|
|
69
|
+
* your `vite.config.*` is rejected), so nitro options — prerendering
|
|
70
|
+
* included — go on the `nitro` prop. Prerendered pages are baked into the
|
|
71
|
+
* image and served as static files.
|
|
72
|
+
*
|
|
73
|
+
* **Example:** Prerender Routes
|
|
74
|
+
* ```typescript
|
|
75
|
+
* const site = yield* Fly.Website.SolidStart("Web", {
|
|
76
|
+
* rootDir: "./app",
|
|
77
|
+
* nitro: { prerender: { routes: ["/", "/about"] } },
|
|
78
|
+
* });
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* @resource
|
|
82
|
+
* @product Website
|
|
83
|
+
*/
|
|
84
|
+
export const SolidStart = (id: string, props: SolidStartProps = {}) =>
|
|
85
|
+
frameworkSite(id, props, {
|
|
86
|
+
name: "SolidStart",
|
|
87
|
+
framework: SOLIDSTART_FRAMEWORK_SPECIFIER,
|
|
88
|
+
target: SOLIDSTART_NODE_TARGET_SPECIFIER,
|
|
89
|
+
options: { nitro: props.nitro },
|
|
90
|
+
});
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { AlchemyContext } from "alchemy/AlchemyContext";
|
|
2
|
+
import * as Command from "alchemy/Command";
|
|
3
|
+
import type { MemoOptions } from "alchemy/Command/Memo";
|
|
4
|
+
import * as Namespace from "alchemy/Namespace";
|
|
5
|
+
import * as Output from "alchemy/Output";
|
|
6
|
+
import { ProviderModePolicy } from "alchemy/ProviderMode";
|
|
7
|
+
import { initialCwd } from "alchemy/Util/Node";
|
|
8
|
+
import { loadFrontendCore } from "alchemy/Website/FrontendCore";
|
|
9
|
+
import * as Effect from "effect/Effect";
|
|
10
|
+
import * as Path from "effect/Path";
|
|
11
|
+
import type * as Redacted from "effect/Redacted";
|
|
12
|
+
import { App } from "../App.ts";
|
|
13
|
+
import { Certificate } from "../Certificate.ts";
|
|
14
|
+
import { IpAssignment } from "../IpAssignment.ts";
|
|
15
|
+
import { Service, type ServiceProps } from "../Service.ts";
|
|
16
|
+
import {
|
|
17
|
+
type FrameworkSite,
|
|
18
|
+
type Ref,
|
|
19
|
+
type WebsiteAssetsProps,
|
|
20
|
+
staticConfigFromAssets,
|
|
21
|
+
} from "./FrameworkSite.ts";
|
|
22
|
+
|
|
23
|
+
const DEFAULT_PORT = 3000;
|
|
24
|
+
|
|
25
|
+
const resolveRef = <T>(ref: Ref<T>) => (Effect.isEffect(ref) ? ref : Effect.succeed(ref));
|
|
26
|
+
|
|
27
|
+
export interface StaticSiteProps {
|
|
28
|
+
/** Deployment strategy forwarded to the hosted Fly Service. */
|
|
29
|
+
deploy?: ServiceProps["deploy"];
|
|
30
|
+
/** Process shutdown policy for the generated server. */
|
|
31
|
+
shutdown?: ServiceProps["shutdown"];
|
|
32
|
+
/** Named Machine readiness checks. */
|
|
33
|
+
checks?: ServiceProps["checks"];
|
|
34
|
+
/** Override proxy services and their routing health checks. */
|
|
35
|
+
services?: ServiceProps["services"];
|
|
36
|
+
/**
|
|
37
|
+
* Path to the local site directory (working directory for
|
|
38
|
+
* {@link build.command}).
|
|
39
|
+
* @default "."
|
|
40
|
+
*/
|
|
41
|
+
path?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Build executed before deploy.
|
|
44
|
+
*/
|
|
45
|
+
build: {
|
|
46
|
+
/** Shell command that produces the site (e.g. `"hugo --minify"`). */
|
|
47
|
+
command: string;
|
|
48
|
+
/** Directory the command writes, relative to {@link path}. */
|
|
49
|
+
output: string;
|
|
50
|
+
/** Environment variables for the build command. */
|
|
51
|
+
env?: Record<string, string | Redacted.Redacted<string>>;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Controls which files are hashed to decide whether the build re-runs.
|
|
55
|
+
* @default true
|
|
56
|
+
*/
|
|
57
|
+
memo?: MemoOptions | boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Process environment for the hosted static server.
|
|
60
|
+
*/
|
|
61
|
+
env?: Record<string, string | Redacted.Redacted<string>>;
|
|
62
|
+
/**
|
|
63
|
+
* Miss handling for the generated file server.
|
|
64
|
+
*/
|
|
65
|
+
assets?: WebsiteAssetsProps;
|
|
66
|
+
/**
|
|
67
|
+
* Parent Fly App. When omitted, a `Fly.App` is created. The Service
|
|
68
|
+
* stays in the caller namespace; only `Build` / `Dev` are pushed.
|
|
69
|
+
*/
|
|
70
|
+
app?: Ref<App>;
|
|
71
|
+
/**
|
|
72
|
+
* Optional custom hostname. Requests ACME (`Fly.Certificate`) on the App.
|
|
73
|
+
*/
|
|
74
|
+
domain?: string;
|
|
75
|
+
/**
|
|
76
|
+
* User-defined tags. Accepted for API parity; Fly Services do not
|
|
77
|
+
* surface resource tags.
|
|
78
|
+
*/
|
|
79
|
+
tags?: Record<string, string>;
|
|
80
|
+
/**
|
|
81
|
+
* Local dev configuration. When `alchemy dev` runs with `dev.command`,
|
|
82
|
+
* the build is skipped and `command` is spawned as a long-lived child.
|
|
83
|
+
*/
|
|
84
|
+
dev?: {
|
|
85
|
+
/**
|
|
86
|
+
* Shell command to run as the local dev server (e.g. `npm run dev`).
|
|
87
|
+
*/
|
|
88
|
+
command: string;
|
|
89
|
+
/**
|
|
90
|
+
* Working directory for {@link command}. Defaults to {@link cwd}.
|
|
91
|
+
*/
|
|
92
|
+
cwd?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Environment variables for {@link command}.
|
|
95
|
+
*/
|
|
96
|
+
env?: Record<string, string | Redacted.Redacted<string>>;
|
|
97
|
+
/**
|
|
98
|
+
* Override for the `url` output if alchemy fails to detect it from
|
|
99
|
+
* stdout of the dev command.
|
|
100
|
+
*/
|
|
101
|
+
url?: string;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Deploy a static site built by a shell command to Fly.
|
|
107
|
+
*
|
|
108
|
+
* `StaticSite` runs a build command (e.g. `npm run build` / `hugo`),
|
|
109
|
+
* content-hashes the output directory, and deploys a Service that serves
|
|
110
|
+
* those files (plus `/health`). Use this when the site has its own build
|
|
111
|
+
* step — Hugo, Zola, Eleventy, or any custom pipeline.
|
|
112
|
+
*
|
|
113
|
+
* For Vite-based projects, prefer `Fly.Website.Vite`.
|
|
114
|
+
*
|
|
115
|
+
* `Build` / `Dev` use constant logical ids under `Namespace.push(id)`.
|
|
116
|
+
* The Service stays in the caller namespace (same as
|
|
117
|
+
* `Cloudflare.Website.StaticSite`).
|
|
118
|
+
*
|
|
119
|
+
*
|
|
120
|
+
* ### Basic Usage
|
|
121
|
+
* **Example:** Deploying a Hugo site
|
|
122
|
+
* ```typescript
|
|
123
|
+
* const site = yield* Fly.Website.StaticSite("Blog", {
|
|
124
|
+
* build: { command: "hugo --minify", output: "public" },
|
|
125
|
+
* });
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* **Example:** SPA-style routing
|
|
129
|
+
* ```typescript
|
|
130
|
+
* const site = yield* Fly.Website.StaticSite("App", {
|
|
131
|
+
* build: { command: "npm run build", output: "dist" },
|
|
132
|
+
* assets: { notFoundHandling: "single-page-application" },
|
|
133
|
+
* });
|
|
134
|
+
* ```
|
|
135
|
+
*
|
|
136
|
+
* ### Building from a Subdirectory
|
|
137
|
+
* **Example:** Building a frontend in a monorepo
|
|
138
|
+
* ```typescript
|
|
139
|
+
* const site = yield* Fly.Website.StaticSite("Web", {
|
|
140
|
+
* path: "apps/web",
|
|
141
|
+
* build: { command: "npm run build", output: "dist" },
|
|
142
|
+
* });
|
|
143
|
+
* ```
|
|
144
|
+
*
|
|
145
|
+
* ### Local Development
|
|
146
|
+
* **Example:** External dev command
|
|
147
|
+
* ```typescript
|
|
148
|
+
* const site = yield* Fly.Website.StaticSite("App", {
|
|
149
|
+
* build: { command: "npm run build", output: "dist" },
|
|
150
|
+
* dev: { command: "npm run dev" },
|
|
151
|
+
* });
|
|
152
|
+
* ```
|
|
153
|
+
*
|
|
154
|
+
* @resource
|
|
155
|
+
* @product Website
|
|
156
|
+
*/
|
|
157
|
+
export const StaticSite = (id: string, props: StaticSiteProps) =>
|
|
158
|
+
Effect.gen(function* () {
|
|
159
|
+
const ctx = yield* AlchemyContext;
|
|
160
|
+
const remoted = yield* ProviderModePolicy;
|
|
161
|
+
const isLocal = ctx.dev && remoted !== true;
|
|
162
|
+
const path = yield* Path.Path;
|
|
163
|
+
|
|
164
|
+
const empty = (): FrameworkSite => ({
|
|
165
|
+
url: undefined,
|
|
166
|
+
app: undefined,
|
|
167
|
+
service: undefined,
|
|
168
|
+
ip: undefined,
|
|
169
|
+
certificate: undefined,
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
if (isLocal && props.dev) {
|
|
173
|
+
const dev = yield* Command.Dev("Dev", {
|
|
174
|
+
command: props.dev.command,
|
|
175
|
+
cwd: props.dev.cwd ?? props.path,
|
|
176
|
+
env: props.dev.env ?? props.env,
|
|
177
|
+
}).pipe(Namespace.push(id));
|
|
178
|
+
const url = Output.map(dev.url, (value) => value ?? props.dev?.url);
|
|
179
|
+
return { ...empty(), url };
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const build = yield* Command.Build("Build", {
|
|
183
|
+
command: props.build.command,
|
|
184
|
+
cwd: props.path,
|
|
185
|
+
memo: props.memo,
|
|
186
|
+
outdir: props.build.output,
|
|
187
|
+
env: props.build.env ?? props.env,
|
|
188
|
+
}).pipe(Namespace.push(id));
|
|
189
|
+
|
|
190
|
+
const cwd = path.resolve(initialCwd, props.path ?? ".");
|
|
191
|
+
const outdir = path.resolve(cwd, props.build.output);
|
|
192
|
+
const internal = staticConfigFromAssets(props.assets);
|
|
193
|
+
const notFoundHandling =
|
|
194
|
+
internal.errorPage !== undefined
|
|
195
|
+
? ("404-page" as const)
|
|
196
|
+
: internal.spa === true
|
|
197
|
+
? ("spa" as const)
|
|
198
|
+
: ("none" as const);
|
|
199
|
+
|
|
200
|
+
const { NODE_SERVE_ENTRY_FILE_NAME, relativeClientDirExpression, writeNodeServeEntry } =
|
|
201
|
+
yield* loadFrontendCore;
|
|
202
|
+
const servePath = path.join(path.dirname(outdir), NODE_SERVE_ENTRY_FILE_NAME);
|
|
203
|
+
const serveOutput = {
|
|
204
|
+
clientDirectory: outdir,
|
|
205
|
+
serverModules: [],
|
|
206
|
+
externalWorkspaces: new Set<string>(),
|
|
207
|
+
};
|
|
208
|
+
yield* writeNodeServeEntry({
|
|
209
|
+
output: serveOutput,
|
|
210
|
+
servePath,
|
|
211
|
+
serveModuleName: NODE_SERVE_ENTRY_FILE_NAME,
|
|
212
|
+
clientDirExpression: relativeClientDirExpression(servePath, outdir),
|
|
213
|
+
notFoundHandling,
|
|
214
|
+
printUrl: isLocal,
|
|
215
|
+
platform: "node",
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
if (isLocal) {
|
|
219
|
+
const runtime = yield* Effect.sync(() => process.execPath);
|
|
220
|
+
const dev = yield* Command.Dev("Dev", {
|
|
221
|
+
command: `${runtime} ${servePath}`,
|
|
222
|
+
cwd: path.dirname(servePath),
|
|
223
|
+
env: {
|
|
224
|
+
...props.env,
|
|
225
|
+
PORT: "0",
|
|
226
|
+
HOST: "127.0.0.1",
|
|
227
|
+
ALCHEMY_BUILD_HASH: build.hash.output as unknown as string,
|
|
228
|
+
},
|
|
229
|
+
}).pipe(Namespace.push(id));
|
|
230
|
+
return { ...empty(), url: Output.map(dev.url, (value) => value) };
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const main = servePath;
|
|
234
|
+
|
|
235
|
+
const app =
|
|
236
|
+
props.app !== undefined
|
|
237
|
+
? yield* resolveRef(props.app)
|
|
238
|
+
: yield* App("App").pipe(Namespace.push(id));
|
|
239
|
+
|
|
240
|
+
const ip = yield* IpAssignment("Shared", { app, type: "shared_v4" }).pipe(Namespace.push(id));
|
|
241
|
+
|
|
242
|
+
// Serve the built tree from the Machine. Fly Tigris `statics` on
|
|
243
|
+
// `urlPrefix: "/"` do not rewrite HTML routes and hang GET `/`.
|
|
244
|
+
// Hashed `/assets` still go to Tigris on FrameworkSite.
|
|
245
|
+
const service = yield* Service(id, {
|
|
246
|
+
app,
|
|
247
|
+
deploy: props.deploy,
|
|
248
|
+
shutdown: props.shutdown,
|
|
249
|
+
checks: props.checks,
|
|
250
|
+
services: props.services,
|
|
251
|
+
main,
|
|
252
|
+
port: DEFAULT_PORT,
|
|
253
|
+
// Generated static-file server is a complete bun/node program.
|
|
254
|
+
isExternal: true,
|
|
255
|
+
env: props.env,
|
|
256
|
+
extraFiles: [
|
|
257
|
+
{
|
|
258
|
+
// Keep the build dependency so planning cannot hash the previous artifact.
|
|
259
|
+
source: Output.map(build.outdir, (dir) => path.resolve(initialCwd, dir)),
|
|
260
|
+
dest: path.basename(outdir),
|
|
261
|
+
},
|
|
262
|
+
],
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
const certificate =
|
|
266
|
+
props.domain !== undefined
|
|
267
|
+
? yield* Certificate("Certificate", { app, hostname: props.domain, kind: "acme" }).pipe(
|
|
268
|
+
Namespace.push(id),
|
|
269
|
+
)
|
|
270
|
+
: undefined;
|
|
271
|
+
|
|
272
|
+
const url = props.domain !== undefined ? `https://${props.domain}` : app.url;
|
|
273
|
+
|
|
274
|
+
return { url, app, service, ip, certificate };
|
|
275
|
+
}).pipe(Effect.orDie);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { frameworkSite, type FrameworkSiteProps } from "./FrameworkSite.ts";
|
|
2
|
+
|
|
3
|
+
/** The framework-integration package that drives the SvelteKit build. */
|
|
4
|
+
export const SVELTEKIT_FRAMEWORK_SPECIFIER = "@alchemy.run/frontend-frameworks/sveltekit";
|
|
5
|
+
|
|
6
|
+
/** The Node container deploy target for the SvelteKit build. */
|
|
7
|
+
export const SVELTEKIT_NODE_TARGET_SPECIFIER = "@alchemy.run/frontend-frameworks/sveltekit/node";
|
|
8
|
+
|
|
9
|
+
export interface SvelteKitProps extends FrameworkSiteProps {
|
|
10
|
+
/**
|
|
11
|
+
* SvelteKit configuration passed to the `sveltekit(config)` Vite plugin.
|
|
12
|
+
* The `adapter` field is injected by the Node deploy target and may not
|
|
13
|
+
* be set here. Must be JSON-serializable.
|
|
14
|
+
*/
|
|
15
|
+
kit?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Deploy a SvelteKit application to Fly: kit's SSR server on a Machine,
|
|
20
|
+
* static assets baked into the image, served assets-first then the
|
|
21
|
+
* framework handler.
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
* ### Creating SvelteKit Sites
|
|
25
|
+
* **Example:** Basic SvelteKit App
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const site = yield* Fly.Website.SvelteKit("Web", {
|
|
28
|
+
* rootDir: "./app",
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* **Example:** Custom Domain
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const site = yield* Fly.Website.SvelteKit("Web", {
|
|
35
|
+
* rootDir: "./app",
|
|
36
|
+
* domain: "app.example.com",
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @resource
|
|
41
|
+
* @product Website
|
|
42
|
+
*/
|
|
43
|
+
export const SvelteKit = (id: string, props: SvelteKitProps = {}) =>
|
|
44
|
+
frameworkSite(id, props, {
|
|
45
|
+
name: "SvelteKit",
|
|
46
|
+
framework: SVELTEKIT_FRAMEWORK_SPECIFIER,
|
|
47
|
+
target: SVELTEKIT_NODE_TARGET_SPECIFIER,
|
|
48
|
+
options: props.kit ? { kit: props.kit } : undefined,
|
|
49
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { frameworkSite, type FrameworkSiteProps } from "./FrameworkSite.ts";
|
|
2
|
+
|
|
3
|
+
/** The framework-integration package that drives the TanStack Start build. */
|
|
4
|
+
export const TANSTACK_START_FRAMEWORK_SPECIFIER = "@alchemy.run/frontend-frameworks/tanstack-start";
|
|
5
|
+
|
|
6
|
+
/** The Node container deploy target for the TanStack Start build. */
|
|
7
|
+
export const TANSTACK_START_NODE_TARGET_SPECIFIER =
|
|
8
|
+
"@alchemy.run/frontend-frameworks/tanstack-start/node";
|
|
9
|
+
|
|
10
|
+
export interface TanStackStartProps extends FrameworkSiteProps {}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Deploy a [TanStack Start](https://tanstack.com/start) application to Fly:
|
|
14
|
+
* the SSR server on a Machine, client assets baked into the image, served
|
|
15
|
+
* assets-first then the framework handler.
|
|
16
|
+
*
|
|
17
|
+
* The build runs through
|
|
18
|
+
* `@alchemy.run/frontend-frameworks/tanstack-start` with the
|
|
19
|
+
* `@alchemy.run/frontend-frameworks/tanstack-start/node` deploy target —
|
|
20
|
+
* both must be installed in your project, alongside
|
|
21
|
+
* `@tanstack/react-start` (or `@tanstack/solid-start`) and `vite`.
|
|
22
|
+
*
|
|
23
|
+
* Your `vite.config.ts` needs no adapter wiring: TanStack Start is pure
|
|
24
|
+
* Vite, so the integration drives the project's own `vite build`, forces
|
|
25
|
+
* the SSR bundle to be self-contained, and wraps its fetch handler as a
|
|
26
|
+
* Node HTTP server on port 3000.
|
|
27
|
+
*
|
|
28
|
+
*
|
|
29
|
+
* ### Creating TanStack Start Sites
|
|
30
|
+
* **Example:** Basic TanStack Start App
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const site = yield* Fly.Website.TanStackStart("Web", {
|
|
33
|
+
* rootDir: "./app",
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* **Example:** Custom Domain
|
|
38
|
+
* ```typescript
|
|
39
|
+
* const site = yield* Fly.Website.TanStackStart("Web", {
|
|
40
|
+
* rootDir: "./app",
|
|
41
|
+
* domain: "app.example.com",
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* ### Server Configuration
|
|
46
|
+
* **Example:** Process Environment
|
|
47
|
+
* ```typescript
|
|
48
|
+
* const site = yield* Fly.Website.TanStackStart("Web", {
|
|
49
|
+
* rootDir: "./app",
|
|
50
|
+
* env: {
|
|
51
|
+
* GREETING: "Hello from TanStack Start on Fly!",
|
|
52
|
+
* },
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* **Example:** Read An Environment Variable From A Server Function
|
|
57
|
+
* ```typescript
|
|
58
|
+
* // src/routes/index.tsx
|
|
59
|
+
* const getGreeting = createServerFn({ method: "GET" }).handler(
|
|
60
|
+
* () => process.env.GREETING ?? "Hello!",
|
|
61
|
+
* );
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @resource
|
|
65
|
+
* @product Website
|
|
66
|
+
*/
|
|
67
|
+
export const TanStackStart = (id: string, props: TanStackStartProps = {}) =>
|
|
68
|
+
frameworkSite(id, props, {
|
|
69
|
+
name: "TanStackStart",
|
|
70
|
+
framework: TANSTACK_START_FRAMEWORK_SPECIFIER,
|
|
71
|
+
target: TANSTACK_START_NODE_TARGET_SPECIFIER,
|
|
72
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as Namespace from "alchemy/Namespace";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import type { Redis } from "../Redis.ts";
|
|
4
|
+
import { makeFrameworkSite, type FrameworkSiteProps } from "./FrameworkSite.ts";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The vinext-on-Node framework module (vinext's Vite build +
|
|
8
|
+
* `startProdServer`). Not the Cloudflare Worker source.
|
|
9
|
+
*/
|
|
10
|
+
export const VINEXT_NODE_FRAMEWORK_SPECIFIER = "@alchemy.run/frontend-frameworks/vinext/node";
|
|
11
|
+
|
|
12
|
+
export interface VinextProps extends FrameworkSiteProps {
|
|
13
|
+
/**
|
|
14
|
+
* Optional Upstash Redis for ISR / `"use cache"`. Bound onto the
|
|
15
|
+
* hosted Service so Alchemy writes `REDIS_URL` as an App secret.
|
|
16
|
+
* The resource injects the Redis data-cache adapter automatically.
|
|
17
|
+
*/
|
|
18
|
+
redis?: Redis;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Deploy a [vinext](https://vinext.dev) application to Fly as a
|
|
23
|
+
* long-running Node process: vinext's Vite build, then vinext's production
|
|
24
|
+
* server (`startProdServer`). The `dist/` output is baked into the
|
|
25
|
+
* image; `vinext` is installed unbundled.
|
|
26
|
+
*
|
|
27
|
+
* Do not use the Cloudflare Worker entry (`vinext/server/fetch-handler`)
|
|
28
|
+
* — that is workerd.
|
|
29
|
+
*
|
|
30
|
+
* ISR / `"use cache"` persist in Redis when you pass {@link VinextProps.redis}.
|
|
31
|
+
* The resource injects the adapter automatically. Missing `REDIS_URL`
|
|
32
|
+
* (local `vinext start` / `alchemy dev`) falls back to memory.
|
|
33
|
+
*
|
|
34
|
+
* During `alchemy dev` the site is `vinext dev` and no cloud resources
|
|
35
|
+
* are declared; `Alchemy.remote()` opts back into the live Service path.
|
|
36
|
+
*
|
|
37
|
+
* ### Creating vinext Sites
|
|
38
|
+
* **Example:** Basic vinext App
|
|
39
|
+
* ```typescript
|
|
40
|
+
* const site = yield* Fly.Website.Vinext("Web", {
|
|
41
|
+
* rootDir: "./app",
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* **Example:** Redis data cache
|
|
46
|
+
* ```typescript
|
|
47
|
+
* const redis = yield* Fly.Redis("Cache", { eviction: true });
|
|
48
|
+
* const site = yield* Fly.Website.Vinext("Web", {
|
|
49
|
+
* redis,
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* **Example:** Custom Domain
|
|
54
|
+
* ```typescript
|
|
55
|
+
* const site = yield* Fly.Website.Vinext("Web", {
|
|
56
|
+
* rootDir: "./app",
|
|
57
|
+
* domain: "app.example.com",
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @resource
|
|
62
|
+
* @product Website
|
|
63
|
+
*/
|
|
64
|
+
export const Vinext = (id: string, propsIn: VinextProps = {}) =>
|
|
65
|
+
Effect.gen(function* () {
|
|
66
|
+
const { redis, ...props } = propsIn;
|
|
67
|
+
const site = yield* makeFrameworkSite(id, props, {
|
|
68
|
+
name: "Vinext",
|
|
69
|
+
framework: VINEXT_NODE_FRAMEWORK_SPECIFIER,
|
|
70
|
+
target: VINEXT_NODE_FRAMEWORK_SPECIFIER,
|
|
71
|
+
install: ["vinext", "react", "react-dom", "react-server-dom-webpack"],
|
|
72
|
+
});
|
|
73
|
+
if (redis !== undefined && site.service !== undefined) {
|
|
74
|
+
yield* site.service.bind`${redis}`({
|
|
75
|
+
redis: { name: redis.name, id: redis.redisId },
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return site;
|
|
79
|
+
}).pipe(Namespace.push(id));
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { frameworkSite, staticConfigFromAssets, type FrameworkSiteProps } from "./FrameworkSite.ts";
|
|
2
|
+
|
|
3
|
+
/** The framework-integration package that drives the Vite build. */
|
|
4
|
+
export const VITE_FRAMEWORK_SPECIFIER = "@alchemy.run/frontend-frameworks/vite";
|
|
5
|
+
|
|
6
|
+
/** The Node container deploy target for the Vite build. */
|
|
7
|
+
export const VITE_NODE_TARGET_SPECIFIER = "@alchemy.run/frontend-frameworks/vite/node";
|
|
8
|
+
|
|
9
|
+
const viteOptions = (props: ViteProps) =>
|
|
10
|
+
props.vite !== undefined && (props.vite.outDir !== undefined || props.vite.base !== undefined)
|
|
11
|
+
? { vite: props.vite }
|
|
12
|
+
: undefined;
|
|
13
|
+
|
|
14
|
+
export interface ViteProps extends FrameworkSiteProps {
|
|
15
|
+
/**
|
|
16
|
+
* Serializable Vite config merged OVER the project's own `vite.config.*`
|
|
17
|
+
* (which loads natively, plugins included).
|
|
18
|
+
*/
|
|
19
|
+
vite?: {
|
|
20
|
+
/**
|
|
21
|
+
* Build output directory, relative to `rootDir`.
|
|
22
|
+
* @default the project config's `build.outDir` (vite's default: "dist")
|
|
23
|
+
*/
|
|
24
|
+
outDir?: string;
|
|
25
|
+
/** Public base path the site deploys under (vite's `base`). */
|
|
26
|
+
base?: string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Deploy a plain [Vite](https://vite.dev) application to Fly: a Service
|
|
32
|
+
* serving the `vite build` output from a tiny static-file server. For
|
|
33
|
+
* client-only projects — React/Vue/Solid SPAs, `index.html` multi-page
|
|
34
|
+
* apps — whose entire deployable output is static assets.
|
|
35
|
+
*
|
|
36
|
+
* The build runs through `@alchemy.run/frontend-frameworks/vite` with the
|
|
37
|
+
* `@alchemy.run/frontend-frameworks/vite/node` deploy target — the package
|
|
38
|
+
* must be installed in your project. Your project's own `vite.config.*`
|
|
39
|
+
* (plugins included) drives the build.
|
|
40
|
+
*
|
|
41
|
+
* During `alchemy dev` the site is Vite's own dev server (native HMR) and
|
|
42
|
+
* no cloud resources are created — the site's `url` is the dev server's
|
|
43
|
+
* local address. `Alchemy.remote()` opts back into the full deployment.
|
|
44
|
+
*
|
|
45
|
+
*
|
|
46
|
+
* ### Creating Vite Sites
|
|
47
|
+
* **Example:** Basic Vite SPA
|
|
48
|
+
* ```typescript
|
|
49
|
+
* const site = yield* Fly.Website.Vite("Web");
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* **Example:** Project in a Subdirectory
|
|
53
|
+
* ```typescript
|
|
54
|
+
* const site = yield* Fly.Website.Vite("Web", {
|
|
55
|
+
* rootDir: "./app",
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* **Example:** Existing App
|
|
60
|
+
* ```typescript
|
|
61
|
+
* const site = yield* Fly.Website.Vite("Web", { app: Site });
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* ### Multi-Page Sites
|
|
65
|
+
* **Example:** Per-Route HTML Pages with a 404 Page
|
|
66
|
+
* ```typescript
|
|
67
|
+
* const site = yield* Fly.Website.Vite("Docs", {
|
|
68
|
+
* assets: { notFoundHandling: "404-page" },
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* ### Custom Domain
|
|
73
|
+
* **Example:** ACME on an existing hostname
|
|
74
|
+
* ```typescript
|
|
75
|
+
* const site = yield* Fly.Website.Vite("Web", {
|
|
76
|
+
* domain: "app.example.com",
|
|
77
|
+
* });
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* ### Build Configuration
|
|
81
|
+
* **Example:** Custom Output Directory and Base Path
|
|
82
|
+
* ```typescript
|
|
83
|
+
* const site = yield* Fly.Website.Vite("Docs", {
|
|
84
|
+
* vite: { outDir: "build", base: "/docs/" },
|
|
85
|
+
* });
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* ### Local Development
|
|
89
|
+
* **Example:** Vite Dev Server Under `alchemy dev`
|
|
90
|
+
* ```typescript
|
|
91
|
+
* // `alchemy dev` starts `vite` programmatically: site.url is the local
|
|
92
|
+
* // dev server (HMR included); no Fly App or Service is created.
|
|
93
|
+
* const site = yield* Fly.Website.Vite("Web");
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* @resource
|
|
97
|
+
* @product Website
|
|
98
|
+
*/
|
|
99
|
+
export const Vite = (id: string, props: ViteProps = {}) =>
|
|
100
|
+
frameworkSite(id, props, {
|
|
101
|
+
name: "Vite",
|
|
102
|
+
framework: VITE_FRAMEWORK_SPECIFIER,
|
|
103
|
+
target: VITE_NODE_TARGET_SPECIFIER,
|
|
104
|
+
options: {
|
|
105
|
+
...viteOptions(props),
|
|
106
|
+
notFoundHandling: "spa",
|
|
107
|
+
htmlHandling: props.assets?.htmlHandling,
|
|
108
|
+
},
|
|
109
|
+
static: staticConfigFromAssets(props.assets, {
|
|
110
|
+
notFoundHandling: "single-page-application",
|
|
111
|
+
}),
|
|
112
|
+
});
|