1 | import type validate from 'schema-utils';
|
2 |
|
3 | type Schema = Parameters<typeof validate>[0];
|
4 |
|
5 | export const schema: Schema = {
|
6 | type: 'object',
|
7 | properties: {
|
8 | patterns: {
|
9 | anyOf: [
|
10 | {type: 'string'},
|
11 | {
|
12 | type: 'array',
|
13 | uniqueItems: true,
|
14 | items: {
|
15 | type: 'string',
|
16 | },
|
17 | },
|
18 | ],
|
19 | },
|
20 | injector: {
|
21 | anyOf: [
|
22 | {
|
23 | type: 'string',
|
24 | enum: ['prepend', 'append'],
|
25 | },
|
26 | {
|
27 | instanceof: 'Function',
|
28 | },
|
29 | ],
|
30 | },
|
31 | globOptions: {
|
32 | type: 'object',
|
33 | },
|
34 | resolveUrl: {
|
35 | type: 'boolean',
|
36 | },
|
37 | },
|
38 | required: ['patterns'],
|
39 | additionalProperties: false,
|
40 | };
|