@kunk/model 3.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/.turbo/turbo-build.log +13 -0
- package/CHANGELOG.md +7 -0
- package/dist/chunk-q_BqMMLn.mjs +1 -0
- package/dist/index.d.mts +31 -0
- package/dist/index.mjs +1 -0
- package/package.json +17 -0
- package/src/T.ts +34 -0
- package/src/index.ts +1 -0
- package/tsdown.config.ts +15 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
$ tsdown
|
|
2
|
+
[34mℹ[39m tsdown [2mv0.20.3[22m powered by rolldown [2mv1.0.0-rc.3[22m
|
|
3
|
+
[34mℹ[39m config file: [4m/home/runner/work/kunk/kunk/packages/model/tsdown.config.ts[24m (unrun)
|
|
4
|
+
[34mℹ[39m entry: [34msrc/index.ts[39m
|
|
5
|
+
[34mℹ[39m tsconfig: [34m../../tsconfig.json[39m
|
|
6
|
+
[34mℹ[39m Build start
|
|
7
|
+
[34mℹ[39m [2mdist/[22m[1mindex.mjs[22m [2m0.92 kB[22m [2m│ gzip: 0.45 kB[22m
|
|
8
|
+
[34mℹ[39m [2mdist/[22mchunk-q_BqMMLn.mjs [2m0.21 kB[22m [2m│ gzip: 0.17 kB[22m
|
|
9
|
+
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.mts[22m[39m [2m1.36 kB[22m [2m│ gzip: 0.56 kB[22m
|
|
10
|
+
[34mℹ[39m 3 files, total: 2.48 kB
|
|
11
|
+
[33m[PLUGIN_TIMINGS] Warning:[0m Your build spent significant time in plugin `rolldown-plugin-dts:generate`. See https://rolldown.rs/options/checks#plugintimings for more details.
|
|
12
|
+
|
|
13
|
+
[32m✔[39m Build complete in [32m3883ms[39m
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __defProp=Object.defineProperty,__exportAll=(e,t)=>{let n={};for(var r in e)__defProp(n,r,{get:e[r],enumerable:!0});return t||__defProp(n,Symbol.toStringTag,{value:`Module`}),n};export{__exportAll as t};
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import z from "zod/v4";
|
|
2
|
+
|
|
3
|
+
//#region src/T.d.ts
|
|
4
|
+
declare namespace T_d_exports {
|
|
5
|
+
export { ModelError, any, array, boolean, codec, date, discriminatedUnion, _enum as enum, intersection, iso, literal, number, object, record, ref, string, toJSONSchema, tuple, union, uuid };
|
|
6
|
+
}
|
|
7
|
+
declare function ref<T extends readonly string[]>(...resource: T): z.ZodObject<{
|
|
8
|
+
resource: z.ZodEnum<{ [k_1 in T[number]]: k_1 } extends infer T_1 ? { [k in keyof T_1]: T_1[k] } : never>;
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
declare const object: typeof z.object;
|
|
12
|
+
declare const array: typeof z.array;
|
|
13
|
+
declare const uuid: typeof z.uuid;
|
|
14
|
+
declare const any: typeof z.any;
|
|
15
|
+
declare const record: typeof z.record;
|
|
16
|
+
declare const tuple: typeof z.tuple;
|
|
17
|
+
declare const union: typeof z.union;
|
|
18
|
+
declare const intersection: typeof z.intersection;
|
|
19
|
+
declare const literal: typeof z.literal;
|
|
20
|
+
declare const date: typeof z.date;
|
|
21
|
+
declare const iso: typeof z.iso;
|
|
22
|
+
declare const boolean: typeof z.boolean;
|
|
23
|
+
declare const number: typeof z.number;
|
|
24
|
+
declare const string: typeof z.string;
|
|
25
|
+
declare const codec: typeof z.codec;
|
|
26
|
+
declare const discriminatedUnion: typeof z.discriminatedUnion;
|
|
27
|
+
declare const toJSONSchema: typeof z.core.toJSONSchema;
|
|
28
|
+
declare const ModelError: z.core.$constructor<z.ZodError<unknown>, z.core.$ZodIssue[]>;
|
|
29
|
+
declare const _enum: typeof z.enum;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { T_d_exports as T };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as __exportAll}from"./chunk-q_BqMMLn.mjs";import z from"zod/v4";var T_exports=__exportAll({ModelError:()=>ModelError,any:()=>any,array:()=>array,boolean:()=>boolean,codec:()=>codec,date:()=>date,discriminatedUnion:()=>discriminatedUnion,enum:()=>_enum,intersection:()=>intersection,iso:()=>iso,literal:()=>literal,number:()=>number,object:()=>object,record:()=>record,ref:()=>ref,string:()=>string,toJSONSchema:()=>toJSONSchema,tuple:()=>tuple,union:()=>union,uuid:()=>uuid});function ref(...e){return z.object({resource:z.enum(e),id:z.string()})}const object=z.object,array=z.array,uuid=z.uuid,any=z.any,record=z.record,tuple=z.tuple,union=z.union,intersection=z.intersection,literal=z.literal,date=z.date,iso=z.iso,boolean=z.boolean,number=z.number,string=z.string,codec=z.codec,discriminatedUnion=z.discriminatedUnion,toJSONSchema=z.toJSONSchema,ModelError=z.ZodError,_enum=z.enum;export{T_exports as T};
|
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kunk/model",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./src/index.ts",
|
|
7
|
+
"module": "./src/index.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsdown"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"zod": "^4.3.6"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
}
|
|
17
|
+
}
|
package/src/T.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import z from "zod/v4";
|
|
2
|
+
|
|
3
|
+
export function ref<T extends readonly string[]>(...resource: T) {
|
|
4
|
+
return z.object({
|
|
5
|
+
resource: z.enum(resource),
|
|
6
|
+
id: z.string()
|
|
7
|
+
})
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const object = z.object
|
|
11
|
+
export const array = z.array
|
|
12
|
+
export const uuid = z.uuid
|
|
13
|
+
export const any = z.any
|
|
14
|
+
export const record = z.record
|
|
15
|
+
export const tuple = z.tuple
|
|
16
|
+
export const union = z.union
|
|
17
|
+
export const intersection = z.intersection
|
|
18
|
+
export const literal = z.literal
|
|
19
|
+
export const date = z.date
|
|
20
|
+
export const iso = z.iso
|
|
21
|
+
export const boolean = z.boolean
|
|
22
|
+
export const number = z.number
|
|
23
|
+
export const string = z.string
|
|
24
|
+
export const codec = z.codec
|
|
25
|
+
export const discriminatedUnion = z.discriminatedUnion
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export const toJSONSchema = z.toJSONSchema
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export const ModelError = z.ZodError
|
|
32
|
+
|
|
33
|
+
const _enum = z.enum
|
|
34
|
+
export { _enum as enum }
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as T from "./T"
|