@vibesdotdev/infra-core 0.0.2 → 1.0.0-rc.11
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 +18 -0
- package/README.md +28 -1
- package/dist/bootstrap/seed.descriptor.d.ts +1 -1
- package/dist/bootstrap/seed.descriptor.d.ts.map +1 -1
- package/dist/bootstrap/seed.descriptor.js +1 -1
- package/dist/bootstrap/seed.descriptor.js.map +1 -1
- package/dist/bootstrap/seed.impl-shape.d.ts +1 -1
- package/dist/bootstrap/seed.impl-shape.d.ts.map +1 -1
- package/dist/bootstrap/seed.kind.d.ts +1 -3
- package/dist/bootstrap/seed.kind.d.ts.map +1 -1
- package/dist/bootstrap/seed.kind.js +17 -4
- package/dist/bootstrap/seed.kind.js.map +1 -1
- package/dist/bootstrap/seed.runner.d.ts +9 -2
- package/dist/bootstrap/seed.runner.d.ts.map +1 -1
- package/dist/bootstrap/seed.runner.js +37 -18
- package/dist/bootstrap/seed.runner.js.map +1 -1
- package/dist/capped-id.d.ts +19 -0
- package/dist/capped-id.d.ts.map +1 -0
- package/dist/capped-id.js +64 -0
- package/dist/capped-id.js.map +1 -0
- package/dist/cli/generate/artifact/artifact.cli-command.descriptor.d.ts +23 -0
- package/dist/cli/generate/artifact/artifact.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/generate/artifact/artifact.cli-command.descriptor.js +33 -0
- package/dist/cli/generate/artifact/artifact.cli-command.descriptor.js.map +1 -0
- package/dist/cli/generate/artifact/artifact.cli-command.impl.d.ts +24 -0
- package/dist/cli/generate/artifact/artifact.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/generate/artifact/artifact.cli-command.impl.js +73 -0
- package/dist/cli/generate/artifact/artifact.cli-command.impl.js.map +1 -0
- package/dist/cli/generate/context.d.ts +17 -0
- package/dist/cli/generate/context.d.ts.map +1 -0
- package/dist/cli/generate/context.js +24 -0
- package/dist/cli/generate/context.js.map +1 -0
- package/dist/cli/generate/generate/generate.cli-command.descriptor.d.ts +30 -0
- package/dist/cli/generate/generate/generate.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/generate/generate/generate.cli-command.descriptor.js +25 -0
- package/dist/cli/generate/generate/generate.cli-command.descriptor.js.map +1 -0
- package/dist/cli/generate/generate/generate.cli-command.impl.d.ts +25 -0
- package/dist/cli/generate/generate/generate.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/generate/generate/generate.cli-command.impl.js +64 -0
- package/dist/cli/generate/generate/generate.cli-command.impl.js.map +1 -0
- package/dist/cli/generate/generate-core.d.ts +51 -0
- package/dist/cli/generate/generate-core.d.ts.map +1 -0
- package/dist/cli/generate/generate-core.js +172 -0
- package/dist/cli/generate/generate-core.js.map +1 -0
- package/dist/cli/generate/index.d.ts +5 -0
- package/dist/cli/generate/index.d.ts.map +1 -0
- package/dist/cli/generate/index.js +5 -0
- package/dist/cli/generate/index.js.map +1 -0
- package/dist/credentials/resolve.d.ts +82 -22
- package/dist/credentials/resolve.d.ts.map +1 -1
- package/dist/credentials/resolve.js +251 -77
- package/dist/credentials/resolve.js.map +1 -1
- package/dist/deployment-budget.d.ts +319 -0
- package/dist/deployment-budget.d.ts.map +1 -0
- package/dist/deployment-budget.js +660 -0
- package/dist/deployment-budget.js.map +1 -0
- package/dist/deployment-environment.d.ts +30 -0
- package/dist/deployment-environment.d.ts.map +1 -0
- package/dist/deployment-environment.js +53 -0
- package/dist/deployment-environment.js.map +1 -0
- package/dist/deployment-graph.d.ts +185 -0
- package/dist/deployment-graph.d.ts.map +1 -0
- package/dist/deployment-graph.js +705 -0
- package/dist/deployment-graph.js.map +1 -0
- package/dist/deployment.d.ts +25 -4
- package/dist/deployment.d.ts.map +1 -1
- package/dist/deployment.js +105 -0
- package/dist/deployment.js.map +1 -1
- package/dist/doks/cloud/base.d.ts +49 -0
- package/dist/doks/cloud/base.d.ts.map +1 -0
- package/dist/doks/cloud/base.js +138 -0
- package/dist/doks/cloud/base.js.map +1 -0
- package/dist/doks/cloud/factory.d.ts +18 -0
- package/dist/doks/cloud/factory.d.ts.map +1 -0
- package/dist/doks/cloud/factory.js +22 -0
- package/dist/doks/cloud/factory.js.map +1 -0
- package/dist/doks/cloud/index.d.ts +5 -0
- package/dist/doks/cloud/index.d.ts.map +1 -0
- package/dist/doks/cloud/index.js +4 -0
- package/dist/doks/cloud/index.js.map +1 -0
- package/dist/doks/types.d.ts +95 -0
- package/dist/doks/types.d.ts.map +1 -0
- package/dist/doks/types.js +14 -0
- package/dist/doks/types.js.map +1 -0
- package/dist/generate/index.d.ts +29 -0
- package/dist/generate/index.d.ts.map +1 -0
- package/dist/generate/index.js +28 -0
- package/dist/generate/index.js.map +1 -0
- package/dist/generate/infra-generate.plugin.d.ts +3 -0
- package/dist/generate/infra-generate.plugin.d.ts.map +1 -0
- package/dist/generate/infra-generate.plugin.js +23 -0
- package/dist/generate/infra-generate.plugin.js.map +1 -0
- package/dist/generate/plugin.d.ts +2 -0
- package/dist/generate/plugin.d.ts.map +1 -0
- package/dist/generate/plugin.js +2 -0
- package/dist/generate/plugin.js.map +1 -0
- package/dist/heartbeat/cron-heartbeat.d.ts +97 -0
- package/dist/heartbeat/cron-heartbeat.d.ts.map +1 -0
- package/dist/heartbeat/cron-heartbeat.js +200 -0
- package/dist/heartbeat/cron-heartbeat.js.map +1 -0
- package/dist/index.d.ts +37 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -14
- package/dist/index.js.map +1 -1
- package/dist/infra.plugin.d.ts +1 -1
- package/dist/infra.plugin.d.ts.map +1 -1
- package/dist/infra.plugin.js +64 -12
- package/dist/infra.plugin.js.map +1 -1
- package/dist/kinds/alerts.kind.d.ts +64 -25
- package/dist/kinds/alerts.kind.d.ts.map +1 -1
- package/dist/kinds/alerts.kind.js +43 -16
- package/dist/kinds/alerts.kind.js.map +1 -1
- package/dist/kinds/artifact.kind.d.ts +58 -10
- package/dist/kinds/artifact.kind.d.ts.map +1 -1
- package/dist/kinds/artifact.kind.js +26 -9
- package/dist/kinds/artifact.kind.js.map +1 -1
- package/dist/kinds/billing.kind.d.ts +88 -0
- package/dist/kinds/billing.kind.d.ts.map +1 -0
- package/dist/kinds/billing.kind.js +48 -0
- package/dist/kinds/billing.kind.js.map +1 -0
- package/dist/kinds/build-job.kind.d.ts +383 -0
- package/dist/kinds/build-job.kind.d.ts.map +1 -0
- package/dist/kinds/build-job.kind.js +218 -0
- package/dist/kinds/build-job.kind.js.map +1 -0
- package/dist/kinds/cache-byte-store.d.ts +23 -0
- package/dist/kinds/cache-byte-store.d.ts.map +1 -0
- package/dist/kinds/cache-byte-store.js +9 -0
- package/dist/kinds/cache-byte-store.js.map +1 -0
- package/dist/kinds/cache.kind.d.ts +38 -94
- package/dist/kinds/cache.kind.d.ts.map +1 -1
- package/dist/kinds/cache.kind.js +39 -50
- package/dist/kinds/cache.kind.js.map +1 -1
- package/dist/kinds/cluster.kind.d.ts +154 -0
- package/dist/kinds/cluster.kind.d.ts.map +1 -0
- package/dist/kinds/cluster.kind.js +99 -0
- package/dist/kinds/cluster.kind.js.map +1 -0
- package/dist/kinds/compute-source.kind.d.ts +155 -0
- package/dist/kinds/compute-source.kind.d.ts.map +1 -0
- package/dist/kinds/compute-source.kind.js +158 -0
- package/dist/kinds/compute-source.kind.js.map +1 -0
- package/dist/kinds/container-registry.kind.d.ts +62 -0
- package/dist/kinds/container-registry.kind.d.ts.map +1 -0
- package/dist/kinds/container-registry.kind.js +47 -0
- package/dist/kinds/container-registry.kind.js.map +1 -0
- package/dist/kinds/database-migrator.kind.d.ts +6 -0
- package/dist/kinds/database-migrator.kind.d.ts.map +1 -0
- package/dist/kinds/database-migrator.kind.js +28 -0
- package/dist/kinds/database-migrator.kind.js.map +1 -0
- package/dist/kinds/database.kind.d.ts +114 -93
- package/dist/kinds/database.kind.d.ts.map +1 -1
- package/dist/kinds/database.kind.js +93 -54
- package/dist/kinds/database.kind.js.map +1 -1
- package/dist/kinds/deployment-provider.kind.d.ts +5 -0
- package/dist/kinds/deployment-provider.kind.d.ts.map +1 -0
- package/dist/kinds/deployment-provider.kind.js +11 -0
- package/dist/kinds/deployment-provider.kind.js.map +1 -0
- package/dist/kinds/discovery.d.ts +5 -12
- package/dist/kinds/discovery.d.ts.map +1 -1
- package/dist/kinds/discovery.js +5 -17
- package/dist/kinds/discovery.js.map +1 -1
- package/dist/kinds/dns.kind.d.ts +162 -0
- package/dist/kinds/dns.kind.d.ts.map +1 -0
- package/dist/kinds/dns.kind.js +54 -0
- package/dist/kinds/dns.kind.js.map +1 -0
- package/dist/kinds/drift.kind.d.ts +115 -0
- package/dist/kinds/drift.kind.d.ts.map +1 -0
- package/dist/kinds/drift.kind.js +60 -0
- package/dist/kinds/drift.kind.js.map +1 -0
- package/dist/kinds/edge-hostname.kind.d.ts +124 -0
- package/dist/kinds/edge-hostname.kind.d.ts.map +1 -0
- package/dist/kinds/edge-hostname.kind.js +87 -0
- package/dist/kinds/edge-hostname.kind.js.map +1 -0
- package/dist/kinds/edge-tls.kind.d.ts +194 -0
- package/dist/kinds/edge-tls.kind.d.ts.map +1 -0
- package/dist/kinds/edge-tls.kind.js +58 -0
- package/dist/kinds/edge-tls.kind.js.map +1 -0
- package/dist/kinds/firewall.kind.d.ts +92 -0
- package/dist/kinds/firewall.kind.d.ts.map +1 -0
- package/dist/kinds/firewall.kind.js +59 -0
- package/dist/kinds/firewall.kind.js.map +1 -0
- package/dist/kinds/git-hosting.kind.d.ts +36 -38
- package/dist/kinds/git-hosting.kind.d.ts.map +1 -1
- package/dist/kinds/git-hosting.kind.js +21 -32
- package/dist/kinds/git-hosting.kind.js.map +1 -1
- package/dist/kinds/index.d.ts +41 -15
- package/dist/kinds/index.d.ts.map +1 -1
- package/dist/kinds/index.js +40 -14
- package/dist/kinds/index.js.map +1 -1
- package/dist/kinds/inventory.kind.d.ts +245 -0
- package/dist/kinds/inventory.kind.d.ts.map +1 -0
- package/dist/kinds/inventory.kind.js +243 -0
- package/dist/kinds/inventory.kind.js.map +1 -0
- package/dist/kinds/load-balancer.kind.d.ts +135 -0
- package/dist/kinds/load-balancer.kind.d.ts.map +1 -0
- package/dist/kinds/load-balancer.kind.js +71 -0
- package/dist/kinds/load-balancer.kind.js.map +1 -0
- package/dist/kinds/logs.kind.d.ts +74 -3
- package/dist/kinds/logs.kind.d.ts.map +1 -1
- package/dist/kinds/logs.kind.js +26 -17
- package/dist/kinds/logs.kind.js.map +1 -1
- package/dist/kinds/nfs.kind.d.ts +67 -0
- package/dist/kinds/nfs.kind.d.ts.map +1 -0
- package/dist/kinds/nfs.kind.js +45 -0
- package/dist/kinds/nfs.kind.js.map +1 -0
- package/dist/kinds/node-pool.kind.d.ts +134 -0
- package/dist/kinds/node-pool.kind.d.ts.map +1 -0
- package/dist/kinds/node-pool.kind.js +88 -0
- package/dist/kinds/node-pool.kind.js.map +1 -0
- package/dist/kinds/object-storage.kind.d.ts +50 -24
- package/dist/kinds/object-storage.kind.d.ts.map +1 -1
- package/dist/kinds/object-storage.kind.js +40 -23
- package/dist/kinds/object-storage.kind.js.map +1 -1
- package/dist/kinds/observability.kind.d.ts +104 -6
- package/dist/kinds/observability.kind.d.ts.map +1 -1
- package/dist/kinds/observability.kind.js +67 -9
- package/dist/kinds/observability.kind.js.map +1 -1
- package/dist/kinds/package-registry.kind.d.ts +139 -33
- package/dist/kinds/package-registry.kind.d.ts.map +1 -1
- package/dist/kinds/package-registry.kind.js +55 -25
- package/dist/kinds/package-registry.kind.js.map +1 -1
- package/dist/kinds/queue.kind.d.ts +67 -63
- package/dist/kinds/queue.kind.d.ts.map +1 -1
- package/dist/kinds/queue.kind.js +55 -33
- package/dist/kinds/queue.kind.js.map +1 -1
- package/dist/kinds/read-descriptor.d.ts +15 -0
- package/dist/kinds/read-descriptor.d.ts.map +1 -0
- package/dist/kinds/read-descriptor.js +11 -0
- package/dist/kinds/read-descriptor.js.map +1 -0
- package/dist/kinds/rum.kind.d.ts +36 -6
- package/dist/kinds/rum.kind.d.ts.map +1 -1
- package/dist/kinds/rum.kind.js +6 -7
- package/dist/kinds/rum.kind.js.map +1 -1
- package/dist/kinds/sandbox.kind.d.ts +136 -40
- package/dist/kinds/sandbox.kind.d.ts.map +1 -1
- package/dist/kinds/sandbox.kind.js +82 -43
- package/dist/kinds/sandbox.kind.js.map +1 -1
- package/dist/kinds/select-compute-source.d.ts +72 -0
- package/dist/kinds/select-compute-source.d.ts.map +1 -0
- package/dist/kinds/select-compute-source.js +170 -0
- package/dist/kinds/select-compute-source.js.map +1 -0
- package/dist/kinds/service-release.kind.d.ts +771 -0
- package/dist/kinds/service-release.kind.d.ts.map +1 -0
- package/dist/kinds/service-release.kind.js +676 -0
- package/dist/kinds/service-release.kind.js.map +1 -0
- package/dist/kinds/spend-guard.kind.d.ts +41 -0
- package/dist/kinds/spend-guard.kind.d.ts.map +1 -0
- package/dist/kinds/spend-guard.kind.js +140 -0
- package/dist/kinds/spend-guard.kind.js.map +1 -0
- package/dist/kinds/utilization.kind.d.ts +88 -0
- package/dist/kinds/utilization.kind.d.ts.map +1 -0
- package/dist/kinds/utilization.kind.js +62 -0
- package/dist/kinds/utilization.kind.js.map +1 -0
- package/dist/kinds/volume.kind.d.ts +54 -0
- package/dist/kinds/volume.kind.d.ts.map +1 -0
- package/dist/kinds/volume.kind.js +39 -0
- package/dist/kinds/volume.kind.js.map +1 -0
- package/dist/kinds/vpc.kind.d.ts +61 -0
- package/dist/kinds/vpc.kind.d.ts.map +1 -0
- package/dist/kinds/vpc.kind.js +51 -0
- package/dist/kinds/vpc.kind.js.map +1 -0
- package/dist/kinds/web-app.kind.d.ts +118 -45
- package/dist/kinds/web-app.kind.d.ts.map +1 -1
- package/dist/kinds/web-app.kind.js +69 -42
- package/dist/kinds/web-app.kind.js.map +1 -1
- package/dist/kinds/worker.kind.d.ts +129 -188
- package/dist/kinds/worker.kind.d.ts.map +1 -1
- package/dist/kinds/worker.kind.js +45 -123
- package/dist/kinds/worker.kind.js.map +1 -1
- package/dist/schemas/database-migration.d.ts +173 -0
- package/dist/schemas/database-migration.d.ts.map +1 -0
- package/dist/schemas/database-migration.js +88 -0
- package/dist/schemas/database-migration.js.map +1 -0
- package/dist/schemas/deployment-environment.d.ts +11 -0
- package/dist/schemas/deployment-environment.d.ts.map +1 -0
- package/dist/schemas/deployment-environment.js +9 -0
- package/dist/schemas/deployment-environment.js.map +1 -0
- package/dist/schemas/deployment-provider.d.ts +383 -0
- package/dist/schemas/deployment-provider.d.ts.map +1 -0
- package/dist/schemas/deployment-provider.js +211 -0
- package/dist/schemas/deployment-provider.js.map +1 -0
- package/dist/schemas/log-stream.d.ts +27 -0
- package/dist/schemas/log-stream.d.ts.map +1 -0
- package/dist/schemas/log-stream.js +31 -0
- package/dist/schemas/log-stream.js.map +1 -0
- package/dist/schemas/spend-guard.d.ts +155 -0
- package/dist/schemas/spend-guard.d.ts.map +1 -0
- package/dist/schemas/spend-guard.js +61 -0
- package/dist/schemas/spend-guard.js.map +1 -0
- package/dist/schemas.d.ts +195 -20
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +151 -31
- package/dist/schemas.js.map +1 -1
- package/dist/service.d.ts +87 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +199 -0
- package/dist/service.js.map +1 -0
- package/dist/settle-work.d.ts +20 -0
- package/dist/settle-work.d.ts.map +1 -0
- package/dist/settle-work.js +22 -0
- package/dist/settle-work.js.map +1 -0
- package/dist/web-app-projection.d.ts +208 -0
- package/dist/web-app-projection.d.ts.map +1 -0
- package/dist/web-app-projection.js +95 -0
- package/dist/web-app-projection.js.map +1 -0
- package/package.json +121 -37
- package/src/bootstrap/index.ts +0 -15
- package/src/bootstrap/seed.descriptor.ts +0 -24
- package/src/bootstrap/seed.impl-shape.ts +0 -5
- package/src/bootstrap/seed.kind.ts +0 -26
- package/src/bootstrap/seed.runner.ts +0 -87
- package/src/credentials/resolve.ts +0 -205
- package/src/deployment.ts +0 -57
- package/src/index.ts +0 -149
- package/src/infra.plugin.ts +0 -54
- package/src/kinds/alerts.kind.ts +0 -164
- package/src/kinds/artifact.kind.ts +0 -96
- package/src/kinds/cache.kind.ts +0 -104
- package/src/kinds/database.kind.ts +0 -120
- package/src/kinds/discovery.ts +0 -26
- package/src/kinds/git-hosting.kind.ts +0 -100
- package/src/kinds/index.ts +0 -139
- package/src/kinds/logs.kind.ts +0 -104
- package/src/kinds/object-storage.kind.ts +0 -101
- package/src/kinds/observability.kind.ts +0 -178
- package/src/kinds/package-registry.kind.ts +0 -95
- package/src/kinds/queue.kind.ts +0 -102
- package/src/kinds/rum.kind.ts +0 -135
- package/src/kinds/sandbox.kind.ts +0 -115
- package/src/kinds/web-app.kind.ts +0 -103
- package/src/kinds/worker.kind.ts +0 -203
- package/src/schemas.ts +0 -127
package/src/kinds/index.ts
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
export { webAppKind, WebAppDescriptorSchema, WebAppConfigSchema, CloudflareWorkersWebAppConfigSchema, DigitalOceanAppWebAppConfigSchema, type WebAppDescriptor, type WebAppDependency } from './web-app.kind';
|
|
2
|
-
export {
|
|
3
|
-
workerKind,
|
|
4
|
-
WorkerDescriptorSchema,
|
|
5
|
-
WorkerConfigSchema,
|
|
6
|
-
DoksDeploymentWorkerConfigSchema,
|
|
7
|
-
WorkerScalingSchema,
|
|
8
|
-
type WorkerDescriptor,
|
|
9
|
-
type WorkerScaling
|
|
10
|
-
} from './worker.kind';
|
|
11
|
-
export {
|
|
12
|
-
databaseKind,
|
|
13
|
-
DatabaseDescriptorSchema,
|
|
14
|
-
DatabaseConfigSchema,
|
|
15
|
-
DoksDatabaseConfigSchema,
|
|
16
|
-
DOManagedPostgresConfigSchema,
|
|
17
|
-
TursoDatabaseConfigSchema,
|
|
18
|
-
CloudflareD1ConfigSchema,
|
|
19
|
-
DatabaseBackupSchema,
|
|
20
|
-
type DatabaseDescriptor,
|
|
21
|
-
type DatabaseBackup
|
|
22
|
-
} from './database.kind';
|
|
23
|
-
export {
|
|
24
|
-
queueKind,
|
|
25
|
-
QueueDescriptorSchema,
|
|
26
|
-
QueueConfigSchema,
|
|
27
|
-
DoksQueueConfigSchema,
|
|
28
|
-
QueueTopicSchema,
|
|
29
|
-
type QueueDescriptor,
|
|
30
|
-
type QueueTopic
|
|
31
|
-
} from './queue.kind';
|
|
32
|
-
export { cacheKind, CacheDescriptorSchema, CacheConfigSchema, DOManagedRedisConfigSchema, type CacheDescriptor } from './cache.kind';
|
|
33
|
-
export {
|
|
34
|
-
objectStorageKind,
|
|
35
|
-
ObjectStorageDescriptorSchema,
|
|
36
|
-
ObjectStorageConfigSchema,
|
|
37
|
-
DOSpacesConfigSchema,
|
|
38
|
-
CorsRuleSchema,
|
|
39
|
-
LifecycleRuleSchema,
|
|
40
|
-
type ObjectStorageDescriptor,
|
|
41
|
-
type CorsRule,
|
|
42
|
-
type LifecycleRule
|
|
43
|
-
} from './object-storage.kind';
|
|
44
|
-
export {
|
|
45
|
-
sandboxKind,
|
|
46
|
-
SandboxDescriptorSchema,
|
|
47
|
-
SandboxConfigSchema,
|
|
48
|
-
CloudflareSandboxConfigSchema,
|
|
49
|
-
DockerSandboxConfigSchema,
|
|
50
|
-
DigitalOceanDropletSandboxConfigSchema,
|
|
51
|
-
SandboxOutboundProxySchema,
|
|
52
|
-
SandboxResourceLimitsSchema,
|
|
53
|
-
type SandboxDescriptor,
|
|
54
|
-
type SandboxOutboundProxy,
|
|
55
|
-
type SandboxResourceLimits
|
|
56
|
-
} from './sandbox.kind';
|
|
57
|
-
export {
|
|
58
|
-
gitHostingKind,
|
|
59
|
-
GitHostingDescriptorSchema,
|
|
60
|
-
GitHostingConfigSchema,
|
|
61
|
-
GiteaDoksGitHostingConfigSchema,
|
|
62
|
-
GitHostingTypeSchema,
|
|
63
|
-
GitHostingAuthMethodSchema,
|
|
64
|
-
type GitHostingDescriptor,
|
|
65
|
-
type GitHostingType,
|
|
66
|
-
type GitHostingAuthMethod
|
|
67
|
-
} from './git-hosting.kind';
|
|
68
|
-
export {
|
|
69
|
-
packageRegistryKind,
|
|
70
|
-
PackageRegistryDescriptorSchema,
|
|
71
|
-
PackageRegistryConfigSchema,
|
|
72
|
-
VerdaccioDoksPackageRegistryConfigSchema,
|
|
73
|
-
PackageRegistryTypeSchema,
|
|
74
|
-
type PackageRegistryDescriptor,
|
|
75
|
-
type PackageRegistryType
|
|
76
|
-
} from './package-registry.kind';
|
|
77
|
-
export {
|
|
78
|
-
logsKind,
|
|
79
|
-
InfraLogsDescriptorSchema,
|
|
80
|
-
type InfraLogsDescriptor,
|
|
81
|
-
type InfraLogsDescriptorInput,
|
|
82
|
-
type InfraLogsKind,
|
|
83
|
-
type InfraLogsKindInput,
|
|
84
|
-
type LogsImplementation
|
|
85
|
-
} from './logs.kind';
|
|
86
|
-
export {
|
|
87
|
-
artifactKind,
|
|
88
|
-
ArtifactDescriptorSchema,
|
|
89
|
-
type ArtifactDescriptor,
|
|
90
|
-
type ArtifactGenerator,
|
|
91
|
-
type ArtifactOutput
|
|
92
|
-
} from './artifact.kind';
|
|
93
|
-
export {
|
|
94
|
-
alertsKind,
|
|
95
|
-
InfraAlertsDescriptorSchema,
|
|
96
|
-
AlertPolicySchema,
|
|
97
|
-
AlertMechanismSchema,
|
|
98
|
-
AlertTypeSchema,
|
|
99
|
-
AlertWindowSchema,
|
|
100
|
-
type InfraAlertsDescriptor,
|
|
101
|
-
type InfraAlertsDescriptorInput,
|
|
102
|
-
type InfraAlertsKind,
|
|
103
|
-
type InfraAlertsKindInput,
|
|
104
|
-
type AlertsImplementation,
|
|
105
|
-
type AlertPolicy,
|
|
106
|
-
type AlertMechanism,
|
|
107
|
-
type AlertType
|
|
108
|
-
} from './alerts.kind.ts';
|
|
109
|
-
export {
|
|
110
|
-
observabilityKind,
|
|
111
|
-
InfraObservabilityDescriptorSchema,
|
|
112
|
-
ObservabilityScopeSchema,
|
|
113
|
-
ObservabilitySettingsSchema,
|
|
114
|
-
type InfraObservabilityDescriptor,
|
|
115
|
-
type InfraObservabilityDescriptorInput,
|
|
116
|
-
type InfraObservabilityKind,
|
|
117
|
-
type InfraObservabilityKindInput,
|
|
118
|
-
type ObservabilityImplementation,
|
|
119
|
-
type ObservabilityScope,
|
|
120
|
-
type ObservabilitySettings,
|
|
121
|
-
type ObservabilitySnapshot,
|
|
122
|
-
type SetObservabilityInput,
|
|
123
|
-
type SetObservabilityResult
|
|
124
|
-
} from './observability.kind.ts';
|
|
125
|
-
export {
|
|
126
|
-
rumKind,
|
|
127
|
-
InfraRumDescriptorSchema,
|
|
128
|
-
RumPrivacySchema,
|
|
129
|
-
RumInjectionSchema,
|
|
130
|
-
type InfraRumDescriptor,
|
|
131
|
-
type InfraRumDescriptorInput,
|
|
132
|
-
type InfraRumKind,
|
|
133
|
-
type InfraRumKindInput,
|
|
134
|
-
type RumImplementation,
|
|
135
|
-
type RumSiteSnapshot,
|
|
136
|
-
type RumPrivacy,
|
|
137
|
-
type RumInjection
|
|
138
|
-
} from './rum.kind.ts';
|
|
139
|
-
export { INFRA_DISCOVERY_PATTERN, extractStem } from './discovery.ts';
|
package/src/kinds/logs.kind.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Infra Logs Kind
|
|
3
|
-
*
|
|
4
|
-
* Descriptor schema for log sources (Workers, Pages, D1, etc.)
|
|
5
|
-
* Provides programmatic access to logs for tailing, queries, and analytics.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import * as z from 'zod/v4';
|
|
9
|
-
import { createRuntimeKind } from '@vibesdotdev/runtime/factory/kind';
|
|
10
|
-
import { RuntimeDescriptorSchema } from '@vibesdotdev/runtime/schemas/descriptor';
|
|
11
|
-
import type { RuntimeDescriptor } from '@vibesdotdev/runtime/schemas/descriptor';
|
|
12
|
-
import { INFRA_DISCOVERY_PATTERN, extractStem } from './discovery.ts';
|
|
13
|
-
|
|
14
|
-
const LogsBaseSchema = RuntimeDescriptorSchema.extend({
|
|
15
|
-
kind: z.literal('infra/logs'),
|
|
16
|
-
/** Adapter type (e.g., 'cloudflare-logs', 'datadog', 'splunk') */
|
|
17
|
-
adapter: z.string().min(1),
|
|
18
|
-
/** Adapter-specific configuration */
|
|
19
|
-
adapterConfig: z.record(z.string(), z.unknown()).optional(),
|
|
20
|
-
/** Log sources to monitor */
|
|
21
|
-
sources: z
|
|
22
|
-
.array(
|
|
23
|
-
z.object({
|
|
24
|
-
/** Source type */
|
|
25
|
-
type: z.enum(['worker', 'pages', 'd1', 'r2', 'kv']),
|
|
26
|
-
/** Source name/identifier */
|
|
27
|
-
name: z.string().min(1),
|
|
28
|
-
/** Optional environment filter */
|
|
29
|
-
environment: z.string().optional()
|
|
30
|
-
})
|
|
31
|
-
)
|
|
32
|
-
.default([]),
|
|
33
|
-
/** Default retention period */
|
|
34
|
-
retention: z
|
|
35
|
-
.object({
|
|
36
|
-
/** Hot storage (immediately accessible) */
|
|
37
|
-
hotDays: z.number().int().positive().default(7),
|
|
38
|
-
/** Cold storage (requires retrieval) */
|
|
39
|
-
coldDays: z.number().int().positive().default(30)
|
|
40
|
-
})
|
|
41
|
-
.optional(),
|
|
42
|
-
/** Alerting configuration */
|
|
43
|
-
alerts: z
|
|
44
|
-
.array(
|
|
45
|
-
z.object({
|
|
46
|
-
/** Alert name */
|
|
47
|
-
name: z.string().min(1),
|
|
48
|
-
/** Alert condition */
|
|
49
|
-
condition: z.enum(['errorRate', 'duration', 'invocationCount']),
|
|
50
|
-
/** Threshold value */
|
|
51
|
-
threshold: z.number(),
|
|
52
|
-
/** Time window for evaluation */
|
|
53
|
-
window: z.string(),
|
|
54
|
-
/** Notification channels */
|
|
55
|
-
channels: z.array(z.string()).default([])
|
|
56
|
-
})
|
|
57
|
-
)
|
|
58
|
-
.default([])
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
export const InfraLogsDescriptorSchema = LogsBaseSchema;
|
|
62
|
-
export type InfraLogsDescriptor = z.infer<typeof InfraLogsDescriptorSchema>;
|
|
63
|
-
export type InfraLogsDescriptorInput = z.input<typeof InfraLogsDescriptorSchema>;
|
|
64
|
-
|
|
65
|
-
export interface LogsImplementation {
|
|
66
|
-
/** Stream logs in real-time (returns WebSocket URL) */
|
|
67
|
-
tailLogs(sourceName: string, options?: { status?: 'ok' | 'error' | 'canceled'; limit?: number }): Promise<{ tailId: string; websocketUrl: string }>;
|
|
68
|
-
/** Stop a log tail session */
|
|
69
|
-
stopTail(sourceName: string, tailId: string): Promise<void>;
|
|
70
|
-
/** List active tail sessions */
|
|
71
|
-
listTails(sourceName: string): Promise<Array<{ id: string; createdAt: string }>>;
|
|
72
|
-
/** Get analytics summary */
|
|
73
|
-
getAnalytics(sourceName: string, timeRange?: { timeStart: string; timeEnd?: string }): Promise<{ totalInvocations: number; errorCount: number; errorRate: number; avgDurationMs: number; p99DurationMs: number; totalCpuTimeMs: number }>;
|
|
74
|
-
/** Get error rate */
|
|
75
|
-
getErrorRate(sourceName: string, timeRange?: { timeStart: string; timeEnd?: string }): Promise<number>;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export interface DefaultLogsImplementation {
|
|
79
|
-
generateConfig: () => InfraLogsDescriptor;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
class DefaultLogsImplementationClass implements DefaultLogsImplementation {
|
|
83
|
-
generateConfig(): InfraLogsDescriptor {
|
|
84
|
-
return {
|
|
85
|
-
kind: 'infra/logs',
|
|
86
|
-
id: 'default-logs',
|
|
87
|
-
name: 'Default Logs',
|
|
88
|
-
adapter: 'unknown',
|
|
89
|
-
sources: [],
|
|
90
|
-
alerts: []
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export const logsKind = createRuntimeKind<InfraLogsDescriptor, DefaultLogsImplementation>({
|
|
96
|
-
id: 'infra/logs',
|
|
97
|
-
descriptorSchema: InfraLogsDescriptorSchema,
|
|
98
|
-
defaultImplementation: DefaultLogsImplementationClass,
|
|
99
|
-
discoveryPattern: INFRA_DISCOVERY_PATTERN,
|
|
100
|
-
extractStem
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
export type InfraLogsKind = InfraLogsDescriptor;
|
|
104
|
-
export type InfraLogsKindInput = InfraLogsDescriptorInput;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kind: infra/object-storage
|
|
3
|
-
*
|
|
4
|
-
* Describes object/blob storage.
|
|
5
|
-
*
|
|
6
|
-
* Schema shape: strict common base + `config` discriminated union.
|
|
7
|
-
*
|
|
8
|
-
* - The base defines fields universal across adapters: id/kind/name +
|
|
9
|
-
* the storage shape (bucket, cors, lifecycle, publicAccess).
|
|
10
|
-
* - Adapter-specific fields (region, acl, …) live under `config`.
|
|
11
|
-
* Each adapter package defines its own concrete schema.
|
|
12
|
-
*/
|
|
13
|
-
import * as z from 'zod/v4';
|
|
14
|
-
import { createRuntimeKind } from '@vibesdotdev/runtime/factory/kind';
|
|
15
|
-
import type { RuntimeKindDescriptorRecord } from '@vibesdotdev/runtime/schemas/kind';
|
|
16
|
-
import { RuntimeDescriptorSchema } from '@vibesdotdev/runtime/schemas/descriptor';
|
|
17
|
-
import type { RuntimeDescriptor } from '@vibesdotdev/runtime/schemas/descriptor';
|
|
18
|
-
import { INFRA_DISCOVERY_PATTERN, extractStem } from './discovery.ts';
|
|
19
|
-
|
|
20
|
-
export const CorsRuleSchema = z.object({
|
|
21
|
-
allowedOrigins: z.array(z.string()).default(['*']),
|
|
22
|
-
allowedMethods: z.array(z.string()).default(['GET']),
|
|
23
|
-
allowedHeaders: z.array(z.string()).optional(),
|
|
24
|
-
maxAgeSeconds: z.number().int().nonnegative().optional()
|
|
25
|
-
});
|
|
26
|
-
export type CorsRule = z.infer<typeof CorsRuleSchema>;
|
|
27
|
-
|
|
28
|
-
export const LifecycleRuleSchema = z.object({
|
|
29
|
-
/** Prefix filter for matching objects */
|
|
30
|
-
prefix: z.string().optional(),
|
|
31
|
-
/** Days until expiration */
|
|
32
|
-
expiration: z.number().int().positive().optional(),
|
|
33
|
-
/** Storage class transition */
|
|
34
|
-
transition: z
|
|
35
|
-
.object({
|
|
36
|
-
days: z.number().int().positive(),
|
|
37
|
-
storageClass: z.string().min(1)
|
|
38
|
-
})
|
|
39
|
-
.optional()
|
|
40
|
-
});
|
|
41
|
-
export type LifecycleRule = z.infer<typeof LifecycleRuleSchema>;
|
|
42
|
-
|
|
43
|
-
const ObjectStorageBaseSchema = RuntimeDescriptorSchema.extend({
|
|
44
|
-
kind: z.literal('infra/object-storage'),
|
|
45
|
-
|
|
46
|
-
/** Bucket name (defaults to descriptor id when omitted). */
|
|
47
|
-
bucket: z.string().min(1).optional(),
|
|
48
|
-
|
|
49
|
-
/** CORS rules. */
|
|
50
|
-
cors: z.array(CorsRuleSchema).optional(),
|
|
51
|
-
|
|
52
|
-
/** Lifecycle rules. */
|
|
53
|
-
lifecycle: z.array(LifecycleRuleSchema).optional(),
|
|
54
|
-
|
|
55
|
-
/** Whether the bucket is publicly readable. */
|
|
56
|
-
publicAccess: z.boolean().optional()
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
export const DOSpacesConfigSchema = z.object({
|
|
60
|
-
/** DO region (default: nyc3). */
|
|
61
|
-
region: z.string().min(1).default('nyc3')
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
export const CloudflareR2ConfigSchema = z.object({});
|
|
65
|
-
|
|
66
|
-
export const ObjectStorageConfigSchema = z.union([
|
|
67
|
-
DOSpacesConfigSchema.extend({ adapter: z.literal('do-spaces') }),
|
|
68
|
-
CloudflareR2ConfigSchema.extend({ adapter: z.literal('cloudflare-r2') })
|
|
69
|
-
]);
|
|
70
|
-
|
|
71
|
-
export const ObjectStorageDescriptorSchema = ObjectStorageBaseSchema.extend({
|
|
72
|
-
/**
|
|
73
|
-
* Adapter-specific configuration. Discriminated union — each adapter
|
|
74
|
-
* package defines its own config schema under its discriminator key.
|
|
75
|
-
*/
|
|
76
|
-
config: ObjectStorageConfigSchema.optional()
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
export type ObjectStorageDescriptor = z.infer<typeof ObjectStorageDescriptorSchema>;
|
|
80
|
-
|
|
81
|
-
class DefaultObjectStorageImplementation {
|
|
82
|
-
constructor(
|
|
83
|
-
public readonly descriptor: RuntimeDescriptor,
|
|
84
|
-
public readonly context: unknown
|
|
85
|
-
) {}
|
|
86
|
-
|
|
87
|
-
get config(): ObjectStorageDescriptor {
|
|
88
|
-
return this.descriptor as ObjectStorageDescriptor;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export const objectStorageKind = createRuntimeKind<
|
|
93
|
-
ObjectStorageDescriptor,
|
|
94
|
-
DefaultObjectStorageImplementation
|
|
95
|
-
>({
|
|
96
|
-
id: 'infra/object-storage',
|
|
97
|
-
descriptorSchema: ObjectStorageDescriptorSchema,
|
|
98
|
-
defaultImplementation: DefaultObjectStorageImplementation,
|
|
99
|
-
discoveryPattern: INFRA_DISCOVERY_PATTERN,
|
|
100
|
-
extractStem
|
|
101
|
-
});
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Infra Observability Kind
|
|
3
|
-
*
|
|
4
|
-
* Provider-agnostic per-Worker (or fleet-wide) observability config —
|
|
5
|
-
* sampling rate, log/trace toggles, export destinations. Decouples
|
|
6
|
-
* observability concerns from the `infra/web-app` descriptor so:
|
|
7
|
-
*
|
|
8
|
-
* 1. The CLI can introspect + write settings across the entire fleet
|
|
9
|
-
* without going through deploy.
|
|
10
|
-
* 2. Cross-cutting policies (e.g. "10% sampling on every customer-facing
|
|
11
|
-
* Worker") have a single declarative shape.
|
|
12
|
-
* 3. Provider impls map onto the native control plane (CF Workers
|
|
13
|
-
* Observability, DO Monitoring, Datadog, etc.).
|
|
14
|
-
*
|
|
15
|
-
* CLI surface (`vibes infra observability …`):
|
|
16
|
-
* status [--worker] read current settings
|
|
17
|
-
* set [--worker] --sampling 0.1 write new settings
|
|
18
|
-
* exports list|add|remove (Phase 2.5; not yet wired)
|
|
19
|
-
*
|
|
20
|
-
* Production Workers consume settings via their wrangler.jsonc; the CLI
|
|
21
|
-
* writes directly to the provider API for immediate effect. To avoid
|
|
22
|
-
* drift, `vibes infra deploy regenerate` is the canonical declarative
|
|
23
|
-
* path — the CLI here is for ops-time tuning between deploys.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
import * as z from 'zod/v4';
|
|
27
|
-
import { createRuntimeKind } from '@vibesdotdev/runtime/factory/kind';
|
|
28
|
-
import { RuntimeDescriptorSchema } from '@vibesdotdev/runtime/schemas/descriptor';
|
|
29
|
-
import { INFRA_DISCOVERY_PATTERN, extractStem } from './discovery.ts';
|
|
30
|
-
|
|
31
|
-
const ObservabilityScopeSchema = z.discriminatedUnion('kind', [
|
|
32
|
-
z.object({
|
|
33
|
-
kind: z.literal('worker'),
|
|
34
|
-
workerName: z.string().min(1)
|
|
35
|
-
}),
|
|
36
|
-
z.object({
|
|
37
|
-
kind: z.literal('account-wide'),
|
|
38
|
-
/** When set, restrict the fleet sweep to workers matching the glob. */
|
|
39
|
-
filter: z.string().optional()
|
|
40
|
-
})
|
|
41
|
-
]);
|
|
42
|
-
|
|
43
|
-
export type ObservabilityScope = z.infer<typeof ObservabilityScopeSchema>;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Standard observability settings shape. Provider impls translate
|
|
47
|
-
* these onto native fields (CF: `observability.head_sampling_rate`,
|
|
48
|
-
* Datadog: `apm_sampling_rate`, etc.).
|
|
49
|
-
*/
|
|
50
|
-
const ObservabilitySettingsSchema = z.object({
|
|
51
|
-
logs: z
|
|
52
|
-
.object({
|
|
53
|
-
enabled: z.boolean(),
|
|
54
|
-
/**
|
|
55
|
-
* Head sampling rate, 0..1. Providers without head-sampling
|
|
56
|
-
* (e.g. Logpush-only setups) treat this as a hint and may
|
|
57
|
-
* implement tail-sampling at the destination instead.
|
|
58
|
-
*/
|
|
59
|
-
headSamplingRate: z.number().min(0).max(1).optional(),
|
|
60
|
-
structured: z.boolean().optional(),
|
|
61
|
-
/** Persist logs for dashboard view (CF: observability.logs.persist). */
|
|
62
|
-
persist: z.boolean().optional(),
|
|
63
|
-
/** Capture per-request invocation envelopes (CF only). */
|
|
64
|
-
invocationLogs: z.boolean().optional()
|
|
65
|
-
})
|
|
66
|
-
.optional(),
|
|
67
|
-
traces: z
|
|
68
|
-
.object({
|
|
69
|
-
enabled: z.boolean(),
|
|
70
|
-
headSamplingRate: z.number().min(0).max(1).optional(),
|
|
71
|
-
persist: z.boolean().optional(),
|
|
72
|
-
exporter: z
|
|
73
|
-
.object({
|
|
74
|
-
kind: z.enum(['otlp', 'datadog', 'jaeger']),
|
|
75
|
-
endpoint: z.string().url(),
|
|
76
|
-
tokenSecretKey: z.string().optional()
|
|
77
|
-
})
|
|
78
|
-
.optional()
|
|
79
|
-
})
|
|
80
|
-
.optional(),
|
|
81
|
-
exports: z
|
|
82
|
-
.array(
|
|
83
|
-
z.discriminatedUnion('kind', [
|
|
84
|
-
z.object({
|
|
85
|
-
kind: z.literal('logflare'),
|
|
86
|
-
tokenSecretKey: z.string()
|
|
87
|
-
}),
|
|
88
|
-
z.object({
|
|
89
|
-
kind: z.literal('datadog'),
|
|
90
|
-
apiKeySecretKey: z.string(),
|
|
91
|
-
site: z.string()
|
|
92
|
-
}),
|
|
93
|
-
z.object({
|
|
94
|
-
kind: z.literal('logpush'),
|
|
95
|
-
destination: z.string(),
|
|
96
|
-
dataset: z.string()
|
|
97
|
-
})
|
|
98
|
-
])
|
|
99
|
-
)
|
|
100
|
-
.optional()
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
export type ObservabilitySettings = z.infer<typeof ObservabilitySettingsSchema>;
|
|
104
|
-
|
|
105
|
-
const ObservabilityBaseSchema = RuntimeDescriptorSchema.extend({
|
|
106
|
-
kind: z.literal('infra/observability'),
|
|
107
|
-
adapter: z.string().min(1),
|
|
108
|
-
adapterConfig: z.record(z.string(), z.unknown()).optional(),
|
|
109
|
-
environment: z.string().default('local'),
|
|
110
|
-
/**
|
|
111
|
-
* Default scope when the descriptor is used standalone (e.g.
|
|
112
|
-
* `vibes infra observability status` with no --worker flag). When
|
|
113
|
-
* the CLI passes an explicit scope, this is ignored.
|
|
114
|
-
*/
|
|
115
|
-
defaultScope: ObservabilityScopeSchema.default({ kind: 'account-wide' }),
|
|
116
|
-
/**
|
|
117
|
-
* Optional declared settings — used by `vibes infra observability
|
|
118
|
-
* sync` (future) to drive a desired-state reconciliation. Today the
|
|
119
|
-
* CLI imperatively sets values per call.
|
|
120
|
-
*/
|
|
121
|
-
settings: ObservabilitySettingsSchema.optional()
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
export type InfraObservabilityDescriptor = z.infer<typeof ObservabilityBaseSchema>;
|
|
125
|
-
export type InfraObservabilityDescriptorInput = z.input<typeof ObservabilityBaseSchema>;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Snapshot of the live settings for a single Worker (or other scope).
|
|
129
|
-
* Returned by `getStatus`; consumed by the CLI for table-rendering.
|
|
130
|
-
*/
|
|
131
|
-
export interface ObservabilitySnapshot {
|
|
132
|
-
workerName: string;
|
|
133
|
-
settings: ObservabilitySettings;
|
|
134
|
-
/** Last-modified timestamp from the provider, when available. */
|
|
135
|
-
modifiedAt?: string;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export interface SetObservabilityInput {
|
|
139
|
-
scope: ObservabilityScope;
|
|
140
|
-
settings: ObservabilitySettings;
|
|
141
|
-
/** Skip Workers that already match desired state. Defaults to true. */
|
|
142
|
-
skipUnchanged?: boolean;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export interface SetObservabilityResult {
|
|
146
|
-
changed: Array<{ workerName: string; before: ObservabilitySettings; after: ObservabilitySettings }>;
|
|
147
|
-
unchanged: string[];
|
|
148
|
-
failed: Array<{ workerName: string; error: string }>;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Implementation contract every provider implements.
|
|
153
|
-
*/
|
|
154
|
-
export interface ObservabilityImplementation {
|
|
155
|
-
/** Read current settings for a scope. account-wide → one snapshot per Worker. */
|
|
156
|
-
getStatus(scope: ObservabilityScope): Promise<ObservabilitySnapshot[]>;
|
|
157
|
-
/** Apply settings to a scope. Returns per-Worker outcome. */
|
|
158
|
-
set(input: SetObservabilityInput): Promise<SetObservabilityResult>;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export const observabilityKind = createRuntimeKind<
|
|
162
|
-
InfraObservabilityDescriptor,
|
|
163
|
-
ObservabilityImplementation
|
|
164
|
-
>({
|
|
165
|
-
id: 'infra/observability',
|
|
166
|
-
descriptorSchema: ObservabilityBaseSchema,
|
|
167
|
-
discoveryPattern: INFRA_DISCOVERY_PATTERN,
|
|
168
|
-
extractStem
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
export type InfraObservabilityKind = InfraObservabilityDescriptor;
|
|
172
|
-
export type InfraObservabilityKindInput = InfraObservabilityDescriptorInput;
|
|
173
|
-
|
|
174
|
-
export {
|
|
175
|
-
ObservabilityBaseSchema as InfraObservabilityDescriptorSchema,
|
|
176
|
-
ObservabilityScopeSchema,
|
|
177
|
-
ObservabilitySettingsSchema
|
|
178
|
-
};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kind: infra/package-registry
|
|
3
|
-
*
|
|
4
|
-
* Describes a package registry instance (npm, Docker, Maven, Helm, etc.).
|
|
5
|
-
*
|
|
6
|
-
* Schema shape: strict common base + `config` discriminated union.
|
|
7
|
-
*
|
|
8
|
-
* - The base (this file) defines fields that are universal across every
|
|
9
|
-
* adapter: id/kind/name + the registry shape every package host declares
|
|
10
|
-
* (url, registryType, scope, upstreamUrl, authRequired, ssl, env).
|
|
11
|
-
* - Adapter-specific fields (dockerImage, storageSize, domain, …)
|
|
12
|
-
* live exclusively under `config`. Each adapter package defines its own
|
|
13
|
-
* concrete schema under its discriminator key.
|
|
14
|
-
*/
|
|
15
|
-
import * as z from 'zod/v4';
|
|
16
|
-
import { createRuntimeKind } from '@vibesdotdev/runtime/factory/kind';
|
|
17
|
-
import type { RuntimeKindDescriptorRecord } from '@vibesdotdev/runtime/schemas/kind';
|
|
18
|
-
import { RuntimeDescriptorSchema } from '@vibesdotdev/runtime/schemas/descriptor';
|
|
19
|
-
import type { RuntimeDescriptor } from '@vibesdotdev/runtime/schemas/descriptor';
|
|
20
|
-
import { INFRA_DISCOVERY_PATTERN, extractStem } from './discovery.ts';
|
|
21
|
-
import { deploymentEnvRequirementSchema } from '../schemas.ts';
|
|
22
|
-
|
|
23
|
-
export const PackageRegistryTypeSchema = z.enum(['npm', 'docker', 'maven', 'helm']);
|
|
24
|
-
export type PackageRegistryType = z.infer<typeof PackageRegistryTypeSchema>;
|
|
25
|
-
|
|
26
|
-
const PackageRegistryBaseSchema = RuntimeDescriptorSchema.extend({
|
|
27
|
-
kind: z.literal('infra/package-registry'),
|
|
28
|
-
|
|
29
|
-
/** Primary access URL (e.g. 'https://packages.example.com'). */
|
|
30
|
-
url: z.string().url(),
|
|
31
|
-
|
|
32
|
-
/** Package type this registry serves. */
|
|
33
|
-
registryType: PackageRegistryTypeSchema.default('npm'),
|
|
34
|
-
|
|
35
|
-
/** Npm scope this registry owns (e.g. '@vibesdotdev'). */
|
|
36
|
-
scope: z.string().optional(),
|
|
37
|
-
|
|
38
|
-
/** Upstream registry URL this registry proxies (optional). */
|
|
39
|
-
upstreamUrl: z.string().url().optional(),
|
|
40
|
-
|
|
41
|
-
/** Whether authentication is required to pull from this registry. */
|
|
42
|
-
authRequired: z.boolean().default(true),
|
|
43
|
-
|
|
44
|
-
/** Whether TLS is enabled. */
|
|
45
|
-
ssl: z.boolean().default(true),
|
|
46
|
-
|
|
47
|
-
/** Environment variable requirements. */
|
|
48
|
-
env: z.array(deploymentEnvRequirementSchema).optional()
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
export const VerdaccioDoksPackageRegistryConfigSchema = z.object({
|
|
52
|
-
/** Docker image for the Verdaccio container. */
|
|
53
|
-
dockerImage: z.string().default('verdaccio/verdaccio:5'),
|
|
54
|
-
/** Persistent storage size (e.g. '10Gi'). */
|
|
55
|
-
storageSize: z.string().default('10Gi'),
|
|
56
|
-
/** Primary domain for the registry. */
|
|
57
|
-
domain: z.string().min(1),
|
|
58
|
-
/** Upstream npm registry URL to proxy. */
|
|
59
|
-
upstreamNpmUrl: z.string().url().default('https://registry.npmjs.org'),
|
|
60
|
-
/** Whether built-in authentication is enabled. */
|
|
61
|
-
authEnabled: z.boolean().default(true)
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
export const PackageRegistryConfigSchema = z.union([
|
|
65
|
-
VerdaccioDoksPackageRegistryConfigSchema.extend({ adapter: z.literal('verdaccio-doks') })
|
|
66
|
-
]);
|
|
67
|
-
|
|
68
|
-
export const PackageRegistryDescriptorSchema = PackageRegistryBaseSchema.extend({
|
|
69
|
-
/**
|
|
70
|
-
* Adapter-specific configuration. Discriminated union — each adapter
|
|
71
|
-
* package defines its own config schema under its discriminator key.
|
|
72
|
-
*/
|
|
73
|
-
config: PackageRegistryConfigSchema.optional()
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
export type PackageRegistryDescriptor = z.infer<typeof PackageRegistryDescriptorSchema>;
|
|
77
|
-
|
|
78
|
-
class DefaultPackageRegistryImplementation {
|
|
79
|
-
constructor(
|
|
80
|
-
public readonly descriptor: RuntimeDescriptor,
|
|
81
|
-
public readonly context: unknown
|
|
82
|
-
) {}
|
|
83
|
-
|
|
84
|
-
get config(): PackageRegistryDescriptor {
|
|
85
|
-
return this.descriptor as PackageRegistryDescriptor;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export const packageRegistryKind = createRuntimeKind<PackageRegistryDescriptor, DefaultPackageRegistryImplementation>({
|
|
90
|
-
id: 'infra/package-registry',
|
|
91
|
-
descriptorSchema: PackageRegistryDescriptorSchema,
|
|
92
|
-
defaultImplementation: DefaultPackageRegistryImplementation,
|
|
93
|
-
discoveryPattern: INFRA_DISCOVERY_PATTERN,
|
|
94
|
-
extractStem
|
|
95
|
-
});
|