@lycoristech/azurapi 0.1.1 → 0.1.3

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 CHANGED
@@ -58,13 +58,24 @@ The output JSON schema (field names, structure, rarity values, etc.) is delibera
58
58
 
59
59
  ## Data Freshness
60
60
 
61
- Data is auto-refreshed weekly (every Monday) via GitHub Actions from [AzurLaneTools/AzurLaneData](https://github.com/AzurLaneTools/AzurLaneData) (EN + CN + JP regions). The refresh pipeline:
62
- 1. Sparse-clones the upstream repo
63
- 2. Normalizes raw game tables into AzurAPI-compatible JSON
64
- 3. Runs sanity checks (schema validation, field coverage)
65
- 4. Commits updated `data/*.json` only if data changed
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
66
67
 
67
- You can also trigger a refresh manually from the Actions tab, or run `npm run build:data` locally.
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
+ ```
77
+
78
+ (The previous JSON source, [AzurLaneTools/AzurLaneData](https://github.com/AzurLaneTools/AzurLaneData), stopped updating on 2026-05-08.)
68
79
 
69
80
  Current data version: see [`data/version.json`](data/version.json).
70
81
 
@@ -95,7 +106,8 @@ Also available: `ship-list.json` (minimal index), `id-map.json` (name→id looku
95
106
  # Install deps
96
107
  npm install
97
108
 
98
- # Build data from upstream (requires upstream/ sparse checkout)
109
+ # Build data from upstream (see "Data Freshness" for the upstream/ checkout)
110
+ npm run convert:lua
99
111
  npm run build:data
100
112
 
101
113
  # Verify data integrity