claude-scope 0.1.5 → 0.1.7
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/data/stdin-provider.d.ts +1 -1
- package/dist/data/stdin-provider.d.ts.map +1 -1
- package/dist/data/stdin-provider.js +7 -18
- package/dist/data/stdin-provider.js.map +1 -1
- package/dist/index.js +0 -0
- package/dist/schemas/stdin-schema.d.ts +80 -119
- package/dist/schemas/stdin-schema.d.ts.map +1 -1
- package/dist/schemas/stdin-schema.js +35 -68
- package/dist/schemas/stdin-schema.js.map +1 -1
- package/dist/validation/combinators.d.ts +10 -0
- package/dist/validation/combinators.d.ts.map +1 -0
- package/dist/validation/combinators.js +49 -0
- package/dist/validation/combinators.js.map +1 -0
- package/dist/validation/core.d.ts +30 -0
- package/dist/validation/core.d.ts.map +1 -0
- package/dist/validation/core.js +2 -0
- package/dist/validation/core.js.map +1 -0
- package/dist/validation/index.d.ts +4 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +4 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/result.d.ts +5 -0
- package/dist/validation/result.d.ts.map +1 -0
- package/dist/validation/result.js +11 -0
- package/dist/validation/result.js.map +1 -0
- package/dist/validation/validators.d.ts +7 -0
- package/dist/validation/validators.d.ts.map +1 -0
- package/dist/validation/validators.js +41 -0
- package/dist/validation/validators.js.map +1 -0
- package/package.json +2 -4
- package/dist/core/stdin-data-widget.d.ts +0 -85
- package/dist/core/stdin-data-widget.d.ts.map +0 -1
- package/dist/core/stdin-data-widget.js +0 -75
- package/dist/core/stdin-data-widget.js.map +0 -1
- package/dist/providers/stdin-provider.d.ts +0 -44
- package/dist/providers/stdin-provider.d.ts.map +0 -1
- package/dist/providers/stdin-provider.js +0 -83
- package/dist/providers/stdin-provider.js.map +0 -1
- package/dist/utils/colors.d.ts +0 -52
- package/dist/utils/colors.d.ts.map +0 -1
- package/dist/utils/colors.js +0 -54
- package/dist/utils/colors.js.map +0 -1
- package/dist/utils/formatters.d.ts +0 -56
- package/dist/utils/formatters.d.ts.map +0 -1
- package/dist/utils/formatters.js +0 -114
- package/dist/utils/formatters.js.map +0 -1
- package/dist/widgets/git-changes-widget.d.ts +0 -16
- package/dist/widgets/git-changes-widget.d.ts.map +0 -1
- package/dist/widgets/git-changes-widget.js +0 -37
- package/dist/widgets/git-changes-widget.js.map +0 -1
- package/dist/widgets/git-widget.d.ts +0 -35
- package/dist/widgets/git-widget.d.ts.map +0 -1
- package/dist/widgets/git-widget.js +0 -51
- package/dist/widgets/git-widget.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdin-provider.d.ts","sourceRoot":"","sources":["../../src/data/stdin-provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"stdin-provider.d.ts","sourceRoot":"","sources":["../../src/data/stdin-provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,aAAa;IACxB;;;;;;OAMG;IACG,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IA0B9C;;;;;OAKG;IACG,SAAS,CACb,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;QAAE,OAAO,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE,GAAG;QAAE,OAAO,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAQnF"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Stdin provider for parsing JSON data from stdin
|
|
3
|
-
* Parses and validates Claude Code session data
|
|
3
|
+
* Parses and validates Claude Code session data
|
|
4
4
|
*/
|
|
5
|
-
import { z } from 'zod';
|
|
6
5
|
import { StdinDataSchema } from '../schemas/stdin-schema.js';
|
|
6
|
+
import { formatError } from '../validation/result.js';
|
|
7
7
|
/**
|
|
8
8
|
* Error thrown when stdin parsing fails
|
|
9
9
|
*/
|
|
@@ -46,23 +46,12 @@ export class StdinProvider {
|
|
|
46
46
|
catch (error) {
|
|
47
47
|
throw new StdinParseError(`Invalid JSON: ${error.message}`);
|
|
48
48
|
}
|
|
49
|
-
// Validate with
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
catch (error) {
|
|
54
|
-
if (error instanceof z.ZodError) {
|
|
55
|
-
// Format error messages nicely
|
|
56
|
-
const errorDetails = error.issues
|
|
57
|
-
.map((e) => {
|
|
58
|
-
const path = e.path.length > 0 ? e.path.join('.') : 'root';
|
|
59
|
-
return `${path}: ${e.message}`;
|
|
60
|
-
})
|
|
61
|
-
.join(', ');
|
|
62
|
-
throw new StdinValidationError(`Validation failed: ${errorDetails}`);
|
|
63
|
-
}
|
|
64
|
-
throw error;
|
|
49
|
+
// Validate with schema
|
|
50
|
+
const result = StdinDataSchema.validate(data);
|
|
51
|
+
if (!result.success) {
|
|
52
|
+
throw new StdinValidationError(`Validation failed: ${formatError(result.error)}`);
|
|
65
53
|
}
|
|
54
|
+
return result.data;
|
|
66
55
|
}
|
|
67
56
|
/**
|
|
68
57
|
* Safe parse that returns result instead of throwing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdin-provider.js","sourceRoot":"","sources":["../../src/data/stdin-provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"stdin-provider.js","sourceRoot":"","sources":["../../src/data/stdin-provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,aAAa;IACxB;;;;;;OAMG;IACH,KAAK,CAAC,KAAK,CAAC,KAAa;QACvB,wBAAwB;QACxB,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxC,MAAM,IAAI,eAAe,CAAC,qBAAqB,CAAC,CAAC;QACnD,CAAC;QAED,aAAa;QACb,IAAI,IAAa,CAAC;QAClB,IAAI,CAAC;YACH,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,eAAe,CAAC,iBAAkB,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;QACzE,CAAC;QAED,uBAAuB;QACvB,MAAM,MAAM,GAAG,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAE9C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,IAAI,oBAAoB,CAC5B,sBAAsB,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAClD,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,SAAS,CACb,KAAa;QAEb,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC;QAC7D,CAAC;IACH,CAAC;CACF"}
|
package/dist/index.js
CHANGED
|
File without changes
|
|
@@ -1,123 +1,84 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Runtime type-safe schema for Claude Code stdin data
|
|
3
|
-
*
|
|
4
|
-
* This schema validates incoming JSON from Claude Code statusline API
|
|
5
|
-
* and provides TypeScript types automatically via inference.
|
|
3
|
+
* Custom validation system (no external dependencies)
|
|
6
4
|
*/
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}, z.core.$strip>;
|
|
87
|
-
version: z.ZodString;
|
|
88
|
-
output_style: z.ZodObject<{
|
|
89
|
-
name: z.ZodString;
|
|
90
|
-
}, z.core.$strip>;
|
|
91
|
-
cost: z.ZodOptional<z.ZodObject<{
|
|
92
|
-
total_cost_usd: z.ZodOptional<z.ZodNumber>;
|
|
93
|
-
total_duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
94
|
-
total_api_duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
95
|
-
total_lines_added: z.ZodOptional<z.ZodNumber>;
|
|
96
|
-
total_lines_removed: z.ZodOptional<z.ZodNumber>;
|
|
97
|
-
}, z.core.$strip>>;
|
|
98
|
-
context_window: z.ZodObject<{
|
|
99
|
-
total_input_tokens: z.ZodNumber;
|
|
100
|
-
total_output_tokens: z.ZodNumber;
|
|
101
|
-
context_window_size: z.ZodNumber;
|
|
102
|
-
current_usage: z.ZodNullable<z.ZodObject<{
|
|
103
|
-
input_tokens: z.ZodNumber;
|
|
104
|
-
output_tokens: z.ZodNumber;
|
|
105
|
-
cache_creation_input_tokens: z.ZodNumber;
|
|
106
|
-
cache_read_input_tokens: z.ZodNumber;
|
|
107
|
-
}, z.core.$strip>>;
|
|
108
|
-
}, z.core.$strip>;
|
|
109
|
-
}, z.core.$strip>;
|
|
110
|
-
/**
|
|
111
|
-
* Type inference from schema
|
|
112
|
-
*
|
|
113
|
-
* These types are automatically inferred from the Zod schemas,
|
|
114
|
-
* ensuring compile-time and run-time type safety are in sync.
|
|
115
|
-
*/
|
|
116
|
-
export type StdinData = z.infer<typeof StdinDataSchema>;
|
|
117
|
-
export type ContextUsage = z.infer<typeof ContextUsageSchema>;
|
|
118
|
-
export type CostInfo = z.infer<typeof CostInfoSchema>;
|
|
119
|
-
export type ContextWindow = z.infer<typeof ContextWindowSchema>;
|
|
120
|
-
export type ModelInfo = z.infer<typeof ModelInfoSchema>;
|
|
121
|
-
export type Workspace = z.infer<typeof WorkspaceSchema>;
|
|
122
|
-
export type OutputStyle = z.infer<typeof OutputStyleSchema>;
|
|
5
|
+
import type { InferValidator } from '../validation/core.js';
|
|
6
|
+
export declare const ContextUsageSchema: import("../validation/core.js").Validator<{
|
|
7
|
+
input_tokens: number;
|
|
8
|
+
output_tokens: number;
|
|
9
|
+
cache_creation_input_tokens: number;
|
|
10
|
+
cache_read_input_tokens: number;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const CostInfoSchema: import("../validation/core.js").Validator<{
|
|
13
|
+
total_cost_usd: number | undefined;
|
|
14
|
+
total_duration_ms: number | undefined;
|
|
15
|
+
total_api_duration_ms: number | undefined;
|
|
16
|
+
total_lines_added: number | undefined;
|
|
17
|
+
total_lines_removed: number | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const ContextWindowSchema: import("../validation/core.js").Validator<{
|
|
20
|
+
total_input_tokens: number;
|
|
21
|
+
total_output_tokens: number;
|
|
22
|
+
context_window_size: number;
|
|
23
|
+
current_usage: {
|
|
24
|
+
input_tokens: number;
|
|
25
|
+
output_tokens: number;
|
|
26
|
+
cache_creation_input_tokens: number;
|
|
27
|
+
cache_read_input_tokens: number;
|
|
28
|
+
} | null;
|
|
29
|
+
}>;
|
|
30
|
+
export declare const ModelInfoSchema: import("../validation/core.js").Validator<{
|
|
31
|
+
id: string;
|
|
32
|
+
display_name: string;
|
|
33
|
+
}>;
|
|
34
|
+
export declare const WorkspaceSchema: import("../validation/core.js").Validator<{
|
|
35
|
+
current_dir: string;
|
|
36
|
+
project_dir: string;
|
|
37
|
+
}>;
|
|
38
|
+
export declare const OutputStyleSchema: import("../validation/core.js").Validator<{
|
|
39
|
+
name: string;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const StdinDataSchema: import("../validation/core.js").Validator<{
|
|
42
|
+
hook_event_name: "Status";
|
|
43
|
+
session_id: string;
|
|
44
|
+
transcript_path: string;
|
|
45
|
+
cwd: string;
|
|
46
|
+
model: {
|
|
47
|
+
id: string;
|
|
48
|
+
display_name: string;
|
|
49
|
+
};
|
|
50
|
+
workspace: {
|
|
51
|
+
current_dir: string;
|
|
52
|
+
project_dir: string;
|
|
53
|
+
};
|
|
54
|
+
version: string;
|
|
55
|
+
output_style: {
|
|
56
|
+
name: string;
|
|
57
|
+
};
|
|
58
|
+
cost: {
|
|
59
|
+
total_cost_usd: number | undefined;
|
|
60
|
+
total_duration_ms: number | undefined;
|
|
61
|
+
total_api_duration_ms: number | undefined;
|
|
62
|
+
total_lines_added: number | undefined;
|
|
63
|
+
total_lines_removed: number | undefined;
|
|
64
|
+
} | undefined;
|
|
65
|
+
context_window: {
|
|
66
|
+
total_input_tokens: number;
|
|
67
|
+
total_output_tokens: number;
|
|
68
|
+
context_window_size: number;
|
|
69
|
+
current_usage: {
|
|
70
|
+
input_tokens: number;
|
|
71
|
+
output_tokens: number;
|
|
72
|
+
cache_creation_input_tokens: number;
|
|
73
|
+
cache_read_input_tokens: number;
|
|
74
|
+
} | null;
|
|
75
|
+
};
|
|
76
|
+
}>;
|
|
77
|
+
export type StdinData = InferValidator<typeof StdinDataSchema>;
|
|
78
|
+
export type ContextUsage = InferValidator<typeof ContextUsageSchema>;
|
|
79
|
+
export type CostInfo = InferValidator<typeof CostInfoSchema>;
|
|
80
|
+
export type ContextWindow = InferValidator<typeof ContextWindowSchema>;
|
|
81
|
+
export type ModelInfo = InferValidator<typeof ModelInfoSchema>;
|
|
82
|
+
export type Workspace = InferValidator<typeof WorkspaceSchema>;
|
|
83
|
+
export type OutputStyle = InferValidator<typeof OutputStyleSchema>;
|
|
123
84
|
//# sourceMappingURL=stdin-schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdin-schema.d.ts","sourceRoot":"","sources":["../../src/schemas/stdin-schema.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"stdin-schema.d.ts","sourceRoot":"","sources":["../../src/schemas/stdin-schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,eAAO,MAAM,kBAAkB;;;;;EAK7B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;EAMzB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;EAK9B,CAAC;AAEH,eAAO,MAAM,eAAe;;;EAG1B,CAAC;AAEH,eAAO,MAAM,eAAe;;;EAG1B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;EAE5B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,CAAC;AAC/D,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACrE,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,cAAc,CAAC,CAAC;AAC7D,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACvE,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,CAAC;AAC/D,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,CAAC;AAC/D,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -1,81 +1,48 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Runtime type-safe schema for Claude Code stdin data
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
export const ContextUsageSchema = z.object({
|
|
13
|
-
input_tokens: z.number(),
|
|
14
|
-
output_tokens: z.number(),
|
|
15
|
-
cache_creation_input_tokens: z.number(),
|
|
16
|
-
cache_read_input_tokens: z.number()
|
|
3
|
+
* Custom validation system (no external dependencies)
|
|
4
|
+
*/
|
|
5
|
+
import { string, number, literal, object, optional, nullable } from '../validation/index.js';
|
|
6
|
+
export const ContextUsageSchema = object({
|
|
7
|
+
input_tokens: number(),
|
|
8
|
+
output_tokens: number(),
|
|
9
|
+
cache_creation_input_tokens: number(),
|
|
10
|
+
cache_read_input_tokens: number()
|
|
17
11
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
total_duration_ms: z.number(),
|
|
25
|
-
total_api_duration_ms: z.number(),
|
|
26
|
-
total_lines_added: z.number(),
|
|
27
|
-
total_lines_removed: z.number()
|
|
28
|
-
}).partial(); // Make all fields optional for backwards compatibility
|
|
29
|
-
/**
|
|
30
|
-
* Context window schema
|
|
31
|
-
* Information about token usage and limits
|
|
32
|
-
*/
|
|
33
|
-
export const ContextWindowSchema = z.object({
|
|
34
|
-
total_input_tokens: z.number(),
|
|
35
|
-
total_output_tokens: z.number(),
|
|
36
|
-
context_window_size: z.number(),
|
|
37
|
-
current_usage: ContextUsageSchema.nullable()
|
|
12
|
+
export const CostInfoSchema = object({
|
|
13
|
+
total_cost_usd: optional(number()),
|
|
14
|
+
total_duration_ms: optional(number()),
|
|
15
|
+
total_api_duration_ms: optional(number()),
|
|
16
|
+
total_lines_added: optional(number()),
|
|
17
|
+
total_lines_removed: optional(number())
|
|
38
18
|
});
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
id: z.string(),
|
|
45
|
-
display_name: z.string()
|
|
19
|
+
export const ContextWindowSchema = object({
|
|
20
|
+
total_input_tokens: number(),
|
|
21
|
+
total_output_tokens: number(),
|
|
22
|
+
context_window_size: number(),
|
|
23
|
+
current_usage: nullable(ContextUsageSchema)
|
|
46
24
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
*/
|
|
51
|
-
export const WorkspaceSchema = z.object({
|
|
52
|
-
current_dir: z.string(),
|
|
53
|
-
project_dir: z.string()
|
|
25
|
+
export const ModelInfoSchema = object({
|
|
26
|
+
id: string(),
|
|
27
|
+
display_name: string()
|
|
54
28
|
});
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
*/
|
|
59
|
-
export const OutputStyleSchema = z.object({
|
|
60
|
-
name: z.string()
|
|
29
|
+
export const WorkspaceSchema = object({
|
|
30
|
+
current_dir: string(),
|
|
31
|
+
project_dir: string()
|
|
61
32
|
});
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
hook_event_name: z.literal('Status'),
|
|
71
|
-
session_id: z.string(),
|
|
72
|
-
transcript_path: z.string(),
|
|
73
|
-
cwd: z.string(),
|
|
33
|
+
export const OutputStyleSchema = object({
|
|
34
|
+
name: string()
|
|
35
|
+
});
|
|
36
|
+
export const StdinDataSchema = object({
|
|
37
|
+
hook_event_name: literal('Status'),
|
|
38
|
+
session_id: string(),
|
|
39
|
+
transcript_path: string(),
|
|
40
|
+
cwd: string(),
|
|
74
41
|
model: ModelInfoSchema,
|
|
75
42
|
workspace: WorkspaceSchema,
|
|
76
|
-
version:
|
|
43
|
+
version: string(),
|
|
77
44
|
output_style: OutputStyleSchema,
|
|
78
|
-
cost:
|
|
45
|
+
cost: optional(CostInfoSchema),
|
|
79
46
|
context_window: ContextWindowSchema
|
|
80
47
|
});
|
|
81
48
|
//# sourceMappingURL=stdin-schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdin-schema.js","sourceRoot":"","sources":["../../src/schemas/stdin-schema.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"stdin-schema.js","sourceRoot":"","sources":["../../src/schemas/stdin-schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,MAAM,EACN,MAAM,EACN,OAAO,EACP,MAAM,EACN,QAAQ,EACR,QAAQ,EAET,MAAM,wBAAwB,CAAC;AAGhC,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;IACvC,YAAY,EAAE,MAAM,EAAE;IACtB,aAAa,EAAE,MAAM,EAAE;IACvB,2BAA2B,EAAE,MAAM,EAAE;IACrC,uBAAuB,EAAE,MAAM,EAAE;CAClC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC;IACnC,cAAc,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IAClC,iBAAiB,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IACrC,qBAAqB,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IACzC,iBAAiB,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IACrC,mBAAmB,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;CACxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;IACxC,kBAAkB,EAAE,MAAM,EAAE;IAC5B,mBAAmB,EAAE,MAAM,EAAE;IAC7B,mBAAmB,EAAE,MAAM,EAAE;IAC7B,aAAa,EAAE,QAAQ,CAAC,kBAAkB,CAAC;CAC5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;IACpC,EAAE,EAAE,MAAM,EAAE;IACZ,YAAY,EAAE,MAAM,EAAE;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;IACpC,WAAW,EAAE,MAAM,EAAE;IACrB,WAAW,EAAE,MAAM,EAAE;CACtB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC;IACtC,IAAI,EAAE,MAAM,EAAE;CACf,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;IACpC,eAAe,EAAE,OAAO,CAAC,QAAQ,CAAC;IAClC,UAAU,EAAE,MAAM,EAAE;IACpB,eAAe,EAAE,MAAM,EAAE;IACzB,GAAG,EAAE,MAAM,EAAE;IACb,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,eAAe;IAC1B,OAAO,EAAE,MAAM,EAAE;IACjB,YAAY,EAAE,iBAAiB;IAC/B,IAAI,EAAE,QAAQ,CAAC,cAAc,CAAC;IAC9B,cAAc,EAAE,mBAAmB;CACpC,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Validator, InferValidator } from './core.js';
|
|
2
|
+
export declare function object<T extends Record<string, Validator<any>>>(shape: T): Validator<{
|
|
3
|
+
[K in keyof T]: InferValidator<T[K]>;
|
|
4
|
+
}>;
|
|
5
|
+
export declare function optional<T>(validator: Validator<T>): Validator<T | undefined>;
|
|
6
|
+
export declare function nullable<T>(validator: Validator<T>): Validator<T | null>;
|
|
7
|
+
export declare function partial<T extends Record<string, Validator<any>>>(shape: T): Validator<Partial<{
|
|
8
|
+
[K in keyof T]: InferValidator<T[K]>;
|
|
9
|
+
}>>;
|
|
10
|
+
//# sourceMappingURL=combinators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combinators.d.ts","sourceRoot":"","sources":["../../src/validation/combinators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAI3D,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,EAC7D,KAAK,EAAE,CAAC,GACP,SAAS,CAAC;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,CAsBrD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,GAAG,SAAS,CAAC,CAO7E;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,CAOxE;AAED,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,EAC9D,KAAK,EAAE,CAAC,GACP,SAAS,CAAC,OAAO,CAAC;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,CAAC,CAM9D"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { success, failure } from './result.js';
|
|
2
|
+
export function object(shape) {
|
|
3
|
+
return {
|
|
4
|
+
validate(value) {
|
|
5
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
6
|
+
return failure([], 'Expected object', value);
|
|
7
|
+
}
|
|
8
|
+
const result = {};
|
|
9
|
+
for (const [key, validator] of Object.entries(shape)) {
|
|
10
|
+
const fieldValue = value[key];
|
|
11
|
+
const validationResult = validator.validate(fieldValue);
|
|
12
|
+
if (!validationResult.success) {
|
|
13
|
+
return {
|
|
14
|
+
success: false,
|
|
15
|
+
error: { ...validationResult.error, path: [key, ...validationResult.error.path] }
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
result[key] = validationResult.data;
|
|
19
|
+
}
|
|
20
|
+
return success(result);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export function optional(validator) {
|
|
25
|
+
return {
|
|
26
|
+
validate(value) {
|
|
27
|
+
if (value === undefined)
|
|
28
|
+
return success(undefined);
|
|
29
|
+
return validator.validate(value);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function nullable(validator) {
|
|
34
|
+
return {
|
|
35
|
+
validate(value) {
|
|
36
|
+
if (value === null)
|
|
37
|
+
return success(null);
|
|
38
|
+
return validator.validate(value);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export function partial(shape) {
|
|
43
|
+
const optionalShape = {};
|
|
44
|
+
for (const [key, validator] of Object.entries(shape)) {
|
|
45
|
+
optionalShape[key] = optional(validator);
|
|
46
|
+
}
|
|
47
|
+
return object(optionalShape);
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=combinators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combinators.js","sourceRoot":"","sources":["../../src/validation/combinators.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG/C,MAAM,UAAU,MAAM,CACpB,KAAQ;IAER,OAAO;QACL,QAAQ,CAAC,KAAK;YACZ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBACxE,OAAO,OAAO,CAAC,EAAE,EAAE,iBAAiB,EAAE,KAAK,CAAC,CAAC;YAC/C,CAAC;YAED,MAAM,MAAM,GAAG,EAAS,CAAC;YACzB,KAAK,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBACrD,MAAM,UAAU,GAAI,KAAa,CAAC,GAAG,CAAC,CAAC;gBACvC,MAAM,gBAAgB,GAAG,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;gBACxD,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC;oBAC9B,OAAO;wBACL,OAAO,EAAE,KAAK;wBACd,KAAK,EAAE,EAAE,GAAG,gBAAgB,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;qBAClF,CAAC;gBACJ,CAAC;gBACD,MAAM,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC;YACtC,CAAC;YACD,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,QAAQ,CAAI,SAAuB;IACjD,OAAO;QACL,QAAQ,CAAC,KAAK;YACZ,IAAI,KAAK,KAAK,SAAS;gBAAE,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC;YACnD,OAAO,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,QAAQ,CAAI,SAAuB;IACjD,OAAO;QACL,QAAQ,CAAC,KAAK;YACZ,IAAI,KAAK,KAAK,IAAI;gBAAE,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;YACzC,OAAO,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,OAAO,CACrB,KAAQ;IAER,MAAM,aAAa,GAAmC,EAAE,CAAC;IACzD,KAAK,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACrD,aAAa,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,MAAM,CAAC,aAAa,CAAQ,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result type for validation operations
|
|
3
|
+
* Follows functional programming patterns (Either/Result monad)
|
|
4
|
+
*/
|
|
5
|
+
export type ValidationResult<T> = {
|
|
6
|
+
success: true;
|
|
7
|
+
data: T;
|
|
8
|
+
} | {
|
|
9
|
+
success: false;
|
|
10
|
+
error: ValidationError;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Validation error with path information
|
|
14
|
+
*/
|
|
15
|
+
export interface ValidationError {
|
|
16
|
+
path: string[];
|
|
17
|
+
message: string;
|
|
18
|
+
value: unknown;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Base validator interface
|
|
22
|
+
*/
|
|
23
|
+
export interface Validator<T> {
|
|
24
|
+
validate(value: unknown): ValidationResult<T>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Type inference helper
|
|
28
|
+
*/
|
|
29
|
+
export type InferValidator<V> = V extends Validator<infer T> ? T : never;
|
|
30
|
+
//# sourceMappingURL=core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/validation/core.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAC1B;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAC1B;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,eAAe,CAAA;CAAE,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../src/validation/core.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ValidationResult, ValidationError } from './core.js';
|
|
2
|
+
export declare function success<T>(data: T): ValidationResult<T>;
|
|
3
|
+
export declare function failure(path: string[], message: string, value: unknown): ValidationResult<never>;
|
|
4
|
+
export declare function formatError(error: ValidationError): string;
|
|
5
|
+
//# sourceMappingURL=result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../src/validation/result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEnE,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAEvD;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAEhG;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAG1D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function success(data) {
|
|
2
|
+
return { success: true, data };
|
|
3
|
+
}
|
|
4
|
+
export function failure(path, message, value) {
|
|
5
|
+
return { success: false, error: { path, message, value } };
|
|
6
|
+
}
|
|
7
|
+
export function formatError(error) {
|
|
8
|
+
const path = error.path.length > 0 ? error.path.join('.') : 'root';
|
|
9
|
+
return `${path}: ${error.message}`;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result.js","sourceRoot":"","sources":["../../src/validation/result.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,OAAO,CAAI,IAAO;IAChC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAAc,EAAE,OAAe,EAAE,KAAc;IACrE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAsB;IAChD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACnE,OAAO,GAAG,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Validator } from './core.js';
|
|
2
|
+
export declare function string(): Validator<string>;
|
|
3
|
+
export declare function number(): Validator<number>;
|
|
4
|
+
export declare function literal<T extends string | number | boolean>(expected: T): Validator<T>;
|
|
5
|
+
export declare function nullValidator(): Validator<null>;
|
|
6
|
+
export declare function unknown(): Validator<unknown>;
|
|
7
|
+
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/validation/validators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAG3C,wBAAgB,MAAM,IAAI,SAAS,CAAC,MAAM,CAAC,CAO1C;AAED,wBAAgB,MAAM,IAAI,SAAS,CAAC,MAAM,CAAC,CAO1C;AAED,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,OAAO,EAAE,QAAQ,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAOtF;AAED,wBAAgB,aAAa,IAAI,SAAS,CAAC,IAAI,CAAC,CAO/C;AAED,wBAAgB,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,CAE5C"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { success, failure } from './result.js';
|
|
2
|
+
export function string() {
|
|
3
|
+
return {
|
|
4
|
+
validate(value) {
|
|
5
|
+
if (typeof value === 'string')
|
|
6
|
+
return success(value);
|
|
7
|
+
return failure([], 'Expected string', value);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export function number() {
|
|
12
|
+
return {
|
|
13
|
+
validate(value) {
|
|
14
|
+
if (typeof value === 'number' && !Number.isNaN(value))
|
|
15
|
+
return success(value);
|
|
16
|
+
return failure([], 'Expected number', value);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export function literal(expected) {
|
|
21
|
+
return {
|
|
22
|
+
validate(value) {
|
|
23
|
+
if (value === expected)
|
|
24
|
+
return success(expected);
|
|
25
|
+
return failure([], `Expected '${expected}'`, value);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export function nullValidator() {
|
|
30
|
+
return {
|
|
31
|
+
validate(value) {
|
|
32
|
+
if (value === null)
|
|
33
|
+
return success(null);
|
|
34
|
+
return failure([], 'Expected null', value);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function unknown() {
|
|
39
|
+
return { validate(value) { return success(value); } };
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=validators.js.map
|