5etools-utils 0.13.35 → 0.13.37
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/TestData.js +7 -7
- package/package.json +1 -1
- package/schema/brew/adventures.json +1 -1
- package/schema/brew/books.json +1 -1
- package/schema/brew/converter.json +53 -0
- package/schema/brew-fast/adventures.json +1 -1
- package/schema/brew-fast/books.json +1 -1
- package/schema/brew-fast/converter.json +53 -0
- package/schema/site/adventures.json +1 -1
- package/schema/site/books.json +1 -1
- package/schema/site/converter.json +53 -0
- package/schema/site-fast/adventures.json +1 -1
- package/schema/site-fast/books.json +1 -1
- package/schema/site-fast/converter.json +53 -0
- package/schema/ua/adventures.json +1 -1
- package/schema/ua/books.json +1 -1
- package/schema/ua/converter.json +53 -0
- package/schema/ua-fast/adventures.json +1 -1
- package/schema/ua-fast/books.json +1 -1
- package/schema/ua-fast/converter.json +53 -0
package/lib/TestData.js
CHANGED
|
@@ -19,20 +19,20 @@ class _ParsedJsonChecker {
|
|
|
19
19
|
|
|
20
20
|
/* -------------------------------------------- */
|
|
21
21
|
|
|
22
|
-
static run (filePath, {fnIsIgnoredFile,
|
|
22
|
+
static run (filePath, {fnIsIgnoredFile, fnIsIgnoredDirectory} = {}) {
|
|
23
23
|
this._fileRecurse({
|
|
24
24
|
filePath,
|
|
25
25
|
fnIsIgnoredFile,
|
|
26
|
-
|
|
26
|
+
fnIsIgnoredDirectory,
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
static _fileRecurse ({filePath, fnIsIgnoredFile,
|
|
30
|
+
static _fileRecurse ({filePath, fnIsIgnoredFile, fnIsIgnoredDirectory}) {
|
|
31
31
|
if (fs.lstatSync(filePath).isDirectory()) {
|
|
32
|
-
if (
|
|
32
|
+
if (fnIsIgnoredDirectory && fnIsIgnoredDirectory(filePath)) return;
|
|
33
33
|
|
|
34
34
|
return fs.readdirSync(filePath)
|
|
35
|
-
.forEach(nxt => this._fileRecurse({filePath: `${filePath}/${nxt}`, fnIsIgnoredFile,
|
|
35
|
+
.forEach(nxt => this._fileRecurse({filePath: `${filePath}/${nxt}`, fnIsIgnoredFile, fnIsIgnoredDirectory}));
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
if (!filePath.endsWith(".json") || (fnIsIgnoredFile && fnIsIgnoredFile(filePath))) return;
|
|
@@ -159,10 +159,10 @@ class DataTester {
|
|
|
159
159
|
ClazzDataTesters,
|
|
160
160
|
{
|
|
161
161
|
fnIsIgnoredFile,
|
|
162
|
-
|
|
162
|
+
fnIsIgnoredDirectory,
|
|
163
163
|
} = {},
|
|
164
164
|
) {
|
|
165
|
-
_ParsedJsonChecker.run(filePath, {fnIsIgnoredFile,
|
|
165
|
+
_ParsedJsonChecker.run(filePath, {fnIsIgnoredFile, fnIsIgnoredDirectory});
|
|
166
166
|
|
|
167
167
|
for (const ClazzDataTester of ClazzDataTesters) {
|
|
168
168
|
await ClazzDataTester.pRun();
|
package/package.json
CHANGED
package/schema/brew/books.json
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "converter.json",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"converterSample": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"minItems": 1,
|
|
10
|
+
"uniqueItems": true,
|
|
11
|
+
"items": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"converterId": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": [
|
|
17
|
+
"background",
|
|
18
|
+
"monster",
|
|
19
|
+
"generic",
|
|
20
|
+
"feat",
|
|
21
|
+
"item",
|
|
22
|
+
"race",
|
|
23
|
+
"spell",
|
|
24
|
+
"table"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"format": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": [
|
|
30
|
+
"txt",
|
|
31
|
+
"md",
|
|
32
|
+
"html"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"edition": {
|
|
36
|
+
"$ref": "util-edition.json#/$defs/edition"
|
|
37
|
+
},
|
|
38
|
+
"text": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": [
|
|
43
|
+
"converterId",
|
|
44
|
+
"format",
|
|
45
|
+
"edition",
|
|
46
|
+
"text"
|
|
47
|
+
],
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"additionalProperties": false
|
|
53
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "converter.json",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"converterSample": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"minItems": 1,
|
|
10
|
+
"uniqueItems": true,
|
|
11
|
+
"items": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"converterId": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": [
|
|
17
|
+
"background",
|
|
18
|
+
"monster",
|
|
19
|
+
"generic",
|
|
20
|
+
"feat",
|
|
21
|
+
"item",
|
|
22
|
+
"race",
|
|
23
|
+
"spell",
|
|
24
|
+
"table"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"format": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": [
|
|
30
|
+
"txt",
|
|
31
|
+
"md",
|
|
32
|
+
"html"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"edition": {
|
|
36
|
+
"$ref": "util-edition.json#/$defs/edition"
|
|
37
|
+
},
|
|
38
|
+
"text": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": [
|
|
43
|
+
"converterId",
|
|
44
|
+
"format",
|
|
45
|
+
"edition",
|
|
46
|
+
"text"
|
|
47
|
+
],
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"additionalProperties": false
|
|
53
|
+
}
|
package/schema/site/books.json
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "converter.json",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"converterSample": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"minItems": 1,
|
|
10
|
+
"uniqueItems": true,
|
|
11
|
+
"items": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"converterId": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": [
|
|
17
|
+
"background",
|
|
18
|
+
"monster",
|
|
19
|
+
"generic",
|
|
20
|
+
"feat",
|
|
21
|
+
"item",
|
|
22
|
+
"race",
|
|
23
|
+
"spell",
|
|
24
|
+
"table"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"format": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": [
|
|
30
|
+
"txt",
|
|
31
|
+
"md",
|
|
32
|
+
"html"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"edition": {
|
|
36
|
+
"$ref": "util-edition.json#/$defs/edition"
|
|
37
|
+
},
|
|
38
|
+
"text": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": [
|
|
43
|
+
"converterId",
|
|
44
|
+
"format",
|
|
45
|
+
"edition",
|
|
46
|
+
"text"
|
|
47
|
+
],
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"additionalProperties": false
|
|
53
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "converter.json",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"converterSample": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"minItems": 1,
|
|
10
|
+
"uniqueItems": true,
|
|
11
|
+
"items": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"converterId": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": [
|
|
17
|
+
"background",
|
|
18
|
+
"monster",
|
|
19
|
+
"generic",
|
|
20
|
+
"feat",
|
|
21
|
+
"item",
|
|
22
|
+
"race",
|
|
23
|
+
"spell",
|
|
24
|
+
"table"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"format": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": [
|
|
30
|
+
"txt",
|
|
31
|
+
"md",
|
|
32
|
+
"html"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"edition": {
|
|
36
|
+
"$ref": "util-edition.json#/$defs/edition"
|
|
37
|
+
},
|
|
38
|
+
"text": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": [
|
|
43
|
+
"converterId",
|
|
44
|
+
"format",
|
|
45
|
+
"edition",
|
|
46
|
+
"text"
|
|
47
|
+
],
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"additionalProperties": false
|
|
53
|
+
}
|
package/schema/ua/books.json
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "converter.json",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"converterSample": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"minItems": 1,
|
|
10
|
+
"uniqueItems": true,
|
|
11
|
+
"items": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"converterId": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": [
|
|
17
|
+
"background",
|
|
18
|
+
"monster",
|
|
19
|
+
"generic",
|
|
20
|
+
"feat",
|
|
21
|
+
"item",
|
|
22
|
+
"race",
|
|
23
|
+
"spell",
|
|
24
|
+
"table"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"format": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": [
|
|
30
|
+
"txt",
|
|
31
|
+
"md",
|
|
32
|
+
"html"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"edition": {
|
|
36
|
+
"$ref": "util-edition.json#/$defs/edition"
|
|
37
|
+
},
|
|
38
|
+
"text": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": [
|
|
43
|
+
"converterId",
|
|
44
|
+
"format",
|
|
45
|
+
"edition",
|
|
46
|
+
"text"
|
|
47
|
+
],
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"additionalProperties": false
|
|
53
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "converter.json",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"converterSample": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"minItems": 1,
|
|
10
|
+
"uniqueItems": true,
|
|
11
|
+
"items": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"converterId": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": [
|
|
17
|
+
"background",
|
|
18
|
+
"monster",
|
|
19
|
+
"generic",
|
|
20
|
+
"feat",
|
|
21
|
+
"item",
|
|
22
|
+
"race",
|
|
23
|
+
"spell",
|
|
24
|
+
"table"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"format": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": [
|
|
30
|
+
"txt",
|
|
31
|
+
"md",
|
|
32
|
+
"html"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"edition": {
|
|
36
|
+
"$ref": "util-edition.json#/$defs/edition"
|
|
37
|
+
},
|
|
38
|
+
"text": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": [
|
|
43
|
+
"converterId",
|
|
44
|
+
"format",
|
|
45
|
+
"edition",
|
|
46
|
+
"text"
|
|
47
|
+
],
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"additionalProperties": false
|
|
53
|
+
}
|