@lycoristech/azurapi 0.1.0 → 0.1.2
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/README.md +24 -7
- package/data/id-map.json +608 -60
- package/data/ship-list.json +948 -126
- package/data/ships.json +26762 -2227
- package/data/version.json +2 -2
- package/dist/cjs/normalize/identity.js +33 -8
- package/dist/cjs/normalize/ship.js +30 -5
- package/dist/cjs/output/writeIdMap.js +19 -8
- package/dist/cjs/translate/enums.js +28 -16
- package/dist/normalize/identity.d.ts +18 -1
- package/dist/normalize/identity.d.ts.map +1 -1
- package/dist/normalize/identity.js +32 -8
- package/dist/normalize/identity.js.map +1 -1
- package/dist/normalize/ship.d.ts +14 -0
- package/dist/normalize/ship.d.ts.map +1 -1
- package/dist/normalize/ship.js +29 -5
- package/dist/normalize/ship.js.map +1 -1
- package/dist/output/writeIdMap.d.ts +14 -2
- package/dist/output/writeIdMap.d.ts.map +1 -1
- package/dist/output/writeIdMap.js +18 -8
- package/dist/output/writeIdMap.js.map +1 -1
- package/dist/translate/enums.d.ts +8 -1
- package/dist/translate/enums.d.ts.map +1 -1
- package/dist/translate/enums.js +28 -16
- package/dist/translate/enums.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
# LycorisTech/AzurAPI
|
|
4
4
|
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://www.npmjs.com/package/@lycoristech/azurapi"><img alt="npm version" src="https://img.shields.io/npm/v/%40lycoristech%2Fazurapi?logo=npm&logoColor=white&label=npm" /></a>
|
|
7
|
+
<a href="https://www.npmjs.com/package/@lycoristech/azurapi"><img alt="npm total downloads" src="https://img.shields.io/npm/d18m/%40lycoristech%2Fazurapi?label=downloads" /></a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
5
10
|
A self-maintained, current Azur Lane data library. Drop-in replacement for the `@azurapi/azurapi` package.
|
|
6
11
|
|
|
7
12
|
## Why?
|
|
@@ -53,13 +58,24 @@ The output JSON schema (field names, structure, rarity values, etc.) is delibera
|
|
|
53
58
|
|
|
54
59
|
## Data Freshness
|
|
55
60
|
|
|
56
|
-
Data is auto-refreshed weekly (every Monday) via GitHub Actions from [AzurLaneTools/
|
|
57
|
-
1. Sparse-clones the upstream
|
|
58
|
-
2.
|
|
59
|
-
3.
|
|
60
|
-
4.
|
|
61
|
+
Data is auto-refreshed weekly (every Monday) via GitHub Actions from [AzurLaneTools/AzurLaneLuaScripts](https://github.com/AzurLaneTools/AzurLaneLuaScripts) (EN + CN + JP regions), which tracks every game patch within hours. The refresh pipeline:
|
|
62
|
+
1. Sparse-clones the upstream Lua scripts
|
|
63
|
+
2. Converts the Lua config tables to JSON (`scripts/lua2json.py`, needs Python + `lupa`)
|
|
64
|
+
3. Normalizes raw game tables into AzurAPI-compatible JSON
|
|
65
|
+
4. Runs sanity checks (schema validation, field coverage)
|
|
66
|
+
5. Commits updated `data/*.json` only if data changed, which then auto-publishes to npm
|
|
67
|
+
|
|
68
|
+
You can also trigger a refresh manually from the Actions tab, or locally:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
git clone --filter=blob:none --no-checkout https://github.com/AzurLaneTools/AzurLaneLuaScripts.git upstream/azurlane-lua
|
|
72
|
+
git -C upstream/azurlane-lua sparse-checkout set EN/sharecfg EN/sharecfgdata CN/sharecfg CN/sharecfgdata JP/sharecfg JP/sharecfgdata versions
|
|
73
|
+
git -C upstream/azurlane-lua checkout
|
|
74
|
+
pip install lupa
|
|
75
|
+
npm run convert:lua && npm run build:data
|
|
76
|
+
```
|
|
61
77
|
|
|
62
|
-
|
|
78
|
+
(The previous JSON source, [AzurLaneTools/AzurLaneData](https://github.com/AzurLaneTools/AzurLaneData), stopped updating on 2026-05-08.)
|
|
63
79
|
|
|
64
80
|
Current data version: see [`data/version.json`](data/version.json).
|
|
65
81
|
|
|
@@ -90,7 +106,8 @@ Also available: `ship-list.json` (minimal index), `id-map.json` (name→id looku
|
|
|
90
106
|
# Install deps
|
|
91
107
|
npm install
|
|
92
108
|
|
|
93
|
-
# Build data from upstream (
|
|
109
|
+
# Build data from upstream (see "Data Freshness" for the upstream/ checkout)
|
|
110
|
+
npm run convert:lua
|
|
94
111
|
npm run build:data
|
|
95
112
|
|
|
96
113
|
# Verify data integrity
|