UNPKG

4.6 kBJavaScriptView Raw
1export default {
2 title: 'FileManagerPluginOptions',
3 type: 'object',
4 additionalProperties: false,
5 definitions: {
6 Copy: {
7 description: 'Copy individual files or entire directories from a source folder to a destination folder',
8 type: 'array',
9 minItems: 1,
10 additionalItems: true,
11 itmes: [
12 {
13 type: 'object',
14 additionalProperties: false,
15 properties: {
16 source: {
17 description: 'Copy source. A file or directory or a glob',
18 type: 'string',
19 minLength: 1,
20 },
21 destination: {
22 description: 'Copy destination',
23 type: 'string',
24 minLength: 1,
25 },
26 },
27 },
28 ],
29 },
30 Delete: {
31 description: 'Delete individual files or entire directories',
32 type: 'array',
33 minItems: 1,
34 additionalItems: true,
35 items: {
36 anyOf: [
37 {
38 type: 'object',
39 additionalProperties: false,
40 properties: {
41 source: {
42 type: 'string',
43 minLength: 1,
44 },
45 options: {
46 additionalProperties: true,
47 type: 'object',
48 description: 'Options to forward to del',
49 },
50 },
51 },
52 {
53 type: 'string',
54 minLength: 1,
55 },
56 ],
57 },
58 },
59 Move: {
60 description: 'Move individual files or entire directories from a source folder to a destination folder',
61 type: 'array',
62 additionalItems: true,
63 items: [
64 {
65 type: 'object',
66 additionalProperties: false,
67 properties: {
68 source: {
69 description: 'Move source. A file or directory or a glob',
70 type: 'string',
71 minLength: 1,
72 },
73 destination: {
74 description: 'Move destination',
75 type: 'string',
76 minLength: 1,
77 },
78 },
79 },
80 ],
81 },
82 Mkdir: {
83 description: 'Create Directories',
84 type: 'array',
85 minItems: 1,
86 additionalItems: true,
87 items: {
88 type: 'string',
89 },
90 },
91 Archive: {
92 description: 'Archive individual files or entire directories.',
93 type: 'array',
94 additionalItems: true,
95 items: [
96 {
97 type: 'object',
98 additionalProperties: false,
99 properties: {
100 source: {
101 description: 'Source. A file or directory or a glob',
102 type: 'string',
103 minLength: 1,
104 },
105 destination: {
106 description: 'Archive destination',
107 type: 'string',
108 minLength: 1,
109 },
110 format: {
111 type: 'string',
112 enum: ['zip', 'tar'],
113 },
114 options: {
115 additionalProperties: true,
116 type: 'object',
117 description: 'Options to forward to archiver',
118 },
119 },
120 },
121 ],
122 },
123 Actions: {
124 type: 'object',
125 additionalProperties: false,
126 properties: {
127 copy: {
128 $ref: '#/definitions/Copy',
129 },
130 delete: {
131 $ref: '#/definitions/Delete',
132 },
133 move: {
134 $ref: '#/definitions/Move',
135 },
136 mkdir: {
137 $ref: '#/definitions/Mkdir',
138 },
139 archive: {
140 $ref: '#/definitions/Archive',
141 },
142 },
143 },
144 },
145 properties: {
146 events: {
147 type: 'object',
148 additionalProperties: false,
149 properties: {
150 onStart: {
151 oneOf: [
152 {
153 $ref: '#/definitions/Actions',
154 },
155 {
156 type: 'array',
157 items: {
158 $ref: '#/definitions/Actions',
159 },
160 },
161 ],
162 },
163 onEnd: {
164 oneOf: [
165 {
166 $ref: '#/definitions/Actions',
167 },
168 {
169 type: 'array',
170 items: {
171 $ref: '#/definitions/Actions',
172 },
173 },
174 ],
175 },
176 },
177 },
178 runTasksInSeries: {
179 type: 'boolean',
180 default: false,
181 description: 'Run tasks in an action in series',
182 },
183 context: {
184 type: 'string',
185 description: 'The directory, an absolute path, for resolving files. Defaults to webpack context',
186 },
187 },
188};