@hyperscale0/udl 1.0.0 → 1.0.123
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/CHANGELOG.md +5 -216
- package/LICENSE.md +356 -0
- package/NOTICE.md +8 -0
- package/README.md +14 -106
- package/dist/canonical.d.ts.map +1 -1
- package/dist/canonical.js +1 -29
- package/dist/canonical.js.map +1 -1
- package/dist/diagnostics.d.ts +13 -165
- package/dist/diagnostics.d.ts.map +1 -1
- package/dist/diagnostics.js +33 -157
- package/dist/diagnostics.js.map +1 -1
- package/dist/field-value.d.ts +5 -0
- package/dist/field-value.d.ts.map +1 -0
- package/dist/field-value.js +85 -0
- package/dist/field-value.js.map +1 -0
- package/dist/finance.d.ts +10 -53
- package/dist/finance.d.ts.map +1 -1
- package/dist/finance.js +252 -536
- package/dist/finance.js.map +1 -1
- package/dist/index.d.ts +9 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/json.d.ts +2 -0
- package/dist/json.d.ts.map +1 -0
- package/dist/json.js +30 -0
- package/dist/json.js.map +1 -0
- package/dist/limits.d.ts +3 -28
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +5 -31
- package/dist/limits.js.map +1 -1
- package/dist/object-contract.d.ts +140 -0
- package/dist/object-contract.d.ts.map +1 -0
- package/dist/object-contract.js +314 -0
- package/dist/object-contract.js.map +1 -0
- package/dist/object-semantics-schema.d.ts +5710 -0
- package/dist/object-semantics-schema.d.ts.map +1 -0
- package/dist/object-semantics-schema.js +119 -0
- package/dist/object-semantics-schema.js.map +1 -0
- package/dist/object-semantics.d.ts +6 -0
- package/dist/object-semantics.d.ts.map +1 -0
- package/dist/object-semantics.js +279 -0
- package/dist/object-semantics.js.map +1 -0
- package/dist/object-structures.d.ts +4 -0
- package/dist/object-structures.d.ts.map +1 -0
- package/dist/object-structures.js +134 -0
- package/dist/object-structures.js.map +1 -0
- package/dist/reporting-validation.d.ts +8 -0
- package/dist/reporting-validation.d.ts.map +1 -0
- package/dist/reporting-validation.js +252 -0
- package/dist/reporting-validation.js.map +1 -0
- package/dist/reporting.d.ts +477 -0
- package/dist/reporting.d.ts.map +1 -0
- package/dist/reporting.js +169 -0
- package/dist/reporting.js.map +1 -0
- package/dist/schema.d.ts +5572 -2710
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +444 -1121
- package/dist/schema.js.map +1 -1
- package/dist/validation.d.ts +10 -73
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +1109 -2569
- package/dist/validation.js.map +1 -1
- package/docs/assets/brand/manifest.json +30 -0
- package/docs/assets/brand/udl-horizontal-white.svg +1 -0
- package/docs/assets/brand/udl-horizontal.svg +1 -0
- package/docs/assets/brand/udl-stacked-white.svg +1 -0
- package/docs/assets/brand/udl-stacked.svg +1 -0
- package/docs/assets/udl.svg +11 -0
- package/package.json +13 -22
- package/spec/README.md +300 -172
- package/spec/cars.udl.json +249 -0
- package/spec/udl.schema.json +3066 -2242
- package/src/canonical.ts +1 -35
- package/src/diagnostics.ts +76 -209
- package/src/field-value.ts +87 -0
- package/src/finance.ts +327 -832
- package/src/index.ts +18 -95
- package/src/json.ts +34 -0
- package/src/limits.ts +5 -31
- package/src/object-contract.ts +559 -0
- package/src/object-semantics-schema.ts +148 -0
- package/src/object-semantics.ts +378 -0
- package/src/object-structures.ts +255 -0
- package/src/reporting-validation.ts +383 -0
- package/src/reporting.ts +178 -0
- package/src/schema.ts +510 -1277
- package/src/validation.ts +1630 -4545
- package/LICENSE +0 -661
- package/LICENSING.md +0 -51
- package/TRADEMARKS.md +0 -35
- package/conformance/README.md +0 -82
- package/conformance/evolution/action-contract.expected.json +0 -10
- package/conformance/evolution/action-contract.live.udl +0 -44
- package/conformance/evolution/action-contract.next.udl +0 -45
- package/conformance/evolution/product-identity.expected.json +0 -10
- package/conformance/evolution/product-identity.live.udl +0 -55
- package/conformance/evolution/product-identity.next.udl +0 -55
- package/conformance/evolution/version-required.expected.json +0 -10
- package/conformance/evolution/version-required.live.udl +0 -55
- package/conformance/evolution/version-required.next.udl +0 -58
- package/conformance/invalid/action-without-transition.expected.json +0 -10
- package/conformance/invalid/action-without-transition.udl +0 -60
- package/conformance/invalid/agent-description-too-long.expected.json +0 -10
- package/conformance/invalid/agent-description-too-long.udl +0 -57
- package/conformance/invalid/blank-title.expected.json +0 -10
- package/conformance/invalid/blank-title.udl +0 -54
- package/conformance/invalid/composition-dial-duplicate-key.expected.json +0 -10
- package/conformance/invalid/composition-dial-duplicate-key.udl +0 -73
- package/conformance/invalid/depth-budget.expected.json +0 -10
- package/conformance/invalid/depth-budget.udl +0 -49
- package/conformance/invalid/duplicate-subject.expected.json +0 -10
- package/conformance/invalid/duplicate-subject.udl +0 -230
- package/conformance/invalid/forged-effects.expected.json +0 -10
- package/conformance/invalid/forged-effects.udl +0 -76
- package/conformance/invalid/format-version.expected.json +0 -10
- package/conformance/invalid/format-version.udl +0 -54
- package/conformance/invalid/instrument-id-not-snake-case.expected.json +0 -10
- package/conformance/invalid/instrument-id-not-snake-case.udl +0 -54
- package/conformance/invalid/invalid-aggregate-gate-shape.expected.json +0 -10
- package/conformance/invalid/invalid-aggregate-gate-shape.udl +0 -1819
- package/conformance/invalid/invalid-check-duration.expected.json +0 -10
- package/conformance/invalid/invalid-check-duration.udl +0 -219
- package/conformance/invalid/invalid-dial-anchor.expected.json +0 -10
- package/conformance/invalid/invalid-dial-anchor.udl +0 -219
- package/conformance/invalid/invalid-exception-parent-ref.expected.json +0 -10
- package/conformance/invalid/invalid-exception-parent-ref.udl +0 -2487
- package/conformance/invalid/invalid-exposure-shape.expected.json +0 -10
- package/conformance/invalid/invalid-exposure-shape.udl +0 -1819
- package/conformance/invalid/invalid-remainder.expected.json +0 -10
- package/conformance/invalid/invalid-remainder.udl +0 -220
- package/conformance/invalid/invalid-schema-keyword.expected.json +0 -10
- package/conformance/invalid/invalid-schema-keyword.udl +0 -220
- package/conformance/invalid/invalid-utf8.expected.json +0 -10
- package/conformance/invalid/invalid-utf8.udl +0 -1
- package/conformance/invalid/malformed-json.expected.json +0 -10
- package/conformance/invalid/malformed-json.udl +0 -1
- package/conformance/invalid/missing-create-action.expected.json +0 -10
- package/conformance/invalid/missing-create-action.udl +0 -48
- package/conformance/invalid/missing-exception-amount-field.expected.json +0 -10
- package/conformance/invalid/missing-exception-amount-field.udl +0 -2487
- package/conformance/invalid/missing-exception-contract.expected.json +0 -14
- package/conformance/invalid/missing-exception-contract.udl +0 -2523
- package/conformance/invalid/missing-exception-reason-field.expected.json +0 -10
- package/conformance/invalid/missing-exception-reason-field.udl +0 -2487
- package/conformance/invalid/not-an-object.expected.json +0 -10
- package/conformance/invalid/not-an-object.udl +0 -1
- package/conformance/invalid/payout-reconcile-not-a-bank-debit.expected.json +0 -10
- package/conformance/invalid/payout-reconcile-not-a-bank-debit.udl +0 -259
- package/conformance/invalid/quote-freeze-set-incomplete.expected.json +0 -10
- package/conformance/invalid/quote-freeze-set-incomplete.udl +0 -261
- package/conformance/invalid/quote-named-reference-gate.expected.json +0 -10
- package/conformance/invalid/quote-named-reference-gate.udl +0 -50
- package/conformance/invalid/reconcile-named-reference-gate.expected.json +0 -10
- package/conformance/invalid/reconcile-named-reference-gate.udl +0 -50
- package/conformance/invalid/unknown-key.expected.json +0 -10
- package/conformance/invalid/unknown-key.udl +0 -55
- package/conformance/invalid/unknown-reference-gate-field.expected.json +0 -10
- package/conformance/invalid/unknown-reference-gate-field.udl +0 -1819
- package/conformance/invalid/unknown-required-field.expected.json +0 -10
- package/conformance/invalid/unknown-required-field.udl +0 -220
- package/conformance/invalid/unreachable-state.expected.json +0 -10
- package/conformance/invalid/unreachable-state.udl +0 -55
- package/conformance/invalid/wrong-exception-amount-field.expected.json +0 -10
- package/conformance/invalid/wrong-exception-amount-field.udl +0 -2487
- package/conformance/invalid/wrong-exception-reason-field.expected.json +0 -10
- package/conformance/invalid/wrong-exception-reason-field.udl +0 -2487
- package/conformance/valid/agent-description.expected.json +0 -6
- package/conformance/valid/agent-description.udl +0 -66
- package/conformance/valid/cards.expected.json +0 -6
- package/conformance/valid/cards.udl +0 -1579
- package/conformance/valid/commerce-escrow.expected.json +0 -6
- package/conformance/valid/commerce-escrow.udl +0 -1512
- package/conformance/valid/compiled-crowdfunding.expected.json +0 -6
- package/conformance/valid/compiled-crowdfunding.udl +0 -1843
- package/conformance/valid/compiled-watch-club.expected.json +0 -6
- package/conformance/valid/compiled-watch-club.udl +0 -2486
- package/conformance/valid/complete-contract.expected.json +0 -6
- package/conformance/valid/complete-contract.udl +0 -218
- package/conformance/valid/effect-signatures.expected.json +0 -6
- package/conformance/valid/effect-signatures.udl +0 -75
- package/conformance/valid/hand-edited.expected.json +0 -6
- package/conformance/valid/hand-edited.udl +0 -1
- package/conformance/valid/insured-car-marketplace.expected.json +0 -6
- package/conformance/valid/insured-car-marketplace.udl +0 -1050
- package/conformance/valid/insured-travel.expected.json +0 -6
- package/conformance/valid/insured-travel.udl +0 -3469
- package/conformance/valid/minimal.expected.json +0 -6
- package/conformance/valid/minimal.udl +0 -54
- package/conformance/valid/protection.expected.json +0 -6
- package/conformance/valid/protection.udl +0 -1551
- package/conformance/valid/string-escaping.expected.json +0 -6
- package/conformance/valid/string-escaping.udl +0 -54
- package/dist/check-profiles.d.ts +0 -57
- package/dist/check-profiles.d.ts.map +0 -1
- package/dist/check-profiles.js +0 -62
- package/dist/check-profiles.js.map +0 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -184
- package/dist/cli.js.map +0 -1
- package/dist/effects.d.ts +0 -41
- package/dist/effects.d.ts.map +0 -1
- package/dist/effects.js +0 -110
- package/dist/effects.js.map +0 -1
- package/dist/evolution.d.ts +0 -120
- package/dist/evolution.d.ts.map +0 -1
- package/dist/evolution.js +0 -567
- package/dist/evolution.js.map +0 -1
- package/dist/parser.d.ts +0 -4
- package/dist/parser.d.ts.map +0 -1
- package/dist/parser.js +0 -44
- package/dist/parser.js.map +0 -1
- package/docs/README.md +0 -14
- package/docs/guide/01-a-document.md +0 -37
- package/docs/guide/02-money-steps.md +0 -23
- package/docs/guide/03-laws.md +0 -18
- package/docs/guide/04-fees-and-remainder.md +0 -15
- package/docs/guide/05-checks-updates-dials.md +0 -7
- package/docs/guide/06-effects.md +0 -11
- package/docs/guide/07-evolution.md +0 -11
- package/docs/guide/08-implementing.md +0 -13
- package/docs/llms-full.txt +0 -1241
- package/docs/llms.txt +0 -14
- package/docs/reference/canonical.md +0 -16
- package/docs/reference/clauses.md +0 -986
- package/docs/reference/cli.md +0 -22
- package/docs/reference/diagnostics.md +0 -32
- package/skills/udl/SKILL.md +0 -28
- package/src/check-profiles.ts +0 -80
- package/src/cli.ts +0 -196
- package/src/effects.ts +0 -163
- package/src/evolution.ts +0 -965
- package/src/parser.ts +0 -58
package/README.md
CHANGED
|
@@ -1,110 +1,18 @@
|
|
|
1
|
-
# UDL
|
|
1
|
+
# UDL 1
|
|
2
2
|
|
|
3
|
-
UDL
|
|
3
|
+
UDL, the Universal Domain Language, describes a company's objects, agreements,
|
|
4
|
+
actions and money rules. HSX compiles to this typed contract. An executor reads
|
|
5
|
+
UDL and enforces its actors, lifecycle transitions, requirements and effects.
|
|
6
|
+
The UDL package parses, validates and serializes contracts; it executes no actions.
|
|
7
|
+
This version supports SAR only.
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
Read the [specification](spec/README.md) for the contract and its runtime obligations.
|
|
10
|
+
The [JSON schema](spec/udl.schema.json) defines every field and default.
|
|
6
11
|
|
|
7
|
-
|
|
12
|
+
Install `@hyperscale0/udl` with Node.js 22 or later. `validateUdl` checks a
|
|
13
|
+
contract, not an account balance or a deployed executor. `canonicalDigest`
|
|
14
|
+
identifies its canonical bytes.
|
|
8
15
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
npm install @hyperscale0/udl
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
`1.0.0` freezes format 1. Pin version 1.0.0 while testing another implementation.
|
|
16
|
-
|
|
17
|
-
## Thirty seconds
|
|
18
|
-
|
|
19
|
-
`note.udl` is the smallest admitted document.
|
|
20
|
-
|
|
21
|
-
```json
|
|
22
|
-
{
|
|
23
|
-
"instruments": [
|
|
24
|
-
{
|
|
25
|
-
"actionOrder": ["close", "create"],
|
|
26
|
-
"fields": { "reference": { "type": "string" } },
|
|
27
|
-
"id": "note",
|
|
28
|
-
"idPrefix": "note",
|
|
29
|
-
"lifecycle": {
|
|
30
|
-
"initial": "open",
|
|
31
|
-
"states": ["open", "closed"],
|
|
32
|
-
"transitions": { "close": { "from": ["open"], "to": "closed" } }
|
|
33
|
-
},
|
|
34
|
-
"required": ["reference"],
|
|
35
|
-
"summary": "A note a tenant files and later closes.",
|
|
36
|
-
"title": "Note",
|
|
37
|
-
"actions": {
|
|
38
|
-
"close": { "moves": [], "steps": [], "summary": "Close the note." },
|
|
39
|
-
"create": { "moves": [], "steps": [], "summary": "File the note." }
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
],
|
|
43
|
-
"product": "minimal",
|
|
44
|
-
"subjects": [],
|
|
45
|
-
"title": "Minimal",
|
|
46
|
-
"udl": 1,
|
|
47
|
-
"version": 1
|
|
48
|
-
}
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
```ts
|
|
52
|
-
import { readFile, writeFile } from "node:fs/promises";
|
|
53
|
-
import {
|
|
54
|
-
canonicalDigest,
|
|
55
|
-
diffValidatedUdlEvolution,
|
|
56
|
-
parseUdl,
|
|
57
|
-
serializeUdl,
|
|
58
|
-
validateUdl,
|
|
59
|
-
} from "@hyperscale0/udl";
|
|
60
|
-
|
|
61
|
-
const document = parseUdl(await readFile("note.udl"));
|
|
62
|
-
await writeFile("note.udl", serializeUdl(document));
|
|
63
|
-
console.log(await canonicalDigest(document));
|
|
64
|
-
|
|
65
|
-
const result = validateUdl(document);
|
|
66
|
-
if (!result.ok) console.error(result.issues);
|
|
67
|
-
|
|
68
|
-
const previous = parseUdl(await readFile("note.previous.udl"));
|
|
69
|
-
const violations = diffValidatedUdlEvolution(previous, document);
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Every issue has a stable `UDL####` code, a category, a JSON path, a message, and a fix. Messages may become clearer. Codes do not change once published.
|
|
73
|
-
|
|
74
|
-
`parseUdl` accepts a string or `Uint8Array` and rejects malformed UTF-8. `serializeUdl` validates before writing. It sorts object keys by UTF-16 code unit, keeps array order, uses two-space indentation, and writes one final line feed. `canonicalDigest` hashes those UTF-8 bytes with SHA-256 and returns a promise for the lowercase hexadecimal digest.
|
|
75
|
-
|
|
76
|
-
The seven kernel operations are `internal_transfer.create`, `internal_transfer.reserve`, `internal_transfer.post`, `internal_transfer.void`, `account.escrow.provision`, `account.freeze`, and `account.unfreeze`. A `payout` is an execution intent, not another kernel operation.
|
|
77
|
-
|
|
78
|
-
The compiler derives action `effects` from clauses. The validator rejects a supplied effects object unless every row and its order match. Derived effects do not consume the authored node budget.
|
|
79
|
-
|
|
80
|
-
## Command line
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
udl validate product.udl
|
|
84
|
-
udl fmt product.udl --write
|
|
85
|
-
udl canon product.udl
|
|
86
|
-
udl canon product.udl --digest
|
|
87
|
-
udl diff frozen.udl product.udl
|
|
88
|
-
udl explain UDL5001
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Exit code `0` means success. Exit code `1` means the validator or evolution law refused the document. Exit code `2` means the invocation or file read failed.
|
|
92
|
-
|
|
93
|
-
## Documentation
|
|
94
|
-
|
|
95
|
-
- [Guide and reading order](docs/README.md)
|
|
96
|
-
- [Format specification](spec/README.md)
|
|
97
|
-
- [Canonical bytes law](docs/reference/canonical.md)
|
|
98
|
-
- [Stable diagnostics](docs/reference/diagnostics.md)
|
|
99
|
-
- [Conformance runner contract](conformance/README.md)
|
|
100
|
-
- [Agent skill](skills/udl/SKILL.md)
|
|
101
|
-
|
|
102
|
-
## Versioning
|
|
103
|
-
|
|
104
|
-
The literal `"udl": 1` is the format version. The version in `package.json` is the package version. They move independently. After package version `1.0.0`, an incompatible format change uses a new format literal and keeps an explicit reader for stored format 1 documents during its stated support window.
|
|
105
|
-
|
|
106
|
-
## Contributing and license
|
|
107
|
-
|
|
108
|
-
Hyperscale accepts format proposals as issues with a use case and the conformance case they would add. See [CONTRIBUTING.md](CONTRIBUTING.md) for setup and proof commands.
|
|
109
|
-
|
|
110
|
-
UDL is AGPL-3.0-only. Hyperscale LLC also offers a commercial license. See [LICENSING.md](LICENSING.md) and [TRADEMARKS.md](TRADEMARKS.md).
|
|
16
|
+
From the public source checkout, run `bun install`, then `bun run build`.
|
|
17
|
+
`bun run check` checks schema freshness, types and package tests. Edit prose in
|
|
18
|
+
`spec/README.md`.
|
package/dist/canonical.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonical.d.ts","sourceRoot":"","sources":["../src/canonical.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"canonical.d.ts","sourceRoot":"","sources":["../src/canonical.ts"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGnD;AAED,gFAAgF;AAChF,wBAAsB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAQrE"}
|
package/dist/canonical.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assertValidUdl } from "./validation.js";
|
|
2
|
-
|
|
2
|
+
import { writeJson } from "./json.js";
|
|
3
3
|
export function serializeUdl(value) {
|
|
4
4
|
const document = assertValidUdl(value);
|
|
5
5
|
return `${writeJson(document, 0)}\n`;
|
|
@@ -11,32 +11,4 @@ export async function canonicalDigest(value) {
|
|
|
11
11
|
.map((byte) => byte.toString(16).padStart(2, "0"))
|
|
12
12
|
.join("");
|
|
13
13
|
}
|
|
14
|
-
function writeJson(value, depth) {
|
|
15
|
-
if (value === null || typeof value !== "object") {
|
|
16
|
-
const encoded = JSON.stringify(value);
|
|
17
|
-
if (encoded === undefined) {
|
|
18
|
-
throw new TypeError("UDL canonical JSON received a non-JSON value");
|
|
19
|
-
}
|
|
20
|
-
return encoded;
|
|
21
|
-
}
|
|
22
|
-
const indent = INDENT.repeat(depth);
|
|
23
|
-
const childIndent = INDENT.repeat(depth + 1);
|
|
24
|
-
if (Array.isArray(value)) {
|
|
25
|
-
if (value.length === 0)
|
|
26
|
-
return "[]";
|
|
27
|
-
return `[\n${value
|
|
28
|
-
.map((item) => `${childIndent}${writeJson(item, depth + 1)}`)
|
|
29
|
-
.join(",\n")}\n${indent}]`;
|
|
30
|
-
}
|
|
31
|
-
const record = value;
|
|
32
|
-
const keys = Object.keys(record).sort(compareCodeUnits);
|
|
33
|
-
if (keys.length === 0)
|
|
34
|
-
return "{}";
|
|
35
|
-
return `{\n${keys
|
|
36
|
-
.map((key) => `${childIndent}${JSON.stringify(key)}: ${writeJson(record[key], depth + 1)}`)
|
|
37
|
-
.join(",\n")}\n${indent}}`;
|
|
38
|
-
}
|
|
39
|
-
function compareCodeUnits(left, right) {
|
|
40
|
-
return left < right ? -1 : left > right ? 1 : 0;
|
|
41
|
-
}
|
|
42
14
|
//# sourceMappingURL=canonical.js.map
|
package/dist/canonical.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonical.js","sourceRoot":"","sources":["../src/canonical.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"canonical.js","sourceRoot":"","sources":["../src/canonical.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,MAAM,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACvC,OAAO,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC;AACvC,CAAC;AAED,gFAAgF;AAChF,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,KAAc;IAClD,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAClD,SAAS,EACT,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAC9C,CAAC;IACF,OAAO,CAAC,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;SAC/B,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;SACjD,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC"}
|
package/dist/diagnostics.d.ts
CHANGED
|
@@ -1,168 +1,16 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export type UdlDiagnosticFamily = "admission" | "document" | "evolution" | "finance" | "gates" | "lifecycle" | "schema";
|
|
3
|
-
declare const diagnosticDefinitions: {
|
|
4
|
-
readonly UDL1001: {
|
|
5
|
-
readonly category: "invalid_utf8";
|
|
6
|
-
readonly family: "admission";
|
|
7
|
-
readonly title: "Invalid UTF-8";
|
|
8
|
-
readonly fix: "Encode the document as valid UTF-8.";
|
|
9
|
-
};
|
|
10
|
-
readonly UDL1002: {
|
|
11
|
-
readonly category: "invalid_json";
|
|
12
|
-
readonly family: "admission";
|
|
13
|
-
readonly title: "Invalid JSON";
|
|
14
|
-
readonly fix: "Repair the JSON syntax before validation.";
|
|
15
|
-
};
|
|
16
|
-
readonly UDL1003: {
|
|
17
|
-
readonly category: "invalid_shape";
|
|
18
|
-
readonly family: "admission";
|
|
19
|
-
readonly title: "Invalid document shape";
|
|
20
|
-
readonly fix: "Match the published UDL JSON Schema.";
|
|
21
|
-
};
|
|
22
|
-
readonly UDL1004: {
|
|
23
|
-
readonly category: "resource_limit";
|
|
24
|
-
readonly family: "admission";
|
|
25
|
-
readonly title: "Resource limit exceeded";
|
|
26
|
-
readonly fix: "Reduce the source size, nesting, values, strings, references, or financial paths named by the message.";
|
|
27
|
-
};
|
|
28
|
-
readonly UDL2001: {
|
|
29
|
-
readonly category: "invalid_semantics";
|
|
30
|
-
readonly family: "document";
|
|
31
|
-
readonly title: "Duplicate declaration";
|
|
32
|
-
readonly fix: "Give each declaration a unique name.";
|
|
33
|
-
};
|
|
34
|
-
readonly UDL2002: {
|
|
35
|
-
readonly category: "invalid_semantics";
|
|
36
|
-
readonly family: "document";
|
|
37
|
-
readonly title: "Document law violation";
|
|
38
|
-
readonly fix: "Repair the declaration, subject contract, or derived effects named by the message.";
|
|
39
|
-
};
|
|
40
|
-
readonly UDL2005: {
|
|
41
|
-
readonly category: "invalid_semantics";
|
|
42
|
-
readonly family: "document";
|
|
43
|
-
readonly title: "Derived effects mismatch";
|
|
44
|
-
readonly fix: "Regenerate the action effects from its clauses.";
|
|
45
|
-
};
|
|
46
|
-
readonly UDL3001: {
|
|
47
|
-
readonly category: "invalid_semantics";
|
|
48
|
-
readonly family: "lifecycle";
|
|
49
|
-
readonly title: "Lifecycle is not closed";
|
|
50
|
-
readonly fix: "Declare every state and action transition, and make every state reachable.";
|
|
51
|
-
};
|
|
52
|
-
readonly UDL4001: {
|
|
53
|
-
readonly category: "invalid_semantics";
|
|
54
|
-
readonly family: "finance";
|
|
55
|
-
readonly title: "Money graph violation";
|
|
56
|
-
readonly fix: "Balance every funded amount and close every hold on each lifecycle path.";
|
|
57
|
-
};
|
|
58
|
-
readonly UDL5001: {
|
|
59
|
-
readonly category: "invalid_semantics";
|
|
60
|
-
readonly family: "gates";
|
|
61
|
-
readonly title: "Reference gate violation";
|
|
62
|
-
readonly fix: "Point the gate at a declared instrument, action, state, field, and reference.";
|
|
63
|
-
};
|
|
64
|
-
readonly UDL5002: {
|
|
65
|
-
readonly category: "invalid_semantics";
|
|
66
|
-
readonly family: "gates";
|
|
67
|
-
readonly title: "Check requirement violation";
|
|
68
|
-
readonly fix: "Use a declared check with compatible evidence and recurrence.";
|
|
69
|
-
};
|
|
70
|
-
readonly UDL5003: {
|
|
71
|
-
readonly category: "invalid_semantics";
|
|
72
|
-
readonly family: "gates";
|
|
73
|
-
readonly title: "Exposure gate violation";
|
|
74
|
-
readonly fix: "Use declared account and money fields for the exposure gate.";
|
|
75
|
-
};
|
|
76
|
-
readonly UDL5004: {
|
|
77
|
-
readonly category: "invalid_semantics";
|
|
78
|
-
readonly family: "gates";
|
|
79
|
-
readonly title: "Aggregate law violation";
|
|
80
|
-
readonly fix: "Point the aggregate at compatible parent and child fields.";
|
|
81
|
-
};
|
|
82
|
-
readonly UDL5005: {
|
|
83
|
-
readonly category: "invalid_semantics";
|
|
84
|
-
readonly family: "gates";
|
|
85
|
-
readonly title: "Settlement or payout violation";
|
|
86
|
-
readonly fix: "Use a declared settlement account and a compatible payout statement line.";
|
|
87
|
-
};
|
|
88
|
-
readonly UDL5006: {
|
|
89
|
-
readonly category: "invalid_semantics";
|
|
90
|
-
readonly family: "gates";
|
|
91
|
-
readonly title: "Quote and commit violation";
|
|
92
|
-
readonly fix: "Declare one complete quote freeze set and one matching commit action.";
|
|
93
|
-
};
|
|
94
|
-
readonly UDL5007: {
|
|
95
|
-
readonly category: "invalid_semantics";
|
|
96
|
-
readonly family: "gates";
|
|
97
|
-
readonly title: "Reconcile exception child violation";
|
|
98
|
-
readonly fix: "Name a declared child whose reference points back to this instrument.";
|
|
99
|
-
};
|
|
100
|
-
readonly UDL5008: {
|
|
101
|
-
readonly category: "invalid_semantics";
|
|
102
|
-
readonly family: "gates";
|
|
103
|
-
readonly title: "Action clause violation";
|
|
104
|
-
readonly fix: "Repair the clause fields and keep incompatible clauses separate.";
|
|
105
|
-
};
|
|
106
|
-
readonly UDL5009: {
|
|
107
|
-
readonly category: "invalid_semantics";
|
|
108
|
-
readonly family: "gates";
|
|
109
|
-
readonly title: "Reconcile exception amount field is missing or optional";
|
|
110
|
-
readonly fix: "Name the exception child's required money field in amountField.";
|
|
111
|
-
};
|
|
112
|
-
readonly UDL5010: {
|
|
113
|
-
readonly category: "invalid_semantics";
|
|
114
|
-
readonly family: "gates";
|
|
115
|
-
readonly title: "Reconcile exception amount field has the wrong type";
|
|
116
|
-
readonly fix: "Point amountField at a money field declared by the exception child.";
|
|
117
|
-
};
|
|
118
|
-
readonly UDL5011: {
|
|
119
|
-
readonly category: "invalid_semantics";
|
|
120
|
-
readonly family: "gates";
|
|
121
|
-
readonly title: "Reconcile exception reason field is missing or optional";
|
|
122
|
-
readonly fix: "Name the exception child's required text field in reasonField.";
|
|
123
|
-
};
|
|
124
|
-
readonly UDL5012: {
|
|
125
|
-
readonly category: "invalid_semantics";
|
|
126
|
-
readonly family: "gates";
|
|
127
|
-
readonly title: "Reconcile exception reason field has the wrong type";
|
|
128
|
-
readonly fix: "Point reasonField at a required plain text field declared by the exception child.";
|
|
129
|
-
};
|
|
130
|
-
readonly UDL6001: {
|
|
131
|
-
readonly category: "invalid_semantics";
|
|
132
|
-
readonly family: "schema";
|
|
133
|
-
readonly title: "Unsupported JSON Schema";
|
|
134
|
-
readonly fix: "Use only the sealed UDL JSON Schema subset.";
|
|
135
|
-
};
|
|
136
|
-
readonly UDL7001: {
|
|
137
|
-
readonly category: "invalid_evolution";
|
|
138
|
-
readonly family: "evolution";
|
|
139
|
-
readonly title: "Stored contract changed";
|
|
140
|
-
readonly fix: "Keep stored identities and contracts unchanged, and add only allowed optional declarations.";
|
|
141
|
-
};
|
|
142
|
-
readonly UDL7002: {
|
|
143
|
-
readonly category: "invalid_evolution";
|
|
144
|
-
readonly family: "evolution";
|
|
145
|
-
readonly title: "Version was not increased";
|
|
146
|
-
readonly fix: "Increase the product version for every semantic change.";
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
export type UdlIssueCode = keyof typeof diagnosticDefinitions;
|
|
150
|
-
export interface UdlDiagnostic {
|
|
151
|
-
readonly category: UdlIssueCategory;
|
|
152
|
-
readonly code: UdlIssueCode;
|
|
153
|
-
readonly family: UdlDiagnosticFamily;
|
|
154
|
-
readonly fix: string;
|
|
155
|
-
readonly title: string;
|
|
156
|
-
}
|
|
157
|
-
export declare const udlDiagnostics: readonly UdlDiagnostic[];
|
|
158
|
-
export declare function udlDiagnostic(code: string): UdlDiagnostic | undefined;
|
|
1
|
+
export type UdlIssueCode = "economic_party_unbound" | "economic_move_invalid" | "economic_reservation_conflict" | "subject_field_conflict" | "subject_field_unknown" | "subject_requirement_missing" | "subject_adapter_unbound" | "subject_party_unbound" | "party_name_reserved" | "party_kind_mismatch" | "staff_role_unknown" | "product_party_unbound" | "product_party_invalid" | "UDL1003" | "UDL1004" | "UDL2001" | "UDL2002" | "UDL2010" | "UDL3001" | "UDL4001" | "UDL5001";
|
|
159
2
|
export interface UdlIssue {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
3
|
+
code: UdlIssueCode;
|
|
4
|
+
path: string;
|
|
5
|
+
message: string;
|
|
6
|
+
fix: string;
|
|
7
|
+
category: string;
|
|
8
|
+
stranded?: {
|
|
9
|
+
state: string;
|
|
10
|
+
accounts: string[];
|
|
11
|
+
actions: string[];
|
|
12
|
+
paths: Record<string, string[]>;
|
|
13
|
+
};
|
|
165
14
|
}
|
|
166
|
-
export declare function issue(code: UdlIssueCode, path: string,
|
|
167
|
-
export {};
|
|
15
|
+
export declare function issue(code: UdlIssueCode, path: string, message: string): UdlIssue;
|
|
168
16
|
//# sourceMappingURL=diagnostics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GACpB,wBAAwB,GACxB,uBAAuB,GACvB,+BAA+B,GAC/B,wBAAwB,GACxB,uBAAuB,GACvB,6BAA6B,GAC7B,yBAAyB,GACzB,uBAAuB,GACvB,qBAAqB,GACrB,qBAAqB,GACrB,oBAAoB,GACpB,uBAAuB,GACvB,uBAAuB,GACvB,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,CAAC;AACd,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE;QACT,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;KACjC,CAAC;CACH;AAkCD,wBAAgB,KAAK,CACnB,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,QAAQ,CAQV"}
|
package/dist/diagnostics.js
CHANGED
|
@@ -1,164 +1,40 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
title: "Resource limit exceeded",
|
|
24
|
-
fix: "Reduce the source size, nesting, values, strings, references, or financial paths named by the message.",
|
|
25
|
-
},
|
|
26
|
-
UDL2001: {
|
|
27
|
-
category: "invalid_semantics",
|
|
28
|
-
family: "document",
|
|
29
|
-
title: "Duplicate declaration",
|
|
30
|
-
fix: "Give each declaration a unique name.",
|
|
31
|
-
},
|
|
32
|
-
UDL2002: {
|
|
33
|
-
category: "invalid_semantics",
|
|
34
|
-
family: "document",
|
|
35
|
-
title: "Document law violation",
|
|
36
|
-
fix: "Repair the declaration, subject contract, or derived effects named by the message.",
|
|
37
|
-
},
|
|
38
|
-
UDL2005: {
|
|
39
|
-
category: "invalid_semantics",
|
|
40
|
-
family: "document",
|
|
41
|
-
title: "Derived effects mismatch",
|
|
42
|
-
fix: "Regenerate the action effects from its clauses.",
|
|
43
|
-
},
|
|
44
|
-
UDL3001: {
|
|
45
|
-
category: "invalid_semantics",
|
|
46
|
-
family: "lifecycle",
|
|
47
|
-
title: "Lifecycle is not closed",
|
|
48
|
-
fix: "Declare every state and action transition, and make every state reachable.",
|
|
49
|
-
},
|
|
50
|
-
UDL4001: {
|
|
51
|
-
category: "invalid_semantics",
|
|
52
|
-
family: "finance",
|
|
53
|
-
title: "Money graph violation",
|
|
54
|
-
fix: "Balance every funded amount and close every hold on each lifecycle path.",
|
|
55
|
-
},
|
|
56
|
-
UDL5001: {
|
|
57
|
-
category: "invalid_semantics",
|
|
58
|
-
family: "gates",
|
|
59
|
-
title: "Reference gate violation",
|
|
60
|
-
fix: "Point the gate at a declared instrument, action, state, field, and reference.",
|
|
61
|
-
},
|
|
62
|
-
UDL5002: {
|
|
63
|
-
category: "invalid_semantics",
|
|
64
|
-
family: "gates",
|
|
65
|
-
title: "Check requirement violation",
|
|
66
|
-
fix: "Use a declared check with compatible evidence and recurrence.",
|
|
67
|
-
},
|
|
68
|
-
UDL5003: {
|
|
69
|
-
category: "invalid_semantics",
|
|
70
|
-
family: "gates",
|
|
71
|
-
title: "Exposure gate violation",
|
|
72
|
-
fix: "Use declared account and money fields for the exposure gate.",
|
|
73
|
-
},
|
|
74
|
-
UDL5004: {
|
|
75
|
-
category: "invalid_semantics",
|
|
76
|
-
family: "gates",
|
|
77
|
-
title: "Aggregate law violation",
|
|
78
|
-
fix: "Point the aggregate at compatible parent and child fields.",
|
|
79
|
-
},
|
|
80
|
-
UDL5005: {
|
|
81
|
-
category: "invalid_semantics",
|
|
82
|
-
family: "gates",
|
|
83
|
-
title: "Settlement or payout violation",
|
|
84
|
-
fix: "Use a declared settlement account and a compatible payout statement line.",
|
|
85
|
-
},
|
|
86
|
-
UDL5006: {
|
|
87
|
-
category: "invalid_semantics",
|
|
88
|
-
family: "gates",
|
|
89
|
-
title: "Quote and commit violation",
|
|
90
|
-
fix: "Declare one complete quote freeze set and one matching commit action.",
|
|
91
|
-
},
|
|
92
|
-
UDL5007: {
|
|
93
|
-
category: "invalid_semantics",
|
|
94
|
-
family: "gates",
|
|
95
|
-
title: "Reconcile exception child violation",
|
|
96
|
-
fix: "Name a declared child whose reference points back to this instrument.",
|
|
97
|
-
},
|
|
98
|
-
UDL5008: {
|
|
99
|
-
category: "invalid_semantics",
|
|
100
|
-
family: "gates",
|
|
101
|
-
title: "Action clause violation",
|
|
102
|
-
fix: "Repair the clause fields and keep incompatible clauses separate.",
|
|
103
|
-
},
|
|
104
|
-
UDL5009: {
|
|
105
|
-
category: "invalid_semantics",
|
|
106
|
-
family: "gates",
|
|
107
|
-
title: "Reconcile exception amount field is missing or optional",
|
|
108
|
-
fix: "Name the exception child's required money field in amountField.",
|
|
109
|
-
},
|
|
110
|
-
UDL5010: {
|
|
111
|
-
category: "invalid_semantics",
|
|
112
|
-
family: "gates",
|
|
113
|
-
title: "Reconcile exception amount field has the wrong type",
|
|
114
|
-
fix: "Point amountField at a money field declared by the exception child.",
|
|
115
|
-
},
|
|
116
|
-
UDL5011: {
|
|
117
|
-
category: "invalid_semantics",
|
|
118
|
-
family: "gates",
|
|
119
|
-
title: "Reconcile exception reason field is missing or optional",
|
|
120
|
-
fix: "Name the exception child's required text field in reasonField.",
|
|
121
|
-
},
|
|
122
|
-
UDL5012: {
|
|
123
|
-
category: "invalid_semantics",
|
|
124
|
-
family: "gates",
|
|
125
|
-
title: "Reconcile exception reason field has the wrong type",
|
|
126
|
-
fix: "Point reasonField at a required plain text field declared by the exception child.",
|
|
127
|
-
},
|
|
128
|
-
UDL6001: {
|
|
129
|
-
category: "invalid_semantics",
|
|
130
|
-
family: "schema",
|
|
131
|
-
title: "Unsupported JSON Schema",
|
|
132
|
-
fix: "Use only the sealed UDL JSON Schema subset.",
|
|
133
|
-
},
|
|
134
|
-
UDL7001: {
|
|
135
|
-
category: "invalid_evolution",
|
|
136
|
-
family: "evolution",
|
|
137
|
-
title: "Stored contract changed",
|
|
138
|
-
fix: "Keep stored identities and contracts unchanged, and add only allowed optional declarations.",
|
|
139
|
-
},
|
|
140
|
-
UDL7002: {
|
|
141
|
-
category: "invalid_evolution",
|
|
142
|
-
family: "evolution",
|
|
143
|
-
title: "Version was not increased",
|
|
144
|
-
fix: "Increase the product version for every semantic change.",
|
|
145
|
-
},
|
|
1
|
+
const fixes = {
|
|
2
|
+
economic_party_unbound: "Bind sourceParty to a money party retained by this attachment.",
|
|
3
|
+
economic_move_invalid: "Declare a cash purpose on a cash transfer or its posting; use internal for non-cash accounting.",
|
|
4
|
+
economic_reservation_conflict: "Keep the reservation's economics on its posting.",
|
|
5
|
+
subject_field_conflict: "Rename the field or use matching types and constraints.",
|
|
6
|
+
subject_field_unknown: "Name a declared subject requirement or object field.",
|
|
7
|
+
subject_requirement_missing: "Supply the required action field.",
|
|
8
|
+
subject_adapter_unbound: "Bind the required adapter declaration.",
|
|
9
|
+
subject_party_unbound: "Bind the parameter to a subject role or declared party.",
|
|
10
|
+
party_name_reserved: "Choose a party name other than owner, actor or operator.",
|
|
11
|
+
party_kind_mismatch: "Use a business or subject role for money.",
|
|
12
|
+
staff_role_unknown: "Use a registered staff permission role.",
|
|
13
|
+
product_party_unbound: "Supply the consumed business in the Build party bindings.",
|
|
14
|
+
product_party_invalid: "Bind a business participant in the same tenant and environment.",
|
|
15
|
+
UDL1003: "Use the UDL 1 typed grammar.",
|
|
16
|
+
UDL1004: "Reduce the declared structure or expansion.",
|
|
17
|
+
UDL2001: "Give each declaration a distinct name.",
|
|
18
|
+
UDL2002: "Repair the named type or declaration.",
|
|
19
|
+
UDL2010: "Remove the invocation cycle or reduce its expansion.",
|
|
20
|
+
UDL3001: "Declare reachable states and one transition per action.",
|
|
21
|
+
UDL4001: "Fund owned accounts before spending and close them with zero balances.",
|
|
22
|
+
UDL5001: "Use a declared reference of the required type.",
|
|
146
23
|
};
|
|
147
|
-
export
|
|
148
|
-
code: code,
|
|
149
|
-
...diagnostic,
|
|
150
|
-
}));
|
|
151
|
-
export function udlDiagnostic(code) {
|
|
152
|
-
return udlDiagnostics.find((diagnostic) => diagnostic.code === code);
|
|
153
|
-
}
|
|
154
|
-
export function issue(code, path, messageDetail) {
|
|
155
|
-
const diagnostic = diagnosticDefinitions[code];
|
|
24
|
+
export function issue(code, path, message) {
|
|
156
25
|
return {
|
|
157
|
-
category: diagnostic.category,
|
|
158
26
|
code,
|
|
159
|
-
fix: diagnostic.fix,
|
|
160
|
-
message: messageDetail ?? diagnostic.title,
|
|
161
27
|
path,
|
|
28
|
+
message,
|
|
29
|
+
fix: fixes[code],
|
|
30
|
+
category: category(code),
|
|
162
31
|
};
|
|
163
32
|
}
|
|
33
|
+
function category(code) {
|
|
34
|
+
return code === "UDL1003"
|
|
35
|
+
? "invalid_shape"
|
|
36
|
+
: code === "UDL1004"
|
|
37
|
+
? "resource_limit"
|
|
38
|
+
: "invalid_semantics";
|
|
39
|
+
}
|
|
164
40
|
//# sourceMappingURL=diagnostics.js.map
|
package/dist/diagnostics.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAmCA,MAAM,KAAK,GAAiC;IAC1C,sBAAsB,EACpB,gEAAgE;IAClE,qBAAqB,EACnB,iGAAiG;IACnG,6BAA6B,EAC3B,kDAAkD;IACpD,sBAAsB,EACpB,yDAAyD;IAC3D,qBAAqB,EAAE,sDAAsD;IAC7E,2BAA2B,EAAE,mCAAmC;IAChE,uBAAuB,EAAE,wCAAwC;IACjE,qBAAqB,EACnB,yDAAyD;IAC3D,mBAAmB,EACjB,0DAA0D;IAC5D,mBAAmB,EAAE,2CAA2C;IAChE,kBAAkB,EAAE,yCAAyC;IAC7D,qBAAqB,EACnB,2DAA2D;IAC7D,qBAAqB,EACnB,iEAAiE;IAEnE,OAAO,EAAE,8BAA8B;IACvC,OAAO,EAAE,6CAA6C;IACtD,OAAO,EAAE,wCAAwC;IACjD,OAAO,EAAE,uCAAuC;IAChD,OAAO,EAAE,sDAAsD;IAC/D,OAAO,EAAE,yDAAyD;IAClE,OAAO,EACL,wEAAwE;IAC1E,OAAO,EAAE,gDAAgD;CAC1D,CAAC;AACF,MAAM,UAAU,KAAK,CACnB,IAAkB,EAClB,IAAY,EACZ,OAAe;IAEf,OAAO;QACL,IAAI;QACJ,IAAI;QACJ,OAAO;QACP,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC;QAChB,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC;KACzB,CAAC;AACJ,CAAC;AACD,SAAS,QAAQ,CAAC,IAAY;IAC5B,OAAO,IAAI,KAAK,SAAS;QACvB,CAAC,CAAC,eAAe;QACjB,CAAC,CAAC,IAAI,KAAK,SAAS;YAClB,CAAC,CAAC,gBAAgB;YAClB,CAAC,CAAC,mBAAmB,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { type UdlField } from "./schema.js";
|
|
3
|
+
/** Values, rather than declarations. The same validator feeds forms and admission. */
|
|
4
|
+
export declare function udlFieldValueSchema(field: UdlField): z.ZodType;
|
|
5
|
+
//# sourceMappingURL=field-value.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-value.d.ts","sourceRoot":"","sources":["../src/field-value.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAK/D,sFAAsF;AACtF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,QAAQ,GAAG,CAAC,CAAC,OAAO,CA+E9D"}
|