@mistriwork/engine 1.0.0-rc.21 → 1.0.0-rc.22

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.
@@ -142,6 +142,8 @@ interface PageDecl {
142
142
  reads: string[];
143
143
  /** The commands the page runs; any other is refused, in the browser and by the server. */
144
144
  commands: string[];
145
+ /** The fixed actions it runs (a machine's verbs, `action(label, { set })`) on the resources it reads: they are not commands, so they are named apart. */
146
+ actions: string[];
145
147
  /** The address parameters the page keeps its place in: `/{app}/pick-walk?list=12`. */
146
148
  params: string[];
147
149
  /** The loader that reads for it on the server, by its name in the commands module (`defineLoaders`). */
@@ -371,6 +371,9 @@ export function parsePage(raw, at) {
371
371
  const commands = raw.commands === undefined ? [] : raw.commands;
372
372
  if (!words(commands))
373
373
  throw new Error(`[page-commands] ${at} has "commands" that are not a list of command names: commands: ['pickList'].`);
374
+ const actions = raw.actions === undefined ? [] : raw.actions;
375
+ if (!words(actions))
376
+ throw new Error(`[page-action] ${at} has "actions" that are not a list of action ids: actions: ['startVisit'].`);
374
377
  const params = raw.params === undefined ? [] : raw.params;
375
378
  if (!Array.isArray(params) ||
376
379
  params.length > MAX_PAGE_PARAMS ||
@@ -385,6 +388,7 @@ export function parsePage(raw, at) {
385
388
  component,
386
389
  reads: [...new Set(reads.map((name) => name.trim()))],
387
390
  commands: [...new Set(commands.map((name) => name.trim()))],
391
+ actions: [...new Set(actions.map((name) => name.trim()))],
388
392
  params: [...new Set(params)],
389
393
  ...(raw.loader === undefined ? {} : { loader: raw.loader }),
390
394
  props: componentPropValues(component, raw.props, at),
@@ -463,6 +463,7 @@ export type AppPayloadNavNode = {
463
463
  placement?: 'footer';
464
464
  inline?: true;
465
465
  folded?: true;
466
+ workspace?: true;
466
467
  children: AppPayloadNavNode[];
467
468
  };
468
469
  /** A record on paper, as its verb and its address need it (appDocuments.ts). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mistriwork/engine",
3
- "version": "1.0.0-rc.21",
3
+ "version": "1.0.0-rc.22",
4
4
  "description": "The engine both products stand on: the adapters (SQLite, Postgres), the catalog, the query language, keyset pages, the HTTP kit and the shared rules. No React.",
5
5
  "homepage": "https://mistriwork.dev",
6
6
  "bugs": {