@tktb-tess/my-zod-schema 0.1.5 → 0.2.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/dist/bundle.js CHANGED
@@ -1,189 +1,267 @@
1
- import e from "zod";
2
- const c = {
3
- from: (n = "", r = "", t) => ({
4
- name: n,
5
- message: r,
6
- cause: t
7
- })
8
- }, k = (n, r) => {
9
- try {
10
- const t = r.safeParse(JSON.parse(n));
11
- return t.success ? {
12
- success: !0,
13
- data: t.data
14
- } : {
15
- success: !1,
16
- error: t.error
17
- };
18
- } catch (t) {
19
- return {
20
- success: !1,
21
- error: t instanceof Error ? c.from(t.name, t.message, t.cause) : c.from("UnidentifiedError", "unidentified error", t)
22
- };
23
- }
24
- }, a = e.object({
25
- id: e.int().nonnegative(),
26
- form: e.string()
27
- }).brand(), m = e.object({
28
- title: e.string(),
29
- forms: e.string().array(),
30
- rawForms: e.string().optional()
31
- }), l = e.object({
32
- title: e.string(),
33
- text: e.string()
34
- }), g = e.object({
35
- title: e.string(),
36
- form: e.string()
37
- }), b = e.object({
38
- title: e.string(),
39
- entry: a
40
- }), d = {
41
- entry: a,
42
- translations: m.array(),
43
- tags: e.string().array(),
44
- contents: l.array(),
45
- variations: g.array(),
46
- relations: b.array()
47
- }, p = e.object(d), S = e.looseObject(d), h = e.object({
48
- id: e.int().nonnegative(),
49
- sentence: e.string(),
50
- translation: e.string(),
51
- supplement: e.string().optional(),
52
- tags: e.string().array(),
53
- words: e.object({
54
- id: e.int().nonnegative()
1
+ import t from "zod";
2
+ const e = t.object({
3
+ id: t.int().nonnegative(),
4
+ form: t.string()
5
+ }).brand(), i = t.object({
6
+ title: t.string(),
7
+ forms: t.string().array(),
8
+ rawForms: t.string().optional()
9
+ }), s = t.object({
10
+ title: t.string(),
11
+ text: t.string()
12
+ }), c = t.object({
13
+ title: t.string(),
14
+ form: t.string()
15
+ }), l = t.object({
16
+ title: t.string(),
17
+ entry: e
18
+ }), m = {
19
+ entry: e,
20
+ translations: i.array(),
21
+ tags: t.string().array(),
22
+ contents: s.array(),
23
+ variations: c.array(),
24
+ relations: l.array()
25
+ }, g = t.object(m), p = t.looseObject(m), d = t.object({
26
+ id: t.int().nonnegative(),
27
+ sentence: t.string(),
28
+ translation: t.string(),
29
+ supplement: t.string().optional(),
30
+ tags: t.string().array(),
31
+ words: t.object({
32
+ id: t.int().nonnegative()
55
33
  }).array(),
56
- offer: e.object({
57
- catalog: e.string(),
58
- number: e.int().nonnegative()
34
+ offer: t.object({
35
+ catalog: t.string(),
36
+ number: t.int().nonnegative()
59
37
  }).optional()
60
- }), u = e.object({
61
- explanation: e.string().optional(),
62
- punctuations: e.string().array(),
63
- ignoredPattern: e.string().optional(),
64
- pronunciationTitle: e.string(),
65
- enableMarkdown: e.boolean()
66
- }), j = e.object({
67
- version: e.literal(1).optional(),
38
+ }), b = t.object({
39
+ explanation: t.string().optional(),
40
+ punctuations: t.string().array(),
41
+ ignoredPattern: t.string().optional(),
42
+ pronunciationTitle: t.string(),
43
+ enableMarkdown: t.boolean()
44
+ }), y = t.object({
45
+ version: t.literal(1).optional(),
46
+ words: g.array()
47
+ }).brand(), n = t.looseObject({
48
+ version: t.literal(2),
68
49
  words: p.array()
69
- }).brand(), o = e.looseObject({
70
- version: e.literal(2),
71
- words: S.array()
72
- }).brand(), z = e.discriminatedUnion("version", [
73
- j,
74
- o
75
- ]), E = o.extend({
76
- examples: h.array(),
77
- zpdicOnline: u,
78
- snoj: e.string().optional(),
79
- zatlin: e.string().optional()
80
- }), A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
50
+ }).brand(), x = t.discriminatedUnion("version", [
51
+ y,
52
+ n
53
+ ]), O = n.extend({
54
+ examples: d.array(),
55
+ zpdicOnline: b,
56
+ snoj: t.string().optional(),
57
+ zatlin: t.string().optional()
58
+ }), F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
81
59
  __proto__: null,
82
- contentSchema: l,
83
- entrySchema: a,
84
- otmjsonSchema: z,
85
- relationSchema: b,
86
- translationSchema: m,
87
- v1Schema: j,
88
- v2Schema: o,
89
- variationSchema: g,
90
- wordv1Schema: p,
91
- wordv2Schema: S,
92
- zpdicConfigSchema: u,
93
- zpdicExampleSchema: h,
94
- zpdicOtmSchema: E
95
- }, Symbol.toStringTag, { value: "Module" })), _ = e.object({
96
- titles: e.string().array(),
97
- names: e.string().array(),
98
- nameString: e.string(),
99
- ignoredPattern: e.string(),
100
- hidden: e.boolean()
101
- }), s = e.string().brand(), R = e.object({
102
- title: e.string(),
103
- text: e.string(),
104
- hidden: e.boolean()
105
- }), P = e.object({
106
- titles: e.string().array(),
107
- form: e.string(),
108
- terms: e.string().array(),
109
- termString: e.string(),
110
- ignoredPattern: e.string()
111
- }), M = e.object({
112
- title: e.string(),
113
- name: e.string(),
114
- pronunciation: e.string()
115
- }), T = e.object({
116
- titles: e.string().array(),
117
- number: e.int().nonnegative(),
118
- name: e.string()
119
- }), f = e.string(), y = e.object({
120
- sentence: e.string(),
121
- supplement: e.string(),
122
- translation: e.string(),
123
- tags: e.string().array(),
124
- words: e.object({
125
- number: e.number()
60
+ contentSchema: s,
61
+ entrySchema: e,
62
+ otmjsonSchema: x,
63
+ relationSchema: l,
64
+ translationSchema: i,
65
+ v1Schema: y,
66
+ v2Schema: n,
67
+ variationSchema: c,
68
+ wordv1Schema: g,
69
+ wordv2Schema: p,
70
+ zpdicConfigSchema: b,
71
+ zpdicExampleSchema: d,
72
+ zpdicOtmSchema: O
73
+ }, Symbol.toStringTag, { value: "Module" })), w = t.object({
74
+ titles: t.string().array(),
75
+ names: t.string().array(),
76
+ nameString: t.string(),
77
+ ignoredPattern: t.string(),
78
+ hidden: t.boolean()
79
+ }), a = t.string().brand(), z = t.object({
80
+ title: t.string(),
81
+ text: t.string(),
82
+ hidden: t.boolean()
83
+ }), _ = t.object({
84
+ titles: t.string().array(),
85
+ form: t.string(),
86
+ terms: t.string().array(),
87
+ termString: t.string(),
88
+ ignoredPattern: t.string()
89
+ }), P = t.object({
90
+ title: t.string(),
91
+ name: t.string(),
92
+ pronunciation: t.string()
93
+ }), T = t.object({
94
+ titles: t.string().array(),
95
+ number: t.int().nonnegative(),
96
+ name: t.string()
97
+ }), S = t.string(), j = t.object({
98
+ sentence: t.string(),
99
+ supplement: t.string(),
100
+ translation: t.string(),
101
+ tags: t.string().array(),
102
+ words: t.object({
103
+ number: t.number()
126
104
  }).array(),
127
- offer: e.object({
128
- catalog: f,
129
- number: e.number()
105
+ offer: t.object({
106
+ catalog: S,
107
+ number: t.number()
130
108
  }).nullable()
131
- }), i = y.extend({
132
- id: s,
133
- number: e.int().nonnegative()
134
- }), v = e.object({
135
- name: e.string(),
136
- pronunciation: e.string(),
137
- equivalents: _.array(),
138
- tags: e.string().array(),
139
- phrases: P.array(),
140
- informations: R.array(),
141
- variations: M.array(),
109
+ }), r = j.extend({
110
+ id: a,
111
+ number: t.int().nonnegative()
112
+ }), h = t.object({
113
+ name: t.string(),
114
+ pronunciation: t.string(),
115
+ equivalents: w.array(),
116
+ tags: t.string().array(),
117
+ phrases: _.array(),
118
+ informations: z.array(),
119
+ variations: P.array(),
142
120
  relations: T.array()
143
- }), x = v.extend({
144
- id: s,
145
- number: e.int().nonnegative()
146
- }), w = x.extend({
147
- examples: i.array()
148
- }), q = e.object({
149
- word: x
150
- }), C = e.object({
151
- word: w
152
- }), D = e.object({
153
- words: w.array(),
154
- total: e.int().nonnegative()
155
- }), I = e.object({
156
- example: i
157
- }), J = e.object({
158
- examples: i.array(),
159
- total: e.int().nonnegative()
160
- }), O = e.object({
161
- id: s,
162
- catalog: f,
163
- number: e.int().nonnegative(),
164
- translation: e.string(),
165
- supplement: e.string(),
166
- author: e.string()
167
- }), N = e.object({
168
- exampleOffer: O
169
- }), U = e.object({
170
- exampleOffers: O.array(),
171
- total: e.int().nonnegative()
172
- }), F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
121
+ }), u = h.extend({
122
+ id: a,
123
+ number: t.int().nonnegative()
124
+ }), v = u.extend({
125
+ examples: r.array()
126
+ }), E = t.object({
127
+ word: u
128
+ }), R = t.object({
129
+ word: v
130
+ }), I = t.object({
131
+ words: v.array(),
132
+ total: t.int().nonnegative()
133
+ }), N = t.object({
134
+ example: r
135
+ }), $ = t.object({
136
+ examples: r.array(),
137
+ total: t.int().nonnegative()
138
+ }), f = t.object({
139
+ id: a,
140
+ catalog: S,
141
+ number: t.int().nonnegative(),
142
+ translation: t.string(),
143
+ supplement: t.string(),
144
+ author: t.string()
145
+ }), A = t.object({
146
+ exampleOffer: f
147
+ }), C = t.object({
148
+ exampleOffers: f.array(),
149
+ total: t.int().nonnegative()
150
+ }), G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
151
+ __proto__: null,
152
+ editableExampleSchema: j,
153
+ editableWordSchema: h,
154
+ exOfferResponseSchema: A,
155
+ exResponseSchema: N,
156
+ mExOfferResponseSchema: C,
157
+ mExResponseSchema: $,
158
+ mwweResponseSchema: I,
159
+ wordResponseSchema: E,
160
+ wweResponseSchema: R
161
+ }, Symbol.toStringTag, { value: "Module" })), M = t.object({
162
+ lastUpdate: t.iso.datetime(),
163
+ numberOf: t.int().nonnegative()
164
+ }), D = t.tuple([t.int().nonnegative(), t.int()]).readonly().array(), o = t.object({
165
+ id: t.string(),
166
+ name: t.string().array(),
167
+ colorName: t.tuple([t.string(), t.string()]),
168
+ namedBy: t.string().optional()
169
+ }), U = t.discriminatedUnion("commaType", [
170
+ o.extend({
171
+ commaType: t.literal("rational"),
172
+ monzo: D
173
+ }),
174
+ o.extend({
175
+ commaType: t.literal("irrational"),
176
+ ratio: t.string(),
177
+ cents: t.number().nonnegative()
178
+ })
179
+ ]), L = t.object({
180
+ metadata: M,
181
+ commas: U.array()
182
+ }), H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
183
+ __proto__: null,
184
+ commaDataSchema: L
185
+ }, Symbol.toStringTag, { value: "Module" })), J = t.union([
186
+ t.literal("INT"),
187
+ t.literal("ART"),
188
+ t.literal("EXP"),
189
+ t.literal("PHI"),
190
+ t.literal("HYP"),
191
+ t.literal("NAT"),
192
+ t.literal("REA"),
193
+ t.literal("IMG"),
194
+ t.literal("CIN"),
195
+ t.literal("CDE"),
196
+ t.literal("GEN"),
197
+ t.literal("SPE"),
198
+ t.literal("SON"),
199
+ t.literal("LIT"),
200
+ t.literal("KIN"),
201
+ t.literal("SER"),
202
+ t.literal("JOK"),
203
+ t.literal("PAV"),
204
+ t.literal("AAV"),
205
+ t.literal("PWL"),
206
+ t.literal("AWL"),
207
+ t.literal("TOL"),
208
+ t.literal("PRI"),
209
+ t.literal("PUB"),
210
+ t.literal("FIX")
211
+ ]), W = t.object({
212
+ datasize: t.tuple([t.int().nonnegative(), t.int().nonnegative()]),
213
+ title: t.string(),
214
+ author: t.string().array(),
215
+ createdDate: t.iso.datetime(),
216
+ lastUpdate: t.iso.datetime(),
217
+ jsonLastUpdate: t.iso.datetime(),
218
+ license: t.object({
219
+ name: t.string(),
220
+ content: t.string()
221
+ }),
222
+ advanced: t.int().nonnegative(),
223
+ label: t.string().array(),
224
+ type: t.string().array()
225
+ }), k = t.object({
226
+ id: t.string(),
227
+ messier: t.unknown().optional(),
228
+ name: t.string().array(),
229
+ kanji: t.string().array(),
230
+ desc: t.string().array(),
231
+ creator: t.string().array(),
232
+ period: t.string().optional(),
233
+ site: t.object({
234
+ name: t.string().optional(),
235
+ url: t.url()
236
+ }).array().optional(),
237
+ twitter: t.string().array().optional(),
238
+ dict: t.string().array().optional(),
239
+ grammar: t.string().array().optional(),
240
+ world: t.string().array().optional(),
241
+ category: t.object({
242
+ name: t.string(),
243
+ content: t.string().optional()
244
+ }).array().optional(),
245
+ moyune: J.array().optional(),
246
+ clav3: t.object({
247
+ dialect: t.string().regex(/^(?:[a-z]{2}|~)$/),
248
+ language: t.string().regex(/^[a-z]{2}$/),
249
+ family: t.string().regex(/^(?:[a-z]{3}|~)$/),
250
+ creator: t.string().regex(/^[a-z]{3}$/)
251
+ }).optional(),
252
+ part: t.string().optional(),
253
+ example: t.string().array().optional(),
254
+ script: t.string().array().optional()
255
+ }), B = t.object({
256
+ metadata: W,
257
+ contents: k.array()
258
+ }).brand(), K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
173
259
  __proto__: null,
174
- editableExampleSchema: y,
175
- editableWordSchema: v,
176
- exOfferResponseSchema: N,
177
- exResponseSchema: I,
178
- mExOfferResponseSchema: U,
179
- mExResponseSchema: J,
180
- mwweResponseSchema: D,
181
- wordResponseSchema: q,
182
- wweResponseSchema: C
260
+ schema: B
183
261
  }, Symbol.toStringTag, { value: "Module" }));
184
262
  export {
185
- c as MiscError,
186
- A as OTMJSON,
187
- F as ZpDIC,
188
- k as parseAndValidate
263
+ H as Comma,
264
+ K as CotecJSON,
265
+ F as OTMJSON,
266
+ G as ZpDIC
189
267
  };
@@ -0,0 +1,49 @@
1
+ import { default as z } from 'zod';
2
+ declare const metadataSchema: z.ZodObject<{
3
+ lastUpdate: z.ZodISODateTime;
4
+ numberOf: z.ZodInt;
5
+ }, z.core.$strip>;
6
+ export type Metadata = z.infer<typeof metadataSchema>;
7
+ declare const monzoSchema: z.ZodArray<z.ZodReadonly<z.ZodTuple<[z.ZodInt, z.ZodInt], null>>>;
8
+ export type Monzo = z.infer<typeof monzoSchema>;
9
+ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
10
+ id: z.ZodString;
11
+ name: z.ZodArray<z.ZodString>;
12
+ colorName: z.ZodTuple<[z.ZodString, z.ZodString], null>;
13
+ namedBy: z.ZodOptional<z.ZodString>;
14
+ commaType: z.ZodLiteral<"rational">;
15
+ monzo: z.ZodArray<z.ZodReadonly<z.ZodTuple<[z.ZodInt, z.ZodInt], null>>>;
16
+ }, z.core.$strip>, z.ZodObject<{
17
+ id: z.ZodString;
18
+ name: z.ZodArray<z.ZodString>;
19
+ colorName: z.ZodTuple<[z.ZodString, z.ZodString], null>;
20
+ namedBy: z.ZodOptional<z.ZodString>;
21
+ commaType: z.ZodLiteral<"irrational">;
22
+ ratio: z.ZodString;
23
+ cents: z.ZodNumber;
24
+ }, z.core.$strip>], "commaType">;
25
+ export type Content = z.infer<typeof contentSchema>;
26
+ export declare const commaDataSchema: z.ZodObject<{
27
+ metadata: z.ZodObject<{
28
+ lastUpdate: z.ZodISODateTime;
29
+ numberOf: z.ZodInt;
30
+ }, z.core.$strip>;
31
+ commas: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
32
+ id: z.ZodString;
33
+ name: z.ZodArray<z.ZodString>;
34
+ colorName: z.ZodTuple<[z.ZodString, z.ZodString], null>;
35
+ namedBy: z.ZodOptional<z.ZodString>;
36
+ commaType: z.ZodLiteral<"rational">;
37
+ monzo: z.ZodArray<z.ZodReadonly<z.ZodTuple<[z.ZodInt, z.ZodInt], null>>>;
38
+ }, z.core.$strip>, z.ZodObject<{
39
+ id: z.ZodString;
40
+ name: z.ZodArray<z.ZodString>;
41
+ colorName: z.ZodTuple<[z.ZodString, z.ZodString], null>;
42
+ namedBy: z.ZodOptional<z.ZodString>;
43
+ commaType: z.ZodLiteral<"irrational">;
44
+ ratio: z.ZodString;
45
+ cents: z.ZodNumber;
46
+ }, z.core.$strip>], "commaType">>;
47
+ }, z.core.$strip>;
48
+ export type CommaData = z.infer<typeof commaDataSchema>;
49
+ export {};
@@ -0,0 +1,102 @@
1
+ import { default as z } from 'zod';
2
+ declare const moyuneClassSchema: z.ZodUnion<readonly [z.ZodLiteral<"INT">, z.ZodLiteral<"ART">, z.ZodLiteral<"EXP">, z.ZodLiteral<"PHI">, z.ZodLiteral<"HYP">, z.ZodLiteral<"NAT">, z.ZodLiteral<"REA">, z.ZodLiteral<"IMG">, z.ZodLiteral<"CIN">, z.ZodLiteral<"CDE">, z.ZodLiteral<"GEN">, z.ZodLiteral<"SPE">, z.ZodLiteral<"SON">, z.ZodLiteral<"LIT">, z.ZodLiteral<"KIN">, z.ZodLiteral<"SER">, z.ZodLiteral<"JOK">, z.ZodLiteral<"PAV">, z.ZodLiteral<"AAV">, z.ZodLiteral<"PWL">, z.ZodLiteral<"AWL">, z.ZodLiteral<"TOL">, z.ZodLiteral<"PRI">, z.ZodLiteral<"PUB">, z.ZodLiteral<"FIX">]>;
3
+ export type MoyuneClass = z.infer<typeof moyuneClassSchema>;
4
+ declare const metadataSchema: z.ZodObject<{
5
+ datasize: z.ZodTuple<[z.ZodInt, z.ZodInt], null>;
6
+ title: z.ZodString;
7
+ author: z.ZodArray<z.ZodString>;
8
+ createdDate: z.ZodISODateTime;
9
+ lastUpdate: z.ZodISODateTime;
10
+ jsonLastUpdate: z.ZodISODateTime;
11
+ license: z.ZodObject<{
12
+ name: z.ZodString;
13
+ content: z.ZodString;
14
+ }, z.core.$strip>;
15
+ advanced: z.ZodInt;
16
+ label: z.ZodArray<z.ZodString>;
17
+ type: z.ZodArray<z.ZodString>;
18
+ }, z.core.$strip>;
19
+ export type Metadata = z.infer<typeof metadataSchema>;
20
+ declare const contentSchema: z.ZodObject<{
21
+ id: z.ZodString;
22
+ messier: z.ZodOptional<z.ZodUnknown>;
23
+ name: z.ZodArray<z.ZodString>;
24
+ kanji: z.ZodArray<z.ZodString>;
25
+ desc: z.ZodArray<z.ZodString>;
26
+ creator: z.ZodArray<z.ZodString>;
27
+ period: z.ZodOptional<z.ZodString>;
28
+ site: z.ZodOptional<z.ZodArray<z.ZodObject<{
29
+ name: z.ZodOptional<z.ZodString>;
30
+ url: z.ZodURL;
31
+ }, z.core.$strip>>>;
32
+ twitter: z.ZodOptional<z.ZodArray<z.ZodString>>;
33
+ dict: z.ZodOptional<z.ZodArray<z.ZodString>>;
34
+ grammar: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
+ world: z.ZodOptional<z.ZodArray<z.ZodString>>;
36
+ category: z.ZodOptional<z.ZodArray<z.ZodObject<{
37
+ name: z.ZodString;
38
+ content: z.ZodOptional<z.ZodString>;
39
+ }, z.core.$strip>>>;
40
+ moyune: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"INT">, z.ZodLiteral<"ART">, z.ZodLiteral<"EXP">, z.ZodLiteral<"PHI">, z.ZodLiteral<"HYP">, z.ZodLiteral<"NAT">, z.ZodLiteral<"REA">, z.ZodLiteral<"IMG">, z.ZodLiteral<"CIN">, z.ZodLiteral<"CDE">, z.ZodLiteral<"GEN">, z.ZodLiteral<"SPE">, z.ZodLiteral<"SON">, z.ZodLiteral<"LIT">, z.ZodLiteral<"KIN">, z.ZodLiteral<"SER">, z.ZodLiteral<"JOK">, z.ZodLiteral<"PAV">, z.ZodLiteral<"AAV">, z.ZodLiteral<"PWL">, z.ZodLiteral<"AWL">, z.ZodLiteral<"TOL">, z.ZodLiteral<"PRI">, z.ZodLiteral<"PUB">, z.ZodLiteral<"FIX">]>>>;
41
+ clav3: z.ZodOptional<z.ZodObject<{
42
+ dialect: z.ZodString;
43
+ language: z.ZodString;
44
+ family: z.ZodString;
45
+ creator: z.ZodString;
46
+ }, z.core.$strip>>;
47
+ part: z.ZodOptional<z.ZodString>;
48
+ example: z.ZodOptional<z.ZodArray<z.ZodString>>;
49
+ script: z.ZodOptional<z.ZodArray<z.ZodString>>;
50
+ }, z.core.$strip>;
51
+ export type Content = z.infer<typeof contentSchema>;
52
+ declare const cotec_json_brand: unique symbol;
53
+ export declare const schema: z.core.$ZodBranded<z.ZodObject<{
54
+ metadata: z.ZodObject<{
55
+ datasize: z.ZodTuple<[z.ZodInt, z.ZodInt], null>;
56
+ title: z.ZodString;
57
+ author: z.ZodArray<z.ZodString>;
58
+ createdDate: z.ZodISODateTime;
59
+ lastUpdate: z.ZodISODateTime;
60
+ jsonLastUpdate: z.ZodISODateTime;
61
+ license: z.ZodObject<{
62
+ name: z.ZodString;
63
+ content: z.ZodString;
64
+ }, z.core.$strip>;
65
+ advanced: z.ZodInt;
66
+ label: z.ZodArray<z.ZodString>;
67
+ type: z.ZodArray<z.ZodString>;
68
+ }, z.core.$strip>;
69
+ contents: z.ZodArray<z.ZodObject<{
70
+ id: z.ZodString;
71
+ messier: z.ZodOptional<z.ZodUnknown>;
72
+ name: z.ZodArray<z.ZodString>;
73
+ kanji: z.ZodArray<z.ZodString>;
74
+ desc: z.ZodArray<z.ZodString>;
75
+ creator: z.ZodArray<z.ZodString>;
76
+ period: z.ZodOptional<z.ZodString>;
77
+ site: z.ZodOptional<z.ZodArray<z.ZodObject<{
78
+ name: z.ZodOptional<z.ZodString>;
79
+ url: z.ZodURL;
80
+ }, z.core.$strip>>>;
81
+ twitter: z.ZodOptional<z.ZodArray<z.ZodString>>;
82
+ dict: z.ZodOptional<z.ZodArray<z.ZodString>>;
83
+ grammar: z.ZodOptional<z.ZodArray<z.ZodString>>;
84
+ world: z.ZodOptional<z.ZodArray<z.ZodString>>;
85
+ category: z.ZodOptional<z.ZodArray<z.ZodObject<{
86
+ name: z.ZodString;
87
+ content: z.ZodOptional<z.ZodString>;
88
+ }, z.core.$strip>>>;
89
+ moyune: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"INT">, z.ZodLiteral<"ART">, z.ZodLiteral<"EXP">, z.ZodLiteral<"PHI">, z.ZodLiteral<"HYP">, z.ZodLiteral<"NAT">, z.ZodLiteral<"REA">, z.ZodLiteral<"IMG">, z.ZodLiteral<"CIN">, z.ZodLiteral<"CDE">, z.ZodLiteral<"GEN">, z.ZodLiteral<"SPE">, z.ZodLiteral<"SON">, z.ZodLiteral<"LIT">, z.ZodLiteral<"KIN">, z.ZodLiteral<"SER">, z.ZodLiteral<"JOK">, z.ZodLiteral<"PAV">, z.ZodLiteral<"AAV">, z.ZodLiteral<"PWL">, z.ZodLiteral<"AWL">, z.ZodLiteral<"TOL">, z.ZodLiteral<"PRI">, z.ZodLiteral<"PUB">, z.ZodLiteral<"FIX">]>>>;
90
+ clav3: z.ZodOptional<z.ZodObject<{
91
+ dialect: z.ZodString;
92
+ language: z.ZodString;
93
+ family: z.ZodString;
94
+ creator: z.ZodString;
95
+ }, z.core.$strip>>;
96
+ part: z.ZodOptional<z.ZodString>;
97
+ example: z.ZodOptional<z.ZodArray<z.ZodString>>;
98
+ script: z.ZodOptional<z.ZodArray<z.ZodString>>;
99
+ }, z.core.$strip>>;
100
+ }, z.core.$strip>, typeof cotec_json_brand>;
101
+ export type Data = z.infer<typeof schema>;
102
+ export {};
package/dist/main.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- export * from './util';
2
1
  export * as OTMJSON from './otmjson';
3
2
  export * as ZpDIC from './zpdic';
3
+ export * as Comma from './comma-data';
4
+ export * as CotecJSON from './cotec-json';
package/dist/util.d.ts CHANGED
@@ -1,20 +1 @@
1
- import { default as z } from 'zod';
2
- export type Result<T, E> = {
3
- success: true;
4
- data: T;
5
- } | {
6
- success: false;
7
- error: E;
8
- };
9
- declare const misc_err_brand: unique symbol;
10
- type MiscError<T = unknown> = {
11
- readonly name: string;
12
- readonly message: string;
13
- readonly cause?: T;
14
- readonly [misc_err_brand]: unknown;
15
- };
16
- declare const MiscError: {
17
- from: <T = unknown>(name?: string, message?: string, cause?: T) => MiscError<T>;
18
- };
19
- export { MiscError };
20
- export declare const parseAndValidate: <T extends z.ZodType>(json: string, schema: T) => Result<z.infer<T>, z.ZodError<z.infer<T>> | MiscError>;
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tktb-tess/my-zod-schema",
3
- "version": "0.1.5",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "license": "CC0-1.0",
6
6
  "publishConfig": {
@@ -10,7 +10,8 @@
10
10
  "dist"
11
11
  ],
12
12
  "engines": {
13
- "node": "^22.0.0"
13
+ "node": "^22",
14
+ "pnpm": "^10"
14
15
  },
15
16
  "main": "./dist/bundle.js",
16
17
  "types": "./dist/main.d.ts",
@@ -18,11 +19,6 @@
18
19
  "types": "./dist/main.d.ts",
19
20
  "import": "./dist/bundle.js"
20
21
  },
21
- "scripts": {
22
- "dev": "vite",
23
- "build": "tsc && vite build",
24
- "test": "vitest run"
25
- },
26
22
  "devDependencies": {
27
23
  "@types/node": "^24.3.1",
28
24
  "npm-check-updates": "^18.1.1",
@@ -42,5 +38,12 @@
42
38
  },
43
39
  "volta": {
44
40
  "node": "22.19.0"
41
+ },
42
+ "scripts": {
43
+ "dev": "vite",
44
+ "build": "tsc && vite build",
45
+ "test": "vitest run",
46
+ "preinstall": "npx only-allow pnpm",
47
+ "typecheck": "tsc --noEmit"
45
48
  }
46
- }
49
+ }