@zipbul/baker 1.1.0 → 2.0.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 +148 -508
- package/dist/index-btgens0c.js +6 -0
- package/dist/index-k369bbht.js +6 -0
- package/dist/index.d.ts +5 -6
- package/dist/index.js +205 -202
- package/dist/src/collect.d.ts +0 -2
- package/dist/src/configure.d.ts +0 -6
- package/dist/src/create-rule.d.ts +1 -1
- package/dist/src/decorators/field.d.ts +0 -9
- package/dist/src/decorators/index.d.ts +1 -1
- package/dist/src/decorators/index.js +1 -1
- package/dist/src/errors.d.ts +19 -8
- package/dist/src/functions/_run-sealed.d.ts +7 -0
- package/dist/src/functions/deserialize.d.ts +5 -4
- package/dist/src/functions/index.d.ts +1 -2
- package/dist/src/functions/serialize.d.ts +2 -2
- package/dist/src/functions/validate.d.ts +13 -0
- package/dist/src/rules/index.d.ts +1 -1
- package/dist/src/rules/index.js +9 -9
- package/dist/src/rules/string.d.ts +6 -48
- package/dist/src/symbols.d.ts +0 -2
- package/dist/src/symbols.js +2 -2
- package/dist/src/types.d.ts +2 -58
- package/package.json +13 -3
- package/README.ko.md +0 -588
- package/dist/index-70ggmxsa.js +0 -6
- package/dist/index-gcptd79v.js +0 -6
- package/dist/src/functions/to-json-schema.d.ts +0 -20
package/dist/src/types.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface EmittableRule {
|
|
|
20
20
|
* @IsString itself is undefined (it includes its own typeof check).
|
|
21
21
|
*/
|
|
22
22
|
readonly requiresType?: 'string' | 'number' | 'boolean' | 'date';
|
|
23
|
-
/** Expose rule parameters for external reading
|
|
23
|
+
/** Expose rule parameters for external reading */
|
|
24
24
|
readonly constraints?: Record<string, unknown>;
|
|
25
25
|
/** true when using an async validate function — deserialize-builder generates await code */
|
|
26
26
|
readonly isAsync?: boolean;
|
|
@@ -109,7 +109,6 @@ export interface RawPropertyMeta {
|
|
|
109
109
|
exclude: ExcludeDef | null;
|
|
110
110
|
type: TypeDef | null;
|
|
111
111
|
flags: PropertyFlags;
|
|
112
|
-
schema: Record<string, unknown> | ((auto: Record<string, unknown>) => Record<string, unknown>) | null;
|
|
113
112
|
}
|
|
114
113
|
export interface RawClassMeta {
|
|
115
114
|
[propertyKey: string]: RawPropertyMeta;
|
|
@@ -126,61 +125,6 @@ export interface SealedExecutors<T> {
|
|
|
126
125
|
_isAsync: boolean;
|
|
127
126
|
/** true if the serialize direction has async transforms/nested */
|
|
128
127
|
_isSerializeAsync: boolean;
|
|
129
|
-
/** Merged metadata cache
|
|
128
|
+
/** Merged metadata cache — used internally by unseal helper */
|
|
130
129
|
_merged?: RawClassMeta;
|
|
131
130
|
}
|
|
132
|
-
export interface JsonSchema202012 {
|
|
133
|
-
$schema?: string;
|
|
134
|
-
$id?: string;
|
|
135
|
-
$ref?: string;
|
|
136
|
-
$defs?: Record<string, JsonSchema202012>;
|
|
137
|
-
$comment?: string;
|
|
138
|
-
type?: string | string[];
|
|
139
|
-
enum?: unknown[];
|
|
140
|
-
const?: unknown;
|
|
141
|
-
minimum?: number;
|
|
142
|
-
maximum?: number;
|
|
143
|
-
exclusiveMinimum?: number;
|
|
144
|
-
exclusiveMaximum?: number;
|
|
145
|
-
multipleOf?: number;
|
|
146
|
-
minLength?: number;
|
|
147
|
-
maxLength?: number;
|
|
148
|
-
pattern?: string;
|
|
149
|
-
format?: string;
|
|
150
|
-
items?: JsonSchema202012;
|
|
151
|
-
prefixItems?: JsonSchema202012[];
|
|
152
|
-
contains?: JsonSchema202012;
|
|
153
|
-
minContains?: number;
|
|
154
|
-
maxContains?: number;
|
|
155
|
-
minItems?: number;
|
|
156
|
-
maxItems?: number;
|
|
157
|
-
uniqueItems?: boolean;
|
|
158
|
-
properties?: Record<string, JsonSchema202012>;
|
|
159
|
-
required?: string[];
|
|
160
|
-
additionalProperties?: boolean | JsonSchema202012;
|
|
161
|
-
unevaluatedProperties?: boolean | JsonSchema202012;
|
|
162
|
-
patternProperties?: Record<string, JsonSchema202012>;
|
|
163
|
-
propertyNames?: JsonSchema202012;
|
|
164
|
-
minProperties?: number;
|
|
165
|
-
maxProperties?: number;
|
|
166
|
-
dependentRequired?: Record<string, string[]>;
|
|
167
|
-
dependentSchemas?: Record<string, JsonSchema202012>;
|
|
168
|
-
allOf?: JsonSchema202012[];
|
|
169
|
-
anyOf?: JsonSchema202012[];
|
|
170
|
-
oneOf?: JsonSchema202012[];
|
|
171
|
-
not?: JsonSchema202012;
|
|
172
|
-
if?: JsonSchema202012;
|
|
173
|
-
then?: JsonSchema202012;
|
|
174
|
-
else?: JsonSchema202012;
|
|
175
|
-
title?: string;
|
|
176
|
-
description?: string;
|
|
177
|
-
default?: unknown;
|
|
178
|
-
examples?: unknown[];
|
|
179
|
-
deprecated?: boolean;
|
|
180
|
-
readOnly?: boolean;
|
|
181
|
-
writeOnly?: boolean;
|
|
182
|
-
contentEncoding?: string;
|
|
183
|
-
contentMediaType?: string;
|
|
184
|
-
contentSchema?: JsonSchema202012;
|
|
185
|
-
[key: string]: unknown;
|
|
186
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zipbul/baker",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Decorator-based validate + transform with inline code generation. class-validator DX, AOT-level performance, zero reflect-metadata.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Junhyung Park (https://github.com/parkrevil)",
|
|
@@ -63,13 +63,14 @@
|
|
|
63
63
|
"provenance": true
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@zipbul/result": "
|
|
66
|
+
"@zipbul/result": "1.0.0"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "bun build index.ts src/decorators/index.ts src/rules/index.ts src/symbols.ts --outdir dist --target bun --format esm --splitting --packages external --sourcemap=linked --root . --production && tsc -p tsconfig.build.json",
|
|
70
70
|
"typecheck": "tsc --noEmit",
|
|
71
71
|
"test": "bun test",
|
|
72
72
|
"test:coverage": "bun test --coverage",
|
|
73
|
+
"test:memory": "bun run scripts/check-memory.ts",
|
|
73
74
|
"changeset": "changeset",
|
|
74
75
|
"version-packages": "changeset version",
|
|
75
76
|
"release": "changeset publish",
|
|
@@ -79,7 +80,16 @@
|
|
|
79
80
|
"@changesets/cli": "^2.29.8",
|
|
80
81
|
"@commitlint/cli": "^20.4.2",
|
|
81
82
|
"@commitlint/config-conventional": "^20.4.2",
|
|
83
|
+
"@sinclair/typebox": "^0.34.48",
|
|
82
84
|
"@types/bun": "^1.3.9",
|
|
83
|
-
"
|
|
85
|
+
"ajv": "^8.18.0",
|
|
86
|
+
"arktype": "^2.2.0",
|
|
87
|
+
"class-transformer": "^0.5.1",
|
|
88
|
+
"class-validator": "^0.15.1",
|
|
89
|
+
"husky": "^9.1.7",
|
|
90
|
+
"mitata": "^1.0.34",
|
|
91
|
+
"reflect-metadata": "^0.2.2",
|
|
92
|
+
"valibot": "^1.3.1",
|
|
93
|
+
"zod": "^4.3.6"
|
|
84
94
|
}
|
|
85
95
|
}
|