@keel_flow/schema 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.
@@ -0,0 +1,404 @@
1
+ import { z } from "zod";
2
+ export declare const VerifyCheckSchema: z.ZodEnum<["spec", "architecture", "principles", "tests-lint"]>;
3
+ export type VerifyCheck = z.infer<typeof VerifyCheckSchema>;
4
+ export declare const VerifyResultSchema: z.ZodObject<{
5
+ checks: z.ZodObject<{
6
+ spec: z.ZodObject<{
7
+ passed: z.ZodBoolean;
8
+ violations: z.ZodArray<z.ZodObject<{
9
+ principleId: z.ZodString;
10
+ nodeId: z.ZodOptional<z.ZodString>;
11
+ file: z.ZodOptional<z.ZodString>;
12
+ line: z.ZodOptional<z.ZodNumber>;
13
+ severity: z.ZodEnum<["critical", "warning", "info"]>;
14
+ message: z.ZodString;
15
+ }, "strip", z.ZodTypeAny, {
16
+ message: string;
17
+ principleId: string;
18
+ severity: "critical" | "warning" | "info";
19
+ nodeId?: string | undefined;
20
+ file?: string | undefined;
21
+ line?: number | undefined;
22
+ }, {
23
+ message: string;
24
+ principleId: string;
25
+ severity: "critical" | "warning" | "info";
26
+ nodeId?: string | undefined;
27
+ file?: string | undefined;
28
+ line?: number | undefined;
29
+ }>, "many">;
30
+ pending: z.ZodOptional<z.ZodBoolean>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ passed: boolean;
33
+ violations: {
34
+ message: string;
35
+ principleId: string;
36
+ severity: "critical" | "warning" | "info";
37
+ nodeId?: string | undefined;
38
+ file?: string | undefined;
39
+ line?: number | undefined;
40
+ }[];
41
+ pending?: boolean | undefined;
42
+ }, {
43
+ passed: boolean;
44
+ violations: {
45
+ message: string;
46
+ principleId: string;
47
+ severity: "critical" | "warning" | "info";
48
+ nodeId?: string | undefined;
49
+ file?: string | undefined;
50
+ line?: number | undefined;
51
+ }[];
52
+ pending?: boolean | undefined;
53
+ }>;
54
+ architecture: z.ZodObject<{
55
+ passed: z.ZodBoolean;
56
+ violations: z.ZodArray<z.ZodObject<{
57
+ principleId: z.ZodString;
58
+ nodeId: z.ZodOptional<z.ZodString>;
59
+ file: z.ZodOptional<z.ZodString>;
60
+ line: z.ZodOptional<z.ZodNumber>;
61
+ severity: z.ZodEnum<["critical", "warning", "info"]>;
62
+ message: z.ZodString;
63
+ }, "strip", z.ZodTypeAny, {
64
+ message: string;
65
+ principleId: string;
66
+ severity: "critical" | "warning" | "info";
67
+ nodeId?: string | undefined;
68
+ file?: string | undefined;
69
+ line?: number | undefined;
70
+ }, {
71
+ message: string;
72
+ principleId: string;
73
+ severity: "critical" | "warning" | "info";
74
+ nodeId?: string | undefined;
75
+ file?: string | undefined;
76
+ line?: number | undefined;
77
+ }>, "many">;
78
+ pending: z.ZodOptional<z.ZodBoolean>;
79
+ }, "strip", z.ZodTypeAny, {
80
+ passed: boolean;
81
+ violations: {
82
+ message: string;
83
+ principleId: string;
84
+ severity: "critical" | "warning" | "info";
85
+ nodeId?: string | undefined;
86
+ file?: string | undefined;
87
+ line?: number | undefined;
88
+ }[];
89
+ pending?: boolean | undefined;
90
+ }, {
91
+ passed: boolean;
92
+ violations: {
93
+ message: string;
94
+ principleId: string;
95
+ severity: "critical" | "warning" | "info";
96
+ nodeId?: string | undefined;
97
+ file?: string | undefined;
98
+ line?: number | undefined;
99
+ }[];
100
+ pending?: boolean | undefined;
101
+ }>;
102
+ principles: z.ZodObject<{
103
+ passed: z.ZodBoolean;
104
+ violations: z.ZodArray<z.ZodObject<{
105
+ principleId: z.ZodString;
106
+ nodeId: z.ZodOptional<z.ZodString>;
107
+ file: z.ZodOptional<z.ZodString>;
108
+ line: z.ZodOptional<z.ZodNumber>;
109
+ severity: z.ZodEnum<["critical", "warning", "info"]>;
110
+ message: z.ZodString;
111
+ }, "strip", z.ZodTypeAny, {
112
+ message: string;
113
+ principleId: string;
114
+ severity: "critical" | "warning" | "info";
115
+ nodeId?: string | undefined;
116
+ file?: string | undefined;
117
+ line?: number | undefined;
118
+ }, {
119
+ message: string;
120
+ principleId: string;
121
+ severity: "critical" | "warning" | "info";
122
+ nodeId?: string | undefined;
123
+ file?: string | undefined;
124
+ line?: number | undefined;
125
+ }>, "many">;
126
+ pending: z.ZodOptional<z.ZodBoolean>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ passed: boolean;
129
+ violations: {
130
+ message: string;
131
+ principleId: string;
132
+ severity: "critical" | "warning" | "info";
133
+ nodeId?: string | undefined;
134
+ file?: string | undefined;
135
+ line?: number | undefined;
136
+ }[];
137
+ pending?: boolean | undefined;
138
+ }, {
139
+ passed: boolean;
140
+ violations: {
141
+ message: string;
142
+ principleId: string;
143
+ severity: "critical" | "warning" | "info";
144
+ nodeId?: string | undefined;
145
+ file?: string | undefined;
146
+ line?: number | undefined;
147
+ }[];
148
+ pending?: boolean | undefined;
149
+ }>;
150
+ "tests-lint": z.ZodObject<{
151
+ passed: z.ZodBoolean;
152
+ violations: z.ZodArray<z.ZodObject<{
153
+ principleId: z.ZodString;
154
+ nodeId: z.ZodOptional<z.ZodString>;
155
+ file: z.ZodOptional<z.ZodString>;
156
+ line: z.ZodOptional<z.ZodNumber>;
157
+ severity: z.ZodEnum<["critical", "warning", "info"]>;
158
+ message: z.ZodString;
159
+ }, "strip", z.ZodTypeAny, {
160
+ message: string;
161
+ principleId: string;
162
+ severity: "critical" | "warning" | "info";
163
+ nodeId?: string | undefined;
164
+ file?: string | undefined;
165
+ line?: number | undefined;
166
+ }, {
167
+ message: string;
168
+ principleId: string;
169
+ severity: "critical" | "warning" | "info";
170
+ nodeId?: string | undefined;
171
+ file?: string | undefined;
172
+ line?: number | undefined;
173
+ }>, "many">;
174
+ pending: z.ZodOptional<z.ZodBoolean>;
175
+ }, "strip", z.ZodTypeAny, {
176
+ passed: boolean;
177
+ violations: {
178
+ message: string;
179
+ principleId: string;
180
+ severity: "critical" | "warning" | "info";
181
+ nodeId?: string | undefined;
182
+ file?: string | undefined;
183
+ line?: number | undefined;
184
+ }[];
185
+ pending?: boolean | undefined;
186
+ }, {
187
+ passed: boolean;
188
+ violations: {
189
+ message: string;
190
+ principleId: string;
191
+ severity: "critical" | "warning" | "info";
192
+ nodeId?: string | undefined;
193
+ file?: string | undefined;
194
+ line?: number | undefined;
195
+ }[];
196
+ pending?: boolean | undefined;
197
+ }>;
198
+ }, "strip", z.ZodTypeAny, {
199
+ principles: {
200
+ passed: boolean;
201
+ violations: {
202
+ message: string;
203
+ principleId: string;
204
+ severity: "critical" | "warning" | "info";
205
+ nodeId?: string | undefined;
206
+ file?: string | undefined;
207
+ line?: number | undefined;
208
+ }[];
209
+ pending?: boolean | undefined;
210
+ };
211
+ spec: {
212
+ passed: boolean;
213
+ violations: {
214
+ message: string;
215
+ principleId: string;
216
+ severity: "critical" | "warning" | "info";
217
+ nodeId?: string | undefined;
218
+ file?: string | undefined;
219
+ line?: number | undefined;
220
+ }[];
221
+ pending?: boolean | undefined;
222
+ };
223
+ architecture: {
224
+ passed: boolean;
225
+ violations: {
226
+ message: string;
227
+ principleId: string;
228
+ severity: "critical" | "warning" | "info";
229
+ nodeId?: string | undefined;
230
+ file?: string | undefined;
231
+ line?: number | undefined;
232
+ }[];
233
+ pending?: boolean | undefined;
234
+ };
235
+ "tests-lint": {
236
+ passed: boolean;
237
+ violations: {
238
+ message: string;
239
+ principleId: string;
240
+ severity: "critical" | "warning" | "info";
241
+ nodeId?: string | undefined;
242
+ file?: string | undefined;
243
+ line?: number | undefined;
244
+ }[];
245
+ pending?: boolean | undefined;
246
+ };
247
+ }, {
248
+ principles: {
249
+ passed: boolean;
250
+ violations: {
251
+ message: string;
252
+ principleId: string;
253
+ severity: "critical" | "warning" | "info";
254
+ nodeId?: string | undefined;
255
+ file?: string | undefined;
256
+ line?: number | undefined;
257
+ }[];
258
+ pending?: boolean | undefined;
259
+ };
260
+ spec: {
261
+ passed: boolean;
262
+ violations: {
263
+ message: string;
264
+ principleId: string;
265
+ severity: "critical" | "warning" | "info";
266
+ nodeId?: string | undefined;
267
+ file?: string | undefined;
268
+ line?: number | undefined;
269
+ }[];
270
+ pending?: boolean | undefined;
271
+ };
272
+ architecture: {
273
+ passed: boolean;
274
+ violations: {
275
+ message: string;
276
+ principleId: string;
277
+ severity: "critical" | "warning" | "info";
278
+ nodeId?: string | undefined;
279
+ file?: string | undefined;
280
+ line?: number | undefined;
281
+ }[];
282
+ pending?: boolean | undefined;
283
+ };
284
+ "tests-lint": {
285
+ passed: boolean;
286
+ violations: {
287
+ message: string;
288
+ principleId: string;
289
+ severity: "critical" | "warning" | "info";
290
+ nodeId?: string | undefined;
291
+ file?: string | undefined;
292
+ line?: number | undefined;
293
+ }[];
294
+ pending?: boolean | undefined;
295
+ };
296
+ }>;
297
+ exitCode: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>;
298
+ }, "strip", z.ZodTypeAny, {
299
+ checks: {
300
+ principles: {
301
+ passed: boolean;
302
+ violations: {
303
+ message: string;
304
+ principleId: string;
305
+ severity: "critical" | "warning" | "info";
306
+ nodeId?: string | undefined;
307
+ file?: string | undefined;
308
+ line?: number | undefined;
309
+ }[];
310
+ pending?: boolean | undefined;
311
+ };
312
+ spec: {
313
+ passed: boolean;
314
+ violations: {
315
+ message: string;
316
+ principleId: string;
317
+ severity: "critical" | "warning" | "info";
318
+ nodeId?: string | undefined;
319
+ file?: string | undefined;
320
+ line?: number | undefined;
321
+ }[];
322
+ pending?: boolean | undefined;
323
+ };
324
+ architecture: {
325
+ passed: boolean;
326
+ violations: {
327
+ message: string;
328
+ principleId: string;
329
+ severity: "critical" | "warning" | "info";
330
+ nodeId?: string | undefined;
331
+ file?: string | undefined;
332
+ line?: number | undefined;
333
+ }[];
334
+ pending?: boolean | undefined;
335
+ };
336
+ "tests-lint": {
337
+ passed: boolean;
338
+ violations: {
339
+ message: string;
340
+ principleId: string;
341
+ severity: "critical" | "warning" | "info";
342
+ nodeId?: string | undefined;
343
+ file?: string | undefined;
344
+ line?: number | undefined;
345
+ }[];
346
+ pending?: boolean | undefined;
347
+ };
348
+ };
349
+ exitCode: 0 | 1 | 2;
350
+ }, {
351
+ checks: {
352
+ principles: {
353
+ passed: boolean;
354
+ violations: {
355
+ message: string;
356
+ principleId: string;
357
+ severity: "critical" | "warning" | "info";
358
+ nodeId?: string | undefined;
359
+ file?: string | undefined;
360
+ line?: number | undefined;
361
+ }[];
362
+ pending?: boolean | undefined;
363
+ };
364
+ spec: {
365
+ passed: boolean;
366
+ violations: {
367
+ message: string;
368
+ principleId: string;
369
+ severity: "critical" | "warning" | "info";
370
+ nodeId?: string | undefined;
371
+ file?: string | undefined;
372
+ line?: number | undefined;
373
+ }[];
374
+ pending?: boolean | undefined;
375
+ };
376
+ architecture: {
377
+ passed: boolean;
378
+ violations: {
379
+ message: string;
380
+ principleId: string;
381
+ severity: "critical" | "warning" | "info";
382
+ nodeId?: string | undefined;
383
+ file?: string | undefined;
384
+ line?: number | undefined;
385
+ }[];
386
+ pending?: boolean | undefined;
387
+ };
388
+ "tests-lint": {
389
+ passed: boolean;
390
+ violations: {
391
+ message: string;
392
+ principleId: string;
393
+ severity: "critical" | "warning" | "info";
394
+ nodeId?: string | undefined;
395
+ file?: string | undefined;
396
+ line?: number | undefined;
397
+ }[];
398
+ pending?: boolean | undefined;
399
+ };
400
+ };
401
+ exitCode: 0 | 1 | 2;
402
+ }>;
403
+ export type VerifyResult = z.infer<typeof VerifyResultSchema>;
404
+ //# sourceMappingURL=verify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../src/verify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,iBAAiB,iEAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAQ5D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
package/dist/verify.js ADDED
@@ -0,0 +1,23 @@
1
+ import { z } from "zod";
2
+ import { ViolationSchema } from "./principle.js";
3
+ export const VerifyCheckSchema = z.enum([
4
+ "spec",
5
+ "architecture",
6
+ "principles",
7
+ "tests-lint",
8
+ ]);
9
+ const CheckResultSchema = z.object({
10
+ passed: z.boolean(),
11
+ violations: z.array(ViolationSchema),
12
+ pending: z.boolean().optional(),
13
+ });
14
+ export const VerifyResultSchema = z.object({
15
+ checks: z.object({
16
+ spec: CheckResultSchema,
17
+ architecture: CheckResultSchema,
18
+ principles: CheckResultSchema,
19
+ "tests-lint": CheckResultSchema,
20
+ }),
21
+ exitCode: z.union([z.literal(0), z.literal(1), z.literal(2)]),
22
+ });
23
+ //# sourceMappingURL=verify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify.js","sourceRoot":"","sources":["../src/verify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC;IACtC,MAAM;IACN,cAAc;IACd,YAAY;IACZ,YAAY;CACb,CAAC,CAAC;AAGH,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;IACnB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC;IACpC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,iBAAiB;QACvB,YAAY,EAAE,iBAAiB;QAC/B,UAAU,EAAE,iBAAiB;QAC7B,YAAY,EAAE,iBAAiB;KAChC,CAAC;IACF,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;CAC9D,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const SCHEMA_VERSION = "0.4.0";
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export const SCHEMA_VERSION = "0.4.0";
2
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@keel_flow/schema",
3
+ "version": "0.2.0",
4
+ "private": false,
5
+ "type": "module",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "README.md"
12
+ ],
13
+ "main": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "import": "./dist/index.js",
18
+ "types": "./dist/index.d.ts"
19
+ }
20
+ },
21
+ "dependencies": {
22
+ "zod": "^3.23.0"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "^25.9.1",
26
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
27
+ "@typescript-eslint/parser": "^8.0.0",
28
+ "eslint": "^9.0.0",
29
+ "typescript": "^5.5.0",
30
+ "vitest": "^2.0.0"
31
+ },
32
+ "scripts": {
33
+ "build": "tsc",
34
+ "typecheck": "tsc --noEmit",
35
+ "test": "vitest run",
36
+ "lint": "eslint src"
37
+ }
38
+ }