@peasant-labs/schema 0.54.0 → 0.57.0
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 +8 -0
- package/dist/internal/generated/contract/zod.gen.d.ts +3347 -3339
- package/dist/internal/generated/contract/zod.gen.js +235 -233
- package/dist/internal/generated/enums.gen.d.ts +704 -841
- package/dist/internal/generated/enums.gen.js +552 -552
- package/dist/internal/generated/versions.gen.d.ts +1 -1
- package/dist/internal/generated/versions.gen.js +1 -1
- package/dist/internal/generated/village-api.d.ts +90 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,6 +34,14 @@ same closed-set shape as Go (`Role.User`, `AllRoles`, `isRole`) without
|
|
|
34
34
|
maintaining a handwritten second contract. The retired `@peasant-labs/types`
|
|
35
35
|
package must not receive new wire definitions.
|
|
36
36
|
|
|
37
|
+
Generated enum members now retain their literal types: for example, `Role.User`
|
|
38
|
+
is `"user"`, not the whole `Role` union. Generated schemas such as `zRole` have
|
|
39
|
+
the structural type `ClosedSet<...>`, not a nominal `ZodEnum` type; `ClosedSet`
|
|
40
|
+
is internal to the generated declarations and is not a public export.
|
|
41
|
+
One-member sets still narrow to their single literal, but TypeScript does not
|
|
42
|
+
retain a named field alias for them. Runtime validation and wire values are
|
|
43
|
+
unchanged.
|
|
44
|
+
|
|
37
45
|
The generated root Zod schemas enforce the wire's structural shape and selected
|
|
38
46
|
generator-owned local cross-field invariants, including association evidence and
|
|
39
47
|
annotation target rules. The Go `Validate` methods remain authoritative at the
|