betterstack-alchemy 0.0.0-stage → 0.1.0-beta.0
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 +21 -0
- package/LICENSES/Apache-2.0.txt +201 -0
- package/NOTICE +182 -0
- package/README.md +165 -2
- package/lib/Account/Reference.d.ts +89 -0
- package/lib/Account/Reference.d.ts.map +1 -0
- package/lib/Account/Reference.js +90 -0
- package/lib/Account/Reference.js.map +1 -0
- package/lib/Account/Team.d.ts +69 -0
- package/lib/Account/Team.d.ts.map +1 -0
- package/lib/Account/Team.js +74 -0
- package/lib/Account/Team.js.map +1 -0
- package/lib/Account/TeamMember.d.ts +78 -0
- package/lib/Account/TeamMember.d.ts.map +1 -0
- package/lib/Account/TeamMember.js +159 -0
- package/lib/Account/TeamMember.js.map +1 -0
- package/lib/Account/index.d.ts +25 -0
- package/lib/Account/index.d.ts.map +1 -0
- package/lib/Account/index.js +25 -0
- package/lib/Account/index.js.map +1 -0
- package/lib/AuthProvider.d.ts +38 -0
- package/lib/AuthProvider.d.ts.map +1 -0
- package/lib/AuthProvider.js +134 -0
- package/lib/AuthProvider.js.map +1 -0
- package/lib/BetterStackBindings.d.ts +227 -0
- package/lib/BetterStackBindings.d.ts.map +1 -0
- package/lib/BetterStackBindings.js +223 -0
- package/lib/BetterStackBindings.js.map +1 -0
- package/lib/Cloud/Bootstrap.d.ts +20 -0
- package/lib/Cloud/Bootstrap.d.ts.map +1 -0
- package/lib/Cloud/Bootstrap.js +85 -0
- package/lib/Cloud/Bootstrap.js.map +1 -0
- package/lib/Cloud/Certificate.d.ts +97 -0
- package/lib/Cloud/Certificate.d.ts.map +1 -0
- package/lib/Cloud/Certificate.js +96 -0
- package/lib/Cloud/Certificate.js.map +1 -0
- package/lib/Cloud/ClickHouse.d.ts +184 -0
- package/lib/Cloud/ClickHouse.d.ts.map +1 -0
- package/lib/Cloud/ClickHouse.js +179 -0
- package/lib/Cloud/ClickHouse.js.map +1 -0
- package/lib/Cloud/ClickHouseScheduledSnapshot.d.ts +77 -0
- package/lib/Cloud/ClickHouseScheduledSnapshot.d.ts.map +1 -0
- package/lib/Cloud/ClickHouseScheduledSnapshot.js +76 -0
- package/lib/Cloud/ClickHouseScheduledSnapshot.js.map +1 -0
- package/lib/Cloud/ClickHouseSnapshot.d.ts +107 -0
- package/lib/Cloud/ClickHouseSnapshot.d.ts.map +1 -0
- package/lib/Cloud/ClickHouseSnapshot.js +78 -0
- package/lib/Cloud/ClickHouseSnapshot.js.map +1 -0
- package/lib/Cloud/Firewall.d.ts +134 -0
- package/lib/Cloud/Firewall.d.ts.map +1 -0
- package/lib/Cloud/Firewall.js +169 -0
- package/lib/Cloud/Firewall.js.map +1 -0
- package/lib/Cloud/FirewallRule.d.ts +114 -0
- package/lib/Cloud/FirewallRule.d.ts.map +1 -0
- package/lib/Cloud/FirewallRule.js +130 -0
- package/lib/Cloud/FirewallRule.js.map +1 -0
- package/lib/Cloud/InferEnv.d.ts +28 -0
- package/lib/Cloud/InferEnv.d.ts.map +1 -0
- package/lib/Cloud/InferEnv.js +1 -0
- package/lib/Cloud/InferEnv.js.map +1 -0
- package/lib/Cloud/Kafka.d.ts +204 -0
- package/lib/Cloud/Kafka.d.ts.map +1 -0
- package/lib/Cloud/Kafka.js +194 -0
- package/lib/Cloud/Kafka.js.map +1 -0
- package/lib/Cloud/KafkaTopic.d.ts +90 -0
- package/lib/Cloud/KafkaTopic.d.ts.map +1 -0
- package/lib/Cloud/KafkaTopic.js +83 -0
- package/lib/Cloud/KafkaTopic.js.map +1 -0
- package/lib/Cloud/KafkaUser.d.ts +121 -0
- package/lib/Cloud/KafkaUser.d.ts.map +1 -0
- package/lib/Cloud/KafkaUser.js +103 -0
- package/lib/Cloud/KafkaUser.js.map +1 -0
- package/lib/Cloud/KubernetesCluster.d.ts +204 -0
- package/lib/Cloud/KubernetesCluster.d.ts.map +1 -0
- package/lib/Cloud/KubernetesCluster.js +190 -0
- package/lib/Cloud/KubernetesCluster.js.map +1 -0
- package/lib/Cloud/KubernetesNodePool.d.ts +100 -0
- package/lib/Cloud/KubernetesNodePool.d.ts.map +1 -0
- package/lib/Cloud/KubernetesNodePool.js +133 -0
- package/lib/Cloud/KubernetesNodePool.js.map +1 -0
- package/lib/Cloud/KubernetesScheduledSnapshot.d.ts +73 -0
- package/lib/Cloud/KubernetesScheduledSnapshot.d.ts.map +1 -0
- package/lib/Cloud/KubernetesScheduledSnapshot.js +78 -0
- package/lib/Cloud/KubernetesScheduledSnapshot.js.map +1 -0
- package/lib/Cloud/LoadBalancer.d.ts +187 -0
- package/lib/Cloud/LoadBalancer.d.ts.map +1 -0
- package/lib/Cloud/LoadBalancer.js +228 -0
- package/lib/Cloud/LoadBalancer.js.map +1 -0
- package/lib/Cloud/LoadBalancerService.d.ts +116 -0
- package/lib/Cloud/LoadBalancerService.d.ts.map +1 -0
- package/lib/Cloud/LoadBalancerService.js +132 -0
- package/lib/Cloud/LoadBalancerService.js.map +1 -0
- package/lib/Cloud/LoadBalancerTarget.d.ts +110 -0
- package/lib/Cloud/LoadBalancerTarget.d.ts.map +1 -0
- package/lib/Cloud/LoadBalancerTarget.js +138 -0
- package/lib/Cloud/LoadBalancerTarget.js.map +1 -0
- package/lib/Cloud/MountVolume.d.ts +109 -0
- package/lib/Cloud/MountVolume.d.ts.map +1 -0
- package/lib/Cloud/MountVolume.js +59 -0
- package/lib/Cloud/MountVolume.js.map +1 -0
- package/lib/Cloud/MySQL.d.ts +285 -0
- package/lib/Cloud/MySQL.d.ts.map +1 -0
- package/lib/Cloud/MySQL.js +225 -0
- package/lib/Cloud/MySQL.js.map +1 -0
- package/lib/Cloud/MySQLScheduledSnapshot.d.ts +74 -0
- package/lib/Cloud/MySQLScheduledSnapshot.d.ts.map +1 -0
- package/lib/Cloud/MySQLScheduledSnapshot.js +73 -0
- package/lib/Cloud/MySQLScheduledSnapshot.js.map +1 -0
- package/lib/Cloud/MySQLSnapshot.d.ts +107 -0
- package/lib/Cloud/MySQLSnapshot.d.ts.map +1 -0
- package/lib/Cloud/MySQLSnapshot.js +78 -0
- package/lib/Cloud/MySQLSnapshot.js.map +1 -0
- package/lib/Cloud/Network.d.ts +69 -0
- package/lib/Cloud/Network.d.ts.map +1 -0
- package/lib/Cloud/Network.js +80 -0
- package/lib/Cloud/Network.js.map +1 -0
- package/lib/Cloud/ObjectCache.d.ts +226 -0
- package/lib/Cloud/ObjectCache.d.ts.map +1 -0
- package/lib/Cloud/ObjectCache.js +258 -0
- package/lib/Cloud/ObjectCache.js.map +1 -0
- package/lib/Cloud/ObjectCacheBucket.d.ts +112 -0
- package/lib/Cloud/ObjectCacheBucket.d.ts.map +1 -0
- package/lib/Cloud/ObjectCacheBucket.js +123 -0
- package/lib/Cloud/ObjectCacheBucket.js.map +1 -0
- package/lib/Cloud/Otlp.d.ts +93 -0
- package/lib/Cloud/Otlp.d.ts.map +1 -0
- package/lib/Cloud/Otlp.js +79 -0
- package/lib/Cloud/Otlp.js.map +1 -0
- package/lib/Cloud/PlacementGroup.d.ts +85 -0
- package/lib/Cloud/PlacementGroup.d.ts.map +1 -0
- package/lib/Cloud/PlacementGroup.js +86 -0
- package/lib/Cloud/PlacementGroup.js.map +1 -0
- package/lib/Cloud/Postgres.d.ts +331 -0
- package/lib/Cloud/Postgres.d.ts.map +1 -0
- package/lib/Cloud/Postgres.js +255 -0
- package/lib/Cloud/Postgres.js.map +1 -0
- package/lib/Cloud/PostgresDatabase.d.ts +77 -0
- package/lib/Cloud/PostgresDatabase.d.ts.map +1 -0
- package/lib/Cloud/PostgresDatabase.js +79 -0
- package/lib/Cloud/PostgresDatabase.js.map +1 -0
- package/lib/Cloud/PostgresScheduledSnapshot.d.ts +74 -0
- package/lib/Cloud/PostgresScheduledSnapshot.d.ts.map +1 -0
- package/lib/Cloud/PostgresScheduledSnapshot.js +73 -0
- package/lib/Cloud/PostgresScheduledSnapshot.js.map +1 -0
- package/lib/Cloud/PostgresSnapshot.d.ts +107 -0
- package/lib/Cloud/PostgresSnapshot.d.ts.map +1 -0
- package/lib/Cloud/PostgresSnapshot.js +78 -0
- package/lib/Cloud/PostgresSnapshot.js.map +1 -0
- package/lib/Cloud/PostgresUser.d.ts +118 -0
- package/lib/Cloud/PostgresUser.d.ts.map +1 -0
- package/lib/Cloud/PostgresUser.js +102 -0
- package/lib/Cloud/PostgresUser.js.map +1 -0
- package/lib/Cloud/Reference.d.ts +508 -0
- package/lib/Cloud/Reference.d.ts.map +1 -0
- package/lib/Cloud/Reference.js +542 -0
- package/lib/Cloud/Reference.js.map +1 -0
- package/lib/Cloud/ReservedIp.d.ts +113 -0
- package/lib/Cloud/ReservedIp.d.ts.map +1 -0
- package/lib/Cloud/ReservedIp.js +146 -0
- package/lib/Cloud/ReservedIp.js.map +1 -0
- package/lib/Cloud/ScheduledSnapshot.d.ts +49 -0
- package/lib/Cloud/ScheduledSnapshot.d.ts.map +1 -0
- package/lib/Cloud/ScheduledSnapshot.js +43 -0
- package/lib/Cloud/ScheduledSnapshot.js.map +1 -0
- package/lib/Cloud/ScheduledVolumeSnapshot.d.ts +48 -0
- package/lib/Cloud/ScheduledVolumeSnapshot.d.ts.map +1 -0
- package/lib/Cloud/ScheduledVolumeSnapshot.js +42 -0
- package/lib/Cloud/ScheduledVolumeSnapshot.js.map +1 -0
- package/lib/Cloud/Server.d.ts +375 -0
- package/lib/Cloud/Server.d.ts.map +1 -0
- package/lib/Cloud/Server.js +966 -0
- package/lib/Cloud/Server.js.map +1 -0
- package/lib/Cloud/ServerPool.d.ts +64 -0
- package/lib/Cloud/ServerPool.d.ts.map +1 -0
- package/lib/Cloud/ServerPool.js +59 -0
- package/lib/Cloud/ServerPool.js.map +1 -0
- package/lib/Cloud/ServerPrivateIp.d.ts +62 -0
- package/lib/Cloud/ServerPrivateIp.d.ts.map +1 -0
- package/lib/Cloud/ServerPrivateIp.js +68 -0
- package/lib/Cloud/ServerPrivateIp.js.map +1 -0
- package/lib/Cloud/Service.d.ts +554 -0
- package/lib/Cloud/Service.d.ts.map +1 -0
- package/lib/Cloud/Service.js +765 -0
- package/lib/Cloud/Service.js.map +1 -0
- package/lib/Cloud/ServiceHandler.d.ts +10 -0
- package/lib/Cloud/ServiceHandler.d.ts.map +1 -0
- package/lib/Cloud/ServiceHandler.js +102 -0
- package/lib/Cloud/ServiceHandler.js.map +1 -0
- package/lib/Cloud/Snapshot.d.ts +103 -0
- package/lib/Cloud/Snapshot.d.ts.map +1 -0
- package/lib/Cloud/Snapshot.js +96 -0
- package/lib/Cloud/Snapshot.js.map +1 -0
- package/lib/Cloud/Ssh.d.ts +241 -0
- package/lib/Cloud/Ssh.d.ts.map +1 -0
- package/lib/Cloud/Ssh.js +292 -0
- package/lib/Cloud/Ssh.js.map +1 -0
- package/lib/Cloud/SshKey.d.ts +120 -0
- package/lib/Cloud/SshKey.d.ts.map +1 -0
- package/lib/Cloud/SshKey.js +161 -0
- package/lib/Cloud/SshKey.js.map +1 -0
- package/lib/Cloud/Valkey.d.ts +212 -0
- package/lib/Cloud/Valkey.d.ts.map +1 -0
- package/lib/Cloud/Valkey.js +155 -0
- package/lib/Cloud/Valkey.js.map +1 -0
- package/lib/Cloud/ValkeyScheduledSnapshot.d.ts +75 -0
- package/lib/Cloud/ValkeyScheduledSnapshot.d.ts.map +1 -0
- package/lib/Cloud/ValkeyScheduledSnapshot.js +74 -0
- package/lib/Cloud/ValkeyScheduledSnapshot.js.map +1 -0
- package/lib/Cloud/ValkeySnapshot.d.ts +107 -0
- package/lib/Cloud/ValkeySnapshot.d.ts.map +1 -0
- package/lib/Cloud/ValkeySnapshot.js +80 -0
- package/lib/Cloud/ValkeySnapshot.js.map +1 -0
- package/lib/Cloud/Volume.d.ts +133 -0
- package/lib/Cloud/Volume.d.ts.map +1 -0
- package/lib/Cloud/Volume.js +329 -0
- package/lib/Cloud/Volume.js.map +1 -0
- package/lib/Cloud/VolumeSnapshot.d.ts +95 -0
- package/lib/Cloud/VolumeSnapshot.d.ts.map +1 -0
- package/lib/Cloud/VolumeSnapshot.js +88 -0
- package/lib/Cloud/VolumeSnapshot.js.map +1 -0
- package/lib/Cloud/Webhook.d.ts +93 -0
- package/lib/Cloud/Webhook.d.ts.map +1 -0
- package/lib/Cloud/Webhook.js +92 -0
- package/lib/Cloud/Webhook.js.map +1 -0
- package/lib/Cloud/Website/Astro.d.ts +106 -0
- package/lib/Cloud/Website/Astro.d.ts.map +1 -0
- package/lib/Cloud/Website/Astro.js +76 -0
- package/lib/Cloud/Website/Astro.js.map +1 -0
- package/lib/Cloud/Website/Foldkit.d.ts +70 -0
- package/lib/Cloud/Website/Foldkit.d.ts.map +1 -0
- package/lib/Cloud/Website/Foldkit.js +67 -0
- package/lib/Cloud/Website/Foldkit.js.map +1 -0
- package/lib/Cloud/Website/FrameworkSite.d.ts +277 -0
- package/lib/Cloud/Website/FrameworkSite.d.ts.map +1 -0
- package/lib/Cloud/Website/FrameworkSite.js +245 -0
- package/lib/Cloud/Website/FrameworkSite.js.map +1 -0
- package/lib/Cloud/Website/Nextjs.d.ts +70 -0
- package/lib/Cloud/Website/Nextjs.d.ts.map +1 -0
- package/lib/Cloud/Website/Nextjs.js +66 -0
- package/lib/Cloud/Website/Nextjs.js.map +1 -0
- package/lib/Cloud/Website/Nuxt.d.ts +71 -0
- package/lib/Cloud/Website/Nuxt.d.ts.map +1 -0
- package/lib/Cloud/Website/Nuxt.js +60 -0
- package/lib/Cloud/Website/Nuxt.js.map +1 -0
- package/lib/Cloud/Website/Octane.d.ts +64 -0
- package/lib/Cloud/Website/Octane.d.ts.map +1 -0
- package/lib/Cloud/Website/Octane.js +58 -0
- package/lib/Cloud/Website/Octane.js.map +1 -0
- package/lib/Cloud/Website/Providers.d.ts +16 -0
- package/lib/Cloud/Website/Providers.d.ts.map +1 -0
- package/lib/Cloud/Website/Providers.js +16 -0
- package/lib/Cloud/Website/Providers.js.map +1 -0
- package/lib/Cloud/Website/ReactRouter.d.ts +96 -0
- package/lib/Cloud/Website/ReactRouter.d.ts.map +1 -0
- package/lib/Cloud/Website/ReactRouter.js +90 -0
- package/lib/Cloud/Website/ReactRouter.js.map +1 -0
- package/lib/Cloud/Website/SolidStart.d.ts +108 -0
- package/lib/Cloud/Website/SolidStart.d.ts.map +1 -0
- package/lib/Cloud/Website/SolidStart.js +90 -0
- package/lib/Cloud/Website/SolidStart.js.map +1 -0
- package/lib/Cloud/Website/StaticSite.d.ts +170 -0
- package/lib/Cloud/Website/StaticSite.d.ts.map +1 -0
- package/lib/Cloud/Website/StaticSite.js +193 -0
- package/lib/Cloud/Website/StaticSite.js.map +1 -0
- package/lib/Cloud/Website/SvelteKit.d.ts +70 -0
- package/lib/Cloud/Website/SvelteKit.d.ts.map +1 -0
- package/lib/Cloud/Website/SvelteKit.js +59 -0
- package/lib/Cloud/Website/SvelteKit.js.map +1 -0
- package/lib/Cloud/Website/TanStackStart.d.ts +91 -0
- package/lib/Cloud/Website/TanStackStart.d.ts.map +1 -0
- package/lib/Cloud/Website/TanStackStart.js +85 -0
- package/lib/Cloud/Website/TanStackStart.js.map +1 -0
- package/lib/Cloud/Website/Vinext.d.ts +80 -0
- package/lib/Cloud/Website/Vinext.d.ts.map +1 -0
- package/lib/Cloud/Website/Vinext.js +75 -0
- package/lib/Cloud/Website/Vinext.js.map +1 -0
- package/lib/Cloud/Website/Vite.d.ts +114 -0
- package/lib/Cloud/Website/Vite.d.ts.map +1 -0
- package/lib/Cloud/Website/Vite.js +112 -0
- package/lib/Cloud/Website/Vite.js.map +1 -0
- package/lib/Cloud/Website/Vocs.d.ts +67 -0
- package/lib/Cloud/Website/Vocs.d.ts.map +1 -0
- package/lib/Cloud/Website/Vocs.js +56 -0
- package/lib/Cloud/Website/Vocs.js.map +1 -0
- package/lib/Cloud/Website/Waku.d.ts +71 -0
- package/lib/Cloud/Website/Waku.d.ts.map +1 -0
- package/lib/Cloud/Website/Waku.js +59 -0
- package/lib/Cloud/Website/Waku.js.map +1 -0
- package/lib/Cloud/Website/index.d.ts +16 -0
- package/lib/Cloud/Website/index.d.ts.map +1 -0
- package/lib/Cloud/Website/index.js +17 -0
- package/lib/Cloud/Website/index.js.map +1 -0
- package/lib/Cloud/hosted.d.ts +324 -0
- package/lib/Cloud/hosted.d.ts.map +1 -0
- package/lib/Cloud/hosted.js +750 -0
- package/lib/Cloud/hosted.js.map +1 -0
- package/lib/Cloud/index.d.ts +111 -0
- package/lib/Cloud/index.d.ts.map +1 -0
- package/lib/Cloud/index.js +156 -0
- package/lib/Cloud/index.js.map +1 -0
- package/lib/Contributions.d.ts +12 -0
- package/lib/Contributions.d.ts.map +1 -0
- package/lib/Contributions.js +12 -0
- package/lib/Contributions.js.map +1 -0
- package/lib/Credentials.d.ts +25 -0
- package/lib/Credentials.d.ts.map +1 -0
- package/lib/Credentials.js +35 -0
- package/lib/Credentials.js.map +1 -0
- package/lib/Errors/Application.d.ts +136 -0
- package/lib/Errors/Application.d.ts.map +1 -0
- package/lib/Errors/Application.js +146 -0
- package/lib/Errors/Application.js.map +1 -0
- package/lib/Errors/ApplicationGroup.d.ts +67 -0
- package/lib/Errors/ApplicationGroup.d.ts.map +1 -0
- package/lib/Errors/ApplicationGroup.js +72 -0
- package/lib/Errors/ApplicationGroup.js.map +1 -0
- package/lib/Errors/Dsn.d.ts +87 -0
- package/lib/Errors/Dsn.d.ts.map +1 -0
- package/lib/Errors/Dsn.js +34 -0
- package/lib/Errors/Dsn.js.map +1 -0
- package/lib/Errors/JiraIntegration.d.ts +69 -0
- package/lib/Errors/JiraIntegration.d.ts.map +1 -0
- package/lib/Errors/JiraIntegration.js +64 -0
- package/lib/Errors/JiraIntegration.js.map +1 -0
- package/lib/Errors/LinearIntegration.d.ts +71 -0
- package/lib/Errors/LinearIntegration.d.ts.map +1 -0
- package/lib/Errors/LinearIntegration.js +66 -0
- package/lib/Errors/LinearIntegration.js.map +1 -0
- package/lib/Errors/MicrosoftTeamsIntegration.d.ts +75 -0
- package/lib/Errors/MicrosoftTeamsIntegration.d.ts.map +1 -0
- package/lib/Errors/MicrosoftTeamsIntegration.js +72 -0
- package/lib/Errors/MicrosoftTeamsIntegration.js.map +1 -0
- package/lib/Errors/Reference.d.ts +133 -0
- package/lib/Errors/Reference.d.ts.map +1 -0
- package/lib/Errors/Reference.js +123 -0
- package/lib/Errors/Reference.js.map +1 -0
- package/lib/Errors/RegisterRelease.d.ts +66 -0
- package/lib/Errors/RegisterRelease.d.ts.map +1 -0
- package/lib/Errors/RegisterRelease.js +3 -0
- package/lib/Errors/RegisterRelease.js.map +1 -0
- package/lib/Errors/RegisterReleaseHttp.d.ts +13 -0
- package/lib/Errors/RegisterReleaseHttp.d.ts.map +1 -0
- package/lib/Errors/RegisterReleaseHttp.js +29 -0
- package/lib/Errors/RegisterReleaseHttp.js.map +1 -0
- package/lib/Errors/Release.d.ts +97 -0
- package/lib/Errors/Release.d.ts.map +1 -0
- package/lib/Errors/Release.js +161 -0
- package/lib/Errors/Release.js.map +1 -0
- package/lib/Errors/SlackIntegration.d.ts +66 -0
- package/lib/Errors/SlackIntegration.d.ts.map +1 -0
- package/lib/Errors/SlackIntegration.js +61 -0
- package/lib/Errors/SlackIntegration.js.map +1 -0
- package/lib/Errors/index.d.ts +38 -0
- package/lib/Errors/index.d.ts.map +1 -0
- package/lib/Errors/index.js +46 -0
- package/lib/Errors/index.js.map +1 -0
- package/lib/Incidents/AcknowledgeIncident.d.ts +61 -0
- package/lib/Incidents/AcknowledgeIncident.d.ts.map +1 -0
- package/lib/Incidents/AcknowledgeIncident.js +3 -0
- package/lib/Incidents/AcknowledgeIncident.js.map +1 -0
- package/lib/Incidents/AcknowledgeIncidentHttp.d.ts +12 -0
- package/lib/Incidents/AcknowledgeIncidentHttp.d.ts.map +1 -0
- package/lib/Incidents/AcknowledgeIncidentHttp.js +19 -0
- package/lib/Incidents/AcknowledgeIncidentHttp.js.map +1 -0
- package/lib/Incidents/AmazonSnsIntegration.d.ts +83 -0
- package/lib/Incidents/AmazonSnsIntegration.d.ts.map +1 -0
- package/lib/Incidents/AmazonSnsIntegration.js +91 -0
- package/lib/Incidents/AmazonSnsIntegration.js.map +1 -0
- package/lib/Incidents/AwsCloudWatchIntegration.d.ts +64 -0
- package/lib/Incidents/AwsCloudWatchIntegration.d.ts.map +1 -0
- package/lib/Incidents/AwsCloudWatchIntegration.js +64 -0
- package/lib/Incidents/AwsCloudWatchIntegration.js.map +1 -0
- package/lib/Incidents/AzureIntegration.d.ts +63 -0
- package/lib/Incidents/AzureIntegration.d.ts.map +1 -0
- package/lib/Incidents/AzureIntegration.js +63 -0
- package/lib/Incidents/AzureIntegration.js.map +1 -0
- package/lib/Incidents/BindingHttp.d.ts +28 -0
- package/lib/Incidents/BindingHttp.d.ts.map +1 -0
- package/lib/Incidents/BindingHttp.js +28 -0
- package/lib/Incidents/BindingHttp.js.map +1 -0
- package/lib/Incidents/CatalogRecord.d.ts +69 -0
- package/lib/Incidents/CatalogRecord.d.ts.map +1 -0
- package/lib/Incidents/CatalogRecord.js +69 -0
- package/lib/Incidents/CatalogRecord.js.map +1 -0
- package/lib/Incidents/CatalogRelation.d.ts +78 -0
- package/lib/Incidents/CatalogRelation.d.ts.map +1 -0
- package/lib/Incidents/CatalogRelation.js +79 -0
- package/lib/Incidents/CatalogRelation.js.map +1 -0
- package/lib/Incidents/CreateIncident.d.ts +67 -0
- package/lib/Incidents/CreateIncident.d.ts.map +1 -0
- package/lib/Incidents/CreateIncident.js +3 -0
- package/lib/Incidents/CreateIncident.js.map +1 -0
- package/lib/Incidents/CreateIncidentHttp.d.ts +12 -0
- package/lib/Incidents/CreateIncidentHttp.d.ts.map +1 -0
- package/lib/Incidents/CreateIncidentHttp.js +19 -0
- package/lib/Incidents/CreateIncidentHttp.js.map +1 -0
- package/lib/Incidents/CreateStatusReport.d.ts +71 -0
- package/lib/Incidents/CreateStatusReport.d.ts.map +1 -0
- package/lib/Incidents/CreateStatusReport.js +3 -0
- package/lib/Incidents/CreateStatusReport.js.map +1 -0
- package/lib/Incidents/CreateStatusReportHttp.d.ts +12 -0
- package/lib/Incidents/CreateStatusReportHttp.d.ts.map +1 -0
- package/lib/Incidents/CreateStatusReportHttp.js +27 -0
- package/lib/Incidents/CreateStatusReportHttp.js.map +1 -0
- package/lib/Incidents/CreateStatusUpdate.d.ts +67 -0
- package/lib/Incidents/CreateStatusUpdate.d.ts.map +1 -0
- package/lib/Incidents/CreateStatusUpdate.js +3 -0
- package/lib/Incidents/CreateStatusUpdate.js.map +1 -0
- package/lib/Incidents/CreateStatusUpdateHttp.d.ts +12 -0
- package/lib/Incidents/CreateStatusUpdateHttp.d.ts.map +1 -0
- package/lib/Incidents/CreateStatusUpdateHttp.js +27 -0
- package/lib/Incidents/CreateStatusUpdateHttp.js.map +1 -0
- package/lib/Incidents/DatadogIntegration.d.ts +70 -0
- package/lib/Incidents/DatadogIntegration.d.ts.map +1 -0
- package/lib/Incidents/DatadogIntegration.js +70 -0
- package/lib/Incidents/DatadogIntegration.js.map +1 -0
- package/lib/Incidents/ElasticIntegration.d.ts +62 -0
- package/lib/Incidents/ElasticIntegration.d.ts.map +1 -0
- package/lib/Incidents/ElasticIntegration.js +62 -0
- package/lib/Incidents/ElasticIntegration.js.map +1 -0
- package/lib/Incidents/EscalationPolicy.d.ts +106 -0
- package/lib/Incidents/EscalationPolicy.d.ts.map +1 -0
- package/lib/Incidents/EscalationPolicy.js +103 -0
- package/lib/Incidents/EscalationPolicy.js.map +1 -0
- package/lib/Incidents/EscalationPolicyGroup.d.ts +49 -0
- package/lib/Incidents/EscalationPolicyGroup.d.ts.map +1 -0
- package/lib/Incidents/EscalationPolicyGroup.js +48 -0
- package/lib/Incidents/EscalationPolicyGroup.js.map +1 -0
- package/lib/Incidents/FailHeartbeat.d.ts +49 -0
- package/lib/Incidents/FailHeartbeat.d.ts.map +1 -0
- package/lib/Incidents/FailHeartbeat.js +3 -0
- package/lib/Incidents/FailHeartbeat.js.map +1 -0
- package/lib/Incidents/FailHeartbeatHttp.d.ts +12 -0
- package/lib/Incidents/FailHeartbeatHttp.d.ts.map +1 -0
- package/lib/Incidents/FailHeartbeatHttp.js +22 -0
- package/lib/Incidents/FailHeartbeatHttp.js.map +1 -0
- package/lib/Incidents/GoogleMonitoringIntegration.d.ts +63 -0
- package/lib/Incidents/GoogleMonitoringIntegration.d.ts.map +1 -0
- package/lib/Incidents/GoogleMonitoringIntegration.js +63 -0
- package/lib/Incidents/GoogleMonitoringIntegration.js.map +1 -0
- package/lib/Incidents/GrafanaIntegration.d.ts +73 -0
- package/lib/Incidents/GrafanaIntegration.d.ts.map +1 -0
- package/lib/Incidents/GrafanaIntegration.js +73 -0
- package/lib/Incidents/GrafanaIntegration.js.map +1 -0
- package/lib/Incidents/Heartbeat.d.ts +99 -0
- package/lib/Incidents/Heartbeat.d.ts.map +1 -0
- package/lib/Incidents/Heartbeat.js +104 -0
- package/lib/Incidents/Heartbeat.js.map +1 -0
- package/lib/Incidents/HeartbeatGroup.d.ts +49 -0
- package/lib/Incidents/HeartbeatGroup.d.ts.map +1 -0
- package/lib/Incidents/HeartbeatGroup.js +48 -0
- package/lib/Incidents/HeartbeatGroup.js.map +1 -0
- package/lib/Incidents/IncomingEmailIntegration.d.ts +71 -0
- package/lib/Incidents/IncomingEmailIntegration.d.ts.map +1 -0
- package/lib/Incidents/IncomingEmailIntegration.js +81 -0
- package/lib/Incidents/IncomingEmailIntegration.js.map +1 -0
- package/lib/Incidents/IncomingWebhookIntegration.d.ts +85 -0
- package/lib/Incidents/IncomingWebhookIntegration.d.ts.map +1 -0
- package/lib/Incidents/IncomingWebhookIntegration.js +95 -0
- package/lib/Incidents/IncomingWebhookIntegration.js.map +1 -0
- package/lib/Incidents/JiraIntegration.d.ts +59 -0
- package/lib/Incidents/JiraIntegration.d.ts.map +1 -0
- package/lib/Incidents/JiraIntegration.js +50 -0
- package/lib/Incidents/JiraIntegration.js.map +1 -0
- package/lib/Incidents/LinearIntegration.d.ts +62 -0
- package/lib/Incidents/LinearIntegration.d.ts.map +1 -0
- package/lib/Incidents/LinearIntegration.js +60 -0
- package/lib/Incidents/LinearIntegration.js.map +1 -0
- package/lib/Incidents/Metadata.d.ts +85 -0
- package/lib/Incidents/Metadata.d.ts.map +1 -0
- package/lib/Incidents/Metadata.js +91 -0
- package/lib/Incidents/Metadata.js.map +1 -0
- package/lib/Incidents/Monitor.d.ts +91 -0
- package/lib/Incidents/Monitor.d.ts.map +1 -0
- package/lib/Incidents/Monitor.js +107 -0
- package/lib/Incidents/Monitor.js.map +1 -0
- package/lib/Incidents/MonitorGroup.d.ts +57 -0
- package/lib/Incidents/MonitorGroup.d.ts.map +1 -0
- package/lib/Incidents/MonitorGroup.js +56 -0
- package/lib/Incidents/MonitorGroup.js.map +1 -0
- package/lib/Incidents/NewRelicIntegration.d.ts +70 -0
- package/lib/Incidents/NewRelicIntegration.d.ts.map +1 -0
- package/lib/Incidents/NewRelicIntegration.js +70 -0
- package/lib/Incidents/NewRelicIntegration.js.map +1 -0
- package/lib/Incidents/OnCallRotation.d.ts +96 -0
- package/lib/Incidents/OnCallRotation.d.ts.map +1 -0
- package/lib/Incidents/OnCallRotation.js +206 -0
- package/lib/Incidents/OnCallRotation.js.map +1 -0
- package/lib/Incidents/OnCallSchedule.d.ts +80 -0
- package/lib/Incidents/OnCallSchedule.d.ts.map +1 -0
- package/lib/Incidents/OnCallSchedule.js +73 -0
- package/lib/Incidents/OnCallSchedule.js.map +1 -0
- package/lib/Incidents/OutgoingEmailIntegration.d.ts +54 -0
- package/lib/Incidents/OutgoingEmailIntegration.d.ts.map +1 -0
- package/lib/Incidents/OutgoingEmailIntegration.js +53 -0
- package/lib/Incidents/OutgoingEmailIntegration.js.map +1 -0
- package/lib/Incidents/OutgoingPagerDutyIntegration.d.ts +48 -0
- package/lib/Incidents/OutgoingPagerDutyIntegration.d.ts.map +1 -0
- package/lib/Incidents/OutgoingPagerDutyIntegration.js +47 -0
- package/lib/Incidents/OutgoingPagerDutyIntegration.js.map +1 -0
- package/lib/Incidents/OutgoingWebhookIntegration.d.ts +83 -0
- package/lib/Incidents/OutgoingWebhookIntegration.d.ts.map +1 -0
- package/lib/Incidents/OutgoingWebhookIntegration.js +98 -0
- package/lib/Incidents/OutgoingWebhookIntegration.js.map +1 -0
- package/lib/Incidents/PrometheusIntegration.d.ts +77 -0
- package/lib/Incidents/PrometheusIntegration.d.ts.map +1 -0
- package/lib/Incidents/PrometheusIntegration.js +77 -0
- package/lib/Incidents/PrometheusIntegration.js.map +1 -0
- package/lib/Incidents/Reference.d.ts +140 -0
- package/lib/Incidents/Reference.d.ts.map +1 -0
- package/lib/Incidents/Reference.js +136 -0
- package/lib/Incidents/Reference.js.map +1 -0
- package/lib/Incidents/ReportHeartbeat.d.ts +106 -0
- package/lib/Incidents/ReportHeartbeat.d.ts.map +1 -0
- package/lib/Incidents/ReportHeartbeat.js +63 -0
- package/lib/Incidents/ReportHeartbeat.js.map +1 -0
- package/lib/Incidents/ReportHeartbeatHttp.d.ts +12 -0
- package/lib/Incidents/ReportHeartbeatHttp.d.ts.map +1 -0
- package/lib/Incidents/ReportHeartbeatHttp.js +22 -0
- package/lib/Incidents/ReportHeartbeatHttp.js.map +1 -0
- package/lib/Incidents/ResolveIncident.d.ts +60 -0
- package/lib/Incidents/ResolveIncident.d.ts.map +1 -0
- package/lib/Incidents/ResolveIncident.js +3 -0
- package/lib/Incidents/ResolveIncident.js.map +1 -0
- package/lib/Incidents/ResolveIncidentHttp.d.ts +12 -0
- package/lib/Incidents/ResolveIncidentHttp.d.ts.map +1 -0
- package/lib/Incidents/ResolveIncidentHttp.js +19 -0
- package/lib/Incidents/ResolveIncidentHttp.js.map +1 -0
- package/lib/Incidents/SendHeartbeat.d.ts +56 -0
- package/lib/Incidents/SendHeartbeat.d.ts.map +1 -0
- package/lib/Incidents/SendHeartbeat.js +3 -0
- package/lib/Incidents/SendHeartbeat.js.map +1 -0
- package/lib/Incidents/SendHeartbeatHttp.d.ts +12 -0
- package/lib/Incidents/SendHeartbeatHttp.d.ts.map +1 -0
- package/lib/Incidents/SendHeartbeatHttp.js +22 -0
- package/lib/Incidents/SendHeartbeatHttp.js.map +1 -0
- package/lib/Incidents/Severity.d.ts +83 -0
- package/lib/Incidents/Severity.d.ts.map +1 -0
- package/lib/Incidents/Severity.js +79 -0
- package/lib/Incidents/Severity.js.map +1 -0
- package/lib/Incidents/SeverityGroup.d.ts +51 -0
- package/lib/Incidents/SeverityGroup.d.ts.map +1 -0
- package/lib/Incidents/SeverityGroup.js +50 -0
- package/lib/Incidents/SeverityGroup.js.map +1 -0
- package/lib/Incidents/SplunkOnCallIntegration.d.ts +46 -0
- package/lib/Incidents/SplunkOnCallIntegration.d.ts.map +1 -0
- package/lib/Incidents/SplunkOnCallIntegration.js +45 -0
- package/lib/Incidents/SplunkOnCallIntegration.js.map +1 -0
- package/lib/Incidents/StatusPage.d.ts +125 -0
- package/lib/Incidents/StatusPage.d.ts.map +1 -0
- package/lib/Incidents/StatusPage.js +133 -0
- package/lib/Incidents/StatusPage.js.map +1 -0
- package/lib/Incidents/StatusPageGroup.d.ts +50 -0
- package/lib/Incidents/StatusPageGroup.d.ts.map +1 -0
- package/lib/Incidents/StatusPageGroup.js +49 -0
- package/lib/Incidents/StatusPageGroup.js.map +1 -0
- package/lib/Incidents/StatusPageResource.d.ts +91 -0
- package/lib/Incidents/StatusPageResource.d.ts.map +1 -0
- package/lib/Incidents/StatusPageResource.js +87 -0
- package/lib/Incidents/StatusPageResource.js.map +1 -0
- package/lib/Incidents/StatusPageSection.d.ts +65 -0
- package/lib/Incidents/StatusPageSection.d.ts.map +1 -0
- package/lib/Incidents/StatusPageSection.js +65 -0
- package/lib/Incidents/StatusPageSection.js.map +1 -0
- package/lib/Incidents/StatusPageSubscriber.d.ts +93 -0
- package/lib/Incidents/StatusPageSubscriber.d.ts.map +1 -0
- package/lib/Incidents/StatusPageSubscriber.js +100 -0
- package/lib/Incidents/StatusPageSubscriber.js.map +1 -0
- package/lib/Incidents/index.d.ts +108 -0
- package/lib/Incidents/index.d.ts.map +1 -0
- package/lib/Incidents/index.js +143 -0
- package/lib/Incidents/index.js.map +1 -0
- package/lib/Incidents/integrationFields.d.ts +124 -0
- package/lib/Incidents/integrationFields.d.ts.map +1 -0
- package/lib/Incidents/integrationFields.js +74 -0
- package/lib/Incidents/integrationFields.js.map +1 -0
- package/lib/Providers.d.ts +36 -0
- package/lib/Providers.d.ts.map +1 -0
- package/lib/Providers.js +54 -0
- package/lib/Providers.js.map +1 -0
- package/lib/Telemetry/Alert.d.ts +99 -0
- package/lib/Telemetry/Alert.d.ts.map +1 -0
- package/lib/Telemetry/Alert.js +91 -0
- package/lib/Telemetry/Alert.js.map +1 -0
- package/lib/Telemetry/AwsLogGroupSubscription.d.ts +57 -0
- package/lib/Telemetry/AwsLogGroupSubscription.d.ts.map +1 -0
- package/lib/Telemetry/AwsLogGroupSubscription.js +57 -0
- package/lib/Telemetry/AwsLogGroupSubscription.js.map +1 -0
- package/lib/Telemetry/BindingHttp.d.ts +23 -0
- package/lib/Telemetry/BindingHttp.d.ts.map +1 -0
- package/lib/Telemetry/BindingHttp.js +25 -0
- package/lib/Telemetry/BindingHttp.js.map +1 -0
- package/lib/Telemetry/Chart.d.ts +171 -0
- package/lib/Telemetry/Chart.d.ts.map +1 -0
- package/lib/Telemetry/Chart.js +92 -0
- package/lib/Telemetry/Chart.js.map +1 -0
- package/lib/Telemetry/Collector.d.ts +78 -0
- package/lib/Telemetry/Collector.d.ts.map +1 -0
- package/lib/Telemetry/Collector.js +111 -0
- package/lib/Telemetry/Collector.js.map +1 -0
- package/lib/Telemetry/CollectorTarget.d.ts +69 -0
- package/lib/Telemetry/CollectorTarget.d.ts.map +1 -0
- package/lib/Telemetry/CollectorTarget.js +69 -0
- package/lib/Telemetry/CollectorTarget.js.map +1 -0
- package/lib/Telemetry/Connection.d.ts +79 -0
- package/lib/Telemetry/Connection.d.ts.map +1 -0
- package/lib/Telemetry/Connection.js +128 -0
- package/lib/Telemetry/Connection.js.map +1 -0
- package/lib/Telemetry/Dashboard.d.ts +108 -0
- package/lib/Telemetry/Dashboard.d.ts.map +1 -0
- package/lib/Telemetry/Dashboard.js +112 -0
- package/lib/Telemetry/Dashboard.js.map +1 -0
- package/lib/Telemetry/DashboardChart.d.ts +104 -0
- package/lib/Telemetry/DashboardChart.d.ts.map +1 -0
- package/lib/Telemetry/DashboardChart.js +119 -0
- package/lib/Telemetry/DashboardChart.js.map +1 -0
- package/lib/Telemetry/DashboardGroup.d.ts +53 -0
- package/lib/Telemetry/DashboardGroup.d.ts.map +1 -0
- package/lib/Telemetry/DashboardGroup.js +47 -0
- package/lib/Telemetry/DashboardGroup.js.map +1 -0
- package/lib/Telemetry/DashboardSection.d.ts +65 -0
- package/lib/Telemetry/DashboardSection.d.ts.map +1 -0
- package/lib/Telemetry/DashboardSection.js +65 -0
- package/lib/Telemetry/DashboardSection.js.map +1 -0
- package/lib/Telemetry/Exploration.d.ts +77 -0
- package/lib/Telemetry/Exploration.d.ts.map +1 -0
- package/lib/Telemetry/Exploration.js +97 -0
- package/lib/Telemetry/Exploration.js.map +1 -0
- package/lib/Telemetry/ExplorationGroup.d.ts +58 -0
- package/lib/Telemetry/ExplorationGroup.d.ts.map +1 -0
- package/lib/Telemetry/ExplorationGroup.js +52 -0
- package/lib/Telemetry/ExplorationGroup.js.map +1 -0
- package/lib/Telemetry/Export.d.ts +183 -0
- package/lib/Telemetry/Export.d.ts.map +1 -0
- package/lib/Telemetry/Export.js +152 -0
- package/lib/Telemetry/Export.js.map +1 -0
- package/lib/Telemetry/ExtractedMetric.d.ts +67 -0
- package/lib/Telemetry/ExtractedMetric.d.ts.map +1 -0
- package/lib/Telemetry/ExtractedMetric.js +66 -0
- package/lib/Telemetry/ExtractedMetric.js.map +1 -0
- package/lib/Telemetry/IngestLogs.d.ts +87 -0
- package/lib/Telemetry/IngestLogs.d.ts.map +1 -0
- package/lib/Telemetry/IngestLogs.js +3 -0
- package/lib/Telemetry/IngestLogs.js.map +1 -0
- package/lib/Telemetry/IngestLogsHttp.d.ts +12 -0
- package/lib/Telemetry/IngestLogsHttp.d.ts.map +1 -0
- package/lib/Telemetry/IngestLogsHttp.js +21 -0
- package/lib/Telemetry/IngestLogsHttp.js.map +1 -0
- package/lib/Telemetry/IngestMetrics.d.ts +68 -0
- package/lib/Telemetry/IngestMetrics.d.ts.map +1 -0
- package/lib/Telemetry/IngestMetrics.js +3 -0
- package/lib/Telemetry/IngestMetrics.js.map +1 -0
- package/lib/Telemetry/IngestMetricsHttp.d.ts +12 -0
- package/lib/Telemetry/IngestMetricsHttp.d.ts.map +1 -0
- package/lib/Telemetry/IngestMetricsHttp.js +21 -0
- package/lib/Telemetry/IngestMetricsHttp.js.map +1 -0
- package/lib/Telemetry/OtelHeaders.d.ts +36 -0
- package/lib/Telemetry/OtelHeaders.d.ts.map +1 -0
- package/lib/Telemetry/OtelHeaders.js +34 -0
- package/lib/Telemetry/OtelHeaders.js.map +1 -0
- package/lib/Telemetry/Query.d.ts +66 -0
- package/lib/Telemetry/Query.d.ts.map +1 -0
- package/lib/Telemetry/Query.js +3 -0
- package/lib/Telemetry/Query.js.map +1 -0
- package/lib/Telemetry/QueryHttp.d.ts +12 -0
- package/lib/Telemetry/QueryHttp.d.ts.map +1 -0
- package/lib/Telemetry/QueryHttp.js +24 -0
- package/lib/Telemetry/QueryHttp.js.map +1 -0
- package/lib/Telemetry/Reference.d.ts +115 -0
- package/lib/Telemetry/Reference.d.ts.map +1 -0
- package/lib/Telemetry/Reference.js +110 -0
- package/lib/Telemetry/Reference.js.map +1 -0
- package/lib/Telemetry/ShipLogs.d.ts +89 -0
- package/lib/Telemetry/ShipLogs.d.ts.map +1 -0
- package/lib/Telemetry/ShipLogs.js +119 -0
- package/lib/Telemetry/ShipLogs.js.map +1 -0
- package/lib/Telemetry/Source.d.ts +184 -0
- package/lib/Telemetry/Source.d.ts.map +1 -0
- package/lib/Telemetry/Source.js +238 -0
- package/lib/Telemetry/Source.js.map +1 -0
- package/lib/Telemetry/SourceAwsAccount.d.ts +73 -0
- package/lib/Telemetry/SourceAwsAccount.d.ts.map +1 -0
- package/lib/Telemetry/SourceAwsAccount.js +57 -0
- package/lib/Telemetry/SourceAwsAccount.js.map +1 -0
- package/lib/Telemetry/SourceGcpProject.d.ts +81 -0
- package/lib/Telemetry/SourceGcpProject.d.ts.map +1 -0
- package/lib/Telemetry/SourceGcpProject.js +69 -0
- package/lib/Telemetry/SourceGcpProject.js.map +1 -0
- package/lib/Telemetry/SourceGroup.d.ts +65 -0
- package/lib/Telemetry/SourceGroup.d.ts.map +1 -0
- package/lib/Telemetry/SourceGroup.js +67 -0
- package/lib/Telemetry/SourceGroup.js.map +1 -0
- package/lib/Telemetry/customBucket.d.ts +26 -0
- package/lib/Telemetry/customBucket.d.ts.map +1 -0
- package/lib/Telemetry/customBucket.js +45 -0
- package/lib/Telemetry/customBucket.js.map +1 -0
- package/lib/Telemetry/index.d.ts +64 -0
- package/lib/Telemetry/index.d.ts.map +1 -0
- package/lib/Telemetry/index.js +81 -0
- package/lib/Telemetry/index.js.map +1 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +14 -0
- package/lib/index.js.map +1 -0
- package/lib/internal/DeployRetry.d.ts +19 -0
- package/lib/internal/DeployRetry.d.ts.map +1 -0
- package/lib/internal/DeployRetry.js +52 -0
- package/lib/internal/DeployRetry.js.map +1 -0
- package/lib/internal/actionWait.d.ts +12 -0
- package/lib/internal/actionWait.d.ts.map +1 -0
- package/lib/internal/actionWait.js +21 -0
- package/lib/internal/actionWait.js.map +1 -0
- package/lib/internal/applicationIds.d.ts +17 -0
- package/lib/internal/applicationIds.d.ts.map +1 -0
- package/lib/internal/applicationIds.js +12 -0
- package/lib/internal/applicationIds.js.map +1 -0
- package/lib/internal/attachments.d.ts +23 -0
- package/lib/internal/attachments.d.ts.map +1 -0
- package/lib/internal/attachments.js +22 -0
- package/lib/internal/attachments.js.map +1 -0
- package/lib/internal/budget.d.ts +46 -0
- package/lib/internal/budget.d.ts.map +1 -0
- package/lib/internal/budget.js +44 -0
- package/lib/internal/budget.js.map +1 -0
- package/lib/internal/connection.d.ts +65 -0
- package/lib/internal/connection.d.ts.map +1 -0
- package/lib/internal/connection.js +160 -0
- package/lib/internal/connection.js.map +1 -0
- package/lib/internal/crud.d.ts +195 -0
- package/lib/internal/crud.d.ts.map +1 -0
- package/lib/internal/crud.js +614 -0
- package/lib/internal/crud.js.map +1 -0
- package/lib/internal/errors.d.ts +35 -0
- package/lib/internal/errors.d.ts.map +1 -0
- package/lib/internal/errors.js +19 -0
- package/lib/internal/errors.js.map +1 -0
- package/lib/internal/fields.d.ts +47 -0
- package/lib/internal/fields.d.ts.map +1 -0
- package/lib/internal/fields.js +136 -0
- package/lib/internal/fields.js.map +1 -0
- package/lib/internal/gone.d.ts +13 -0
- package/lib/internal/gone.d.ts.map +1 -0
- package/lib/internal/gone.js +14 -0
- package/lib/internal/gone.js.map +1 -0
- package/lib/internal/managedDatabase.d.ts +137 -0
- package/lib/internal/managedDatabase.d.ts.map +1 -0
- package/lib/internal/managedDatabase.js +186 -0
- package/lib/internal/managedDatabase.js.map +1 -0
- package/lib/internal/managedService.d.ts +184 -0
- package/lib/internal/managedService.d.ts.map +1 -0
- package/lib/internal/managedService.js +208 -0
- package/lib/internal/managedService.js.map +1 -0
- package/lib/internal/migrations.d.ts +138 -0
- package/lib/internal/migrations.d.ts.map +1 -0
- package/lib/internal/migrations.js +288 -0
- package/lib/internal/migrations.js.map +1 -0
- package/lib/internal/ops.d.ts +43 -0
- package/lib/internal/ops.d.ts.map +1 -0
- package/lib/internal/ops.js +46 -0
- package/lib/internal/ops.js.map +1 -0
- package/lib/internal/ownership.d.ts +55 -0
- package/lib/internal/ownership.d.ts.map +1 -0
- package/lib/internal/ownership.js +74 -0
- package/lib/internal/ownership.js.map +1 -0
- package/lib/internal/reference.d.ts +36 -0
- package/lib/internal/reference.d.ts.map +1 -0
- package/lib/internal/reference.js +49 -0
- package/lib/internal/reference.js.map +1 -0
- package/lib/internal/scope.d.ts +51 -0
- package/lib/internal/scope.d.ts.map +1 -0
- package/lib/internal/scope.js +34 -0
- package/lib/internal/scope.js.map +1 -0
- package/lib/internal/snapshot.d.ts +120 -0
- package/lib/internal/snapshot.d.ts.map +1 -0
- package/lib/internal/snapshot.js +92 -0
- package/lib/internal/snapshot.js.map +1 -0
- package/lib/internal/unpaged.d.ts +22 -0
- package/lib/internal/unpaged.d.ts.map +1 -0
- package/lib/internal/unpaged.js +17 -0
- package/lib/internal/unpaged.js.map +1 -0
- package/lib/internal/wait.d.ts +55 -0
- package/lib/internal/wait.d.ts.map +1 -0
- package/lib/internal/wait.js +56 -0
- package/lib/internal/wait.js.map +1 -0
- package/lib/sdk/credentials.d.ts +97 -0
- package/lib/sdk/credentials.d.ts.map +1 -0
- package/lib/sdk/credentials.js +135 -0
- package/lib/sdk/credentials.js.map +1 -0
- package/lib/sdk/errors.d.ts +98 -0
- package/lib/sdk/errors.d.ts.map +1 -0
- package/lib/sdk/errors.js +86 -0
- package/lib/sdk/errors.js.map +1 -0
- package/lib/sdk/index.d.ts +49 -0
- package/lib/sdk/index.d.ts.map +1 -0
- package/lib/sdk/index.js +49 -0
- package/lib/sdk/index.js.map +1 -0
- package/lib/sdk/pagination.d.ts +35 -0
- package/lib/sdk/pagination.d.ts.map +1 -0
- package/lib/sdk/pagination.js +80 -0
- package/lib/sdk/pagination.js.map +1 -0
- package/lib/sdk/protocol.d.ts +109 -0
- package/lib/sdk/protocol.d.ts.map +1 -0
- package/lib/sdk/protocol.js +451 -0
- package/lib/sdk/protocol.js.map +1 -0
- package/lib/sdk/retry.d.ts +32 -0
- package/lib/sdk/retry.d.ts.map +1 -0
- package/lib/sdk/retry.js +33 -0
- package/lib/sdk/retry.js.map +1 -0
- package/lib/sdk/services/account.d.ts +372 -0
- package/lib/sdk/services/account.d.ts.map +1 -0
- package/lib/sdk/services/account.js +553 -0
- package/lib/sdk/services/account.js.map +1 -0
- package/lib/sdk/services/cloud.d.ts +11910 -0
- package/lib/sdk/services/cloud.d.ts.map +1 -0
- package/lib/sdk/services/cloud.js +18446 -0
- package/lib/sdk/services/cloud.js.map +1 -0
- package/lib/sdk/services/errors.d.ts +2203 -0
- package/lib/sdk/services/errors.d.ts.map +1 -0
- package/lib/sdk/services/errors.js +2676 -0
- package/lib/sdk/services/errors.js.map +1 -0
- package/lib/sdk/services/heartbeat.d.ts +36 -0
- package/lib/sdk/services/heartbeat.d.ts.map +1 -0
- package/lib/sdk/services/heartbeat.js +94 -0
- package/lib/sdk/services/heartbeat.js.map +1 -0
- package/lib/sdk/services/incidents.d.ts +9948 -0
- package/lib/sdk/services/incidents.d.ts.map +1 -0
- package/lib/sdk/services/incidents.js +9730 -0
- package/lib/sdk/services/incidents.js.map +1 -0
- package/lib/sdk/services/index.d.ts +8 -0
- package/lib/sdk/services/index.d.ts.map +1 -0
- package/lib/sdk/services/index.js +9 -0
- package/lib/sdk/services/index.js.map +1 -0
- package/lib/sdk/services/ingest.d.ts +158 -0
- package/lib/sdk/services/ingest.d.ts.map +1 -0
- package/lib/sdk/services/ingest.js +200 -0
- package/lib/sdk/services/ingest.js.map +1 -0
- package/lib/sdk/services/telemetry.d.ts +6789 -0
- package/lib/sdk/services/telemetry.d.ts.map +1 -0
- package/lib/sdk/services/telemetry.js +5613 -0
- package/lib/sdk/services/telemetry.js.map +1 -0
- package/lib/sdk/traits.d.ts +26 -0
- package/lib/sdk/traits.d.ts.map +1 -0
- package/lib/sdk/traits.js +15 -0
- package/lib/sdk/traits.js.map +1 -0
- package/package.json +190 -4
- package/src/Account/Reference.ts +120 -0
- package/src/Account/Team.ts +106 -0
- package/src/Account/TeamMember.ts +218 -0
- package/src/Account/index.ts +27 -0
- package/src/AuthProvider.ts +172 -0
- package/src/BetterStackBindings.ts +447 -0
- package/src/Cloud/Bootstrap.ts +116 -0
- package/src/Cloud/Certificate.ts +146 -0
- package/src/Cloud/ClickHouse.ts +272 -0
- package/src/Cloud/ClickHouseScheduledSnapshot.ts +114 -0
- package/src/Cloud/ClickHouseSnapshot.ts +137 -0
- package/src/Cloud/Firewall.ts +277 -0
- package/src/Cloud/FirewallRule.ts +175 -0
- package/src/Cloud/InferEnv.ts +30 -0
- package/src/Cloud/Kafka.ts +301 -0
- package/src/Cloud/KafkaTopic.ts +129 -0
- package/src/Cloud/KafkaUser.ts +175 -0
- package/src/Cloud/KubernetesCluster.ts +312 -0
- package/src/Cloud/KubernetesNodePool.ts +196 -0
- package/src/Cloud/KubernetesScheduledSnapshot.ts +116 -0
- package/src/Cloud/LoadBalancer.ts +336 -0
- package/src/Cloud/LoadBalancerService.ts +181 -0
- package/src/Cloud/LoadBalancerTarget.ts +203 -0
- package/src/Cloud/MountVolume.ts +167 -0
- package/src/Cloud/MySQL.ts +363 -0
- package/src/Cloud/MySQLScheduledSnapshot.ts +111 -0
- package/src/Cloud/MySQLSnapshot.ts +133 -0
- package/src/Cloud/Network.ts +116 -0
- package/src/Cloud/ObjectCache.ts +420 -0
- package/src/Cloud/ObjectCacheBucket.ts +197 -0
- package/src/Cloud/Otlp.ts +131 -0
- package/src/Cloud/PlacementGroup.ts +132 -0
- package/src/Cloud/Postgres.ts +410 -0
- package/src/Cloud/PostgresDatabase.ts +118 -0
- package/src/Cloud/PostgresScheduledSnapshot.ts +111 -0
- package/src/Cloud/PostgresSnapshot.ts +133 -0
- package/src/Cloud/PostgresUser.ts +175 -0
- package/src/Cloud/Reference.ts +743 -0
- package/src/Cloud/ReservedIp.ts +214 -0
- package/src/Cloud/ScheduledSnapshot.ts +75 -0
- package/src/Cloud/ScheduledVolumeSnapshot.ts +76 -0
- package/src/Cloud/Server.ts +1469 -0
- package/src/Cloud/ServerPool.ts +100 -0
- package/src/Cloud/ServerPrivateIp.ts +109 -0
- package/src/Cloud/Service.ts +1101 -0
- package/src/Cloud/ServiceHandler.ts +113 -0
- package/src/Cloud/Snapshot.ts +161 -0
- package/src/Cloud/Ssh.ts +528 -0
- package/src/Cloud/SshKey.ts +241 -0
- package/src/Cloud/Valkey.ts +284 -0
- package/src/Cloud/ValkeyScheduledSnapshot.ts +112 -0
- package/src/Cloud/ValkeySnapshot.ts +135 -0
- package/src/Cloud/Volume.ts +522 -0
- package/src/Cloud/VolumeSnapshot.ts +153 -0
- package/src/Cloud/Webhook.ts +145 -0
- package/src/Cloud/Website/Astro.ts +118 -0
- package/src/Cloud/Website/Foldkit.ts +78 -0
- package/src/Cloud/Website/FrameworkSite.ts +499 -0
- package/src/Cloud/Website/Nextjs.ts +70 -0
- package/src/Cloud/Website/Nuxt.ts +72 -0
- package/src/Cloud/Website/Octane.ts +63 -0
- package/src/Cloud/Website/Providers.ts +20 -0
- package/src/Cloud/Website/ReactRouter.ts +96 -0
- package/src/Cloud/Website/SolidStart.ts +109 -0
- package/src/Cloud/Website/StaticSite.ts +273 -0
- package/src/Cloud/Website/SvelteKit.ts +71 -0
- package/src/Cloud/Website/TanStackStart.ts +91 -0
- package/src/Cloud/Website/Vinext.ts +79 -0
- package/src/Cloud/Website/Vite.ts +131 -0
- package/src/Cloud/Website/Vocs.ts +69 -0
- package/src/Cloud/Website/Waku.ts +76 -0
- package/src/Cloud/Website/index.ts +16 -0
- package/src/Cloud/hosted.ts +1022 -0
- package/src/Cloud/index.ts +223 -0
- package/src/Contributions.ts +15 -0
- package/src/Credentials.ts +70 -0
- package/src/Errors/Application.ts +208 -0
- package/src/Errors/ApplicationGroup.ts +119 -0
- package/src/Errors/Dsn.ts +119 -0
- package/src/Errors/JiraIntegration.ts +108 -0
- package/src/Errors/LinearIntegration.ts +112 -0
- package/src/Errors/MicrosoftTeamsIntegration.ts +121 -0
- package/src/Errors/Reference.ts +189 -0
- package/src/Errors/RegisterRelease.ts +77 -0
- package/src/Errors/RegisterReleaseHttp.ts +47 -0
- package/src/Errors/Release.ts +241 -0
- package/src/Errors/SlackIntegration.ts +105 -0
- package/src/Errors/index.ts +60 -0
- package/src/Incidents/AcknowledgeIncident.ts +78 -0
- package/src/Incidents/AcknowledgeIncidentHttp.ts +28 -0
- package/src/Incidents/AmazonSnsIntegration.ts +134 -0
- package/src/Incidents/AwsCloudWatchIntegration.ts +99 -0
- package/src/Incidents/AzureIntegration.ts +95 -0
- package/src/Incidents/BindingHttp.ts +62 -0
- package/src/Incidents/CatalogRecord.ts +106 -0
- package/src/Incidents/CatalogRelation.ts +111 -0
- package/src/Incidents/CreateIncident.ts +81 -0
- package/src/Incidents/CreateIncidentHttp.ts +28 -0
- package/src/Incidents/CreateStatusReport.ts +88 -0
- package/src/Incidents/CreateStatusReportHttp.ts +35 -0
- package/src/Incidents/CreateStatusUpdate.ts +84 -0
- package/src/Incidents/CreateStatusUpdateHttp.ts +35 -0
- package/src/Incidents/DatadogIntegration.ts +102 -0
- package/src/Incidents/ElasticIntegration.ts +94 -0
- package/src/Incidents/EscalationPolicy.ts +144 -0
- package/src/Incidents/EscalationPolicyGroup.ts +82 -0
- package/src/Incidents/FailHeartbeat.ts +55 -0
- package/src/Incidents/FailHeartbeatHttp.ts +28 -0
- package/src/Incidents/GoogleMonitoringIntegration.ts +98 -0
- package/src/Incidents/GrafanaIntegration.ts +105 -0
- package/src/Incidents/Heartbeat.ts +143 -0
- package/src/Incidents/HeartbeatGroup.ts +83 -0
- package/src/Incidents/IncomingEmailIntegration.ts +120 -0
- package/src/Incidents/IncomingWebhookIntegration.ts +141 -0
- package/src/Incidents/JiraIntegration.ts +83 -0
- package/src/Incidents/LinearIntegration.ts +94 -0
- package/src/Incidents/Metadata.ts +133 -0
- package/src/Incidents/Monitor.ts +150 -0
- package/src/Incidents/MonitorGroup.ts +91 -0
- package/src/Incidents/NewRelicIntegration.ts +102 -0
- package/src/Incidents/OnCallRotation.ts +295 -0
- package/src/Incidents/OnCallSchedule.ts +115 -0
- package/src/Incidents/OutgoingEmailIntegration.ts +84 -0
- package/src/Incidents/OutgoingPagerDutyIntegration.ts +78 -0
- package/src/Incidents/OutgoingWebhookIntegration.ts +147 -0
- package/src/Incidents/PrometheusIntegration.ts +109 -0
- package/src/Incidents/Reference.ts +210 -0
- package/src/Incidents/ReportHeartbeat.ts +149 -0
- package/src/Incidents/ReportHeartbeatHttp.ts +30 -0
- package/src/Incidents/ResolveIncident.ts +74 -0
- package/src/Incidents/ResolveIncidentHttp.ts +28 -0
- package/src/Incidents/SendHeartbeat.ts +62 -0
- package/src/Incidents/SendHeartbeatHttp.ts +28 -0
- package/src/Incidents/Severity.ts +123 -0
- package/src/Incidents/SeverityGroup.ts +82 -0
- package/src/Incidents/SplunkOnCallIntegration.ts +76 -0
- package/src/Incidents/StatusPage.ts +178 -0
- package/src/Incidents/StatusPageGroup.ts +81 -0
- package/src/Incidents/StatusPageResource.ts +128 -0
- package/src/Incidents/StatusPageSection.ts +105 -0
- package/src/Incidents/StatusPageSubscriber.ts +163 -0
- package/src/Incidents/index.ts +213 -0
- package/src/Incidents/integrationFields.ts +174 -0
- package/src/Providers.ts +78 -0
- package/src/Telemetry/Alert.ts +135 -0
- package/src/Telemetry/AwsLogGroupSubscription.ts +97 -0
- package/src/Telemetry/BindingHttp.ts +40 -0
- package/src/Telemetry/Chart.ts +251 -0
- package/src/Telemetry/Collector.ts +157 -0
- package/src/Telemetry/CollectorTarget.ts +108 -0
- package/src/Telemetry/Connection.ts +182 -0
- package/src/Telemetry/Dashboard.ts +152 -0
- package/src/Telemetry/DashboardChart.ts +177 -0
- package/src/Telemetry/DashboardGroup.ts +86 -0
- package/src/Telemetry/DashboardSection.ts +115 -0
- package/src/Telemetry/Exploration.ts +139 -0
- package/src/Telemetry/ExplorationGroup.ts +93 -0
- package/src/Telemetry/Export.ts +263 -0
- package/src/Telemetry/ExtractedMetric.ts +112 -0
- package/src/Telemetry/IngestLogs.ts +95 -0
- package/src/Telemetry/IngestLogsHttp.ts +28 -0
- package/src/Telemetry/IngestMetrics.ts +76 -0
- package/src/Telemetry/IngestMetricsHttp.ts +28 -0
- package/src/Telemetry/OtelHeaders.ts +52 -0
- package/src/Telemetry/Query.ts +75 -0
- package/src/Telemetry/QueryHttp.ts +40 -0
- package/src/Telemetry/Reference.ts +164 -0
- package/src/Telemetry/ShipLogs.ts +162 -0
- package/src/Telemetry/Source.ts +328 -0
- package/src/Telemetry/SourceAwsAccount.ts +110 -0
- package/src/Telemetry/SourceGcpProject.ts +125 -0
- package/src/Telemetry/SourceGroup.ts +111 -0
- package/src/Telemetry/customBucket.ts +62 -0
- package/src/Telemetry/index.ts +104 -0
- package/src/globals.d.ts +4 -0
- package/src/index.ts +13 -0
- package/src/internal/DeployRetry.ts +64 -0
- package/src/internal/actionWait.ts +23 -0
- package/src/internal/applicationIds.ts +21 -0
- package/src/internal/attachments.ts +40 -0
- package/src/internal/budget.ts +69 -0
- package/src/internal/connection.ts +233 -0
- package/src/internal/crud.ts +1053 -0
- package/src/internal/errors.ts +32 -0
- package/src/internal/fields.ts +162 -0
- package/src/internal/gone.ts +19 -0
- package/src/internal/managedDatabase.ts +331 -0
- package/src/internal/managedService.ts +419 -0
- package/src/internal/migrations.ts +484 -0
- package/src/internal/ops.ts +86 -0
- package/src/internal/ownership.ts +84 -0
- package/src/internal/reference.ts +100 -0
- package/src/internal/scope.ts +84 -0
- package/src/internal/snapshot.ts +170 -0
- package/src/internal/unpaged.ts +29 -0
- package/src/internal/wait.ts +88 -0
- package/src/sdk/credentials.ts +222 -0
- package/src/sdk/errors.ts +125 -0
- package/src/sdk/index.ts +69 -0
- package/src/sdk/pagination.ts +100 -0
- package/src/sdk/protocol.ts +565 -0
- package/src/sdk/retry.ts +50 -0
- package/src/sdk/services/account.ts +1079 -0
- package/src/sdk/services/cloud.ts +38638 -0
- package/src/sdk/services/errors.ts +6182 -0
- package/src/sdk/services/heartbeat.ts +144 -0
- package/src/sdk/services/incidents.ts +25835 -0
- package/src/sdk/services/index.ts +8 -0
- package/src/sdk/services/ingest.ts +383 -0
- package/src/sdk/services/telemetry.ts +14868 -0
- package/src/sdk/traits.ts +77 -0
|
@@ -0,0 +1,765 @@
|
|
|
1
|
+
// Adapted from @alchemy.run/hetzner@2.0.0-beta.87 (Apache-2.0), src/Service.ts; modified.
|
|
2
|
+
import { DockerLive } from "@alchemy.run/docker/Docker";
|
|
3
|
+
import { buildImageArchive, hashImageArchive, } from "@alchemy.run/docker/ImageArchive";
|
|
4
|
+
import * as Bundle from "alchemy/Bundle/Bundle";
|
|
5
|
+
import { diffBindings, havePropsChanged, isResolved } from "alchemy/Diff";
|
|
6
|
+
import { createPhysicalName } from "alchemy/PhysicalName";
|
|
7
|
+
import { Platform } from "alchemy/Platform";
|
|
8
|
+
import * as Provider from "alchemy/Provider";
|
|
9
|
+
import { Resource } from "alchemy/Resource";
|
|
10
|
+
import { Stack } from "alchemy/Stack";
|
|
11
|
+
import * as Context from "effect/Context";
|
|
12
|
+
import * as Data from "effect/Data";
|
|
13
|
+
import * as Duration from "effect/Duration";
|
|
14
|
+
import * as Effect from "effect/Effect";
|
|
15
|
+
import * as FileSystem from "effect/FileSystem";
|
|
16
|
+
import * as Redacted from "effect/Redacted";
|
|
17
|
+
import * as Semaphore from "effect/Semaphore";
|
|
18
|
+
import { budgetsFor } from "../internal/budget.js";
|
|
19
|
+
import * as Cloud from "../sdk/services/cloud.js";
|
|
20
|
+
import { appDirOf, classifyExit, collectBindingState, composeEnv, containerEnvFile, createCloudHostedSupport, createCloudHostRuntimeContext, dockerScript, ensureAttached, healthScript, mountScript, nodeScript, removeScript, renderImageUnit, renderUnit, startImageScript, startScript, systemdEnvFile, toolsScript, unmountScript, waitForSsh, ServiceStepTimeout, } from "./hosted.js";
|
|
21
|
+
import { isValidMountPath, MountPathInvalid } from "./MountVolume.js";
|
|
22
|
+
import { openSshClient, shellQuote, sshHostOf, SshConnector, } from "./Ssh.js";
|
|
23
|
+
export { InvalidEnvKey, MountVolumeError, ServiceHostSetupFailed, ServiceNotHealthy, ServiceStepTimeout, } from "./hosted.js";
|
|
24
|
+
const TYPE = "BetterStack.Cloud.Service";
|
|
25
|
+
export const isService = (value) => typeof value === "object" &&
|
|
26
|
+
value !== null &&
|
|
27
|
+
value.Type === "BetterStack.Cloud.Service";
|
|
28
|
+
/**
|
|
29
|
+
* Your own code on a Better Stack Cloud server: an Effect program Alchemy
|
|
30
|
+
* bundles with Rolldown, copies over SSH to a {@link Server}, and runs as a
|
|
31
|
+
* systemd unit with `Restart=always`. HTTP Services (`fetch`, gated on
|
|
32
|
+
* `/health` at deploy), background Services (`ServerHost.run`), `env` and
|
|
33
|
+
* `Config`, several Services per server, volumes through
|
|
34
|
+
* `Cloud.MountVolume`, a container form (`context`) and an async form (a
|
|
35
|
+
* plain `fetch(request, env)` handler). The port of `@alchemy.run/hetzner`'s
|
|
36
|
+
* `Service`: switching providers is changing the import and the server.
|
|
37
|
+
*
|
|
38
|
+
* @see https://betterstack.com/docs/cloud/servers/
|
|
39
|
+
*
|
|
40
|
+
* ### Declaring a Service
|
|
41
|
+
* A Service is a class: an id, the infrastructure props, and the program.
|
|
42
|
+
* `server` is the machine (a `Cloud.Server`, or the module-scope
|
|
43
|
+
* declaration of one); `main: import.meta.url` makes this file the bundle's
|
|
44
|
+
* entry; `port` is written to `PORT`. Returning `fetch` boots an HTTP server
|
|
45
|
+
* on that port. The resolved Service exposes `url`, `port`, `unitName`,
|
|
46
|
+
* `serverId`, `ipv4`/`ipv6` and the bundle's `code.hash`.
|
|
47
|
+
*
|
|
48
|
+
* **Example:** An HTTP Service
|
|
49
|
+
* ```typescript
|
|
50
|
+
* // src/server.ts
|
|
51
|
+
* export const Box = BetterStack.Cloud.Server("Box", {
|
|
52
|
+
* serverType: "AM1",
|
|
53
|
+
* image: "ubuntu-26-04",
|
|
54
|
+
* });
|
|
55
|
+
*
|
|
56
|
+
* // src/api.ts
|
|
57
|
+
* export default class Api extends BetterStack.Cloud.Service<Api>()(
|
|
58
|
+
* "Api",
|
|
59
|
+
* { server: Box, main: import.meta.url, port: 3000 },
|
|
60
|
+
* Effect.gen(function* () {
|
|
61
|
+
* return {
|
|
62
|
+
* fetch: Effect.gen(function* () {
|
|
63
|
+
* const request = yield* HttpServerRequest;
|
|
64
|
+
* if (new URL(request.url, "http://x").pathname === "/health") {
|
|
65
|
+
* return yield* HttpServerResponse.json({ ok: true });
|
|
66
|
+
* }
|
|
67
|
+
* return HttpServerResponse.text("hello");
|
|
68
|
+
* }),
|
|
69
|
+
* };
|
|
70
|
+
* }),
|
|
71
|
+
* ) {}
|
|
72
|
+
*
|
|
73
|
+
* // alchemy.run.ts
|
|
74
|
+
* const api = yield* Api;
|
|
75
|
+
* // api.url === "http://<server ipv4>:3000"
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* ### What a deploy does
|
|
79
|
+
* One SSH session as `root` with the server's Alchemy-managed deploy key:
|
|
80
|
+
*
|
|
81
|
+
* 1. Bundle `main` with Rolldown into one ESM file, `index.mjs`. A generated
|
|
82
|
+
* entry imports only `betterstack-alchemy/Cloud/Bootstrap` and your
|
|
83
|
+
* module; the bootstrap wires the Node HTTP server, logging, and
|
|
84
|
+
* `Config` from the environment.
|
|
85
|
+
* 2. Wait for SSH, then for cloud-init (`cloud-init status --wait`: the
|
|
86
|
+
* server's bootstrap installs Node.js), install `curl`/`unzip` if
|
|
87
|
+
* missing, and Node.js 26 from NodeSource if missing or older (a server
|
|
88
|
+
* with its own `userData` has none).
|
|
89
|
+
* 3. Attach and mount any bound volumes (see "Volumes").
|
|
90
|
+
* 4. Copy `bundle.zip`, the env file and the unit, unpack into
|
|
91
|
+
* `/opt/<unitName>/`, `systemctl daemon-reload`, `enable --now`,
|
|
92
|
+
* `restart`. The unit:
|
|
93
|
+
*
|
|
94
|
+
* ```ini
|
|
95
|
+
* [Service]
|
|
96
|
+
* Type=simple
|
|
97
|
+
* WorkingDirectory=/opt/<unitName>
|
|
98
|
+
* EnvironmentFile=-/opt/<unitName>/env
|
|
99
|
+
* Environment=HOST=0.0.0.0
|
|
100
|
+
* Environment=ALCHEMY_SHUTDOWN_TIMEOUT_MS=30000
|
|
101
|
+
* ExecStart=/usr/bin/env node /opt/<unitName>/index.mjs
|
|
102
|
+
* KillSignal=SIGTERM
|
|
103
|
+
* TimeoutStopSec=30
|
|
104
|
+
* Restart=always
|
|
105
|
+
* RestartSec=5
|
|
106
|
+
* ```
|
|
107
|
+
*
|
|
108
|
+
* 5. Wait until the unit is active and, when `port` is set,
|
|
109
|
+
* `http://127.0.0.1:<port>/health` answers 2xx (60 seconds, polled every
|
|
110
|
+
* 2). Otherwise the deploy fails with `ServiceNotHealthy`, whose message
|
|
111
|
+
* holds `systemctl status` and the unit's last 80 journal lines.
|
|
112
|
+
*
|
|
113
|
+
* On later deploys Alchemy compares the bundle's content hash with the
|
|
114
|
+
* deployed one: unchanged code, env and bindings are a no-op with no SSH
|
|
115
|
+
* at all; changed code or env re-copies and restarts the unit, a few
|
|
116
|
+
* seconds end to end. A new `server` replaces the Service (deployed on the
|
|
117
|
+
* new server, then removed from the old). Deleting stops and disables the
|
|
118
|
+
* unit and removes its files.
|
|
119
|
+
*
|
|
120
|
+
* ### Graceful stop
|
|
121
|
+
* `systemctl stop` and every redeploy's `restart` send SIGTERM. The process
|
|
122
|
+
* then stops accepting connections, lets in-flight requests finish, stops
|
|
123
|
+
* `ServerHost.run` loops and closes its scopes, so finalizers run (a
|
|
124
|
+
* `Telemetry.ShipLogs` / OTLP exporter flushes its buffer) before it exits.
|
|
125
|
+
* The budget is 30 seconds (`ALCHEMY_SHUTDOWN_TIMEOUT_MS`, alchemy's managed
|
|
126
|
+
* shutdown): connections still open at 80% of it are closed, and at 90% the
|
|
127
|
+
* process exits anyway, before systemd's `TimeoutStopSec` would kill it.
|
|
128
|
+
* An async Service's `fetch` handler gets the same drain.
|
|
129
|
+
*
|
|
130
|
+
* ### Trust: host keys
|
|
131
|
+
* Every SSH connection a deploy makes requires the server's host key
|
|
132
|
+
* (`StrictHostKeyChecking=yes` against a per-session `known_hosts`): the key
|
|
133
|
+
* Alchemy generated and installed through the server's bootstrap
|
|
134
|
+
* (`hostKeyTrust: "pinned"`), or the one recorded at the server's first login
|
|
135
|
+
* (`"first-use"`, a server with your own `userData`). A server that presents
|
|
136
|
+
* another key gets nothing — no bundle, no env file — and the deploy fails
|
|
137
|
+
* with `SshError` `reason: "host-key-mismatch"`. A server with no recorded
|
|
138
|
+
* key (created before host keys were pinned, `bootstrap: false`) is
|
|
139
|
+
* trusted on first use for that deploy, with a warning.
|
|
140
|
+
*
|
|
141
|
+
* ### Verified live
|
|
142
|
+
* On one `AM1` (2026-12-01): an HTTP Service with `/health` and a
|
|
143
|
+
* background worker deployed, updated with new code and env, and removed
|
|
144
|
+
* cleanly (units, files and the mount gone); `Cloud.MountVolume` at a custom
|
|
145
|
+
* path with our fstab line once; the unit's 30 s stop timeout; a
|
|
146
|
+
* `Website.StaticSite` on the same server. NOT live-verified: the container
|
|
147
|
+
* form, the async form, host-key pinning (added after that run), a step
|
|
148
|
+
* timeout, `build.install`.
|
|
149
|
+
*
|
|
150
|
+
* ### The /health rule
|
|
151
|
+
* A Service with a `port` **must serve `/health`**: the deploy polls it and
|
|
152
|
+
* fails, with the unit's journal, when it never answers. Keep it trivial.
|
|
153
|
+
*
|
|
154
|
+
* ### Reachability
|
|
155
|
+
* `url` is the server's public IP and the Service's port: no proxy in
|
|
156
|
+
* between. A Better Stack Cloud server with a `Cloud.Firewall` attached
|
|
157
|
+
* admits only what its rules allow, so open the port (and keep `tcp/22`
|
|
158
|
+
* open to the deploying machine, which the deploy needs):
|
|
159
|
+
*
|
|
160
|
+
* **Example:** Open the Service's port
|
|
161
|
+
* ```typescript
|
|
162
|
+
* const firewall = yield* BetterStack.Cloud.Firewall("Fw", {});
|
|
163
|
+
* yield* BetterStack.Cloud.FirewallRule("Ssh", {
|
|
164
|
+
* firewallId: firewall.id,
|
|
165
|
+
* direction: "inbound",
|
|
166
|
+
* protocol: "tcp",
|
|
167
|
+
* portFrom: 22,
|
|
168
|
+
* ipAddresses: ["0.0.0.0/0", "::/0"],
|
|
169
|
+
* });
|
|
170
|
+
* yield* BetterStack.Cloud.FirewallRule("Api", {
|
|
171
|
+
* firewallId: firewall.id,
|
|
172
|
+
* direction: "inbound",
|
|
173
|
+
* protocol: "tcp",
|
|
174
|
+
* portFrom: 3000,
|
|
175
|
+
* ipAddresses: ["0.0.0.0/0", "::/0"],
|
|
176
|
+
* });
|
|
177
|
+
* ```
|
|
178
|
+
*
|
|
179
|
+
* For a stable front door with health checks and TLS, put a
|
|
180
|
+
* `Cloud.LoadBalancer` in front and allow the port from the private
|
|
181
|
+
* network only.
|
|
182
|
+
*
|
|
183
|
+
* ### Environment and Config
|
|
184
|
+
* Pass values with `env` and read them through Effect's `Config` (the
|
|
185
|
+
* runtime's `ConfigProvider` reads the process environment). Alchemy also
|
|
186
|
+
* sets `PORT` (with `port`), `HOST`, `ALCHEMY_STACK_NAME`, `ALCHEMY_STAGE`
|
|
187
|
+
* and `ALCHEMY_PHASE=runtime`. A `Config` read in the implementation at
|
|
188
|
+
* deploy time is captured into the env as well. `Redacted` values (an
|
|
189
|
+
* Errors DSN, a source token, a value a binding sets through
|
|
190
|
+
* `RuntimeContext`) land in clear text only in the env file on the server
|
|
191
|
+
* (`/opt/<unitName>/env`, mode 600), never in SSH command lines, the
|
|
192
|
+
* Service's attributes or the plan output (shown `(redacted)`). The state
|
|
193
|
+
* file keeps them inside the state store's `__redacted__` marker — in clear
|
|
194
|
+
* text there with the default local state, as it keeps every secret
|
|
195
|
+
* (the server's deploy key included): protect `.alchemy/state`.
|
|
196
|
+
*
|
|
197
|
+
* **Example:** `env` + `Config`
|
|
198
|
+
* ```typescript
|
|
199
|
+
* export default class Api extends BetterStack.Cloud.Service<Api>()(
|
|
200
|
+
* "Api",
|
|
201
|
+
* { server: Box, main: import.meta.url, port: 3000, env: { GREETING: "hello" } },
|
|
202
|
+
* Effect.gen(function* () {
|
|
203
|
+
* return {
|
|
204
|
+
* fetch: Effect.gen(function* () {
|
|
205
|
+
* const greeting = yield* Config.String("GREETING");
|
|
206
|
+
* return HttpServerResponse.text(greeting);
|
|
207
|
+
* }).pipe(Effect.orDie),
|
|
208
|
+
* };
|
|
209
|
+
* }),
|
|
210
|
+
* ) {}
|
|
211
|
+
* ```
|
|
212
|
+
*
|
|
213
|
+
* ### Background services
|
|
214
|
+
* Leave out `port` and `fetch` and register a long-running loop with
|
|
215
|
+
* `ServerHost.run`: a worker, a queue consumer, a scheduler. systemd
|
|
216
|
+
* supervises it: when the loop exits or crashes, the unit restarts after
|
|
217
|
+
* 5 seconds.
|
|
218
|
+
*
|
|
219
|
+
* **Example:** A worker
|
|
220
|
+
* ```typescript
|
|
221
|
+
* export default class Worker extends BetterStack.Cloud.Service<Worker>()(
|
|
222
|
+
* "Worker",
|
|
223
|
+
* { server: Box, main: import.meta.url },
|
|
224
|
+
* Effect.gen(function* () {
|
|
225
|
+
* const host = yield* ServerHost;
|
|
226
|
+
* yield* host.run(
|
|
227
|
+
* Effect.gen(function* () {
|
|
228
|
+
* yield* Effect.log("tick");
|
|
229
|
+
* }).pipe(Effect.repeat(Schedule.spaced("1 minute")), Effect.asVoid),
|
|
230
|
+
* );
|
|
231
|
+
* }),
|
|
232
|
+
* ) {}
|
|
233
|
+
* ```
|
|
234
|
+
*
|
|
235
|
+
* ### Several Services on one server
|
|
236
|
+
* Each Service is its own unit with its own bundle, env file and
|
|
237
|
+
* lifecycle. Point several at the same `server`; two Services mounting the
|
|
238
|
+
* same volume at the same path share one attach and one mount.
|
|
239
|
+
*
|
|
240
|
+
* ### Volumes
|
|
241
|
+
* Bind a `Cloud.Volume` with `Cloud.MountVolume` inside the implementation
|
|
242
|
+
* and use it as a directory. The deploy attaches it to the Service's server
|
|
243
|
+
* (Cloud API), mounts its device at the path and adds a `nofail`
|
|
244
|
+
* `/etc/fstab` line; when no Service binds the path any more it is
|
|
245
|
+
* unmounted again.
|
|
246
|
+
*
|
|
247
|
+
* **Example:** Mount a volume
|
|
248
|
+
* ```typescript
|
|
249
|
+
* export default class Api extends BetterStack.Cloud.Service<Api>()(
|
|
250
|
+
* "Api",
|
|
251
|
+
* { server: Box, main: import.meta.url, port: 3000 },
|
|
252
|
+
* Effect.gen(function* () {
|
|
253
|
+
* const mount = yield* BetterStack.Cloud.MountVolume(Data, { path: "/data" });
|
|
254
|
+
* return {
|
|
255
|
+
* fetch: Effect.gen(function* () {
|
|
256
|
+
* const fs = yield* FileSystem.FileSystem;
|
|
257
|
+
* const text = yield* fs.readFileString(`${mount.path}/hello.txt`);
|
|
258
|
+
* return HttpServerResponse.text(text);
|
|
259
|
+
* }).pipe(Effect.orDie),
|
|
260
|
+
* };
|
|
261
|
+
* }).pipe(Effect.provide(BetterStack.Cloud.MountVolumeLive)),
|
|
262
|
+
* ) {}
|
|
263
|
+
* ```
|
|
264
|
+
*
|
|
265
|
+
* ### Logs
|
|
266
|
+
* A Service logs to the systemd journal. Read it over SSH:
|
|
267
|
+
*
|
|
268
|
+
* ```sh
|
|
269
|
+
* ssh root@<sshHost> journalctl -u <unitName> -f
|
|
270
|
+
* ```
|
|
271
|
+
*
|
|
272
|
+
* or from a stack with `Cloud.Ssh`. Ship the logs to Better Stack with a
|
|
273
|
+
* `Telemetry.Source` (see "Observability"). A failed deploy already prints
|
|
274
|
+
* the last 80 journal lines.
|
|
275
|
+
*
|
|
276
|
+
* ### Running your own image
|
|
277
|
+
* **Example:** A Dockerfile build, run with Docker on the server
|
|
278
|
+
* ```typescript
|
|
279
|
+
* const worker = yield* BetterStack.Cloud.Service("Worker", {
|
|
280
|
+
* server,
|
|
281
|
+
* context: "./worker",
|
|
282
|
+
* env: { QUEUE: "jobs" },
|
|
283
|
+
* });
|
|
284
|
+
* ```
|
|
285
|
+
*
|
|
286
|
+
* The image is built with the local Docker CLI for `platform`, saved, copied
|
|
287
|
+
* over SSH and `docker load`ed; the unit runs `docker run --network host`
|
|
288
|
+
* with the env (multi-line values included) and the bound volumes as
|
|
289
|
+
* `-v <path>:<path>`.
|
|
290
|
+
*
|
|
291
|
+
* ### Async Services
|
|
292
|
+
* You don't have to use Effect. Call `Service` with `main` pointing at a
|
|
293
|
+
* file and no implementation: the file is bundled with a small `node:http`
|
|
294
|
+
* adapter and no Effect runtime. A `default` export with
|
|
295
|
+
* `fetch(request, env)` is served on `PORT`; any other module simply runs
|
|
296
|
+
* (a plain Node program). {@link InferEnv} types `env`.
|
|
297
|
+
*
|
|
298
|
+
* **Example:** Declare an async Service
|
|
299
|
+
* ```typescript
|
|
300
|
+
* export const Ping = BetterStack.Cloud.Service("Ping", {
|
|
301
|
+
* server: Box,
|
|
302
|
+
* main: "./src/ping.ts",
|
|
303
|
+
* port: 3001,
|
|
304
|
+
* env: { GREETING: "pong" },
|
|
305
|
+
* });
|
|
306
|
+
* export type PingEnv = BetterStack.Cloud.InferEnv<typeof Ping>;
|
|
307
|
+
* ```
|
|
308
|
+
*
|
|
309
|
+
* **Example:** The handler
|
|
310
|
+
* ```typescript
|
|
311
|
+
* import type { PingEnv } from "../alchemy.run.ts";
|
|
312
|
+
*
|
|
313
|
+
* export default {
|
|
314
|
+
* async fetch(request: Request, env: PingEnv) {
|
|
315
|
+
* if (new URL(request.url).pathname === "/health") return new Response("ok");
|
|
316
|
+
* return new Response(env.GREETING);
|
|
317
|
+
* },
|
|
318
|
+
* };
|
|
319
|
+
* ```
|
|
320
|
+
*
|
|
321
|
+
* ### Observability
|
|
322
|
+
* Better Stack is also where the Service is watched from. Instrument the
|
|
323
|
+
* code with Effect's own OpenTelemetry — a named span per unit of work
|
|
324
|
+
* (`Effect.fn`), attributes on the span, structured logs with annotations,
|
|
325
|
+
* `Metric`s — and provide ONE `Telemetry.Export` layer: traces, logs and
|
|
326
|
+
* metrics reach an OpenTelemetry source with that source's own token. Error
|
|
327
|
+
* tracking (`Errors.Dsn`), a heartbeat (`Incidents.heartbeatJob`) and an
|
|
328
|
+
* uptime monitor complete it (`examples/observability` is this stack,
|
|
329
|
+
* runnable). Each credential arrives through a binding, as a secret in the
|
|
330
|
+
* env file only.
|
|
331
|
+
*
|
|
332
|
+
* **Example:** Spans, logs and metrics of the Api, exported to one source
|
|
333
|
+
* ```typescript
|
|
334
|
+
* export const Otel = BetterStack.Telemetry.Source("Otel", { platform: "open_telemetry" });
|
|
335
|
+
* export const Errors = BetterStack.Errors.Application("Errors", { platform: "node_errors" });
|
|
336
|
+
*
|
|
337
|
+
* const ordersPlaced = Metric.counter("orders_placed", { incremental: true });
|
|
338
|
+
*
|
|
339
|
+
* const placeOrder = Effect.fn("orders.place")(function* (orderId: string) {
|
|
340
|
+
* yield* Effect.annotateCurrentSpan({ "order.id": orderId });
|
|
341
|
+
* yield* Metric.update(ordersPlaced, 1);
|
|
342
|
+
* yield* Effect.logInfo("order placed").pipe(Effect.annotateLogs({ orderId }));
|
|
343
|
+
* });
|
|
344
|
+
*
|
|
345
|
+
* export default class Api extends BetterStack.Cloud.Service<Api>()(
|
|
346
|
+
* "Api",
|
|
347
|
+
* { server: Box, main: import.meta.url, port: 3000 },
|
|
348
|
+
* Effect.gen(function* () {
|
|
349
|
+
* yield* BetterStack.Errors.Dsn(Errors); // SENTRY_DSN for a Sentry SDK
|
|
350
|
+
* return {
|
|
351
|
+
* fetch: Effect.gen(function* () {
|
|
352
|
+
* yield* placeOrder("o-1");
|
|
353
|
+
* return HttpServerResponse.text("ok");
|
|
354
|
+
* }),
|
|
355
|
+
* };
|
|
356
|
+
* }).pipe(
|
|
357
|
+
* Effect.provide(
|
|
358
|
+
* Layer.mergeAll(
|
|
359
|
+
* BetterStack.Errors.DsnLive,
|
|
360
|
+
* BetterStack.Telemetry.Export({ source: Otel, serviceName: "api" }),
|
|
361
|
+
* ),
|
|
362
|
+
* ),
|
|
363
|
+
* ),
|
|
364
|
+
* ) {}
|
|
365
|
+
* ```
|
|
366
|
+
*
|
|
367
|
+
* **Example:** A heartbeat for the worker's job, a monitor on the Api
|
|
368
|
+
* ```typescript
|
|
369
|
+
* export const JobDone = BetterStack.Incidents.Heartbeat("JobDone", { period: 300, grace: 120 });
|
|
370
|
+
*
|
|
371
|
+
* const runJob = Effect.fn("worker.export")(function* () {
|
|
372
|
+
* yield* Effect.logInfo("export finished");
|
|
373
|
+
* });
|
|
374
|
+
*
|
|
375
|
+
* export default class Worker extends BetterStack.Cloud.Service<Worker>()(
|
|
376
|
+
* "Worker",
|
|
377
|
+
* { server: Box, main: import.meta.url },
|
|
378
|
+
* Effect.gen(function* () {
|
|
379
|
+
* const watched = yield* BetterStack.Incidents.heartbeatJob(JobDone);
|
|
380
|
+
* const inHost = yield* BetterStack.withHostRuntime;
|
|
381
|
+
* const host = yield* ServerHost;
|
|
382
|
+
* yield* host.run(
|
|
383
|
+
* inHost(watched(runJob()).pipe(Effect.ignore, Effect.repeat(Schedule.spaced("5 minutes")))),
|
|
384
|
+
* );
|
|
385
|
+
* }).pipe(
|
|
386
|
+
* Effect.provide(
|
|
387
|
+
* Layer.mergeAll(
|
|
388
|
+
* BetterStack.Incidents.SendHeartbeatHttp,
|
|
389
|
+
* BetterStack.Incidents.ReportHeartbeatHttp,
|
|
390
|
+
* BetterStack.Telemetry.Export({ source: Otel, serviceName: "worker" }),
|
|
391
|
+
* ),
|
|
392
|
+
* ),
|
|
393
|
+
* ),
|
|
394
|
+
* ) {}
|
|
395
|
+
*
|
|
396
|
+
* // alchemy.run.ts
|
|
397
|
+
* const api = yield* Api;
|
|
398
|
+
* yield* BetterStack.Incidents.Monitor("ApiUp", {
|
|
399
|
+
* url: Output.interpolate`${api.url}/health`,
|
|
400
|
+
* monitorType: "status",
|
|
401
|
+
* });
|
|
402
|
+
* ```
|
|
403
|
+
*
|
|
404
|
+
* The source token, DSN and heartbeat URL are `Redacted`: they reach the
|
|
405
|
+
* server only inside the env file. A failed or missing job run raises an
|
|
406
|
+
* incident; a dead Api fails the monitor.
|
|
407
|
+
*
|
|
408
|
+
* @resource
|
|
409
|
+
* @product Cloud
|
|
410
|
+
*/
|
|
411
|
+
export const Service = Platform("BetterStack.Cloud.Service", {
|
|
412
|
+
createRuntimeContext: createCloudHostRuntimeContext("BetterStack.Cloud.Service"),
|
|
413
|
+
// `{ server: Box }` at module scope is an Effect. Yield it here so the
|
|
414
|
+
// server is registered and `news.server` is its resolved attributes at
|
|
415
|
+
// reconcile (the same DX as `yield* Server(...)` inside Effect.gen).
|
|
416
|
+
transformProps: (_id, props) => Effect.gen(function* () {
|
|
417
|
+
if (globalThis.__ALCHEMY_RUNTIME__)
|
|
418
|
+
return props;
|
|
419
|
+
const server = Effect.isEffect(props.server)
|
|
420
|
+
? yield* props.server
|
|
421
|
+
: props.server;
|
|
422
|
+
return { ...props, server };
|
|
423
|
+
}),
|
|
424
|
+
});
|
|
425
|
+
/** The Service's props can't be deployed: no server, no address, no deploy key, or not exactly one of `main`/`context`. */
|
|
426
|
+
export class ServiceError extends Data.TaggedError("ServiceError") {
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Replace how a container Service (`context`) builds its image archive
|
|
430
|
+
* (default `undefined`: `docker build` + `docker save` with the local Docker
|
|
431
|
+
* CLI). Read once, when the provider layer is built. Offline tests provide
|
|
432
|
+
* a fake that returns bytes.
|
|
433
|
+
*/
|
|
434
|
+
export const ServiceImageBuilder = Context.Reference("betterstack-alchemy/Cloud/ServiceImageBuilder", { defaultValue: () => undefined });
|
|
435
|
+
const DEFAULT_PORT = 3000;
|
|
436
|
+
/** How long each remote step may take (each overridable as `WaitBudgets` `step-<name>`). */
|
|
437
|
+
const STEP_BUDGETS = {
|
|
438
|
+
// cloud-init on a fresh server (it installs Node.js), then apt for curl/unzip.
|
|
439
|
+
tools: { timeout: "20 minutes", interval: "1 second" },
|
|
440
|
+
node: { timeout: "15 minutes", interval: "1 second" },
|
|
441
|
+
docker: { timeout: "15 minutes", interval: "1 second" },
|
|
442
|
+
mount: { timeout: "3 minutes", interval: "1 second" },
|
|
443
|
+
unmount: { timeout: "2 minutes", interval: "1 second" },
|
|
444
|
+
chmod: { timeout: "1 minute", interval: "1 second" },
|
|
445
|
+
// unzip, `npm install` when `build.install` is set, systemctl.
|
|
446
|
+
start: { timeout: "15 minutes", interval: "1 second" },
|
|
447
|
+
// On top of the health budget itself.
|
|
448
|
+
health: { timeout: "2 minutes", interval: "1 second" },
|
|
449
|
+
};
|
|
450
|
+
const DEFAULTS = {
|
|
451
|
+
ssh: { timeout: "5 minutes", interval: "5 seconds" },
|
|
452
|
+
health: { timeout: "60 seconds", interval: "2 seconds" },
|
|
453
|
+
attach: { timeout: "20 minutes", interval: "3 seconds" },
|
|
454
|
+
/** An attached volume's `devicePath` / `mountPath` showing up in the API. */
|
|
455
|
+
device: { timeout: "2 minutes", interval: "3 seconds" },
|
|
456
|
+
};
|
|
457
|
+
const text = (value) => typeof value === "string" && value.length > 0 ? value : undefined;
|
|
458
|
+
const serverIdOf = (value) => {
|
|
459
|
+
if (value === null || typeof value !== "object")
|
|
460
|
+
return undefined;
|
|
461
|
+
const rec = value;
|
|
462
|
+
return text(rec.serverId) ?? text(rec.id);
|
|
463
|
+
};
|
|
464
|
+
const reveal = (value) => Redacted.isRedacted(value) ? text(Redacted.value(value)) : text(value);
|
|
465
|
+
const createUnitName = (id, existing) => existing !== undefined
|
|
466
|
+
? Effect.succeed(existing)
|
|
467
|
+
: createPhysicalName({ id, maxLength: 64, lowercase: true }).pipe(Effect.map((name) => name.replaceAll(/[^a-z0-9-]/g, "-")));
|
|
468
|
+
const serviceUrl = (ipv4, ipv6, port) => ipv4 !== undefined
|
|
469
|
+
? `http://${ipv4}:${port}`
|
|
470
|
+
: ipv6 !== undefined
|
|
471
|
+
? `http://[${ipv6}]:${port}`
|
|
472
|
+
: undefined;
|
|
473
|
+
/** What decides a redeploy, minus server attributes that don't matter to the unit. */
|
|
474
|
+
const relevant = (props) => {
|
|
475
|
+
const server = props.server;
|
|
476
|
+
return {
|
|
477
|
+
...props,
|
|
478
|
+
server: {
|
|
479
|
+
serverId: serverIdOf(server),
|
|
480
|
+
sshHost: text(server?.sshHost) ?? text(server?.ipv4) ?? text(server?.ipv6),
|
|
481
|
+
ipv4: text(server?.ipv4),
|
|
482
|
+
ipv6: text(server?.ipv6),
|
|
483
|
+
deployKeySlug: text(server?.deployKeySlug),
|
|
484
|
+
},
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
const toSeconds = (input) => Math.max(1, Math.round(Duration.toMillis(Duration.fromInputUnsafe(input)) / 1000));
|
|
488
|
+
export const ServiceProvider = () => Provider.effect(Service, Effect.gen(function* () {
|
|
489
|
+
const stack = yield* Stack;
|
|
490
|
+
const budget = yield* budgetsFor(TYPE);
|
|
491
|
+
const virtualEntryPlugin = yield* Bundle.virtualEntryPlugin;
|
|
492
|
+
const hosted = createCloudHostedSupport({
|
|
493
|
+
stackName: stack.name,
|
|
494
|
+
stage: stack.stage,
|
|
495
|
+
virtualEntryPlugin,
|
|
496
|
+
});
|
|
497
|
+
const platform = yield* Effect.context();
|
|
498
|
+
const connectOverride = yield* SshConnector;
|
|
499
|
+
const connect = connectOverride ??
|
|
500
|
+
((target) => openSshClient(target).pipe(Effect.provideContext(platform)));
|
|
501
|
+
const imageOverride = yield* ServiceImageBuilder;
|
|
502
|
+
const buildImage = imageOverride ??
|
|
503
|
+
((source, options) => buildImageArchive(source, options).pipe(Effect.provide(DockerLive), Effect.provideContext(platform)));
|
|
504
|
+
const sourceOf = (props) => ({
|
|
505
|
+
context: props.context,
|
|
506
|
+
dockerfile: props.dockerfile,
|
|
507
|
+
platform: props.platform ?? "linux/amd64",
|
|
508
|
+
});
|
|
509
|
+
/** The SSH target of the Service's server: its address and deploy key. */
|
|
510
|
+
const targetOf = (props, id) => Effect.gen(function* () {
|
|
511
|
+
const server = props.server;
|
|
512
|
+
const host = sshHostOf(server);
|
|
513
|
+
if (host === undefined) {
|
|
514
|
+
return yield* new ServiceError({
|
|
515
|
+
reason: "no-address",
|
|
516
|
+
message: `${TYPE} '${id}': the server has no public address to SSH to`,
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
const privateKey = reveal(server.privateKey);
|
|
520
|
+
if (privateKey === undefined) {
|
|
521
|
+
return yield* new ServiceError({
|
|
522
|
+
reason: "no-deploy-key",
|
|
523
|
+
message: `${TYPE} '${id}': the server has no Alchemy deploy key (it was created with bootstrap: false, or looked up), so the Service can't SSH in`,
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
if (text(server.hostPublicKey) === undefined) {
|
|
527
|
+
yield* Effect.logWarning(`${TYPE} '${id}': the server has no recorded host key (created before host keys were pinned, or with bootstrap: false): this deploy trusts the key it is shown on first use`);
|
|
528
|
+
}
|
|
529
|
+
return {
|
|
530
|
+
host,
|
|
531
|
+
privateKey: Redacted.make(privateKey),
|
|
532
|
+
user: text(server.sshUser) ?? "root",
|
|
533
|
+
// Required on every connection; none known: the session trusts first use (warned).
|
|
534
|
+
hostKey: text(server.hostPublicKey),
|
|
535
|
+
};
|
|
536
|
+
});
|
|
537
|
+
/** Run `body` in one SSH session, closed afterwards. */
|
|
538
|
+
const withSession = (target, body) => Effect.acquireUseRelease(connect(target), (ssh) => body(ssh).pipe(Effect.provideContext(platform)), (ssh) => ssh.close.pipe(Effect.provideContext(platform)));
|
|
539
|
+
// Two Services binding the same volume in one deploy run concurrently:
|
|
540
|
+
// attach and mount it one at a time, so the second finds it attached
|
|
541
|
+
// and mounted instead of racing the first (one attach, one mount).
|
|
542
|
+
const volumeLocks = new Map();
|
|
543
|
+
const volumeLock = (volumeId) => {
|
|
544
|
+
let lock = volumeLocks.get(volumeId);
|
|
545
|
+
if (lock === undefined) {
|
|
546
|
+
lock = Semaphore.makeUnsafe(1);
|
|
547
|
+
volumeLocks.set(volumeId, lock);
|
|
548
|
+
}
|
|
549
|
+
return lock;
|
|
550
|
+
};
|
|
551
|
+
const codeHash = (props) => props.context !== undefined
|
|
552
|
+
? hashImageArchive(sourceOf(props)).pipe(Effect.provideContext(platform))
|
|
553
|
+
: hosted
|
|
554
|
+
.bundleProgram({ ...props, main: props.main ?? "" })
|
|
555
|
+
.pipe(Effect.map(({ hash }) => hash));
|
|
556
|
+
return Service.Provider.of({
|
|
557
|
+
// Not `serverId`/`availabilityZone`: a Service moved to another server is a new one.
|
|
558
|
+
stables: ["unitName"],
|
|
559
|
+
// systemd units have no Cloud API to list them. Nuke deletes the
|
|
560
|
+
// server they live on; an empty list is the documented shape for
|
|
561
|
+
// parent-keyed resources.
|
|
562
|
+
nuke: { dependsOn: ["BetterStack.Cloud.Server"] },
|
|
563
|
+
list: () => Effect.succeed([]),
|
|
564
|
+
diff: Effect.fn(function* ({ news, olds, output, oldBindings, newBindings }) {
|
|
565
|
+
if (!isResolved(news)) {
|
|
566
|
+
// A server created or replaced in this deploy has no id yet: the Service moves to a
|
|
567
|
+
// new server, so it is a replacement (the engine would plan an update, and the old
|
|
568
|
+
// unit would keep running on the old server; finding Y2).
|
|
569
|
+
// Only the server's identity counts: a server that is merely updated in this deploy
|
|
570
|
+
// has its id resolved (a stable) while its other attributes are not.
|
|
571
|
+
const server = news.server;
|
|
572
|
+
const identity = server?.serverId ?? server?.id;
|
|
573
|
+
if (output !== undefined &&
|
|
574
|
+
(identity === undefined || !isResolved(identity))) {
|
|
575
|
+
return { action: "replace" };
|
|
576
|
+
}
|
|
577
|
+
return undefined;
|
|
578
|
+
}
|
|
579
|
+
const next = news;
|
|
580
|
+
const nextServer = serverIdOf(next.server);
|
|
581
|
+
if (output !== undefined && nextServer !== undefined && output.serverId !== nextServer) {
|
|
582
|
+
return { action: "replace" };
|
|
583
|
+
}
|
|
584
|
+
if (output === undefined)
|
|
585
|
+
return undefined;
|
|
586
|
+
if ((next.main === undefined) === (next.context === undefined))
|
|
587
|
+
return undefined;
|
|
588
|
+
if ((yield* codeHash(next)) !== output.code.hash)
|
|
589
|
+
return { action: "update" };
|
|
590
|
+
if (havePropsChanged(relevant(olds), relevant(next))) {
|
|
591
|
+
return { action: "update" };
|
|
592
|
+
}
|
|
593
|
+
if (!isResolved(newBindings))
|
|
594
|
+
return undefined;
|
|
595
|
+
const bindingsChanged = diffBindings(oldBindings, newBindings).some((binding) => binding.action !== "noop");
|
|
596
|
+
return bindingsChanged ? { action: "update" } : { action: "noop" };
|
|
597
|
+
}),
|
|
598
|
+
read: Effect.fn(function* ({ output }) {
|
|
599
|
+
if (output === undefined)
|
|
600
|
+
return undefined;
|
|
601
|
+
const live = yield* Cloud.getServer({
|
|
602
|
+
id: output.serverId,
|
|
603
|
+
availabilityZone: output.availabilityZone,
|
|
604
|
+
}).pipe(Effect.catchTag("NotFound", () => Effect.succeed(undefined)));
|
|
605
|
+
if (live === undefined || live.status === "destroyed" || live.status === "terminated") {
|
|
606
|
+
return undefined;
|
|
607
|
+
}
|
|
608
|
+
const addresses = live.ipAddresses ?? [];
|
|
609
|
+
const ipv4 = addresses.find((a) => a.type === "ipv4" && a.ip)?.ip;
|
|
610
|
+
const ipv6 = addresses.find((a) => a.type === "ipv6" && a.ip)?.ip;
|
|
611
|
+
return { ...output, ipv4, ipv6, url: serviceUrl(ipv4, ipv6, output.port) };
|
|
612
|
+
}),
|
|
613
|
+
reconcile: Effect.fn(function* ({ id, news, output, bindings }) {
|
|
614
|
+
const props = news;
|
|
615
|
+
const server = props.server;
|
|
616
|
+
const serverId = serverIdOf(server);
|
|
617
|
+
if (serverId === undefined) {
|
|
618
|
+
return yield* new ServiceError({
|
|
619
|
+
reason: "no-server",
|
|
620
|
+
message: `${TYPE} '${id}' requires a resolved Cloud.Server`,
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
if ((props.main === undefined) === (props.context === undefined)) {
|
|
624
|
+
return yield* new ServiceError({
|
|
625
|
+
reason: "main-or-context",
|
|
626
|
+
message: `${TYPE} '${id}' takes exactly one of 'main' and 'context'`,
|
|
627
|
+
});
|
|
628
|
+
}
|
|
629
|
+
const target = yield* targetOf(props, id);
|
|
630
|
+
const availabilityZone = text(server.availabilityZone);
|
|
631
|
+
const ipv4 = text(server.ipv4);
|
|
632
|
+
const ipv6 = text(server.ipv6);
|
|
633
|
+
const port = props.port ?? DEFAULT_PORT;
|
|
634
|
+
const unitName = yield* createUnitName(id, output?.unitName);
|
|
635
|
+
const appDir = appDirOf(unitName);
|
|
636
|
+
const { env: bindingEnv, volumes } = collectBindingState(bindings);
|
|
637
|
+
const env = composeEnv({
|
|
638
|
+
bindingEnv,
|
|
639
|
+
alchemyEnv: hosted.alchemyEnv,
|
|
640
|
+
port: props.port,
|
|
641
|
+
env: props.env,
|
|
642
|
+
});
|
|
643
|
+
// Mount paths reach a unit file, fstab and shell scripts: plain absolute paths only (Y10).
|
|
644
|
+
for (const volume of [...volumes, ...(output?.volumes ?? [])]) {
|
|
645
|
+
if (!isValidMountPath(volume.path)) {
|
|
646
|
+
return yield* new MountPathInvalid({
|
|
647
|
+
path: volume.path,
|
|
648
|
+
message: `${TYPE} '${id}': mount path ${JSON.stringify(volume.path)} is not a plain absolute path (letters, digits, '.', '_', '-' and '/' only, no '..')`,
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
const mountPaths = [...new Set(volumes.map((volume) => volume.path))];
|
|
653
|
+
// Mounts this Service had and no longer binds (by path).
|
|
654
|
+
const dropped = (output?.volumes ?? []).filter((old) => !volumes.some((volume) => volume.path === old.path));
|
|
655
|
+
// Build locally first: nothing on the server changes when it fails.
|
|
656
|
+
const image = props.context !== undefined
|
|
657
|
+
? yield* Effect.gen(function* () {
|
|
658
|
+
const fs = yield* FileSystem.FileSystem;
|
|
659
|
+
const dir = yield* fs.makeTempDirectoryScoped({ prefix: "alchemy-betterstack-" });
|
|
660
|
+
const source = sourceOf(props);
|
|
661
|
+
return {
|
|
662
|
+
archive: yield* buildImage(source, {
|
|
663
|
+
tag: `alchemy-${unitName}:latest`,
|
|
664
|
+
output: `${dir}/image.tar`,
|
|
665
|
+
}),
|
|
666
|
+
hash: yield* hashImageArchive(source),
|
|
667
|
+
};
|
|
668
|
+
}).pipe(Effect.scoped, Effect.provideContext(platform))
|
|
669
|
+
: undefined;
|
|
670
|
+
const program = image === undefined
|
|
671
|
+
? yield* hosted.bundleProgram({ ...props, main: props.main ?? "" })
|
|
672
|
+
: undefined;
|
|
673
|
+
const hash = image?.hash ?? program.hash;
|
|
674
|
+
const envFile = image !== undefined ? yield* containerEnvFile(env) : yield* systemdEnvFile(env);
|
|
675
|
+
const unit = image !== undefined
|
|
676
|
+
? renderImageUnit({ unitName, mounts: mountPaths })
|
|
677
|
+
: renderUnit({ unitName, entryRel: program.entryRel, mounts: mountPaths });
|
|
678
|
+
const health = budget("health", DEFAULTS.health);
|
|
679
|
+
const intervalSeconds = toSeconds(health.interval);
|
|
680
|
+
const attempts = Math.max(1, Math.ceil(toSeconds(health.timeout) / intervalSeconds));
|
|
681
|
+
yield* withSession(target, (ssh) => Effect.gen(function* () {
|
|
682
|
+
/** One remote step, bounded by its budget (finding Y12). */
|
|
683
|
+
const run = (step, command, volume) => {
|
|
684
|
+
const limit = Duration.fromInputUnsafe(budget(`step-${step}`, {
|
|
685
|
+
timeout: step === "health"
|
|
686
|
+
? Duration.sum(Duration.fromInputUnsafe(health.timeout), Duration.fromInputUnsafe(STEP_BUDGETS.health.timeout))
|
|
687
|
+
: STEP_BUDGETS[step].timeout,
|
|
688
|
+
interval: "1 second",
|
|
689
|
+
}).timeout);
|
|
690
|
+
return ssh.exec(command).pipe(Effect.catch(classifyExit({ unitName, host: target.host, volume })), Effect.timeoutOrElse({
|
|
691
|
+
duration: limit,
|
|
692
|
+
orElse: () => Effect.fail(new ServiceStepTimeout({
|
|
693
|
+
step,
|
|
694
|
+
unitName,
|
|
695
|
+
host: target.host,
|
|
696
|
+
message: `${TYPE} '${id}': the remote step '${step}' on ${target.host} did not finish within ${Duration.format(limit)}; the SSH command was stopped`,
|
|
697
|
+
})),
|
|
698
|
+
}));
|
|
699
|
+
};
|
|
700
|
+
yield* waitForSsh(ssh, budget("ssh", DEFAULTS.ssh));
|
|
701
|
+
yield* run("tools", toolsScript(appDir));
|
|
702
|
+
yield* run(image !== undefined ? "docker" : "node", image !== undefined ? dockerScript : nodeScript);
|
|
703
|
+
for (const volume of volumes) {
|
|
704
|
+
yield* Effect.gen(function* () {
|
|
705
|
+
const { device, fallbackMount, fsType } = yield* ensureAttached({
|
|
706
|
+
volume,
|
|
707
|
+
serverId,
|
|
708
|
+
availabilityZone,
|
|
709
|
+
attach: budget("attach", DEFAULTS.attach),
|
|
710
|
+
device: budget("device", DEFAULTS.device),
|
|
711
|
+
});
|
|
712
|
+
yield* run("mount", mountScript({ unitName, device, fallbackMount, path: volume.path, fsType }), volume);
|
|
713
|
+
}).pipe(volumeLock(volume.volumeId).withPermits(1));
|
|
714
|
+
}
|
|
715
|
+
for (const volume of dropped) {
|
|
716
|
+
yield* run("unmount", unmountScript({ unitName, path: volume.path }));
|
|
717
|
+
}
|
|
718
|
+
if (image !== undefined) {
|
|
719
|
+
yield* ssh.scp(image.archive, `${appDir}/image.tar`);
|
|
720
|
+
}
|
|
721
|
+
else {
|
|
722
|
+
yield* ssh.scp(program.archive, `${appDir}/bundle.zip`);
|
|
723
|
+
}
|
|
724
|
+
// Created 0600 (staged with that mode, `scp -p`): never readable by others (Y11).
|
|
725
|
+
yield* ssh.scp(new TextEncoder().encode(envFile), `${appDir}/env`, { mode: 0o600 });
|
|
726
|
+
yield* run("chmod", `chmod 600 ${shellQuote(`${appDir}/env`)}`);
|
|
727
|
+
yield* ssh.scp(new TextEncoder().encode(unit), `/etc/systemd/system/${unitName}.service`);
|
|
728
|
+
yield* run("start", image !== undefined ? startImageScript(unitName) : startScript(unitName));
|
|
729
|
+
yield* run("health", healthScript({
|
|
730
|
+
unitName,
|
|
731
|
+
// A container's health is only "active" (as on Hetzner).
|
|
732
|
+
port: image === undefined ? props.port : undefined,
|
|
733
|
+
attempts,
|
|
734
|
+
intervalSeconds,
|
|
735
|
+
}));
|
|
736
|
+
}));
|
|
737
|
+
return {
|
|
738
|
+
serverId,
|
|
739
|
+
availabilityZone,
|
|
740
|
+
ipv4,
|
|
741
|
+
ipv6,
|
|
742
|
+
port,
|
|
743
|
+
url: serviceUrl(ipv4, ipv6, port),
|
|
744
|
+
unitName,
|
|
745
|
+
code: { hash },
|
|
746
|
+
volumes: volumes.map((volume) => ({ volumeId: volume.volumeId, path: volume.path })),
|
|
747
|
+
};
|
|
748
|
+
}),
|
|
749
|
+
delete: Effect.fn(function* ({ id, olds, output }) {
|
|
750
|
+
const target = yield* targetOf(olds, id).pipe(Effect.catchTag("ServiceError", (error) => Effect.logWarning(`${error.message}; unit ${output.unitName} left in place`).pipe(Effect.as(undefined))));
|
|
751
|
+
if (target === undefined)
|
|
752
|
+
return;
|
|
753
|
+
yield* withSession(target, (ssh) => Effect.gen(function* () {
|
|
754
|
+
// Stop the unit first: a running process keeps its mount busy.
|
|
755
|
+
yield* ssh.exec(removeScript(output.unitName));
|
|
756
|
+
for (const volume of output.volumes ?? []) {
|
|
757
|
+
yield* ssh.exec(unmountScript({ unitName: output.unitName, path: volume.path }));
|
|
758
|
+
}
|
|
759
|
+
})).pipe(
|
|
760
|
+
// The server is gone (deleted out of band, or unreachable): nothing to stop.
|
|
761
|
+
Effect.catchTag("SshError", (error) => Effect.logWarning(`${TYPE} '${id}': could not reach the server to remove unit ${output.unitName}: ${error.message}`)));
|
|
762
|
+
}),
|
|
763
|
+
});
|
|
764
|
+
}));
|
|
765
|
+
//# sourceMappingURL=Service.js.map
|