@lycoristech/azurapi 0.0.1 → 0.0.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/LICENSE +1 -5
- package/data/ship-list.json +34 -34
- package/data/ships.json +2318 -2318
- package/data/version.json +1 -1
- package/dist/cjs/ingest/files.js +25 -15
- package/dist/cjs/normalize/identity.js +2 -2
- package/dist/cjs/normalize/ship.js +9 -10
- package/dist/cjs/normalize/stats.js +66 -8
- package/dist/cjs/schema/output/ship.js +1 -1
- package/dist/cjs/schema/raw/index.js +1 -0
- package/dist/cjs/schema/raw/shipDataBlueprint.js +2 -0
- package/dist/cjs/schema/raw/shipStrengthenBlueprint.js +22 -0
- package/dist/cjs/translate/enums.js +27 -17
- package/dist/ingest/files.d.ts +2 -1
- package/dist/ingest/files.d.ts.map +1 -1
- package/dist/ingest/files.js +25 -16
- package/dist/ingest/files.js.map +1 -1
- package/dist/normalize/identity.d.ts +0 -2
- package/dist/normalize/identity.d.ts.map +1 -1
- package/dist/normalize/identity.js +2 -2
- package/dist/normalize/identity.js.map +1 -1
- package/dist/normalize/ship.d.ts +2 -3
- package/dist/normalize/ship.d.ts.map +1 -1
- package/dist/normalize/ship.js +9 -10
- package/dist/normalize/ship.js.map +1 -1
- package/dist/normalize/stats.d.ts +5 -1
- package/dist/normalize/stats.d.ts.map +1 -1
- package/dist/normalize/stats.js +66 -8
- package/dist/normalize/stats.js.map +1 -1
- package/dist/schema/output/ship.d.ts +5 -5
- package/dist/schema/output/ship.js +1 -1
- package/dist/schema/output/ship.js.map +1 -1
- package/dist/schema/raw/index.d.ts +1 -0
- package/dist/schema/raw/index.d.ts.map +1 -1
- package/dist/schema/raw/index.js +1 -0
- package/dist/schema/raw/index.js.map +1 -1
- package/dist/schema/raw/shipDataBlueprint.d.ts +12 -0
- package/dist/schema/raw/shipDataBlueprint.d.ts.map +1 -1
- package/dist/schema/raw/shipDataBlueprint.js +2 -0
- package/dist/schema/raw/shipDataBlueprint.js.map +1 -1
- package/dist/schema/raw/shipStrengthenBlueprint.d.ts +46 -0
- package/dist/schema/raw/shipStrengthenBlueprint.d.ts.map +1 -0
- package/dist/schema/raw/shipStrengthenBlueprint.js +20 -0
- package/dist/schema/raw/shipStrengthenBlueprint.js.map +1 -0
- package/dist/translate/enums.d.ts +20 -10
- package/dist/translate/enums.d.ts.map +1 -1
- package/dist/translate/enums.js +27 -17
- package/dist/translate/enums.js.map +1 -1
- package/package.json +23 -1
package/dist/translate/enums.js
CHANGED
|
@@ -13,17 +13,17 @@ export const RARITY_MAP = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Resolve a rarity integer to its display string.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
|
-
* -
|
|
18
|
-
* -
|
|
19
|
-
* - else
|
|
16
|
+
* Research ships are keyed off the raw `rarity` value, not `blueprint_version`:
|
|
17
|
+
* - rarity === 5 && isResearch → "Priority"
|
|
18
|
+
* - rarity === 6 && isResearch → "Decisive"
|
|
19
|
+
* - else → RARITY_MAP[rarity] ?? "Normal"
|
|
20
20
|
*/
|
|
21
|
-
export function rarityName(rarity, isResearch
|
|
22
|
-
if (
|
|
23
|
-
if (
|
|
21
|
+
export function rarityName(rarity, isResearch) {
|
|
22
|
+
if (isResearch) {
|
|
23
|
+
if (rarity === 5)
|
|
24
|
+
return "Priority";
|
|
25
|
+
if (rarity === 6)
|
|
24
26
|
return "Decisive";
|
|
25
|
-
}
|
|
26
|
-
return "Priority";
|
|
27
27
|
}
|
|
28
28
|
return RARITY_MAP[rarity] ?? "Normal";
|
|
29
29
|
}
|
|
@@ -68,18 +68,28 @@ export function nationalityName(code) {
|
|
|
68
68
|
// Skill color
|
|
69
69
|
// ---------------------------------------------------------------------------
|
|
70
70
|
/**
|
|
71
|
-
* Skill type int →
|
|
72
|
-
*
|
|
71
|
+
* Skill type int → Azur Lane in-client border color.
|
|
72
|
+
*
|
|
73
|
+
* 1 = offensive → "red"
|
|
74
|
+
* 2 = defensive → "blue"
|
|
75
|
+
* 3 = support → "yellow"
|
|
76
|
+
* 0 = unset / placeholder (legacy passives like "Repair I") → "blue"
|
|
77
|
+
*
|
|
78
|
+
* NOTE: this corrects a long-standing AzurAPI mislabeling where the map read
|
|
79
|
+
* 1 → "yellow", 2 → "pink", 3 → "blue"
|
|
80
|
+
* — the game type numbers had been bound to the wrong category names, and
|
|
81
|
+
* the "pink" sentinel was invented to paper over type 2. Consumers relying
|
|
82
|
+
* on the old labels will now see the in-game colors instead.
|
|
73
83
|
*/
|
|
74
84
|
export const SKILL_COLOR_MAP = {
|
|
75
|
-
0: "
|
|
76
|
-
1: "
|
|
77
|
-
2: "
|
|
78
|
-
3: "
|
|
85
|
+
0: "blue",
|
|
86
|
+
1: "red",
|
|
87
|
+
2: "blue",
|
|
88
|
+
3: "yellow",
|
|
79
89
|
};
|
|
80
|
-
/** Look up a skill type color; falls back to "
|
|
90
|
+
/** Look up a skill type color; falls back to "blue" for unknown types. */
|
|
81
91
|
export function skillColor(type) {
|
|
82
|
-
return SKILL_COLOR_MAP[type] ?? "
|
|
92
|
+
return SKILL_COLOR_MAP[type] ?? "blue";
|
|
83
93
|
}
|
|
84
94
|
// ---------------------------------------------------------------------------
|
|
85
95
|
// Stat index map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/translate/enums.ts"],"names":[],"mappings":"AAEA,8EAA8E;AAC9E,SAAS;AACT,8EAA8E;AAE9E,kDAAkD;AAClD,MAAM,CAAC,MAAM,UAAU,GAA8E;IACnG,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,YAAY;IACf,CAAC,EAAE,YAAY;CAChB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/translate/enums.ts"],"names":[],"mappings":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IACb,CAAC,EAAE,SAAS;IACZ,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,SAAS;CACd,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lycoristech/azurapi",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -34,6 +34,28 @@
|
|
|
34
34
|
"typescript": "^5.8.3",
|
|
35
35
|
"vitest": "^3.1.1"
|
|
36
36
|
},
|
|
37
|
+
"description": "Azur Lane local database API with full ship, equipment, and chapter data",
|
|
38
|
+
"keywords": [
|
|
39
|
+
"azurlane",
|
|
40
|
+
"azur-lane",
|
|
41
|
+
"azur",
|
|
42
|
+
"lane",
|
|
43
|
+
"api",
|
|
44
|
+
"database",
|
|
45
|
+
"shipgirls",
|
|
46
|
+
"gacha",
|
|
47
|
+
"waifu"
|
|
48
|
+
],
|
|
49
|
+
"homepage": "https://github.com/iujab/AzurAPI#readme",
|
|
50
|
+
"repository": {
|
|
51
|
+
"type": "git",
|
|
52
|
+
"url": "git+https://github.com/iujab/AzurAPI.git"
|
|
53
|
+
},
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/iujab/AzurAPI/issues"
|
|
56
|
+
},
|
|
57
|
+
"license": "MIT",
|
|
58
|
+
"author": "",
|
|
37
59
|
"publishConfig": {
|
|
38
60
|
"access": "public"
|
|
39
61
|
}
|