@dforge-core/metadata 0.0.19 → 0.0.20
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/index.d.ts +9 -1
- package/package.json +1 -1
- package/schemas/menus.schema.json +1 -1
- package/schemas/triggers.schema.json +1 -1
- package/src/menus.ts +9 -1
package/dist/index.d.ts
CHANGED
|
@@ -1153,7 +1153,15 @@ interface MenuItemDef {
|
|
|
1153
1153
|
interface MenuDef {
|
|
1154
1154
|
label: string;
|
|
1155
1155
|
description?: string;
|
|
1156
|
-
/**
|
|
1156
|
+
/**
|
|
1157
|
+
* Flat folder codes this menu is linked to — the module code for the root,
|
|
1158
|
+
* module code + `_` + each nesting segment for children (`logistics_all_trips`).
|
|
1159
|
+
* The full path, the module-relative path, and a folder's own key (while unique
|
|
1160
|
+
* in the tree) resolve too. Omit to link the menu to every folder the module
|
|
1161
|
+
* declares. Scopes the folder→menu link only: every folder in ui/folders.json is
|
|
1162
|
+
* created either way. A code matching no folder — or a key two branches share —
|
|
1163
|
+
* fails the install.
|
|
1164
|
+
*/
|
|
1157
1165
|
folders?: string[];
|
|
1158
1166
|
/** Menu items keyed by item code. */
|
|
1159
1167
|
items: Record<string, MenuItemDef>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dforge-core/metadata",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"description": "Canonical dForge authoring registries — field types, base datatypes, column types, traits, data-view kinds and chart types — with derivation helpers. Runtime-dependency-free; the single source of truth shared by editors, the web app and the CLI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "dForge",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"folders": {
|
|
24
24
|
"type": "array",
|
|
25
25
|
"items": { "type": "string" },
|
|
26
|
-
"description": "
|
|
26
|
+
"description": "Flat folder codes this menu is linked to (module code for the root, module code + '_' + each nesting segment for children, e.g. 'logistics_all_trips'; the full path, the module-relative path, and a folder's own key when unique in the tree also resolve). Omit to link the menu to every folder the module declares. Scopes the folder-to-menu link only — every folder in ui/folders.json is created either way. A code matching no folder, or a key two branches share, fails the install."
|
|
27
27
|
},
|
|
28
28
|
"items": {
|
|
29
29
|
"type": "object",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"async": {
|
|
51
51
|
"type": "boolean",
|
|
52
52
|
"default": true,
|
|
53
|
-
"description": "When true (the default), the action runs in the background — the triggering transaction commits before the action starts. Recommended for slow actions (emails, external API calls); background failures are logged, not surfaced to the caller. When false, the action runs synchronously inside the same transaction as the triggering insert/update/delete: if the action fails (e.g. calls error()), the whole mutation rolls back and the error is returned to the caller — so an async:false trigger can undo the user's write. Keep async:false actions fast; they run on the request's transaction."
|
|
53
|
+
"description": "When true (the default), the action runs in the background — the triggering transaction commits before the action starts. Recommended for slow actions (emails, external API calls); background failures are logged, not surfaced to the caller. When false, the action runs synchronously inside the same transaction as the triggering insert/update/delete: if the action fails (e.g. calls error()), the whole mutation rolls back and the error is returned to the caller — so an async:false trigger can undo the user's write. That holds for a trigger on ANOTHER module's entity too (the bridge shape): a bridge can veto its host's write, the same way a mandatory extension column already refuses one. Use it to enforce an invariant, not merely to react — the error names the blocking module and trigger (code TRIGGER_ACTION_FAIL), and a bug in the action blocks the host's workflow just as effectively as a real violation. Keep async:false actions fast; they run on the request's transaction."
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"additionalProperties": false
|
package/src/menus.ts
CHANGED
|
@@ -26,7 +26,15 @@ export interface MenuItemDef {
|
|
|
26
26
|
export interface MenuDef {
|
|
27
27
|
label: string;
|
|
28
28
|
description?: string;
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Flat folder codes this menu is linked to — the module code for the root,
|
|
31
|
+
* module code + `_` + each nesting segment for children (`logistics_all_trips`).
|
|
32
|
+
* The full path, the module-relative path, and a folder's own key (while unique
|
|
33
|
+
* in the tree) resolve too. Omit to link the menu to every folder the module
|
|
34
|
+
* declares. Scopes the folder→menu link only: every folder in ui/folders.json is
|
|
35
|
+
* created either way. A code matching no folder — or a key two branches share —
|
|
36
|
+
* fails the install.
|
|
37
|
+
*/
|
|
30
38
|
folders?: string[];
|
|
31
39
|
/** Menu items keyed by item code. */
|
|
32
40
|
items: Record<string, MenuItemDef>;
|