create-substrat 0.9.3 → 0.9.4

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.105.0';
40
- const ENGINE_WORKORDER = '^0.11.4';
41
- const ENGINE_INVOICING = '^0.9.21';
39
+ const SUBSTRAT = '^0.109.0';
40
+ const ENGINE_WORKORDER = '^0.11.8';
41
+ const ENGINE_INVOICING = '^0.9.25';
42
42
  const BOUNDARY_LINT = '^0.4.2';
43
- const DEV_ISSUER = '^0.1.20';
43
+ const DEV_ISSUER = '^0.1.24';
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.3",
3
+ "version": "0.9.4",
4
4
  "description": "Scaffold a Substrat vertical — `npm create substrat <dir>`.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -307,6 +307,15 @@ vertical done, boot the server and drive the real flow over HTTP as two personas
307
307
  should succeed and one who should be denied — and confirm the denial arrives as a denial
308
308
  (not a generic error).
309
309
 
310
+ `.claude/launch.json` is what starts those servers for an agent with a browser pane, and it
311
+ declares a **port** — never a path or a query. So the pane opens each server's bare origin,
312
+ and no entry can deep-link a page underneath it: reaching one is a navigation you perform
313
+ once the preview is up, not something configuration expresses. Do that without being asked.
314
+ The page worth opening first on a vertical that serves the Scalar API reference is
315
+ **`/api/docs`** — every operation, rendered from that vertical's own `/openapi.json`, on the
316
+ vertical's own origin, so a try-it request carries the session cookie you already have and
317
+ a 403 in the playground is the permission system working rather than a broken page.
318
+
310
319
  ## When it breaks — symptom → fix
311
320
 
312
321
  Six failures that have each cost someone a day. What makes them expensive is that none of
@@ -47,7 +47,7 @@ import {
47
47
  SCOPE_SWEEPER_NAME,
48
48
  type ScopeSweeperDo,
49
49
  } from '@substrat-run/adapter-cloudflare';
50
- import { readRoutedNode, RouterAssertionError, type ScopeStub } from '@substrat-run/kernel';
50
+ import { readRoutedNode, RouterAssertionError, type ScopeStub, invocationLog } from '@substrat-run/kernel';
51
51
  import { mountPlatformSurface } from '@substrat-run/vertical-host';
52
52
  import { MODULES, OWNER_ROLE_KEY, ROLES } from './provision.js';
53
53
  import { SHOP_ENV } from './manifest.js';
@@ -239,6 +239,21 @@ async function unauthorizedReason(env: Env, node: Node): Promise<string> {
239
239
 
240
240
  const app = new Hono<{ Bindings: Env }>();
241
241
 
242
+ // FIRST, before any route: Hono composes handlers in registration order and stops at the
243
+ // one that answers, so a route registered above this line would never be logged. The line
244
+ // it writes is what attributes this vertical's invocations to the tenant they served —
245
+ // see `invocationLog`'s header for why the router cannot supply that from its side.
246
+ app.use(
247
+ '*',
248
+ invocationLog<Env>({
249
+ // The same two answers this worker gives `readRoutedNode` in `nodeFor`: the line is
250
+ // written from a VERIFIED assertion, never from the header, or anyone who could reach
251
+ // this script directly could file their request under a tenant of their choosing.
252
+ routerSecret: (env) => env.ROUTER_SECRET,
253
+ allowUnsigned: (env) => env.ALLOW_DEV_NODE === 'true',
254
+ }),
255
+ );
256
+
242
257
  // Who am I, and what instance am I on — resolves the caller without invoking
243
258
  // anything. Auth-shaped and host-specific, so it stays OUT of the shared table;
244
259
  // `server.ts` answers the same question from its own login.