@platforma-sdk/block-tools 2.10.17 → 2.10.18

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/cli.mjs CHANGED
@@ -1,23 +1,23 @@
1
- import { H as e, K as t, O as n, U as r, _ as i, _t as a, b as o, et as s, n as c, p as ee, rt as l } from "./config-DpfTzcgG.mjs";
2
- import { Args as te, Command as u, Flags as d } from "@oclif/core";
3
- import f from "node:path";
4
- import p from "node:fs";
5
- import { BlockPackManifest as ne, StableChannel as re, overrideDescriptionVersion as ie, overrideManifestVersion as ae } from "@milaboratories/pl-model-middle-layer";
6
- import { OclifLoggerAdapter as m } from "@milaboratories/ts-helpers-oclif";
7
- import oe, { parse as se, parseDocument as ce, stringify as le } from "yaml";
8
- import { setTimeout as ue } from "node:timers/promises";
9
- import { confirm as de, input as fe, select as pe } from "@inquirer/prompts";
1
+ import { H as e, K as t, O as n, U as r, _ as i, _t as a, b as o, et as s, n as c, p as l, rt as ee } from "./config-DpfTzcgG.mjs";
2
+ import { Args as u, Command as d, Flags as f } from "@oclif/core";
3
+ import p from "node:path";
4
+ import m from "node:fs";
5
+ import { BlockPackManifest as te, StableChannel as ne, overrideDescriptionVersion as re, overrideManifestVersion as ie } from "@milaboratories/pl-model-middle-layer";
6
+ import { OclifLoggerAdapter as h } from "@milaboratories/ts-helpers-oclif";
7
+ import ae, { parse as oe, parseDocument as se, stringify as ce } from "yaml";
8
+ import { setTimeout as le } from "node:timers/promises";
9
+ import { confirm as ue, input as de, select as fe } from "@inquirer/prompts";
10
10
  //#region src/cmd/build-meta.ts
11
- var me = class e extends u {
11
+ var pe = class e extends d {
12
12
  static description = "Extracts meta information from blocks package.json and outputs meta.json with embedded binary and textual information linked from the meta section.";
13
13
  static flags = {
14
- modulePath: d.string({
14
+ modulePath: f.string({
15
15
  char: "i",
16
16
  summary: "input module path",
17
17
  helpValue: "<path>",
18
18
  default: "."
19
19
  }),
20
- destination: d.string({
20
+ destination: f.string({
21
21
  char: "o",
22
22
  summary: "output meta.json file",
23
23
  helpValue: "<path>",
@@ -25,36 +25,36 @@ var me = class e extends u {
25
25
  })
26
26
  };
27
27
  async run() {
28
- let { flags: t } = await this.parse(e), n = f.resolve(t.modulePath), i = await s(await l((await r(n)).meta, n));
29
- await p.promises.writeFile(f.resolve(t.destination), JSON.stringify(i));
28
+ let { flags: t } = await this.parse(e), n = p.resolve(t.modulePath), i = await s(await ee((await r(n)).meta, n));
29
+ await m.promises.writeFile(p.resolve(t.destination), JSON.stringify(i));
30
30
  }
31
31
  };
32
32
  //#endregion
33
33
  //#region src/cmd/build-model.ts
34
- async function he(e) {
34
+ async function me(e) {
35
35
  try {
36
- return await p.promises.readFile(e, "utf8");
36
+ return await m.promises.readFile(e, "utf8");
37
37
  } catch (e) {
38
38
  if (e instanceof Error && "code" in e && e.code === "ENOENT") return;
39
39
  throw e;
40
40
  }
41
41
  }
42
- var ge = class e extends u {
42
+ var he = class e extends d {
43
43
  static description = "Extracts and outputs block model JSON from pre-built block model module";
44
44
  static flags = {
45
- modulePath: d.string({
45
+ modulePath: f.string({
46
46
  char: "i",
47
47
  summary: "input module path",
48
48
  helpValue: "<path>",
49
49
  default: "."
50
50
  }),
51
- sourceBundle: d.string({
51
+ sourceBundle: f.string({
52
52
  char: "b",
53
53
  summary: "bundled model code to embed into the model for callback-based rendering to work",
54
54
  helpValue: "<path>",
55
55
  default: "./dist/bundle.js"
56
56
  }),
57
- destination: d.string({
57
+ destination: f.string({
58
58
  char: "o",
59
59
  summary: "output model file",
60
60
  helpValue: "<path>",
@@ -62,34 +62,34 @@ var ge = class e extends u {
62
62
  })
63
63
  };
64
64
  async run() {
65
- let { flags: t } = await this.parse(e), { model: n, platforma: r } = a(f.resolve(t.modulePath));
65
+ let { flags: t } = await this.parse(e), { model: n, platforma: r } = a(p.resolve(t.modulePath));
66
66
  if (n ||= r, !n) throw Error("\"model\" export not found");
67
67
  let { config: i } = n;
68
68
  if (!i) throw Error("Malformed \"model\" object, check it is created with \"BlockModel\" and \".done()\" is executed as the call in the chain.");
69
69
  if (!("outputs" in i) || !("sections" in i)) throw Error("\"config\" has unexpected structure");
70
- let o = await he(t.sourceBundle);
70
+ let o = await me(t.sourceBundle);
71
71
  o !== void 0 && (i.code = {
72
72
  type: "plain",
73
73
  content: o
74
- }), await p.promises.writeFile(f.resolve(t.destination), JSON.stringify(i));
74
+ }), await m.promises.writeFile(p.resolve(t.destination), JSON.stringify(i));
75
75
  }
76
- }, _e = class e extends u {
76
+ }, ge = class e extends d {
77
77
  static description = "List all available global overview snapshots in the registry";
78
78
  static flags = {
79
- registry: d.string({
79
+ registry: f.string({
80
80
  char: "r",
81
81
  summary: "full address of the registry",
82
82
  helpValue: "<address>",
83
83
  env: "PL_REGISTRY",
84
84
  required: !0
85
85
  }),
86
- json: d.boolean({
86
+ json: f.boolean({
87
87
  summary: "output in JSON format",
88
88
  default: !1
89
89
  })
90
90
  };
91
91
  async run() {
92
- let { flags: t } = await this.parse(e), n = await new o(i(t.registry), new m(this)).listGlobalOverviewSnapshots();
92
+ let { flags: t } = await this.parse(e), n = await new o(i(t.registry), new h(this)).listGlobalOverviewSnapshots();
93
93
  if (t.json) this.log(JSON.stringify(n, null, 2));
94
94
  else if (n.length === 0) this.log("No snapshots found.");
95
95
  else {
@@ -97,60 +97,60 @@ var ge = class e extends u {
97
97
  for (let e of n) this.log(` ${e.timestamp}`), this.log(` Path: ${e.path}`), this.log("");
98
98
  }
99
99
  }
100
- }, ve = class e extends u {
100
+ }, _e = class e extends d {
101
101
  static description = "Mark target block stable";
102
102
  static flags = {
103
- modulePath: d.string({
103
+ modulePath: f.string({
104
104
  char: "i",
105
105
  summary: "input module path",
106
106
  helpValue: "<path>",
107
107
  default: "."
108
108
  }),
109
- channel: d.string({
109
+ channel: f.string({
110
110
  char: "c",
111
111
  hidden: !0,
112
112
  summary: "custom channel",
113
113
  helpValue: "<channel name>",
114
- default: re
114
+ default: ne
115
115
  }),
116
- "version-override": d.file({
116
+ "version-override": f.file({
117
117
  char: "v",
118
118
  summary: "override package version"
119
119
  }),
120
- registry: d.string({
120
+ registry: f.string({
121
121
  char: "r",
122
122
  summary: "full address of the registry",
123
123
  helpValue: "<address>",
124
124
  env: "PL_REGISTRY",
125
125
  required: !0
126
126
  }),
127
- refresh: d.boolean({
127
+ refresh: f.boolean({
128
128
  summary: "refresh repository after adding the package",
129
129
  default: !0,
130
130
  allowNo: !0,
131
131
  env: "PL_REGISTRY_REFRESH"
132
132
  }),
133
- unmark: d.boolean({
133
+ unmark: f.boolean({
134
134
  summary: "reverses meaning of this command, flag can be used to remove \"stable\" flag from the package",
135
135
  default: !1
136
136
  })
137
137
  };
138
138
  async run() {
139
- let { flags: t } = await this.parse(e), n = await r(f.resolve(t.modulePath));
140
- t["version-override"] && (n = ie(n, t["version-override"]));
141
- let a = new o(i(t.registry), new m(this));
139
+ let { flags: t } = await this.parse(e), n = await r(p.resolve(t.modulePath));
140
+ t["version-override"] && (n = re(n, t["version-override"]));
141
+ let a = new o(i(t.registry), new h(this));
142
142
  t.unmark ? await a.removePackageFromChannel(n.id, t.channel) : await a.addPackageToChannel(n.id, t.channel), t.refresh && await a.updateIfNeeded();
143
143
  }
144
- }, ye = class n extends u {
144
+ }, ve = class n extends d {
145
145
  static description = "Builds block pack and outputs a block pack manifest consolidating all references assets into a single folder";
146
146
  static flags = {
147
- modulePath: d.string({
147
+ modulePath: f.string({
148
148
  char: "i",
149
149
  summary: "input module path",
150
150
  helpValue: "<path>",
151
151
  default: "."
152
152
  }),
153
- destinationPath: d.string({
153
+ destinationPath: f.string({
154
154
  char: "o",
155
155
  summary: "output folder",
156
156
  helpValue: "<path>",
@@ -159,67 +159,67 @@ var ge = class e extends u {
159
159
  };
160
160
  async run() {
161
161
  let { flags: r } = await this.parse(n);
162
- await t(await e(f.resolve(r.modulePath)), f.resolve(r.destinationPath));
162
+ await t(await e(p.resolve(r.modulePath)), p.resolve(r.destinationPath));
163
163
  }
164
164
  };
165
165
  //#endregion
166
166
  //#region src/cmd/publish.ts
167
- function be(e, t) {
167
+ function ye(e, t) {
168
168
  let n = { ...e };
169
- for (let e in t) t[e] && typeof t[e] == "object" && !Array.isArray(t[e]) && n[e] && typeof n[e] == "object" && !Array.isArray(n[e]) ? n[e] = be(n[e], t[e]) : n[e] = t[e];
169
+ for (let e in t) t[e] && typeof t[e] == "object" && !Array.isArray(t[e]) && n[e] && typeof n[e] == "object" && !Array.isArray(n[e]) ? n[e] = ye(n[e], t[e]) : n[e] = t[e];
170
170
  return n;
171
171
  }
172
- var xe = class e extends u {
172
+ var be = class e extends d {
173
173
  static description = "Publishes the block package and refreshes the registry (for v2 block-pack schema)";
174
174
  static flags = {
175
- registry: d.string({
175
+ registry: f.string({
176
176
  char: "r",
177
177
  summary: "full address of the registry",
178
178
  helpValue: "<address>",
179
179
  env: "PL_REGISTRY",
180
180
  required: !0
181
181
  }),
182
- manifest: d.file({
182
+ manifest: f.file({
183
183
  char: "m",
184
184
  summary: "manifest file path",
185
185
  exists: !0,
186
186
  default: `./block-pack/${n}`
187
187
  }),
188
- "version-override": d.file({
188
+ "version-override": f.file({
189
189
  char: "v",
190
190
  summary: "override package version"
191
191
  }),
192
- refresh: d.boolean({
192
+ refresh: f.boolean({
193
193
  summary: "refresh repository after adding the package",
194
194
  default: !0,
195
195
  allowNo: !0,
196
196
  env: "PL_REGISTRY_REFRESH"
197
197
  }),
198
- unstable: d.boolean({
198
+ unstable: f.boolean({
199
199
  summary: "do not add the published package to stable channel",
200
200
  default: !1,
201
201
  env: "PL_PUBLISH_UNSTABLE"
202
202
  })
203
203
  };
204
204
  async run() {
205
- let { flags: t } = await this.parse(e), n = f.resolve(t.manifest), r = JSON.parse(await p.promises.readFile(n, { encoding: "utf-8" })), a = ne.parse(r);
206
- a = be(r, a);
207
- let s = f.dirname(n);
208
- this.log(`Manifest root = ${s}`), t["version-override"] && (a = ae(a, t["version-override"]));
209
- let c = new o(i(t.registry), new m(this));
210
- await c.publishPackage(a, async (e) => Buffer.from(await p.promises.readFile(f.resolve(s, e)))), t.unstable || (this.log(`Adding package to ${re} channel...`), await c.addPackageToChannel(a.description.id, re)), t.refresh && await c.updateIfNeeded();
211
- }
212
- }, Se = class e extends u {
205
+ let { flags: t } = await this.parse(e), n = p.resolve(t.manifest), r = JSON.parse(await m.promises.readFile(n, { encoding: "utf-8" })), a = te.parse(r);
206
+ a = ye(r, a);
207
+ let s = p.dirname(n);
208
+ this.log(`Manifest root = ${s}`), t["version-override"] && (a = ie(a, t["version-override"]));
209
+ let c = new o(i(t.registry), new h(this));
210
+ await c.publishPackage(a, async (e) => Buffer.from(await m.promises.readFile(p.resolve(s, e)))), t.unstable || (this.log(`Adding package to ${ne} channel...`), await c.addPackageToChannel(a.description.id, ne)), t.refresh && await c.updateIfNeeded();
211
+ }
212
+ }, xe = class e extends d {
213
213
  static description = "Refresh overview files based on published but not proecessed artefacts";
214
214
  static flags = {
215
- registry: d.string({
215
+ registry: f.string({
216
216
  char: "r",
217
217
  summary: "full address of the registry",
218
218
  helpValue: "<address>",
219
219
  env: "PL_REGISTRY",
220
220
  required: !0
221
221
  }),
222
- mode: d.string({
222
+ mode: f.string({
223
223
  char: "m",
224
224
  summary: "refresh mode (allowed valiues: \"force\", \"normal\", \"dry-run\")",
225
225
  helpValue: "<mode>",
@@ -234,31 +234,31 @@ var xe = class e extends u {
234
234
  };
235
235
  async run() {
236
236
  let { flags: t } = await this.parse(e);
237
- await new o(i(t.registry), new m(this)).updateIfNeeded(t.mode);
237
+ await new o(i(t.registry), new h(this)).updateIfNeeded(t.mode);
238
238
  }
239
- }, Ce = class e extends u {
239
+ }, Se = class e extends d {
240
240
  static description = "Restore global overview from a snapshot";
241
241
  static flags = {
242
- registry: d.string({
242
+ registry: f.string({
243
243
  char: "r",
244
244
  summary: "full address of the registry",
245
245
  helpValue: "<address>",
246
246
  env: "PL_REGISTRY",
247
247
  required: !0
248
248
  }),
249
- snapshot: d.string({
249
+ snapshot: f.string({
250
250
  char: "s",
251
251
  summary: "snapshot timestamp ID to restore from",
252
252
  helpValue: "<timestamp>",
253
253
  required: !0
254
254
  }),
255
- "skip-confirmation": d.boolean({
255
+ "skip-confirmation": f.boolean({
256
256
  summary: "skip confirmation prompt (use with caution)",
257
257
  default: !1
258
258
  })
259
259
  };
260
260
  async run() {
261
- let { flags: t } = await this.parse(e), n = new o(i(t.registry), new m(this)), r = await n.listGlobalOverviewSnapshots();
261
+ let { flags: t } = await this.parse(e), n = new o(i(t.registry), new h(this)), r = await n.listGlobalOverviewSnapshots();
262
262
  if (r.find((e) => e.timestamp === t.snapshot) || this.error(`Snapshot '${t.snapshot}' not found. Available snapshots:\n${r.map((e) => ` - ${e.timestamp}`).join("\n") || " (none)"}`), !t["skip-confirmation"]) {
263
263
  let e = (await import("node:readline")).createInterface({
264
264
  input: process.stdin,
@@ -277,7 +277,7 @@ var xe = class e extends u {
277
277
  this.error(`Failed to restore from snapshot: ${String(e)}`);
278
278
  }
279
279
  }
280
- }, we = class extends u {
280
+ }, Ce = class extends d {
281
281
  static description = "[DEPRECATED] Use `block-tools structure refresh --update-deps-only`. This alias delegates to it.";
282
282
  static examples = ["<%= config.bin %> <%= command.id %>"];
283
283
  async run() {
@@ -286,7 +286,7 @@ var xe = class e extends u {
286
286
  };
287
287
  //#endregion
288
288
  //#region src/registry_v1/flags.ts
289
- function Te(e) {
289
+ function we(e) {
290
290
  let t = e.match(/(?<destName>[^/\\]+)=(?<src>.*)/);
291
291
  if (t) {
292
292
  let { src: e, destName: n } = t.groups;
@@ -296,54 +296,54 @@ function Te(e) {
296
296
  };
297
297
  } else return {
298
298
  src: e,
299
- destName: f.basename(e)
299
+ destName: p.basename(e)
300
300
  };
301
301
  }
302
- var Ee = d.custom({
302
+ var Te = f.custom({
303
303
  summary: "target files to upload",
304
304
  helpValue: "file_path | package_name=file_path",
305
- parse: async (e) => Te(e)
306
- }), De = [
305
+ parse: async (e) => we(e)
306
+ }), Ee = [
307
307
  "registry",
308
308
  "organization",
309
309
  "package",
310
310
  "version"
311
- ], Oe = class e extends u {
311
+ ], De = class e extends d {
312
312
  static description = "Uploads V1 package and refreshes the registry";
313
313
  static flags = {
314
- registry: d.string({
314
+ registry: f.string({
315
315
  char: "r",
316
316
  summary: "full address of the registry or alias from .pl.reg",
317
317
  helpValue: "<address|alias>",
318
318
  env: "PL_REGISTRY"
319
319
  }),
320
- organization: d.string({
320
+ organization: f.string({
321
321
  char: "o",
322
322
  summary: "target organisation",
323
323
  env: "PL_PACKAGE_ORGANIZATION"
324
324
  }),
325
- package: d.string({
325
+ package: f.string({
326
326
  char: "p",
327
327
  summary: "target package",
328
328
  env: "PL_PACKAGE_NAME"
329
329
  }),
330
- version: d.string({
330
+ version: f.string({
331
331
  char: "v",
332
332
  summary: "target version",
333
333
  env: "PL_PACKAGE_VERSION"
334
334
  }),
335
- meta: d.file({
335
+ meta: f.file({
336
336
  char: "m",
337
337
  summary: "json file containing meta information to associate with tha package",
338
338
  exists: !0
339
339
  }),
340
- file: Ee({
340
+ file: Te({
341
341
  char: "f",
342
342
  summary: "package files",
343
343
  multiple: !0,
344
344
  default: []
345
345
  }),
346
- refresh: d.boolean({
346
+ refresh: f.boolean({
347
347
  summary: "refresh repository after adding the package",
348
348
  default: !0,
349
349
  allowNo: !0,
@@ -351,41 +351,41 @@ var Ee = d.custom({
351
351
  })
352
352
  };
353
353
  async run() {
354
- let { flags: t } = await this.parse(e), n = ee.parse({});
355
- for (let e of De) t[e] && (n[e] = t[e]);
356
- t.meta && (t.meta.endsWith(".json") ? n.meta = JSON.parse(await p.promises.readFile(t.meta, { encoding: "utf-8" })) : t.meta.endsWith(".yaml") && (n.meta = oe.parse(await p.promises.readFile(t.meta, { encoding: "utf-8" }))));
354
+ let { flags: t } = await this.parse(e), n = l.parse({});
355
+ for (let e of Ee) t[e] && (n[e] = t[e]);
356
+ t.meta && (t.meta.endsWith(".json") ? n.meta = JSON.parse(await m.promises.readFile(t.meta, { encoding: "utf-8" })) : t.meta.endsWith(".yaml") && (n.meta = ae.parse(await m.promises.readFile(t.meta, { encoding: "utf-8" }))));
357
357
  for (let e of t.file) n.files[e.destName] = e.src;
358
358
  let r = await c(n);
359
- this.log(oe.stringify(r.conf));
360
- let i = r.createRegistry(new m(this)), a = r.fullPackageName, o = i.constructNewPackage(a);
359
+ this.log(ae.stringify(r.conf));
360
+ let i = r.createRegistry(new h(this)), a = r.fullPackageName, o = i.constructNewPackage(a);
361
361
  for (let [e, t] of Object.entries(r.conf.files)) {
362
362
  this.log(`Uploading ${t} -> ${e} ...`);
363
- let n = await p.promises.readFile(t);
363
+ let n = await m.promises.readFile(t);
364
364
  await o.addFile(e, n);
365
365
  }
366
366
  this.log("Uploading meta information..."), await o.writeMeta(r.conf.meta), await o.finish(), t.refresh && await i.updateIfNeeded();
367
367
  }
368
- }, ke = class {
368
+ }, Oe = class {
369
369
  constructor(e) {
370
370
  this.root = e;
371
371
  }
372
372
  abs(e) {
373
- return f.resolve(this.root, e);
373
+ return p.resolve(this.root, e);
374
374
  }
375
375
  read(e) {
376
- return p.readFileSync(this.abs(e), "utf-8");
376
+ return m.readFileSync(this.abs(e), "utf-8");
377
377
  }
378
378
  write(e, t) {
379
379
  let n = this.abs(e);
380
- p.mkdirSync(f.dirname(n), { recursive: !0 }), p.writeFileSync(n, t, "utf-8");
380
+ m.mkdirSync(p.dirname(n), { recursive: !0 }), m.writeFileSync(n, t, "utf-8");
381
381
  }
382
382
  writeBinary(e, t) {
383
383
  let n = this.abs(e);
384
- p.mkdirSync(f.dirname(n), { recursive: !0 }), p.writeFileSync(n, t);
384
+ m.mkdirSync(p.dirname(n), { recursive: !0 }), m.writeFileSync(n, t);
385
385
  }
386
386
  exists(e) {
387
387
  try {
388
- return p.statSync(this.abs(e)), !0;
388
+ return m.statSync(this.abs(e)), !0;
389
389
  } catch {
390
390
  return !1;
391
391
  }
@@ -393,15 +393,15 @@ var Ee = d.custom({
393
393
  list(e) {
394
394
  let t = this.abs(e);
395
395
  try {
396
- if (!p.statSync(t).isDirectory()) return [];
396
+ if (!m.statSync(t).isDirectory()) return [];
397
397
  } catch {
398
398
  return [];
399
399
  }
400
400
  let n = [];
401
401
  function r(e, t) {
402
- let i = p.readdirSync(t, { withFileTypes: !0 });
402
+ let i = m.readdirSync(t, { withFileTypes: !0 });
403
403
  for (let a of i) {
404
- let i = e ? `${e}/${a.name}` : a.name, o = f.join(t, a.name);
404
+ let i = e ? `${e}/${a.name}` : a.name, o = p.join(t, a.name);
405
405
  a.isDirectory() ? r(i, o) : a.isFile() && n.push(i);
406
406
  }
407
407
  }
@@ -410,7 +410,7 @@ var Ee = d.custom({
410
410
  listDir(e) {
411
411
  let t = this.abs(e), n;
412
412
  try {
413
- n = p.readdirSync(t, { withFileTypes: !0 });
413
+ n = m.readdirSync(t, { withFileTypes: !0 });
414
414
  } catch {
415
415
  return [];
416
416
  }
@@ -421,48 +421,48 @@ var Ee = d.custom({
421
421
  }
422
422
  move(e, t) {
423
423
  let n = this.abs(e), r = this.abs(t);
424
- p.mkdirSync(f.dirname(r), { recursive: !0 }), p.renameSync(n, r);
424
+ m.mkdirSync(p.dirname(r), { recursive: !0 }), m.renameSync(n, r);
425
425
  }
426
426
  delete(e) {
427
- p.rmSync(this.abs(e), {
427
+ m.rmSync(this.abs(e), {
428
428
  recursive: !0,
429
429
  force: !0
430
430
  });
431
431
  }
432
- }, Ae = class {
432
+ }, ke = class {
433
433
  constructor(e) {
434
434
  this.root = e;
435
435
  }
436
436
  staticRead(e) {
437
- return p.readFileSync(f.resolve(this.root, "static", e), "utf-8");
437
+ return m.readFileSync(p.resolve(this.root, "static", e), "utf-8");
438
438
  }
439
439
  staticReadBinary(e) {
440
- return p.readFileSync(f.resolve(this.root, "static", e));
440
+ return m.readFileSync(p.resolve(this.root, "static", e));
441
441
  }
442
442
  textRead(e) {
443
- return p.readFileSync(f.resolve(this.root, "text", e), "utf-8");
443
+ return m.readFileSync(p.resolve(this.root, "text", e), "utf-8");
444
444
  }
445
445
  };
446
- function je(e, t) {
446
+ function Ae(e, t) {
447
447
  return e.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g, (e, n) => t[n] ?? `\${${n}}`);
448
448
  }
449
449
  //#endregion
450
450
  //#region src/structure/engine/flatten.ts
451
- var Me = ["default", "init"];
452
- function Ne(e, t) {
451
+ var je = ["default", "init"];
452
+ function Me(e, t) {
453
453
  if (!e) return t;
454
454
  if (!t) return e;
455
455
  let n = e.endsWith("/") ? e.slice(0, -1) : e, r = t.startsWith("/") ? t.slice(1) : t;
456
456
  return r ? `${n}/${r}` : n;
457
457
  }
458
- function Pe(e, t) {
458
+ function Ne(e, t) {
459
459
  return e.filter((e) => e.scope === t).slice().sort((e, t) => e.path.localeCompare(t.path));
460
460
  }
461
- function Fe(e, t) {
461
+ function Pe(e, t) {
462
462
  let n = [];
463
463
  function r(e, i, a, o, s) {
464
464
  if (e.kind === "scope") {
465
- let n = Pe(t.modules, e.scope);
465
+ let n = Ne(t.modules, e.scope);
466
466
  for (let t of n) for (let n of e.children) r(n, e.scope, t.path, o, s);
467
467
  return;
468
468
  }
@@ -475,14 +475,14 @@ function Fe(e, t) {
475
475
  for (let t of e.children) r(t, i, a, o, e.modes);
476
476
  return;
477
477
  }
478
- if (i === void 0 || a === void 0) throw Error(`flatten: leaf '${Le(e)}' is not inside a scope() frame`);
478
+ if (i === void 0 || a === void 0) throw Error(`flatten: leaf '${Ie(e)}' is not inside a scope() frame`);
479
479
  if (e.kind === "rename") {
480
480
  n.push({
481
481
  leaf: e,
482
482
  scope: i,
483
483
  modulePath: a,
484
- resolvedPath: Ne(a, e.from),
485
- resolvedTo: Ne(a, e.to),
484
+ resolvedPath: Me(a, e.from),
485
+ resolvedTo: Me(a, e.to),
486
486
  triggers: o,
487
487
  modes: s
488
488
  });
@@ -492,15 +492,15 @@ function Fe(e, t) {
492
492
  leaf: e,
493
493
  scope: i,
494
494
  modulePath: a,
495
- resolvedPath: Ne(a, Ie(e)),
495
+ resolvedPath: Me(a, Fe(e)),
496
496
  triggers: o,
497
497
  modes: s
498
498
  });
499
499
  }
500
- for (let t of e.children) r(t, void 0, void 0, [], Me);
500
+ for (let t of e.children) r(t, void 0, void 0, [], je);
501
501
  return n;
502
502
  }
503
- function Ie(e) {
503
+ function Fe(e) {
504
504
  switch (e.kind) {
505
505
  case "fixed":
506
506
  case "managed":
@@ -510,67 +510,67 @@ function Ie(e) {
510
510
  case "rename": return e.from;
511
511
  }
512
512
  }
513
- function Le(e) {
513
+ function Ie(e) {
514
514
  return e.kind === "rename" ? `rename ${e.from} -> ${e.to}` : `${e.kind} ${e.path}`;
515
515
  }
516
516
  //#endregion
517
517
  //#region src/structure/engine/glob.ts
518
- var Re = /[.+^${}()|[\]\\]/g;
519
- function ze(e) {
518
+ var Le = /[.+^${}()|[\]\\]/g;
519
+ function Re(e) {
520
520
  let t = "";
521
521
  for (let n = 0; n < e.length; n++) {
522
522
  let r = e[n];
523
- r === "*" ? e[n + 1] === "*" ? (n++, e[n + 1] === "/" ? (n++, t += "(?:.*/)?") : t += ".*") : t += "[^/]*" : r === "?" ? t += "[^/]" : t += r.replace(Re, "\\$&");
523
+ r === "*" ? e[n + 1] === "*" ? (n++, e[n + 1] === "/" ? (n++, t += "(?:.*/)?") : t += ".*") : t += "[^/]*" : r === "?" ? t += "[^/]" : t += r.replace(Le, "\\$&");
524
524
  }
525
525
  return RegExp(`^${t}$`);
526
526
  }
527
- function Be(e, t) {
528
- return ze(e).test(t);
527
+ function ze(e, t) {
528
+ return Re(e).test(t);
529
529
  }
530
530
  //#endregion
531
531
  //#region src/structure/engine/builders.ts
532
- var h, g;
533
- function Ve(e) {
534
- if (!h) throw Error(`${e}() called outside defineStructure(). Builders must run inside the lambda passed to defineStructure(...).`);
535
- return h;
532
+ var g, _;
533
+ function Be(e) {
534
+ if (!g) throw Error(`${e}() called outside defineStructure(). Builders must run inside the lambda passed to defineStructure(...).`);
535
+ return g;
536
536
  }
537
- function _(e, t) {
538
- let n = Ve(e);
537
+ function v(e, t) {
538
+ let n = Be(e);
539
539
  n.stack[n.stack.length - 1].push(t);
540
540
  }
541
- function He(e, t) {
542
- let n = g;
543
- g = e;
541
+ function Ve(e, t) {
542
+ let n = _;
543
+ _ = e;
544
544
  try {
545
545
  return t();
546
546
  } finally {
547
- g = n;
547
+ _ = n;
548
548
  }
549
549
  }
550
- function Ue() {
551
- return g;
550
+ function He() {
551
+ return _;
552
552
  }
553
- function v() {
554
- if (!g) throw Error("getActiveRunContext() called outside engine.run(). Generators only see the run context during a run.");
555
- return g;
553
+ function y() {
554
+ if (!_) throw Error("getActiveRunContext() called outside engine.run(). Generators only see the run context during a run.");
555
+ return _;
556
556
  }
557
- function We(e) {
558
- if (h) throw Error("defineStructure() cannot be called from inside another defineStructure().");
557
+ function Ue(e) {
558
+ if (g) throw Error("defineStructure() cannot be called from inside another defineStructure().");
559
559
  let t = [], n = {
560
560
  root: t,
561
561
  stack: [t],
562
562
  inScope: !1
563
563
  };
564
- h = n;
564
+ g = n;
565
565
  try {
566
566
  if (e(), n.stack.length !== 1) throw Error(`defineStructure: builder body left ${n.stack.length - 1} unclosed group frame(s)`);
567
567
  let r = { children: t };
568
- return Ge(r), r;
568
+ return We(r), r;
569
569
  } finally {
570
- h = void 0;
570
+ g = void 0;
571
571
  }
572
572
  }
573
- function Ge(e) {
573
+ function We(e) {
574
574
  let t = /* @__PURE__ */ new Map();
575
575
  function n(e, r) {
576
576
  if (e.kind === "scope") {
@@ -593,8 +593,8 @@ function Ge(e) {
593
593
  throw Error(`defineStructure validation: path '${t}' under scope '${e}' is declared as both seed and ${n}. Seeds are block-author territory (written once at init, untouched thereafter); engine-managed primitives (fixed/managed/scaffold) rewrite on every refresh. The two contracts cannot coexist on the same path.`);
594
594
  }
595
595
  }
596
- function y(e, t) {
597
- let n = Ve("scope");
596
+ function b(e, t) {
597
+ let n = Be("scope");
598
598
  if (n.inScope) throw Error("scope() cannot nest. Already inside a scope.");
599
599
  let r = {
600
600
  kind: "scope",
@@ -608,22 +608,22 @@ function y(e, t) {
608
608
  n.stack.pop(), n.inScope = !1;
609
609
  }
610
610
  }
611
- var Ke;
612
- function qe(e) {
613
- Ke = e;
611
+ var Ge;
612
+ function Ke(e) {
613
+ Ge = e;
614
614
  }
615
- function b(e, t, n) {
616
- Je(e, t), n && Je((t) => !e(t), n);
615
+ function x(e, t, n) {
616
+ qe(e, t), n && qe((t) => !e(t), n);
617
617
  }
618
- function Je(e, t) {
619
- if (h) {
620
- Ye(e, t);
618
+ function qe(e, t) {
619
+ if (g) {
620
+ Je(e, t);
621
621
  return;
622
622
  }
623
- if (!(Ke?.(e, t) ?? !1)) throw Error("when() called outside defineStructure() and outside any managed(...) body. Place this call inside one of the two.");
623
+ if (!(Ge?.(e, t) ?? !1)) throw Error("when() called outside defineStructure() and outside any managed(...) body. Place this call inside one of the two.");
624
624
  }
625
- function Ye(e, t) {
626
- let n = h, r = {
625
+ function Je(e, t) {
626
+ let n = g, r = {
627
627
  kind: "when",
628
628
  trigger: e,
629
629
  children: []
@@ -635,11 +635,11 @@ function Ye(e, t) {
635
635
  n.stack.pop();
636
636
  }
637
637
  }
638
- function x(e) {
638
+ function S(e) {
639
639
  return (t) => t.filesMatch(e);
640
640
  }
641
- function Xe(e, t, n) {
642
- let r = Ve(e), i = {
641
+ function Ye(e, t, n) {
642
+ let r = Be(e), i = {
643
643
  kind: "mode",
644
644
  modes: t,
645
645
  children: []
@@ -651,144 +651,144 @@ function Xe(e, t, n) {
651
651
  r.stack.pop();
652
652
  }
653
653
  }
654
- function Ze(e) {
655
- Xe("onInitOrUpdate", ["init", "updateDeps"], e);
654
+ function Xe(e) {
655
+ Ye("onInitOrUpdate", ["init", "updateDeps"], e);
656
656
  }
657
- function S(e, t) {
658
- _("fixed", {
657
+ function C(e, t) {
658
+ v("fixed", {
659
659
  kind: "fixed",
660
660
  path: e,
661
661
  content: t
662
662
  });
663
663
  }
664
- function C(e, t, n) {
665
- _("managed", {
664
+ function w(e, t, n) {
665
+ v("managed", {
666
666
  kind: "managed",
667
667
  path: e,
668
668
  initial: t,
669
669
  body: n
670
670
  });
671
671
  }
672
- function Qe(e, t) {
673
- _("scaffold", {
672
+ function Ze(e, t) {
673
+ v("scaffold", {
674
674
  kind: "scaffold",
675
675
  path: e,
676
676
  initial: t
677
677
  });
678
678
  }
679
- function w(e, t) {
680
- _("seed", {
679
+ function T(e, t) {
680
+ v("seed", {
681
681
  kind: "seed",
682
682
  path: e,
683
683
  initial: t
684
684
  });
685
685
  }
686
- function T(e) {
687
- _("remove", {
686
+ function E(e) {
687
+ v("remove", {
688
688
  kind: "remove",
689
689
  path: e
690
690
  });
691
691
  }
692
- function E(e) {
692
+ function D(e) {
693
693
  return {
694
694
  kind: "file",
695
695
  path: e
696
696
  };
697
697
  }
698
- function $e(e) {
698
+ function Qe(e) {
699
699
  return {
700
700
  kind: "binary",
701
701
  path: e
702
702
  };
703
703
  }
704
- function et(e) {
704
+ function $e(e) {
705
705
  return {
706
706
  kind: "text",
707
707
  value: e
708
708
  };
709
709
  }
710
- function tt(e, t) {
710
+ function et(e, t) {
711
711
  return {
712
712
  kind: "tpl",
713
713
  path: e,
714
714
  vars: t
715
715
  };
716
716
  }
717
- function D(e) {
717
+ function O(e) {
718
718
  return {
719
719
  kind: "generate",
720
720
  fn: e
721
721
  };
722
722
  }
723
- function nt() {
724
- if (!g) throw Error("blockVars() called outside engine.run(). Generators and managed bodies only see BlockVars during a run.");
725
- return g.blockVars;
723
+ function tt() {
724
+ if (!_) throw Error("blockVars() called outside engine.run(). Generators and managed bodies only see BlockVars during a run.");
725
+ return _.blockVars;
726
726
  }
727
727
  //#endregion
728
728
  //#region src/structure/engine/parsers/json.ts
729
- function rt(e) {
729
+ function nt(e) {
730
730
  return JSON.parse(e);
731
731
  }
732
- var it = 100, at = 2;
733
- function ot(e) {
734
- return e.length === 0 ? "[]" : "[" + e.map(st).join(", ") + "]";
732
+ var rt = 100, it = 2;
733
+ function at(e) {
734
+ return e.length === 0 ? "[]" : "[" + e.map(ot).join(", ") + "]";
735
735
  }
736
- function st(e) {
737
- if (Array.isArray(e)) return ot(e);
738
- if (k(e)) {
736
+ function ot(e) {
737
+ if (Array.isArray(e)) return at(e);
738
+ if (A(e)) {
739
739
  let t = Object.entries(e);
740
- return t.length === 0 ? "{}" : "{ " + t.map(([e, t]) => `${JSON.stringify(e)}: ${st(t)}`).join(", ") + " }";
740
+ return t.length === 0 ? "{}" : "{ " + t.map(([e, t]) => `${JSON.stringify(e)}: ${ot(t)}`).join(", ") + " }";
741
741
  }
742
742
  return JSON.stringify(e);
743
743
  }
744
- function ct(e, t, n, r) {
745
- let i = t + at, a = " ".repeat(i);
744
+ function st(e, t, n, r) {
745
+ let i = t + it, a = " ".repeat(i);
746
746
  if (Array.isArray(e)) {
747
- let o = ot(e);
748
- if (n + o.length + r <= it) return o;
747
+ let o = at(e);
748
+ if (n + o.length + r <= rt) return o;
749
749
  let s = e.length - 1;
750
- return "[\n" + e.map((e, t) => a + ct(e, i, i, t === s ? 0 : 1)).join(",\n") + "\n" + " ".repeat(t) + "]";
750
+ return "[\n" + e.map((e, t) => a + st(e, i, i, t === s ? 0 : 1)).join(",\n") + "\n" + " ".repeat(t) + "]";
751
751
  }
752
- if (k(e)) {
752
+ if (A(e)) {
753
753
  let n = Object.entries(e);
754
754
  if (n.length === 0) return "{}";
755
755
  let r = n.length - 1;
756
756
  return "{\n" + n.map(([e, t], n) => {
757
757
  let o = `${a}${JSON.stringify(e)}: `;
758
- return o + ct(t, i, o.length, n === r ? 0 : 1);
758
+ return o + st(t, i, o.length, n === r ? 0 : 1);
759
759
  }).join(",\n") + "\n" + " ".repeat(t) + "}";
760
760
  }
761
761
  return JSON.stringify(e);
762
762
  }
763
- function lt(e, t) {
764
- return t?.collapse ? ct(JSON.parse(JSON.stringify(e ?? null)), 0, 0, 0) + "\n" : JSON.stringify(e, null, 2) + "\n";
763
+ function ct(e, t) {
764
+ return t?.collapse ? st(JSON.parse(JSON.stringify(e ?? null)), 0, 0, 0) + "\n" : JSON.stringify(e, null, 2) + "\n";
765
765
  }
766
- function O(e) {
766
+ function k(e) {
767
767
  return e === "" || e === void 0 ? [] : e.split(".");
768
768
  }
769
- function k(e) {
769
+ function A(e) {
770
770
  return typeof e == "object" && !!e && !Array.isArray(e);
771
771
  }
772
- function ut(e, t) {
773
- let n = O(t), r = e;
772
+ function lt(e, t) {
773
+ let n = k(t), r = e;
774
774
  for (let e of n) {
775
- if (!k(r)) return;
775
+ if (!A(r)) return;
776
776
  r = r[e];
777
777
  }
778
778
  return r;
779
779
  }
780
- function dt(e, t) {
781
- let n = O(t);
780
+ function ut(e, t) {
781
+ let n = k(t);
782
782
  if (n.length === 0) return !0;
783
783
  let r = e;
784
784
  for (let e = 0; e < n.length - 1; e++) {
785
- if (!k(r)) return !1;
785
+ if (!A(r)) return !1;
786
786
  r = r[n[e]];
787
787
  }
788
- return k(r) ? n[n.length - 1] in r : !1;
788
+ return A(r) ? n[n.length - 1] in r : !1;
789
789
  }
790
- function ft(e, t, n) {
791
- let r = O(t);
790
+ function dt(e, t, n) {
791
+ let r = k(t);
792
792
  if (r.length === 0) throw Error("setAtPath: jsonPath must be non-empty");
793
793
  let i = e;
794
794
  for (let e = 0; e < r.length - 1; e++) {
@@ -796,22 +796,22 @@ function ft(e, t, n) {
796
796
  if (n === void 0) {
797
797
  let e = {};
798
798
  i[t] = e, i = e;
799
- } else if (k(n)) i = n;
799
+ } else if (A(n)) i = n;
800
800
  else throw Error(`setAtPath: cannot descend into non-object at '${r.slice(0, e + 1).join(".")}'`);
801
801
  }
802
802
  i[r[r.length - 1]] = n;
803
803
  }
804
- function pt(e, t) {
805
- let n = O(t);
804
+ function ft(e, t) {
805
+ let n = k(t);
806
806
  if (n.length === 0) throw Error("deleteAtPath: jsonPath must be non-empty");
807
807
  let r = e;
808
808
  for (let e = 0; e < n.length - 1; e++) {
809
- if (!k(r)) return;
809
+ if (!A(r)) return;
810
810
  r = r[n[e]];
811
811
  }
812
- k(r) && delete r[n[n.length - 1]];
812
+ A(r) && delete r[n[n.length - 1]];
813
813
  }
814
- function mt(e, t) {
814
+ function pt(e, t) {
815
815
  let n = new Set(t), r = Object.keys(e), i = /* @__PURE__ */ new Map();
816
816
  i.set("", []);
817
817
  let a = "";
@@ -826,63 +826,63 @@ function mt(e, t) {
826
826
  }
827
827
  //#endregion
828
828
  //#region src/structure/engine/parsers/lines.ts
829
- function ht(e) {
829
+ function mt(e) {
830
830
  let t = e.split("\n");
831
831
  return t.length > 0 && t[t.length - 1] === "" && t.pop(), t;
832
832
  }
833
- function gt(e) {
833
+ function ht(e) {
834
834
  return e.join("\n") + "\n";
835
835
  }
836
- function _t(e) {
836
+ function gt(e) {
837
837
  return e.replace(/(^|\s)#.*$/, "$1").trim();
838
838
  }
839
- function vt(e, t) {
840
- let n = _t(e);
839
+ function _t(e, t) {
840
+ let n = gt(e);
841
841
  return n === "" ? !1 : n === t.trim();
842
842
  }
843
- function yt(e, t) {
844
- for (let n of e) if (vt(n, t)) return !0;
843
+ function vt(e, t) {
844
+ for (let n of e) if (_t(n, t)) return !0;
845
845
  return !1;
846
846
  }
847
847
  //#endregion
848
848
  //#region src/structure/engine/content-rules.ts
849
- function bt(e, t) {
849
+ function yt(e, t) {
850
850
  return e === "sdk:" ? t ? "workspace:*" : "catalog:" : e;
851
851
  }
852
- var xt = [
852
+ var bt = [
853
853
  "dependencies",
854
854
  "devDependencies",
855
855
  "peerDependencies",
856
856
  "optionalDependencies"
857
857
  ];
858
- function St(e, t) {
859
- if (P(e)) for (let n of xt) {
858
+ function xt(e, t) {
859
+ if (P(e)) for (let n of bt) {
860
860
  let r = e[n];
861
861
  if (P(r)) for (let e of Object.keys(r)) r[e] === "sdk:" && (r[e] = t ? "workspace:*" : "catalog:");
862
862
  }
863
863
  }
864
- var A;
865
- function j(e) {
866
- if (!A) throw Error(`${e}() only valid inside a managed(...) body. Move this call inside managed(path, initial, () => {...}).`);
867
- return A;
864
+ var j;
865
+ function St(e) {
866
+ if (!j) throw Error(`${e}() only valid inside a managed(...) body. Move this call inside managed(path, initial, () => {...}).`);
867
+ return j;
868
868
  }
869
869
  function M(e) {
870
- let t = j(e);
870
+ let t = St(e);
871
871
  if (t.kind !== "json") throw Error(`${e}() requires a JSON-managed body; got '${t.kind}'.`);
872
872
  return t;
873
873
  }
874
874
  function N(e) {
875
- let t = j(e);
875
+ let t = St(e);
876
876
  if (t.kind !== "yaml") throw Error(`${e}() requires a YAML-managed body; got '${t.kind}'.`);
877
877
  return t;
878
878
  }
879
879
  function Ct(e) {
880
- let t = j(e);
880
+ let t = St(e);
881
881
  if (t.kind !== "lines") throw Error(`${e}() requires a lines-managed body; got '${t.kind}'.`);
882
882
  return t;
883
883
  }
884
884
  function wt(e, t) {
885
- let n = e.ctx ?? Ue();
885
+ let n = e.ctx ?? He();
886
886
  if (!n) throw Error(`${t}() needs a RunContext but none is active. Pass { ctx } via the with-managed-* helper or run inside engine.run(...).`);
887
887
  return n;
888
888
  }
@@ -890,8 +890,8 @@ function P(e) {
890
890
  return typeof e == "object" && !!e && !Array.isArray(e);
891
891
  }
892
892
  function Tt(e, t, n = {}) {
893
- if (A) throw Error("Nested managed(...) body — engine bug.");
894
- A = {
893
+ if (j) throw Error("Nested managed(...) body — engine bug.");
894
+ j = {
895
895
  kind: "json",
896
896
  obj: e,
897
897
  ctx: n.ctx,
@@ -900,27 +900,28 @@ function Tt(e, t, n = {}) {
900
900
  try {
901
901
  return t(), e;
902
902
  } finally {
903
- A = void 0;
903
+ j = void 0;
904
904
  }
905
905
  }
906
906
  function Et(e, t, n = {}) {
907
- if (A) throw Error("Nested managed(...) body — engine bug.");
908
- A = {
907
+ if (j) throw Error("Nested managed(...) body — engine bug.");
908
+ j = {
909
909
  kind: "yaml",
910
910
  doc: e,
911
911
  ctx: n.ctx,
912
912
  triggerContext: n.triggerContext,
913
- getLatestVersion: n.getLatestVersion
913
+ getLatestVersion: n.getLatestVersion,
914
+ getDerivedDependencyPin: n.getDerivedDependencyPin
914
915
  };
915
916
  try {
916
917
  return t(), e;
917
918
  } finally {
918
- A = void 0;
919
+ j = void 0;
919
920
  }
920
921
  }
921
922
  function Dt(e, t, n = {}) {
922
- if (A) throw Error("Nested managed(...) body — engine bug.");
923
- A = {
923
+ if (j) throw Error("Nested managed(...) body — engine bug.");
924
+ j = {
924
925
  kind: "lines",
925
926
  lines: e,
926
927
  ctx: n.ctx,
@@ -929,21 +930,21 @@ function Dt(e, t, n = {}) {
929
930
  try {
930
931
  return t(), e;
931
932
  } finally {
932
- A = void 0;
933
+ j = void 0;
933
934
  }
934
935
  }
935
- qe((e, t) => {
936
- if (!A) return !1;
937
- let n = A.triggerContext;
936
+ Ke((e, t) => {
937
+ if (!j) return !1;
938
+ let n = j.triggerContext;
938
939
  if (!n) throw Error("when() inside a managed(...) body requires a triggerContext. The runner supplies it via the `triggerContext` opt to with-managed-*; ensure your test/test helper passes one.");
939
940
  return e(n) && t(), !0;
940
941
  });
941
942
  function F(e, t) {
942
- ft(M("ensureField").obj, e, t);
943
+ dt(M("ensureField").obj, e, t);
943
944
  }
944
945
  function Ot(e, t) {
945
946
  let n = M("removeField").obj;
946
- dt(n, e) && (t && !t(ut(n, e)) || pt(n, e));
947
+ ut(n, e) && (t && !t(lt(n, e)) || ft(n, e));
947
948
  }
948
949
  function I(e, t) {
949
950
  F(`scripts.${e}`, t);
@@ -958,7 +959,7 @@ var At = [
958
959
  "optionalDependencies"
959
960
  ];
960
961
  function L(e, t, n, r) {
961
- let i = M(e), a = i.obj, o = n === "sdk:" ? bt(n, wt(i, e).isSdkInternal) : n;
962
+ let i = M(e), a = i.obj, o = n === "sdk:" ? yt(n, wt(i, e).isSdkInternal) : n;
962
963
  for (let e of At) {
963
964
  if (e === r) continue;
964
965
  let n = a[e];
@@ -1001,7 +1002,7 @@ function Nt(e) {
1001
1002
  for (let n of Object.keys(t)) e(n, t[n]) && delete t[n];
1002
1003
  }
1003
1004
  function Pt(e, t) {
1004
- let n = mt(e, t);
1005
+ let n = pt(e, t);
1005
1006
  for (let t of Object.keys(e)) delete e[t];
1006
1007
  for (let t of Object.keys(n)) e[t] = n[t];
1007
1008
  }
@@ -1022,7 +1023,7 @@ function G(e = "", t = {}) {
1022
1023
  Ft(r, !0);
1023
1024
  return;
1024
1025
  }
1025
- let i = ut(r, e);
1026
+ let i = lt(r, e);
1026
1027
  P(i) && Ft(i, n);
1027
1028
  }
1028
1029
  function It() {
@@ -1043,39 +1044,49 @@ function zt(e) {
1043
1044
  let n = t.getLatestVersion(e);
1044
1045
  n !== void 0 && Lt(t, e) !== n && t.doc.setIn(["catalog", e], n);
1045
1046
  }
1046
- function Bt(e) {
1047
+ function Bt(e, t) {
1048
+ let n = N("pinCatalogToDependencyOf");
1049
+ if (!n.getDerivedDependencyPin) return;
1050
+ let r = n.getDerivedDependencyPin(e);
1051
+ r !== void 0 && Lt(n, e) !== r && n.doc.setIn(["catalog", e], r);
1052
+ }
1053
+ function Vt(e) {
1054
+ let t = N("ensureCatalogAbsent");
1055
+ t.doc.hasIn(["catalog", e]) && t.doc.deleteIn(["catalog", e]);
1056
+ }
1057
+ function Ht(e) {
1047
1058
  let t = Ct("ensureGitignoreEntries");
1048
- for (let n of e) yt(t.lines, n) || t.lines.push(n);
1059
+ for (let n of e) vt(t.lines, n) || t.lines.push(n);
1049
1060
  }
1050
1061
  //#endregion
1051
1062
  //#region src/structure/engine/parsers/yaml.ts
1052
- function Vt(e) {
1053
- return ce(e);
1063
+ function Ut(e) {
1064
+ return se(e);
1054
1065
  }
1055
- function Ht(e) {
1066
+ function Wt(e) {
1056
1067
  return e.toString();
1057
1068
  }
1058
- var Ut = ".structure";
1059
- function Wt(e, t = 0) {
1060
- if (e < t) throw new Gt(e, t);
1069
+ var Gt = ".structure";
1070
+ function Kt(e, t = 0) {
1071
+ if (e < t) throw new qt(e, t);
1061
1072
  }
1062
- var Gt = class extends Error {
1073
+ var qt = class extends Error {
1063
1074
  constructor(e, t) {
1064
1075
  super(`Block .structure version is ${e}, below floor ${t}. Bootstrap via the legacy-migration skill, then re-run.`), this.version = e, this.floor = t, this.name = "StructureVersionFloorError";
1065
1076
  }
1066
1077
  };
1067
- function Kt(e, t = 1) {
1078
+ function Jt(e, t = 1) {
1068
1079
  let n = { version: t };
1069
- e.write(Ut, JSON.stringify(n));
1080
+ e.write(Gt, JSON.stringify(n));
1070
1081
  }
1071
1082
  //#endregion
1072
1083
  //#region src/structure/engine/runner.ts
1073
- var qt = class extends Error {
1084
+ var Yt = class extends Error {
1074
1085
  constructor(e) {
1075
1086
  super(`Post-run recheck: rule set not idempotent. Failing item: ${e.primitive} '${e.path}' (scope=${e.scope}, action=${e.action}). Engine bug.`), this.failing = e, this.name = "RecheckError";
1076
1087
  }
1077
1088
  };
1078
- function Jt(e, t, n, r) {
1089
+ function Xt(e, t, n, r) {
1079
1090
  switch (e.kind) {
1080
1091
  case "text": return e.value;
1081
1092
  case "file":
@@ -1083,46 +1094,47 @@ function Jt(e, t, n, r) {
1083
1094
  return n.staticRead(e.path);
1084
1095
  case "tpl":
1085
1096
  if (!n) throw Error(`tpl('${e.path}'): no TemplateProvider configured. Pass opts.templates to engine.run(...).`);
1086
- return je(n.textRead(e.path), typeof e.vars == "function" ? e.vars() : e.vars);
1097
+ return Ae(n.textRead(e.path), typeof e.vars == "function" ? e.vars() : e.vars);
1087
1098
  case "generate": {
1088
1099
  let n = e.fn();
1089
- if (t.endsWith(".json")) return St(n, r), lt(n, { collapse: !t.endsWith("package.json") });
1090
- if (t.endsWith(".yaml") || t.endsWith(".yml")) return le(n);
1100
+ if (t.endsWith(".json")) return xt(n, r), ct(n, { collapse: !t.endsWith("package.json") });
1101
+ if (t.endsWith(".yaml") || t.endsWith(".yml")) return ce(n);
1091
1102
  if (typeof n != "string") throw Error(`generate() for '${t}' must return a string for non-JSON/YAML files; got ${typeof n}`);
1092
1103
  return n;
1093
1104
  }
1094
1105
  case "binary": throw Error(`binary('${e.path}') cannot be resolved to a string; it is only valid inside seed()/scaffold(), which copy it verbatim via fs.writeBinary.`);
1095
1106
  }
1096
1107
  }
1097
- function Yt(e, t, n, r, i) {
1108
+ function Zt(e, t, n, r, i) {
1098
1109
  if (n.kind === "binary") {
1099
1110
  if (!r) throw Error(`binary('${n.path}'): no TemplateProvider configured. Pass opts.templates to engine.run(...).`);
1100
1111
  e.writeBinary(t, r.staticReadBinary(n.path));
1101
1112
  return;
1102
1113
  }
1103
- e.write(t, Jt(n, t, r, i));
1114
+ e.write(t, Xt(n, t, r, i));
1104
1115
  }
1105
- function Xt(e, t, n, r, i) {
1106
- let a = e.split("/").pop() ?? e;
1116
+ function Qt(e, t, n, r, i, a) {
1117
+ let o = e.split("/").pop() ?? e;
1107
1118
  if (e.endsWith(".json")) {
1108
- let i = rt(t);
1119
+ let i = nt(t);
1109
1120
  if (typeof i != "object" || !i || Array.isArray(i)) throw Error(`managed: parsed value at '${e}' is not a JSON object`);
1110
- return Tt(i, n, { triggerContext: r }), lt(i, { collapse: a !== "package.json" });
1121
+ return Tt(i, n, { triggerContext: r }), ct(i, { collapse: o !== "package.json" });
1111
1122
  }
1112
1123
  if (e.endsWith(".yaml") || e.endsWith(".yml")) {
1113
- let e = Vt(t);
1124
+ let e = Ut(t);
1114
1125
  return Et(e, n, {
1115
1126
  triggerContext: r,
1116
- getLatestVersion: i
1117
- }), Ht(e);
1127
+ getLatestVersion: i,
1128
+ getDerivedDependencyPin: a
1129
+ }), Wt(e);
1118
1130
  }
1119
- if (a === ".gitignore" || a.endsWith(".gitignore")) {
1120
- let e = ht(t);
1121
- return Dt(e, n, { triggerContext: r }), gt(e);
1131
+ if (o === ".gitignore" || o.endsWith(".gitignore")) {
1132
+ let e = mt(t);
1133
+ return Dt(e, n, { triggerContext: r }), ht(e);
1122
1134
  }
1123
1135
  throw Error(`managed('${e}'): unsupported file kind. Only .json, .yaml, .yml, .gitignore are dispatched.`);
1124
1136
  }
1125
- function Zt(e) {
1137
+ function $t(e) {
1126
1138
  let t = e.list(""), n = /* @__PURE__ */ new Set();
1127
1139
  for (let e of t) {
1128
1140
  n.add(e);
@@ -1131,37 +1143,37 @@ function Zt(e) {
1131
1143
  }
1132
1144
  return n;
1133
1145
  }
1134
- function Qt(e, t) {
1146
+ function en(e, t) {
1135
1147
  let n = t === "" ? t : t.endsWith("/") ? t.slice(0, -1) : t;
1136
1148
  return e.has(n);
1137
1149
  }
1138
- function $t(e, t, n) {
1150
+ function tn(e, t, n) {
1139
1151
  return {
1140
1152
  ctx: t,
1141
1153
  version: t.version,
1142
- pathExists: (t) => Qt(e, t),
1143
- pathMissing: (t) => !Qt(e, t),
1154
+ pathExists: (t) => en(e, t),
1155
+ pathMissing: (t) => !en(e, t),
1144
1156
  filesMatch: (t) => {
1145
1157
  let r = n ? `${n}/${t}` : t;
1146
- for (let t of e) if (Be(r, t)) return !0;
1158
+ for (let t of e) if (ze(r, t)) return !0;
1147
1159
  return !1;
1148
1160
  }
1149
1161
  };
1150
1162
  }
1151
- function en(e, t) {
1163
+ function nn(e, t) {
1152
1164
  for (let n of e.triggers) if (!n(t)) return !1;
1153
1165
  return !0;
1154
1166
  }
1155
- function tn(e, t) {
1167
+ function rn(e, t) {
1156
1168
  return t ? "init" : e.updateDepsOnly ? "updateDeps" : "default";
1157
1169
  }
1158
- function nn(e, t) {
1170
+ function an(e, t) {
1159
1171
  return e.filter((e) => e.modes.includes(t));
1160
1172
  }
1161
- function rn(e, t, n, r, i, a) {
1173
+ function on(e, t, n, r, i, a) {
1162
1174
  let o = e.leaf;
1163
1175
  if (o.kind === "fixed") {
1164
- let i = Jt(o.content, e.resolvedPath, r, a);
1176
+ let i = Xt(o.content, e.resolvedPath, r, a);
1165
1177
  return t.exists(e.resolvedPath) ? t.read(e.resolvedPath) === i ? void 0 : (n || t.write(e.resolvedPath, i), {
1166
1178
  scope: e.scope,
1167
1179
  path: e.resolvedPath,
@@ -1174,13 +1186,13 @@ function rn(e, t, n, r, i, a) {
1174
1186
  action: "create"
1175
1187
  });
1176
1188
  }
1177
- if (o.kind === "scaffold") return t.exists(e.resolvedPath) ? void 0 : (n || Yt(t, e.resolvedPath, o.initial, r, a), {
1189
+ if (o.kind === "scaffold") return t.exists(e.resolvedPath) ? void 0 : (n || Zt(t, e.resolvedPath, o.initial, r, a), {
1178
1190
  scope: e.scope,
1179
1191
  path: e.resolvedPath,
1180
1192
  primitive: "scaffold",
1181
1193
  action: "create"
1182
1194
  });
1183
- if (o.kind === "seed") return !i || t.exists(e.resolvedPath) ? void 0 : (n || Yt(t, e.resolvedPath, o.initial, r, a), {
1195
+ if (o.kind === "seed") return !i || t.exists(e.resolvedPath) ? void 0 : (n || Zt(t, e.resolvedPath, o.initial, r, a), {
1184
1196
  scope: e.scope,
1185
1197
  path: e.resolvedPath,
1186
1198
  primitive: "seed",
@@ -1203,58 +1215,58 @@ function rn(e, t, n, r, i, a) {
1203
1215
  });
1204
1216
  }
1205
1217
  }
1206
- function an(e, t, n, r, i, a, o) {
1218
+ function sn(e, t, n, r, i, a, o, s) {
1207
1219
  if (e.leaf.kind !== "managed") return;
1208
- let s = e.leaf, c = e.resolvedPath, ee = t.exists(c), l, te = !1;
1209
- ee ? l = t.read(c) : (l = Jt(s.initial, c, i, o), te = !0);
1210
- let u = Xt(c, l, s.body, r, a);
1211
- if (te) return n || t.write(c, u), {
1220
+ let c = e.leaf, l = e.resolvedPath, ee = t.exists(l), u, d = !1;
1221
+ ee ? u = t.read(l) : (u = Xt(c.initial, l, i, s), d = !0);
1222
+ let f = Qt(l, u, c.body, r, a, o);
1223
+ if (d) return n || t.write(l, f), {
1212
1224
  scope: e.scope,
1213
- path: c,
1225
+ path: l,
1214
1226
  primitive: "managed",
1215
1227
  action: "create"
1216
1228
  };
1217
- if (u !== l) return n || t.write(c, u), {
1229
+ if (f !== u) return n || t.write(l, f), {
1218
1230
  scope: e.scope,
1219
- path: c,
1231
+ path: l,
1220
1232
  primitive: "managed",
1221
1233
  action: "update"
1222
1234
  };
1223
1235
  }
1224
- function on(e, t, n, r, i, a, o) {
1225
- let s = nn(e, tn(n, a)), c = [], ee = Zt(t);
1226
- for (let e of s) {
1227
- if (e.leaf.kind === "managed" || !en(e, $t(ee, n, e.modulePath))) continue;
1228
- let o = rn(e, t, r, i, a, n.isSdkInternal);
1229
- o && c.push(o);
1236
+ function cn(e, t, n, r, i, a, o, s) {
1237
+ let c = an(e, rn(n, a)), l = [], ee = $t(t);
1238
+ for (let e of c) {
1239
+ if (e.leaf.kind === "managed" || !nn(e, tn(ee, n, e.modulePath))) continue;
1240
+ let o = on(e, t, r, i, a, n.isSdkInternal);
1241
+ o && l.push(o);
1230
1242
  }
1231
- let l = Zt(t);
1232
- for (let e of s) {
1243
+ let u = $t(t);
1244
+ for (let e of c) {
1233
1245
  if (e.leaf.kind !== "managed") continue;
1234
- let a = $t(l, n, e.modulePath);
1235
- if (!en(e, a)) continue;
1236
- let s = an(e, t, r, a, i, o, n.isSdkInternal);
1237
- s && c.push(s);
1246
+ let a = tn(u, n, e.modulePath);
1247
+ if (!nn(e, a)) continue;
1248
+ let c = sn(e, t, r, a, i, o, s, n.isSdkInternal);
1249
+ c && l.push(c);
1238
1250
  }
1239
- return c;
1251
+ return l;
1240
1252
  }
1241
- function sn(e, t, n, r = {}) {
1242
- return He(n, () => {
1243
- let i = Fe(e, n), a = !!r.initMode, o = on(i, t, n, n.dryRun, r.templates, a, r.registryLookup);
1253
+ function ln(e, t, n, r = {}) {
1254
+ return Ve(n, () => {
1255
+ let i = Pe(e, n), a = !!r.initMode, o = cn(i, t, n, n.dryRun, r.templates, a, r.registryLookup, r.derivedPinLookup);
1244
1256
  if (!n.dryRun && !n.updateDepsOnly && !a) {
1245
- Kt(t);
1257
+ Jt(t);
1246
1258
  let i = {
1247
1259
  ...r.rediscover ? r.rediscover(t) : n,
1248
1260
  dryRun: !0
1249
- }, a = on(Fe(e, i), t, i, !0, r.templates, !1, r.registryLookup).filter((e) => e.path !== Ut);
1250
- if (a.length > 0) throw new qt(a[0]);
1261
+ }, a = cn(Pe(e, i), t, i, !0, r.templates, !1, r.registryLookup, r.derivedPinLookup).filter((e) => e.path !== Gt);
1262
+ if (a.length > 0) throw new Yt(a[0]);
1251
1263
  }
1252
- return a && !n.dryRun && Kt(t), { changes: o };
1264
+ return a && !n.dryRun && Jt(t), { changes: o };
1253
1265
  });
1254
1266
  }
1255
1267
  //#endregion
1256
1268
  //#region src/structure/engine/discovery.ts
1257
- var cn = [
1269
+ var un = [
1258
1270
  "root",
1259
1271
  "block",
1260
1272
  "model",
@@ -1262,12 +1274,12 @@ var cn = [
1262
1274
  "workflow",
1263
1275
  "test",
1264
1276
  "software"
1265
- ], ln = class extends Error {
1277
+ ], dn = class extends Error {
1266
1278
  constructor(e, t) {
1267
1279
  super(e), this.path = t, this.name = "DiscoveryError";
1268
1280
  }
1269
1281
  };
1270
- function un(e) {
1282
+ function fn(e) {
1271
1283
  let t = /* @__PURE__ */ new Set();
1272
1284
  for (let n of [
1273
1285
  e.dependencies,
@@ -1277,17 +1289,17 @@ function un(e) {
1277
1289
  ]) if (n) for (let e of Object.keys(n)) t.add(e);
1278
1290
  return t;
1279
1291
  }
1280
- function dn(e) {
1292
+ function pn(e) {
1281
1293
  return e === "" || e === ".";
1282
1294
  }
1283
- function fn(e, t) {
1295
+ function mn(e, t) {
1284
1296
  let n = e.pkg["block-scope"];
1285
1297
  if (typeof n == "string") {
1286
- if (!cn.includes(n)) throw new ln(`package.json "block-scope" must be one of ${cn.join(", ")}, got '${n}'`, e.path);
1298
+ if (!un.includes(n)) throw new dn(`package.json "block-scope" must be one of ${un.join(", ")}, got '${n}'`, e.path);
1287
1299
  return n;
1288
1300
  }
1289
- if (dn(e.path)) return "root";
1290
- let r = un(e.pkg);
1301
+ if (pn(e.path)) return "root";
1302
+ let r = fn(e.pkg);
1291
1303
  if (e.pkg["block-software"] !== void 0) return "software";
1292
1304
  if (r.has("@platforma-sdk/package-builder")) {
1293
1305
  for (let e of r) if (/^@platforma-open\/.*runenv/.test(e)) return "software";
@@ -1302,17 +1314,17 @@ function fn(e, t) {
1302
1314
  if (r.has("@platforma-sdk/model") && e.pkg.main) return "model";
1303
1315
  if (r.has("@platforma-sdk/test")) return "test";
1304
1316
  }
1305
- function pn(e) {
1317
+ function hn(e) {
1306
1318
  let t = /* @__PURE__ */ new Set();
1307
1319
  for (let n of e) typeof n.pkg.name == "string" && t.add(n.pkg.name);
1308
1320
  let n = [];
1309
1321
  for (let r of e) {
1310
- let e = fn(r, t);
1311
- if (!e) throw new ln(`Unclassified workspace package at '${r.path}'. Add a top-level "block-scope" string to its package.json.`, r.path);
1322
+ let e = mn(r, t);
1323
+ if (!e) throw new dn(`Unclassified workspace package at '${r.path}'. Add a top-level "block-scope" string to its package.json.`, r.path);
1312
1324
  n.push({
1313
1325
  scope: e,
1314
1326
  name: r.pkg.name ?? r.path,
1315
- path: dn(r.path) ? "" : r.path
1327
+ path: pn(r.path) ? "" : r.path
1316
1328
  });
1317
1329
  }
1318
1330
  return n;
@@ -1322,21 +1334,21 @@ function pn(e) {
1322
1334
  function K(e, t) {
1323
1335
  return e.modules.filter((e) => e.scope === t);
1324
1336
  }
1325
- function mn(e, t) {
1337
+ function gn(e, t) {
1326
1338
  let n = K(e, t);
1327
1339
  if (n.length === 0) throw Error(`findModule: expected one '${t}' module, found none`);
1328
1340
  if (n.length > 1) throw Error(`findModule: expected exactly one '${t}' module, found ${n.length}`);
1329
1341
  return n[0];
1330
1342
  }
1331
1343
  function q(e, t) {
1332
- return { [mn(e, t).name]: "workspace:*" };
1344
+ return { [gn(e, t).name]: "workspace:*" };
1333
1345
  }
1334
- function hn(e, t) {
1346
+ function _n(e, t) {
1335
1347
  let n = {};
1336
1348
  for (let r of K(e, t)) n[r.name] = "workspace:*";
1337
1349
  return n;
1338
1350
  }
1339
- function gn(e) {
1351
+ function vn(e) {
1340
1352
  let t = e.facadeName, n = [
1341
1353
  {
1342
1354
  scope: "root",
@@ -1375,7 +1387,7 @@ function gn(e) {
1375
1387
  path: "software"
1376
1388
  }), n;
1377
1389
  }
1378
- function _n(e) {
1390
+ function yn(e) {
1379
1391
  return {
1380
1392
  isSdkInternal: e.isSdkInternal ?? !1,
1381
1393
  updateDepsOnly: e.updateDepsOnly ?? !1,
@@ -1392,36 +1404,36 @@ var J = class extends Error {
1392
1404
  super(e), this.name = "StructureCliError";
1393
1405
  }
1394
1406
  };
1395
- function vn(e, t) {
1407
+ function bn(e, t) {
1396
1408
  return e === "" ? t : `${e}/${t}`;
1397
1409
  }
1398
- function yn(e, t) {
1410
+ function xn(e, t) {
1399
1411
  try {
1400
1412
  return JSON.parse(e.read(t));
1401
1413
  } catch {
1402
1414
  return;
1403
1415
  }
1404
1416
  }
1405
- function bn(e) {
1417
+ function Sn(e) {
1406
1418
  if (e.includes("*")) throw new J(`pnpm-workspace.yaml 'packages:' entry '${e}' contains a glob. The structurer requires literal package paths — replace the glob with one entry per package directory.`);
1407
1419
  let t = e.replace(/^\.\//, "").replace(/\/$/, "");
1408
1420
  return t === "." ? "" : t;
1409
1421
  }
1410
- function xn(e) {
1422
+ function Cn(e) {
1411
1423
  let t;
1412
1424
  try {
1413
1425
  t = e.read("pnpm-workspace.yaml");
1414
1426
  } catch {
1415
1427
  throw new J("No pnpm-workspace.yaml found. This directory is empty or unrecognisable as a block — run 'block-tools structure init' instead, or pass --sdk-internal for an in-monorepo block.");
1416
1428
  }
1417
- let n = se(t) ?? {}, r = Array.isArray(n.packages) ? n.packages : [], i = new Set([""]);
1429
+ let n = oe(t) ?? {}, r = Array.isArray(n.packages) ? n.packages : [], i = new Set([""]);
1418
1430
  for (let t of r) {
1419
- let n = bn(t);
1431
+ let n = Sn(t);
1420
1432
  (n === "" || e.exists(n)) && i.add(n);
1421
1433
  }
1422
1434
  let a = [];
1423
1435
  for (let t of i) {
1424
- let n = yn(e, vn(t, "package.json"));
1436
+ let n = xn(e, bn(t, "package.json"));
1425
1437
  n && a.push({
1426
1438
  path: t,
1427
1439
  pkg: n
@@ -1429,7 +1441,7 @@ function xn(e) {
1429
1441
  }
1430
1442
  return a;
1431
1443
  }
1432
- function Sn(e) {
1444
+ function wn(e) {
1433
1445
  let t = [], n = new Set([
1434
1446
  "node_modules",
1435
1447
  ".turbo",
@@ -1441,7 +1453,7 @@ function Sn(e) {
1441
1453
  let o = e.listDir(i);
1442
1454
  for (let s of o) {
1443
1455
  if (!s.isDirectory || n.has(s.name)) continue;
1444
- let o = vn(i, s.name), c = yn(e, vn(o, "package.json"));
1456
+ let o = bn(i, s.name), c = xn(e, bn(o, "package.json"));
1445
1457
  c && t.push({
1446
1458
  path: o,
1447
1459
  pkg: c
@@ -1450,7 +1462,7 @@ function Sn(e) {
1450
1462
  }
1451
1463
  return r("", 1), t;
1452
1464
  }
1453
- function Cn(e) {
1465
+ function Tn(e) {
1454
1466
  let t = e.indexOf("/");
1455
1467
  if (!e.startsWith("@") || t < 0) throw new J(`Cannot parse block name '${e}': expected '@npm-org/org-scope.short-name'.`);
1456
1468
  let n = e.slice(0, t), r = e.slice(t + 1), i = r.indexOf(".");
@@ -1463,23 +1475,23 @@ function Cn(e) {
1463
1475
  shortName: r.slice(i + 1)
1464
1476
  };
1465
1477
  }
1466
- function wn(e) {
1478
+ function En(e) {
1467
1479
  try {
1468
- let t = JSON.parse(e.read(Ut));
1480
+ let t = JSON.parse(e.read(Gt));
1469
1481
  return typeof t.version == "number" ? t.version : 0;
1470
1482
  } catch {
1471
1483
  return 0;
1472
1484
  }
1473
1485
  }
1474
- function Tn(e) {
1475
- let { fs: t, isSdkInternal: n } = e, r = n ? Sn(t) : xn(t);
1486
+ function Dn(e) {
1487
+ let { fs: t, isSdkInternal: n } = e, r = n ? wn(t) : Cn(t);
1476
1488
  if (r.length === 0) throw new J("No workspace packages found. Run 'block-tools structure init' to scaffold a block.");
1477
- let i = pn(r), a = wn(t);
1478
- Wt(a, 0);
1489
+ let i = hn(r), a = En(t);
1490
+ Kt(a, 0);
1479
1491
  let o = i.find((e) => e.scope === "block") ?? i.find((e) => e.scope === "root");
1480
1492
  if (!o) throw new J("Could not find a 'block' (or root-as-block) package to derive BlockVars from.");
1481
- let s = Cn(o.name);
1482
- return _n({
1493
+ let s = Tn(o.name);
1494
+ return yn({
1483
1495
  isSdkInternal: n,
1484
1496
  updateDepsOnly: e.updateDepsOnly ?? !1,
1485
1497
  modules: i,
@@ -1514,7 +1526,7 @@ var Y = [
1514
1526
  ];
1515
1527
  //#endregion
1516
1528
  //#region src/structure/rules/root-package-json.ts
1517
- function En(e) {
1529
+ function On(e) {
1518
1530
  return {
1519
1531
  version: "1.0.0",
1520
1532
  private: !0,
@@ -1531,7 +1543,7 @@ function En(e) {
1531
1543
  changeset: "changeset",
1532
1544
  "version-packages": "changeset version",
1533
1545
  "update-sdk": "block-tools structure refresh --update-deps-only",
1534
- update: "block-tools structure refresh --update-deps-only && pnpm i && block-tools structure refresh && pnpm fmt"
1546
+ update: "block-tools structure refresh --update-deps-only && pnpm i && block-tools structure refresh && pnpm i && pnpm fmt"
1535
1547
  },
1536
1548
  peerDependencies: {
1537
1549
  oxlint: "*",
@@ -1547,8 +1559,8 @@ function En(e) {
1547
1559
  packageManager: "pnpm@9.12.0"
1548
1560
  };
1549
1561
  }
1550
- function Dn() {
1551
- F("packageManager", "pnpm@9.12.0"), Ot("name"), I("fmt", "turbo run fmt"), I("check", "turbo run check"), I("build", "turbo run build"), I("build:dev", "env PL_PKG_DEV=local turbo run build"), I("test", "env PL_PKG_DEV=local turbo run test --concurrency 1"), I("test:dry-run", "env PL_PKG_DEV=local turbo run test --dry-run=json"), I("mark-stable", "turbo run mark-stable"), I("do-pack", "turbo run do-pack"), I("watch", "turbo watch build"), I("changeset", "changeset"), I("version-packages", "changeset version"), I("update-sdk", "block-tools structure refresh --update-deps-only"), I("update", "block-tools structure refresh --update-deps-only && pnpm i && block-tools structure refresh && pnpm fmt"), V({
1562
+ function kn() {
1563
+ F("packageManager", "pnpm@9.12.0"), Ot("name"), I("fmt", "turbo run fmt"), I("check", "turbo run check"), I("build", "turbo run build"), I("build:dev", "env PL_PKG_DEV=local turbo run build"), I("test", "env PL_PKG_DEV=local turbo run test --concurrency 1"), I("test:dry-run", "env PL_PKG_DEV=local turbo run test --dry-run=json"), I("mark-stable", "turbo run mark-stable"), I("do-pack", "turbo run do-pack"), I("watch", "turbo watch build"), I("changeset", "changeset"), I("version-packages", "changeset version"), I("update-sdk", "block-tools structure refresh --update-deps-only"), I("update", "block-tools structure refresh --update-deps-only && pnpm i && block-tools structure refresh && pnpm i && pnpm fmt"), V({
1552
1564
  "@changesets/cli": "catalog:",
1553
1565
  "@milaboratories/ts-builder": "sdk:",
1554
1566
  "@platforma-sdk/block-tools": "sdk:",
@@ -1565,54 +1577,73 @@ function Dn() {
1565
1577
  }
1566
1578
  //#endregion
1567
1579
  //#region src/structure/engine/registry-client.ts
1568
- var On = 2, kn = 500, An = 3e4;
1569
- function jn(e) {
1580
+ var An = 2, jn = 500, Mn = 3e4;
1581
+ function Nn(e) {
1570
1582
  if (!e) return null;
1571
1583
  let t = Number(e);
1572
1584
  if (Number.isFinite(t) && t > 0) return t * 1e3;
1573
1585
  let n = Date.parse(e);
1574
1586
  return Number.isNaN(n) ? null : Math.max(0, n - Date.now());
1575
1587
  }
1576
- async function Mn(e) {
1588
+ async function Pn(e) {
1577
1589
  for (let t = 1;; t++) {
1578
1590
  let n;
1579
1591
  try {
1580
- n = await fetch(e, { signal: AbortSignal.timeout(An) });
1592
+ n = await fetch(e, { signal: AbortSignal.timeout(Mn) });
1581
1593
  } catch (e) {
1582
- if (t > On) throw e;
1583
- await ue(kn * 2 ** (t - 1) * (.8 + .4 * Math.random()));
1594
+ if (t > An) throw e;
1595
+ await le(jn * 2 ** (t - 1) * (.8 + .4 * Math.random()));
1584
1596
  continue;
1585
1597
  }
1586
1598
  if (n.ok) return n;
1587
- if (!(n.status === 429 || n.status >= 500) || t > On) throw Error(`registry returned HTTP ${n.status}`);
1588
- let r = jn(n.headers.get("retry-after"));
1599
+ if (!(n.status === 429 || n.status >= 500) || t > An) throw Error(`registry returned HTTP ${n.status}`);
1600
+ let r = Nn(n.headers.get("retry-after"));
1589
1601
  if (r != null) {
1590
- await ue(r);
1602
+ await le(r);
1591
1603
  continue;
1592
1604
  }
1593
- await ue(kn * 2 ** (t - 1) * (.8 + .4 * Math.random()));
1605
+ await le(jn * 2 ** (t - 1) * (.8 + .4 * Math.random()));
1594
1606
  }
1595
1607
  }
1596
- function Nn() {
1597
- return { async getLatestVersion(e) {
1598
- let t = (await (await Mn(`https://registry.npmjs.org/-/package/${e}/dist-tags`)).json()).latest;
1599
- if (!t) throw Error("no 'latest' dist-tag in registry response");
1600
- return t;
1601
- } };
1608
+ function Fn() {
1609
+ return {
1610
+ async getLatestVersion(e) {
1611
+ let t = (await (await Pn(`https://registry.npmjs.org/-/package/${e}/dist-tags`)).json()).latest;
1612
+ if (!t) throw Error("no 'latest' dist-tag in registry response");
1613
+ return t;
1614
+ },
1615
+ async getDeclaredDependency(e, t, n) {
1616
+ let r = await (await Pn(`https://registry.npmjs.org/${e}/${t}`)).json();
1617
+ return r.dependencies?.[n] ?? r.peerDependencies?.[n];
1618
+ }
1619
+ };
1602
1620
  }
1603
- async function Pn(e, t) {
1621
+ async function In(e, t) {
1604
1622
  let n = await Promise.all(t.map(async (t) => [t, await e.getLatestVersion(t)]));
1605
1623
  return new Map(n);
1606
1624
  }
1607
- function Fn(e) {
1625
+ function Ln(e) {
1608
1626
  return (t) => e.get(t);
1609
1627
  }
1610
- var In = [/^@platforma-sdk\//, /^@milaboratories\//];
1611
- function Ln(e) {
1612
- return In.some((t) => t.test(e));
1628
+ var Rn = [/^@platforma-sdk\//, /^@milaboratories\//];
1629
+ function zn(e) {
1630
+ return Rn.some((t) => t.test(e));
1631
+ }
1632
+ async function Bn(e, t = Fn()) {
1633
+ return e.length === 0 ? () => void 0 : Ln(await In(t, e));
1634
+ }
1635
+ function Vn(e) {
1636
+ return /^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/.test(e);
1613
1637
  }
1614
- async function Rn(e, t = Nn()) {
1615
- return e.length === 0 ? () => void 0 : Fn(await Pn(t, e));
1638
+ async function Hn(e, t = Fn()) {
1639
+ if (e.length === 0) return () => void 0;
1640
+ let n = await Promise.all(e.map(async (e) => {
1641
+ let n = await t.getDeclaredDependency(e.of, e.ofVersion ?? "latest", e.entry);
1642
+ if (n === void 0) throw Error(`derived catalog pin '${e.entry}': package '${e.of}'${e.ofVersion ? `@${e.ofVersion}` : " (latest)"} declares no dependency '${e.entry}'. A derived pin requires the source to declare the dep as an exact version.`);
1643
+ if (!Vn(n)) throw Error(`derived catalog pin '${e.entry}': package '${e.of}'${e.ofVersion ? `@${e.ofVersion}` : " (latest)"} declares '${e.entry}: ${n}', which is not an exact version. A derived pin requires an exact ('x.y.z') source dependency so the catalog can pin to it precisely.`);
1644
+ return [e.entry, n];
1645
+ })), r = new Map(n);
1646
+ return (e) => r.get(e);
1616
1647
  }
1617
1648
  //#endregion
1618
1649
  //#region src/structure/rules/root-pnpm-workspace.ts
@@ -1626,29 +1657,31 @@ var X = [
1626
1657
  "@platforma-sdk/package-builder",
1627
1658
  "@milaboratories/ts-builder",
1628
1659
  "@milaboratories/ts-configs"
1629
- ], zn = "0.0.0-init-must-fetch";
1630
- for (let e of X) if (!Ln(e)) throw Error(`SDK_CATALOG_PACKAGES entry '${e}' matches no catalog bump pattern; its placeholder would never be resolved to npm latest on init. Add it to CATALOG_BUMP_PATTERNS or move it to the infra floor.`);
1631
- var Bn = {
1660
+ ], Un = "0.0.0-init-must-fetch";
1661
+ for (let e of X) if (!zn(e)) throw Error(`SDK_CATALOG_PACKAGES entry '${e}' matches no catalog bump pattern; its placeholder would never be resolved to npm latest on init. Add it to CATALOG_BUMP_PATTERNS or move it to the infra floor.`);
1662
+ var Wn = {
1632
1663
  turbo: "~2.8.11",
1633
1664
  shx: "~0.4.0",
1634
1665
  "@changesets/cli": "~2.29.8",
1635
- vitest: "~4.0.18",
1636
- vue: "3.5.24"
1637
- }, Vn = "@platforma-open/milaboratories.runenv-python-3", Hn = "1.8.2";
1638
- function Un(e) {
1666
+ vitest: "~4.0.18"
1667
+ }, Gn = [{
1668
+ entry: "vue",
1669
+ of: "@platforma-sdk/ui-vue"
1670
+ }], Kn = "@platforma-open/milaboratories.runenv-python-3", qn = "1.8.2";
1671
+ function Jn(e) {
1639
1672
  let t = e.modules.filter((e) => e.path !== "").map((e) => e.path).sort(), n = {};
1640
- for (let e of X) n[e] = zn;
1641
- return Object.assign(n, Bn), e.modules.some((e) => e.scope === "software") && (n[Vn] = Hn), {
1673
+ for (let e of X) n[e] = Un;
1674
+ return Object.assign(n, Wn), e.modules.some((e) => e.scope === "software") && (n[Kn] = qn), {
1642
1675
  packages: t,
1643
1676
  catalog: n
1644
1677
  };
1645
1678
  }
1646
- function Wn() {
1647
- It();
1679
+ function Yn() {
1680
+ It(), Vt("vite"), Vt("tsup"), Vt("vue-tsc");
1648
1681
  }
1649
1682
  //#endregion
1650
1683
  //#region src/structure/rules/root-gitignore.ts
1651
- var Gn = [
1684
+ var Xn = [
1652
1685
  ".test_auth.json",
1653
1686
  "node_modules/",
1654
1687
  "dist/",
@@ -1663,34 +1696,34 @@ var Gn = [
1663
1696
  ".vscode/sftp.json",
1664
1697
  "test-dry-run.json"
1665
1698
  ];
1666
- function Kn() {
1667
- Bt(Gn);
1699
+ function Zn() {
1700
+ Ht(Xn);
1668
1701
  }
1669
1702
  //#endregion
1670
1703
  //#region src/structure/rules/root.ts
1671
- function qn() {
1672
- y("root", () => {
1673
- b(({ ctx: e }) => !e.isSdkInternal, () => {
1674
- S("turbo.json", E("root/turbo.json")), S(".vscode/settings.json", E("root/.vscode/settings.json")), C("package.json", D(() => En(v())), () => {
1675
- Dn();
1676
- }), C("pnpm-workspace.yaml", D(() => Un(v())), () => {
1677
- Wn();
1678
- }), C(".gitignore", E("root/.gitignore"), () => {
1679
- Kn();
1704
+ function Qn() {
1705
+ b("root", () => {
1706
+ x(({ ctx: e }) => !e.isSdkInternal, () => {
1707
+ C("turbo.json", D("root/turbo.json")), C(".vscode/settings.json", D("root/.vscode/settings.json")), w("package.json", O(() => On(y())), () => {
1708
+ kn();
1709
+ }), w("pnpm-workspace.yaml", O(() => Jn(y())), () => {
1710
+ Yn();
1711
+ }), w(".gitignore", D("root/.gitignore"), () => {
1712
+ Zn();
1680
1713
  });
1681
1714
  });
1682
1715
  });
1683
1716
  }
1684
1717
  //#endregion
1685
1718
  //#region src/structure/rules/block-package-json.ts
1686
- function Jn(e) {
1719
+ function $n(e) {
1687
1720
  let t = {};
1688
1721
  for (let n of K(e, "workflow")) t.workflow = `${n.name}/dist/tengo/tpl/main.plj.gz`;
1689
1722
  for (let n of K(e, "model")) t.model = `${n.name}/dist/model.json`;
1690
1723
  for (let n of K(e, "ui")) t.ui = `${n.name}/dist`;
1691
1724
  return t;
1692
1725
  }
1693
- function Yn(e) {
1726
+ function er(e) {
1694
1727
  if (Object.keys(e.components).length === 0) throw Error("block.components is empty — no workflow/model/ui module was discovered");
1695
1728
  let t = e.meta, n = [
1696
1729
  ["block.meta.title", t.title],
@@ -1702,13 +1735,13 @@ function Yn(e) {
1702
1735
  ];
1703
1736
  for (let [e, t] of n) if (typeof t != "string" || t === "") throw Error(`required block field '${e}' is empty`);
1704
1737
  }
1705
- function Xn(e) {
1738
+ function tr(e) {
1706
1739
  let t = e.blockVars, n = {
1707
1740
  ...q(e, "model"),
1708
1741
  ...q(e, "ui"),
1709
1742
  ...q(e, "workflow")
1710
1743
  }, r = {
1711
- components: Jn(e),
1744
+ components: $n(e),
1712
1745
  meta: {
1713
1746
  title: t.shortName,
1714
1747
  description: `${t.shortName} block`,
@@ -1720,7 +1753,7 @@ function Xn(e) {
1720
1753
  }
1721
1754
  }
1722
1755
  };
1723
- return Yn(r), {
1756
+ return er(r), {
1724
1757
  name: `${t.facadeName}.block`,
1725
1758
  version: "1.0.0",
1726
1759
  files: ["index.d.ts", "index.js"],
@@ -1738,15 +1771,15 @@ function Xn(e) {
1738
1771
  block: r
1739
1772
  };
1740
1773
  }
1741
- function Zn() {
1742
- F("files", ["index.d.ts", "index.js"]), I("build", "shx rm -rf ./block-pack && block-tools pack"), I("mark-stable", "block-tools mark-stable -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'"), I("prepublishOnly", "block-tools pack && block-tools publish -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'"), I("do-pack", "shx rm -f *.tgz && block-tools pack && pnpm pack && shx mv *.tgz package.tgz"), U("model"), U("ui"), U("workflow"), z("@platforma-sdk/block-tools", "sdk:"), z("shx", "catalog:"), F("block.components", Jn(v())), G("dependencies"), G("devDependencies"), G("peerDependencies"), G("optionalDependencies"), W([...Y]);
1774
+ function nr() {
1775
+ F("files", ["index.d.ts", "index.js"]), I("build", "shx rm -rf ./block-pack && block-tools pack"), I("mark-stable", "block-tools mark-stable -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'"), I("prepublishOnly", "block-tools pack && block-tools publish -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'"), I("do-pack", "shx rm -f *.tgz && block-tools pack && pnpm pack && shx mv *.tgz package.tgz"), U("model"), U("ui"), U("workflow"), z("@platforma-sdk/block-tools", "sdk:"), z("shx", "catalog:"), F("block.components", $n(y())), G("dependencies"), G("devDependencies"), G("peerDependencies"), G("optionalDependencies"), W([...Y]);
1743
1776
  }
1744
1777
  //#endregion
1745
1778
  //#region src/structure/rules/block.ts
1746
- function Qn() {
1747
- y("block", () => {
1748
- S("index.js", E("block/index.js")), S("index.d.ts", E("block/index.d.ts")), w("logos/block-logo.png", $e("block/logos/block-logo.png")), w("logos/organization-logo.png", $e("block/logos/organization-logo.png")), C("package.json", D(() => Xn(v())), () => {
1749
- Zn();
1779
+ function rr() {
1780
+ b("block", () => {
1781
+ C("index.js", D("block/index.js")), C("index.d.ts", D("block/index.d.ts")), T("logos/block-logo.png", Qe("block/logos/block-logo.png")), T("logos/organization-logo.png", Qe("block/logos/organization-logo.png")), w("package.json", O(() => tr(y())), () => {
1782
+ nr();
1750
1783
  });
1751
1784
  });
1752
1785
  }
@@ -1755,7 +1788,7 @@ function Qn() {
1755
1788
  var Z = "src/**/*.test.ts";
1756
1789
  //#endregion
1757
1790
  //#region src/structure/rules/model-package-json.ts
1758
- function $n(e) {
1791
+ function ir(e) {
1759
1792
  return {
1760
1793
  name: `${e.blockVars.facadeName}.model`,
1761
1794
  version: "1.0.0",
@@ -1781,8 +1814,7 @@ function $n(e) {
1781
1814
  devDependencies: {
1782
1815
  "@milaboratories/ts-builder": "sdk:",
1783
1816
  "@milaboratories/ts-configs": "sdk:",
1784
- "@platforma-sdk/block-tools": "sdk:",
1785
- vitest: "catalog:"
1817
+ "@platforma-sdk/block-tools": "sdk:"
1786
1818
  },
1787
1819
  peerDependencies: {
1788
1820
  "@types/node": "*",
@@ -1790,7 +1822,7 @@ function $n(e) {
1790
1822
  }
1791
1823
  };
1792
1824
  }
1793
- function er() {
1825
+ function ar() {
1794
1826
  F("type", "module"), F("main", "dist/index.cjs"), F("module", "dist/index.js"), F("types", "dist/index.d.ts"), F("exports", {
1795
1827
  ".": {
1796
1828
  types: "./dist/index.d.ts",
@@ -1801,27 +1833,26 @@ function er() {
1801
1833
  }), I("fmt", "ts-builder format"), I("watch", "ts-builder build --target block-model --watch"), I("build", "ts-builder build --target block-model && block-tools build-model"), I("check", "ts-builder check --target block-model"), R("@platforma-sdk/model", "sdk:"), V({
1802
1834
  "@milaboratories/ts-builder": "sdk:",
1803
1835
  "@milaboratories/ts-configs": "sdk:",
1804
- "@platforma-sdk/block-tools": "sdk:",
1805
- vitest: "catalog:"
1836
+ "@platforma-sdk/block-tools": "sdk:"
1806
1837
  }), H({
1807
1838
  "@types/node": "*",
1808
1839
  typescript: "*"
1809
- }), b(x(Z), () => {
1810
- I("test", "vitest run --passWithNoTests"), z("@types/node", "*");
1811
- }), G("dependencies"), G("devDependencies"), G("peerDependencies"), G("optionalDependencies"), W([...Y]);
1840
+ }), x(({ ctx: e }) => !e.isSdkInternal, () => x(S(Z), () => {
1841
+ I("test", "vitest run --passWithNoTests"), z("vitest", "catalog:"), z("@types/node", "*");
1842
+ }, () => B("vitest"))), B("tsup"), B("vite"), Ot("tsup"), G("dependencies"), G("devDependencies"), G("peerDependencies"), G("optionalDependencies"), W([...Y]);
1812
1843
  }
1813
1844
  //#endregion
1814
1845
  //#region src/structure/rules/model.ts
1815
- function tr() {
1816
- y("model", () => {
1817
- b(x(Z), () => S("tsconfig.json", E("model/tsconfig.node.json")), () => S("tsconfig.json", E("model/tsconfig.json"))), S(".oxlintrc.json", E("model/.oxlintrc.json")), S(".oxfmtrc.json", E("model/.oxfmtrc.json")), w("src/index.ts", E("model/src/index.ts")), C("package.json", D(() => $n(v())), () => {
1818
- er();
1846
+ function or() {
1847
+ b("model", () => {
1848
+ x(S(Z), () => C("tsconfig.json", D("model/tsconfig.node.json")), () => C("tsconfig.json", D("model/tsconfig.json"))), C(".oxlintrc.json", D("model/.oxlintrc.json")), C(".oxfmtrc.json", D("model/.oxfmtrc.json")), T("src/index.ts", D("model/src/index.ts")), w("package.json", O(() => ir(y())), () => {
1849
+ ar();
1819
1850
  });
1820
1851
  });
1821
1852
  }
1822
1853
  //#endregion
1823
1854
  //#region src/structure/rules/ui-package-json.ts
1824
- function nr(e) {
1855
+ function sr(e) {
1825
1856
  return {
1826
1857
  name: `${e.blockVars.facadeName}.ui`,
1827
1858
  version: "1.0.0",
@@ -1840,33 +1871,31 @@ function nr(e) {
1840
1871
  },
1841
1872
  devDependencies: {
1842
1873
  "@milaboratories/ts-builder": "sdk:",
1843
- "@milaboratories/ts-configs": "sdk:",
1844
- vitest: "catalog:"
1874
+ "@milaboratories/ts-configs": "sdk:"
1845
1875
  },
1846
1876
  peerDependencies: { typescript: "*" }
1847
1877
  };
1848
1878
  }
1849
- function rr() {
1879
+ function cr() {
1850
1880
  F("type", "module"), I("fmt", "ts-builder format"), I("dev", "ts-builder serve --target block-ui"), I("watch", "ts-builder build --target block-ui --watch"), I("build", "ts-builder build --target block-ui"), I("check", "ts-builder check --target block-ui"), R("@platforma-sdk/ui-vue", "sdk:"), R("vue", "catalog:"), U("model"), V({
1851
1881
  "@milaboratories/ts-builder": "sdk:",
1852
- "@milaboratories/ts-configs": "sdk:",
1853
- vitest: "catalog:"
1854
- }), B("vue-tsc"), H({ typescript: "*" }), B("@types/node"), b(x(Z), () => {
1855
- I("test", "vitest run --passWithNoTests"), z("@types/node", "*");
1856
- }), G("dependencies"), G("devDependencies"), G("peerDependencies"), G("optionalDependencies"), W([...Y]);
1882
+ "@milaboratories/ts-configs": "sdk:"
1883
+ }), B("vue-tsc"), B("vite"), kt("preview"), H({ typescript: "*" }), B("@types/node"), x(({ ctx: e }) => !e.isSdkInternal, () => x(S(Z), () => {
1884
+ I("test", "vitest run --passWithNoTests"), z("vitest", "catalog:"), z("@types/node", "*");
1885
+ }, () => B("vitest"))), G("dependencies"), G("devDependencies"), G("peerDependencies"), G("optionalDependencies"), W([...Y]);
1857
1886
  }
1858
1887
  //#endregion
1859
1888
  //#region src/structure/rules/ui.ts
1860
- function ir() {
1861
- y("ui", () => {
1862
- b(x(Z), () => S("tsconfig.json", E("ui/tsconfig.node.json")), () => S("tsconfig.json", E("ui/tsconfig.json"))), S(".oxlintrc.json", E("ui/.oxlintrc.json")), S(".oxfmtrc.json", E("ui/.oxfmtrc.json")), Qe("index.html", E("ui/index.html")), w("src/main.ts", E("ui/src/main.ts")), w("src/app.ts", tt("ui/src/app.tpl.ts", () => ({ modelPkg: `${nt().facadeName}.model` }))), w("src/MainPage.vue", tt("ui/src/MainPage.tpl.vue", () => ({ shortName: nt().shortName }))), C("package.json", D(() => nr(v())), () => {
1863
- rr();
1889
+ function lr() {
1890
+ b("ui", () => {
1891
+ x(S(Z), () => C("tsconfig.json", D("ui/tsconfig.node.json")), () => C("tsconfig.json", D("ui/tsconfig.json"))), C(".oxlintrc.json", D("ui/.oxlintrc.json")), C(".oxfmtrc.json", D("ui/.oxfmtrc.json")), Ze("index.html", D("ui/index.html")), T("src/main.ts", D("ui/src/main.ts")), T("src/app.ts", et("ui/src/app.tpl.ts", () => ({ modelPkg: `${tt().facadeName}.model` }))), T("src/MainPage.vue", et("ui/src/MainPage.tpl.vue", () => ({ shortName: tt().shortName }))), w("package.json", O(() => sr(y())), () => {
1892
+ cr();
1864
1893
  });
1865
1894
  });
1866
1895
  }
1867
1896
  //#endregion
1868
1897
  //#region src/structure/rules/workflow-package-json.ts
1869
- function ar(e) {
1898
+ function ur(e) {
1870
1899
  return {
1871
1900
  name: `${e.blockVars.facadeName}.workflow`,
1872
1901
  version: "1.0.0",
@@ -1878,38 +1907,36 @@ function ar(e) {
1878
1907
  },
1879
1908
  dependencies: {
1880
1909
  "@platforma-sdk/workflow-tengo": "sdk:",
1881
- ...hn(e, "software")
1910
+ ..._n(e, "software")
1882
1911
  },
1883
1912
  devDependencies: {
1884
1913
  "@platforma-sdk/tengo-builder": "sdk:",
1885
1914
  "@platforma-sdk/test": "sdk:",
1886
- vitest: "catalog:",
1887
1915
  shx: "catalog:"
1888
1916
  }
1889
1917
  };
1890
1918
  }
1891
- function or() {
1892
- F("type", "module"), I("build", "shx rm -rf dist && pl-tengo build"), I("check", "pl-tengo check"), I("format", "/usr/bin/env emacs --script ./format.el || echo 'No emacs.'"), b(x(Z), () => {
1893
- I("test", "vitest run --passWithNoTests");
1894
- }), R("@platforma-sdk/workflow-tengo", "sdk:"), U("software"), V({
1919
+ function dr() {
1920
+ F("type", "module"), I("build", "shx rm -rf dist && pl-tengo build"), I("check", "pl-tengo check"), I("format", "/usr/bin/env emacs --script ./format.el || echo 'No emacs.'"), x(({ ctx: e }) => !e.isSdkInternal, () => x(S(Z), () => {
1921
+ I("test", "vitest run --passWithNoTests"), V({ vitest: "catalog:" });
1922
+ }, () => B("vitest"))), R("@platforma-sdk/workflow-tengo", "sdk:"), U("software"), V({
1895
1923
  "@platforma-sdk/tengo-builder": "sdk:",
1896
1924
  "@platforma-sdk/test": "sdk:",
1897
- vitest: "catalog:",
1898
1925
  shx: "catalog:"
1899
1926
  }), G("dependencies"), G("devDependencies"), G("peerDependencies"), G("optionalDependencies"), W([...Y]);
1900
1927
  }
1901
1928
  //#endregion
1902
1929
  //#region src/structure/rules/workflow.ts
1903
- function sr() {
1904
- y("workflow", () => {
1905
- S("tsconfig.json", E("workflow/tsconfig.json")), S("format.el", E("workflow/format.el")), Qe("vitest.config.mts", E("workflow/vitest.config.mts")), T("index.js"), T("index.d.ts"), w("src/main.tpl.tengo", tt("workflow/src/main.tpl.tengo", () => ({ shortName: nt().shortName }))), C("package.json", D(() => ar(v())), () => {
1906
- or();
1930
+ function fr() {
1931
+ b("workflow", () => {
1932
+ C("tsconfig.json", D("workflow/tsconfig.json")), C("format.el", D("workflow/format.el")), x(({ ctx: e }) => !e.isSdkInternal, () => x(S(Z), () => Ze("vitest.config.mts", D("workflow/vitest.config.mts")), () => E("vitest.config.mts"))), E("index.js"), E("index.d.ts"), T("src/main.tpl.tengo", et("workflow/src/main.tpl.tengo", () => ({ shortName: tt().shortName }))), w("package.json", O(() => ur(y())), () => {
1933
+ dr();
1907
1934
  });
1908
1935
  });
1909
1936
  }
1910
1937
  //#endregion
1911
1938
  //#region src/structure/rules/test-package-json.ts
1912
- function cr(e) {
1939
+ function pr(e) {
1913
1940
  return {
1914
1941
  name: `${e.blockVars.facadeName}.test`,
1915
1942
  version: "1.0.0",
@@ -1928,7 +1955,7 @@ function cr(e) {
1928
1955
  }
1929
1956
  };
1930
1957
  }
1931
- function lr() {
1958
+ function mr() {
1932
1959
  F("type", "module"), I("check", "ts-builder type-check --target block-test"), I("test", "vitest run --passWithNoTests"), V({
1933
1960
  "@platforma-sdk/test": "sdk:",
1934
1961
  "@milaboratories/ts-builder": "sdk:",
@@ -1938,16 +1965,16 @@ function lr() {
1938
1965
  }
1939
1966
  //#endregion
1940
1967
  //#region src/structure/rules/test.ts
1941
- function ur() {
1942
- y("test", () => {
1943
- S("tsconfig.json", E("test/tsconfig.json")), Qe("vitest.config.mts", E("test/vitest.config.mts")), w("src/demo.test.ts", et("import { expect, test } from \"vitest\";\n\ntest(\"scaffolded block sanity check\", () => {\n expect(true).toBe(true);\n});\n")), C("package.json", D(() => cr(v())), () => {
1944
- lr();
1968
+ function hr() {
1969
+ b("test", () => {
1970
+ C("tsconfig.json", D("test/tsconfig.json")), Ze("vitest.config.mts", D("test/vitest.config.mts")), T("src/demo.test.ts", $e("import { expect, test } from \"vitest\";\n\ntest(\"scaffolded block sanity check\", () => {\n expect(true).toBe(true);\n});\n")), w("package.json", O(() => pr(y())), () => {
1971
+ mr();
1945
1972
  });
1946
1973
  });
1947
1974
  }
1948
1975
  //#endregion
1949
1976
  //#region src/structure/rules/software-package-json.ts
1950
- function dr() {
1977
+ function gr() {
1951
1978
  return { entrypoints: { main: { binary: {
1952
1979
  artifact: {
1953
1980
  type: "python",
@@ -1962,7 +1989,7 @@ function dr() {
1962
1989
  cmd: ["python", "{pkg}/main.py"]
1963
1990
  } } } };
1964
1991
  }
1965
- function fr(e) {
1992
+ function _r(e) {
1966
1993
  return {
1967
1994
  name: `${e.blockVars.facadeName}.software`,
1968
1995
  version: "1.0.0",
@@ -1975,14 +2002,14 @@ function fr(e) {
1975
2002
  changeset: "changeset",
1976
2003
  "version-packages": "changeset version"
1977
2004
  },
1978
- "block-software": dr(),
2005
+ "block-software": gr(),
1979
2006
  devDependencies: {
1980
2007
  "@platforma-open/milaboratories.runenv-python-3": "catalog:",
1981
2008
  "@platforma-sdk/package-builder": "sdk:"
1982
2009
  }
1983
2010
  };
1984
2011
  }
1985
- function pr() {
2012
+ function vr() {
1986
2013
  F("type", "module"), F("files", ["./dist/**/*"]), I("build", "pl-pkg build"), I("prepublishOnly", "pl-pkg prepublish"), I("changeset", "changeset"), I("version-packages", "changeset version"), V({
1987
2014
  "@platforma-open/milaboratories.runenv-python-3": "catalog:",
1988
2015
  "@platforma-sdk/package-builder": "sdk:"
@@ -1990,37 +2017,41 @@ function pr() {
1990
2017
  }
1991
2018
  //#endregion
1992
2019
  //#region src/structure/rules/software.ts
1993
- var mr = "import sys\n\nprint(\"Hello from Python, \" + sys.argv[1] + \"!\")\n", hr = "# No dependencies specified for this script\n";
1994
- function gr() {
1995
- y("software", () => {
1996
- w("src/main.py", et(mr)), w("src/requirements.txt", et(hr)), C("package.json", D(() => fr(v())), () => {
1997
- pr();
2020
+ var yr = "import sys\n\nprint(\"Hello from Python, \" + sys.argv[1] + \"!\")\n", br = "# No dependencies specified for this script\n";
2021
+ function xr() {
2022
+ b("software", () => {
2023
+ T("src/main.py", $e(yr)), T("src/requirements.txt", $e(br)), w("package.json", O(() => _r(y())), () => {
2024
+ vr();
1998
2025
  });
1999
2026
  });
2000
2027
  }
2001
- function _r() {
2002
- y("model", () => {
2003
- T("eslint.config.mjs"), T("vite.config.mts");
2004
- }), y("ui", () => {
2005
- T("eslint.config.mjs"), T("vite.config.ts"), T("tsconfig.app.json"), T("tsconfig.node.json");
2006
- }), y("test", () => {
2007
- T("eslint.config.mjs");
2008
- }), y("root", () => {
2009
- T(".prettierrc"), C("package.json", D(() => En(v())), () => {
2028
+ function Sr() {
2029
+ b("model", () => {
2030
+ E("eslint.config.mjs"), E("vite.config.mts");
2031
+ }), b("ui", () => {
2032
+ E("eslint.config.mjs"), E("vite.config.ts"), E("tsconfig.app.json"), E("tsconfig.node.json");
2033
+ }), b("test", () => {
2034
+ E("eslint.config.mjs");
2035
+ }), b("root", () => {
2036
+ E(".prettierrc"), w("package.json", O(() => On(y())), () => {
2010
2037
  kt("pretty"), B("@platforma-sdk/blocks-deps-updater");
2011
2038
  });
2012
2039
  });
2013
2040
  }
2014
2041
  //#endregion
2015
2042
  //#region src/structure/rules/root-catalog-bump.ts
2016
- function vr() {
2017
- Ze(() => {
2018
- y("root", () => {
2019
- b(({ ctx: e }) => !e.isSdkInternal, () => {
2020
- C("pnpm-workspace.yaml", D(() => Un(v())), () => {
2043
+ function Cr() {
2044
+ Xe(() => {
2045
+ b("root", () => {
2046
+ x(({ ctx: e }) => !e.isSdkInternal, () => {
2047
+ w("pnpm-workspace.yaml", O(() => Jn(y())), () => {
2021
2048
  for (let e of X) zt(e);
2022
- for (let [e, t] of Object.entries(Bn)) Rt(e, t);
2023
- v().modules.some((e) => e.scope === "software") && Rt(Vn, Hn);
2049
+ for (let e of Gn) Bt(e.entry, {
2050
+ of: e.of,
2051
+ ofVersion: e.ofVersion
2052
+ });
2053
+ for (let [e, t] of Object.entries(Wn)) Rt(e, t);
2054
+ y().modules.some((e) => e.scope === "software") && Rt(Kn, qn);
2024
2055
  });
2025
2056
  });
2026
2057
  });
@@ -2028,24 +2059,25 @@ function vr() {
2028
2059
  }
2029
2060
  //#endregion
2030
2061
  //#region src/structure/structure-definition.ts
2031
- var yr = We(() => {
2032
- qn(), Qn(), tr(), ir(), sr(), ur(), gr(), _r(), vr();
2062
+ var wr = Ue(() => {
2063
+ Qn(), rr(), or(), lr(), fr(), hr(), xr(), Sr(), Cr();
2033
2064
  });
2034
2065
  //#endregion
2035
2066
  //#region src/structure/cli/run-structure.ts
2036
- async function br() {
2037
- return Rn(X.filter(Ln));
2067
+ async function Tr() {
2068
+ return Bn(X.filter(zn));
2038
2069
  }
2039
- async function xr(e) {
2040
- let t = f.resolve(e.blockPath), n = e.mode === "check", r = new ke(t), i = new Ae(e.templatesRoot), a = sn(yr, r, Tn({
2070
+ async function Er(e) {
2071
+ let t = p.resolve(e.blockPath), n = e.mode === "check", r = new Oe(t), i = new ke(e.templatesRoot), a = ln(wr, r, Dn({
2041
2072
  fs: r,
2042
2073
  isSdkInternal: e.isSdkInternal,
2043
2074
  updateDepsOnly: e.updateDepsOnly,
2044
2075
  dryRun: n
2045
2076
  }), {
2046
2077
  templates: i,
2047
- registryLookup: e.updateDepsOnly ? await br() : void 0,
2048
- rediscover: () => Tn({
2078
+ registryLookup: e.updateDepsOnly ? await Tr() : void 0,
2079
+ derivedPinLookup: e.updateDepsOnly ? await Hn(Gn) : void 0,
2080
+ rediscover: () => Dn({
2049
2081
  fs: r,
2050
2082
  isSdkInternal: e.isSdkInternal,
2051
2083
  updateDepsOnly: !1,
@@ -2057,22 +2089,22 @@ async function xr(e) {
2057
2089
  changes: a.changes
2058
2090
  };
2059
2091
  }
2060
- function Sr(e, t) {
2092
+ function Dr(e, t) {
2061
2093
  if (t.length === 0) return ` ${e}: up to date (0 changes)`;
2062
2094
  let n = t.map((e) => ` ${e.action.padEnd(6)} ${e.primitive.padEnd(8)} ${e.path} [${e.scope}]`);
2063
2095
  return ` ${e}: ${t.length} change(s)\n${n.join("\n")}`;
2064
2096
  }
2065
2097
  //#endregion
2066
2098
  //#region src/cmd/structure/check.ts
2067
- var Cr = class e extends u {
2099
+ var Or = class e extends d {
2068
2100
  static description = "Check block(s) against the canonical structure (read-only). Exits non-zero if any diff would land — used as the CI gate.";
2069
2101
  static examples = ["<%= config.bin %> <%= command.id %> ./my-block", "<%= config.bin %> <%= command.id %> --sdk-internal etc/blocks/*"];
2070
2102
  static strict = !1;
2071
- static flags = { "sdk-internal": d.boolean({ description: "block(s) live inside the SDK monorepo; skip root-scope rules" }) };
2103
+ static flags = { "sdk-internal": f.boolean({ description: "block(s) live inside the SDK monorepo; skip root-scope rules" }) };
2072
2104
  async run() {
2073
- let { argv: t, flags: n } = await this.parse(e), r = t.length > 0 ? t : ["."], i = f.join(this.config.root, "src", "structure", "templates"), a = !1;
2105
+ let { argv: t, flags: n } = await this.parse(e), r = t.length > 0 ? t : ["."], i = p.join(this.config.root, "src", "structure", "templates"), a = !1;
2074
2106
  for (let e of r) {
2075
- let t = await xr({
2107
+ let t = await Er({
2076
2108
  blockPath: e,
2077
2109
  isSdkInternal: n["sdk-internal"],
2078
2110
  updateDepsOnly: !1,
@@ -2080,32 +2112,32 @@ var Cr = class e extends u {
2080
2112
  templatesRoot: i,
2081
2113
  log: (e) => this.log(e)
2082
2114
  });
2083
- this.log(Sr(e, t.changes)), t.changes.length > 0 && (a = !0);
2115
+ this.log(Dr(e, t.changes)), t.changes.length > 0 && (a = !0);
2084
2116
  }
2085
2117
  a && this.error("Structure check failed: one or more blocks are out of date. Run `structure refresh`.", { exit: 1 });
2086
2118
  }
2087
- }, Q = ["python"], wr = class extends Error {
2119
+ }, Q = ["python"], kr = class extends Error {
2088
2120
  constructor(e) {
2089
2121
  super(`Missing required flag --${e} in --non-interactive mode. Supply every BlockVars flag, or drop --non-interactive to be prompted.`), this.name = "InitFlagError";
2090
2122
  }
2091
2123
  };
2092
2124
  async function $(e, t, n, r) {
2093
2125
  if (e !== void 0 && e !== "") return e;
2094
- if (n) throw new wr(t);
2126
+ if (n) throw new kr(t);
2095
2127
  return r();
2096
2128
  }
2097
- async function Tr(e) {
2098
- let t = await $(e.npmOrg, "npm-org", e.nonInteractive, () => fe({
2129
+ async function Ar(e) {
2130
+ let t = await $(e.npmOrg, "npm-org", e.nonInteractive, () => de({
2099
2131
  message: "npm org (e.g. @platforma-open):",
2100
2132
  default: "@platforma-open"
2101
- })), n = await $(e.orgScope, "org-scope", e.nonInteractive, () => fe({ message: "org scope (e.g. my-org):" })), r = await $(e.shortName, "short-name", e.nonInteractive, () => fe({ message: "block short name (e.g. mixcr-clonotyping):" })), i;
2102
- i = e.withSoftware === void 0 ? e.nonInteractive ? !1 : await de({
2133
+ })), n = await $(e.orgScope, "org-scope", e.nonInteractive, () => de({ message: "org scope (e.g. my-org):" })), r = await $(e.shortName, "short-name", e.nonInteractive, () => de({ message: "block short name (e.g. mixcr-clonotyping):" })), i;
2134
+ i = e.withSoftware === void 0 ? e.nonInteractive ? !1 : await ue({
2103
2135
  message: "Include a software module?",
2104
2136
  default: !1
2105
2137
  }) : e.withSoftware;
2106
2138
  let a;
2107
2139
  if (i) {
2108
- if (a = await $(e.platform, "platform", e.nonInteractive, () => pe({
2140
+ if (a = await $(e.platform, "platform", e.nonInteractive, () => fe({
2109
2141
  message: "Software platform:",
2110
2142
  choices: Q.map((e) => ({
2111
2143
  name: e,
@@ -2122,59 +2154,60 @@ async function Tr(e) {
2122
2154
  softwarePlatform: a
2123
2155
  };
2124
2156
  }
2125
- async function Er(e) {
2126
- let t = e.vars, n = gn(t), r = new ke(e.blockPath), i = new Ae(e.templatesRoot), a = _n({
2157
+ async function jr(e) {
2158
+ let t = e.vars, n = vn(t), r = new Oe(e.blockPath), i = new ke(e.templatesRoot), a = yn({
2127
2159
  blockVars: t,
2128
2160
  modules: n,
2129
2161
  isSdkInternal: !1,
2130
2162
  version: 1,
2131
2163
  dryRun: !1
2132
- }), o = X.filter(Ln), s;
2164
+ }), o = X.filter(zn), s, c;
2133
2165
  try {
2134
- s = await Rn(o);
2166
+ s = await Bn(o), c = await Hn(Gn);
2135
2167
  } catch (e) {
2136
2168
  throw Error(`init requires network access to resolve SDK catalog versions from npm, but the registry lookup failed: ${e instanceof Error ? e.message : String(e)}`);
2137
2169
  }
2138
- return sn(yr, r, a, {
2170
+ return ln(wr, r, a, {
2139
2171
  templates: i,
2140
2172
  initMode: !0,
2141
- registryLookup: s
2173
+ registryLookup: s,
2174
+ derivedPinLookup: c
2142
2175
  }), e.log(`Initialised block '${t.facadeName}'${t.softwarePlatform ? ` (software: ${t.softwarePlatform})` : " (no software)"} at ${e.blockPath}`), t;
2143
2176
  }
2144
2177
  //#endregion
2145
2178
  //#region src/cmd/index.ts
2146
- var Dr = {
2147
- "build-meta": me,
2148
- "build-model": ge,
2149
- "list-overview-snapshots": _e,
2150
- "mark-stable": ve,
2151
- pack: ye,
2152
- publish: xe,
2153
- "refresh-registry": Se,
2154
- "restore-overview-from-snapshot": Ce,
2155
- "update-deps": we,
2156
- "upload-package-v1": Oe,
2157
- "structure:check": Cr,
2158
- "structure:init": class e extends u {
2179
+ var Mr = {
2180
+ "build-meta": pe,
2181
+ "build-model": he,
2182
+ "list-overview-snapshots": ge,
2183
+ "mark-stable": _e,
2184
+ pack: ve,
2185
+ publish: be,
2186
+ "refresh-registry": xe,
2187
+ "restore-overview-from-snapshot": Se,
2188
+ "update-deps": Ce,
2189
+ "upload-package-v1": De,
2190
+ "structure:check": Or,
2191
+ "structure:init": class e extends d {
2159
2192
  static description = "Scaffold a fresh Platforma block from the canonical structure. Missing flags are prompted unless --non-interactive.";
2160
2193
  static examples = ["<%= config.bin %> <%= command.id %> --npm-org @platforma-open --org-scope my-org --short-name demo --no-software --non-interactive", "<%= config.bin %> <%= command.id %> ./demo --npm-org @platforma-open --org-scope my-org --short-name demo --with-software --platform python --non-interactive"];
2161
- static args = { path: te.string({ description: "target directory (default: <short-name> under the current directory)" }) };
2194
+ static args = { path: u.string({ description: "target directory (default: <short-name> under the current directory)" }) };
2162
2195
  static flags = {
2163
- "npm-org": d.string({ description: "npm org, e.g. @platforma-open" }),
2164
- "org-scope": d.string({ description: "org scope, e.g. my-org" }),
2165
- "short-name": d.string({ description: "block short name, e.g. mixcr-clonotyping" }),
2166
- "with-software": d.boolean({ description: "include a software module" }),
2167
- "no-software": d.boolean({ description: "omit the software module" }),
2168
- platform: d.string({
2196
+ "npm-org": f.string({ description: "npm org, e.g. @platforma-open" }),
2197
+ "org-scope": f.string({ description: "org scope, e.g. my-org" }),
2198
+ "short-name": f.string({ description: "block short name, e.g. mixcr-clonotyping" }),
2199
+ "with-software": f.boolean({ description: "include a software module" }),
2200
+ "no-software": f.boolean({ description: "omit the software module" }),
2201
+ platform: f.string({
2169
2202
  description: "software platform (single-valued)",
2170
2203
  options: [...Q]
2171
2204
  }),
2172
- "non-interactive": d.boolean({ description: "error on any missing flag instead of prompting" })
2205
+ "non-interactive": f.boolean({ description: "error on any missing flag instead of prompting" })
2173
2206
  };
2174
2207
  async run() {
2175
2208
  let { args: t, flags: n } = await this.parse(e);
2176
2209
  n["with-software"] && n["no-software"] && this.error("--with-software and --no-software are mutually exclusive.");
2177
- let r = n["with-software"] ? !0 : n["no-software"] ? !1 : void 0, i = await Tr({
2210
+ let r = n["with-software"] ? !0 : n["no-software"] ? !1 : void 0, i = await Ar({
2178
2211
  npmOrg: n["npm-org"],
2179
2212
  orgScope: n["org-scope"],
2180
2213
  shortName: n["short-name"],
@@ -2182,15 +2215,15 @@ var Dr = {
2182
2215
  platform: n.platform,
2183
2216
  nonInteractive: n["non-interactive"]
2184
2217
  });
2185
- await Er({
2218
+ await jr({
2186
2219
  vars: i,
2187
- blockPath: t.path ? f.resolve(t.path) : f.resolve(process.cwd(), i.shortName),
2188
- templatesRoot: f.join(this.config.root, "src", "structure", "templates"),
2220
+ blockPath: t.path ? p.resolve(t.path) : p.resolve(process.cwd(), i.shortName),
2221
+ templatesRoot: p.join(this.config.root, "src", "structure", "templates"),
2189
2222
  log: (e) => this.log(e)
2190
2223
  });
2191
2224
  }
2192
2225
  },
2193
- "structure:refresh": class e extends u {
2226
+ "structure:refresh": class e extends d {
2194
2227
  static description = "Bring block(s) up to date with the canonical structure. Applies rules, writes files, bumps .structure version. Default mode is offline; --update-deps-only fires only catalog-bump rules (network).";
2195
2228
  static examples = [
2196
2229
  "<%= config.bin %> <%= command.id %> ./my-block",
@@ -2199,13 +2232,13 @@ var Dr = {
2199
2232
  ];
2200
2233
  static strict = !1;
2201
2234
  static flags = {
2202
- "sdk-internal": d.boolean({ description: "block(s) live inside the SDK monorepo; skip root-scope rules" }),
2203
- "update-deps-only": d.boolean({ description: "fire ONLY catalog-bump rules (npm network). Follow with `pnpm install` then a plain refresh." })
2235
+ "sdk-internal": f.boolean({ description: "block(s) live inside the SDK monorepo; skip root-scope rules" }),
2236
+ "update-deps-only": f.boolean({ description: "fire ONLY catalog-bump rules (npm network). Follow with `pnpm install` then a plain refresh." })
2204
2237
  };
2205
2238
  async run() {
2206
- let { argv: t, flags: n } = await this.parse(e), r = t.length > 0 ? t : ["."], i = f.join(this.config.root, "src", "structure", "templates");
2239
+ let { argv: t, flags: n } = await this.parse(e), r = t.length > 0 ? t : ["."], i = p.join(this.config.root, "src", "structure", "templates");
2207
2240
  for (let e of r) {
2208
- let t = await xr({
2241
+ let t = await Er({
2209
2242
  blockPath: e,
2210
2243
  isSdkInternal: n["sdk-internal"],
2211
2244
  updateDepsOnly: n["update-deps-only"],
@@ -2213,12 +2246,12 @@ var Dr = {
2213
2246
  templatesRoot: i,
2214
2247
  log: (e) => this.log(e)
2215
2248
  });
2216
- this.log(Sr(e, t.changes));
2249
+ this.log(Dr(e, t.changes));
2217
2250
  }
2218
2251
  }
2219
2252
  }
2220
2253
  };
2221
2254
  //#endregion
2222
- export { Dr as COMMANDS };
2255
+ export { Mr as COMMANDS };
2223
2256
 
2224
2257
  //# sourceMappingURL=cli.mjs.map