@platforma-sdk/block-tools 2.10.16 → 2.10.17
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.js +11 -11
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +581 -583
- package/dist/cli.mjs.map +1 -1
- package/dist/structure/engine/builders.d.ts +9 -9
- package/dist/v2/registry/schema_public.d.ts +3600 -3600
- package/package.json +7 -7
- package/src/structure/__tests__/tsconfig-idempotency.test.ts +94 -0
- package/src/structure/engine/__tests__/content-rules/when-inner.test.ts +30 -0
- package/src/structure/engine/builders.ts +38 -23
- package/src/structure/rules/model.ts +11 -35
- package/src/structure/rules/ui-package-json.ts +7 -0
- package/src/structure/rules/ui.ts +10 -22
- package/src/structure/templates/static/model/tsconfig.node.json +7 -0
- package/src/structure/templates/static/ui/tsconfig.node.json +7 -0
|
@@ -30,17 +30,17 @@ type InnerWhenHandler = (trigger: TriggerFn, body: () => void) => boolean;
|
|
|
30
30
|
* `content-rules.ts` at load time to avoid a circular import). */
|
|
31
31
|
export declare function registerInnerWhenHandler(h: InnerWhenHandler): void;
|
|
32
32
|
/**
|
|
33
|
-
* Conditionally run `body
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* synchronously.
|
|
33
|
+
* Conditionally run `body`, with an optional `elseBody`. One `when` symbol for
|
|
34
|
+
* both layers — `dispatchWhen` picks the timing:
|
|
35
|
+
* - inside `defineStructure(...)` → register a `WhenFrame`; its trigger fires
|
|
36
|
+
* later, per module, at runner time.
|
|
37
|
+
* - inside a `managed(...)` body → evaluate the trigger against the live block
|
|
38
|
+
* now and run/skip synchronously.
|
|
39
39
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
40
|
+
* `else` is just the negated trigger dispatched the same way, so exactly one
|
|
41
|
+
* branch applies (in either layer).
|
|
42
42
|
*/
|
|
43
|
-
export declare function when(trigger: TriggerFn, body: () => void): void;
|
|
43
|
+
export declare function when(trigger: TriggerFn, body: () => void, elseBody?: () => void): void;
|
|
44
44
|
/** Trigger factory: true when at least one file in the leaf's module
|
|
45
45
|
* matches `glob` (module-relative — see `TriggerContext.filesMatch`). Use
|
|
46
46
|
* to gate a rule on the presence of co-located files, e.g. add a vitest
|