@xeplr/cli 0.1.9 → 0.1.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xeplr/cli",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Creates a working xeplr application — API, sign-in and UI — from a few answers.",
5
5
  "license": "MIT",
6
6
  "author": "xeppie <admin@xeplr.com>",
@@ -45,7 +45,7 @@ Then change only what the request asks for:
45
45
 
46
46
  - **`multiselect`** — several ids in ONE text column, comma separated, and an array in your code. An option's id may not contain a comma.
47
47
  - **`file`** — the column holds the **path**, never the file. Say which extensions (`"accept": ".pdf,.docx"`) and how large (`"maxSize": 10`, in MB); the API enforces both, by extension, and keeps the file under `FACTORY_FILES_DIR`. Uploading needs `multer` in `api/` (already in package.json).
48
- - **`stepper`** — a journey across the top. Every other field says which step it is on (`"step": "Planning"`), and one without a `step` shows on every step. `step(ctx)` in the front-end hooks runs before each move.
48
+ - **`stepper`** — a journey across the top. Every other field says which step it is on (`"step": "Planning"`), and one without a `step` shows on every step. `step(ctx)` in the front-end hooks runs before each move: return `false` to stay, a step's key to go there, `ctx.disable(['planning'])` to rule steps out (struck through on the bar, passed over by Next and Back) and `ctx.enable()` to bring them back.
49
49
 
50
50
  **A list opens its form on a page or in a popup** — `"openIn": "page"` in the entity spec, or Configure UI → Forms → the list. A page needs `onOpenRecord` on the list's page (where to navigate) and `onDone` on the form's page (where Done goes back to): `Tasks.jsx` and `EditTask.jsx` show both, with routes `/tasks/new` and `/tasks/:id` in `App.jsx`.
51
51
 
@@ -21,7 +21,7 @@
21
21
  "@xeplr/base-apis": "^2.0.0",
22
22
  "@xeplr/db": "^1.0.6",
23
23
  "@xeplr/factory": "^1.0.6",
24
- "@xeplr/ui-factory": "^1.0.11",
24
+ "@xeplr/ui-factory": "^1.0.12",
25
25
  "@xeplr/utils": "^1.0.11",
26
26
  "dotenv": "^17.4.2",
27
27
  "express": "^5.2.0",
@@ -12,7 +12,7 @@
12
12
  "@tanstack/react-table": "^8.21.3",
13
13
  "@xeplr/ui-account": "^1.0.9",
14
14
  "@xeplr/ui-canvas": "^1.0.2",
15
- "@xeplr/ui-factory": "^1.0.11",
15
+ "@xeplr/ui-factory": "^1.0.12",
16
16
  "@xeplr/ui-table": "^1.0.6",
17
17
  "react": "^19.2.4",
18
18
  "react-dom": "^19.2.4",
@@ -38,8 +38,18 @@ export class TaskHooks extends FactoryHooks {
38
38
 
39
39
  /**
40
40
  * Before a stepper moves — Next, Back, or a click on the bar.
41
- * Return false to stay where you are, or a step number to go there instead.
42
- * The step's own required fields are checked before this runs.
41
+ *
42
+ * Return false to stay where you are, or a step (its key or its number) to
43
+ * go there instead. ctx.disable(['planning']) rules steps out — they stay on
44
+ * the bar, struck through, and Next and Back pass over them; ctx.enable()
45
+ * brings them all back. The step's own required fields are checked before
46
+ * this runs, so this is for your rules, not theirs. For example:
47
+ *
48
+ * if (ctx.from === 0 && ctx.values.priority === 'low') {
49
+ * ctx.disable(['planning'])
50
+ * return 'attachment'
51
+ * }
52
+ * ctx.enable()
43
53
  */
44
54
  step(ctx) {
45
55
  return super.step(ctx)