@vibesdotdev/integrations-digitalocean 0.0.0-stage → 1.0.0-rc.2
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 +126 -0
- package/README.md +78 -2
- package/dist/ai/index.d.ts +4 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +4 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/inference.transport.impl.d.ts +5 -0
- package/dist/ai/inference.transport.impl.d.ts.map +1 -0
- package/dist/ai/inference.transport.impl.js +54 -0
- package/dist/ai/inference.transport.impl.js.map +1 -0
- package/dist/ai/provider.plugin.d.ts +6 -0
- package/dist/ai/provider.plugin.d.ts.map +1 -0
- package/dist/ai/provider.plugin.js +126 -0
- package/dist/ai/provider.plugin.js.map +1 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/config/schemas/index.d.ts +62 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/config/schemas/index.d.ts.map +1 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/config/schemas/index.js +73 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/config/schemas/index.js.map +1 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/index.d.ts +2 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/index.d.ts.map +1 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/index.js +2 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/index.js.map +1 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/provider.digitalocean.descriptor.d.ts +183 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/provider.digitalocean.descriptor.d.ts.map +1 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/provider.digitalocean.descriptor.js +66 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/provider.digitalocean.descriptor.js.map +1 -0
- package/dist/apps/api-client.d.ts +45 -0
- package/dist/apps/api-client.d.ts.map +1 -0
- package/dist/apps/api-client.js +47 -0
- package/dist/apps/api-client.js.map +1 -0
- package/dist/apps/build-spec.d.ts +44 -0
- package/dist/apps/build-spec.d.ts.map +1 -0
- package/dist/apps/build-spec.js +463 -0
- package/dist/apps/build-spec.js.map +1 -0
- package/dist/apps/deploy-client.d.ts +42 -0
- package/dist/apps/deploy-client.d.ts.map +1 -0
- package/dist/apps/deploy-client.js +300 -0
- package/dist/apps/deploy-client.js.map +1 -0
- package/dist/apps/index.d.ts +5 -0
- package/dist/apps/index.d.ts.map +1 -0
- package/dist/apps/index.js +4 -0
- package/dist/apps/index.js.map +1 -0
- package/dist/apps/types.d.ts +204 -0
- package/dist/apps/types.d.ts.map +1 -0
- package/dist/apps/types.js +13 -0
- package/dist/apps/types.js.map +1 -0
- package/dist/client/control-plane.d.ts +49 -0
- package/dist/client/control-plane.d.ts.map +1 -0
- package/dist/client/control-plane.js +85 -0
- package/dist/client/control-plane.js.map +1 -0
- package/dist/client/do-fetch.d.ts +41 -0
- package/dist/client/do-fetch.d.ts.map +1 -0
- package/dist/client/do-fetch.js +199 -0
- package/dist/client/do-fetch.js.map +1 -0
- package/dist/client/errors.d.ts +6 -0
- package/dist/client/errors.d.ts.map +1 -0
- package/dist/client/errors.js +34 -0
- package/dist/client/errors.js.map +1 -0
- package/dist/client/factory.d.ts +53 -0
- package/dist/client/factory.d.ts.map +1 -0
- package/dist/client/factory.js +220 -0
- package/dist/client/factory.js.map +1 -0
- package/dist/client/helpers.d.ts +5 -0
- package/dist/client/helpers.d.ts.map +1 -0
- package/dist/client/helpers.js +8 -0
- package/dist/client/helpers.js.map +1 -0
- package/dist/client/index.d.ts +12 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +10 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/paginated.d.ts +19 -0
- package/dist/client/paginated.d.ts.map +1 -0
- package/dist/client/paginated.js +56 -0
- package/dist/client/paginated.js.map +1 -0
- package/dist/client/retry.d.ts +34 -0
- package/dist/client/retry.d.ts.map +1 -0
- package/dist/client/retry.js +53 -0
- package/dist/client/retry.js.map +1 -0
- package/dist/config/digitalocean.config.descriptor.d.ts +197 -0
- package/dist/config/digitalocean.config.descriptor.d.ts.map +1 -0
- package/dist/config/digitalocean.config.descriptor.js +59 -0
- package/dist/config/digitalocean.config.descriptor.js.map +1 -0
- package/dist/credentials/index.d.ts +38 -0
- package/dist/credentials/index.d.ts.map +1 -0
- package/dist/credentials/index.js +56 -0
- package/dist/credentials/index.js.map +1 -0
- package/dist/databases/index.d.ts +82 -0
- package/dist/databases/index.d.ts.map +1 -0
- package/dist/databases/index.js +57 -0
- package/dist/databases/index.js.map +1 -0
- package/dist/digitalocean-friction.policy.d.ts +29 -0
- package/dist/digitalocean-friction.policy.d.ts.map +1 -0
- package/dist/digitalocean-friction.policy.js +21 -0
- package/dist/digitalocean-friction.policy.js.map +1 -0
- package/dist/digitalocean.plugin.d.ts +3 -0
- package/dist/digitalocean.plugin.d.ts.map +1 -0
- package/dist/digitalocean.plugin.js +27 -0
- package/dist/digitalocean.plugin.js.map +1 -0
- package/dist/droplets/index.d.ts +106 -0
- package/dist/droplets/index.d.ts.map +1 -0
- package/dist/droplets/index.js +227 -0
- package/dist/droplets/index.js.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/inference-control-plane/index.d.ts +63 -0
- package/dist/inference-control-plane/index.d.ts.map +1 -0
- package/dist/inference-control-plane/index.js +93 -0
- package/dist/inference-control-plane/index.js.map +1 -0
- package/dist/infra/billing.d.ts +26 -0
- package/dist/infra/billing.d.ts.map +1 -0
- package/dist/infra/billing.js +43 -0
- package/dist/infra/billing.js.map +1 -0
- package/dist/infra/credentials.d.ts +11 -0
- package/dist/infra/credentials.d.ts.map +1 -0
- package/dist/infra/credentials.js +15 -0
- package/dist/infra/credentials.js.map +1 -0
- package/dist/infra/deployment-provider/deploy-secrets.d.ts +10 -0
- package/dist/infra/deployment-provider/deploy-secrets.d.ts.map +1 -0
- package/dist/infra/deployment-provider/deploy-secrets.js +66 -0
- package/dist/infra/deployment-provider/deploy-secrets.js.map +1 -0
- package/dist/infra/deployment-provider/digitalocean-deployment-provider.impl.d.ts +97 -0
- package/dist/infra/deployment-provider/digitalocean-deployment-provider.impl.d.ts.map +1 -0
- package/dist/infra/deployment-provider/digitalocean-deployment-provider.impl.js +242 -0
- package/dist/infra/deployment-provider/digitalocean-deployment-provider.impl.js.map +1 -0
- package/dist/infra/deployment-provider/image-publish.d.ts +39 -0
- package/dist/infra/deployment-provider/image-publish.d.ts.map +1 -0
- package/dist/infra/deployment-provider/image-publish.js +146 -0
- package/dist/infra/deployment-provider/image-publish.js.map +1 -0
- package/dist/infra/deployment-provider.descriptor.d.ts +34 -0
- package/dist/infra/deployment-provider.descriptor.d.ts.map +1 -0
- package/dist/infra/deployment-provider.descriptor.js +9 -0
- package/dist/infra/deployment-provider.descriptor.js.map +1 -0
- package/dist/infra/digitalocean-infra.plugin.d.ts +101 -0
- package/dist/infra/digitalocean-infra.plugin.d.ts.map +1 -0
- package/dist/infra/digitalocean-infra.plugin.js +283 -0
- package/dist/infra/digitalocean-infra.plugin.js.map +1 -0
- package/dist/infra/doks/clients.d.ts +183 -0
- package/dist/infra/doks/clients.d.ts.map +1 -0
- package/dist/infra/doks/clients.js +172 -0
- package/dist/infra/doks/clients.js.map +1 -0
- package/dist/infra/doks/digitalocean.d.ts +34 -0
- package/dist/infra/doks/digitalocean.d.ts.map +1 -0
- package/dist/infra/doks/digitalocean.js +267 -0
- package/dist/infra/doks/digitalocean.js.map +1 -0
- package/dist/infra/doks/service-release-schemas.d.ts +1037 -0
- package/dist/infra/doks/service-release-schemas.d.ts.map +1 -0
- package/dist/infra/doks/service-release-schemas.js +51 -0
- package/dist/infra/doks/service-release-schemas.js.map +1 -0
- package/dist/infra/doks/service-release.d.ts +415 -0
- package/dist/infra/doks/service-release.d.ts.map +1 -0
- package/dist/infra/doks/service-release.js +3201 -0
- package/dist/infra/doks/service-release.js.map +1 -0
- package/dist/infra/doks/worker.d.ts +14 -0
- package/dist/infra/doks/worker.d.ts.map +1 -0
- package/dist/infra/doks/worker.js +343 -0
- package/dist/infra/doks/worker.js.map +1 -0
- package/dist/infra/droplet.impl.d.ts +172 -0
- package/dist/infra/droplet.impl.d.ts.map +1 -0
- package/dist/infra/droplet.impl.js +379 -0
- package/dist/infra/droplet.impl.js.map +1 -0
- package/dist/infra/functions.impl.d.ts +123 -0
- package/dist/infra/functions.impl.d.ts.map +1 -0
- package/dist/infra/functions.impl.js +202 -0
- package/dist/infra/functions.impl.js.map +1 -0
- package/dist/infra/index.d.ts +15 -0
- package/dist/infra/index.d.ts.map +1 -0
- package/dist/infra/index.js +12 -0
- package/dist/infra/index.js.map +1 -0
- package/dist/infra/inventory.d.ts +7 -0
- package/dist/infra/inventory.d.ts.map +1 -0
- package/dist/infra/inventory.js +259 -0
- package/dist/infra/inventory.js.map +1 -0
- package/dist/infra/kubernetes-log-stream.d.ts +5 -0
- package/dist/infra/kubernetes-log-stream.d.ts.map +1 -0
- package/dist/infra/kubernetes-log-stream.js +186 -0
- package/dist/infra/kubernetes-log-stream.js.map +1 -0
- package/dist/infra/kubernetes-logs.d.ts +33 -0
- package/dist/infra/kubernetes-logs.d.ts.map +1 -0
- package/dist/infra/kubernetes-logs.descriptor.d.ts +14 -0
- package/dist/infra/kubernetes-logs.descriptor.d.ts.map +1 -0
- package/dist/infra/kubernetes-logs.descriptor.js +28 -0
- package/dist/infra/kubernetes-logs.descriptor.js.map +1 -0
- package/dist/infra/kubernetes-logs.js +196 -0
- package/dist/infra/kubernetes-logs.js.map +1 -0
- package/dist/infra/utilization.d.ts +44 -0
- package/dist/infra/utilization.d.ts.map +1 -0
- package/dist/infra/utilization.js +108 -0
- package/dist/infra/utilization.js.map +1 -0
- package/dist/kubernetes/authority.d.ts +40 -0
- package/dist/kubernetes/authority.d.ts.map +1 -0
- package/dist/kubernetes/authority.js +90 -0
- package/dist/kubernetes/authority.js.map +1 -0
- package/dist/kubernetes/encoding.d.ts +4 -0
- package/dist/kubernetes/encoding.d.ts.map +1 -0
- package/dist/kubernetes/encoding.js +8 -0
- package/dist/kubernetes/encoding.js.map +1 -0
- package/dist/kubernetes/index.d.ts +105 -0
- package/dist/kubernetes/index.d.ts.map +1 -0
- package/dist/kubernetes/index.js +99 -0
- package/dist/kubernetes/index.js.map +1 -0
- package/dist/kubernetes/transport.d.ts +11 -0
- package/dist/kubernetes/transport.d.ts.map +1 -0
- package/dist/kubernetes/transport.js +27 -0
- package/dist/kubernetes/transport.js.map +1 -0
- package/dist/network/index.d.ts +24 -0
- package/dist/network/index.d.ts.map +1 -0
- package/dist/network/index.js +16 -0
- package/dist/network/index.js.map +1 -0
- package/dist/registry/index.d.ts +39 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +20 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/schemas/app-deployment.d.ts +1474 -0
- package/dist/schemas/app-deployment.d.ts.map +1 -0
- package/dist/schemas/app-deployment.js +156 -0
- package/dist/schemas/app-deployment.js.map +1 -0
- package/dist/schemas/app-platform.d.ts +755 -0
- package/dist/schemas/app-platform.d.ts.map +1 -0
- package/dist/schemas/app-platform.js +253 -0
- package/dist/schemas/app-platform.js.map +1 -0
- package/dist/schemas/cache-database.d.ts +210 -0
- package/dist/schemas/cache-database.d.ts.map +1 -0
- package/dist/schemas/cache-database.js +105 -0
- package/dist/schemas/cache-database.js.map +1 -0
- package/dist/schemas/control-plane.d.ts +456 -0
- package/dist/schemas/control-plane.d.ts.map +1 -0
- package/dist/schemas/control-plane.js +123 -0
- package/dist/schemas/control-plane.js.map +1 -0
- package/dist/schemas/credential-use.d.ts +714 -0
- package/dist/schemas/credential-use.d.ts.map +1 -0
- package/dist/schemas/credential-use.js +73 -0
- package/dist/schemas/credential-use.js.map +1 -0
- package/dist/schemas/doks-worker.d.ts +4071 -0
- package/dist/schemas/doks-worker.d.ts.map +1 -0
- package/dist/schemas/doks-worker.js +330 -0
- package/dist/schemas/doks-worker.js.map +1 -0
- package/dist/schemas/droplet.d.ts +110 -0
- package/dist/schemas/droplet.d.ts.map +1 -0
- package/dist/schemas/droplet.js +22 -0
- package/dist/schemas/droplet.js.map +1 -0
- package/dist/schemas/functions.d.ts +22 -0
- package/dist/schemas/functions.d.ts.map +1 -0
- package/dist/schemas/functions.js +25 -0
- package/dist/schemas/functions.js.map +1 -0
- package/dist/schemas/gitea-git-hosting.d.ts +20 -0
- package/dist/schemas/gitea-git-hosting.d.ts.map +1 -0
- package/dist/schemas/gitea-git-hosting.js +26 -0
- package/dist/schemas/gitea-git-hosting.js.map +1 -0
- package/dist/schemas/http.d.ts +2594 -0
- package/dist/schemas/http.d.ts.map +1 -0
- package/dist/schemas/http.js +4548 -0
- package/dist/schemas/http.js.map +1 -0
- package/dist/schemas/infra-kinds.d.ts +113 -0
- package/dist/schemas/infra-kinds.d.ts.map +1 -0
- package/dist/schemas/infra-kinds.js +93 -0
- package/dist/schemas/infra-kinds.js.map +1 -0
- package/dist/schemas/kubernetes-responses.d.ts +457 -0
- package/dist/schemas/kubernetes-responses.d.ts.map +1 -0
- package/dist/schemas/kubernetes-responses.js +681 -0
- package/dist/schemas/kubernetes-responses.js.map +1 -0
- package/dist/schemas/kubernetes.d.ts +143 -0
- package/dist/schemas/kubernetes.d.ts.map +1 -0
- package/dist/schemas/kubernetes.js +68 -0
- package/dist/schemas/kubernetes.js.map +1 -0
- package/dist/schemas/logs.d.ts +15 -0
- package/dist/schemas/logs.d.ts.map +1 -0
- package/dist/schemas/logs.js +11 -0
- package/dist/schemas/logs.js.map +1 -0
- package/dist/schemas/object-storage.d.ts +167 -0
- package/dist/schemas/object-storage.d.ts.map +1 -0
- package/dist/schemas/object-storage.js +124 -0
- package/dist/schemas/object-storage.js.map +1 -0
- package/dist/schemas/service-settings.d.ts +9 -0
- package/dist/schemas/service-settings.d.ts.map +1 -0
- package/dist/schemas/service-settings.js +21 -0
- package/dist/schemas/service-settings.js.map +1 -0
- package/dist/schemas/utilization.d.ts +57 -0
- package/dist/schemas/utilization.d.ts.map +1 -0
- package/dist/schemas/utilization.js +58 -0
- package/dist/schemas/utilization.js.map +1 -0
- package/dist/schemas/worker-status.d.ts +22 -0
- package/dist/schemas/worker-status.d.ts.map +1 -0
- package/dist/schemas/worker-status.js +14 -0
- package/dist/schemas/worker-status.js.map +1 -0
- package/dist/schemas/worker.d.ts +125 -0
- package/dist/schemas/worker.d.ts.map +1 -0
- package/dist/schemas/worker.js +129 -0
- package/dist/schemas/worker.js.map +1 -0
- package/dist/secrets/app-platform/app-credentials.impl.d.ts +14 -0
- package/dist/secrets/app-platform/app-credentials.impl.d.ts.map +1 -0
- package/dist/secrets/app-platform/app-credentials.impl.js +237 -0
- package/dist/secrets/app-platform/app-credentials.impl.js.map +1 -0
- package/dist/secrets/container-registry/image-publish-settings.descriptor.d.ts +11 -0
- package/dist/secrets/container-registry/image-publish-settings.descriptor.d.ts.map +1 -0
- package/dist/secrets/container-registry/image-publish-settings.descriptor.js +26 -0
- package/dist/secrets/container-registry/image-publish-settings.descriptor.js.map +1 -0
- package/dist/secrets/doks-secret.descriptor.d.ts +18 -0
- package/dist/secrets/doks-secret.descriptor.d.ts.map +1 -0
- package/dist/secrets/doks-secret.descriptor.js +35 -0
- package/dist/secrets/doks-secret.descriptor.js.map +1 -0
- package/dist/secrets/doks-secret.impl.d.ts +98 -0
- package/dist/secrets/doks-secret.impl.d.ts.map +1 -0
- package/dist/secrets/doks-secret.impl.js +451 -0
- package/dist/secrets/doks-secret.impl.js.map +1 -0
- package/dist/secrets/index.d.ts +4 -0
- package/dist/secrets/index.d.ts.map +1 -0
- package/dist/secrets/index.js +4 -0
- package/dist/secrets/index.js.map +1 -0
- package/dist/secrets/secrets-backend-doks.plugin.d.ts +3 -0
- package/dist/secrets/secrets-backend-doks.plugin.d.ts.map +1 -0
- package/dist/secrets/secrets-backend-doks.plugin.js +35 -0
- package/dist/secrets/secrets-backend-doks.plugin.js.map +1 -0
- package/dist/storage/index.d.ts +50 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +92 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/spaces-keys.d.ts +25 -0
- package/dist/storage/spaces-keys.d.ts.map +1 -0
- package/dist/storage/spaces-keys.js +32 -0
- package/dist/storage/spaces-keys.js.map +1 -0
- package/package.json +172 -4
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build a normalized DigitalOcean App Platform spec from typed inputs.
|
|
3
|
+
*
|
|
4
|
+
* Consumers pass:
|
|
5
|
+
* - the provider-neutral `AppDeployment` (always present)
|
|
6
|
+
* - the optional `DigitalOceanAppWebAppConfig` from the web-app descriptor
|
|
7
|
+
* (controls instance shape, autoscaling, domains, alerts, jobs, workers,
|
|
8
|
+
* log destinations, container images)
|
|
9
|
+
* - an optional secrets map that has already been resolved by the caller
|
|
10
|
+
* (typically out of `secrets/store`) — used to populate SECRET-typed envs
|
|
11
|
+
* so the connector never has to resolve credentials or hit a store itself
|
|
12
|
+
*
|
|
13
|
+
* The output is the JSON body accepted by both `POST /v2/apps` and
|
|
14
|
+
* `PUT /v2/apps/:id`. The builder is pure — same input, same spec — so we
|
|
15
|
+
* can fixture-test it without touching the network.
|
|
16
|
+
*/
|
|
17
|
+
function deploymentEnvToAppEnv(requirement, resolved, includeUnresolvedSecrets) {
|
|
18
|
+
const isSecret = requirement.secret === true;
|
|
19
|
+
const storeKey = requirement.storeKey ?? requirement.name;
|
|
20
|
+
const resolvedValue = isSecret ? (resolved[storeKey] ?? resolved[requirement.name]) : undefined;
|
|
21
|
+
const value = requirement.value ?? resolvedValue;
|
|
22
|
+
if (value === undefined && !requirement.required && !(includeUnresolvedSecrets && isSecret)) {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
key: requirement.name,
|
|
27
|
+
value,
|
|
28
|
+
scope: 'RUN_AND_BUILD_TIME',
|
|
29
|
+
type: isSecret ? 'SECRET' : 'GENERAL'
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function configEnvToAppEnv(env, resolved) {
|
|
33
|
+
const isSecret = env.type === 'SECRET';
|
|
34
|
+
const storeKey = env.storeKey ?? env.key;
|
|
35
|
+
const resolvedValue = isSecret ? (resolved[storeKey] ?? resolved[env.key]) : undefined;
|
|
36
|
+
return {
|
|
37
|
+
key: env.key,
|
|
38
|
+
value: env.value ?? resolvedValue,
|
|
39
|
+
scope: env.scope,
|
|
40
|
+
type: env.type
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function buildEnvList(deployment, componentEnvs, resolved, includeUnresolvedSecrets) {
|
|
44
|
+
const baseEnvs = deployment.env
|
|
45
|
+
.map((req) => deploymentEnvToAppEnv(req, resolved, includeUnresolvedSecrets))
|
|
46
|
+
.filter((e) => Boolean(e));
|
|
47
|
+
const extraEnvs = componentEnvs.map((env) => configEnvToAppEnv(env, resolved));
|
|
48
|
+
const merged = [...baseEnvs];
|
|
49
|
+
const seen = new Set(merged.map((e) => e.key));
|
|
50
|
+
for (const env of extraEnvs) {
|
|
51
|
+
if (seen.has(env.key)) {
|
|
52
|
+
const idx = merged.findIndex((e) => e.key === env.key);
|
|
53
|
+
merged[idx] = env;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
merged.push(env);
|
|
57
|
+
seen.add(env.key);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return merged.length > 0 ? merged : undefined;
|
|
61
|
+
}
|
|
62
|
+
function normalizeGithub(ref) {
|
|
63
|
+
if (!ref)
|
|
64
|
+
return undefined;
|
|
65
|
+
return {
|
|
66
|
+
repo: ref.repo,
|
|
67
|
+
branch: ref.branch,
|
|
68
|
+
deploy_on_push: ref.deployOnPush
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function normalizeImage(ref) {
|
|
72
|
+
if (!ref)
|
|
73
|
+
return undefined;
|
|
74
|
+
const out = {
|
|
75
|
+
registry_type: ref.registryType,
|
|
76
|
+
repository: ref.repository
|
|
77
|
+
};
|
|
78
|
+
if (ref.registry)
|
|
79
|
+
out.registry = ref.registry;
|
|
80
|
+
// DO rejects a spec carrying both: "only one of services.image.tag or
|
|
81
|
+
// services.image.digest can be specified". A digest pins the image; a tag
|
|
82
|
+
// is only the fallback when no digest was recorded.
|
|
83
|
+
if (ref.digest)
|
|
84
|
+
out.digest = ref.digest;
|
|
85
|
+
else if (ref.tag)
|
|
86
|
+
out.tag = ref.tag;
|
|
87
|
+
return out;
|
|
88
|
+
}
|
|
89
|
+
function normalizeHealthCheck(hc) {
|
|
90
|
+
if (!hc)
|
|
91
|
+
return undefined;
|
|
92
|
+
const out = { http_path: hc.httpPath };
|
|
93
|
+
if (hc.initialDelaySeconds !== undefined)
|
|
94
|
+
out.initial_delay_seconds = hc.initialDelaySeconds;
|
|
95
|
+
if (hc.periodSeconds !== undefined)
|
|
96
|
+
out.period_seconds = hc.periodSeconds;
|
|
97
|
+
if (hc.timeoutSeconds !== undefined)
|
|
98
|
+
out.timeout_seconds = hc.timeoutSeconds;
|
|
99
|
+
if (hc.successThreshold !== undefined)
|
|
100
|
+
out.success_threshold = hc.successThreshold;
|
|
101
|
+
if (hc.failureThreshold !== undefined)
|
|
102
|
+
out.failure_threshold = hc.failureThreshold;
|
|
103
|
+
if (hc.port !== undefined)
|
|
104
|
+
out.port = hc.port;
|
|
105
|
+
return out;
|
|
106
|
+
}
|
|
107
|
+
function normalizeAutoscaling(as) {
|
|
108
|
+
if (!as)
|
|
109
|
+
return undefined;
|
|
110
|
+
return {
|
|
111
|
+
min_instance_count: as.minInstanceCount,
|
|
112
|
+
max_instance_count: as.maxInstanceCount,
|
|
113
|
+
metrics: as.metrics.map((m) => {
|
|
114
|
+
switch (m.type) {
|
|
115
|
+
case 'cpu_utilization':
|
|
116
|
+
return { cpu: { percent: m.percent } };
|
|
117
|
+
case 'requests_per_second':
|
|
118
|
+
return { requests_per_second: { threshold: m.threshold } };
|
|
119
|
+
case 'latency_p95_ms':
|
|
120
|
+
return { latency_p95_ms: { threshold: m.threshold } };
|
|
121
|
+
}
|
|
122
|
+
})
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function normalizeRoutes(routes) {
|
|
126
|
+
if (!routes || routes.length === 0)
|
|
127
|
+
return undefined;
|
|
128
|
+
return routes.map((r) => ({
|
|
129
|
+
path: r.path,
|
|
130
|
+
preserve_path_prefix: r.preservePathPrefix
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
function applyComponentDefaults(component, deployment, defaultGithub) {
|
|
134
|
+
return {
|
|
135
|
+
...component,
|
|
136
|
+
sourceDir: component.sourceDir ?? deployment.build.appDir,
|
|
137
|
+
github: component.github ?? defaultGithub
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
function isPureContainer(component) {
|
|
141
|
+
return Boolean(component.image);
|
|
142
|
+
}
|
|
143
|
+
function buildServiceComponent(service, deployment, defaultGithub, resolved, includeUnresolvedSecrets) {
|
|
144
|
+
const filled = applyComponentDefaults(service, deployment, defaultGithub);
|
|
145
|
+
const spec = {
|
|
146
|
+
name: filled.name,
|
|
147
|
+
envs: buildEnvList(deployment, filled.envs, resolved, includeUnresolvedSecrets),
|
|
148
|
+
http_port: filled.httpPort,
|
|
149
|
+
internal_ports: filled.internalPorts.length > 0 ? filled.internalPorts : undefined,
|
|
150
|
+
health_check: normalizeHealthCheck(filled.healthCheck),
|
|
151
|
+
autoscaling: normalizeAutoscaling(filled.autoscaling),
|
|
152
|
+
scale_to_zero: filled.scaleToZero ? true : undefined,
|
|
153
|
+
routes: normalizeRoutes(filled.routes),
|
|
154
|
+
environment_slug: filled.environmentSlug,
|
|
155
|
+
instance_size_slug: filled.instanceSizeSlug,
|
|
156
|
+
instance_count: filled.instanceCount,
|
|
157
|
+
// DO App specs reject build_command + dockerfile_path together (mutually
|
|
158
|
+
// exclusive) — with a Dockerfile, the Dockerfile performs the build.
|
|
159
|
+
run_command: filled.runCommand
|
|
160
|
+
};
|
|
161
|
+
if (isPureContainer(filled)) {
|
|
162
|
+
spec.image = normalizeImage(filled.image);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
// A Dockerfile build needs the *repo root* as its build context: the
|
|
166
|
+
// dockerfile_path is repo-root-relative, and scoping source_dir to the app
|
|
167
|
+
// dir hides the repository's workspace packages from the Dockerfile's
|
|
168
|
+
// COPY/`bun install` (terminal-web's "workspace dependency not found" build
|
|
169
|
+
// failure). Default to the repo root for Dockerfile components; buildpack
|
|
170
|
+
// components keep the app dir.
|
|
171
|
+
spec.source_dir = filled.dockerfilePath ? '/' : filled.sourceDir;
|
|
172
|
+
spec.github = normalizeGithub(filled.github);
|
|
173
|
+
// DO App specs reject build_command + dockerfile_path together (mutually
|
|
174
|
+
// exclusive) — with a Dockerfile, the Dockerfile performs the build. Both
|
|
175
|
+
// belong ONLY in the git/github branch: a pure-image component (above)
|
|
176
|
+
// builds nothing locally, so leaking either into that spec previously sent
|
|
177
|
+
// DO a service with both an `image` AND a `dockerfile_path`, which DO's
|
|
178
|
+
// spec validator rejects.
|
|
179
|
+
spec.build_command = filled.dockerfilePath ? undefined : filled.buildCommand;
|
|
180
|
+
spec.dockerfile_path = filled.dockerfilePath;
|
|
181
|
+
}
|
|
182
|
+
return spec;
|
|
183
|
+
}
|
|
184
|
+
function buildWorkerComponent(worker, deployment, defaultGithub, resolved, includeUnresolvedSecrets) {
|
|
185
|
+
const filled = applyComponentDefaults(worker, deployment, defaultGithub);
|
|
186
|
+
const spec = {
|
|
187
|
+
name: filled.name,
|
|
188
|
+
envs: buildEnvList(deployment, filled.envs, resolved, includeUnresolvedSecrets),
|
|
189
|
+
autoscaling: normalizeAutoscaling(filled.autoscaling),
|
|
190
|
+
environment_slug: filled.environmentSlug,
|
|
191
|
+
instance_size_slug: filled.instanceSizeSlug,
|
|
192
|
+
instance_count: filled.instanceCount,
|
|
193
|
+
// DO App specs reject build_command + dockerfile_path together (mutually
|
|
194
|
+
// exclusive) — with a Dockerfile, the Dockerfile performs the build.
|
|
195
|
+
run_command: filled.runCommand
|
|
196
|
+
};
|
|
197
|
+
if (isPureContainer(filled)) {
|
|
198
|
+
spec.image = normalizeImage(filled.image);
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
// A Dockerfile build needs the *repo root* as its build context: the
|
|
202
|
+
// dockerfile_path is repo-root-relative, and scoping source_dir to the app
|
|
203
|
+
// dir hides the repository's workspace packages from the Dockerfile's
|
|
204
|
+
// COPY/`bun install` (terminal-web's "workspace dependency not found" build
|
|
205
|
+
// failure). Default to the repo root for Dockerfile components; buildpack
|
|
206
|
+
// components keep the app dir.
|
|
207
|
+
spec.source_dir = filled.dockerfilePath ? '/' : filled.sourceDir;
|
|
208
|
+
spec.github = normalizeGithub(filled.github);
|
|
209
|
+
// DO App specs reject build_command + dockerfile_path together (mutually
|
|
210
|
+
// exclusive) — with a Dockerfile, the Dockerfile performs the build. Both
|
|
211
|
+
// belong ONLY in the git/github branch: a pure-image component (above)
|
|
212
|
+
// builds nothing locally, so leaking either into that spec previously sent
|
|
213
|
+
// DO a service with both an `image` AND a `dockerfile_path`, which DO's
|
|
214
|
+
// spec validator rejects.
|
|
215
|
+
spec.build_command = filled.dockerfilePath ? undefined : filled.buildCommand;
|
|
216
|
+
spec.dockerfile_path = filled.dockerfilePath;
|
|
217
|
+
}
|
|
218
|
+
return spec;
|
|
219
|
+
}
|
|
220
|
+
function buildJobComponent(job, deployment, defaultGithub, resolved, includeUnresolvedSecrets, jobKind) {
|
|
221
|
+
const filled = applyComponentDefaults(job, deployment, defaultGithub);
|
|
222
|
+
const spec = {
|
|
223
|
+
name: filled.name,
|
|
224
|
+
kind: jobKind === 'deploy' ? ('kind' in job ? job.kind : 'PRE_DEPLOY') : 'PRE_DEPLOY',
|
|
225
|
+
envs: buildEnvList(deployment, filled.envs, resolved, includeUnresolvedSecrets),
|
|
226
|
+
environment_slug: filled.environmentSlug,
|
|
227
|
+
instance_size_slug: filled.instanceSizeSlug,
|
|
228
|
+
instance_count: filled.instanceCount,
|
|
229
|
+
// DO App specs reject build_command + dockerfile_path together (mutually
|
|
230
|
+
// exclusive) — with a Dockerfile, the Dockerfile performs the build.
|
|
231
|
+
run_command: filled.runCommand
|
|
232
|
+
};
|
|
233
|
+
if (jobKind === 'cron') {
|
|
234
|
+
spec.schedule = 'schedule' in job ? job.schedule : undefined;
|
|
235
|
+
}
|
|
236
|
+
if (isPureContainer(filled)) {
|
|
237
|
+
spec.image = normalizeImage(filled.image);
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
// A Dockerfile build needs the *repo root* as its build context: the
|
|
241
|
+
// dockerfile_path is repo-root-relative, and scoping source_dir to the app
|
|
242
|
+
// dir hides the repository's workspace packages from the Dockerfile's
|
|
243
|
+
// COPY/`bun install` (terminal-web's "workspace dependency not found" build
|
|
244
|
+
// failure). Default to the repo root for Dockerfile components; buildpack
|
|
245
|
+
// components keep the app dir.
|
|
246
|
+
spec.source_dir = filled.dockerfilePath ? '/' : filled.sourceDir;
|
|
247
|
+
spec.github = normalizeGithub(filled.github);
|
|
248
|
+
// DO App specs reject build_command + dockerfile_path together (mutually
|
|
249
|
+
// exclusive) — with a Dockerfile, the Dockerfile performs the build. Both
|
|
250
|
+
// belong ONLY in the git/github branch: a pure-image component (above)
|
|
251
|
+
// builds nothing locally, so leaking either into that spec previously sent
|
|
252
|
+
// DO a service with both an `image` AND a `dockerfile_path`, which DO's
|
|
253
|
+
// spec validator rejects.
|
|
254
|
+
spec.build_command = filled.dockerfilePath ? undefined : filled.buildCommand;
|
|
255
|
+
spec.dockerfile_path = filled.dockerfilePath;
|
|
256
|
+
}
|
|
257
|
+
return spec;
|
|
258
|
+
}
|
|
259
|
+
function buildStaticSiteComponent(site, deployment, defaultGithub, resolved, includeUnresolvedSecrets) {
|
|
260
|
+
return {
|
|
261
|
+
name: site.name,
|
|
262
|
+
source_dir: site.sourceDir ?? deployment.build.appDir,
|
|
263
|
+
output_dir: site.outputDir ?? deployment.build.outputDir,
|
|
264
|
+
build_command: site.buildCommand ?? deployment.build.buildCommand,
|
|
265
|
+
index_document: site.indexDocument,
|
|
266
|
+
error_document: site.errorDocument,
|
|
267
|
+
environment_slug: site.environmentSlug,
|
|
268
|
+
github: normalizeGithub(site.github ?? defaultGithub),
|
|
269
|
+
envs: buildEnvList(deployment, site.envs, resolved, includeUnresolvedSecrets)
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
function normalizeDomain(domain) {
|
|
273
|
+
return {
|
|
274
|
+
domain: domain.domain,
|
|
275
|
+
type: domain.type,
|
|
276
|
+
wildcard: domain.wildcard,
|
|
277
|
+
zone: domain.zone,
|
|
278
|
+
certificate_id: domain.certificateId
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
function normalizeAlert(alert) {
|
|
282
|
+
return {
|
|
283
|
+
rule: alert.rule,
|
|
284
|
+
disabled: alert.disabled,
|
|
285
|
+
operator: alert.operator,
|
|
286
|
+
value: alert.value,
|
|
287
|
+
window: alert.window,
|
|
288
|
+
emails: alert.emails.length > 0 ? alert.emails : undefined,
|
|
289
|
+
slack_webhooks: alert.slackWebhooks.length > 0 ? alert.slackWebhooks : undefined
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
function normalizeLogDestination(dest, resolved, includeUnresolvedSecrets) {
|
|
293
|
+
switch (dest.endpoint.kind) {
|
|
294
|
+
case 'papertrail':
|
|
295
|
+
return { name: dest.name, papertrail: { endpoint: dest.endpoint.endpoint } };
|
|
296
|
+
case 'datadog': {
|
|
297
|
+
const apiKey = resolved[dest.endpoint.apiKeyStoreKey] ?? '';
|
|
298
|
+
return {
|
|
299
|
+
name: dest.name,
|
|
300
|
+
datadog: { endpoint: dest.endpoint.endpoint, api_key: apiKey }
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
case 'logtail': {
|
|
304
|
+
const token = resolved[dest.endpoint.tokenStoreKey] ?? '';
|
|
305
|
+
return { name: dest.name, logtail: { token } };
|
|
306
|
+
}
|
|
307
|
+
case 'opensearch': {
|
|
308
|
+
const user = dest.endpoint.basicAuthUserStoreKey
|
|
309
|
+
? resolved[dest.endpoint.basicAuthUserStoreKey]
|
|
310
|
+
: undefined;
|
|
311
|
+
const password = dest.endpoint.basicAuthPasswordStoreKey
|
|
312
|
+
? resolved[dest.endpoint.basicAuthPasswordStoreKey]
|
|
313
|
+
: undefined;
|
|
314
|
+
let basic_auth;
|
|
315
|
+
const hasCredentialReferences = dest.endpoint.basicAuthUserStoreKey !== undefined ||
|
|
316
|
+
dest.endpoint.basicAuthPasswordStoreKey !== undefined;
|
|
317
|
+
if (user !== undefined ||
|
|
318
|
+
password !== undefined ||
|
|
319
|
+
(includeUnresolvedSecrets && hasCredentialReferences)) {
|
|
320
|
+
basic_auth = {};
|
|
321
|
+
if (user !== undefined)
|
|
322
|
+
basic_auth.user = user;
|
|
323
|
+
if (password !== undefined)
|
|
324
|
+
basic_auth.password = password;
|
|
325
|
+
}
|
|
326
|
+
return {
|
|
327
|
+
name: dest.name,
|
|
328
|
+
open_search: {
|
|
329
|
+
endpoint: dest.endpoint.endpoint,
|
|
330
|
+
index_name: dest.endpoint.indexName,
|
|
331
|
+
basic_auth
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
function buildPrimaryService(deployment, config, defaultGithub, resolved, includeUnresolvedSecrets) {
|
|
338
|
+
const primary = {
|
|
339
|
+
name: deployment.appId,
|
|
340
|
+
envs: [],
|
|
341
|
+
internalPorts: [],
|
|
342
|
+
routes: [],
|
|
343
|
+
scaleToZero: config?.scaleToZero ?? false,
|
|
344
|
+
httpPort: config?.httpPort,
|
|
345
|
+
instanceSizeSlug: config?.instanceSizeSlug,
|
|
346
|
+
instanceCount: config?.instanceCount,
|
|
347
|
+
runCommand: config?.runCommand,
|
|
348
|
+
dockerfilePath: config?.dockerfilePath,
|
|
349
|
+
environmentSlug: config?.environmentSlug,
|
|
350
|
+
image: config?.containerImage,
|
|
351
|
+
healthCheck: config?.healthCheck,
|
|
352
|
+
autoscaling: config?.autoscaling,
|
|
353
|
+
sourceDir: deployment.build.appDir,
|
|
354
|
+
buildCommand: deployment.build.buildCommand,
|
|
355
|
+
github: undefined
|
|
356
|
+
};
|
|
357
|
+
const spec = buildServiceComponent(primary, deployment, defaultGithub, resolved, includeUnresolvedSecrets);
|
|
358
|
+
if (!spec.health_check) {
|
|
359
|
+
spec.health_check = { http_path: '/' };
|
|
360
|
+
}
|
|
361
|
+
// Default the run command ONLY when there is neither an image nor a Dockerfile —
|
|
362
|
+
// a Dockerfile component's own CMD is the run command, and a `node build` default
|
|
363
|
+
// would silently OVERRIDE it on DO App Platform.
|
|
364
|
+
if (!spec.image && !spec.dockerfile_path && !spec.run_command) {
|
|
365
|
+
spec.run_command = 'node build';
|
|
366
|
+
}
|
|
367
|
+
assertPtyRunsBun(deployment, spec);
|
|
368
|
+
return spec;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Guard: a `pty: true` app MUST resolve to a Bun-native runtime.
|
|
372
|
+
*
|
|
373
|
+
* `runtime-execution-local` opens PTYs via `Bun.Terminal` / `Bun.spawn`, so the
|
|
374
|
+
* deployed service must run under the `bun` binary. DO App Platform's default
|
|
375
|
+
* `node build` run command boots the HTTP server but throws
|
|
376
|
+
* `ReferenceError: Bun is not defined` on the first `/api/session` open. This
|
|
377
|
+
* mirrors the `appDeploymentSchema` refine that rejects `pty: true` against
|
|
378
|
+
* `cloudflare-workers` — but the run command is only known once the spec is built,
|
|
379
|
+
* so the check lives here. A Dockerfile component (Bun base image) or a `bun ...`
|
|
380
|
+
* run command satisfies it.
|
|
381
|
+
*/
|
|
382
|
+
function assertPtyRunsBun(deployment, spec) {
|
|
383
|
+
if (deployment.execution?.pty !== true)
|
|
384
|
+
return;
|
|
385
|
+
const runsBun = (spec.run_command ?? '').trim().toLowerCase().startsWith('bun');
|
|
386
|
+
if (spec.dockerfile_path || runsBun)
|
|
387
|
+
return;
|
|
388
|
+
throw new Error(`Deployment "${deployment.appId}" declares execution.pty: true but its resolved DigitalOcean ` +
|
|
389
|
+
`run command (${spec.run_command ? `"${spec.run_command}"` : 'none'}) is not Bun-native. The PTY ` +
|
|
390
|
+
`impl uses Bun.Terminal/Bun.spawn, so running under node throws "Bun is not defined" on the first ` +
|
|
391
|
+
`session open. Provide a Dockerfile component (digitaloceanApp.dockerfilePath, a Bun-capable image) ` +
|
|
392
|
+
`or a Bun run command (digitaloceanApp.runCommand: "bun ...").`);
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Pure function: turn typed inputs into a normalized App spec.
|
|
396
|
+
*/
|
|
397
|
+
export function buildDigitalOceanAppSpec(options) {
|
|
398
|
+
const { deployment, appConfig } = options;
|
|
399
|
+
const resolved = options.resolvedSecrets ?? {};
|
|
400
|
+
const includeUnresolvedSecrets = options.includeUnresolvedSecrets ?? false;
|
|
401
|
+
const defaultGithub = options.defaultGithub;
|
|
402
|
+
const isStaticRuntime = deployment.runtime === 'browser' || deployment.runtime === 'edge';
|
|
403
|
+
const name = options.appNameOverride ?? appConfig?.digitaloceanAppName ?? deployment.appId;
|
|
404
|
+
const region = options.regionOverride ?? appConfig?.region ?? 'nyc';
|
|
405
|
+
const spec = {
|
|
406
|
+
name,
|
|
407
|
+
region
|
|
408
|
+
};
|
|
409
|
+
if (isStaticRuntime) {
|
|
410
|
+
spec.static_sites = [
|
|
411
|
+
{
|
|
412
|
+
name: deployment.appId,
|
|
413
|
+
source_dir: deployment.build.appDir,
|
|
414
|
+
output_dir: deployment.build.outputDir,
|
|
415
|
+
build_command: deployment.build.buildCommand,
|
|
416
|
+
github: normalizeGithub(defaultGithub),
|
|
417
|
+
envs: buildEnvList(deployment, [], resolved, includeUnresolvedSecrets)
|
|
418
|
+
}
|
|
419
|
+
];
|
|
420
|
+
}
|
|
421
|
+
else {
|
|
422
|
+
spec.services = [buildPrimaryService(deployment, appConfig, defaultGithub, resolved, includeUnresolvedSecrets)];
|
|
423
|
+
}
|
|
424
|
+
if (appConfig) {
|
|
425
|
+
if (appConfig.services.length > 0) {
|
|
426
|
+
spec.services = [
|
|
427
|
+
...(spec.services ?? []),
|
|
428
|
+
...appConfig.services.map((s) => buildServiceComponent(s, deployment, defaultGithub, resolved, includeUnresolvedSecrets))
|
|
429
|
+
];
|
|
430
|
+
}
|
|
431
|
+
if (appConfig.workers.length > 0) {
|
|
432
|
+
spec.workers = appConfig.workers.map((w) => buildWorkerComponent(w, deployment, defaultGithub, resolved, includeUnresolvedSecrets));
|
|
433
|
+
}
|
|
434
|
+
if (appConfig.jobs.length > 0) {
|
|
435
|
+
spec.jobs = appConfig.jobs.map((j) => buildJobComponent(j, deployment, defaultGithub, resolved, includeUnresolvedSecrets, 'deploy'));
|
|
436
|
+
}
|
|
437
|
+
const cronSpecs = appConfig.cronJobs.map((j) => buildJobComponent(j, deployment, defaultGithub, resolved, includeUnresolvedSecrets, 'cron'));
|
|
438
|
+
if (cronSpecs.length > 0) {
|
|
439
|
+
// DO models cron jobs as functions with a schedule on the App spec.
|
|
440
|
+
// They live under `functions` in newer specs; we emit them under
|
|
441
|
+
// `jobs` with a `schedule` field, which the API accepts for the
|
|
442
|
+
// cron-job-type component.
|
|
443
|
+
spec.jobs = [...(spec.jobs ?? []), ...cronSpecs];
|
|
444
|
+
}
|
|
445
|
+
if (appConfig.staticSites.length > 0) {
|
|
446
|
+
spec.static_sites = [
|
|
447
|
+
...(spec.static_sites ?? []),
|
|
448
|
+
...appConfig.staticSites.map((s) => buildStaticSiteComponent(s, deployment, defaultGithub, resolved, includeUnresolvedSecrets))
|
|
449
|
+
];
|
|
450
|
+
}
|
|
451
|
+
if (appConfig.domains.length > 0) {
|
|
452
|
+
spec.domains = appConfig.domains.map(normalizeDomain);
|
|
453
|
+
}
|
|
454
|
+
if (appConfig.alerts.length > 0) {
|
|
455
|
+
spec.alerts = appConfig.alerts.map(normalizeAlert);
|
|
456
|
+
}
|
|
457
|
+
if (appConfig.logDestinations.length > 0) {
|
|
458
|
+
spec.log_destinations = appConfig.logDestinations.map((d) => normalizeLogDestination(d, resolved, includeUnresolvedSecrets));
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
return spec;
|
|
462
|
+
}
|
|
463
|
+
//# sourceMappingURL=build-spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-spec.js","sourceRoot":"","sources":["../../src/apps/build-spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAyDH,SAAS,qBAAqB,CAC7B,WAAqC,EACrC,QAAgC,EAChC,wBAAiC;IAEjC,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,KAAK,IAAI,CAAC;IAC7C,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,IAAI,WAAW,CAAC,IAAI,CAAC;IAC1D,MAAM,aAAa,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAChG,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,IAAI,aAAa,CAAC;IACjD,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,WAAW,CAAC,QAAQ,IAAI,CAAC,CAAC,wBAAwB,IAAI,QAAQ,CAAC,EAAE,CAAC;QAC7F,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,OAAO;QACN,GAAG,EAAE,WAAW,CAAC,IAAI;QACrB,KAAK;QACL,KAAK,EAAE,oBAAoB;QAC3B,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;KACrC,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CACzB,GAA0B,EAC1B,QAAgC;IAEhC,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,KAAK,QAAQ,CAA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AAI,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACpD,CAAC;QACD,IAAI,SAAS,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1C,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAC3D,uBAAuB,CAAC,CAAC,EAAE,QAAQ,EAAE,wBAAwB,CAAC,CAC9D,CAAC;QACH,CAAC;IACF,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { KindContext } from '@vibesdotdev/kernel';
|
|
2
|
+
/**
|
|
3
|
+
* App Platform deploy client.
|
|
4
|
+
*
|
|
5
|
+
* This consumer resolves the registered App credential-use client for
|
|
6
|
+
* create/update mutations. That client builds a credential-free App structure
|
|
7
|
+
* with complete-reference bindings and sends through Secrets authenticated
|
|
8
|
+
* request. Caller-owned tokens and inline App values use an operation-scoped,
|
|
9
|
+
* read-only Secrets store so bearer and field bindings share one request.
|
|
10
|
+
* Dry-run evidence strips inline SECRET values, and the client implements
|
|
11
|
+
* lifecycle-owned `--do-wait` polling.
|
|
12
|
+
*/
|
|
13
|
+
import { BaseRuntimeClient, type RuntimeClientDescriptor } from '@vibesdotdev/kernel/client';
|
|
14
|
+
import { type VibesRuntime } from '@vibesdotdev/kernel';
|
|
15
|
+
import { type DigitalOceanAppCredentialDeliveryOptions, type DigitalOceanAppDeployOptions, type DigitalOceanAppDeployResult } from '../schemas/app-deployment.ts';
|
|
16
|
+
import type { DOAppDeployment, DOAppDeploymentResource } from './types.ts';
|
|
17
|
+
export type DeployAppOptions = DigitalOceanAppDeployOptions;
|
|
18
|
+
export type DeployAppResult = DigitalOceanAppDeployResult;
|
|
19
|
+
export interface DigitalOceanAppDeployClientOptions extends DigitalOceanAppCredentialDeliveryOptions {
|
|
20
|
+
/** Inject a sleep stub for waitForActive in tests; defaults to the runtime's lifecycle.delay. */
|
|
21
|
+
sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
export declare class DigitalOceanAppDeployClient extends BaseRuntimeClient {
|
|
24
|
+
private readonly _options;
|
|
25
|
+
constructor(descriptor?: RuntimeClientDescriptor, context?: KindContext, runtime?: VibesRuntime, options?: DigitalOceanAppDeployClientOptions);
|
|
26
|
+
private fetchContext;
|
|
27
|
+
deployApp(input: DeployAppOptions): Promise<DeployAppResult>;
|
|
28
|
+
waitForDeployment(args: {
|
|
29
|
+
appId: string;
|
|
30
|
+
deploymentId: string;
|
|
31
|
+
timeoutMs: number;
|
|
32
|
+
intervalMs: number;
|
|
33
|
+
onLine?: (stream: 'stdout' | 'stderr', line: string) => void;
|
|
34
|
+
}): Promise<DOAppDeployment>;
|
|
35
|
+
streamDeploymentLogs(args: {
|
|
36
|
+
appId: string;
|
|
37
|
+
deploymentId: string;
|
|
38
|
+
onLine?: (stream: 'stdout' | 'stderr', line: string) => void;
|
|
39
|
+
}): Promise<void>;
|
|
40
|
+
getApp(appId: string): Promise<DOAppDeploymentResource>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=deploy-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-client.d.ts","sourceRoot":"","sources":["../../src/apps/deploy-client.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,iBAAiB,EAAkB,KAAK,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC7G,OAAO,EAAkE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAUxH,OAAO,EAQN,KAAK,wCAAwC,EAE7C,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAGhC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAa,eA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