create-substrat 0.8.6 → 0.9.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/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.98.0';
40
- const ENGINE_WORKORDER = '^0.10.6';
41
- const ENGINE_INVOICING = '^0.9.14';
42
- const BOUNDARY_LINT = '^0.4.0';
43
- const DEV_ISSUER = '^0.1.13';
39
+ const SUBSTRAT = '^0.99.0';
40
+ const ENGINE_WORKORDER = '^0.10.7';
41
+ const ENGINE_INVOICING = '^0.9.15';
42
+ const BOUNDARY_LINT = '^0.4.2';
43
+ const DEV_ISSUER = '^0.1.14';
44
44
 
45
45
  const DOCS = 'https://substrat.net';
46
46
 
@@ -101,21 +101,10 @@ function packageJson(name) {
101
101
  { binding: 'CONFIG', class: 'ConfigDO' },
102
102
  ],
103
103
  },
104
- // The declared per-instance settings — MIRRORED from src/manifest.ts
105
- // (`SHOP_ENV`), because `substrat push` reads JSON, not TS. The dashboard
106
- // renders its Settings form from this; keep the two in sync.
107
- envSpec: [
108
- {
109
- key: 'SHOP_NAME',
110
- label: 'Workshop name',
111
- description: 'The workshop name shown to customers. Set per install.',
112
- placeholder: 'Söder Cykel & Service',
113
- default: 'Substrat Bike Shop',
114
- required: false,
115
- secret: false,
116
- group: 'General',
117
- },
118
- ],
104
+ // No envSpec copy here (#1206): the declared per-instance settings live in
105
+ // src/manifest.ts (`SHOP_ENV`), re-exported as `envSpec` from the permissions
106
+ // entry — `substrat push` reads them off that same import. The dashboard
107
+ // renders its Settings form from what the push uploads.
119
108
  devServers: DEV_SERVERS,
120
109
  },
121
110
  scripts: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-substrat",
3
- "version": "0.8.6",
3
+ "version": "0.9.0",
4
4
  "description": "Scaffold a Substrat vertical — `npm create substrat <dir>`.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -87,9 +87,9 @@ dashboard reports `delivered: false`, and the app never sees it. That includes t
87
87
  back through `resolveScopedEnvSpec` (`instanceConfig`). Read settings that way and
88
88
  never off `env` directly: an `envSpec` default rides as a worker binding shared by
89
89
  every install of one serving script, so `env.FOO` is the same string for every
90
- tenant no matter what any of them saved. Declare a setting in **both**
91
- `src/manifest.ts` (`SHOP_ENV`) and package.json `substrat.envSpec` — `substrat
92
- push` reads the JSON, not the TypeScript.
90
+ tenant no matter what any of them saved. Declare a setting once, in
91
+ `src/manifest.ts` (`SHOP_ENV`) — `src/provision.ts` re-exports it as `envSpec`,
92
+ which is what `substrat push` uploads; package.json carries no copy.
93
93
 
94
94
  ## The rules (non-negotiable)
95
95
 
@@ -29,8 +29,8 @@ export const SHOP_PERM = {
29
29
  * value one tenant saved for one install — a spec `default` rides as a worker binding
30
30
  * shared by every install of the serving script.
31
31
  *
32
- * MIRRORED in package.json `substrat.envSpec` (what `substrat push` carries — it reads
33
- * JSON, not TS); keep the two in sync.
32
+ * The single declaration (#1206): `src/provision.ts` re-exports this as `envSpec`, which
33
+ * is what `substrat push` uploads — package.json carries no copy.
34
34
  */
35
35
  export const SHOP_ENV: EnvVarSpec[] = [
36
36
  {
@@ -8,6 +8,11 @@ import { invoicingModule, INVOICING_PERM as INV } from '@substrat-run/engine-inv
8
8
  import { bikeShopModule } from './module.js';
9
9
  import { SHOP_PERM } from './manifest.js';
10
10
 
11
+ // The manifest's config surface rides the same import `substrat push` already makes for
12
+ // `permissions` (#1206): this export is what the push uploads, so `src/manifest.ts` is the
13
+ // single envSpec declaration and package.json carries no copy.
14
+ export { SHOP_ENV as envSpec } from './manifest.js';
15
+
11
16
  // ============================================================================
12
17
  // The vertical's PROVISIONING surface — everything a deployment needs to know
13
18
  // about modules, roles and grant shapes, with NO node imports. Split from