golar 0.1.4 → 0.1.6

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.
Files changed (43) hide show
  1. package/dist/builtin-rules.d.ts +2 -3
  2. package/dist/builtin-rules.generated.d.ts +3 -3
  3. package/dist/codegen-plugin.js +0 -1
  4. package/dist/config.js +32 -15
  5. package/dist/internal/linter/rule-creator.d.ts +3 -2
  6. package/dist/internal/linter/rule-creator.js +10 -10
  7. package/dist/internal/linter/rules/explicit-anys/config.js +3 -3
  8. package/dist/node_modules/.pnpm/valibot@1.3.1_typescript@5.9.3/node_modules/valibot/dist/index.d.ts +1430 -0
  9. package/dist/node_modules/.pnpm/valibot@1.3.1_typescript@5.9.3/node_modules/valibot/dist/index.js +658 -0
  10. package/dist/packages/golar/package.js +3 -2
  11. package/dist/workspace.js +2 -2
  12. package/package.json +10 -9
  13. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.d.ts +0 -22
  14. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.js +0 -29
  15. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.js +0 -37
  16. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.d.ts +0 -16
  17. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.js +0 -19
  18. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.d.ts +0 -208
  19. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js +0 -578
  20. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.d.ts +0 -32
  21. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js +0 -470
  22. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.d.ts +0 -64
  23. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js +0 -225
  24. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.d.ts +0 -47
  25. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js +0 -61
  26. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/doc.js +0 -33
  27. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.d.ts +0 -127
  28. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js +0 -62
  29. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js +0 -214
  30. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.d.ts +0 -69
  31. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js +0 -109
  32. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js +0 -58
  33. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.d.ts +0 -31
  34. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.js +0 -49
  35. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.d.ts +0 -805
  36. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js +0 -1096
  37. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/standard-schema.d.ts +0 -120
  38. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.d.ts +0 -96
  39. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js +0 -289
  40. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.d.ts +0 -41
  41. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js +0 -304
  42. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.d.ts +0 -8
  43. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js +0 -9
@@ -1,214 +0,0 @@
1
- import { getEnumValues } from "./util.js";
2
- import { process } from "./to-json-schema.js";
3
-
4
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js
5
- const formatMap = {
6
- guid: "uuid",
7
- url: "uri",
8
- datetime: "date-time",
9
- json_string: "json-string",
10
- regex: ""
11
- };
12
- const stringProcessor = (schema, ctx, _json, _params) => {
13
- const json = _json;
14
- json.type = "string";
15
- const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
16
- if (typeof minimum === "number") json.minLength = minimum;
17
- if (typeof maximum === "number") json.maxLength = maximum;
18
- if (format) {
19
- json.format = formatMap[format] ?? format;
20
- if (json.format === "") delete json.format;
21
- if (format === "time") delete json.format;
22
- }
23
- if (contentEncoding) json.contentEncoding = contentEncoding;
24
- if (patterns && patterns.size > 0) {
25
- const regexes = [...patterns];
26
- if (regexes.length === 1) json.pattern = regexes[0].source;
27
- else if (regexes.length > 1) json.allOf = [...regexes.map((regex) => ({
28
- ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
29
- pattern: regex.source
30
- }))];
31
- }
32
- };
33
- const booleanProcessor = (_schema, _ctx, json, _params) => {
34
- json.type = "boolean";
35
- };
36
- const neverProcessor = (_schema, _ctx, json, _params) => {
37
- json.not = {};
38
- };
39
- const unknownProcessor = (_schema, _ctx, _json, _params) => {};
40
- const enumProcessor = (schema, _ctx, json, _params) => {
41
- const def = schema._zod.def;
42
- const values = getEnumValues(def.entries);
43
- if (values.every((v) => typeof v === "number")) json.type = "number";
44
- if (values.every((v) => typeof v === "string")) json.type = "string";
45
- json.enum = values;
46
- };
47
- const literalProcessor = (schema, ctx, json, _params) => {
48
- const def = schema._zod.def;
49
- const vals = [];
50
- for (const val of def.values) if (val === void 0) {
51
- if (ctx.unrepresentable === "throw") throw new Error("Literal `undefined` cannot be represented in JSON Schema");
52
- } else if (typeof val === "bigint") if (ctx.unrepresentable === "throw") throw new Error("BigInt literals cannot be represented in JSON Schema");
53
- else vals.push(Number(val));
54
- else vals.push(val);
55
- if (vals.length === 0) {} else if (vals.length === 1) {
56
- const val = vals[0];
57
- json.type = val === null ? "null" : typeof val;
58
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") json.enum = [val];
59
- else json.const = val;
60
- } else {
61
- if (vals.every((v) => typeof v === "number")) json.type = "number";
62
- if (vals.every((v) => typeof v === "string")) json.type = "string";
63
- if (vals.every((v) => typeof v === "boolean")) json.type = "boolean";
64
- if (vals.every((v) => v === null)) json.type = "null";
65
- json.enum = vals;
66
- }
67
- };
68
- const customProcessor = (_schema, ctx, _json, _params) => {
69
- if (ctx.unrepresentable === "throw") throw new Error("Custom types cannot be represented in JSON Schema");
70
- };
71
- const transformProcessor = (_schema, ctx, _json, _params) => {
72
- if (ctx.unrepresentable === "throw") throw new Error("Transforms cannot be represented in JSON Schema");
73
- };
74
- const arrayProcessor = (schema, ctx, _json, params) => {
75
- const json = _json;
76
- const def = schema._zod.def;
77
- const { minimum, maximum } = schema._zod.bag;
78
- if (typeof minimum === "number") json.minItems = minimum;
79
- if (typeof maximum === "number") json.maxItems = maximum;
80
- json.type = "array";
81
- json.items = process(def.element, ctx, {
82
- ...params,
83
- path: [...params.path, "items"]
84
- });
85
- };
86
- const objectProcessor = (schema, ctx, _json, params) => {
87
- const json = _json;
88
- const def = schema._zod.def;
89
- json.type = "object";
90
- json.properties = {};
91
- const shape = def.shape;
92
- for (const key in shape) json.properties[key] = process(shape[key], ctx, {
93
- ...params,
94
- path: [
95
- ...params.path,
96
- "properties",
97
- key
98
- ]
99
- });
100
- const allKeys = new Set(Object.keys(shape));
101
- const requiredKeys = new Set([...allKeys].filter((key) => {
102
- const v = def.shape[key]._zod;
103
- if (ctx.io === "input") return v.optin === void 0;
104
- else return v.optout === void 0;
105
- }));
106
- if (requiredKeys.size > 0) json.required = Array.from(requiredKeys);
107
- if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
108
- else if (!def.catchall) {
109
- if (ctx.io === "output") json.additionalProperties = false;
110
- } else if (def.catchall) json.additionalProperties = process(def.catchall, ctx, {
111
- ...params,
112
- path: [...params.path, "additionalProperties"]
113
- });
114
- };
115
- const unionProcessor = (schema, ctx, json, params) => {
116
- const def = schema._zod.def;
117
- const isExclusive = def.inclusive === false;
118
- const options = def.options.map((x, i) => process(x, ctx, {
119
- ...params,
120
- path: [
121
- ...params.path,
122
- isExclusive ? "oneOf" : "anyOf",
123
- i
124
- ]
125
- }));
126
- if (isExclusive) json.oneOf = options;
127
- else json.anyOf = options;
128
- };
129
- const intersectionProcessor = (schema, ctx, json, params) => {
130
- const def = schema._zod.def;
131
- const a = process(def.left, ctx, {
132
- ...params,
133
- path: [
134
- ...params.path,
135
- "allOf",
136
- 0
137
- ]
138
- });
139
- const b = process(def.right, ctx, {
140
- ...params,
141
- path: [
142
- ...params.path,
143
- "allOf",
144
- 1
145
- ]
146
- });
147
- const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
148
- json.allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
149
- };
150
- const nullableProcessor = (schema, ctx, json, params) => {
151
- const def = schema._zod.def;
152
- const inner = process(def.innerType, ctx, params);
153
- const seen = ctx.seen.get(schema);
154
- if (ctx.target === "openapi-3.0") {
155
- seen.ref = def.innerType;
156
- json.nullable = true;
157
- } else json.anyOf = [inner, { type: "null" }];
158
- };
159
- const nonoptionalProcessor = (schema, ctx, _json, params) => {
160
- const def = schema._zod.def;
161
- process(def.innerType, ctx, params);
162
- const seen = ctx.seen.get(schema);
163
- seen.ref = def.innerType;
164
- };
165
- const defaultProcessor = (schema, ctx, json, params) => {
166
- const def = schema._zod.def;
167
- process(def.innerType, ctx, params);
168
- const seen = ctx.seen.get(schema);
169
- seen.ref = def.innerType;
170
- json.default = JSON.parse(JSON.stringify(def.defaultValue));
171
- };
172
- const prefaultProcessor = (schema, ctx, json, params) => {
173
- const def = schema._zod.def;
174
- process(def.innerType, ctx, params);
175
- const seen = ctx.seen.get(schema);
176
- seen.ref = def.innerType;
177
- if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
178
- };
179
- const catchProcessor = (schema, ctx, json, params) => {
180
- const def = schema._zod.def;
181
- process(def.innerType, ctx, params);
182
- const seen = ctx.seen.get(schema);
183
- seen.ref = def.innerType;
184
- let catchValue;
185
- try {
186
- catchValue = def.catchValue(void 0);
187
- } catch {
188
- throw new Error("Dynamic catch values are not supported in JSON Schema");
189
- }
190
- json.default = catchValue;
191
- };
192
- const pipeProcessor = (schema, ctx, _json, params) => {
193
- const def = schema._zod.def;
194
- const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
195
- process(innerType, ctx, params);
196
- const seen = ctx.seen.get(schema);
197
- seen.ref = innerType;
198
- };
199
- const readonlyProcessor = (schema, ctx, json, params) => {
200
- const def = schema._zod.def;
201
- process(def.innerType, ctx, params);
202
- const seen = ctx.seen.get(schema);
203
- seen.ref = def.innerType;
204
- json.readOnly = true;
205
- };
206
- const optionalProcessor = (schema, ctx, _json, params) => {
207
- const def = schema._zod.def;
208
- process(def.innerType, ctx, params);
209
- const seen = ctx.seen.get(schema);
210
- seen.ref = def.innerType;
211
- };
212
-
213
- //#endregion
214
- export { arrayProcessor, booleanProcessor, catchProcessor, customProcessor, defaultProcessor, enumProcessor, intersectionProcessor, literalProcessor, neverProcessor, nonoptionalProcessor, nullableProcessor, objectProcessor, optionalProcessor, pipeProcessor, prefaultProcessor, readonlyProcessor, stringProcessor, transformProcessor, unionProcessor, unknownProcessor };
@@ -1,69 +0,0 @@
1
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.d.cts
2
- type _JSONSchema = boolean | JSONSchema;
3
- type JSONSchema = {
4
- [k: string]: unknown;
5
- $schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
6
- $id?: string;
7
- $anchor?: string;
8
- $ref?: string;
9
- $dynamicRef?: string;
10
- $dynamicAnchor?: string;
11
- $vocabulary?: Record<string, boolean>;
12
- $comment?: string;
13
- $defs?: Record<string, JSONSchema>;
14
- type?: "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
15
- additionalItems?: _JSONSchema;
16
- unevaluatedItems?: _JSONSchema;
17
- prefixItems?: _JSONSchema[];
18
- items?: _JSONSchema | _JSONSchema[];
19
- contains?: _JSONSchema;
20
- additionalProperties?: _JSONSchema;
21
- unevaluatedProperties?: _JSONSchema;
22
- properties?: Record<string, _JSONSchema>;
23
- patternProperties?: Record<string, _JSONSchema>;
24
- dependentSchemas?: Record<string, _JSONSchema>;
25
- propertyNames?: _JSONSchema;
26
- if?: _JSONSchema;
27
- then?: _JSONSchema;
28
- else?: _JSONSchema;
29
- allOf?: JSONSchema[];
30
- anyOf?: JSONSchema[];
31
- oneOf?: JSONSchema[];
32
- not?: _JSONSchema;
33
- multipleOf?: number;
34
- maximum?: number;
35
- exclusiveMaximum?: number | boolean;
36
- minimum?: number;
37
- exclusiveMinimum?: number | boolean;
38
- maxLength?: number;
39
- minLength?: number;
40
- pattern?: string;
41
- maxItems?: number;
42
- minItems?: number;
43
- uniqueItems?: boolean;
44
- maxContains?: number;
45
- minContains?: number;
46
- maxProperties?: number;
47
- minProperties?: number;
48
- required?: string[];
49
- dependentRequired?: Record<string, string[]>;
50
- enum?: Array<string | number | boolean | null>;
51
- const?: string | number | boolean | null;
52
- id?: string;
53
- title?: string;
54
- description?: string;
55
- default?: unknown;
56
- deprecated?: boolean;
57
- readOnly?: boolean;
58
- writeOnly?: boolean;
59
- nullable?: boolean;
60
- examples?: unknown[];
61
- format?: string;
62
- contentMediaType?: string;
63
- contentEncoding?: string;
64
- contentSchema?: JSONSchema;
65
- _prefault?: unknown;
66
- };
67
- type BaseSchema = JSONSchema;
68
- //#endregion
69
- export { BaseSchema };
@@ -1,109 +0,0 @@
1
- import { $ZodAsyncError, config } from "./core.js";
2
- import { captureStackTrace, finalizeIssue } from "./util.js";
3
- import { $ZodError, $ZodRealError } from "./errors.js";
4
-
5
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js
6
- const _parse = (_Err) => (schema, value, _ctx, _params) => {
7
- const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
8
- const result = schema._zod.run({
9
- value,
10
- issues: []
11
- }, ctx);
12
- if (result instanceof Promise) throw new $ZodAsyncError();
13
- if (result.issues.length) {
14
- const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
15
- captureStackTrace(e, _params?.callee);
16
- throw e;
17
- }
18
- return result.value;
19
- };
20
- const parse = /* @__PURE__ */ _parse($ZodRealError);
21
- const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
22
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
23
- let result = schema._zod.run({
24
- value,
25
- issues: []
26
- }, ctx);
27
- if (result instanceof Promise) result = await result;
28
- if (result.issues.length) {
29
- const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
30
- captureStackTrace(e, params?.callee);
31
- throw e;
32
- }
33
- return result.value;
34
- };
35
- const parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError);
36
- const _safeParse = (_Err) => (schema, value, _ctx) => {
37
- const ctx = _ctx ? {
38
- ..._ctx,
39
- async: false
40
- } : { async: false };
41
- const result = schema._zod.run({
42
- value,
43
- issues: []
44
- }, ctx);
45
- if (result instanceof Promise) throw new $ZodAsyncError();
46
- return result.issues.length ? {
47
- success: false,
48
- error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
49
- } : {
50
- success: true,
51
- data: result.value
52
- };
53
- };
54
- const safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
55
- const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
56
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
57
- let result = schema._zod.run({
58
- value,
59
- issues: []
60
- }, ctx);
61
- if (result instanceof Promise) result = await result;
62
- return result.issues.length ? {
63
- success: false,
64
- error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
65
- } : {
66
- success: true,
67
- data: result.value
68
- };
69
- };
70
- const safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
71
- const _encode = (_Err) => (schema, value, _ctx) => {
72
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
73
- return _parse(_Err)(schema, value, ctx);
74
- };
75
- const encode = /* @__PURE__ */ _encode($ZodRealError);
76
- const _decode = (_Err) => (schema, value, _ctx) => {
77
- return _parse(_Err)(schema, value, _ctx);
78
- };
79
- const decode = /* @__PURE__ */ _decode($ZodRealError);
80
- const _encodeAsync = (_Err) => async (schema, value, _ctx) => {
81
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
82
- return _parseAsync(_Err)(schema, value, ctx);
83
- };
84
- const encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
85
- const _decodeAsync = (_Err) => async (schema, value, _ctx) => {
86
- return _parseAsync(_Err)(schema, value, _ctx);
87
- };
88
- const decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
89
- const _safeEncode = (_Err) => (schema, value, _ctx) => {
90
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
91
- return _safeParse(_Err)(schema, value, ctx);
92
- };
93
- const safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
94
- const _safeDecode = (_Err) => (schema, value, _ctx) => {
95
- return _safeParse(_Err)(schema, value, _ctx);
96
- };
97
- const safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
98
- const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
99
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
100
- return _safeParseAsync(_Err)(schema, value, ctx);
101
- };
102
- const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
103
- const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
104
- return _safeParseAsync(_Err)(schema, value, _ctx);
105
- };
106
- const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
107
-
108
- //#endregion
109
- export { _decode, _decodeAsync, _encode, _encodeAsync, _parse, _parseAsync, _safeDecode, _safeDecodeAsync, _safeEncode, _safeEncodeAsync, _safeParse, _safeParseAsync, safeParse, safeParseAsync };
@@ -1,58 +0,0 @@
1
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js
2
- const cuid = /^[cC][^\s-]{8,}$/;
3
- const cuid2 = /^[0-9a-z]+$/;
4
- const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
5
- const xid = /^[0-9a-vA-V]{20}$/;
6
- const ksuid = /^[A-Za-z0-9]{27}$/;
7
- const nanoid = /^[a-zA-Z0-9_-]{21}$/;
8
- /** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */
9
- const duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
10
- /** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */
11
- const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
12
- /** Returns a regex for validating an RFC 9562/4122 UUID.
13
- *
14
- * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */
15
- const uuid = (version) => {
16
- if (!version) return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
17
- return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
18
- };
19
- /** Practical email validation */
20
- const email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
21
- const _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
22
- function emoji() {
23
- return new RegExp(_emoji, "u");
24
- }
25
- const ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
26
- const ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
27
- const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
28
- const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
29
- const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
30
- const base64url = /^[A-Za-z0-9_-]*$/;
31
- const e164 = /^\+[1-9]\d{6,14}$/;
32
- const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
33
- const date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
34
- function timeSource(args) {
35
- const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
36
- return typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
37
- }
38
- function time(args) {
39
- return new RegExp(`^${timeSource(args)}$`);
40
- }
41
- function datetime(args) {
42
- const time = timeSource({ precision: args.precision });
43
- const opts = ["Z"];
44
- if (args.local) opts.push("");
45
- if (args.offset) opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);
46
- const timeRegex = `${time}(?:${opts.join("|")})`;
47
- return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
48
- }
49
- const string = (params) => {
50
- const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
51
- return new RegExp(`^${regex}$`);
52
- };
53
- const boolean = /^(?:true|false)$/i;
54
- const lowercase = /^[^A-Z]*$/;
55
- const uppercase = /^[^a-z]*$/;
56
-
57
- //#endregion
58
- export { base64, base64url, boolean, cidrv4, cidrv6, cuid, cuid2, date, datetime, duration, e164, email, emoji, guid, ipv4, ipv6, ksuid, lowercase, nanoid, string, time, ulid, uppercase, uuid, xid };
@@ -1,31 +0,0 @@
1
- import { $ZodType } from "./schemas.js";
2
- import { input, output } from "./core.js";
3
-
4
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.d.cts
5
- declare const $output: unique symbol;
6
- type $output = typeof $output;
7
- declare const $input: unique symbol;
8
- type $input = typeof $input;
9
- type $replace<Meta, S extends $ZodType> = Meta extends $output ? output<S> : Meta extends $input ? input<S> : Meta extends (infer M)[] ? $replace<M, S>[] : Meta extends ((...args: infer P) => infer R) ? (...args: { [K in keyof P]: $replace<P[K], S> }) => $replace<R, S> : Meta extends object ? { [K in keyof Meta]: $replace<Meta[K], S> } : Meta;
10
- type MetadataType = object | undefined;
11
- declare class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {
12
- _meta: Meta;
13
- _schema: Schema;
14
- _map: WeakMap<Schema, $replace<Meta, Schema>>;
15
- _idmap: Map<string, Schema>;
16
- add<S extends Schema>(schema: S, ..._meta: undefined extends Meta ? [$replace<Meta, S>?] : [$replace<Meta, S>]): this;
17
- clear(): this;
18
- remove(schema: Schema): this;
19
- get<S extends Schema>(schema: S): $replace<Meta, S> | undefined;
20
- has(schema: Schema): boolean;
21
- }
22
- interface JSONSchemaMeta {
23
- id?: string | undefined;
24
- title?: string | undefined;
25
- description?: string | undefined;
26
- deprecated?: boolean | undefined;
27
- [k: string]: unknown;
28
- }
29
- interface GlobalMeta extends JSONSchemaMeta {}
30
- //#endregion
31
- export { $ZodRegistry, $replace, GlobalMeta };
@@ -1,49 +0,0 @@
1
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.js
2
- var _a;
3
- var $ZodRegistry = class {
4
- constructor() {
5
- this._map = /* @__PURE__ */ new WeakMap();
6
- this._idmap = /* @__PURE__ */ new Map();
7
- }
8
- add(schema, ..._meta) {
9
- const meta = _meta[0];
10
- this._map.set(schema, meta);
11
- if (meta && typeof meta === "object" && "id" in meta) this._idmap.set(meta.id, schema);
12
- return this;
13
- }
14
- clear() {
15
- this._map = /* @__PURE__ */ new WeakMap();
16
- this._idmap = /* @__PURE__ */ new Map();
17
- return this;
18
- }
19
- remove(schema) {
20
- const meta = this._map.get(schema);
21
- if (meta && typeof meta === "object" && "id" in meta) this._idmap.delete(meta.id);
22
- this._map.delete(schema);
23
- return this;
24
- }
25
- get(schema) {
26
- const p = schema._zod.parent;
27
- if (p) {
28
- const pm = { ...this.get(p) ?? {} };
29
- delete pm.id;
30
- const f = {
31
- ...pm,
32
- ...this._map.get(schema)
33
- };
34
- return Object.keys(f).length ? f : void 0;
35
- }
36
- return this._map.get(schema);
37
- }
38
- has(schema) {
39
- return this._map.has(schema);
40
- }
41
- };
42
- function registry() {
43
- return new $ZodRegistry();
44
- }
45
- (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
46
- const globalRegistry = globalThis.__zod_globalRegistry;
47
-
48
- //#endregion
49
- export { globalRegistry };