@rcpooley/concord-kit 0.6.2 → 0.7.0

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/assemble.js CHANGED
@@ -304,9 +304,15 @@ function validate(all, fleet) {
304
304
  seenEdge.set(key, a.name);
305
305
  }
306
306
  }
307
- for (const [host, m] of Object.entries(fleet)) {
308
- if (m.sleeps && m.edge) {
309
- throw new Error(`hosts: ${host} sleeps and declares an edge — an ingress cannot sleep`);
307
+ // A sleeping machine may run an edge, but only for its own apps. When it is
308
+ // asleep its routes are down along with the apps behind them, which is no
309
+ // worse than the apps being down. Fronting ANOTHER machine's app would make
310
+ // that app's reachability depend on a lid, so that stays an error.
311
+ for (const a of all) {
312
+ const edgeHost = a.servedBy ?? a.host;
313
+ if (edgeHost !== a.host && fleet[edgeHost]?.sleeps) {
314
+ throw new Error(`apps: "${a.name}" runs on ${a.host} but is served by ${edgeHost}, which sleeps — ` +
315
+ `a sleeping machine's edge may serve only its own apps`);
310
316
  }
311
317
  }
312
318
  }
package/dist/machine.d.ts CHANGED
@@ -32,7 +32,9 @@ export type Machine = {
32
32
  /**
33
33
  * A development machine, where containers run by hand are the work, not
34
34
  * drift. Becomes `containerSweep: 'labelled'`, so the sweep only removes
35
- * Concord's own orphans.
35
+ * Concord's own orphans. That has been every host's default since 0.7.0,
36
+ * so this now only pins it: a dev machine stays `labelled` whatever the
37
+ * default.
36
38
  */
37
39
  dev?: boolean;
38
40
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rcpooley/concord-kit",
3
- "version": "0.6.2",
3
+ "version": "0.7.0",
4
4
  "description": "Opinionated building blocks for a Concord config repo: apps as one file each, machines that derive their base layers, an nginx edge with derived certificate coverage, and assemble() to put the modules in order.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/rcpooley/concord/tree/main/kit",