@bongos/core 1.20.61 → 1.20.62
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/.bongos-core.json +80 -35
- package/clients/bongos-client/README.md +1 -1
- package/clients/bongos-client/bongos-client.global.js +2 -0
- package/clients/bongos-client/index.cjs +2 -0
- package/clients/bongos-client/index.d.ts +5 -1
- package/clients/bongos-client/index.mjs +2 -0
- package/docs/adr/0357-the-update-rule-set-on-deploy-is-the-one-the-sweep-follows.md +2 -0
- package/docs/api/openapi.json +96 -3
- package/docs/api-reference.md +4 -3
- package/docs/copy-inventory.md +372 -324
- package/docs/copy-registry.json +881 -417
- package/docs/module-api-changelog.md +2 -0
- package/docs/page-inventory.json +4 -1
- package/docs/page-readings.json +544 -481
- package/docs/recipes/upgrading-the-core.md +30 -1
- package/modules/provisioning/demo.js +176 -0
- package/modules/provisioning/migrations/provisioning_035_demo.sql +26 -0
- package/modules/provisioning/module.json +5 -3
- package/modules/provisioning/pollers/demo-archive.js +61 -0
- package/modules/provisioning/provisioning.js +2 -2
- package/modules/provisioning/routes/demo.js +54 -0
- package/modules/provisioning/routes/provisioning.js +7 -4
- package/modules/public-landing/public/projects-demo.states.json +53 -0
- package/modules/public-landing/public/projects.html +300 -23
- package/modules/public-landing/public/projects.probes.json +3 -3
- package/modules/public-landing/public/projects.states.json +2 -1
- package/modules/ui-design/kit/fixtures/provisioning-instances-demo.json +114 -0
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +14 -0
- package/scripts/gds/update-channel.js +11 -2
- package/scripts/gds/update-sweep.js +717 -0
- package/src/module-api.js +1 -1
- package/tests/update_channel_db.mjs +13 -6
- package/tests/update_subscription_engine.mjs +5 -5
- package/tests/update_sweep_home.mjs +100 -0
- package/tests/wizard_demo.mjs +264 -0
- package/tests/wizard_front_door.mjs +16 -20
package/release-notes.json
CHANGED
|
@@ -8483,5 +8483,19 @@
|
|
|
8483
8483
|
"id": "1004407",
|
|
8484
8484
|
"text": "The Gate page now shows, for each Autobongos runner, which PC it is on, which Claude account it is spending, which code version it runs (and whether that is behind), and says \"Restarting\" while it relaunches for new code inste"
|
|
8485
8485
|
}
|
|
8486
|
+
],
|
|
8487
|
+
"1.20.62": [
|
|
8488
|
+
{
|
|
8489
|
+
"id": "1004047",
|
|
8490
|
+
"text": "Every live project now runs a version whose update banner works, so each owner sees when an update is waiting."
|
|
8491
|
+
},
|
|
8492
|
+
{
|
|
8493
|
+
"id": "1004420",
|
|
8494
|
+
"text": "\"Try the demo\" now works. A small team picks how many people and how many hours each, writes an idea, and gets a first read of what fits. The demo picks the settings for them (the founder decides, no rewards, all managed, priv"
|
|
8495
|
+
},
|
|
8496
|
+
{
|
|
8497
|
+
"id": "1004307",
|
|
8498
|
+
"text": "The automatic update on cloudbongos.com will now always run the newest version of itself, instead of a copy stuck from August."
|
|
8499
|
+
}
|
|
8486
8500
|
]
|
|
8487
8501
|
}
|
|
@@ -243,6 +243,14 @@ function loadSubscriptions({ instanceDir = process.cwd(), fsImpl = fs, file = SU
|
|
|
243
243
|
//
|
|
244
244
|
// A failure's reason is a fixed class, never psql's own text: stderr can name a DB user or host,
|
|
245
245
|
// and the reason is printed into the sweep's log.
|
|
246
|
+
//
|
|
247
|
+
// WHICH DATABASE (task 1004307). UPDATE_CHANNEL_DB names it first. That is the one a control-plane
|
|
248
|
+
// unit should set, NOT PGDATABASE: the sweep hands its own env to every upgrade it spawns
|
|
249
|
+
// ({ ...process.env, ...inst.env }), so a unit-level PGDATABASE would reach any tenant whose roster
|
|
250
|
+
// entry names no database of its own, and that tenant's migrate would run against the control
|
|
251
|
+
// plane's database. UPDATE_CHANNEL_DB means nothing to the upgrade, so it cannot leak that way.
|
|
252
|
+
// It takes a bare db name or a connection string, as psql -d does.
|
|
253
|
+
const CHANNEL_DB_ENV = 'UPDATE_CHANNEL_DB';
|
|
246
254
|
const CHANNEL_SOURCE_DEPLOY = 'deploy';
|
|
247
255
|
const CHANNEL_SOURCE_ROSTER = 'roster';
|
|
248
256
|
const DB_CHANNELS_SQL = 'SELECT slug, update_channel FROM provisioning_instances';
|
|
@@ -268,8 +276,8 @@ function channelLine(inst) {
|
|
|
268
276
|
// { ok:false, reason } when there is no database to ask, psql is missing, or the table is absent
|
|
269
277
|
// (an instance with the provisioning module off). The caller falls back to the roster and says why.
|
|
270
278
|
function readDbChannels({ env = process.env, run = spawnSync } = {}) {
|
|
271
|
-
const target = env.DATABASE_URL || env.PGDATABASE;
|
|
272
|
-
if (!target) return { ok: false, reason:
|
|
279
|
+
const target = env[CHANNEL_DB_ENV] || env.DATABASE_URL || env.PGDATABASE;
|
|
280
|
+
if (!target) return { ok: false, reason: `no ${CHANNEL_DB_ENV} (or DATABASE_URL / PGDATABASE) set for the sweep` };
|
|
273
281
|
const r = run('psql', ['-d', target, '-At', '-F', '\t', '-v', 'ON_ERROR_STOP=1', '--no-psqlrc', '-c', DB_CHANNELS_SQL],
|
|
274
282
|
{ encoding: 'utf8', timeout: DB_CHANNELS_TIMEOUT_MS });
|
|
275
283
|
if (!r || r.error) {
|
|
@@ -399,6 +407,7 @@ module.exports = {
|
|
|
399
407
|
parseNpmViewVersions,
|
|
400
408
|
loadSubscriptions,
|
|
401
409
|
readDbChannels,
|
|
410
|
+
CHANNEL_DB_ENV,
|
|
402
411
|
applyDbChannels,
|
|
403
412
|
channelLine,
|
|
404
413
|
psqlFailureClass,
|