@vibe-validate/config 0.9.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/README.md +235 -0
- package/dist/define-config.d.ts +49 -0
- package/dist/define-config.d.ts.map +1 -0
- package/dist/define-config.js +72 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/loader.d.ts +38 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/loader.js +147 -0
- package/dist/presets/index.d.ts +27 -0
- package/dist/presets/index.d.ts.map +1 -0
- package/dist/presets/index.js +36 -0
- package/dist/presets/typescript-library.d.ts +9 -0
- package/dist/presets/typescript-library.d.ts.map +1 -0
- package/dist/presets/typescript-library.js +66 -0
- package/dist/presets/typescript-nodejs.d.ts +9 -0
- package/dist/presets/typescript-nodejs.d.ts.map +1 -0
- package/dist/presets/typescript-nodejs.js +63 -0
- package/dist/presets/typescript-react.d.ts +9 -0
- package/dist/presets/typescript-react.d.ts.map +1 -0
- package/dist/presets/typescript-react.js +72 -0
- package/dist/schema.d.ts +580 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +148 -0
- package/package.json +48 -0
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,580 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration Schema with Zod Validation
|
|
3
|
+
*
|
|
4
|
+
* TypeScript-first configuration system for vibe-validate.
|
|
5
|
+
* Provides runtime validation and type safety for all configuration options.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
/**
|
|
9
|
+
* Validation Step Schema
|
|
10
|
+
*
|
|
11
|
+
* Defines a single validation step (typecheck, lint, test, etc.)
|
|
12
|
+
*/
|
|
13
|
+
export declare const ValidationStepSchema: z.ZodObject<{
|
|
14
|
+
/** Human-readable step name (e.g., "TypeScript type checking") */
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
/** Command to execute (e.g., "npm run typecheck") */
|
|
17
|
+
command: z.ZodString;
|
|
18
|
+
/** Optional: Custom timeout in milliseconds (default: inherited from phase) */
|
|
19
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
/** Optional: Continue on failure (default: false) */
|
|
21
|
+
continueOnError: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
/** Optional: Environment variables for this step */
|
|
23
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
24
|
+
/** Optional: Working directory for this step (default: project root) */
|
|
25
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
name: string;
|
|
28
|
+
command: string;
|
|
29
|
+
timeout?: number | undefined;
|
|
30
|
+
continueOnError?: boolean | undefined;
|
|
31
|
+
env?: Record<string, string> | undefined;
|
|
32
|
+
cwd?: string | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
name: string;
|
|
35
|
+
command: string;
|
|
36
|
+
timeout?: number | undefined;
|
|
37
|
+
continueOnError?: boolean | undefined;
|
|
38
|
+
env?: Record<string, string> | undefined;
|
|
39
|
+
cwd?: string | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
export type ValidationStep = z.infer<typeof ValidationStepSchema>;
|
|
42
|
+
/**
|
|
43
|
+
* Validation Phase Schema
|
|
44
|
+
*
|
|
45
|
+
* Defines a phase containing one or more validation steps.
|
|
46
|
+
* Phases are executed sequentially, but steps within a phase can be parallel.
|
|
47
|
+
*/
|
|
48
|
+
export declare const ValidationPhaseSchema: z.ZodObject<{
|
|
49
|
+
/** Phase name (e.g., "Pre-Qualification", "Testing") */
|
|
50
|
+
name: z.ZodString;
|
|
51
|
+
/** Execute steps in parallel (default: false) */
|
|
52
|
+
parallel: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
53
|
+
/** Optional: Phase names this phase depends on */
|
|
54
|
+
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
55
|
+
/** Steps to execute in this phase */
|
|
56
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
57
|
+
/** Human-readable step name (e.g., "TypeScript type checking") */
|
|
58
|
+
name: z.ZodString;
|
|
59
|
+
/** Command to execute (e.g., "npm run typecheck") */
|
|
60
|
+
command: z.ZodString;
|
|
61
|
+
/** Optional: Custom timeout in milliseconds (default: inherited from phase) */
|
|
62
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
/** Optional: Continue on failure (default: false) */
|
|
64
|
+
continueOnError: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
+
/** Optional: Environment variables for this step */
|
|
66
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
67
|
+
/** Optional: Working directory for this step (default: project root) */
|
|
68
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
name: string;
|
|
71
|
+
command: string;
|
|
72
|
+
timeout?: number | undefined;
|
|
73
|
+
continueOnError?: boolean | undefined;
|
|
74
|
+
env?: Record<string, string> | undefined;
|
|
75
|
+
cwd?: string | undefined;
|
|
76
|
+
}, {
|
|
77
|
+
name: string;
|
|
78
|
+
command: string;
|
|
79
|
+
timeout?: number | undefined;
|
|
80
|
+
continueOnError?: boolean | undefined;
|
|
81
|
+
env?: Record<string, string> | undefined;
|
|
82
|
+
cwd?: string | undefined;
|
|
83
|
+
}>, "many">;
|
|
84
|
+
/** Optional: Default timeout for all steps (milliseconds, default: 300000 = 5min) */
|
|
85
|
+
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
86
|
+
/** Optional: Fail fast - stop on first error (default: true) */
|
|
87
|
+
failFast: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
name: string;
|
|
90
|
+
timeout: number;
|
|
91
|
+
parallel: boolean;
|
|
92
|
+
steps: {
|
|
93
|
+
name: string;
|
|
94
|
+
command: string;
|
|
95
|
+
timeout?: number | undefined;
|
|
96
|
+
continueOnError?: boolean | undefined;
|
|
97
|
+
env?: Record<string, string> | undefined;
|
|
98
|
+
cwd?: string | undefined;
|
|
99
|
+
}[];
|
|
100
|
+
failFast: boolean;
|
|
101
|
+
dependsOn?: string[] | undefined;
|
|
102
|
+
}, {
|
|
103
|
+
name: string;
|
|
104
|
+
steps: {
|
|
105
|
+
name: string;
|
|
106
|
+
command: string;
|
|
107
|
+
timeout?: number | undefined;
|
|
108
|
+
continueOnError?: boolean | undefined;
|
|
109
|
+
env?: Record<string, string> | undefined;
|
|
110
|
+
cwd?: string | undefined;
|
|
111
|
+
}[];
|
|
112
|
+
timeout?: number | undefined;
|
|
113
|
+
parallel?: boolean | undefined;
|
|
114
|
+
dependsOn?: string[] | undefined;
|
|
115
|
+
failFast?: boolean | undefined;
|
|
116
|
+
}>;
|
|
117
|
+
export type ValidationPhase = z.input<typeof ValidationPhaseSchema>;
|
|
118
|
+
/**
|
|
119
|
+
* Caching Strategy Schema
|
|
120
|
+
*/
|
|
121
|
+
export declare const CachingStrategySchema: z.ZodEnum<["git-tree-hash", "timestamp", "disabled"]>;
|
|
122
|
+
export type CachingStrategy = z.infer<typeof CachingStrategySchema>;
|
|
123
|
+
/**
|
|
124
|
+
* Validation Config Schema
|
|
125
|
+
*/
|
|
126
|
+
export declare const ValidationConfigSchema: z.ZodObject<{
|
|
127
|
+
/** Validation phases to execute */
|
|
128
|
+
phases: z.ZodArray<z.ZodObject<{
|
|
129
|
+
/** Phase name (e.g., "Pre-Qualification", "Testing") */
|
|
130
|
+
name: z.ZodString;
|
|
131
|
+
/** Execute steps in parallel (default: false) */
|
|
132
|
+
parallel: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
133
|
+
/** Optional: Phase names this phase depends on */
|
|
134
|
+
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
135
|
+
/** Steps to execute in this phase */
|
|
136
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
137
|
+
/** Human-readable step name (e.g., "TypeScript type checking") */
|
|
138
|
+
name: z.ZodString;
|
|
139
|
+
/** Command to execute (e.g., "npm run typecheck") */
|
|
140
|
+
command: z.ZodString;
|
|
141
|
+
/** Optional: Custom timeout in milliseconds (default: inherited from phase) */
|
|
142
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
143
|
+
/** Optional: Continue on failure (default: false) */
|
|
144
|
+
continueOnError: z.ZodOptional<z.ZodBoolean>;
|
|
145
|
+
/** Optional: Environment variables for this step */
|
|
146
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
147
|
+
/** Optional: Working directory for this step (default: project root) */
|
|
148
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
149
|
+
}, "strip", z.ZodTypeAny, {
|
|
150
|
+
name: string;
|
|
151
|
+
command: string;
|
|
152
|
+
timeout?: number | undefined;
|
|
153
|
+
continueOnError?: boolean | undefined;
|
|
154
|
+
env?: Record<string, string> | undefined;
|
|
155
|
+
cwd?: string | undefined;
|
|
156
|
+
}, {
|
|
157
|
+
name: string;
|
|
158
|
+
command: string;
|
|
159
|
+
timeout?: number | undefined;
|
|
160
|
+
continueOnError?: boolean | undefined;
|
|
161
|
+
env?: Record<string, string> | undefined;
|
|
162
|
+
cwd?: string | undefined;
|
|
163
|
+
}>, "many">;
|
|
164
|
+
/** Optional: Default timeout for all steps (milliseconds, default: 300000 = 5min) */
|
|
165
|
+
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
166
|
+
/** Optional: Fail fast - stop on first error (default: true) */
|
|
167
|
+
failFast: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
169
|
+
name: string;
|
|
170
|
+
timeout: number;
|
|
171
|
+
parallel: boolean;
|
|
172
|
+
steps: {
|
|
173
|
+
name: string;
|
|
174
|
+
command: string;
|
|
175
|
+
timeout?: number | undefined;
|
|
176
|
+
continueOnError?: boolean | undefined;
|
|
177
|
+
env?: Record<string, string> | undefined;
|
|
178
|
+
cwd?: string | undefined;
|
|
179
|
+
}[];
|
|
180
|
+
failFast: boolean;
|
|
181
|
+
dependsOn?: string[] | undefined;
|
|
182
|
+
}, {
|
|
183
|
+
name: string;
|
|
184
|
+
steps: {
|
|
185
|
+
name: string;
|
|
186
|
+
command: string;
|
|
187
|
+
timeout?: number | undefined;
|
|
188
|
+
continueOnError?: boolean | undefined;
|
|
189
|
+
env?: Record<string, string> | undefined;
|
|
190
|
+
cwd?: string | undefined;
|
|
191
|
+
}[];
|
|
192
|
+
timeout?: number | undefined;
|
|
193
|
+
parallel?: boolean | undefined;
|
|
194
|
+
dependsOn?: string[] | undefined;
|
|
195
|
+
failFast?: boolean | undefined;
|
|
196
|
+
}>, "many">;
|
|
197
|
+
/** Caching configuration */
|
|
198
|
+
caching: z.ZodDefault<z.ZodObject<{
|
|
199
|
+
/** Caching strategy (default: git-tree-hash) */
|
|
200
|
+
strategy: z.ZodDefault<z.ZodEnum<["git-tree-hash", "timestamp", "disabled"]>>;
|
|
201
|
+
/** Enable caching (default: true) */
|
|
202
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
203
|
+
/** State file path (default: .vibe-validate-state.yaml) */
|
|
204
|
+
statePath: z.ZodDefault<z.ZodString>;
|
|
205
|
+
}, "strip", z.ZodTypeAny, {
|
|
206
|
+
strategy: "git-tree-hash" | "timestamp" | "disabled";
|
|
207
|
+
enabled: boolean;
|
|
208
|
+
statePath: string;
|
|
209
|
+
}, {
|
|
210
|
+
strategy?: "git-tree-hash" | "timestamp" | "disabled" | undefined;
|
|
211
|
+
enabled?: boolean | undefined;
|
|
212
|
+
statePath?: string | undefined;
|
|
213
|
+
}>>;
|
|
214
|
+
}, "strip", z.ZodTypeAny, {
|
|
215
|
+
phases: {
|
|
216
|
+
name: string;
|
|
217
|
+
timeout: number;
|
|
218
|
+
parallel: boolean;
|
|
219
|
+
steps: {
|
|
220
|
+
name: string;
|
|
221
|
+
command: string;
|
|
222
|
+
timeout?: number | undefined;
|
|
223
|
+
continueOnError?: boolean | undefined;
|
|
224
|
+
env?: Record<string, string> | undefined;
|
|
225
|
+
cwd?: string | undefined;
|
|
226
|
+
}[];
|
|
227
|
+
failFast: boolean;
|
|
228
|
+
dependsOn?: string[] | undefined;
|
|
229
|
+
}[];
|
|
230
|
+
caching: {
|
|
231
|
+
strategy: "git-tree-hash" | "timestamp" | "disabled";
|
|
232
|
+
enabled: boolean;
|
|
233
|
+
statePath: string;
|
|
234
|
+
};
|
|
235
|
+
}, {
|
|
236
|
+
phases: {
|
|
237
|
+
name: string;
|
|
238
|
+
steps: {
|
|
239
|
+
name: string;
|
|
240
|
+
command: string;
|
|
241
|
+
timeout?: number | undefined;
|
|
242
|
+
continueOnError?: boolean | undefined;
|
|
243
|
+
env?: Record<string, string> | undefined;
|
|
244
|
+
cwd?: string | undefined;
|
|
245
|
+
}[];
|
|
246
|
+
timeout?: number | undefined;
|
|
247
|
+
parallel?: boolean | undefined;
|
|
248
|
+
dependsOn?: string[] | undefined;
|
|
249
|
+
failFast?: boolean | undefined;
|
|
250
|
+
}[];
|
|
251
|
+
caching?: {
|
|
252
|
+
strategy?: "git-tree-hash" | "timestamp" | "disabled" | undefined;
|
|
253
|
+
enabled?: boolean | undefined;
|
|
254
|
+
statePath?: string | undefined;
|
|
255
|
+
} | undefined;
|
|
256
|
+
}>;
|
|
257
|
+
export type ValidationConfig = z.infer<typeof ValidationConfigSchema>;
|
|
258
|
+
/**
|
|
259
|
+
* Output Format Schema
|
|
260
|
+
*/
|
|
261
|
+
export declare const OutputFormatSchema: z.ZodEnum<["human", "yaml", "json", "auto"]>;
|
|
262
|
+
export type OutputFormat = z.infer<typeof OutputFormatSchema>;
|
|
263
|
+
/**
|
|
264
|
+
* Git Config Schema
|
|
265
|
+
*/
|
|
266
|
+
export declare const GitConfigSchema: z.ZodObject<{
|
|
267
|
+
/** Main branch name (default: main) */
|
|
268
|
+
mainBranch: z.ZodDefault<z.ZodString>;
|
|
269
|
+
/** Auto-sync with remote (default: false) */
|
|
270
|
+
autoSync: z.ZodDefault<z.ZodBoolean>;
|
|
271
|
+
/** Warn if branch is behind remote (default: true) */
|
|
272
|
+
warnIfBehind: z.ZodDefault<z.ZodBoolean>;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
mainBranch: string;
|
|
275
|
+
autoSync: boolean;
|
|
276
|
+
warnIfBehind: boolean;
|
|
277
|
+
}, {
|
|
278
|
+
mainBranch?: string | undefined;
|
|
279
|
+
autoSync?: boolean | undefined;
|
|
280
|
+
warnIfBehind?: boolean | undefined;
|
|
281
|
+
}>;
|
|
282
|
+
export type GitConfig = z.infer<typeof GitConfigSchema>;
|
|
283
|
+
/**
|
|
284
|
+
* Output Config Schema
|
|
285
|
+
*/
|
|
286
|
+
export declare const OutputConfigSchema: z.ZodObject<{
|
|
287
|
+
/** Output format (default: auto) */
|
|
288
|
+
format: z.ZodDefault<z.ZodEnum<["human", "yaml", "json", "auto"]>>;
|
|
289
|
+
/** Show progress indicators (default: true) */
|
|
290
|
+
showProgress: z.ZodDefault<z.ZodBoolean>;
|
|
291
|
+
/** Verbose logging (default: false) */
|
|
292
|
+
verbose: z.ZodDefault<z.ZodBoolean>;
|
|
293
|
+
/** Suppress ANSI colors (default: false) */
|
|
294
|
+
noColor: z.ZodDefault<z.ZodBoolean>;
|
|
295
|
+
}, "strip", z.ZodTypeAny, {
|
|
296
|
+
format: "human" | "yaml" | "json" | "auto";
|
|
297
|
+
showProgress: boolean;
|
|
298
|
+
verbose: boolean;
|
|
299
|
+
noColor: boolean;
|
|
300
|
+
}, {
|
|
301
|
+
format?: "human" | "yaml" | "json" | "auto" | undefined;
|
|
302
|
+
showProgress?: boolean | undefined;
|
|
303
|
+
verbose?: boolean | undefined;
|
|
304
|
+
noColor?: boolean | undefined;
|
|
305
|
+
}>;
|
|
306
|
+
export type OutputConfig = z.infer<typeof OutputConfigSchema>;
|
|
307
|
+
/**
|
|
308
|
+
* Full Configuration Schema
|
|
309
|
+
*
|
|
310
|
+
* Root configuration object for vibe-validate.
|
|
311
|
+
*/
|
|
312
|
+
export declare const VibeValidateConfigSchema: z.ZodObject<{
|
|
313
|
+
/** Validation configuration */
|
|
314
|
+
validation: z.ZodObject<{
|
|
315
|
+
/** Validation phases to execute */
|
|
316
|
+
phases: z.ZodArray<z.ZodObject<{
|
|
317
|
+
/** Phase name (e.g., "Pre-Qualification", "Testing") */
|
|
318
|
+
name: z.ZodString;
|
|
319
|
+
/** Execute steps in parallel (default: false) */
|
|
320
|
+
parallel: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
321
|
+
/** Optional: Phase names this phase depends on */
|
|
322
|
+
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
323
|
+
/** Steps to execute in this phase */
|
|
324
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
325
|
+
/** Human-readable step name (e.g., "TypeScript type checking") */
|
|
326
|
+
name: z.ZodString;
|
|
327
|
+
/** Command to execute (e.g., "npm run typecheck") */
|
|
328
|
+
command: z.ZodString;
|
|
329
|
+
/** Optional: Custom timeout in milliseconds (default: inherited from phase) */
|
|
330
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
331
|
+
/** Optional: Continue on failure (default: false) */
|
|
332
|
+
continueOnError: z.ZodOptional<z.ZodBoolean>;
|
|
333
|
+
/** Optional: Environment variables for this step */
|
|
334
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
335
|
+
/** Optional: Working directory for this step (default: project root) */
|
|
336
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
337
|
+
}, "strip", z.ZodTypeAny, {
|
|
338
|
+
name: string;
|
|
339
|
+
command: string;
|
|
340
|
+
timeout?: number | undefined;
|
|
341
|
+
continueOnError?: boolean | undefined;
|
|
342
|
+
env?: Record<string, string> | undefined;
|
|
343
|
+
cwd?: string | undefined;
|
|
344
|
+
}, {
|
|
345
|
+
name: string;
|
|
346
|
+
command: string;
|
|
347
|
+
timeout?: number | undefined;
|
|
348
|
+
continueOnError?: boolean | undefined;
|
|
349
|
+
env?: Record<string, string> | undefined;
|
|
350
|
+
cwd?: string | undefined;
|
|
351
|
+
}>, "many">;
|
|
352
|
+
/** Optional: Default timeout for all steps (milliseconds, default: 300000 = 5min) */
|
|
353
|
+
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
354
|
+
/** Optional: Fail fast - stop on first error (default: true) */
|
|
355
|
+
failFast: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
356
|
+
}, "strip", z.ZodTypeAny, {
|
|
357
|
+
name: string;
|
|
358
|
+
timeout: number;
|
|
359
|
+
parallel: boolean;
|
|
360
|
+
steps: {
|
|
361
|
+
name: string;
|
|
362
|
+
command: string;
|
|
363
|
+
timeout?: number | undefined;
|
|
364
|
+
continueOnError?: boolean | undefined;
|
|
365
|
+
env?: Record<string, string> | undefined;
|
|
366
|
+
cwd?: string | undefined;
|
|
367
|
+
}[];
|
|
368
|
+
failFast: boolean;
|
|
369
|
+
dependsOn?: string[] | undefined;
|
|
370
|
+
}, {
|
|
371
|
+
name: string;
|
|
372
|
+
steps: {
|
|
373
|
+
name: string;
|
|
374
|
+
command: string;
|
|
375
|
+
timeout?: number | undefined;
|
|
376
|
+
continueOnError?: boolean | undefined;
|
|
377
|
+
env?: Record<string, string> | undefined;
|
|
378
|
+
cwd?: string | undefined;
|
|
379
|
+
}[];
|
|
380
|
+
timeout?: number | undefined;
|
|
381
|
+
parallel?: boolean | undefined;
|
|
382
|
+
dependsOn?: string[] | undefined;
|
|
383
|
+
failFast?: boolean | undefined;
|
|
384
|
+
}>, "many">;
|
|
385
|
+
/** Caching configuration */
|
|
386
|
+
caching: z.ZodDefault<z.ZodObject<{
|
|
387
|
+
/** Caching strategy (default: git-tree-hash) */
|
|
388
|
+
strategy: z.ZodDefault<z.ZodEnum<["git-tree-hash", "timestamp", "disabled"]>>;
|
|
389
|
+
/** Enable caching (default: true) */
|
|
390
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
391
|
+
/** State file path (default: .vibe-validate-state.yaml) */
|
|
392
|
+
statePath: z.ZodDefault<z.ZodString>;
|
|
393
|
+
}, "strip", z.ZodTypeAny, {
|
|
394
|
+
strategy: "git-tree-hash" | "timestamp" | "disabled";
|
|
395
|
+
enabled: boolean;
|
|
396
|
+
statePath: string;
|
|
397
|
+
}, {
|
|
398
|
+
strategy?: "git-tree-hash" | "timestamp" | "disabled" | undefined;
|
|
399
|
+
enabled?: boolean | undefined;
|
|
400
|
+
statePath?: string | undefined;
|
|
401
|
+
}>>;
|
|
402
|
+
}, "strip", z.ZodTypeAny, {
|
|
403
|
+
phases: {
|
|
404
|
+
name: string;
|
|
405
|
+
timeout: number;
|
|
406
|
+
parallel: boolean;
|
|
407
|
+
steps: {
|
|
408
|
+
name: string;
|
|
409
|
+
command: string;
|
|
410
|
+
timeout?: number | undefined;
|
|
411
|
+
continueOnError?: boolean | undefined;
|
|
412
|
+
env?: Record<string, string> | undefined;
|
|
413
|
+
cwd?: string | undefined;
|
|
414
|
+
}[];
|
|
415
|
+
failFast: boolean;
|
|
416
|
+
dependsOn?: string[] | undefined;
|
|
417
|
+
}[];
|
|
418
|
+
caching: {
|
|
419
|
+
strategy: "git-tree-hash" | "timestamp" | "disabled";
|
|
420
|
+
enabled: boolean;
|
|
421
|
+
statePath: string;
|
|
422
|
+
};
|
|
423
|
+
}, {
|
|
424
|
+
phases: {
|
|
425
|
+
name: string;
|
|
426
|
+
steps: {
|
|
427
|
+
name: string;
|
|
428
|
+
command: string;
|
|
429
|
+
timeout?: number | undefined;
|
|
430
|
+
continueOnError?: boolean | undefined;
|
|
431
|
+
env?: Record<string, string> | undefined;
|
|
432
|
+
cwd?: string | undefined;
|
|
433
|
+
}[];
|
|
434
|
+
timeout?: number | undefined;
|
|
435
|
+
parallel?: boolean | undefined;
|
|
436
|
+
dependsOn?: string[] | undefined;
|
|
437
|
+
failFast?: boolean | undefined;
|
|
438
|
+
}[];
|
|
439
|
+
caching?: {
|
|
440
|
+
strategy?: "git-tree-hash" | "timestamp" | "disabled" | undefined;
|
|
441
|
+
enabled?: boolean | undefined;
|
|
442
|
+
statePath?: string | undefined;
|
|
443
|
+
} | undefined;
|
|
444
|
+
}>;
|
|
445
|
+
/** Git integration configuration */
|
|
446
|
+
git: z.ZodDefault<z.ZodObject<{
|
|
447
|
+
/** Main branch name (default: main) */
|
|
448
|
+
mainBranch: z.ZodDefault<z.ZodString>;
|
|
449
|
+
/** Auto-sync with remote (default: false) */
|
|
450
|
+
autoSync: z.ZodDefault<z.ZodBoolean>;
|
|
451
|
+
/** Warn if branch is behind remote (default: true) */
|
|
452
|
+
warnIfBehind: z.ZodDefault<z.ZodBoolean>;
|
|
453
|
+
}, "strip", z.ZodTypeAny, {
|
|
454
|
+
mainBranch: string;
|
|
455
|
+
autoSync: boolean;
|
|
456
|
+
warnIfBehind: boolean;
|
|
457
|
+
}, {
|
|
458
|
+
mainBranch?: string | undefined;
|
|
459
|
+
autoSync?: boolean | undefined;
|
|
460
|
+
warnIfBehind?: boolean | undefined;
|
|
461
|
+
}>>;
|
|
462
|
+
/** Output formatting configuration */
|
|
463
|
+
output: z.ZodDefault<z.ZodObject<{
|
|
464
|
+
/** Output format (default: auto) */
|
|
465
|
+
format: z.ZodDefault<z.ZodEnum<["human", "yaml", "json", "auto"]>>;
|
|
466
|
+
/** Show progress indicators (default: true) */
|
|
467
|
+
showProgress: z.ZodDefault<z.ZodBoolean>;
|
|
468
|
+
/** Verbose logging (default: false) */
|
|
469
|
+
verbose: z.ZodDefault<z.ZodBoolean>;
|
|
470
|
+
/** Suppress ANSI colors (default: false) */
|
|
471
|
+
noColor: z.ZodDefault<z.ZodBoolean>;
|
|
472
|
+
}, "strip", z.ZodTypeAny, {
|
|
473
|
+
format: "human" | "yaml" | "json" | "auto";
|
|
474
|
+
showProgress: boolean;
|
|
475
|
+
verbose: boolean;
|
|
476
|
+
noColor: boolean;
|
|
477
|
+
}, {
|
|
478
|
+
format?: "human" | "yaml" | "json" | "auto" | undefined;
|
|
479
|
+
showProgress?: boolean | undefined;
|
|
480
|
+
verbose?: boolean | undefined;
|
|
481
|
+
noColor?: boolean | undefined;
|
|
482
|
+
}>>;
|
|
483
|
+
/** Optional: Preset name (typescript-library, typescript-nodejs, etc.) */
|
|
484
|
+
preset: z.ZodOptional<z.ZodString>;
|
|
485
|
+
/** Optional: Extend another config file */
|
|
486
|
+
extends: z.ZodOptional<z.ZodString>;
|
|
487
|
+
}, "strip", z.ZodTypeAny, {
|
|
488
|
+
validation: {
|
|
489
|
+
phases: {
|
|
490
|
+
name: string;
|
|
491
|
+
timeout: number;
|
|
492
|
+
parallel: boolean;
|
|
493
|
+
steps: {
|
|
494
|
+
name: string;
|
|
495
|
+
command: string;
|
|
496
|
+
timeout?: number | undefined;
|
|
497
|
+
continueOnError?: boolean | undefined;
|
|
498
|
+
env?: Record<string, string> | undefined;
|
|
499
|
+
cwd?: string | undefined;
|
|
500
|
+
}[];
|
|
501
|
+
failFast: boolean;
|
|
502
|
+
dependsOn?: string[] | undefined;
|
|
503
|
+
}[];
|
|
504
|
+
caching: {
|
|
505
|
+
strategy: "git-tree-hash" | "timestamp" | "disabled";
|
|
506
|
+
enabled: boolean;
|
|
507
|
+
statePath: string;
|
|
508
|
+
};
|
|
509
|
+
};
|
|
510
|
+
git: {
|
|
511
|
+
mainBranch: string;
|
|
512
|
+
autoSync: boolean;
|
|
513
|
+
warnIfBehind: boolean;
|
|
514
|
+
};
|
|
515
|
+
output: {
|
|
516
|
+
format: "human" | "yaml" | "json" | "auto";
|
|
517
|
+
showProgress: boolean;
|
|
518
|
+
verbose: boolean;
|
|
519
|
+
noColor: boolean;
|
|
520
|
+
};
|
|
521
|
+
preset?: string | undefined;
|
|
522
|
+
extends?: string | undefined;
|
|
523
|
+
}, {
|
|
524
|
+
validation: {
|
|
525
|
+
phases: {
|
|
526
|
+
name: string;
|
|
527
|
+
steps: {
|
|
528
|
+
name: string;
|
|
529
|
+
command: string;
|
|
530
|
+
timeout?: number | undefined;
|
|
531
|
+
continueOnError?: boolean | undefined;
|
|
532
|
+
env?: Record<string, string> | undefined;
|
|
533
|
+
cwd?: string | undefined;
|
|
534
|
+
}[];
|
|
535
|
+
timeout?: number | undefined;
|
|
536
|
+
parallel?: boolean | undefined;
|
|
537
|
+
dependsOn?: string[] | undefined;
|
|
538
|
+
failFast?: boolean | undefined;
|
|
539
|
+
}[];
|
|
540
|
+
caching?: {
|
|
541
|
+
strategy?: "git-tree-hash" | "timestamp" | "disabled" | undefined;
|
|
542
|
+
enabled?: boolean | undefined;
|
|
543
|
+
statePath?: string | undefined;
|
|
544
|
+
} | undefined;
|
|
545
|
+
};
|
|
546
|
+
git?: {
|
|
547
|
+
mainBranch?: string | undefined;
|
|
548
|
+
autoSync?: boolean | undefined;
|
|
549
|
+
warnIfBehind?: boolean | undefined;
|
|
550
|
+
} | undefined;
|
|
551
|
+
output?: {
|
|
552
|
+
format?: "human" | "yaml" | "json" | "auto" | undefined;
|
|
553
|
+
showProgress?: boolean | undefined;
|
|
554
|
+
verbose?: boolean | undefined;
|
|
555
|
+
noColor?: boolean | undefined;
|
|
556
|
+
} | undefined;
|
|
557
|
+
preset?: string | undefined;
|
|
558
|
+
extends?: string | undefined;
|
|
559
|
+
}>;
|
|
560
|
+
export type VibeValidateConfig = z.infer<typeof VibeValidateConfigSchema>;
|
|
561
|
+
/**
|
|
562
|
+
* Validate configuration object
|
|
563
|
+
*
|
|
564
|
+
* @param config - Configuration object to validate
|
|
565
|
+
* @returns Validated configuration with defaults applied
|
|
566
|
+
* @throws ZodError if validation fails
|
|
567
|
+
*/
|
|
568
|
+
export declare function validateConfig(config: unknown): VibeValidateConfig;
|
|
569
|
+
/**
|
|
570
|
+
* Safely validate configuration with detailed error messages
|
|
571
|
+
*
|
|
572
|
+
* @param config - Configuration object to validate
|
|
573
|
+
* @returns Result object with success flag and data or errors
|
|
574
|
+
*/
|
|
575
|
+
export declare function safeValidateConfig(config: unknown): {
|
|
576
|
+
success: boolean;
|
|
577
|
+
data?: VibeValidateConfig;
|
|
578
|
+
errors?: string[];
|
|
579
|
+
};
|
|
580
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;IAC/B,kEAAkE;;IAGlE,qDAAqD;;IAGrD,+EAA+E;;IAG/E,qDAAqD;;IAGrD,oDAAoD;;IAGpD,wEAAwE;;;;;;;;;;;;;;;;EAExE,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;IAChC,wDAAwD;;IAGxD,iDAAiD;;IAGjD,kDAAkD;;IAGlD,qCAAqC;;QArCrC,kEAAkE;;QAGlE,qDAAqD;;QAGrD,+EAA+E;;QAG/E,qDAAqD;;QAGrD,oDAAoD;;QAGpD,wEAAwE;;;;;;;;;;;;;;;;;IAyBxE,qFAAqF;;IAGrF,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEhE,CAAC;AAGH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,qBAAqB,uDAIhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,sBAAsB;IACjC,mCAAmC;;QArCnC,wDAAwD;;QAGxD,i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