@sakura2333/kancolle-data 0.1.1 → 0.2.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/CHANGELOG.md +39 -7
- package/README.md +11 -4
- package/RELEASES.json +23 -0
- package/assets/useitems/71.png +0 -0
- package/audit/build-report.json +19 -3
- package/equipment/special-bonuses.nedb +348 -341
- package/improvement/list.json +2 -2
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/manifest.json +109 -24
- package/package.json +7 -3
- package/schemas/equipment-special-bonus.schema.json +38 -2
- package/scripts/check-fresh.js +26 -0
package/improvement/list.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"metadata": {
|
|
3
3
|
"schemaVersion": 2,
|
|
4
|
-
"dataVersion": "2026-06-
|
|
5
|
-
"generatedAt": "2026-06-
|
|
4
|
+
"dataVersion": "2026-06-28T11:13:25+00:00",
|
|
5
|
+
"generatedAt": "2026-06-28T11:13:25+00:00",
|
|
6
6
|
"shipMasterVersion": "2026053000",
|
|
7
7
|
"dayOrder": [
|
|
8
8
|
"all",
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -7,6 +7,7 @@ const resolveData = (...parts) => path.join(__dirname, ...parts)
|
|
|
7
7
|
module.exports = Object.freeze({
|
|
8
8
|
rootPath: __dirname,
|
|
9
9
|
manifestPath: resolveData('manifest.json'),
|
|
10
|
+
releasesPath: resolveData('RELEASES.json'),
|
|
10
11
|
improvement: Object.freeze({
|
|
11
12
|
listPath: resolveData('improvement', 'list.json'),
|
|
12
13
|
detailPath: resolveData('improvement', 'detail.nedb'),
|
package/manifest.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"packageVersion": "0.
|
|
3
|
-
"generatedAt": "2026-06-
|
|
2
|
+
"packageVersion": "0.2.0",
|
|
3
|
+
"generatedAt": "2026-06-28T11:13:26+00:00",
|
|
4
4
|
"datasets": {
|
|
5
5
|
"improvement": {
|
|
6
6
|
"schemaVersion": 3,
|
|
7
|
+
"listSchemaVersion": 2,
|
|
7
8
|
"list": "improvement/list.json",
|
|
8
9
|
"detail": "improvement/detail.nedb",
|
|
9
10
|
"listViewCount": 8,
|
|
@@ -22,23 +23,95 @@
|
|
|
22
23
|
"equipmentRecordCount": 247,
|
|
23
24
|
"relationCount": 1645,
|
|
24
25
|
"issueCount": 2,
|
|
25
|
-
"status": "ok"
|
|
26
|
+
"status": "ok",
|
|
27
|
+
"fetches": [
|
|
28
|
+
{
|
|
29
|
+
"url": "https://raw.githubusercontent.com/kcwiki/kancolle-data/refs/heads/master/wiki/ship.json",
|
|
30
|
+
"status": "fresh",
|
|
31
|
+
"statusCode": 200,
|
|
32
|
+
"validatedAt": 1782645174,
|
|
33
|
+
"validatedInRun": true,
|
|
34
|
+
"usedCacheFallback": false,
|
|
35
|
+
"contentSha256": "d8c1691e83e6f4a9e55e34f8139c9ad9bb21ff9b3b7066dd3d5d31e15bae7dd7",
|
|
36
|
+
"cachePath": "raw.githubusercontent.com/kcwiki/kancolle-data/refs/heads/master/wiki/ship.json"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"url": "https://raw.githubusercontent.com/kcwiki/kancolle-data/refs/heads/master/wiki/equipment.json",
|
|
40
|
+
"status": "fresh",
|
|
41
|
+
"statusCode": 200,
|
|
42
|
+
"validatedAt": 1782645174,
|
|
43
|
+
"validatedInRun": true,
|
|
44
|
+
"usedCacheFallback": false,
|
|
45
|
+
"contentSha256": "284d7e32f70e67dd599ae43e1758d43568fcad3fe062548c68808988a4a27c0b",
|
|
46
|
+
"cachePath": "raw.githubusercontent.com/kcwiki/kancolle-data/refs/heads/master/wiki/equipment.json"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
26
49
|
},
|
|
27
50
|
"equipmentSpecialBonuses": {
|
|
28
|
-
"schemaVersion":
|
|
51
|
+
"schemaVersion": 2,
|
|
29
52
|
"path": "equipment/special-bonuses.nedb",
|
|
30
53
|
"source": "kc3-slotitem-bonus",
|
|
31
54
|
"sourceUrl": "https://raw.githubusercontent.com/KC3Kai/kancolle-replay/refs/heads/master/js/data/mst_slotitem_bonus.json",
|
|
32
55
|
"entryCount": 325,
|
|
56
|
+
"recordCount": 348,
|
|
33
57
|
"equipmentRecordCount": 341,
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
58
|
+
"equipmentTypeRecordCount": 7,
|
|
59
|
+
"ruleCount": 2320,
|
|
60
|
+
"equipmentRuleCount": 2297,
|
|
61
|
+
"equipmentTypeRuleCount": 23,
|
|
62
|
+
"issueCount": 0,
|
|
63
|
+
"status": "ok",
|
|
64
|
+
"fetches": [
|
|
65
|
+
{
|
|
66
|
+
"url": "https://raw.githubusercontent.com/KC3Kai/kancolle-replay/refs/heads/master/js/data/mst_slotitem_bonus.json",
|
|
67
|
+
"status": "fresh",
|
|
68
|
+
"statusCode": 200,
|
|
69
|
+
"validatedAt": 1782645175,
|
|
70
|
+
"validatedInRun": true,
|
|
71
|
+
"usedCacheFallback": false,
|
|
72
|
+
"contentSha256": "e19fc34ea5d0246c5d8a34a9cb272c595970118eba62409006669a4c7f9962d1",
|
|
73
|
+
"cachePath": "raw.githubusercontent.com/KC3Kai/kancolle-replay/refs/heads/master/js/data/mst_slotitem_bonus.json"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
37
76
|
},
|
|
38
77
|
"useitemIcons": {
|
|
39
78
|
"schemaVersion": 1,
|
|
40
79
|
"directory": "assets/useitems",
|
|
41
|
-
"count":
|
|
80
|
+
"count": 16,
|
|
81
|
+
"requiredIds": [
|
|
82
|
+
2,
|
|
83
|
+
57,
|
|
84
|
+
70,
|
|
85
|
+
71,
|
|
86
|
+
75,
|
|
87
|
+
77,
|
|
88
|
+
78,
|
|
89
|
+
91,
|
|
90
|
+
92,
|
|
91
|
+
94,
|
|
92
|
+
95,
|
|
93
|
+
100,
|
|
94
|
+
104
|
|
95
|
+
],
|
|
96
|
+
"availableIds": [
|
|
97
|
+
2,
|
|
98
|
+
57,
|
|
99
|
+
70,
|
|
100
|
+
71,
|
|
101
|
+
75,
|
|
102
|
+
77,
|
|
103
|
+
78,
|
|
104
|
+
91,
|
|
105
|
+
92,
|
|
106
|
+
94,
|
|
107
|
+
95,
|
|
108
|
+
100,
|
|
109
|
+
104,
|
|
110
|
+
145,
|
|
111
|
+
150,
|
|
112
|
+
241
|
|
113
|
+
],
|
|
114
|
+
"missingIds": []
|
|
42
115
|
}
|
|
43
116
|
},
|
|
44
117
|
"sources": {
|
|
@@ -51,16 +124,20 @@
|
|
|
51
124
|
},
|
|
52
125
|
"files": {
|
|
53
126
|
"CHANGELOG.md": {
|
|
54
|
-
"sha256": "
|
|
55
|
-
"bytes":
|
|
127
|
+
"sha256": "13c811ad057aad7d8d99e6aae1c9326f676d021271a0e8f1737596d4b5410324",
|
|
128
|
+
"bytes": 3030
|
|
56
129
|
},
|
|
57
130
|
"LICENSES.md": {
|
|
58
131
|
"sha256": "40bddfdbcdc4b7812056e82fc5de18184097d2fdb903fab14262ea41e47c7594",
|
|
59
132
|
"bytes": 412
|
|
60
133
|
},
|
|
61
134
|
"README.md": {
|
|
62
|
-
"sha256": "
|
|
63
|
-
"bytes":
|
|
135
|
+
"sha256": "c41e8f4910f98c9bfb49dc21c1245bd78696aad184fe144adb7f0144d332ddc4",
|
|
136
|
+
"bytes": 1173
|
|
137
|
+
},
|
|
138
|
+
"RELEASES.json": {
|
|
139
|
+
"sha256": "1912cea6dc06fd71491d957bb34e68722b9a897f97ba5bc6519fed393739feda",
|
|
140
|
+
"bytes": 795
|
|
64
141
|
},
|
|
65
142
|
"assets/useitems/100.png": {
|
|
66
143
|
"sha256": "6c056ddea6ed3d2bf425ff70a36e47ecbc1dfa3de29d14fec24533e7699778f2",
|
|
@@ -94,6 +171,10 @@
|
|
|
94
171
|
"sha256": "0f4075c759c4efd9c82f92311c5a657bff39f7ea0261be00818e8325cb0fc454",
|
|
95
172
|
"bytes": 45622
|
|
96
173
|
},
|
|
174
|
+
"assets/useitems/71.png": {
|
|
175
|
+
"sha256": "824bab9afa0a5fe768ffcfceade5c19fd0998b80ffc83413c7427ac3a31e6573",
|
|
176
|
+
"bytes": 15305
|
|
177
|
+
},
|
|
97
178
|
"assets/useitems/75.png": {
|
|
98
179
|
"sha256": "6db732f6217f551042d23df5cafff0b9b16bd00b34a52346c86a3c7d89f09352",
|
|
99
180
|
"bytes": 19226
|
|
@@ -123,40 +204,44 @@
|
|
|
123
204
|
"bytes": 28940
|
|
124
205
|
},
|
|
125
206
|
"audit/build-report.json": {
|
|
126
|
-
"sha256": "
|
|
127
|
-
"bytes":
|
|
207
|
+
"sha256": "3583f2ecb591f9073df84b77fc0b67e86f559eef3158b2812d9fe9dd8c8abcc3",
|
|
208
|
+
"bytes": 313
|
|
128
209
|
},
|
|
129
210
|
"equipment/drop-from.nedb": {
|
|
130
211
|
"sha256": "bb366ee4db693e396414cf3145e583a36c0ce9fa7f56cb4a553f8cba8a5e07d3",
|
|
131
212
|
"bytes": 358778
|
|
132
213
|
},
|
|
133
214
|
"equipment/special-bonuses.nedb": {
|
|
134
|
-
"sha256": "
|
|
135
|
-
"bytes":
|
|
215
|
+
"sha256": "818fe35d9a441823f65c37e1418a4a54492dfdd63ad61a1f292427d30972720e",
|
|
216
|
+
"bytes": 281247
|
|
136
217
|
},
|
|
137
218
|
"improvement/detail.nedb": {
|
|
138
219
|
"sha256": "2e1f5068dfef350926206ca23c58d35c73f0f2384686a576caa330111d772cca",
|
|
139
220
|
"bytes": 467736
|
|
140
221
|
},
|
|
141
222
|
"improvement/list.json": {
|
|
142
|
-
"sha256": "
|
|
223
|
+
"sha256": "7902004010db1b3fc3338dfc079cf8df6b6b352e91c23de789a9b007f409c5d0",
|
|
143
224
|
"bytes": 209473
|
|
144
225
|
},
|
|
145
226
|
"index.d.ts": {
|
|
146
|
-
"sha256": "
|
|
147
|
-
"bytes":
|
|
227
|
+
"sha256": "ff7d2d5fc466627b1727e1cdb9aa6b2075b5ace680e695824067d450c015eeec",
|
|
228
|
+
"bytes": 403
|
|
148
229
|
},
|
|
149
230
|
"index.js": {
|
|
150
|
-
"sha256": "
|
|
151
|
-
"bytes":
|
|
231
|
+
"sha256": "00ed1d97c6020622cc95ca4718dbd1e630bb823b62f232994a298673d2cbabc7",
|
|
232
|
+
"bytes": 807
|
|
152
233
|
},
|
|
153
234
|
"schemas/equipment-drop-from.schema.json": {
|
|
154
235
|
"sha256": "b67bc757c8dd8523498abc0215656b7e8898485d060ddeac11577bb697a5279f",
|
|
155
236
|
"bytes": 963
|
|
156
237
|
},
|
|
157
238
|
"schemas/equipment-special-bonus.schema.json": {
|
|
158
|
-
"sha256": "
|
|
159
|
-
"bytes":
|
|
239
|
+
"sha256": "e8811b953358cbb5df8c786521c68841a4c422e07d0dbc9c78088e66c4690273",
|
|
240
|
+
"bytes": 1591
|
|
241
|
+
},
|
|
242
|
+
"scripts/check-fresh.js": {
|
|
243
|
+
"sha256": "1c5fb329d910a5ec42146a959dedfdefd23dd478050e5d50dda2b3619fc69b6b",
|
|
244
|
+
"bytes": 934
|
|
160
245
|
}
|
|
161
246
|
}
|
|
162
|
-
}
|
|
247
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sakura2333/kancolle-data",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Versioned KanColle community datasets generated by kancolle-item-improvement-spider",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
"README.md",
|
|
12
12
|
"CHANGELOG.md",
|
|
13
13
|
"LICENSES.md",
|
|
14
|
+
"RELEASES.json",
|
|
15
|
+
"scripts/check-fresh.js",
|
|
14
16
|
"schemas/",
|
|
15
17
|
"improvement/",
|
|
16
18
|
"equipment/",
|
|
@@ -29,7 +31,9 @@
|
|
|
29
31
|
"access": "public"
|
|
30
32
|
},
|
|
31
33
|
"scripts": {
|
|
32
|
-
"check": "node -e \"const d=require('./');
|
|
33
|
-
"prepack": "npm run check"
|
|
34
|
+
"check": "node -e \"const d=require('./');const fs=require('fs');const m=JSON.parse(fs.readFileSync(d.manifestPath));for(const p of [d.manifestPath,d.releasesPath,d.improvement.listPath,d.improvement.detailPath,d.equipment.dropFromPath,d.equipment.specialBonusesPath])if(!fs.existsSync(p))throw new Error('missing '+p);if(m.datasets.equipmentSpecialBonuses.schemaVersion!==2)throw new Error('unexpected special bonus schema');if((m.datasets.useitemIcons.missingIds||[]).length)throw new Error('missing useitem icons');for(const id of m.datasets.useitemIcons.requiredIds||[])if(!fs.existsSync(d.assets.useitemPath(id)))throw new Error('missing icon '+id)\"",
|
|
35
|
+
"prepack": "npm run check",
|
|
36
|
+
"check:fresh": "node scripts/check-fresh.js",
|
|
37
|
+
"prepublishOnly": "npm run check && npm run check:fresh"
|
|
34
38
|
}
|
|
35
39
|
}
|
|
@@ -2,17 +2,53 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"title": "Equipment special bonus record",
|
|
4
4
|
"type": "object",
|
|
5
|
-
"required": ["
|
|
5
|
+
"required": ["target", "rules"],
|
|
6
6
|
"properties": {
|
|
7
|
+
"target": {
|
|
8
|
+
"oneOf": [
|
|
9
|
+
{
|
|
10
|
+
"type": "object",
|
|
11
|
+
"required": ["kind", "equipmentIds"],
|
|
12
|
+
"properties": {
|
|
13
|
+
"kind": { "const": "equipment" },
|
|
14
|
+
"equipmentIds": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"minItems": 1,
|
|
17
|
+
"items": { "type": "integer", "minimum": 1 }
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"additionalProperties": false
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "object",
|
|
24
|
+
"required": ["kind", "equipmentTypeIds"],
|
|
25
|
+
"properties": {
|
|
26
|
+
"kind": { "const": "equipment-type" },
|
|
27
|
+
"equipmentTypeIds": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"minItems": 1,
|
|
30
|
+
"items": { "type": "integer", "minimum": 1 }
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"additionalProperties": false
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
7
37
|
"equipmentId": { "type": "integer", "minimum": 1 },
|
|
8
38
|
"equipmentName": { "type": "string" },
|
|
39
|
+
"equipmentTypeIds": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"minItems": 1,
|
|
42
|
+
"items": { "type": "integer", "minimum": 1 }
|
|
43
|
+
},
|
|
9
44
|
"rules": {
|
|
10
45
|
"type": "array",
|
|
46
|
+
"minItems": 1,
|
|
11
47
|
"items": {
|
|
12
48
|
"type": "object",
|
|
13
49
|
"required": ["bonus", "conditions"],
|
|
14
50
|
"properties": {
|
|
15
|
-
"bonus": { "type": "object", "additionalProperties": { "type": "number" } },
|
|
51
|
+
"bonus": { "type": "object", "minProperties": 1, "additionalProperties": { "type": "number" } },
|
|
16
52
|
"conditions": { "type": "object" }
|
|
17
53
|
}
|
|
18
54
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const fs = require('fs')
|
|
4
|
+
const path = require('path')
|
|
5
|
+
|
|
6
|
+
const root = path.resolve(__dirname, '..')
|
|
7
|
+
const manifest = JSON.parse(fs.readFileSync(path.join(root, 'manifest.json'), 'utf8'))
|
|
8
|
+
|
|
9
|
+
for (const key of ['equipmentDropFrom', 'equipmentSpecialBonuses']) {
|
|
10
|
+
const dataset = manifest.datasets && manifest.datasets[key]
|
|
11
|
+
if (!dataset || dataset.status !== 'ok') {
|
|
12
|
+
throw new Error(`dataset ${key} is not fresh: status=${dataset && dataset.status}`)
|
|
13
|
+
}
|
|
14
|
+
if (!Array.isArray(dataset.fetches) || dataset.fetches.length === 0) {
|
|
15
|
+
throw new Error(`dataset ${key} has no source fetch audit`)
|
|
16
|
+
}
|
|
17
|
+
for (const fetchInfo of dataset.fetches) {
|
|
18
|
+
if (fetchInfo.status !== 'fresh'
|
|
19
|
+
|| fetchInfo.validatedInRun !== true
|
|
20
|
+
|| fetchInfo.usedCacheFallback === true) {
|
|
21
|
+
throw new Error(`dataset ${key} source was not freshly validated: ${fetchInfo.url}`)
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
console.log('source freshness checks passed')
|