You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(fmodata,typegen): add list type override with preserved custom list options (#123)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Medium Risk**
> Introduces a new `listField()` builder with non-trivial read/write validation plus updates the OData type generator’s customization-preservation logic; both could subtly change generated output and runtime coercion for list-backed fields.
>
> **Overview**
> Adds a new `listField()` to `@proofkit/fmodata` for FileMaker return-delimited list strings, including newline normalization, optional nullability (`allowNull`), and optional per-item validation/transform (`itemValidator`), and exports it (and `ListFieldOptions`) from the public API.
>
> Extends OData typegen to support a new `typeOverride: "list"`, auto-import `listField`, and improves `preserveUserCustomizations` to keep user-authored `listField({...})` options when the field remains list-typed (and drop them when the type changes), with updated docs/UI/schema, snapshots, and new unit/e2e coverage; also splits Vitest config for default vs e2e runs and updates typegen test scripts.
>
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 40db5f8. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
"Override the inferred field type from metadata. Options: text, number, boolean, date, timestamp, container",
218
+
"Override the inferred field type from metadata. Options: text, number, boolean, date, timestamp, container, list",
219
219
},
220
220
}}
221
221
/>
@@ -235,6 +235,7 @@ Override the inferred field type from metadata. The available options are:
235
235
-`"date"`: Treats the field as a date field
236
236
-`"timestamp"`: Treats the field as a timestamp field
237
237
-`"container"`: Treats the field as a container field
238
+
-`"list"`: Treats the field as a FileMaker return-delimited list via `listField()` (defaults to `string[]`)
238
239
239
240
<Callouttype="info">
240
241
The typegen tool will attempt to infer the correct field type from the OData metadata. Use `typeOverride` only when you need to override the inferred type.
0 commit comments