poi-plugin-item-improvement2-beta 1.0.19 → 1.0.22
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/REFACTOR_NOTES.md +35 -0
- package/assets/db/{items.nedb → improvement-detail.nedb} +372 -372
- package/assets/db/improvement-list.json +15425 -0
- package/index.js +3 -0
- package/package.json +4 -3
- package/tests/improvement-data.test.js +141 -0
- package/views/detail-row.js +10 -15
- package/views/improvement-data-source.js +282 -0
- package/views/improvement-data.js +153 -0
- package/views/item-info-area.js +30 -9
- package/views/item-info-row.js +2 -2
- package/views/item-wrapper.js +1 -2
- package/views/mat-row.js +2 -1
- package/views/selectors.js +26 -95
- package/assets/db/arsenal_all.nedb +0 -372
- package/assets/db/arsenal_weekday.nedb +0 -7
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Data projection refactor
|
|
2
|
+
|
|
3
|
+
## Runtime files
|
|
4
|
+
|
|
5
|
+
The plugin now consumes exactly two backend projections:
|
|
6
|
+
|
|
7
|
+
- `assets/db/improvement-list.json`: compact all + seven-day list data.
|
|
8
|
+
- `assets/db/improvement-detail.nedb`: full equipment detail records.
|
|
9
|
+
|
|
10
|
+
The old `arsenal_all.nedb`, `arsenal_weekday.nedb`, and `items.nedb` runtime split has
|
|
11
|
+
been removed.
|
|
12
|
+
|
|
13
|
+
## Responsibility boundary
|
|
14
|
+
|
|
15
|
+
- Spider parses Wiki rules and owns list aggregation.
|
|
16
|
+
- The list page reads backend-provided `[itemId, assistantTexts]` rows directly.
|
|
17
|
+
- The detail page reads the detail NeDB records.
|
|
18
|
+
- Spider already emits `shipIdList` and `assistantShipIdsByDay`, but this plugin version
|
|
19
|
+
deliberately does not consume them yet.
|
|
20
|
+
- Detail presentation continues to use the legacy anchor `id` and source `text`, so an
|
|
21
|
+
irregular description such as `夕張改二/特/丁` is not reduced to one anchor ship.
|
|
22
|
+
|
|
23
|
+
## Data source
|
|
24
|
+
|
|
25
|
+
`views/improvement-data-source.es` loads, validates, downloads, and replaces the two
|
|
26
|
+
files as one dataset. `selectors.es` only joins the detail records with Poi master data
|
|
27
|
+
and attaches the backend list summary.
|
|
28
|
+
|
|
29
|
+
## Verification
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm ci --include=dev
|
|
33
|
+
npm test
|
|
34
|
+
npm pack --dry-run
|
|
35
|
+
```
|