5etools-utils 0.11.2 → 0.12.0
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/BrewTester.js +16 -6
- package/package.json +1 -1
- package/schema/brew/spells/spells.json +10 -1
- package/schema/brew-fast/spells/spells.json +10 -1
- package/schema/site/spells/spells.json +10 -1
- package/schema/site-fast/spells/spells.json +10 -1
- package/schema/ua/spells/spells.json +10 -1
- package/schema/ua-fast/spells/spells.json +10 -1
- package/bin/test-file-extensions.js +0 -5
package/lib/BrewTester.js
CHANGED
|
@@ -77,23 +77,33 @@ class _BrewTesterFileLocations {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
class
|
|
81
|
-
static _LOG_TAG = `
|
|
80
|
+
class _BrewTesterFileNames {
|
|
81
|
+
static _LOG_TAG = `FILE_NAME`;
|
|
82
|
+
|
|
83
|
+
static _RE_NAME_FORMAT = /^[^;]+; .+\.json$/;
|
|
82
84
|
|
|
83
85
|
static run () {
|
|
84
|
-
Um.info(this._LOG_TAG, `Testing for incorrect file
|
|
86
|
+
Um.info(this._LOG_TAG, `Testing for incorrect file names...`);
|
|
85
87
|
|
|
86
88
|
const errors = [];
|
|
87
89
|
|
|
88
90
|
Uf.runOnDirs((dir) => {
|
|
91
|
+
const filenames = fs.readdirSync(dir);
|
|
92
|
+
|
|
89
93
|
errors.push(
|
|
90
|
-
...
|
|
94
|
+
...filenames
|
|
91
95
|
.filter(it => !it.endsWith(".json"))
|
|
92
96
|
.map(it => `File did not have ".json" extension: ${it}`),
|
|
93
97
|
);
|
|
98
|
+
|
|
99
|
+
errors.push(
|
|
100
|
+
...filenames
|
|
101
|
+
.filter(it => !this._RE_NAME_FORMAT.test(it))
|
|
102
|
+
.map(it => `Filename did not match expected pattern "${this._RE_NAME_FORMAT.toString()}" extension: ${it}`),
|
|
103
|
+
);
|
|
94
104
|
});
|
|
95
105
|
|
|
96
|
-
if (!errors.length) return Um.info(this._LOG_TAG, `Files had expected
|
|
106
|
+
if (!errors.length) return Um.info(this._LOG_TAG, `Files had expected names.`);
|
|
97
107
|
|
|
98
108
|
errors.forEach(it => console.error(it));
|
|
99
109
|
process.exit(1);
|
|
@@ -103,7 +113,7 @@ class _BrewTesterFileExtensions {
|
|
|
103
113
|
class BrewTester {
|
|
104
114
|
static async pTestJson (args, opts) { return _BrewTesterJson.pRun(args, opts); }
|
|
105
115
|
static testFileLocations () { return _BrewTesterFileLocations.run(); }
|
|
106
|
-
static
|
|
116
|
+
static testFileNames () { return _BrewTesterFileNames.run(); }
|
|
107
117
|
}
|
|
108
118
|
|
|
109
119
|
export {BrewTester};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "spells.json",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.13",
|
|
5
5
|
"title": "Spells",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"$defs": {
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
"name": {
|
|
12
12
|
"type": "string"
|
|
13
13
|
},
|
|
14
|
+
"alias": {
|
|
15
|
+
"$ref": "util.json#/$defs/alias"
|
|
16
|
+
},
|
|
14
17
|
"level": {
|
|
15
18
|
"type": "integer"
|
|
16
19
|
},
|
|
@@ -560,6 +563,9 @@
|
|
|
560
563
|
"name": {
|
|
561
564
|
"type": "string"
|
|
562
565
|
},
|
|
566
|
+
"alias": {
|
|
567
|
+
"$ref": "util.json#/$defs/alias"
|
|
568
|
+
},
|
|
563
569
|
"level": {
|
|
564
570
|
"type": "integer"
|
|
565
571
|
},
|
|
@@ -1117,6 +1123,9 @@
|
|
|
1117
1123
|
"name": {
|
|
1118
1124
|
"type": "string"
|
|
1119
1125
|
},
|
|
1126
|
+
"alias": {
|
|
1127
|
+
"$ref": "util.json#/$defs/alias"
|
|
1128
|
+
},
|
|
1120
1129
|
"level": {
|
|
1121
1130
|
"type": "integer"
|
|
1122
1131
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "spells.json",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.13",
|
|
5
5
|
"title": "Spells",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"$defs": {
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
"name": {
|
|
12
12
|
"type": "string"
|
|
13
13
|
},
|
|
14
|
+
"alias": {
|
|
15
|
+
"$ref": "util.json#/$defs/alias"
|
|
16
|
+
},
|
|
14
17
|
"level": {
|
|
15
18
|
"type": "integer"
|
|
16
19
|
},
|
|
@@ -560,6 +563,9 @@
|
|
|
560
563
|
"name": {
|
|
561
564
|
"type": "string"
|
|
562
565
|
},
|
|
566
|
+
"alias": {
|
|
567
|
+
"$ref": "util.json#/$defs/alias"
|
|
568
|
+
},
|
|
563
569
|
"level": {
|
|
564
570
|
"type": "integer"
|
|
565
571
|
},
|
|
@@ -1117,6 +1123,9 @@
|
|
|
1117
1123
|
"name": {
|
|
1118
1124
|
"type": "string"
|
|
1119
1125
|
},
|
|
1126
|
+
"alias": {
|
|
1127
|
+
"$ref": "util.json#/$defs/alias"
|
|
1128
|
+
},
|
|
1120
1129
|
"level": {
|
|
1121
1130
|
"type": "integer"
|
|
1122
1131
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "spells.json",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.13",
|
|
5
5
|
"title": "Spells",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"$defs": {
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
"name": {
|
|
12
12
|
"type": "string"
|
|
13
13
|
},
|
|
14
|
+
"alias": {
|
|
15
|
+
"$ref": "util.json#/$defs/alias"
|
|
16
|
+
},
|
|
14
17
|
"level": {
|
|
15
18
|
"type": "integer"
|
|
16
19
|
},
|
|
@@ -347,6 +350,9 @@
|
|
|
347
350
|
"name": {
|
|
348
351
|
"type": "string"
|
|
349
352
|
},
|
|
353
|
+
"alias": {
|
|
354
|
+
"$ref": "util.json#/$defs/alias"
|
|
355
|
+
},
|
|
350
356
|
"level": {
|
|
351
357
|
"type": "integer"
|
|
352
358
|
},
|
|
@@ -691,6 +697,9 @@
|
|
|
691
697
|
"name": {
|
|
692
698
|
"type": "string"
|
|
693
699
|
},
|
|
700
|
+
"alias": {
|
|
701
|
+
"$ref": "util.json#/$defs/alias"
|
|
702
|
+
},
|
|
694
703
|
"level": {
|
|
695
704
|
"type": "integer"
|
|
696
705
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "spells.json",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.13",
|
|
5
5
|
"title": "Spells",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"$defs": {
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
"name": {
|
|
12
12
|
"type": "string"
|
|
13
13
|
},
|
|
14
|
+
"alias": {
|
|
15
|
+
"$ref": "util.json#/$defs/alias"
|
|
16
|
+
},
|
|
14
17
|
"level": {
|
|
15
18
|
"type": "integer"
|
|
16
19
|
},
|
|
@@ -347,6 +350,9 @@
|
|
|
347
350
|
"name": {
|
|
348
351
|
"type": "string"
|
|
349
352
|
},
|
|
353
|
+
"alias": {
|
|
354
|
+
"$ref": "util.json#/$defs/alias"
|
|
355
|
+
},
|
|
350
356
|
"level": {
|
|
351
357
|
"type": "integer"
|
|
352
358
|
},
|
|
@@ -691,6 +697,9 @@
|
|
|
691
697
|
"name": {
|
|
692
698
|
"type": "string"
|
|
693
699
|
},
|
|
700
|
+
"alias": {
|
|
701
|
+
"$ref": "util.json#/$defs/alias"
|
|
702
|
+
},
|
|
694
703
|
"level": {
|
|
695
704
|
"type": "integer"
|
|
696
705
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "spells.json",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.13",
|
|
5
5
|
"title": "Spells",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"$defs": {
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
"name": {
|
|
12
12
|
"type": "string"
|
|
13
13
|
},
|
|
14
|
+
"alias": {
|
|
15
|
+
"$ref": "util.json#/$defs/alias"
|
|
16
|
+
},
|
|
14
17
|
"level": {
|
|
15
18
|
"type": "integer"
|
|
16
19
|
},
|
|
@@ -527,6 +530,9 @@
|
|
|
527
530
|
"name": {
|
|
528
531
|
"type": "string"
|
|
529
532
|
},
|
|
533
|
+
"alias": {
|
|
534
|
+
"$ref": "util.json#/$defs/alias"
|
|
535
|
+
},
|
|
530
536
|
"level": {
|
|
531
537
|
"type": "integer"
|
|
532
538
|
},
|
|
@@ -1051,6 +1057,9 @@
|
|
|
1051
1057
|
"name": {
|
|
1052
1058
|
"type": "string"
|
|
1053
1059
|
},
|
|
1060
|
+
"alias": {
|
|
1061
|
+
"$ref": "util.json#/$defs/alias"
|
|
1062
|
+
},
|
|
1054
1063
|
"level": {
|
|
1055
1064
|
"type": "integer"
|
|
1056
1065
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "spells.json",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.13",
|
|
5
5
|
"title": "Spells",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"$defs": {
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
"name": {
|
|
12
12
|
"type": "string"
|
|
13
13
|
},
|
|
14
|
+
"alias": {
|
|
15
|
+
"$ref": "util.json#/$defs/alias"
|
|
16
|
+
},
|
|
14
17
|
"level": {
|
|
15
18
|
"type": "integer"
|
|
16
19
|
},
|
|
@@ -527,6 +530,9 @@
|
|
|
527
530
|
"name": {
|
|
528
531
|
"type": "string"
|
|
529
532
|
},
|
|
533
|
+
"alias": {
|
|
534
|
+
"$ref": "util.json#/$defs/alias"
|
|
535
|
+
},
|
|
530
536
|
"level": {
|
|
531
537
|
"type": "integer"
|
|
532
538
|
},
|
|
@@ -1051,6 +1057,9 @@
|
|
|
1051
1057
|
"name": {
|
|
1052
1058
|
"type": "string"
|
|
1053
1059
|
},
|
|
1060
|
+
"alias": {
|
|
1061
|
+
"$ref": "util.json#/$defs/alias"
|
|
1062
|
+
},
|
|
1054
1063
|
"level": {
|
|
1055
1064
|
"type": "integer"
|
|
1056
1065
|
},
|