5etools-utils 0.9.48 → 0.9.50
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/BrewIndexGenerator.js +9 -0
- package/package.json +1 -1
- package/schema/brew/adventures.json +3 -2
- package/schema/brew-fast/adventures.json +3 -2
- package/schema/site/adventures.json +3 -2
- package/schema/site-fast/adventures.json +3 -2
- package/schema/ua/adventures.json +3 -2
- package/schema/ua-fast/adventures.json +3 -2
|
@@ -22,9 +22,18 @@ class _BrewIndexTimestamps extends _BrewIndex {
|
|
|
22
22
|
static _DISPLAY_NAME = "timestamp";
|
|
23
23
|
|
|
24
24
|
addToIndex (fileInfo) {
|
|
25
|
+
// Use the most recent source in the `_meta`, as we assume this is the most relevant/interesting
|
|
26
|
+
const datePublished = (fileInfo.contents._meta.sources || [])
|
|
27
|
+
.map(src => src.dateReleased)
|
|
28
|
+
.filter(Boolean)
|
|
29
|
+
.map(str => new Date(str))
|
|
30
|
+
.sort((a, b) => b.getTime() - a.getTime())
|
|
31
|
+
.find(Boolean);
|
|
32
|
+
|
|
25
33
|
this._index[fileInfo.cleanName] = {
|
|
26
34
|
a: fileInfo.contents._meta.dateAdded,
|
|
27
35
|
m: fileInfo.contents._meta.dateLastModified,
|
|
36
|
+
p: datePublished ? (datePublished.getTime() / 1000) : undefined,
|
|
28
37
|
};
|
|
29
38
|
}
|
|
30
39
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "adventures.json",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.16",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"adventure": {
|
|
@@ -198,7 +198,8 @@
|
|
|
198
198
|
"Planescape",
|
|
199
199
|
"Adventure Atlas",
|
|
200
200
|
"Heroes' Feast",
|
|
201
|
-
"Family Friendly"
|
|
201
|
+
"Family Friendly",
|
|
202
|
+
"Grim Hollow"
|
|
202
203
|
]
|
|
203
204
|
},
|
|
204
205
|
"alAveragePlayerLevel": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "adventures.json",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.16",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"adventure": {
|
|
@@ -198,7 +198,8 @@
|
|
|
198
198
|
"Planescape",
|
|
199
199
|
"Adventure Atlas",
|
|
200
200
|
"Heroes' Feast",
|
|
201
|
-
"Family Friendly"
|
|
201
|
+
"Family Friendly",
|
|
202
|
+
"Grim Hollow"
|
|
202
203
|
]
|
|
203
204
|
},
|
|
204
205
|
"alAveragePlayerLevel": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "adventures.json",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.16",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"adventure": {
|
|
@@ -198,7 +198,8 @@
|
|
|
198
198
|
"Planescape",
|
|
199
199
|
"Adventure Atlas",
|
|
200
200
|
"Heroes' Feast",
|
|
201
|
-
"Family Friendly"
|
|
201
|
+
"Family Friendly",
|
|
202
|
+
"Grim Hollow"
|
|
202
203
|
]
|
|
203
204
|
}
|
|
204
205
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "adventures.json",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.16",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"adventure": {
|
|
@@ -198,7 +198,8 @@
|
|
|
198
198
|
"Planescape",
|
|
199
199
|
"Adventure Atlas",
|
|
200
200
|
"Heroes' Feast",
|
|
201
|
-
"Family Friendly"
|
|
201
|
+
"Family Friendly",
|
|
202
|
+
"Grim Hollow"
|
|
202
203
|
]
|
|
203
204
|
}
|
|
204
205
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "adventures.json",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.16",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"adventure": {
|
|
@@ -198,7 +198,8 @@
|
|
|
198
198
|
"Planescape",
|
|
199
199
|
"Adventure Atlas",
|
|
200
200
|
"Heroes' Feast",
|
|
201
|
-
"Family Friendly"
|
|
201
|
+
"Family Friendly",
|
|
202
|
+
"Grim Hollow"
|
|
202
203
|
]
|
|
203
204
|
}
|
|
204
205
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "adventures.json",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.16",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"adventure": {
|
|
@@ -198,7 +198,8 @@
|
|
|
198
198
|
"Planescape",
|
|
199
199
|
"Adventure Atlas",
|
|
200
200
|
"Heroes' Feast",
|
|
201
|
-
"Family Friendly"
|
|
201
|
+
"Family Friendly",
|
|
202
|
+
"Grim Hollow"
|
|
202
203
|
]
|
|
203
204
|
}
|
|
204
205
|
},
|