@drzl/validation-core 3.14.0 → 3.15.1
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/README.md +17 -0
- package/dist/index.cjs +113 -84519
- package/dist/index.d.cts +35 -2
- package/dist/index.d.ts +35 -2
- package/dist/index.js +6 -4
- package/package.json +11 -3
- package/dist/acorn-XYPTJ6WH.js +0 -3181
- package/dist/angular-YPOYMZ5Z.js +0 -3629
- package/dist/babel-3Y2WL4BG.js +0 -7335
- package/dist/chunk-ZZGILH5A.js +0 -24
- package/dist/estree-PS47G6OA.js +0 -4955
- package/dist/flow-7NIIFLZC.js +0 -4998
- package/dist/glimmer-HA3GA4CF.js +0 -2908
- package/dist/graphql-3AZLP5TQ.js +0 -1289
- package/dist/html-WHLWODCM.js +0 -3218
- package/dist/markdown-Q4JIPTFK.js +0 -6803
- package/dist/meriyah-PDYHQKRL.js +0 -2737
- package/dist/postcss-66ZEKHWQ.js +0 -5239
- package/dist/prettier-LT6G5PW7.js +0 -20062
- package/dist/typescript-Z6ME4ZZC.js +0 -13435
- package/dist/yaml-QEX7HYMI.js +0 -4833
package/README.md
CHANGED
|
@@ -50,6 +50,23 @@ Shared interfaces and helpers used by validation generators.
|
|
|
50
50
|
output and misses `node16`/`nodenext` ES modules. `'ts'` needs
|
|
51
51
|
`allowImportingTsExtensions`. `.mts` and `.cts` become `.mjs` and `.cjs` under both
|
|
52
52
|
`'js'` and `'none'`, since an extensionless specifier never resolves to them.
|
|
53
|
+
- CHECK constraints (shared by every generator that reads them)
|
|
54
|
+
- `parseCheck(expression, name)` -> the parts of a `CHECK` that can be stated with certainty:
|
|
55
|
+
column comparisons, `BETWEEN`, `IN (...)`, top-level `AND`, `length()`/`char_length()`,
|
|
56
|
+
`cardinality()`/`array_length(col, 1)`, and comparisons between two columns. A disjunction, a
|
|
57
|
+
negation, `octet_length`, an unrecognised function call and a regex match are all refused
|
|
58
|
+
whole rather than half-applied.
|
|
59
|
+
- `COLUMN_FORMATS` -> patterns for the column formats that are expressible. Only `numeric` is:
|
|
60
|
+
Postgres accepts `today`, `January 8, 1999` and `allballs`, so a date or time pattern would
|
|
61
|
+
reject rows the database takes.
|
|
62
|
+
- `CODEPOINT_LENGTH` -> `[...v].length`, since `varchar(n)` counts characters and JavaScript's
|
|
63
|
+
`.length` counts UTF-16 units. All four generators use it.
|
|
64
|
+
- `isIntegerColumn(c)`
|
|
65
|
+
- Uniqueness
|
|
66
|
+
- `renderDuplicateFinder(table, fnName, rowType)` -> the source of a function returning the rows
|
|
67
|
+
in a batch that collide with an earlier row on a unique constraint. Plain TypeScript with no
|
|
68
|
+
reference to any validation library, so all four generators emit the same one. Null and absent
|
|
69
|
+
columns skip a constraint, matching SQL.
|
|
53
70
|
- Naming (shared by every generator that emits a schema name)
|
|
54
71
|
- `resolveAffix({ affix, schemaSuffix })` -> `ResolvedAffix`
|
|
55
72
|
- `schemaName(mode, tsName, resolved)`, `typeName(mode, tsName, resolved)`
|