@pleri/olam-cli 0.1.126 → 0.1.127
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/image-digests.json +1 -1
- package/dist/index.js +42 -5
- package/dist/mcp-server.js +42 -5
- package/package.json +1 -1
package/dist/image-digests.json
CHANGED
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"host-cp": "sha256:13a26950fea2917ebb268f7bda04fd54267ffe8e5ba4a550db89f28eb309553f",
|
|
6
6
|
"mcp-auth": "sha256:c82fcfca7ed1b139cbea252697487889b96b45a6575cfba076de7f57eaa943ac",
|
|
7
7
|
"$schema_version": 1,
|
|
8
|
-
"$published_version": "0.1.
|
|
8
|
+
"$published_version": "0.1.127",
|
|
9
9
|
"$registry": "ghcr.io/pleri"
|
|
10
10
|
}
|
package/dist/index.js
CHANGED
|
@@ -4474,7 +4474,32 @@ var init_repo_manifest = __esm({
|
|
|
4474
4474
|
// later in the seam. Statements are NOT exposed to operator-controlled
|
|
4475
4475
|
// env variables — only the two whitelisted placeholders above. No shell
|
|
4476
4476
|
// expansion, no DOLLAR-name expansion.
|
|
4477
|
-
post_clone_sql: external_exports.record(external_exports.string().min(1), external_exports.array(external_exports.string().min(1))).optional()
|
|
4477
|
+
post_clone_sql: external_exports.record(external_exports.string().min(1), external_exports.array(external_exports.string().min(1))).optional(),
|
|
4478
|
+
// olam-hybrid-shared-postgres Phase B: per-seed env-var-name override.
|
|
4479
|
+
//
|
|
4480
|
+
// Phase A's F-6 derives the DB-name env var from the seed name using a
|
|
4481
|
+
// POSTGRESQL_<PURPOSE>_DATABASE convention (atlas_common_seed →
|
|
4482
|
+
// POSTGRESQL_COMMON_DATABASE). That works for atlas-core which uses
|
|
4483
|
+
// POSTGRESQL_*-prefixed env vars throughout.
|
|
4484
|
+
//
|
|
4485
|
+
// Atlas-pay (and other future repos) use different env var names —
|
|
4486
|
+
// e.g. ATLAS_PAY_DATABASE, not POSTGRESQL_PAY_DATABASE. This map lets
|
|
4487
|
+
// a manifest declare the override explicitly:
|
|
4488
|
+
//
|
|
4489
|
+
// services:
|
|
4490
|
+
// postgres:
|
|
4491
|
+
// seed_template:
|
|
4492
|
+
// - atlas_common_seed
|
|
4493
|
+
// - atlas_pay_seed
|
|
4494
|
+
// db_env_override:
|
|
4495
|
+
// atlas_pay_seed: ATLAS_PAY_DATABASE
|
|
4496
|
+
// # atlas_common_seed keeps F-6's default POSTGRESQL_COMMON_DATABASE
|
|
4497
|
+
//
|
|
4498
|
+
// Schema: Record<seed_template_name, env_var_name>. The env var name
|
|
4499
|
+
// must be uppercase letters/digits/underscores ([A-Z][A-Z0-9_]*) — same
|
|
4500
|
+
// shape as conventional shell env vars. F-6 honors the override when
|
|
4501
|
+
// present; falls back to the derived default otherwise.
|
|
4502
|
+
db_env_override: external_exports.record(external_exports.string().min(1), external_exports.string().regex(/^[A-Z][A-Z0-9_]*$/)).optional()
|
|
4478
4503
|
}).passthrough();
|
|
4479
4504
|
deploySchema = external_exports.object({
|
|
4480
4505
|
tags: external_exports.array(external_exports.string()).optional()
|
|
@@ -11242,6 +11267,7 @@ function applyPostgresNetworkOverrides(worldEnv, enrichedRepos, worldId) {
|
|
|
11242
11267
|
if (worldId !== void 0) {
|
|
11243
11268
|
assertSafeWorldId(worldId);
|
|
11244
11269
|
const seedTemplates = /* @__PURE__ */ new Set();
|
|
11270
|
+
const dbEnvOverride = {};
|
|
11245
11271
|
for (const repo of enrichedRepos) {
|
|
11246
11272
|
const pg = repo.manifest?.services?.["postgres"];
|
|
11247
11273
|
const raw = pg?.seed_template;
|
|
@@ -11252,12 +11278,23 @@ function applyPostgresNetworkOverrides(worldEnv, enrichedRepos, worldId) {
|
|
|
11252
11278
|
if (typeof s === "string")
|
|
11253
11279
|
seedTemplates.add(s);
|
|
11254
11280
|
}
|
|
11281
|
+
if (pg?.db_env_override && typeof pg.db_env_override === "object") {
|
|
11282
|
+
for (const [seedKey, envName] of Object.entries(pg.db_env_override)) {
|
|
11283
|
+
if (typeof envName === "string" && envName.length > 0) {
|
|
11284
|
+
dbEnvOverride[seedKey] = envName;
|
|
11285
|
+
}
|
|
11286
|
+
}
|
|
11287
|
+
}
|
|
11255
11288
|
}
|
|
11256
11289
|
for (const seed of seedTemplates) {
|
|
11257
|
-
|
|
11258
|
-
if (
|
|
11259
|
-
const
|
|
11260
|
-
|
|
11290
|
+
let envKey = dbEnvOverride[seed];
|
|
11291
|
+
if (envKey === void 0) {
|
|
11292
|
+
const match2 = seed.match(/^atlas_([a-z][a-z0-9_]*?)_seed$/i);
|
|
11293
|
+
if (match2 && match2[1] !== void 0) {
|
|
11294
|
+
envKey = `POSTGRESQL_${match2[1].toUpperCase()}_DATABASE`;
|
|
11295
|
+
}
|
|
11296
|
+
}
|
|
11297
|
+
if (envKey !== void 0) {
|
|
11261
11298
|
worldEnv[envKey] = deriveWorldDbName(seed, worldId);
|
|
11262
11299
|
}
|
|
11263
11300
|
}
|
package/dist/mcp-server.js
CHANGED
|
@@ -22413,7 +22413,32 @@ var serviceSchema = external_exports.object({
|
|
|
22413
22413
|
// later in the seam. Statements are NOT exposed to operator-controlled
|
|
22414
22414
|
// env variables — only the two whitelisted placeholders above. No shell
|
|
22415
22415
|
// expansion, no DOLLAR-name expansion.
|
|
22416
|
-
post_clone_sql: external_exports.record(external_exports.string().min(1), external_exports.array(external_exports.string().min(1))).optional()
|
|
22416
|
+
post_clone_sql: external_exports.record(external_exports.string().min(1), external_exports.array(external_exports.string().min(1))).optional(),
|
|
22417
|
+
// olam-hybrid-shared-postgres Phase B: per-seed env-var-name override.
|
|
22418
|
+
//
|
|
22419
|
+
// Phase A's F-6 derives the DB-name env var from the seed name using a
|
|
22420
|
+
// POSTGRESQL_<PURPOSE>_DATABASE convention (atlas_common_seed →
|
|
22421
|
+
// POSTGRESQL_COMMON_DATABASE). That works for atlas-core which uses
|
|
22422
|
+
// POSTGRESQL_*-prefixed env vars throughout.
|
|
22423
|
+
//
|
|
22424
|
+
// Atlas-pay (and other future repos) use different env var names —
|
|
22425
|
+
// e.g. ATLAS_PAY_DATABASE, not POSTGRESQL_PAY_DATABASE. This map lets
|
|
22426
|
+
// a manifest declare the override explicitly:
|
|
22427
|
+
//
|
|
22428
|
+
// services:
|
|
22429
|
+
// postgres:
|
|
22430
|
+
// seed_template:
|
|
22431
|
+
// - atlas_common_seed
|
|
22432
|
+
// - atlas_pay_seed
|
|
22433
|
+
// db_env_override:
|
|
22434
|
+
// atlas_pay_seed: ATLAS_PAY_DATABASE
|
|
22435
|
+
// # atlas_common_seed keeps F-6's default POSTGRESQL_COMMON_DATABASE
|
|
22436
|
+
//
|
|
22437
|
+
// Schema: Record<seed_template_name, env_var_name>. The env var name
|
|
22438
|
+
// must be uppercase letters/digits/underscores ([A-Z][A-Z0-9_]*) — same
|
|
22439
|
+
// shape as conventional shell env vars. F-6 honors the override when
|
|
22440
|
+
// present; falls back to the derived default otherwise.
|
|
22441
|
+
db_env_override: external_exports.record(external_exports.string().min(1), external_exports.string().regex(/^[A-Z][A-Z0-9_]*$/)).optional()
|
|
22417
22442
|
}).passthrough();
|
|
22418
22443
|
var deploySchema = external_exports.object({
|
|
22419
22444
|
tags: external_exports.array(external_exports.string()).optional()
|
|
@@ -33252,6 +33277,7 @@ function applyPostgresNetworkOverrides(worldEnv, enrichedRepos, worldId) {
|
|
|
33252
33277
|
if (worldId !== void 0) {
|
|
33253
33278
|
assertSafeWorldId(worldId);
|
|
33254
33279
|
const seedTemplates = /* @__PURE__ */ new Set();
|
|
33280
|
+
const dbEnvOverride = {};
|
|
33255
33281
|
for (const repo of enrichedRepos) {
|
|
33256
33282
|
const pg = repo.manifest?.services?.["postgres"];
|
|
33257
33283
|
const raw = pg?.seed_template;
|
|
@@ -33262,12 +33288,23 @@ function applyPostgresNetworkOverrides(worldEnv, enrichedRepos, worldId) {
|
|
|
33262
33288
|
if (typeof s === "string")
|
|
33263
33289
|
seedTemplates.add(s);
|
|
33264
33290
|
}
|
|
33291
|
+
if (pg?.db_env_override && typeof pg.db_env_override === "object") {
|
|
33292
|
+
for (const [seedKey, envName] of Object.entries(pg.db_env_override)) {
|
|
33293
|
+
if (typeof envName === "string" && envName.length > 0) {
|
|
33294
|
+
dbEnvOverride[seedKey] = envName;
|
|
33295
|
+
}
|
|
33296
|
+
}
|
|
33297
|
+
}
|
|
33265
33298
|
}
|
|
33266
33299
|
for (const seed of seedTemplates) {
|
|
33267
|
-
|
|
33268
|
-
if (
|
|
33269
|
-
const
|
|
33270
|
-
|
|
33300
|
+
let envKey = dbEnvOverride[seed];
|
|
33301
|
+
if (envKey === void 0) {
|
|
33302
|
+
const match = seed.match(/^atlas_([a-z][a-z0-9_]*?)_seed$/i);
|
|
33303
|
+
if (match && match[1] !== void 0) {
|
|
33304
|
+
envKey = `POSTGRESQL_${match[1].toUpperCase()}_DATABASE`;
|
|
33305
|
+
}
|
|
33306
|
+
}
|
|
33307
|
+
if (envKey !== void 0) {
|
|
33271
33308
|
worldEnv[envKey] = deriveWorldDbName(seed, worldId);
|
|
33272
33309
|
}
|
|
33273
33310
|
}
|