@wildo-ai/platform-infra-providers 1.1.2 → 1.1.3
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/dist/esm/gotenberg-self/gotenberg-self.infra.module.d.ts +0 -26
- package/dist/esm/gotenberg-self/gotenberg-self.infra.module.d.ts.map +0 -1
- package/dist/esm/gotenberg-self/gotenberg-self.infra.module.js +0 -54
- package/dist/esm/gotenberg-self/gotenberg-self.infra.module.js.map +0 -1
- package/dist/esm/index.d.ts +2 -3
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/index.ts +2 -5
- package/src/gotenberg-self/__tests__/gotenberg-self.infra.module.test.ts +0 -65
- package/src/gotenberg-self/gotenberg-self.infra.module.ts +0 -65
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `GotenbergSelfInfraProviderModule` — ninth concrete
|
|
3
|
-
* `InfraProviderModule` (Slice 5.3 of `infra-provider-planner.md`).
|
|
4
|
-
*
|
|
5
|
-
* Implements the `GOTENBERG_SELF` `InfraProvider`. **Stateless**:
|
|
6
|
-
* Gotenberg is a network HTML-to-PDF rendering service with no auth
|
|
7
|
-
* and no per-tenant state. Apps POST HTML/Office docs and receive
|
|
8
|
-
* rendered PDFs; nothing is persisted server-side. Same shape as
|
|
9
|
-
* `ClamavSelfInfraProviderModule` — `plan()` only, no mint methods.
|
|
10
|
-
*
|
|
11
|
-
* **Apps consume**: `GOTENBERG_HOST`, `GOTENBERG_PORT` env vars (TBD
|
|
12
|
-
* naming — current engine adapter reads these from
|
|
13
|
-
* `BackingServicesEnvConfig` via the catalog at
|
|
14
|
-
* `wildo-cli/.../service-catalog.schemas.ts:78`). The plan emits
|
|
15
|
-
* the env vars under those names.
|
|
16
|
-
*
|
|
17
|
-
* **Two ports** (Slice 5.3 design note): Gotenberg exposes both a
|
|
18
|
-
* public port (3000 by default) for HTTP API access and an internal
|
|
19
|
-
* port (3001) for health-check/metrics. The CLI's docker-compose
|
|
20
|
-
* generator already wires both. The module's `plan()` only emits
|
|
21
|
-
* the public port — the internal port is a docker-compose-only
|
|
22
|
-
* concern and isn't part of the customer-app env-var surface.
|
|
23
|
-
*/
|
|
24
|
-
import { InfraProviderModule } from '@wildo-ai/platform-config-lib';
|
|
25
|
-
export declare const GotenbergSelfInfraProviderModule: InfraProviderModule;
|
|
26
|
-
//# sourceMappingURL=gotenberg-self.infra.module.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gotenberg-self.infra.module.d.ts","sourceRoot":"","sources":["../../../../src/gotenberg-self/gotenberg-self.infra.module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAIL,mBAAmB,EAEpB,MAAM,+BAA+B,CAAC;AAIvC,eAAO,MAAM,gCAAgC,EAAE,mBA8B9C,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `GotenbergSelfInfraProviderModule` — ninth concrete
|
|
3
|
-
* `InfraProviderModule` (Slice 5.3 of `infra-provider-planner.md`).
|
|
4
|
-
*
|
|
5
|
-
* Implements the `GOTENBERG_SELF` `InfraProvider`. **Stateless**:
|
|
6
|
-
* Gotenberg is a network HTML-to-PDF rendering service with no auth
|
|
7
|
-
* and no per-tenant state. Apps POST HTML/Office docs and receive
|
|
8
|
-
* rendered PDFs; nothing is persisted server-side. Same shape as
|
|
9
|
-
* `ClamavSelfInfraProviderModule` — `plan()` only, no mint methods.
|
|
10
|
-
*
|
|
11
|
-
* **Apps consume**: `GOTENBERG_HOST`, `GOTENBERG_PORT` env vars (TBD
|
|
12
|
-
* naming — current engine adapter reads these from
|
|
13
|
-
* `BackingServicesEnvConfig` via the catalog at
|
|
14
|
-
* `wildo-cli/.../service-catalog.schemas.ts:78`). The plan emits
|
|
15
|
-
* the env vars under those names.
|
|
16
|
-
*
|
|
17
|
-
* **Two ports** (Slice 5.3 design note): Gotenberg exposes both a
|
|
18
|
-
* public port (3000 by default) for HTTP API access and an internal
|
|
19
|
-
* port (3001) for health-check/metrics. The CLI's docker-compose
|
|
20
|
-
* generator already wires both. The module's `plan()` only emits
|
|
21
|
-
* the public port — the internal port is a docker-compose-only
|
|
22
|
-
* concern and isn't part of the customer-app env-var surface.
|
|
23
|
-
*/
|
|
24
|
-
import { InfraCapability, InfraPlatformAdminConsumer, InfraProvider, } from '@wildo-ai/platform-config-lib';
|
|
25
|
-
const DEFAULT_GOTENBERG_PORT = 3000;
|
|
26
|
-
export const GotenbergSelfInfraProviderModule = {
|
|
27
|
-
provider: InfraProvider.GOTENBERG_SELF,
|
|
28
|
-
supportedCapabilities: [InfraCapability.DOCUMENT_RENDERING],
|
|
29
|
-
/**
|
|
30
|
-
* Stateless infra with no authentication and no per-app state — `plan()` only.
|
|
31
|
-
*/
|
|
32
|
-
perPrincipalSecretBlobPaths: [],
|
|
33
|
-
plan() {
|
|
34
|
-
return {
|
|
35
|
-
dockerComposeServices: ['gotenberg'],
|
|
36
|
-
k8sResources: ['templates/infra/k8s/internal/gotenberg/deployment.yaml.hbs'],
|
|
37
|
-
platformAdmin: {
|
|
38
|
-
envVars: {
|
|
39
|
-
GOTENBERG_HOST: 'gotenberg',
|
|
40
|
-
GOTENBERG_PORT: String(DEFAULT_GOTENBERG_PORT),
|
|
41
|
-
},
|
|
42
|
-
// No secret env vars — Gotenberg has no auth.
|
|
43
|
-
consumers: [
|
|
44
|
-
InfraPlatformAdminConsumer.APPS_MANAGER,
|
|
45
|
-
InfraPlatformAdminConsumer.COMPANION,
|
|
46
|
-
],
|
|
47
|
-
},
|
|
48
|
-
// No `appRuntime` blob paths — apps connect via the same
|
|
49
|
-
// `GOTENBERG_HOST:GOTENBERG_PORT` regardless of app identity.
|
|
50
|
-
};
|
|
51
|
-
},
|
|
52
|
-
// No mint methods — Gotenberg is stateless.
|
|
53
|
-
};
|
|
54
|
-
//# sourceMappingURL=gotenberg-self.infra.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gotenberg-self.infra.module.js","sourceRoot":"","sources":["../../../../src/gotenberg-self/gotenberg-self.infra.module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,aAAa,GAGd,MAAM,+BAA+B,CAAC;AAEvC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAEpC,MAAM,CAAC,MAAM,gCAAgC,GAAwB;IACnE,QAAQ,EAAE,aAAa,CAAC,cAAc;IACtC,qBAAqB,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC;IAE3D;;OAEG;IACH,2BAA2B,EAAE,EAAE;IAE/B,IAAI;QACF,OAAO;YACL,qBAAqB,EAAE,CAAC,WAAW,CAAC;YACpC,YAAY,EAAE,CAAC,4DAA4D,CAAC;YAC5E,aAAa,EAAE;gBACb,OAAO,EAAE;oBACP,cAAc,EAAE,WAAW;oBAC3B,cAAc,EAAE,MAAM,CAAC,sBAAsB,CAAC;iBAC/C;gBACD,8CAA8C;gBAC9C,SAAS,EAAE;oBACT,0BAA0B,CAAC,YAAY;oBACvC,0BAA0B,CAAC,SAAS;iBACrC;aACF;YACD,yDAAyD;YACzD,8DAA8D;SAC/D,CAAC;IACJ,CAAC;IAED,4CAA4C;CAC7C,CAAC","sourcesContent":["/**\n * `GotenbergSelfInfraProviderModule` — ninth concrete\n * `InfraProviderModule` (Slice 5.3 of `infra-provider-planner.md`).\n *\n * Implements the `GOTENBERG_SELF` `InfraProvider`. **Stateless**:\n * Gotenberg is a network HTML-to-PDF rendering service with no auth\n * and no per-tenant state. Apps POST HTML/Office docs and receive\n * rendered PDFs; nothing is persisted server-side. Same shape as\n * `ClamavSelfInfraProviderModule` — `plan()` only, no mint methods.\n *\n * **Apps consume**: `GOTENBERG_HOST`, `GOTENBERG_PORT` env vars (TBD\n * naming — current engine adapter reads these from\n * `BackingServicesEnvConfig` via the catalog at\n * `wildo-cli/.../service-catalog.schemas.ts:78`). The plan emits\n * the env vars under those names.\n *\n * **Two ports** (Slice 5.3 design note): Gotenberg exposes both a\n * public port (3000 by default) for HTTP API access and an internal\n * port (3001) for health-check/metrics. The CLI's docker-compose\n * generator already wires both. The module's `plan()` only emits\n * the public port — the internal port is a docker-compose-only\n * concern and isn't part of the customer-app env-var surface.\n */\n\nimport {\n InfraCapability,\n InfraPlatformAdminConsumer,\n InfraProvider,\n InfraProviderModule,\n InfraProviderPlanContribution,\n} from '@wildo-ai/platform-config-lib';\n\nconst DEFAULT_GOTENBERG_PORT = 3000;\n\nexport const GotenbergSelfInfraProviderModule: InfraProviderModule = {\n provider: InfraProvider.GOTENBERG_SELF,\n supportedCapabilities: [InfraCapability.DOCUMENT_RENDERING],\n\n /**\n * Stateless infra with no authentication and no per-app state — `plan()` only.\n */\n perPrincipalSecretBlobPaths: [],\n\n plan(): InfraProviderPlanContribution {\n return {\n dockerComposeServices: ['gotenberg'],\n k8sResources: ['templates/infra/k8s/internal/gotenberg/deployment.yaml.hbs'],\n platformAdmin: {\n envVars: {\n GOTENBERG_HOST: 'gotenberg',\n GOTENBERG_PORT: String(DEFAULT_GOTENBERG_PORT),\n },\n // No secret env vars — Gotenberg has no auth.\n consumers: [\n InfraPlatformAdminConsumer.APPS_MANAGER,\n InfraPlatformAdminConsumer.COMPANION,\n ],\n },\n // No `appRuntime` blob paths — apps connect via the same\n // `GOTENBERG_HOST:GOTENBERG_PORT` regardless of app identity.\n };\n },\n\n // No mint methods — Gotenberg is stateless.\n};\n"]}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -25,7 +25,6 @@ export { MongodbSelfInfraProviderModule } from './mongodb-self/mongodb-self.infr
|
|
|
25
25
|
export { MinioSelfInfraProviderModule } from './minio-self/minio-self.infra.module';
|
|
26
26
|
export { AwsS3InfraProviderModule } from './aws-s3/aws-s3.infra.module';
|
|
27
27
|
export { ClamavSelfInfraProviderModule } from './clamav-self/clamav-self.infra.module';
|
|
28
|
-
export { GotenbergSelfInfraProviderModule } from './gotenberg-self/gotenberg-self.infra.module';
|
|
29
28
|
/**
|
|
30
29
|
* Canonical `InfraProvider` → `InfraProviderModule` catalog. Caller
|
|
31
30
|
* (CLI, apps-manager) builds a `Map<InfraProvider, InfraProviderModule>`
|
|
@@ -43,8 +42,8 @@ export { GotenbergSelfInfraProviderModule } from './gotenberg-self/gotenberg-sel
|
|
|
43
42
|
* methods.
|
|
44
43
|
* - `MINIO_SELF`, `AWS_S3` — object storage (shared-bucket model;
|
|
45
44
|
* no per-app credentials).
|
|
46
|
-
* - `CLAMAV_SELF
|
|
47
|
-
*
|
|
45
|
+
* - `CLAMAV_SELF` — stateless infra (no auth, no per-app state;
|
|
46
|
+
* `plan()` only).
|
|
48
47
|
*
|
|
49
48
|
* **NOT covered** (catalog entries without modules):
|
|
50
49
|
* - `POSTGRES_MANAGED`, `POSTGRES_AWS_RDS`, `POSTGRES_GCP_CLOUD_SQL`,
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAYxF,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAEvF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,mBAAmB,CASrE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kCAAkC,IAAI,WAAW,CAAC,MAAM,CAAC,CAQxE;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,IAAI,WAAW,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAY7F"}
|
package/dist/esm/index.js
CHANGED
|
@@ -25,7 +25,6 @@ import { MongodbSelfInfraProviderModule } from './mongodb-self/mongodb-self.infr
|
|
|
25
25
|
import { MinioSelfInfraProviderModule } from './minio-self/minio-self.infra.module.js';
|
|
26
26
|
import { AwsS3InfraProviderModule } from './aws-s3/aws-s3.infra.module.js';
|
|
27
27
|
import { ClamavSelfInfraProviderModule } from './clamav-self/clamav-self.infra.module.js';
|
|
28
|
-
import { GotenbergSelfInfraProviderModule } from './gotenberg-self/gotenberg-self.infra.module.js';
|
|
29
28
|
export { RabbitmqSelfInfraProviderModule } from './rabbitmq-self/rabbitmq-self.infra.module.js';
|
|
30
29
|
export { RedisSelfInfraProviderModule } from './redis-self/redis-self.infra.module.js';
|
|
31
30
|
export { PostgresSelfInfraProviderModule } from './postgres-self/postgres-self.infra.module.js';
|
|
@@ -34,7 +33,6 @@ export { MongodbSelfInfraProviderModule } from './mongodb-self/mongodb-self.infr
|
|
|
34
33
|
export { MinioSelfInfraProviderModule } from './minio-self/minio-self.infra.module.js';
|
|
35
34
|
export { AwsS3InfraProviderModule } from './aws-s3/aws-s3.infra.module.js';
|
|
36
35
|
export { ClamavSelfInfraProviderModule } from './clamav-self/clamav-self.infra.module.js';
|
|
37
|
-
export { GotenbergSelfInfraProviderModule } from './gotenberg-self/gotenberg-self.infra.module.js';
|
|
38
36
|
/**
|
|
39
37
|
* Canonical `InfraProvider` → `InfraProviderModule` catalog. Caller
|
|
40
38
|
* (CLI, apps-manager) builds a `Map<InfraProvider, InfraProviderModule>`
|
|
@@ -52,8 +50,8 @@ export { GotenbergSelfInfraProviderModule } from './gotenberg-self/gotenberg-sel
|
|
|
52
50
|
* methods.
|
|
53
51
|
* - `MINIO_SELF`, `AWS_S3` — object storage (shared-bucket model;
|
|
54
52
|
* no per-app credentials).
|
|
55
|
-
* - `CLAMAV_SELF
|
|
56
|
-
*
|
|
53
|
+
* - `CLAMAV_SELF` — stateless infra (no auth, no per-app state;
|
|
54
|
+
* `plan()` only).
|
|
57
55
|
*
|
|
58
56
|
* **NOT covered** (catalog entries without modules):
|
|
59
57
|
* - `POSTGRES_MANAGED`, `POSTGRES_AWS_RDS`, `POSTGRES_GCP_CLOUD_SQL`,
|
|
@@ -74,7 +72,6 @@ export const INFRA_PROVIDER_MODULES = [
|
|
|
74
72
|
MinioSelfInfraProviderModule,
|
|
75
73
|
AwsS3InfraProviderModule,
|
|
76
74
|
ClamavSelfInfraProviderModule,
|
|
77
|
-
GotenbergSelfInfraProviderModule,
|
|
78
75
|
];
|
|
79
76
|
/**
|
|
80
77
|
* Every `Wildo_Application_Secrets` JSON path that ANY provider module can mint per runtime
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,6EAA6E;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,6EAA6E;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAEvF,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAEvF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAuC;IACxE,+BAA+B;IAC/B,4BAA4B;IAC5B,+BAA+B;IAC/B,+BAA+B;IAC/B,8BAA8B;IAC9B,4BAA4B;IAC5B,wBAAwB;IACxB,6BAA6B;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,kCAAkC;IAChD,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,KAAK,MAAM,MAAM,IAAI,sBAAsB,EAAE,CAAC;QAC5C,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,2BAA2B,EAAE,CAAC;YACtD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B;IACzC,MAAM,GAAG,GAAG,IAAI,GAAG,EAAsC,CAAC;IAC1D,KAAK,MAAM,CAAC,IAAI,sBAAsB,EAAE,CAAC;QACvC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CACb,uDAAuD,CAAC,CAAC,QAAQ,MAAM;gBACvE,iDAAiD,CAClD,CAAC;QACJ,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/**\n * `@wildo-ai/platform-infra-providers` — concrete `InfraProviderModule`\n * catalog (Slice 2.5c-1 of `infra-provider-planner.md`).\n *\n * Tier-portable: the modules import only `@wildo-ai/platform-config-lib`\n * (contracts) and have no DI / mongoose / axios runtime dependencies.\n * This lets both `platform-apps-manager` (orchestrator) and\n * `wildo-cli` (lockfile materializer) consume the same module\n * objects — apps-manager passes a real admin-client implementation\n * via `AppCredentialMintingContext.adminClient`; wildo-cli only\n * needs `module.plan()` for the lockfile digest.\n *\n * Each module is exported by name (no intermediary barrels per\n * platform/CLAUDE.md \"no intermediary index.ts barrels\"). The\n * `INFRA_PROVIDER_MODULES` map below is the canonical catalog —\n * consumers iterate it (or look up by `InfraProvider` value) instead\n * of importing modules one by one.\n */\n\nimport type { InfraProvider, InfraProviderModule } from '@wildo-ai/platform-config-lib';\n\nimport { RabbitmqSelfInfraProviderModule } from './rabbitmq-self/rabbitmq-self.infra.module';\nimport { RedisSelfInfraProviderModule } from './redis-self/redis-self.infra.module';\nimport { PostgresSelfInfraProviderModule } from './postgres-self/postgres-self.infra.module';\nimport { MongodbAtlasInfraProviderModule } from './mongodb-atlas/mongodb-atlas.infra.module';\nimport { MongodbSelfInfraProviderModule } from './mongodb-self/mongodb-self.infra.module';\n// Slice 5 of `infra-provider-planner.md` — object-storage + stateless infra.\nimport { MinioSelfInfraProviderModule } from './minio-self/minio-self.infra.module';\nimport { AwsS3InfraProviderModule } from './aws-s3/aws-s3.infra.module';\nimport { ClamavSelfInfraProviderModule } from './clamav-self/clamav-self.infra.module';\n\nexport { RabbitmqSelfInfraProviderModule } from './rabbitmq-self/rabbitmq-self.infra.module';\nexport { RedisSelfInfraProviderModule } from './redis-self/redis-self.infra.module';\nexport { PostgresSelfInfraProviderModule } from './postgres-self/postgres-self.infra.module';\nexport { MongodbAtlasInfraProviderModule } from './mongodb-atlas/mongodb-atlas.infra.module';\nexport { MongodbSelfInfraProviderModule } from './mongodb-self/mongodb-self.infra.module';\nexport { MinioSelfInfraProviderModule } from './minio-self/minio-self.infra.module';\nexport { AwsS3InfraProviderModule } from './aws-s3/aws-s3.infra.module';\nexport { ClamavSelfInfraProviderModule } from './clamav-self/clamav-self.infra.module';\n\n/**\n * Canonical `InfraProvider` → `InfraProviderModule` catalog. Caller\n * (CLI, apps-manager) builds a `Map<InfraProvider, InfraProviderModule>`\n * from this constant when threading modules into\n * `materializeInfraSection`.\n *\n * **Why a const array instead of a `Map` literal**: arrays serialize\n * stably under tsc and roll up to a deterministic order. The\n * downstream `Map` is built once at program start; the catalog\n * itself is a value-level fixture.\n *\n * **Coverage** (Slice 5 baseline, 2026-05-10):\n * - `RABBITMQ_SELF`, `REDIS_SELF`, `POSTGRES_SELF`, `MONGODB_SELF`,\n * `MONGODB_ATLAS` — five stateful modules with mint/revoke\n * methods.\n * - `MINIO_SELF`, `AWS_S3` — object storage (shared-bucket model;\n * no per-app credentials).\n * - `CLAMAV_SELF` — stateless infra (no auth, no per-app state;\n * `plan()` only).\n *\n * **NOT covered** (catalog entries without modules):\n * - `POSTGRES_MANAGED`, `POSTGRES_AWS_RDS`, `POSTGRES_GCP_CLOUD_SQL`,\n * `POSTGRES_AZURE_DATABASE`, `POSTGRES_SUPABASE`, `POSTGRES_NEON`,\n * `POSTGRES_RENDER` — managed-Postgres brand catalog entries\n * (Slice 4.B.0). No module yet; trigger = real customer.\n *\n * `materializeInfraSection` falls back to the authored-entry digest\n * when a selected `InfraProvider` is not in the map (preserves the\n * Slice 2.5b behavior for uncovered providers).\n */\nexport const INFRA_PROVIDER_MODULES: ReadonlyArray<InfraProviderModule> = [\n RabbitmqSelfInfraProviderModule,\n RedisSelfInfraProviderModule,\n PostgresSelfInfraProviderModule,\n MongodbAtlasInfraProviderModule,\n MongodbSelfInfraProviderModule,\n MinioSelfInfraProviderModule,\n AwsS3InfraProviderModule,\n ClamavSelfInfraProviderModule,\n];\n\n/**\n * Every `Wildo_Application_Secrets` JSON path that ANY provider module can mint per runtime\n * principal — the union of the catalog's own static declarations.\n *\n * ## Why this is derived rather than written down\n *\n * The consumer is the secret-DELIVERY path in apps-manager: it strips exactly this set from the\n * application blob before overlaying a principal's own material, so a principal receives a\n * credential only where one was minted FOR IT. A hand-maintained copy at that consumer would be a\n * second source — add a provider that mints a new credential path and delivery keeps shipping the\n * APPLICATION's value for it, silently. That is the defect class this repo has paid for twice: the\n * party that CONSTRAINS is not the party that DECLARES.\n *\n * Derived from `INFRA_PROVIDER_MODULES`, so a new module is covered the day it enters the catalog.\n *\n * Deliberately the union across ALL modules, not the ones a given application selected: a principal\n * must not receive an application-wide credential for a provider it does not use either, and the\n * selected set is not knowable at the delivery call site without threading app config through it.\n * Stripping a path no module minted for this app is harmless — it is absent from the blob anyway.\n */\nexport function collectPerPrincipalSecretBlobPaths(): ReadonlySet<string> {\n const paths = new Set<string>();\n for (const module of INFRA_PROVIDER_MODULES) {\n for (const path of module.perPrincipalSecretBlobPaths) {\n paths.add(path);\n }\n }\n return paths;\n}\n\n/**\n * Build a `Map<InfraProvider, InfraProviderModule>` for the\n * canonical catalog. Callers store the result once at startup and\n * pass it to `materializeInfraSection` (digest derivation) or to\n * orchestrator paths that look up modules by `InfraProvider`.\n */\nexport function buildInfraProviderModuleMap(): ReadonlyMap<InfraProvider, InfraProviderModule> {\n const map = new Map<InfraProvider, InfraProviderModule>();\n for (const m of INFRA_PROVIDER_MODULES) {\n if (map.has(m.provider)) {\n throw new Error(\n `INFRA_PROVIDER_MODULES contains duplicate provider '${m.provider}' — ` +\n `each InfraProvider may have at most one module.`,\n );\n }\n map.set(m.provider, m);\n }\n return map;\n}\n"]}
|