5etools-utils 0.13.6 → 0.13.8
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/lib/BrewCleaner.js +5 -2
- package/package.json +1 -1
- package/schema/brew/util-foundry.json +306 -3
- package/schema/brew-fast/util-foundry.json +306 -3
- package/schema/site/util-foundry.json +306 -3
- package/schema/site-fast/util-foundry.json +306 -3
- package/schema/ua/util-foundry.json +306 -3
- package/schema/ua-fast/util-foundry.json +306 -3
package/lib/BrewCleaner.js
CHANGED
|
@@ -126,7 +126,10 @@ class _BrewFileTester {
|
|
|
126
126
|
export class BrewCleaner {
|
|
127
127
|
static _IS_FAIL_SLOW = !!process.env.FAIL_SLOW;
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
// Exclude:
|
|
130
|
+
// - Characters which are invalid in Windows filenames
|
|
131
|
+
// - Characters which have significance in a URL
|
|
132
|
+
static _RE_INVALID_CHARS = /[<>:"/\\|?*#%@]/;
|
|
130
133
|
|
|
131
134
|
static _cleanFolder (folder) {
|
|
132
135
|
const ALL_ERRORS = [];
|
|
@@ -135,7 +138,7 @@ export class BrewCleaner {
|
|
|
135
138
|
for (const file of files) {
|
|
136
139
|
let contents = Uf.readJsonSync(file);
|
|
137
140
|
|
|
138
|
-
if (this.
|
|
141
|
+
if (this._RE_INVALID_CHARS.test(file.split("/").slice(1).join("/"))) {
|
|
139
142
|
ALL_ERRORS.push(`${file} contained invalid characters!`);
|
|
140
143
|
if (!this._IS_FAIL_SLOW) break;
|
|
141
144
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "util-foundry.json",
|
|
4
4
|
"title": "Util: Foundry",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.9",
|
|
6
6
|
"$defs": {
|
|
7
7
|
"entryDataObject": {
|
|
8
8
|
"description": "Additional \"5etools-type\" data to be stored on the entry.",
|
|
@@ -113,11 +113,285 @@
|
|
|
113
113
|
},
|
|
114
114
|
"minProperties": 1
|
|
115
115
|
},
|
|
116
|
-
"
|
|
116
|
+
"_foundryActivityObject_base": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"properties": {
|
|
119
|
+
"consumption": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"properties": {
|
|
122
|
+
"targets": {
|
|
123
|
+
"type": "array",
|
|
124
|
+
"items": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"properties": {
|
|
127
|
+
"target": {
|
|
128
|
+
"oneOf": [
|
|
129
|
+
{
|
|
130
|
+
"type": "string"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"type": "object",
|
|
134
|
+
"properties": {
|
|
135
|
+
"prop": {
|
|
136
|
+
"type": "string"
|
|
137
|
+
},
|
|
138
|
+
"uid": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"required": [
|
|
143
|
+
"prop",
|
|
144
|
+
"uid"
|
|
145
|
+
],
|
|
146
|
+
"additionalProperties": false
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"effects": {
|
|
156
|
+
"type": "array",
|
|
157
|
+
"items": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"properties": {
|
|
160
|
+
"foundryId": {
|
|
161
|
+
"$ref": "#/$defs/foundryIdShort"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"required": [
|
|
165
|
+
"foundryId"
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"required": [
|
|
171
|
+
"type"
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
"_foundryActivityObject_damage": {
|
|
117
175
|
"type": "object",
|
|
118
176
|
"properties": {
|
|
177
|
+
"consumption": {
|
|
178
|
+
"type": "object",
|
|
179
|
+
"properties": {
|
|
180
|
+
"targets": {
|
|
181
|
+
"type": "array",
|
|
182
|
+
"items": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"properties": {
|
|
185
|
+
"target": {
|
|
186
|
+
"oneOf": [
|
|
187
|
+
{
|
|
188
|
+
"type": "string"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"type": "object",
|
|
192
|
+
"properties": {
|
|
193
|
+
"prop": {
|
|
194
|
+
"type": "string"
|
|
195
|
+
},
|
|
196
|
+
"uid": {
|
|
197
|
+
"type": "string"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"required": [
|
|
201
|
+
"prop",
|
|
202
|
+
"uid"
|
|
203
|
+
],
|
|
204
|
+
"additionalProperties": false
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"effects": {
|
|
214
|
+
"type": "array",
|
|
215
|
+
"items": {
|
|
216
|
+
"type": "object",
|
|
217
|
+
"properties": {
|
|
218
|
+
"foundryId": {
|
|
219
|
+
"$ref": "#/$defs/foundryIdShort"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"required": [
|
|
223
|
+
"foundryId"
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
},
|
|
119
227
|
"type": {
|
|
120
|
-
"const": "
|
|
228
|
+
"const": "damage"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"required": [
|
|
232
|
+
"type"
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
"_foundryActivityObject_save": {
|
|
236
|
+
"type": "object",
|
|
237
|
+
"properties": {
|
|
238
|
+
"consumption": {
|
|
239
|
+
"type": "object",
|
|
240
|
+
"properties": {
|
|
241
|
+
"targets": {
|
|
242
|
+
"type": "array",
|
|
243
|
+
"items": {
|
|
244
|
+
"type": "object",
|
|
245
|
+
"properties": {
|
|
246
|
+
"target": {
|
|
247
|
+
"oneOf": [
|
|
248
|
+
{
|
|
249
|
+
"type": "string"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"type": "object",
|
|
253
|
+
"properties": {
|
|
254
|
+
"prop": {
|
|
255
|
+
"type": "string"
|
|
256
|
+
},
|
|
257
|
+
"uid": {
|
|
258
|
+
"type": "string"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"required": [
|
|
262
|
+
"prop",
|
|
263
|
+
"uid"
|
|
264
|
+
],
|
|
265
|
+
"additionalProperties": false
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"effects": {
|
|
275
|
+
"type": "array",
|
|
276
|
+
"items": {
|
|
277
|
+
"type": "object",
|
|
278
|
+
"properties": {
|
|
279
|
+
"foundryId": {
|
|
280
|
+
"$ref": "#/$defs/foundryIdShort"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"required": [
|
|
284
|
+
"foundryId"
|
|
285
|
+
]
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"type": {
|
|
289
|
+
"const": "save"
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"required": [
|
|
293
|
+
"type"
|
|
294
|
+
]
|
|
295
|
+
},
|
|
296
|
+
"_foundryActivityObject_heal": {
|
|
297
|
+
"type": "object",
|
|
298
|
+
"properties": {
|
|
299
|
+
"consumption": {
|
|
300
|
+
"type": "object",
|
|
301
|
+
"properties": {
|
|
302
|
+
"targets": {
|
|
303
|
+
"type": "array",
|
|
304
|
+
"items": {
|
|
305
|
+
"type": "object",
|
|
306
|
+
"properties": {
|
|
307
|
+
"target": {
|
|
308
|
+
"oneOf": [
|
|
309
|
+
{
|
|
310
|
+
"type": "string"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"type": "object",
|
|
314
|
+
"properties": {
|
|
315
|
+
"prop": {
|
|
316
|
+
"type": "string"
|
|
317
|
+
},
|
|
318
|
+
"uid": {
|
|
319
|
+
"type": "string"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"required": [
|
|
323
|
+
"prop",
|
|
324
|
+
"uid"
|
|
325
|
+
],
|
|
326
|
+
"additionalProperties": false
|
|
327
|
+
}
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"effects": {
|
|
336
|
+
"type": "array",
|
|
337
|
+
"items": {
|
|
338
|
+
"type": "object",
|
|
339
|
+
"properties": {
|
|
340
|
+
"foundryId": {
|
|
341
|
+
"$ref": "#/$defs/foundryIdShort"
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
"required": [
|
|
345
|
+
"foundryId"
|
|
346
|
+
]
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"type": {
|
|
350
|
+
"const": "heal"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"required": [
|
|
354
|
+
"type"
|
|
355
|
+
]
|
|
356
|
+
},
|
|
357
|
+
"_foundryActivityObject_utility": {
|
|
358
|
+
"type": "object",
|
|
359
|
+
"properties": {
|
|
360
|
+
"consumption": {
|
|
361
|
+
"type": "object",
|
|
362
|
+
"properties": {
|
|
363
|
+
"targets": {
|
|
364
|
+
"type": "array",
|
|
365
|
+
"items": {
|
|
366
|
+
"type": "object",
|
|
367
|
+
"properties": {
|
|
368
|
+
"target": {
|
|
369
|
+
"oneOf": [
|
|
370
|
+
{
|
|
371
|
+
"type": "string"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"type": "object",
|
|
375
|
+
"properties": {
|
|
376
|
+
"prop": {
|
|
377
|
+
"type": "string"
|
|
378
|
+
},
|
|
379
|
+
"uid": {
|
|
380
|
+
"type": "string"
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"required": [
|
|
384
|
+
"prop",
|
|
385
|
+
"uid"
|
|
386
|
+
],
|
|
387
|
+
"additionalProperties": false
|
|
388
|
+
}
|
|
389
|
+
]
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
121
395
|
},
|
|
122
396
|
"effects": {
|
|
123
397
|
"type": "array",
|
|
@@ -132,6 +406,9 @@
|
|
|
132
406
|
"foundryId"
|
|
133
407
|
]
|
|
134
408
|
}
|
|
409
|
+
},
|
|
410
|
+
"type": {
|
|
411
|
+
"const": "utility"
|
|
135
412
|
}
|
|
136
413
|
},
|
|
137
414
|
"required": [
|
|
@@ -140,6 +417,15 @@
|
|
|
140
417
|
},
|
|
141
418
|
"foundryActivityObject": {
|
|
142
419
|
"anyOf": [
|
|
420
|
+
{
|
|
421
|
+
"$ref": "#/$defs/_foundryActivityObject_damage"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"$ref": "#/$defs/_foundryActivityObject_save"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"$ref": "#/$defs/_foundryActivityObject_heal"
|
|
428
|
+
},
|
|
143
429
|
{
|
|
144
430
|
"$ref": "#/$defs/_foundryActivityObject_utility"
|
|
145
431
|
}
|
|
@@ -158,6 +444,9 @@
|
|
|
158
444
|
"img": {
|
|
159
445
|
"type": "string"
|
|
160
446
|
},
|
|
447
|
+
"description": {
|
|
448
|
+
"type": "string"
|
|
449
|
+
},
|
|
161
450
|
"changes": {
|
|
162
451
|
"type": "array",
|
|
163
452
|
"items": {
|
|
@@ -279,6 +568,20 @@
|
|
|
279
568
|
]
|
|
280
569
|
}
|
|
281
570
|
]
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"description": "An effect with no functional changes, but descriptive text. Should only be used for effects which cannot be otherwise automated.",
|
|
574
|
+
"allOf": [
|
|
575
|
+
{
|
|
576
|
+
"$ref": "#/$defs/_foundryEffectObject"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"type": "object",
|
|
580
|
+
"required": [
|
|
581
|
+
"description"
|
|
582
|
+
]
|
|
583
|
+
}
|
|
584
|
+
]
|
|
282
585
|
}
|
|
283
586
|
]
|
|
284
587
|
},
|