5etools-utils 0.17.12 → 0.17.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "5etools-utils",
3
- "version": "0.17.12",
3
+ "version": "0.17.14",
4
4
  "description": "Shared utilities for the 5etools ecosystem.",
5
5
  "type": "module",
6
6
  "main": "lib/Api.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "2.12.14",
3
+ "version": "2.13.0",
4
4
  "$id": "class.json",
5
5
  "type": "object",
6
6
  "$defs": {
@@ -1695,43 +1695,7 @@
1695
1695
  "$ref": "../util.json#/$defs/page"
1696
1696
  },
1697
1697
  "fluff": {
1698
- "oneOf": [
1699
- {
1700
- "$ref": "../util.json#/$defs/fluffObject"
1701
- },
1702
- {
1703
- "deprecated": true,
1704
- "type": "array",
1705
- "items": {
1706
- "type": "object",
1707
- "properties": {
1708
- "name": {
1709
- "type": "string"
1710
- },
1711
- "entries": {
1712
- "type": "array",
1713
- "items": {
1714
- "$ref": "../entry.json"
1715
- }
1716
- },
1717
- "page": {
1718
- "$ref": "../util.json#/$defs/page"
1719
- },
1720
- "source": {
1721
- "$ref": "../util.json#/$defs/source"
1722
- },
1723
- "type": {
1724
- "type": "string"
1725
- }
1726
- },
1727
- "required": [
1728
- "entries",
1729
- "source"
1730
- ],
1731
- "additionalProperties": false
1732
- }
1733
- }
1734
- ]
1698
+ "$ref": "../util.json#/$defs/fluffObject"
1735
1699
  },
1736
1700
  "additionalSpells": {
1737
1701
  "$ref": "../util-additionalspells.json#/$defs/additionalSpellsArray"
@@ -2003,43 +1967,7 @@
2003
1967
  "$ref": "../util.json#/$defs/page"
2004
1968
  },
2005
1969
  "fluff": {
2006
- "oneOf": [
2007
- {
2008
- "$ref": "../util.json#/$defs/fluffObject"
2009
- },
2010
- {
2011
- "deprecated": true,
2012
- "type": "array",
2013
- "items": {
2014
- "type": "object",
2015
- "properties": {
2016
- "name": {
2017
- "type": "string"
2018
- },
2019
- "entries": {
2020
- "type": "array",
2021
- "items": {
2022
- "$ref": "../entry.json"
2023
- }
2024
- },
2025
- "page": {
2026
- "$ref": "../util.json#/$defs/page"
2027
- },
2028
- "source": {
2029
- "$ref": "../util.json#/$defs/source"
2030
- },
2031
- "type": {
2032
- "type": "string"
2033
- }
2034
- },
2035
- "required": [
2036
- "entries",
2037
- "source"
2038
- ],
2039
- "additionalProperties": false
2040
- }
2041
- }
2042
- ]
1970
+ "$ref": "../util.json#/$defs/fluffObject"
2043
1971
  },
2044
1972
  "additionalSpells": {
2045
1973
  "$ref": "../util-additionalspells.json#/$defs/additionalSpellsArray"
@@ -2314,43 +2242,7 @@
2314
2242
  "$ref": "../util.json#/$defs/page"
2315
2243
  },
2316
2244
  "fluff": {
2317
- "oneOf": [
2318
- {
2319
- "$ref": "../util.json#/$defs/fluffObject"
2320
- },
2321
- {
2322
- "deprecated": true,
2323
- "type": "array",
2324
- "items": {
2325
- "type": "object",
2326
- "properties": {
2327
- "name": {
2328
- "type": "string"
2329
- },
2330
- "entries": {
2331
- "type": "array",
2332
- "items": {
2333
- "$ref": "../entry.json"
2334
- }
2335
- },
2336
- "page": {
2337
- "$ref": "../util.json#/$defs/page"
2338
- },
2339
- "source": {
2340
- "$ref": "../util.json#/$defs/source"
2341
- },
2342
- "type": {
2343
- "type": "string"
2344
- }
2345
- },
2346
- "required": [
2347
- "entries",
2348
- "source"
2349
- ],
2350
- "additionalProperties": false
2351
- }
2352
- }
2353
- ]
2245
+ "$ref": "../util.json#/$defs/fluffObject"
2354
2246
  },
2355
2247
  "additionalSpells": {
2356
2248
  "$ref": "../util-additionalspells.json#/$defs/additionalSpellsArray"
@@ -271,22 +271,7 @@
271
271
  "markdownDescription": "A file hash used to automatically update the value of "dateLastModified". Should not be manually created/edited."
272
272
  },
273
273
  "dependencies": {
274
- "description": "A map of `\"<data property>\": [\"<JsonSource1>\", ..., \"<JsonSourceN>\"]`. Entities from these sources can then be extended/referenced in this file.\n\nNote: when copying classes/subclasses/class features/subclass features, the array should consist of \"<classIdentifier1>\", ..., \"<classIdentifierN>\" items, where \"classIdentifierN\" matches the keys in \"5etools/data/class/index.json\" (when copying class/etc. homebrew, normal \"source\"-based linking applies).",
275
- "type": "object",
276
- "patternProperties": {
277
- "^[a-zA-Z]+$": {
278
- "type": "array",
279
- "items": {
280
- "type": "string"
281
- },
282
- "minItems": 1,
283
- "uniqueItems": true
284
- }
285
- },
286
- "propertyNames": {
287
- "$ref": "util-copy.json#/$defs/copyableProps"
288
- },
289
- "markdownDescription": "A map of &quot;&lt;data property&gt;&quot;: [&quot;&lt;JsonSource1&gt;&quot;, ..., &quot;&lt;JsonSourceN&gt;&quot;]. Entities from these sources can then be extended/referenced in this file.\n\nNote: when copying classes/subclasses/class features/subclass features, the array should consist of &quot;&lt;classIdentifier1&gt;&quot;, ..., &quot;&lt;classIdentifierN&gt;&quot; items, where &quot;classIdentifierN&quot; matches the keys in &quot;5etools/data/class/index.json&quot; (when copying class/etc. homebrew, normal &quot;source&quot;-based linking applies)."
274
+ "$ref": "util-meta.json#/$defs/dependencies"
290
275
  },
291
276
  "includes": {
292
277
  "description": "Structure as per \"dependencies\". Additional sources to be included when loading the file.",
@@ -307,14 +292,7 @@
307
292
  "markdownDescription": "Structure as per &quot;dependencies&quot;. Additional sources to be included when loading the file."
308
293
  },
309
294
  "internalCopies": {
310
- "description": "An array of keys that are copied from within the current document. e.g. \"item\", \"monsterFluff\", \"background\" etc.",
311
- "type": "array",
312
- "items": {
313
- "$ref": "util-copy.json#/$defs/copyableProps"
314
- },
315
- "minItems": 1,
316
- "uniqueItems": true,
317
- "markdownDescription": "An array of keys that are copied from within the current document. e.g. &quot;item&quot;, &quot;monsterFluff&quot;, &quot;background&quot; etc."
295
+ "$ref": "util-meta.json#/$defs/internalCopies"
318
296
  },
319
297
  "fonts": {
320
298
  "description": "A map of \"font family\" to font URL.",
@@ -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.1.2",
5
+ "version": "1.1.3",
6
6
  "$defs": {
7
7
  "_mod_renameArr_rename": {
8
8
  "type": "object",
@@ -1157,6 +1157,7 @@
1157
1157
  "enum": [
1158
1158
  "monster",
1159
1159
  "monsterFluff",
1160
+ "monsterTemplate",
1160
1161
  "legendaryGroup",
1161
1162
  "class",
1162
1163
  "classFluff",
@@ -1198,6 +1199,7 @@
1198
1199
  "optionalfeatureFluff",
1199
1200
  "psionic",
1200
1201
  "race",
1202
+ "raceFeature",
1201
1203
  "subrace",
1202
1204
  "raceFluff",
1203
1205
  "reward",
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "util-meta.json",
4
+ "version": "1.0.0",
5
+ "title": "Util: Meta",
6
+ "$defs": {
7
+ "dependencies": {
8
+ "description": "A map of `\"<data property>\": [\"<JsonSource1>\", ..., \"<JsonSourceN>\"]`. Entities from these sources can then be extended/referenced in this file.\n\nNote: when copying classes/subclasses/class features/subclass features, the array should consist of \"<classIdentifier1>\", ..., \"<classIdentifierN>\" items, where \"classIdentifierN\" matches the keys in \"5etools/data/class/index.json\" (when copying class/etc. homebrew, normal \"source\"-based linking applies).",
9
+ "type": "object",
10
+ "patternProperties": {
11
+ "^[a-zA-Z]+$": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "string"
15
+ },
16
+ "minItems": 1,
17
+ "uniqueItems": true
18
+ }
19
+ },
20
+ "propertyNames": {
21
+ "$ref": "util-copy.json#/$defs/copyableProps"
22
+ },
23
+ "markdownDescription": "A map of &quot;&lt;data property&gt;&quot;: [&quot;&lt;JsonSource1&gt;&quot;, ..., &quot;&lt;JsonSourceN&gt;&quot;]. Entities from these sources can then be extended/referenced in this file.\n\nNote: when copying classes/subclasses/class features/subclass features, the array should consist of &quot;&lt;classIdentifier1&gt;&quot;, ..., &quot;&lt;classIdentifierN&gt;&quot; items, where &quot;classIdentifierN&quot; matches the keys in &quot;5etools/data/class/index.json&quot; (when copying class/etc. homebrew, normal &quot;source&quot;-based linking applies)."
24
+ },
25
+ "internalCopies": {
26
+ "description": "An array of keys that are copied from within the current document. e.g. \"item\", \"monsterFluff\", \"background\" etc.",
27
+ "type": "array",
28
+ "items": {
29
+ "$ref": "util-copy.json#/$defs/copyableProps"
30
+ },
31
+ "minItems": 1,
32
+ "uniqueItems": true,
33
+ "markdownDescription": "An array of keys that are copied from within the current document. e.g. &quot;item&quot;, &quot;monsterFluff&quot;, &quot;background&quot; etc."
34
+ }
35
+ }
36
+ }
@@ -3,7 +3,7 @@
3
3
  "$id": "util.json",
4
4
  "title": "Util",
5
5
  "description": "Utility definitions to be used in other schemas.",
6
- "version": "1.19.5",
6
+ "version": "1.19.6",
7
7
  "$defs": {
8
8
  "metaDependenciesArray": {
9
9
  "type": "array",
@@ -17,12 +17,10 @@
17
17
  "type": "object",
18
18
  "properties": {
19
19
  "dependencies": {
20
- "type": "object",
21
- "patternProperties": {
22
- "^[a-zA-Z]+$": {
23
- "$ref": "#/$defs/metaDependenciesArray"
24
- }
25
- }
20
+ "$ref": "util-meta.json#/$defs/dependencies"
21
+ },
22
+ "internalCopies": {
23
+ "$ref": "util-meta.json#/$defs/internalCopies"
26
24
  },
27
25
  "otherSources": {
28
26
  "type": "object",
@@ -34,7 +32,9 @@
34
32
  }
35
33
  }
36
34
  }
37
- }
35
+ },
36
+ "additionalProperties": false,
37
+ "minProperties": 1
38
38
  },
39
39
  "url": {
40
40
  "type": "string",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "2.12.14",
3
+ "version": "2.13.0",
4
4
  "$id": "class.json",
5
5
  "type": "object",
6
6
  "$defs": {
@@ -1695,43 +1695,7 @@
1695
1695
  "$ref": "../util.json#/$defs/page"
1696
1696
  },
1697
1697
  "fluff": {
1698
- "oneOf": [
1699
- {
1700
- "$ref": "../util.json#/$defs/fluffObject"
1701
- },
1702
- {
1703
- "deprecated": true,
1704
- "type": "array",
1705
- "items": {
1706
- "type": "object",
1707
- "properties": {
1708
- "name": {
1709
- "type": "string"
1710
- },
1711
- "entries": {
1712
- "type": "array",
1713
- "items": {
1714
- "$ref": "../entry.json"
1715
- }
1716
- },
1717
- "page": {
1718
- "$ref": "../util.json#/$defs/page"
1719
- },
1720
- "source": {
1721
- "$ref": "../util.json#/$defs/source"
1722
- },
1723
- "type": {
1724
- "type": "string"
1725
- }
1726
- },
1727
- "required": [
1728
- "entries",
1729
- "source"
1730
- ],
1731
- "additionalProperties": false
1732
- }
1733
- }
1734
- ]
1698
+ "$ref": "../util.json#/$defs/fluffObject"
1735
1699
  },
1736
1700
  "additionalSpells": {
1737
1701
  "$ref": "../util-additionalspells.json#/$defs/additionalSpellsArray"
@@ -2003,43 +1967,7 @@
2003
1967
  "$ref": "../util.json#/$defs/page"
2004
1968
  },
2005
1969
  "fluff": {
2006
- "oneOf": [
2007
- {
2008
- "$ref": "../util.json#/$defs/fluffObject"
2009
- },
2010
- {
2011
- "deprecated": true,
2012
- "type": "array",
2013
- "items": {
2014
- "type": "object",
2015
- "properties": {
2016
- "name": {
2017
- "type": "string"
2018
- },
2019
- "entries": {
2020
- "type": "array",
2021
- "items": {
2022
- "$ref": "../entry.json"
2023
- }
2024
- },
2025
- "page": {
2026
- "$ref": "../util.json#/$defs/page"
2027
- },
2028
- "source": {
2029
- "$ref": "../util.json#/$defs/source"
2030
- },
2031
- "type": {
2032
- "type": "string"
2033
- }
2034
- },
2035
- "required": [
2036
- "entries",
2037
- "source"
2038
- ],
2039
- "additionalProperties": false
2040
- }
2041
- }
2042
- ]
1970
+ "$ref": "../util.json#/$defs/fluffObject"
2043
1971
  },
2044
1972
  "additionalSpells": {
2045
1973
  "$ref": "../util-additionalspells.json#/$defs/additionalSpellsArray"
@@ -2314,43 +2242,7 @@
2314
2242
  "$ref": "../util.json#/$defs/page"
2315
2243
  },
2316
2244
  "fluff": {
2317
- "oneOf": [
2318
- {
2319
- "$ref": "../util.json#/$defs/fluffObject"
2320
- },
2321
- {
2322
- "deprecated": true,
2323
- "type": "array",
2324
- "items": {
2325
- "type": "object",
2326
- "properties": {
2327
- "name": {
2328
- "type": "string"
2329
- },
2330
- "entries": {
2331
- "type": "array",
2332
- "items": {
2333
- "$ref": "../entry.json"
2334
- }
2335
- },
2336
- "page": {
2337
- "$ref": "../util.json#/$defs/page"
2338
- },
2339
- "source": {
2340
- "$ref": "../util.json#/$defs/source"
2341
- },
2342
- "type": {
2343
- "type": "string"
2344
- }
2345
- },
2346
- "required": [
2347
- "entries",
2348
- "source"
2349
- ],
2350
- "additionalProperties": false
2351
- }
2352
- }
2353
- ]
2245
+ "$ref": "../util.json#/$defs/fluffObject"
2354
2246
  },
2355
2247
  "additionalSpells": {
2356
2248
  "$ref": "../util-additionalspells.json#/$defs/additionalSpellsArray"
@@ -271,22 +271,7 @@
271
271
  "markdownDescription": "A file hash used to automatically update the value of &quot;dateLastModified&quot;. Should not be manually created/edited."
272
272
  },
273
273
  "dependencies": {
274
- "description": "A map of `\"<data property>\": [\"<JsonSource1>\", ..., \"<JsonSourceN>\"]`. Entities from these sources can then be extended/referenced in this file.\n\nNote: when copying classes/subclasses/class features/subclass features, the array should consist of \"<classIdentifier1>\", ..., \"<classIdentifierN>\" items, where \"classIdentifierN\" matches the keys in \"5etools/data/class/index.json\" (when copying class/etc. homebrew, normal \"source\"-based linking applies).",
275
- "type": "object",
276
- "patternProperties": {
277
- "^[a-zA-Z]+$": {
278
- "type": "array",
279
- "items": {
280
- "type": "string"
281
- },
282
- "minItems": 1,
283
- "uniqueItems": true
284
- }
285
- },
286
- "propertyNames": {
287
- "$ref": "util-copy.json#/$defs/copyableProps"
288
- },
289
- "markdownDescription": "A map of &quot;&lt;data property&gt;&quot;: [&quot;&lt;JsonSource1&gt;&quot;, ..., &quot;&lt;JsonSourceN&gt;&quot;]. Entities from these sources can then be extended/referenced in this file.\n\nNote: when copying classes/subclasses/class features/subclass features, the array should consist of &quot;&lt;classIdentifier1&gt;&quot;, ..., &quot;&lt;classIdentifierN&gt;&quot; items, where &quot;classIdentifierN&quot; matches the keys in &quot;5etools/data/class/index.json&quot; (when copying class/etc. homebrew, normal &quot;source&quot;-based linking applies)."
274
+ "$ref": "util-meta.json#/$defs/dependencies"
290
275
  },
291
276
  "includes": {
292
277
  "description": "Structure as per \"dependencies\". Additional sources to be included when loading the file.",
@@ -307,14 +292,7 @@
307
292
  "markdownDescription": "Structure as per &quot;dependencies&quot;. Additional sources to be included when loading the file."
308
293
  },
309
294
  "internalCopies": {
310
- "description": "An array of keys that are copied from within the current document. e.g. \"item\", \"monsterFluff\", \"background\" etc.",
311
- "type": "array",
312
- "items": {
313
- "$ref": "util-copy.json#/$defs/copyableProps"
314
- },
315
- "minItems": 1,
316
- "uniqueItems": true,
317
- "markdownDescription": "An array of keys that are copied from within the current document. e.g. &quot;item&quot;, &quot;monsterFluff&quot;, &quot;background&quot; etc."
295
+ "$ref": "util-meta.json#/$defs/internalCopies"
318
296
  },
319
297
  "fonts": {
320
298
  "description": "A map of \"font family\" to font URL.",
@@ -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.1.2",
5
+ "version": "1.1.3",
6
6
  "$defs": {
7
7
  "_mod_renameArr_rename": {
8
8
  "type": "object",
@@ -1157,6 +1157,7 @@
1157
1157
  "enum": [
1158
1158
  "monster",
1159
1159
  "monsterFluff",
1160
+ "monsterTemplate",
1160
1161
  "legendaryGroup",
1161
1162
  "class",
1162
1163
  "classFluff",
@@ -1198,6 +1199,7 @@
1198
1199
  "optionalfeatureFluff",
1199
1200
  "psionic",
1200
1201
  "race",
1202
+ "raceFeature",
1201
1203
  "subrace",
1202
1204
  "raceFluff",
1203
1205
  "reward",
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "util-meta.json",
4
+ "version": "1.0.0",
5
+ "title": "Util: Meta",
6
+ "$defs": {
7
+ "dependencies": {
8
+ "description": "A map of `\"<data property>\": [\"<JsonSource1>\", ..., \"<JsonSourceN>\"]`. Entities from these sources can then be extended/referenced in this file.\n\nNote: when copying classes/subclasses/class features/subclass features, the array should consist of \"<classIdentifier1>\", ..., \"<classIdentifierN>\" items, where \"classIdentifierN\" matches the keys in \"5etools/data/class/index.json\" (when copying class/etc. homebrew, normal \"source\"-based linking applies).",
9
+ "type": "object",
10
+ "patternProperties": {
11
+ "^[a-zA-Z]+$": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "string"
15
+ },
16
+ "minItems": 1,
17
+ "uniqueItems": true
18
+ }
19
+ },
20
+ "propertyNames": {
21
+ "$ref": "util-copy.json#/$defs/copyableProps"
22
+ },
23
+ "markdownDescription": "A map of &quot;&lt;data property&gt;&quot;: [&quot;&lt;JsonSource1&gt;&quot;, ..., &quot;&lt;JsonSourceN&gt;&quot;]. Entities from these sources can then be extended/referenced in this file.\n\nNote: when copying classes/subclasses/class features/subclass features, the array should consist of &quot;&lt;classIdentifier1&gt;&quot;, ..., &quot;&lt;classIdentifierN&gt;&quot; items, where &quot;classIdentifierN&quot; matches the keys in &quot;5etools/data/class/index.json&quot; (when copying class/etc. homebrew, normal &quot;source&quot;-based linking applies)."
24
+ },
25
+ "internalCopies": {
26
+ "description": "An array of keys that are copied from within the current document. e.g. \"item\", \"monsterFluff\", \"background\" etc.",
27
+ "type": "array",
28
+ "items": {
29
+ "$ref": "util-copy.json#/$defs/copyableProps"
30
+ },
31
+ "minItems": 1,
32
+ "uniqueItems": true,
33
+ "markdownDescription": "An array of keys that are copied from within the current document. e.g. &quot;item&quot;, &quot;monsterFluff&quot;, &quot;background&quot; etc."
34
+ }
35
+ }
36
+ }
@@ -3,7 +3,7 @@
3
3
  "$id": "util.json",
4
4
  "title": "Util",
5
5
  "description": "Utility definitions to be used in other schemas.",
6
- "version": "1.19.5",
6
+ "version": "1.19.6",
7
7
  "$defs": {
8
8
  "metaDependenciesArray": {
9
9
  "type": "array",
@@ -17,12 +17,10 @@
17
17
  "type": "object",
18
18
  "properties": {
19
19
  "dependencies": {
20
- "type": "object",
21
- "patternProperties": {
22
- "^[a-zA-Z]+$": {
23
- "$ref": "#/$defs/metaDependenciesArray"
24
- }
25
- }
20
+ "$ref": "util-meta.json#/$defs/dependencies"
21
+ },
22
+ "internalCopies": {
23
+ "$ref": "util-meta.json#/$defs/internalCopies"
26
24
  },
27
25
  "otherSources": {
28
26
  "type": "object",
@@ -34,7 +32,9 @@
34
32
  }
35
33
  }
36
34
  }
37
- }
35
+ },
36
+ "additionalProperties": false,
37
+ "minProperties": 1
38
38
  },
39
39
  "url": {
40
40
  "type": "string",