@flowrunner/cli 0.1.3 → 0.1.4

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.
@@ -21,8 +21,10 @@ and behaviors.
21
21
 
22
22
  Notes:
23
23
 
24
- - **The Widget column is the PARAM rendering.** A `configItems` field publishes a smaller, closed set of
25
- types — notably `z.number()` lands on `string` and gets a plain text box, not a stepper. See
24
+ - **The Widget column applies to config fields too** — the configuration form is drawn from the same
25
+ declaration, so `z.number()` gets a numeric input there as it does for a param. What is smaller for a
26
+ config field is the `type` it **publishes**: a closed set in which `z.number()` lands on `string`. That is
27
+ what a test asserts, not what the form renders. See
26
28
  [Config fields publish a smaller set of types](#config-fields-publish-a-smaller-set-of-types).
27
29
  - **Required is the default** — mark optional fields with `.optional()`.
28
30
  - `.shared()` marks a config field as a **shared** (global) config value rather than per-app — used for
@@ -174,25 +176,29 @@ See [16-gotchas.md](16-gotchas.md) for the rest of that trap.
174
176
 
175
177
  ## Config fields publish a smaller set of types
176
178
 
177
- A `configItems` field is drawn from its declaration much as a param is — `z.boolean()` is a toggle,
178
- `z.enum([...])` a dropdown, `z.text()` a textarea — but a config item is published through a **smaller,
179
- closed vocabulary** than a param, and anything outside it lands on `string`:
179
+ A `configItems` field is **drawn from its declaration**, exactly as a param is — `z.boolean()` is a
180
+ toggle, `z.enum([...])` a dropdown, `z.text()` a textarea, `z.number()` a numeric input. But alongside the
181
+ declaration the platform also publishes a flat, **smaller, closed vocabulary** of config `type` strings, and
182
+ anything outside it lands on `string`:
180
183
 
181
- | Declared in `configItems` | Published `type` | Control |
184
+ | Declared in `configItems` | Published `type` | Control in the configuration form |
182
185
  |---|---|---|
183
186
  | `z.string()` | `string` | single-line text |
184
187
  | `z.text()` | `text` | textarea |
185
188
  | `z.boolean()` | `bool` | checkbox |
186
189
  | `z.enum([...])` | `choice` | dropdown |
187
190
  | `z.date()` | `date` | date picker |
188
- | **`z.number()`** | **`string`** | **single-line text — there is no numeric config type, so no stepper** |
189
-
190
- `z.number()` is the one that surprises: as a *param* it publishes `NUMBER` and renders a numeric stepper, in
191
- `configItems` it publishes `type: "string"` and renders a plain text box. `getServiceConfigItems()` reports
192
- `"string"` for it, and a test asserting the published config items must expect that. **Your handler still
193
- receives a number** — the declared type is what the value is converted to before validation (see below), so
194
- the widget is the only thing that differs. Declare `z.number()` anyway when the value is a number: it is
195
- what gives you the conversion and the validation.
191
+ | **`z.number()`** | **`string`** | **numeric input — there is no numeric config `type`, but the form reads the declaration** |
192
+
193
+ `z.number()` is the one that surprises, and it surprises in one place only: **`getServiceConfigItems()`
194
+ reports `type: "string"` for it**, because that vocabulary has no number in it. A test asserting the
195
+ published config items must expect `"string"`.
196
+
197
+ That published string is **not** what the user sees. The configuration form renders from the declared
198
+ schema, so a `z.number()` config field is a real numeric input, and **your handler still receives a
199
+ number** — the declared type is what the value is converted to before validation (see below). Declare
200
+ `z.number()` when the value is a number: it is what gives you the control, the conversion and the
201
+ validation, and nothing needs converting by hand.
196
202
 
197
203
  The two other differences are structural:
198
204
 
package/dist/cli.js CHANGED
@@ -4188,7 +4188,10 @@ var require_package = __commonJS({
4188
4188
  publishConfig: {
4189
4189
  access: "public"
4190
4190
  },
4191
- version: "0.1.3",
4191
+ version: "0.1.4",
4192
+ engines: {
4193
+ node: ">=20"
4194
+ },
4192
4195
  description: "Flowrunner CLI for deploying Custom Extensions",
4193
4196
  bin: {
4194
4197
  flowrunner: "./bin/flowrunner.js"