create-substrat 0.9.0 → 0.9.1

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/index.js CHANGED
@@ -36,11 +36,11 @@ const TEMPLATE = join(HERE, 'template');
36
36
  // The runtime packages release together off one version line (the changesets `fixed`
37
37
  // group), so one constant is right for all of them. Engines do NOT share a line —
38
38
  // each versions on its own, so one pin per engine, deliberately.
39
- const SUBSTRAT = '^0.99.0';
40
- const ENGINE_WORKORDER = '^0.10.7';
41
- const ENGINE_INVOICING = '^0.9.15';
39
+ const SUBSTRAT = '^0.100.0';
40
+ const ENGINE_WORKORDER = '^0.10.8';
41
+ const ENGINE_INVOICING = '^0.9.16';
42
42
  const BOUNDARY_LINT = '^0.4.2';
43
- const DEV_ISSUER = '^0.1.14';
43
+ const DEV_ISSUER = '^0.1.15';
44
44
 
45
45
  const DOCS = 'https://substrat.net';
46
46
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-substrat",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Scaffold a Substrat vertical — `npm create substrat <dir>`.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -112,10 +112,14 @@ consumers). Rules 1–5 are enforced mechanically by `boundary-lint`.
112
112
  `@substrat-run/kernel` rather than a `SELECT` of your own: both take an `EntityRef`,
113
113
  page like a list read, and decode the envelope for you. `readHistory` also returns the
114
114
  payload, the authorization chain (which checks the operation passed, and under which
115
- grant), the impersonation stamp and the PII class. On the first three, a `null` is a
116
- *fact* rather than data you failed to fetch — the payload was erased, the row predates
117
- authorization recording, nobody was impersonating — so render it as that. Neither
118
- helper checks a permission; you do, before you call it.
115
+ grant), the impersonation stamp, the PII class, the `operation` the event was emitted
116
+ from (the exact `invoke()` string) and the `version` the emitting code was deployed as.
117
+ On all but the PII class, a `null` is a *fact* rather than data you failed to fetch —
118
+ the payload was erased, the row predates authorization recording, nobody was
119
+ impersonating, a consumer emitted it (or the row predates the column), no version
120
+ identity was present — so render it as that. `version` comes from the outbox column
121
+ only, never the envelope, so this helper is the one way to join an event to the push
122
+ that wrote it. Neither helper checks a permission; you do, before you call it.
119
123
  4. **Another module's tables are private.** Never `SELECT` from `workorder_*` etc. — use
120
124
  the engine's exported in-scope functions. This is the rule with no runtime equivalent:
121
125
  the shortcut *works* and silently welds you to an engine's private schema forever. Need
@@ -73,6 +73,8 @@ export { ConfigDO };
73
73
  * `/internal/delete-scope` removes them. Costs nothing while the roster is empty.
74
74
  */
75
75
  export const SweeperDO = defineScopeSweeperDO<Env>({
76
+ // #1232: the pass reports the version whose code actually ran (the deploy-injected binding).
77
+ versionId: (env) => env.SUBSTRAT_VERSION_ID ?? null,
76
78
  intervalMs: 120_000,
77
79
  host: hostFor,
78
80
  });
@@ -102,6 +104,8 @@ const DEV_NODE: Node = {
102
104
  };
103
105
 
104
106
  interface Env {
107
+ /** Injected at deploy (#1242); absent locally — the sweep record then reads NULL. */
108
+ SUBSTRAT_VERSION_ID?: string;
105
109
  /** One DO per scope — the vertical's only durable store (sandbox-clean). */
106
110
  SCOPE: DurableObjectNamespace;
107
111
  /** The roster-keeping sweep singleton — the deployment's own timer (#461). */