5etools-utils 0.4.3 → 0.4.5

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/Api.js CHANGED
@@ -5,7 +5,6 @@ import {BrewIndexGenerator} from "./BrewIndexGenerator.js";
5
5
  import {BrewCleaner} from "./BrewCleaner.js";
6
6
  import {BrewTimestamper} from "./BrewTimestamper.js";
7
7
  import {BrewTester} from "./BrewTester.js";
8
- import {SITE_SOURCES} from "./UtilSources.js";
9
8
  import {getCleanJson} from "./UtilClean.js";
10
9
 
11
10
  export {
@@ -16,6 +15,5 @@ export {
16
15
  BrewCleaner,
17
16
  BrewTimestamper,
18
17
  BrewTester,
19
- SITE_SOURCES,
20
18
  getCleanJson,
21
19
  };
@@ -5,11 +5,9 @@ import * as fs from "fs";
5
5
  import * as Uf from "./UtilFs.js";
6
6
  import Um from "./UtilMisc.js";
7
7
  import {getCleanJson} from "./UtilClean.js";
8
- import {SITE_SOURCES} from "./UtilSources.js";
9
8
 
10
9
  class BrewCleaner {
11
10
  static _IS_FAIL_SLOW = !!process.env.FAIL_SLOW;
12
- static _SITE_SOURCES = new Set(SITE_SOURCES);
13
11
 
14
12
  static _RUN_TIMESTAMP = Math.floor(Date.now() / 1000);
15
13
  static _MAX_TIMESTAMP = 9999999999;
@@ -77,7 +75,6 @@ class BrewCleaner {
77
75
  docSourcesJson.forEach(src => this._ALL_SOURCES_JSON_LOWER.add(src.toLowerCase()));
78
76
 
79
77
  const validSources = new Set(docSourcesJson);
80
- validSources.add("UAClassFeatureVariants"); // Allow CFV UA sources
81
78
 
82
79
  Object.keys(contents)
83
80
  .filter(k => !this._CONTENT_KEY_BLOCKLIST.has(k))
@@ -91,7 +88,7 @@ class BrewCleaner {
91
88
  data.forEach(it => {
92
89
  const source = it.source || (it.inherits ? it.inherits.source : null);
93
90
  if (!source) return ALL_ERRORS.push(`${file} :: ${k} :: "${it.name || it.id}" had no source!`);
94
- if (!validSources.has(source) && !this._SITE_SOURCES.has(source)) return ALL_ERRORS.push(`${file} :: ${k} :: "${it.name || it.id}" source "${source}" was not in _meta`);
91
+ if (!validSources.has(source)) return ALL_ERRORS.push(`${file} :: ${k} :: "${it.name || it.id}" source "${source}" was not in _meta`);
95
92
  });
96
93
  });
97
94
  // endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "5etools-utils",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "Shared utilities for the 5etools ecosystem.",
5
5
  "type": "module",
6
6
  "main": "lib/Api.js",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "items-base.json",
4
- "version": "1.5.2",
4
+ "version": "1.5.3",
5
5
  "$defs": {
6
6
  "itemPropertyLookupArray": {
7
7
  "type": "array",
@@ -241,6 +241,9 @@
241
241
  "immune": {
242
242
  "$ref": "util.json#/$defs/damageImmunityArray"
243
243
  },
244
+ "conditionImmune": {
245
+ "$ref": "util.json#/$defs/conditionImmunityArray"
246
+ },
244
247
  "stealth": {
245
248
  "type": "boolean"
246
249
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "items-base.json",
4
- "version": "1.5.2",
4
+ "version": "1.5.3",
5
5
  "$defs": {
6
6
  "itemPropertyLookupArray": {
7
7
  "type": "array",
@@ -241,6 +241,9 @@
241
241
  "immune": {
242
242
  "$ref": "util.json#/$defs/damageImmunityArray"
243
243
  },
244
+ "conditionImmune": {
245
+ "$ref": "util.json#/$defs/conditionImmunityArray"
246
+ },
244
247
  "stealth": {
245
248
  "type": "boolean"
246
249
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "items-base.json",
4
- "version": "1.5.2",
4
+ "version": "1.5.3",
5
5
  "$defs": {
6
6
  "itemPropertyLookupArray": {
7
7
  "type": "array",
@@ -246,6 +246,9 @@
246
246
  "immune": {
247
247
  "$ref": "util.json#/$defs/damageImmunityArray"
248
248
  },
249
+ "conditionImmune": {
250
+ "$ref": "util.json#/$defs/conditionImmunityArray"
251
+ },
249
252
  "stealth": {
250
253
  "type": "boolean"
251
254
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "items-base.json",
4
- "version": "1.5.2",
4
+ "version": "1.5.3",
5
5
  "$defs": {
6
6
  "itemPropertyLookupArray": {
7
7
  "type": "array",
@@ -246,6 +246,9 @@
246
246
  "immune": {
247
247
  "$ref": "util.json#/$defs/damageImmunityArray"
248
248
  },
249
+ "conditionImmune": {
250
+ "$ref": "util.json#/$defs/conditionImmunityArray"
251
+ },
249
252
  "stealth": {
250
253
  "type": "boolean"
251
254
  },
@@ -1,200 +0,0 @@
1
- // Dumped from `Object.keys(Parser.SOURCE_JSON_TO_FULL)`
2
- // TODO(Future) sensibly factor this out
3
- const SITE_SOURCES = [
4
- "CoS",
5
- "DMG",
6
- "EEPC",
7
- "EET",
8
- "HotDQ",
9
- "LMoP",
10
- "MM",
11
- "OotA",
12
- "PHB",
13
- "PotA",
14
- "RoT",
15
- "RoTOS",
16
- "SCAG",
17
- "SKT",
18
- "ToA",
19
- "TLK",
20
- "ToD",
21
- "TTP",
22
- "TftYP",
23
- "TftYP-AtG",
24
- "TftYP-DiT",
25
- "TftYP-TFoF",
26
- "TftYP-THSoT",
27
- "TftYP-TSC",
28
- "TftYP-ToH",
29
- "TftYP-WPM",
30
- "VGM",
31
- "XGE",
32
- "OGA",
33
- "MTF",
34
- "WDH",
35
- "WDMM",
36
- "GGR",
37
- "KKW",
38
- "LLK",
39
- "AZfyT",
40
- "GoS",
41
- "AI",
42
- "OoW",
43
- "ESK",
44
- "DIP",
45
- "HftT",
46
- "DC",
47
- "SLW",
48
- "SDW",
49
- "BGDIA",
50
- "LR",
51
- "AL",
52
- "SAC",
53
- "ERLW",
54
- "EFR",
55
- "RMBRE",
56
- "RMR",
57
- "MFF",
58
- "AWM",
59
- "IMR",
60
- "SADS",
61
- "EGW",
62
- "ToR",
63
- "DD",
64
- "FS",
65
- "US",
66
- "MOT",
67
- "IDRotF",
68
- "TCE",
69
- "VRGR",
70
- "HoL",
71
- "RtG",
72
- "AitFR",
73
- "AitFR-ISF",
74
- "AitFR-THP",
75
- "AitFR-AVT",
76
- "AitFR-DN",
77
- "AitFR-FCD",
78
- "WBtW",
79
- "DoD",
80
- "MaBJoV",
81
- "FTD",
82
- "SCC",
83
- "SCC-CK",
84
- "SCC-HfMT",
85
- "SCC-TMM",
86
- "SCC-ARiR",
87
- "MPMM",
88
- "CRCotN",
89
- "JttRC",
90
- "SAiS",
91
- "AAG",
92
- "BAM",
93
- "LoX",
94
- "DoSI",
95
- "DSotDQ",
96
- "Screen",
97
- "ScreenWildernessKit",
98
- "ScreenDungeonKit",
99
- "HF",
100
- "CM",
101
- "NRH",
102
- "NRH-TCMC",
103
- "NRH-AVitW",
104
- "NRH-ASS",
105
- "NRH-CoI",
106
- "NRH-TLT",
107
- "NRH-AWoL",
108
- "NRH-AT",
109
- "MGELFT",
110
- "VD",
111
- "SjA",
112
- "ALCurseOfStrahd",
113
- "ALElementalEvil",
114
- "ALRageOfDemons",
115
- "PSA",
116
- "PSI",
117
- "PSK",
118
- "PSZ",
119
- "PSX",
120
- "PSD",
121
- "XMtS",
122
- "UAArtificer",
123
- "UAEladrinAndGith",
124
- "UAEberron",
125
- "UAFeatsForRaces",
126
- "UAFeatsForSkills",
127
- "UAFiendishOptions",
128
- "UAFeats",
129
- "UAGothicHeroes",
130
- "UAModernMagic",
131
- "UAStarterSpells",
132
- "UATheMysticClass",
133
- "UAThatOldBlackMagic",
134
- "UATheRangerRevised",
135
- "UAWaterborneAdventures",
136
- "UAVariantRules",
137
- "UALightDarkUnderdark",
138
- "UARangerAndRogue",
139
- "UAATrioOfSubclasses",
140
- "UABarbarianPrimalPaths",
141
- "UARevisedSubclasses",
142
- "UAKitsOfOld",
143
- "UABardBardColleges",
144
- "UAClericDivineDomains",
145
- "UADruid",
146
- "UARevisedClassOptions",
147
- "UAFighter",
148
- "UAMonk",
149
- "UAPaladin",
150
- "UAModifyingClasses",
151
- "UASorcerer",
152
- "UAWarlockAndWizard",
153
- "UATheFaithful",
154
- "UAWizardRevisited",
155
- "UAElfSubraces",
156
- "UAMassCombat",
157
- "UAThreePillarExperience",
158
- "UAGreyhawkInitiative",
159
- "UAThreeSubclasses",
160
- "UAOrderDomain",
161
- "UACentaursMinotaurs",
162
- "UAGiantSoulSorcerer",
163
- "UARacesOfEberron",
164
- "UARacesOfRavnica",
165
- "UAWGE",
166
- "UAOfShipsAndSea",
167
- "UASidekicks",
168
- "UAArtificerRevisited",
169
- "UABarbarianAndMonk",
170
- "UASorcererAndWarlock",
171
- "UABardAndPaladin",
172
- "UAClericDruidWizard",
173
- "UAFighterRangerRogue",
174
- "UAClassFeatureVariants",
175
- "UAFighterRogueWizard",
176
- "UAPrestigeClassesRunMagic",
177
- "UARanger",
178
- "UA2020SubclassesPt1",
179
- "UA2020SubclassesPt2",
180
- "UA2020SubclassesPt3",
181
- "UA2020SubclassesPt4",
182
- "UA2020SubclassesPt5",
183
- "UA2020SpellsAndMagicTattoos",
184
- "UA2020PsionicOptionsRevisited",
185
- "UA2020SubclassesRevisited",
186
- "UA2020Feats",
187
- "UA2021GothicLineages",
188
- "UA2021FolkOfTheFeywild",
189
- "UA2021DraconicOptions",
190
- "UA2021MagesOfStrixhaven",
191
- "UA2021TravelersOfTheMultiverse",
192
- "UA2022HeroesOfKrynn",
193
- "UA2022HeroesOfKrynnRevisited",
194
- "UA2022GiantOptions",
195
- "UA2022WondersOfTheMultiverse",
196
- "MCV1SC",
197
- "MCV2DC",
198
- ];
199
-
200
- export {SITE_SOURCES};