@lotics/app-sdk 0.125.8 → 0.125.9
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/docs/workflows.md +8 -8
- package/package.json +1 -1
package/docs/workflows.md
CHANGED
|
@@ -356,13 +356,14 @@ for (const line of trigger.app_workflow.inputs.lines) {
|
|
|
356
356
|
Precedence is JS's: `? :`, `||`, `??`, `&&`, `== != === !==`, `< <= > >=`, `+ -`, `* / %`,
|
|
357
357
|
prefix `!` and `-`. Both equality forms work as in JS — `==`/`!=` loose, `===`/`!==` strict.
|
|
358
358
|
|
|
359
|
-
Not supported: `**`, bitwise operators, `
|
|
359
|
+
Not supported: `**`, bitwise operators, `instanceof`, `delete`, `void`. `typeof x` answers
|
|
360
|
+
JavaScript's words (a null is `"object"`); `k in o` tests an object's own keys.
|
|
360
361
|
`??=`, `||=` and `&&=` are statements (see *The sugar list*), not expressions.
|
|
361
362
|
|
|
362
|
-
**`undefined`
|
|
363
|
-
`x
|
|
364
|
-
|
|
365
|
-
`
|
|
363
|
+
**`undefined` reads as `null`.** `x == undefined` is `x == null`, and `x === undefined` /
|
|
364
|
+
`x !== undefined` are `isNull(x)` / `isNotNull(x)`: none of them tells a missing key from a null one.
|
|
365
|
+
Test whether a key was sent with `includes(keys(o), "k")` (see *Writing records*). A write tells them
|
|
366
|
+
apart: a field given `undefined` is left as it is, where `null` clears it.
|
|
366
367
|
|
|
367
368
|
**Ordered comparison against null is `false`, never a throw.** `<`/`>`/`<=`/`>=` with a
|
|
368
369
|
null/undefined operand evaluate to `false`. A mismatch between two *non-null* operands still
|
|
@@ -393,7 +394,6 @@ body does not look like what you typed.
|
|
|
393
394
|
| `[...a, b]` | `concat(a, [b])` |
|
|
394
395
|
| `{ ...a, b: 1 }` | `merge(merge({}, a), { b: 1 })` — later sources win, as in JS — and reads back as the spread, typed as you wrote it |
|
|
395
396
|
| `{ table_id }` | `{ table_id: table_id }` — in expressions **and** tool inputs |
|
|
396
|
-
| `undefined` | `null` |
|
|
397
397
|
| `xs.push(a, b);` | `xs = concat(xs, [a, b])` — statement form |
|
|
398
398
|
| `o.a.items.push(v);` | `o = merge(o, { a: merge(o.a, { items: concat(o.a.items, [v]) }) })` |
|
|
399
399
|
| `o.a.b = v;` | `o = merge(o, { a: merge(o.a, { b: v }) })` — also `o.a.b += v`, `o.n++` |
|
|
@@ -469,7 +469,7 @@ is what matters, and expect to re-extract it if you edit the source read back.
|
|
|
469
469
|
`get → set` is a fixed point on the stored tree, not on your text. A body read back prints the
|
|
470
470
|
canonical form — `concat` for a spread, `merge` for an object spread, `{x: x}` for shorthand,
|
|
471
471
|
`toString`/`lower` for a cast or a method call, the arrow spelling for either callback form,
|
|
472
|
-
`
|
|
472
|
+
`let` for a `const` the body mutates, and the inlined body at each call
|
|
473
473
|
site of a declared `function`. `?.` and `??` re-sugar, and a tool-result destructure prints back
|
|
474
474
|
as the destructuring statement (`const { records } = await query_records({…});`, with renames and
|
|
475
475
|
defaults intact); where a `?.` guard lands mid-path it prints as the explicit `isNull(…) ? null :
|
|
@@ -625,7 +625,7 @@ if (includes(keys(i), "phone")) { // NOT `isNull(i.phone)` — that swallows t
|
|
|
625
625
|
|
|
626
626
|
An omitted input carries no key at all and a cleared one carries the key with `null`, so presence
|
|
627
627
|
is the only test that separates them — and it has to be `keys`: a body reads `undefined` as `null`,
|
|
628
|
-
so `i.phone === undefined` is
|
|
628
|
+
so `i.phone === undefined` is `isNull(i.phone)`, which a cleared input passes too.
|
|
629
629
|
`""` is never a clear: the validator coerces it to omitted before the body runs.
|
|
630
630
|
|
|
631
631
|
Value shapes, which the generated types enforce exactly:
|
package/package.json
CHANGED