5etools-utils 0.15.8 → 0.15.10
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 +13 -13
- package/bin/clean-html.js +0 -0
- package/bin/test-edition-sources.js +0 -0
- package/bin/test-file-contents.js +0 -0
- package/bin/test-file-locations.js +0 -0
- package/bin/test-file-names.js +0 -0
- package/bin/test-file-props.js +0 -0
- package/bin/test-img-file-extensions.js +0 -0
- package/bin/test-img-file-sizes.js +0 -0
- package/bin/test-img-source-names-brew.js +0 -0
- package/bin/test-img-source-names-ua.js +0 -0
- package/bin/test-json-brew.js +0 -0
- package/bin/test-json-ua.js +0 -0
- package/lib/BrewCleanerHtml.js +2 -3
- package/lib/TestJson.js +2 -3
- package/lib/WorkerList.js +5 -3
- package/package.json +1 -1
- package/schema/brew/homebrew.json +11 -11
- package/schema/brew/util-copy.json +4 -2
- package/schema/brew-fast/homebrew.json +11 -11
- package/schema/brew-fast/util-copy.json +4 -2
- package/schema/site/homebrew.json +11 -11
- package/schema/site/util-copy.json +4 -2
- package/schema/site-fast/homebrew.json +11 -11
- package/schema/site-fast/util-copy.json +4 -2
- package/schema/ua/homebrew.json +11 -11
- package/schema/ua/util-copy.json +4 -2
- package/schema/ua-fast/homebrew.json +11 -11
- package/schema/ua-fast/util-copy.json +4 -2
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
# 5etools Utils
|
|
2
|
-
|
|
3
|
-
Available commands:
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
npx clean-html
|
|
7
|
-
npx test-file-names [--name-regex <regex>]
|
|
8
|
-
npx test-file-contents --img-repo-name <repo> --url-prefix-expected <prefix>
|
|
9
|
-
npx test-json-brew [file] [--dir <dir>]
|
|
10
|
-
npx test-json-ua [file] [--dir <dir>]
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
And more; see `bin/`.
|
|
1
|
+
# 5etools Utils
|
|
2
|
+
|
|
3
|
+
Available commands:
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
npx clean-html
|
|
7
|
+
npx test-file-names [--name-regex <regex>]
|
|
8
|
+
npx test-file-contents --img-repo-name <repo> --url-prefix-expected <prefix>
|
|
9
|
+
npx test-json-brew [file] [--dir <dir>]
|
|
10
|
+
npx test-json-ua [file] [--dir <dir>]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
And more; see `bin/`.
|
package/bin/clean-html.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/bin/test-file-names.js
CHANGED
|
File without changes
|
package/bin/test-file-props.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/bin/test-json-brew.js
CHANGED
|
File without changes
|
package/bin/test-json-ua.js
CHANGED
|
File without changes
|
package/lib/BrewCleanerHtml.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import {Worker} from "node:worker_threads";
|
|
2
2
|
import fs from "node:fs";
|
|
3
|
-
import os from "node:os";
|
|
4
3
|
import he from "he";
|
|
5
4
|
import sanitizeHtml from "sanitize-html";
|
|
6
5
|
import {getCleanJson} from "./UtilClean.js";
|
|
7
6
|
import {ObjectWalker} from "./ObjectWalker.js";
|
|
8
7
|
import * as Uf from "./UtilFs.js";
|
|
9
8
|
import Um from "./UtilMisc.js";
|
|
10
|
-
import {Deferred, WorkerList} from "./WorkerList.js";
|
|
9
|
+
import {Deferred, WorkerList, getCntWorkers} from "./WorkerList.js";
|
|
11
10
|
|
|
12
11
|
export class BrewCleanerHtml {
|
|
13
12
|
static _LOG_TAG = `HTML`;
|
|
@@ -107,7 +106,7 @@ export class BrewCleanerHtml {
|
|
|
107
106
|
static async pGetErrorsOnDirsWorkers ({isFailFast = false} = {}) {
|
|
108
107
|
Um.info(this._LOG_TAG, `Testing for HTML...`);
|
|
109
108
|
|
|
110
|
-
const cntWorkers =
|
|
109
|
+
const cntWorkers = getCntWorkers();
|
|
111
110
|
|
|
112
111
|
const messages = [];
|
|
113
112
|
|
package/lib/TestJson.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as os from "os";
|
|
2
1
|
import * as path from "path";
|
|
3
2
|
import * as url from "url";
|
|
4
3
|
import {Worker} from "worker_threads";
|
|
@@ -7,7 +6,7 @@ import * as jsonSourceMap from "json-source-map";
|
|
|
7
6
|
|
|
8
7
|
import * as Uf from "./UtilFs.js";
|
|
9
8
|
import Um from "./UtilMisc.js";
|
|
10
|
-
import {WorkerList, Deferred} from "./WorkerList.js";
|
|
9
|
+
import {WorkerList, Deferred, getCntWorkers} from "./WorkerList.js";
|
|
11
10
|
import {ObjectWalker} from "./ObjectWalker.js";
|
|
12
11
|
import {UrlUtil} from "./UrlUtil.js";
|
|
13
12
|
import {UtilAjv} from "./UtilAjv.js";
|
|
@@ -211,7 +210,7 @@ class JsonTester {
|
|
|
211
210
|
async pGetErrorsOnDirsWorkers ({isFailFast = false, fileList = null} = {}) {
|
|
212
211
|
Um.info(this._tagLog, `Validating JSON against schemas in dir: ${this._dirSchema}`);
|
|
213
212
|
|
|
214
|
-
const cntWorkers =
|
|
213
|
+
const cntWorkers = getCntWorkers();
|
|
215
214
|
|
|
216
215
|
const errors = [];
|
|
217
216
|
const errorsFull = [];
|
package/lib/WorkerList.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import os from "node:os";
|
|
2
|
+
|
|
3
|
+
export class Deferred {
|
|
2
4
|
constructor () {
|
|
3
5
|
this._resolve = null;
|
|
4
6
|
this._reject = null;
|
|
@@ -13,7 +15,7 @@ class Deferred {
|
|
|
13
15
|
get promise () { return this._promise; }
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
class WorkerList {
|
|
18
|
+
export class WorkerList {
|
|
17
19
|
/**
|
|
18
20
|
* @param {Array} workers
|
|
19
21
|
*/
|
|
@@ -44,4 +46,4 @@ class WorkerList {
|
|
|
44
46
|
get cntAvailableWorkers () { return this._workers.length; }
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
export
|
|
49
|
+
export const getCntWorkers = () => Math.max(1, os.cpus().length - 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"description": "Homebrew for 5etools. Should include arrays titled similarly to the main site data, e.g. `spell` or `class`",
|
|
6
6
|
"$defs": {
|
|
@@ -315,16 +315,6 @@
|
|
|
315
315
|
},
|
|
316
316
|
"markdownDescription": "Structure as per "dependencies". Additional sources to be included when loading the file."
|
|
317
317
|
},
|
|
318
|
-
"references": {
|
|
319
|
-
"description": "A \"soft\" alternative to `\"dependencies\"`, used only for data validation (and may therefore be omitted).\n\nAn array of `[\"<NonSiteJsonSource1>\", ..., \"<NonSiteJsonSourceN>\"]`. Entities from these sources will be made available when running e.g. 5etools' `test-tags.js`.",
|
|
320
|
-
"type": "array",
|
|
321
|
-
"items": {
|
|
322
|
-
"type": "string"
|
|
323
|
-
},
|
|
324
|
-
"minItems": 1,
|
|
325
|
-
"uniqueItems": true,
|
|
326
|
-
"markdownDescription": "A "soft" alternative to "dependencies", used only for data validation (and may therefore be omitted).\n\nAn array of ["<NonSiteJsonSource1>", ..., "<NonSiteJsonSourceN>"]. Entities from these sources will be made available when running e.g. 5etools' test-tags.js."
|
|
327
|
-
},
|
|
328
318
|
"internalCopies": {
|
|
329
319
|
"description": "An array of keys that are copied from within the current document. e.g. \"item\", \"monsterFluff\", \"background\" etc.",
|
|
330
320
|
"type": "array",
|
|
@@ -381,6 +371,16 @@
|
|
|
381
371
|
"description": "Supplementary information used when testing this homebrew.",
|
|
382
372
|
"type": "object",
|
|
383
373
|
"properties": {
|
|
374
|
+
"references": {
|
|
375
|
+
"description": "A \"soft\" alternative to `\"dependencies\"`, used only for data validation (and may therefore be omitted).\n\nAn array of `[\"<NonSiteJsonSource1>\", ..., \"<NonSiteJsonSourceN>\"]`. Entities from these sources will be made available when running e.g. 5etools' `test-tags.js`.",
|
|
376
|
+
"type": "array",
|
|
377
|
+
"items": {
|
|
378
|
+
"type": "string"
|
|
379
|
+
},
|
|
380
|
+
"minItems": 1,
|
|
381
|
+
"uniqueItems": true,
|
|
382
|
+
"markdownDescription": "A "soft" alternative to "dependencies", used only for data validation (and may therefore be omitted).\n\nAn array of ["<NonSiteJsonSource1>", ..., "<NonSiteJsonSourceN>"]. Entities from these sources will be made available when running e.g. 5etools' test-tags.js."
|
|
383
|
+
},
|
|
384
384
|
"additionalImageSources": {
|
|
385
385
|
"description": "Other sources from which this homebrew should be allowed to use images.",
|
|
386
386
|
"type": "array",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "util-copy.json",
|
|
4
4
|
"title": "Util: Copy",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.11",
|
|
6
6
|
"$defs": {
|
|
7
7
|
"_mod_renameArr_rename": {
|
|
8
8
|
"type": "object",
|
|
@@ -1112,7 +1112,9 @@
|
|
|
1112
1112
|
"required": [
|
|
1113
1113
|
"_variables"
|
|
1114
1114
|
]
|
|
1115
|
-
}
|
|
1115
|
+
},
|
|
1116
|
+
"minItems": 1,
|
|
1117
|
+
"uniqueItems": true
|
|
1116
1118
|
}
|
|
1117
1119
|
},
|
|
1118
1120
|
"required": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"description": "Homebrew for 5etools. Should include arrays titled similarly to the main site data, e.g. `spell` or `class`",
|
|
6
6
|
"$defs": {
|
|
@@ -313,16 +313,6 @@
|
|
|
313
313
|
},
|
|
314
314
|
"markdownDescription": "Structure as per "dependencies". Additional sources to be included when loading the file."
|
|
315
315
|
},
|
|
316
|
-
"references": {
|
|
317
|
-
"description": "A \"soft\" alternative to `\"dependencies\"`, used only for data validation (and may therefore be omitted).\n\nAn array of `[\"<NonSiteJsonSource1>\", ..., \"<NonSiteJsonSourceN>\"]`. Entities from these sources will be made available when running e.g. 5etools' `test-tags.js`.",
|
|
318
|
-
"type": "array",
|
|
319
|
-
"items": {
|
|
320
|
-
"type": "string"
|
|
321
|
-
},
|
|
322
|
-
"minItems": 1,
|
|
323
|
-
"uniqueItems": true,
|
|
324
|
-
"markdownDescription": "A "soft" alternative to "dependencies", used only for data validation (and may therefore be omitted).\n\nAn array of ["<NonSiteJsonSource1>", ..., "<NonSiteJsonSourceN>"]. Entities from these sources will be made available when running e.g. 5etools' test-tags.js."
|
|
325
|
-
},
|
|
326
316
|
"internalCopies": {
|
|
327
317
|
"description": "An array of keys that are copied from within the current document. e.g. \"item\", \"monsterFluff\", \"background\" etc.",
|
|
328
318
|
"type": "array",
|
|
@@ -379,6 +369,16 @@
|
|
|
379
369
|
"description": "Supplementary information used when testing this homebrew.",
|
|
380
370
|
"type": "object",
|
|
381
371
|
"properties": {
|
|
372
|
+
"references": {
|
|
373
|
+
"description": "A \"soft\" alternative to `\"dependencies\"`, used only for data validation (and may therefore be omitted).\n\nAn array of `[\"<NonSiteJsonSource1>\", ..., \"<NonSiteJsonSourceN>\"]`. Entities from these sources will be made available when running e.g. 5etools' `test-tags.js`.",
|
|
374
|
+
"type": "array",
|
|
375
|
+
"items": {
|
|
376
|
+
"type": "string"
|
|
377
|
+
},
|
|
378
|
+
"minItems": 1,
|
|
379
|
+
"uniqueItems": true,
|
|
380
|
+
"markdownDescription": "A "soft" alternative to "dependencies", used only for data validation (and may therefore be omitted).\n\nAn array of ["<NonSiteJsonSource1>", ..., "<NonSiteJsonSourceN>"]. Entities from these sources will be made available when running e.g. 5etools' test-tags.js."
|
|
381
|
+
},
|
|
382
382
|
"additionalImageSources": {
|
|
383
383
|
"description": "Other sources from which this homebrew should be allowed to use images.",
|
|
384
384
|
"type": "array",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "util-copy.json",
|
|
4
4
|
"title": "Util: Copy",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.11",
|
|
6
6
|
"$defs": {
|
|
7
7
|
"_mod_renameArr_rename": {
|
|
8
8
|
"type": "object",
|
|
@@ -1112,7 +1112,9 @@
|
|
|
1112
1112
|
"required": [
|
|
1113
1113
|
"_variables"
|
|
1114
1114
|
]
|
|
1115
|
-
}
|
|
1115
|
+
},
|
|
1116
|
+
"minItems": 1,
|
|
1117
|
+
"uniqueItems": true
|
|
1116
1118
|
}
|
|
1117
1119
|
},
|
|
1118
1120
|
"required": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"description": "Homebrew for 5etools. Should include arrays titled similarly to the main site data, e.g. `spell` or `class`",
|
|
6
6
|
"$defs": {
|
|
@@ -315,16 +315,6 @@
|
|
|
315
315
|
},
|
|
316
316
|
"markdownDescription": "Structure as per "dependencies". Additional sources to be included when loading the file."
|
|
317
317
|
},
|
|
318
|
-
"references": {
|
|
319
|
-
"description": "A \"soft\" alternative to `\"dependencies\"`, used only for data validation (and may therefore be omitted).\n\nAn array of `[\"<NonSiteJsonSource1>\", ..., \"<NonSiteJsonSourceN>\"]`. Entities from these sources will be made available when running e.g. 5etools' `test-tags.js`.",
|
|
320
|
-
"type": "array",
|
|
321
|
-
"items": {
|
|
322
|
-
"type": "string"
|
|
323
|
-
},
|
|
324
|
-
"minItems": 1,
|
|
325
|
-
"uniqueItems": true,
|
|
326
|
-
"markdownDescription": "A "soft" alternative to "dependencies", used only for data validation (and may therefore be omitted).\n\nAn array of ["<NonSiteJsonSource1>", ..., "<NonSiteJsonSourceN>"]. Entities from these sources will be made available when running e.g. 5etools' test-tags.js."
|
|
327
|
-
},
|
|
328
318
|
"internalCopies": {
|
|
329
319
|
"description": "An array of keys that are copied from within the current document. e.g. \"item\", \"monsterFluff\", \"background\" etc.",
|
|
330
320
|
"type": "array",
|
|
@@ -381,6 +371,16 @@
|
|
|
381
371
|
"description": "Supplementary information used when testing this homebrew.",
|
|
382
372
|
"type": "object",
|
|
383
373
|
"properties": {
|
|
374
|
+
"references": {
|
|
375
|
+
"description": "A \"soft\" alternative to `\"dependencies\"`, used only for data validation (and may therefore be omitted).\n\nAn array of `[\"<NonSiteJsonSource1>\", ..., \"<NonSiteJsonSourceN>\"]`. Entities from these sources will be made available when running e.g. 5etools' `test-tags.js`.",
|
|
376
|
+
"type": "array",
|
|
377
|
+
"items": {
|
|
378
|
+
"type": "string"
|
|
379
|
+
},
|
|
380
|
+
"minItems": 1,
|
|
381
|
+
"uniqueItems": true,
|
|
382
|
+
"markdownDescription": "A "soft" alternative to "dependencies", used only for data validation (and may therefore be omitted).\n\nAn array of ["<NonSiteJsonSource1>", ..., "<NonSiteJsonSourceN>"]. Entities from these sources will be made available when running e.g. 5etools' test-tags.js."
|
|
383
|
+
},
|
|
384
384
|
"additionalImageSources": {
|
|
385
385
|
"description": "Other sources from which this homebrew should be allowed to use images.",
|
|
386
386
|
"type": "array",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "util-copy.json",
|
|
4
4
|
"title": "Util: Copy",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.11",
|
|
6
6
|
"$defs": {
|
|
7
7
|
"_mod_renameArr_rename": {
|
|
8
8
|
"type": "object",
|
|
@@ -1112,7 +1112,9 @@
|
|
|
1112
1112
|
"required": [
|
|
1113
1113
|
"_variables"
|
|
1114
1114
|
]
|
|
1115
|
-
}
|
|
1115
|
+
},
|
|
1116
|
+
"minItems": 1,
|
|
1117
|
+
"uniqueItems": true
|
|
1116
1118
|
}
|
|
1117
1119
|
},
|
|
1118
1120
|
"required": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"description": "Homebrew for 5etools. Should include arrays titled similarly to the main site data, e.g. `spell` or `class`",
|
|
6
6
|
"$defs": {
|
|
@@ -313,16 +313,6 @@
|
|
|
313
313
|
},
|
|
314
314
|
"markdownDescription": "Structure as per "dependencies". Additional sources to be included when loading the file."
|
|
315
315
|
},
|
|
316
|
-
"references": {
|
|
317
|
-
"description": "A \"soft\" alternative to `\"dependencies\"`, used only for data validation (and may therefore be omitted).\n\nAn array of `[\"<NonSiteJsonSource1>\", ..., \"<NonSiteJsonSourceN>\"]`. Entities from these sources will be made available when running e.g. 5etools' `test-tags.js`.",
|
|
318
|
-
"type": "array",
|
|
319
|
-
"items": {
|
|
320
|
-
"type": "string"
|
|
321
|
-
},
|
|
322
|
-
"minItems": 1,
|
|
323
|
-
"uniqueItems": true,
|
|
324
|
-
"markdownDescription": "A "soft" alternative to "dependencies", used only for data validation (and may therefore be omitted).\n\nAn array of ["<NonSiteJsonSource1>", ..., "<NonSiteJsonSourceN>"]. Entities from these sources will be made available when running e.g. 5etools' test-tags.js."
|
|
325
|
-
},
|
|
326
316
|
"internalCopies": {
|
|
327
317
|
"description": "An array of keys that are copied from within the current document. e.g. \"item\", \"monsterFluff\", \"background\" etc.",
|
|
328
318
|
"type": "array",
|
|
@@ -379,6 +369,16 @@
|
|
|
379
369
|
"description": "Supplementary information used when testing this homebrew.",
|
|
380
370
|
"type": "object",
|
|
381
371
|
"properties": {
|
|
372
|
+
"references": {
|
|
373
|
+
"description": "A \"soft\" alternative to `\"dependencies\"`, used only for data validation (and may therefore be omitted).\n\nAn array of `[\"<NonSiteJsonSource1>\", ..., \"<NonSiteJsonSourceN>\"]`. Entities from these sources will be made available when running e.g. 5etools' `test-tags.js`.",
|
|
374
|
+
"type": "array",
|
|
375
|
+
"items": {
|
|
376
|
+
"type": "string"
|
|
377
|
+
},
|
|
378
|
+
"minItems": 1,
|
|
379
|
+
"uniqueItems": true,
|
|
380
|
+
"markdownDescription": "A "soft" alternative to "dependencies", used only for data validation (and may therefore be omitted).\n\nAn array of ["<NonSiteJsonSource1>", ..., "<NonSiteJsonSourceN>"]. Entities from these sources will be made available when running e.g. 5etools' test-tags.js."
|
|
381
|
+
},
|
|
382
382
|
"additionalImageSources": {
|
|
383
383
|
"description": "Other sources from which this homebrew should be allowed to use images.",
|
|
384
384
|
"type": "array",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "util-copy.json",
|
|
4
4
|
"title": "Util: Copy",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.11",
|
|
6
6
|
"$defs": {
|
|
7
7
|
"_mod_renameArr_rename": {
|
|
8
8
|
"type": "object",
|
|
@@ -1112,7 +1112,9 @@
|
|
|
1112
1112
|
"required": [
|
|
1113
1113
|
"_variables"
|
|
1114
1114
|
]
|
|
1115
|
-
}
|
|
1115
|
+
},
|
|
1116
|
+
"minItems": 1,
|
|
1117
|
+
"uniqueItems": true
|
|
1116
1118
|
}
|
|
1117
1119
|
},
|
|
1118
1120
|
"required": [
|
package/schema/ua/homebrew.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"description": "Homebrew for 5etools. Should include arrays titled similarly to the main site data, e.g. `spell` or `class`",
|
|
6
6
|
"$defs": {
|
|
@@ -315,16 +315,6 @@
|
|
|
315
315
|
},
|
|
316
316
|
"markdownDescription": "Structure as per "dependencies". Additional sources to be included when loading the file."
|
|
317
317
|
},
|
|
318
|
-
"references": {
|
|
319
|
-
"description": "A \"soft\" alternative to `\"dependencies\"`, used only for data validation (and may therefore be omitted).\n\nAn array of `[\"<NonSiteJsonSource1>\", ..., \"<NonSiteJsonSourceN>\"]`. Entities from these sources will be made available when running e.g. 5etools' `test-tags.js`.",
|
|
320
|
-
"type": "array",
|
|
321
|
-
"items": {
|
|
322
|
-
"type": "string"
|
|
323
|
-
},
|
|
324
|
-
"minItems": 1,
|
|
325
|
-
"uniqueItems": true,
|
|
326
|
-
"markdownDescription": "A "soft" alternative to "dependencies", used only for data validation (and may therefore be omitted).\n\nAn array of ["<NonSiteJsonSource1>", ..., "<NonSiteJsonSourceN>"]. Entities from these sources will be made available when running e.g. 5etools' test-tags.js."
|
|
327
|
-
},
|
|
328
318
|
"internalCopies": {
|
|
329
319
|
"description": "An array of keys that are copied from within the current document. e.g. \"item\", \"monsterFluff\", \"background\" etc.",
|
|
330
320
|
"type": "array",
|
|
@@ -381,6 +371,16 @@
|
|
|
381
371
|
"description": "Supplementary information used when testing this homebrew.",
|
|
382
372
|
"type": "object",
|
|
383
373
|
"properties": {
|
|
374
|
+
"references": {
|
|
375
|
+
"description": "A \"soft\" alternative to `\"dependencies\"`, used only for data validation (and may therefore be omitted).\n\nAn array of `[\"<NonSiteJsonSource1>\", ..., \"<NonSiteJsonSourceN>\"]`. Entities from these sources will be made available when running e.g. 5etools' `test-tags.js`.",
|
|
376
|
+
"type": "array",
|
|
377
|
+
"items": {
|
|
378
|
+
"type": "string"
|
|
379
|
+
},
|
|
380
|
+
"minItems": 1,
|
|
381
|
+
"uniqueItems": true,
|
|
382
|
+
"markdownDescription": "A "soft" alternative to "dependencies", used only for data validation (and may therefore be omitted).\n\nAn array of ["<NonSiteJsonSource1>", ..., "<NonSiteJsonSourceN>"]. Entities from these sources will be made available when running e.g. 5etools' test-tags.js."
|
|
383
|
+
},
|
|
384
384
|
"additionalImageSources": {
|
|
385
385
|
"description": "Other sources from which this homebrew should be allowed to use images.",
|
|
386
386
|
"type": "array",
|
package/schema/ua/util-copy.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "util-copy.json",
|
|
4
4
|
"title": "Util: Copy",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.11",
|
|
6
6
|
"$defs": {
|
|
7
7
|
"_mod_renameArr_rename": {
|
|
8
8
|
"type": "object",
|
|
@@ -1112,7 +1112,9 @@
|
|
|
1112
1112
|
"required": [
|
|
1113
1113
|
"_variables"
|
|
1114
1114
|
]
|
|
1115
|
-
}
|
|
1115
|
+
},
|
|
1116
|
+
"minItems": 1,
|
|
1117
|
+
"uniqueItems": true
|
|
1116
1118
|
}
|
|
1117
1119
|
},
|
|
1118
1120
|
"required": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"description": "Homebrew for 5etools. Should include arrays titled similarly to the main site data, e.g. `spell` or `class`",
|
|
6
6
|
"$defs": {
|
|
@@ -313,16 +313,6 @@
|
|
|
313
313
|
},
|
|
314
314
|
"markdownDescription": "Structure as per "dependencies". Additional sources to be included when loading the file."
|
|
315
315
|
},
|
|
316
|
-
"references": {
|
|
317
|
-
"description": "A \"soft\" alternative to `\"dependencies\"`, used only for data validation (and may therefore be omitted).\n\nAn array of `[\"<NonSiteJsonSource1>\", ..., \"<NonSiteJsonSourceN>\"]`. Entities from these sources will be made available when running e.g. 5etools' `test-tags.js`.",
|
|
318
|
-
"type": "array",
|
|
319
|
-
"items": {
|
|
320
|
-
"type": "string"
|
|
321
|
-
},
|
|
322
|
-
"minItems": 1,
|
|
323
|
-
"uniqueItems": true,
|
|
324
|
-
"markdownDescription": "A "soft" alternative to "dependencies", used only for data validation (and may therefore be omitted).\n\nAn array of ["<NonSiteJsonSource1>", ..., "<NonSiteJsonSourceN>"]. Entities from these sources will be made available when running e.g. 5etools' test-tags.js."
|
|
325
|
-
},
|
|
326
316
|
"internalCopies": {
|
|
327
317
|
"description": "An array of keys that are copied from within the current document. e.g. \"item\", \"monsterFluff\", \"background\" etc.",
|
|
328
318
|
"type": "array",
|
|
@@ -379,6 +369,16 @@
|
|
|
379
369
|
"description": "Supplementary information used when testing this homebrew.",
|
|
380
370
|
"type": "object",
|
|
381
371
|
"properties": {
|
|
372
|
+
"references": {
|
|
373
|
+
"description": "A \"soft\" alternative to `\"dependencies\"`, used only for data validation (and may therefore be omitted).\n\nAn array of `[\"<NonSiteJsonSource1>\", ..., \"<NonSiteJsonSourceN>\"]`. Entities from these sources will be made available when running e.g. 5etools' `test-tags.js`.",
|
|
374
|
+
"type": "array",
|
|
375
|
+
"items": {
|
|
376
|
+
"type": "string"
|
|
377
|
+
},
|
|
378
|
+
"minItems": 1,
|
|
379
|
+
"uniqueItems": true,
|
|
380
|
+
"markdownDescription": "A "soft" alternative to "dependencies", used only for data validation (and may therefore be omitted).\n\nAn array of ["<NonSiteJsonSource1>", ..., "<NonSiteJsonSourceN>"]. Entities from these sources will be made available when running e.g. 5etools' test-tags.js."
|
|
381
|
+
},
|
|
382
382
|
"additionalImageSources": {
|
|
383
383
|
"description": "Other sources from which this homebrew should be allowed to use images.",
|
|
384
384
|
"type": "array",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "util-copy.json",
|
|
4
4
|
"title": "Util: Copy",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.11",
|
|
6
6
|
"$defs": {
|
|
7
7
|
"_mod_renameArr_rename": {
|
|
8
8
|
"type": "object",
|
|
@@ -1112,7 +1112,9 @@
|
|
|
1112
1112
|
"required": [
|
|
1113
1113
|
"_variables"
|
|
1114
1114
|
]
|
|
1115
|
-
}
|
|
1115
|
+
},
|
|
1116
|
+
"minItems": 1,
|
|
1117
|
+
"uniqueItems": true
|
|
1116
1118
|
}
|
|
1117
1119
|
},
|
|
1118
1120
|
"required": [
|