5etools-utils 0.9.3 → 0.9.4

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/TestJson.js CHANGED
@@ -46,7 +46,7 @@ class JsonTester {
46
46
  this._dirSchemaBrew = path.join(__dirname, "..", "schema", "brew");
47
47
  this._dirSchemaUa = path.join(__dirname, "..", "schema", "ua");
48
48
 
49
- this._dirSchema = dirSchema ?? (mode === "site" ? this._dirSchemaSite : mode === "brew" ? this._dirSchemaBrew : this._dirSchemaUa);
49
+ this._dirSchema = dirSchema ?? (mode === "ua" ? this._dirSchemaUa : mode === "brew" ? this._dirSchemaBrew : this._dirSchemaSite);
50
50
 
51
51
  this._fnGetSchemaId = fnGetSchemaId;
52
52
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "5etools-utils",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "Shared utilities for the 5etools ecosystem.",
5
5
  "type": "module",
6
6
  "main": "lib/Api.js",
@@ -0,0 +1,85 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "version": "1.0.2",
4
+ "$id": "traits.json",
5
+ "type": "object",
6
+ "$defs": {
7
+ "trait": {
8
+ "type": "object",
9
+ "properties": {
10
+ "name": {
11
+ "type": "string"
12
+ },
13
+ "source": {
14
+ "type": "string"
15
+ },
16
+ "page": {
17
+ "$ref": "../util.json#/$defs/page"
18
+ },
19
+ "ref": {
20
+ "type": "string"
21
+ },
22
+ "crMin": {
23
+ "type": "string"
24
+ },
25
+ "crMax": {
26
+ "type": "string"
27
+ },
28
+ "prerequisite": {
29
+ "type": "object",
30
+ "patternProperties": {
31
+ "^.*$": {
32
+ "oneOf": [
33
+ {
34
+ "type": "object",
35
+ "properties": {
36
+ "min": {},
37
+ "max": {}
38
+ },
39
+ "additionalProperties": false
40
+ },
41
+ {
42
+ "type": "object",
43
+ "properties": {
44
+ "oneOf": {
45
+ "type": "array"
46
+ }
47
+ },
48
+ "additionalProperties": false
49
+ }
50
+ ]
51
+ }
52
+ }
53
+ },
54
+ "apply": {
55
+ "type": "object",
56
+ "properties": {
57
+ "_root": {
58
+ "$ref": "bestiary.json#/$defs/creatureData"
59
+ },
60
+ "_mod": {
61
+ "$ref": "../util.json#/$defs/_modObject"
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "additionalProperties": false,
67
+ "required": [
68
+ "name",
69
+ "source",
70
+ "apply"
71
+ ]
72
+ }
73
+ },
74
+ "properties": {
75
+ "trait": {
76
+ "type": "array",
77
+ "minItems": 1,
78
+ "uniqueItems": true,
79
+ "items": {
80
+ "$ref": "#/$defs/trait"
81
+ }
82
+ }
83
+ },
84
+ "additionalProperties": false
85
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "version": "1.0.2",
4
+ "$id": "traits.json",
5
+ "type": "object",
6
+ "$defs": {
7
+ "trait": {
8
+ "type": "object",
9
+ "properties": {
10
+ "name": {
11
+ "type": "string"
12
+ },
13
+ "source": {
14
+ "type": "string"
15
+ },
16
+ "page": {
17
+ "$ref": "../util.json#/$defs/page"
18
+ },
19
+ "ref": {
20
+ "type": "string"
21
+ },
22
+ "crMin": {
23
+ "type": "string"
24
+ },
25
+ "crMax": {
26
+ "type": "string"
27
+ },
28
+ "prerequisite": {
29
+ "type": "object",
30
+ "patternProperties": {
31
+ "^.*$": {
32
+ "oneOf": [
33
+ {
34
+ "type": "object",
35
+ "properties": {
36
+ "min": {},
37
+ "max": {}
38
+ },
39
+ "additionalProperties": false
40
+ },
41
+ {
42
+ "type": "object",
43
+ "properties": {
44
+ "oneOf": {
45
+ "type": "array"
46
+ }
47
+ },
48
+ "additionalProperties": false
49
+ }
50
+ ]
51
+ }
52
+ }
53
+ },
54
+ "apply": {
55
+ "type": "object",
56
+ "properties": {
57
+ "_root": {
58
+ "$ref": "bestiary.json#/$defs/creatureData"
59
+ },
60
+ "_mod": {
61
+ "$ref": "../util.json#/$defs/_modObject"
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "additionalProperties": false,
67
+ "required": [
68
+ "name",
69
+ "source",
70
+ "apply"
71
+ ]
72
+ }
73
+ },
74
+ "properties": {
75
+ "trait": {
76
+ "type": "array",
77
+ "minItems": 1,
78
+ "uniqueItems": true,
79
+ "items": {
80
+ "$ref": "#/$defs/trait"
81
+ }
82
+ }
83
+ },
84
+ "additionalProperties": false
85
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "version": "1.0.2",
4
+ "$id": "traits.json",
5
+ "type": "object",
6
+ "$defs": {
7
+ "trait": {
8
+ "type": "object",
9
+ "properties": {
10
+ "name": {
11
+ "type": "string"
12
+ },
13
+ "source": {
14
+ "type": "string"
15
+ },
16
+ "page": {
17
+ "$ref": "../util.json#/$defs/page"
18
+ },
19
+ "ref": {
20
+ "type": "string"
21
+ },
22
+ "crMin": {
23
+ "type": "string"
24
+ },
25
+ "crMax": {
26
+ "type": "string"
27
+ },
28
+ "prerequisite": {
29
+ "type": "object",
30
+ "patternProperties": {
31
+ "^.*$": {
32
+ "oneOf": [
33
+ {
34
+ "type": "object",
35
+ "properties": {
36
+ "min": {},
37
+ "max": {}
38
+ },
39
+ "additionalProperties": false
40
+ },
41
+ {
42
+ "type": "object",
43
+ "properties": {
44
+ "oneOf": {
45
+ "type": "array"
46
+ }
47
+ },
48
+ "additionalProperties": false
49
+ }
50
+ ]
51
+ }
52
+ }
53
+ },
54
+ "apply": {
55
+ "type": "object",
56
+ "properties": {
57
+ "_root": {
58
+ "$ref": "bestiary.json#/$defs/creatureData"
59
+ },
60
+ "_mod": {
61
+ "$ref": "../util.json#/$defs/_modObject"
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "additionalProperties": false,
67
+ "required": [
68
+ "name",
69
+ "source",
70
+ "apply"
71
+ ]
72
+ }
73
+ },
74
+ "properties": {
75
+ "trait": {
76
+ "type": "array",
77
+ "minItems": 1,
78
+ "uniqueItems": true,
79
+ "items": {
80
+ "$ref": "#/$defs/trait"
81
+ }
82
+ }
83
+ },
84
+ "additionalProperties": false
85
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "version": "1.0.2",
4
+ "$id": "traits.json",
5
+ "type": "object",
6
+ "$defs": {
7
+ "trait": {
8
+ "type": "object",
9
+ "properties": {
10
+ "name": {
11
+ "type": "string"
12
+ },
13
+ "source": {
14
+ "type": "string"
15
+ },
16
+ "page": {
17
+ "$ref": "../util.json#/$defs/page"
18
+ },
19
+ "ref": {
20
+ "type": "string"
21
+ },
22
+ "crMin": {
23
+ "type": "string"
24
+ },
25
+ "crMax": {
26
+ "type": "string"
27
+ },
28
+ "prerequisite": {
29
+ "type": "object",
30
+ "patternProperties": {
31
+ "^.*$": {
32
+ "oneOf": [
33
+ {
34
+ "type": "object",
35
+ "properties": {
36
+ "min": {},
37
+ "max": {}
38
+ },
39
+ "additionalProperties": false
40
+ },
41
+ {
42
+ "type": "object",
43
+ "properties": {
44
+ "oneOf": {
45
+ "type": "array"
46
+ }
47
+ },
48
+ "additionalProperties": false
49
+ }
50
+ ]
51
+ }
52
+ }
53
+ },
54
+ "apply": {
55
+ "type": "object",
56
+ "properties": {
57
+ "_root": {
58
+ "$ref": "bestiary.json#/$defs/creatureData"
59
+ },
60
+ "_mod": {
61
+ "$ref": "../util.json#/$defs/_modObject"
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "additionalProperties": false,
67
+ "required": [
68
+ "name",
69
+ "source",
70
+ "apply"
71
+ ]
72
+ }
73
+ },
74
+ "properties": {
75
+ "trait": {
76
+ "type": "array",
77
+ "minItems": 1,
78
+ "uniqueItems": true,
79
+ "items": {
80
+ "$ref": "#/$defs/trait"
81
+ }
82
+ }
83
+ },
84
+ "additionalProperties": false
85
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "version": "1.0.2",
4
+ "$id": "traits.json",
5
+ "type": "object",
6
+ "$defs": {
7
+ "trait": {
8
+ "type": "object",
9
+ "properties": {
10
+ "name": {
11
+ "type": "string"
12
+ },
13
+ "source": {
14
+ "type": "string"
15
+ },
16
+ "page": {
17
+ "$ref": "../util.json#/$defs/page"
18
+ },
19
+ "ref": {
20
+ "type": "string"
21
+ },
22
+ "crMin": {
23
+ "type": "string"
24
+ },
25
+ "crMax": {
26
+ "type": "string"
27
+ },
28
+ "prerequisite": {
29
+ "type": "object",
30
+ "patternProperties": {
31
+ "^.*$": {
32
+ "oneOf": [
33
+ {
34
+ "type": "object",
35
+ "properties": {
36
+ "min": {},
37
+ "max": {}
38
+ },
39
+ "additionalProperties": false
40
+ },
41
+ {
42
+ "type": "object",
43
+ "properties": {
44
+ "oneOf": {
45
+ "type": "array"
46
+ }
47
+ },
48
+ "additionalProperties": false
49
+ }
50
+ ]
51
+ }
52
+ }
53
+ },
54
+ "apply": {
55
+ "type": "object",
56
+ "properties": {
57
+ "_root": {
58
+ "$ref": "bestiary.json#/$defs/creatureData"
59
+ },
60
+ "_mod": {
61
+ "$ref": "../util.json#/$defs/_modObject"
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "additionalProperties": false,
67
+ "required": [
68
+ "name",
69
+ "source",
70
+ "apply"
71
+ ]
72
+ }
73
+ },
74
+ "properties": {
75
+ "trait": {
76
+ "type": "array",
77
+ "minItems": 1,
78
+ "uniqueItems": true,
79
+ "items": {
80
+ "$ref": "#/$defs/trait"
81
+ }
82
+ }
83
+ },
84
+ "additionalProperties": false
85
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "version": "1.0.2",
4
+ "$id": "traits.json",
5
+ "type": "object",
6
+ "$defs": {
7
+ "trait": {
8
+ "type": "object",
9
+ "properties": {
10
+ "name": {
11
+ "type": "string"
12
+ },
13
+ "source": {
14
+ "type": "string"
15
+ },
16
+ "page": {
17
+ "$ref": "../util.json#/$defs/page"
18
+ },
19
+ "ref": {
20
+ "type": "string"
21
+ },
22
+ "crMin": {
23
+ "type": "string"
24
+ },
25
+ "crMax": {
26
+ "type": "string"
27
+ },
28
+ "prerequisite": {
29
+ "type": "object",
30
+ "patternProperties": {
31
+ "^.*$": {
32
+ "oneOf": [
33
+ {
34
+ "type": "object",
35
+ "properties": {
36
+ "min": {},
37
+ "max": {}
38
+ },
39
+ "additionalProperties": false
40
+ },
41
+ {
42
+ "type": "object",
43
+ "properties": {
44
+ "oneOf": {
45
+ "type": "array"
46
+ }
47
+ },
48
+ "additionalProperties": false
49
+ }
50
+ ]
51
+ }
52
+ }
53
+ },
54
+ "apply": {
55
+ "type": "object",
56
+ "properties": {
57
+ "_root": {
58
+ "$ref": "bestiary.json#/$defs/creatureData"
59
+ },
60
+ "_mod": {
61
+ "$ref": "../util.json#/$defs/_modObject"
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "additionalProperties": false,
67
+ "required": [
68
+ "name",
69
+ "source",
70
+ "apply"
71
+ ]
72
+ }
73
+ },
74
+ "properties": {
75
+ "trait": {
76
+ "type": "array",
77
+ "minItems": 1,
78
+ "uniqueItems": true,
79
+ "items": {
80
+ "$ref": "#/$defs/trait"
81
+ }
82
+ }
83
+ },
84
+ "additionalProperties": false
85
+ }