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 CHANGED
@@ -19,20 +19,20 @@ class _ParsedJsonChecker {
19
19
 
20
20
  /* -------------------------------------------- */
21
21
 
22
- static run (filePath, {fnIsIgnoredFile, fnIsIgnoredDirector} = {}) {
22
+ static run (filePath, {fnIsIgnoredFile, fnIsIgnoredDirectory} = {}) {
23
23
  this._fileRecurse({
24
24
  filePath,
25
25
  fnIsIgnoredFile,
26
- fnIsIgnoredDirector,
26
+ fnIsIgnoredDirectory,
27
27
  });
28
28
  }
29
29
 
30
- static _fileRecurse ({filePath, fnIsIgnoredFile, fnIsIgnoredDirector}) {
30
+ static _fileRecurse ({filePath, fnIsIgnoredFile, fnIsIgnoredDirectory}) {
31
31
  if (fs.lstatSync(filePath).isDirectory()) {
32
- if (fnIsIgnoredDirector && fnIsIgnoredDirector(filePath)) return;
32
+ if (fnIsIgnoredDirectory && fnIsIgnoredDirectory(filePath)) return;
33
33
 
34
34
  return fs.readdirSync(filePath)
35
- .forEach(nxt => this._fileRecurse({filePath: `${filePath}/${nxt}`, fnIsIgnoredFile, fnIsIgnoredDirector}));
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
- fnIsIgnoredDirector,
162
+ fnIsIgnoredDirectory,
163
163
  } = {},
164
164
  ) {
165
- _ParsedJsonChecker.run(filePath, {fnIsIgnoredFile, fnIsIgnoredDirector});
165
+ _ParsedJsonChecker.run(filePath, {fnIsIgnoredFile, fnIsIgnoredDirectory});
166
166
 
167
167
  for (const ClazzDataTester of ClazzDataTesters) {
168
168
  await ClazzDataTester.pRun();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "5etools-utils",
3
- "version": "0.13.35",
3
+ "version": "0.13.37",
4
4
  "description": "Shared utilities for the 5etools ecosystem.",
5
5
  "type": "module",
6
6
  "main": "lib/Api.js",
@@ -37,7 +37,7 @@
37
37
  "supplement-alt",
38
38
  "prerelease",
39
39
  "homebrew",
40
- "organised-play",
40
+ "organized-play",
41
41
  "other"
42
42
  ],
43
43
  "markdownDescription": "The group under which this adventure should be listed in the navbar."
@@ -38,7 +38,7 @@
38
38
  "prerelease",
39
39
  "homebrew",
40
40
  "screen",
41
- "organised-play",
41
+ "organized-play",
42
42
  "recipe",
43
43
  "other"
44
44
  ],
@@ -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
+ }
@@ -37,7 +37,7 @@
37
37
  "supplement-alt",
38
38
  "prerelease",
39
39
  "homebrew",
40
- "organised-play",
40
+ "organized-play",
41
41
  "other"
42
42
  ],
43
43
  "markdownDescription": "The group under which this adventure should be listed in the navbar."
@@ -38,7 +38,7 @@
38
38
  "prerelease",
39
39
  "homebrew",
40
40
  "screen",
41
- "organised-play",
41
+ "organized-play",
42
42
  "recipe",
43
43
  "other"
44
44
  ],
@@ -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
+ }
@@ -37,7 +37,7 @@
37
37
  "supplement-alt",
38
38
  "prerelease",
39
39
  "homebrew",
40
- "organised-play",
40
+ "organized-play",
41
41
  "other"
42
42
  ],
43
43
  "markdownDescription": "The group under which this adventure should be listed in the navbar."
@@ -38,7 +38,7 @@
38
38
  "prerelease",
39
39
  "homebrew",
40
40
  "screen",
41
- "organised-play",
41
+ "organized-play",
42
42
  "recipe",
43
43
  "other"
44
44
  ],
@@ -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
+ }
@@ -37,7 +37,7 @@
37
37
  "supplement-alt",
38
38
  "prerelease",
39
39
  "homebrew",
40
- "organised-play",
40
+ "organized-play",
41
41
  "other"
42
42
  ],
43
43
  "markdownDescription": "The group under which this adventure should be listed in the navbar."
@@ -38,7 +38,7 @@
38
38
  "prerelease",
39
39
  "homebrew",
40
40
  "screen",
41
- "organised-play",
41
+ "organized-play",
42
42
  "recipe",
43
43
  "other"
44
44
  ],
@@ -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
+ }
@@ -37,7 +37,7 @@
37
37
  "supplement-alt",
38
38
  "prerelease",
39
39
  "homebrew",
40
- "organised-play",
40
+ "organized-play",
41
41
  "other"
42
42
  ],
43
43
  "markdownDescription": "The group under which this adventure should be listed in the navbar."
@@ -38,7 +38,7 @@
38
38
  "prerelease",
39
39
  "homebrew",
40
40
  "screen",
41
- "organised-play",
41
+ "organized-play",
42
42
  "recipe",
43
43
  "other"
44
44
  ],
@@ -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
+ }
@@ -37,7 +37,7 @@
37
37
  "supplement-alt",
38
38
  "prerelease",
39
39
  "homebrew",
40
- "organised-play",
40
+ "organized-play",
41
41
  "other"
42
42
  ],
43
43
  "markdownDescription": "The group under which this adventure should be listed in the navbar."
@@ -38,7 +38,7 @@
38
38
  "prerelease",
39
39
  "homebrew",
40
40
  "screen",
41
- "organised-play",
41
+ "organized-play",
42
42
  "recipe",
43
43
  "other"
44
44
  ],
@@ -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
+ }