jsfe 1.40.1 → 1.40.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"form-client.d.ts","sourceRoot":"","sources":["../../src/forms/form-client.js"],"names":[],"mappings":"AA2BA,iGAAiG;AACjG;;;;;SA0EC;AAED,+GAA+G;AAC/G;;;;SAgCC;AAED;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BC;AArKD,qCAAsC,eAAe,CAAC"}
1
+ {"version":3,"file":"form-client.d.ts","sourceRoot":"","sources":["../../src/forms/form-client.js"],"names":[],"mappings":"AA2BA,iGAAiG;AACjG;;;;;SA6EC;AAED,+GAA+G;AAC/G;;;;SAgCC;AAED;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BC;AAxKD,qCAAsC,eAAe,CAAC"}
@@ -106,8 +106,11 @@ export function projectForm(session, flows) {
106
106
  field.constraints = Object.fromEntries(['min', 'max'].filter(key => typeof profile[key] === 'number').map(key => [key, profile[key]]));
107
107
  if (!field.sensitive && ['string', 'number', 'boolean'].includes(typeof state.values?.[input.name]))
108
108
  field.value = state.values[input.name];
109
- if (state.errors?.[input.name])
110
- field.error = String(state.errors[input.name]);
109
+ // A worded refusal is shown with its field; the bare 'invalid' flag (a refusal with no message, or a whole-form
110
+ // validator asking for this field) is not caller text: the reply above says what is needed and `current` points here.
111
+ const error = state.errors?.[input.name];
112
+ if (error && error !== 'invalid')
113
+ field.error = String(error);
111
114
  // The field the conversation is asking for now, so a client can point at it on a redrawn form.
112
115
  if (isCurrent) {
113
116
  field.current = true;
@@ -1 +1 @@
1
- export const JSFE_RUNTIME_FINGERPRINT = "sha256:16e28f7248d2a884103079326baaf8d4f9aaf65486e99a8b3611bd248d646439";
1
+ export const JSFE_RUNTIME_FINGERPRINT = "sha256:046178eae674f9484c9ef39ac003f3ebbf6bba8eabe8b51a0b088da24c80eed3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsfe",
3
- "version": "1.40.1",
3
+ "version": "1.40.2",
4
4
  "description": "TypeScript workflow engine for conversational/automation apps: multi-flow orchestration, interrupt/resume, stack-based control, robust errors, and flexible tool/REST integration.",
5
5
  "license": "MIT",
6
6
  "author": "Ron Pinkas",