-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathconfiguration.ts
More file actions
27 lines (24 loc) · 874 Bytes
/
configuration.ts
File metadata and controls
27 lines (24 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { z } from 'zod';
import { filePathSchema, globPathSchema } from './implementation/schemas.js';
/**
* Generic schema for a tool command configuration, reusable across plugins.
*/
export const artifactGenerationCommandSchema = z.union([
z.string().min(1).describe('Generate artifact files'),
z.object({
command: z.string().min(1).describe('Generate artifact files'),
args: z.array(z.string()).optional(),
}),
]);
export const pluginArtifactOptionsSchema = z.object({
generateArtifactsCommand: artifactGenerationCommandSchema.optional(),
artifactsPaths: z
.union([
filePathSchema,
z.array(filePathSchema).min(1),
globPathSchema,
z.array(globPathSchema).min(1),
])
.describe('File paths or glob patterns for artifact files'),
});
export type PluginArtifactOptions = z.infer<typeof pluginArtifactOptionsSchema>;