lol-constants 0.9.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Constants/ChampionIds.d.ts +162 -0
- package/dist/Constants/ChampionIds.js +4 -0
- package/dist/Constants/ChampionIdsByName.d.ts +162 -0
- package/dist/Constants/ChampionIdsByName.js +4 -0
- package/dist/Constants/ChampionKeys.d.ts +162 -2
- package/dist/Constants/ChampionKeys.js +1 -5
- package/dist/Constants/ChampionNames.d.ts +162 -2
- package/dist/Constants/ChampionNames.js +1 -5
- package/dist/Constants/DDPaths.d.ts +27 -5
- package/dist/Constants/DDPaths.js +29 -7
- package/dist/Constants/ItemKeys.d.ts +250 -2
- package/dist/Constants/ItemKeys.js +1 -5
- package/dist/Constants/ItemNames.d.ts +256 -2
- package/dist/Constants/ItemNames.js +1 -5
- package/dist/Constants/RuneIds.d.ts +74 -2
- package/dist/Constants/RuneIds.js +1 -9
- package/dist/Constants/RuneNames.d.ts +74 -2
- package/dist/Constants/RuneNames.js +1 -5
- package/dist/Constants/RuneSets.d.ts +77 -0
- package/dist/Constants/RuneSets.js +210 -0
- package/dist/Constants/SpellIds.d.ts +18 -0
- package/dist/Constants/SpellIds.js +4 -0
- package/dist/Constants/SpellIdsByName.d.ts +17 -0
- package/dist/Constants/SpellIdsByName.js +4 -0
- package/dist/Constants/SpellKeys.d.ts +18 -0
- package/dist/Constants/SpellKeys.js +4 -0
- package/dist/Constants/SpellNames.d.ts +18 -0
- package/dist/Constants/SpellNames.js +4 -0
- package/dist/Constants/StatRuneIds.d.ts +11 -2
- package/dist/Constants/StatRuneIds.js +1 -2
- package/dist/Constants/StatRuneNames.d.ts +11 -2
- package/dist/Constants/StatRuneNames.js +1 -2
- package/dist/Constants/TreeRuneIds.d.ts +65 -2
- package/dist/Constants/TreeRuneIds.js +1 -5
- package/dist/Constants/TreeRuneNames.d.ts +65 -2
- package/dist/Constants/TreeRuneNames.js +1 -5
- package/dist/Helpers/getChampionIdByKey.d.ts +2 -0
- package/dist/Helpers/getChampionIdByKey.js +8 -0
- package/dist/Helpers/getChampionIdByName.d.ts +2 -0
- package/dist/Helpers/getChampionIdByName.js +8 -0
- package/dist/Helpers/getChampionKeyById.d.ts +2 -0
- package/dist/Helpers/getChampionKeyById.js +8 -0
- package/dist/Helpers/getChampionKeyByName.js +3 -5
- package/dist/Helpers/getChampionNameById.d.ts +2 -0
- package/dist/Helpers/getChampionNameById.js +9 -0
- package/dist/Helpers/getChampionNameByKey.js +2 -5
- package/dist/Helpers/getItemKeyByName.js +2 -5
- package/dist/Helpers/getItemNameByKey.js +2 -5
- package/dist/Helpers/getRuneIdByName.js +2 -15
- package/dist/Helpers/getRuneNameById.js +2 -9
- package/dist/Helpers/getSpellIdByKey.d.ts +2 -0
- package/dist/Helpers/getSpellIdByKey.js +8 -0
- package/dist/Helpers/getSpellIdByName.d.ts +2 -0
- package/dist/Helpers/getSpellIdByName.js +8 -0
- package/dist/Helpers/getSpellKeyById.d.ts +2 -0
- package/dist/Helpers/getSpellKeyById.js +8 -0
- package/dist/Helpers/getSpellKeyByName.d.ts +2 -0
- package/dist/Helpers/getSpellKeyByName.js +9 -0
- package/dist/Helpers/getSpellNameById.d.ts +2 -0
- package/dist/Helpers/getSpellNameById.js +9 -0
- package/dist/Helpers/getSpellNameByKey.d.ts +2 -0
- package/dist/Helpers/getSpellNameByKey.js +8 -0
- package/dist/Helpers/getStatRuneIdByName.d.ts +2 -0
- package/dist/Helpers/getStatRuneIdByName.js +8 -0
- package/dist/Helpers/getStatRuneNameById.d.ts +2 -0
- package/dist/Helpers/getStatRuneNameById.js +8 -0
- package/dist/Helpers/getTreeRuneIdByName.d.ts +2 -0
- package/dist/Helpers/getTreeRuneIdByName.js +8 -0
- package/dist/Helpers/getTreeRuneNameById.d.ts +2 -0
- package/dist/Helpers/getTreeRuneNameById.js +8 -0
- package/dist/Helpers/isChampionId.d.ts +2 -0
- package/dist/Helpers/isChampionId.js +8 -0
- package/dist/Helpers/isChampionKey.d.ts +1 -1
- package/dist/Helpers/isChampionKey.js +2 -4
- package/dist/Helpers/isChampionName.d.ts +1 -1
- package/dist/Helpers/isChampionName.js +2 -4
- package/dist/Helpers/isItemKey.d.ts +1 -1
- package/dist/Helpers/isItemKey.js +2 -4
- package/dist/Helpers/isItemName.d.ts +1 -1
- package/dist/Helpers/isItemName.js +2 -4
- package/dist/Helpers/isRuneId.d.ts +1 -1
- package/dist/Helpers/isRuneId.js +2 -4
- package/dist/Helpers/isRuneName.d.ts +1 -1
- package/dist/Helpers/isRuneName.js +2 -4
- package/dist/Helpers/isSpellId.d.ts +2 -0
- package/dist/Helpers/isSpellId.js +8 -0
- package/dist/Helpers/isSpellKey.d.ts +2 -0
- package/dist/Helpers/isSpellKey.js +8 -0
- package/dist/Helpers/isSpellName.d.ts +2 -0
- package/dist/Helpers/isSpellName.js +8 -0
- package/dist/Helpers/isStatRuneId.d.ts +1 -1
- package/dist/Helpers/isStatRuneId.js +2 -4
- package/dist/Helpers/isStatRuneName.d.ts +1 -1
- package/dist/Helpers/isStatRuneName.js +2 -4
- package/dist/Helpers/isTreeRuneId.d.ts +1 -1
- package/dist/Helpers/isTreeRuneId.js +2 -4
- package/dist/Helpers/isTreeRuneName.d.ts +1 -1
- package/dist/Helpers/isTreeRuneName.js +2 -4
- package/dist/{Constants → assets}/StatRunes.d.ts +0 -0
- package/dist/{Constants → assets}/StatRunes.js +0 -0
- package/dist/assets/champion.json +1 -1
- package/dist/assets/index.d.ts +17216 -0
- package/dist/assets/index.js +17 -0
- package/dist/assets/item.json +1 -1
- package/dist/assets/runesReforged.json +1 -1
- package/dist/assets/summoner.json +1 -1
- package/dist/index.d.ts +25 -43394
- package/dist/index.js +80 -46
- package/dist/scripts/Helpers/getExportStatement.d.ts +6 -0
- package/dist/scripts/Helpers/getExportStatement.js +10 -0
- package/dist/scripts/generate-all.d.ts +16 -1
- package/dist/scripts/generate-all.js +16 -17
- package/dist/scripts/generate-champion-ids-by-name.d.ts +1 -0
- package/dist/{Helpers/generateChampionsByKey.js → scripts/generate-champion-ids-by-name.js} +9 -11
- package/dist/scripts/generate-champion-ids.d.ts +1 -0
- package/dist/{Helpers/generateChampionsByName.js → scripts/generate-champion-ids.js} +9 -11
- package/dist/scripts/generate-champion-keys.d.ts +1 -0
- package/dist/scripts/generate-champion-keys.js +20 -0
- package/dist/scripts/generate-champion-names.d.ts +1 -0
- package/dist/scripts/generate-champion-names.js +20 -0
- package/dist/scripts/generate-item-keys.d.ts +1 -0
- package/dist/scripts/generate-item-keys.js +21 -0
- package/dist/scripts/generate-item-names.d.ts +1 -0
- package/dist/scripts/generate-item-names.js +21 -0
- package/dist/scripts/generate-rune-ids.d.ts +1 -0
- package/dist/scripts/generate-rune-ids.js +29 -0
- package/dist/scripts/generate-rune-names.d.ts +1 -0
- package/dist/scripts/generate-rune-names.js +29 -0
- package/dist/scripts/generate-spell-ids-by-name.d.ts +1 -0
- package/dist/scripts/generate-spell-ids-by-name.js +20 -0
- package/dist/scripts/generate-spell-ids.d.ts +1 -0
- package/dist/scripts/generate-spell-ids.js +20 -0
- package/dist/scripts/generate-spell-keys.d.ts +1 -0
- package/dist/scripts/generate-spell-keys.js +20 -0
- package/dist/scripts/generate-spell-names.d.ts +1 -0
- package/dist/scripts/generate-spell-names.js +20 -0
- package/dist/scripts/generate-stat-rune-ids.d.ts +1 -0
- package/dist/scripts/generate-stat-rune-ids.js +20 -0
- package/dist/scripts/generate-stat-rune-names.d.ts +1 -0
- package/dist/scripts/generate-stat-rune-names.js +20 -0
- package/dist/scripts/generate-tree-rune-ids.d.ts +1 -0
- package/dist/{Helpers/generateRunesById.js → scripts/generate-tree-rune-ids.js} +9 -7
- package/dist/scripts/generate-tree-rune-names.d.ts +1 -0
- package/dist/{Helpers/generateRunesByName.js → scripts/generate-tree-rune-names.js} +9 -7
- package/dist/types/Meta.d.ts +32 -6
- package/dist/types/index.d.ts +164 -26
- package/package.json +2 -2
- package/dist/Constants/SummonerIds.d.ts +0 -2
- package/dist/Constants/SummonerIds.js +0 -8
- package/dist/Constants/SummonerKeys.d.ts +0 -2
- package/dist/Constants/SummonerKeys.js +0 -8
- package/dist/Constants/SummonerNames.d.ts +0 -2
- package/dist/Constants/SummonerNames.js +0 -8
- package/dist/Constants/SummonerSpellIds.d.ts +0 -2
- package/dist/Constants/SummonerSpellIds.js +0 -8
- package/dist/Constants/SummonerSpellKeys.d.ts +0 -2
- package/dist/Constants/SummonerSpellKeys.js +0 -8
- package/dist/Constants/SummonerSpellNames.d.ts +0 -2
- package/dist/Constants/SummonerSpellNames.js +0 -8
- package/dist/Helpers/generateChampionsByKey.d.ts +0 -1
- package/dist/Helpers/generateChampionsByName.d.ts +0 -1
- package/dist/Helpers/generateItemsByName.d.ts +0 -1
- package/dist/Helpers/generateItemsByName.js +0 -25
- package/dist/Helpers/generateRunesById.d.ts +0 -1
- package/dist/Helpers/generateRunesByName.d.ts +0 -1
- package/dist/Helpers/generateSummonerSpellsByKey.d.ts +0 -1
- package/dist/Helpers/generateSummonerSpellsByKey.js +0 -24
- package/dist/Helpers/generateSummonerSpellsByName.d.ts +0 -1
- package/dist/Helpers/generateSummonerSpellsByName.js +0 -24
- package/dist/Helpers/generateSummonersByKey.d.ts +0 -1
- package/dist/Helpers/generateSummonersByKey.js +0 -24
- package/dist/Helpers/generateSummonersByName.d.ts +0 -1
- package/dist/Helpers/generateSummonersByName.js +0 -24
- package/dist/Helpers/getSummonerSpellKeyByName.d.ts +0 -2
- package/dist/Helpers/getSummonerSpellKeyByName.js +0 -11
- package/dist/Helpers/getSummonerSpellNameByKey.d.ts +0 -2
- package/dist/Helpers/getSummonerSpellNameByKey.js +0 -11
- package/dist/Helpers/isSummonerId.d.ts +0 -2
- package/dist/Helpers/isSummonerId.js +0 -10
- package/dist/Helpers/isSummonerKey.d.ts +0 -2
- package/dist/Helpers/isSummonerKey.js +0 -10
- package/dist/Helpers/isSummonerName.d.ts +0 -2
- package/dist/Helpers/isSummonerName.js +0 -10
- package/dist/Helpers/isSummonerSpellId.d.ts +0 -2
- package/dist/Helpers/isSummonerSpellId.js +0 -10
- package/dist/Helpers/isSummonerSpellKey.d.ts +0 -2
- package/dist/Helpers/isSummonerSpellKey.js +0 -10
- package/dist/Helpers/isSummonerSpellName.d.ts +0 -2
- package/dist/Helpers/isSummonerSpellName.js +0 -10
- package/dist/generated/championByKey.json +0 -1
- package/dist/generated/championByName.json +0 -1
- package/dist/generated/itemByKey.json +0 -1
- package/dist/generated/itemByName.json +0 -1
- package/dist/generated/runesById.json +0 -1
- package/dist/generated/runesByName.json +0 -1
- package/dist/generated/summonerByKey.json +0 -1
- package/dist/generated/summonerByName.json +0 -1
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
const fs_1 = __importDefault(require("fs"));
|
7
|
+
const StatRunes_1 = require("../assets/StatRunes");
|
8
|
+
const getExportStatement_1 = require("./Helpers/getExportStatement");
|
9
|
+
(async () => {
|
10
|
+
const runeIds = {};
|
11
|
+
// Add Stat Runes
|
12
|
+
let statRuneId;
|
13
|
+
for (statRuneId in StatRunes_1.StatRunes) {
|
14
|
+
const statRuneName = StatRunes_1.StatRunes[statRuneId];
|
15
|
+
runeIds[statRuneName] = statRuneId;
|
16
|
+
}
|
17
|
+
// Write to file
|
18
|
+
const constName = 'StatRuneIds';
|
19
|
+
fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, runeIds));
|
20
|
+
})();
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
const fs_1 = __importDefault(require("fs"));
|
7
|
+
const StatRunes_1 = require("../assets/StatRunes");
|
8
|
+
const getExportStatement_1 = require("./Helpers/getExportStatement");
|
9
|
+
(async () => {
|
10
|
+
const runeIds = {};
|
11
|
+
// Add Stat Runes
|
12
|
+
let statRuneId;
|
13
|
+
for (statRuneId in StatRunes_1.StatRunes) {
|
14
|
+
const statRuneName = StatRunes_1.StatRunes[statRuneId];
|
15
|
+
runeIds[statRuneId] = statRuneName;
|
16
|
+
}
|
17
|
+
// Write to file
|
18
|
+
const constName = 'StatRuneNames';
|
19
|
+
fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, runeIds));
|
20
|
+
})();
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -3,18 +3,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.generateRunesById = void 0;
|
7
6
|
const fs_1 = __importDefault(require("fs"));
|
8
7
|
const runesReforged_json_1 = __importDefault(require("../assets/runesReforged.json"));
|
9
|
-
|
10
|
-
|
8
|
+
const getExportStatement_1 = require("./Helpers/getExportStatement");
|
9
|
+
(async () => {
|
10
|
+
const runeIds = {};
|
11
|
+
// Construct the new data and assign it to product object
|
11
12
|
for (const runeTree of runesReforged_json_1.default) {
|
12
13
|
for (const { runes } of runeTree.slots) {
|
13
14
|
for (const rune of runes) {
|
14
|
-
|
15
|
+
runeIds[rune.name] = String(rune.id);
|
15
16
|
}
|
16
17
|
}
|
17
18
|
}
|
18
|
-
|
19
|
-
|
20
|
-
|
19
|
+
// Write to file
|
20
|
+
const constName = 'TreeRuneIds';
|
21
|
+
fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, runeIds));
|
22
|
+
})();
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -3,18 +3,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.generateRunesByName = void 0;
|
7
6
|
const fs_1 = __importDefault(require("fs"));
|
8
7
|
const runesReforged_json_1 = __importDefault(require("../assets/runesReforged.json"));
|
9
|
-
|
10
|
-
|
8
|
+
const getExportStatement_1 = require("./Helpers/getExportStatement");
|
9
|
+
(async () => {
|
10
|
+
const runeIds = {};
|
11
|
+
// Construct the new data and assign it to product object
|
11
12
|
for (const runeTree of runesReforged_json_1.default) {
|
12
13
|
for (const { runes } of runeTree.slots) {
|
13
14
|
for (const rune of runes) {
|
14
|
-
|
15
|
+
runeIds[rune.id] = rune.name;
|
15
16
|
}
|
16
17
|
}
|
17
18
|
}
|
18
|
-
|
19
|
-
|
20
|
-
|
19
|
+
// Write to file
|
20
|
+
const constName = 'TreeRuneNames';
|
21
|
+
fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, runeIds));
|
22
|
+
})();
|
package/dist/types/Meta.d.ts
CHANGED
@@ -1,12 +1,38 @@
|
|
1
|
-
export declare type
|
2
|
-
export declare type
|
3
|
-
export declare type
|
4
|
-
export declare type
|
5
|
-
export declare type
|
1
|
+
export declare type Role = 'NONE' | 'SOLO' | 'CARRY' | 'SUPPORT';
|
2
|
+
export declare type Queue = 'RANKED_SOLO_5x5' | 'RANKED_FLEX_SR';
|
3
|
+
export declare type LeaguesTier = 'CHALLENGER' | 'GRANDMASTER' | 'MASTER' | 'DIAMOND' | 'PLATINUM' | 'GOLD' | 'SILVER' | 'BRONZE' | 'IRON';
|
4
|
+
export declare type LeaguesRank = 'I' | 'II' | 'III' | 'IV';
|
5
|
+
export declare type GameType = 'CUSTOM_GAME' | 'TUTORIAL_GAME' | 'MATCHED_GAME';
|
6
|
+
export declare type GameMode = 'CLASSIC' | 'ARAM' | 'TUTORIAL' | 'URF' | 'ONEFORALL' | 'KINGPORO' | 'GAMEMODEX' | 'ULTBOOK';
|
6
7
|
export declare type PlatformId = 'BR1' | 'EUN1' | 'EUW1' | 'JP1' | 'KR' | 'LA1' | 'LA2' | 'NA1' | 'OC1' | 'TR1' | 'RU';
|
7
8
|
export declare type Region = 'EUW' | 'EUNE' | 'NA' | 'KR' | 'JP' | 'OCE' | 'LAN' | 'LAS' | 'TR' | 'RU' | 'BR';
|
9
|
+
/**
|
10
|
+
* 0 — Custom games
|
11
|
+
* 400 — 5v5 Draft Pick games
|
12
|
+
* 420 — 5v5 Ranked Solo games
|
13
|
+
* 430 — 5v5 Blind Pick games
|
14
|
+
* 440 — 5v5 Ranked Flex games
|
15
|
+
* 450 — 5v5 ARAM games
|
16
|
+
* 700 — Clash games
|
17
|
+
* 900 — ARURF games
|
18
|
+
* 920 — Legend of the Poro King games
|
19
|
+
* 1020 — One for All games
|
20
|
+
* 1090 — Teamfight Tactics games
|
21
|
+
* 1100 — Ranked Teamfight Tactics games
|
22
|
+
* 1110 — Teamfight Tactics Tutorial games
|
23
|
+
* 1111 — Teamfight Tactics test games
|
24
|
+
* 1300 — Nexus Blitz games
|
25
|
+
* 1400 — Ultimate Spellbook games
|
26
|
+
* 1900 — Pick URF games
|
27
|
+
*/
|
8
28
|
export declare type QueueId = 0 | 400 | 420 | 430 | 440 | 450 | 700 | 900 | 920 | 1020 | 1090 | 1100 | 1110 | 1111 | 1300 | 1400 | 1900;
|
29
|
+
/**
|
30
|
+
* 11 — Summoner's Rift
|
31
|
+
* 12 — Howling Abyss
|
32
|
+
* 21 — Nexus Blitz
|
33
|
+
* 22 — Convergence
|
34
|
+
*/
|
9
35
|
export declare type MapId = 11 | 12 | 21 | 22;
|
10
36
|
export declare type TeamId = 100 | 200;
|
11
37
|
export declare type ParticipantId = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
|
12
|
-
export declare type
|
38
|
+
export declare type WardType = 'UNDEFINED' | 'YELLOW_TRINKET' | 'CONTROL_WARD';
|
package/dist/types/index.d.ts
CHANGED
@@ -1,30 +1,168 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import {
|
10
|
-
import
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
export declare type
|
17
|
-
export declare type
|
18
|
-
export declare type
|
19
|
-
export declare type
|
20
|
-
export declare type
|
21
|
-
export declare type
|
22
|
-
export declare type
|
23
|
-
export declare type
|
1
|
+
import { RuneSets } from '../Constants/RuneSets';
|
2
|
+
import { ChampionIds } from '../Constants/ChampionIds';
|
3
|
+
import { ChampionKeys } from '../Constants/ChampionKeys';
|
4
|
+
import { ChampionNames } from '../Constants/ChampionNames';
|
5
|
+
import { ItemKeys } from '../Constants/ItemKeys';
|
6
|
+
import { ItemNames } from '../Constants/ItemNames';
|
7
|
+
import { SpellIds } from '../Constants/SpellIds';
|
8
|
+
import { SpellKeys } from '../Constants/SpellKeys';
|
9
|
+
import { SpellNames } from '../Constants/SpellNames';
|
10
|
+
import { RuneIds } from '../Constants/RuneIds';
|
11
|
+
import { RuneNames } from '../Constants/RuneNames';
|
12
|
+
import { StatRuneIds } from '../Constants/StatRuneIds';
|
13
|
+
import { StatRuneNames } from '../Constants/StatRuneNames';
|
14
|
+
import { TreeRuneIds } from '../Constants/TreeRuneIds';
|
15
|
+
import { TreeRuneNames } from '../Constants/TreeRuneNames';
|
16
|
+
export declare type ChampionId = typeof ChampionIds[keyof typeof ChampionIds];
|
17
|
+
export declare type ChampionKey = typeof ChampionKeys[keyof typeof ChampionKeys];
|
18
|
+
export declare type ChampionName = typeof ChampionNames[keyof typeof ChampionNames];
|
19
|
+
export declare type ItemKey = typeof ItemKeys[keyof typeof ItemKeys];
|
20
|
+
export declare type ItemName = typeof ItemNames[keyof typeof ItemNames];
|
21
|
+
export declare type SpellId = typeof SpellIds[keyof typeof SpellIds];
|
22
|
+
export declare type SpellKey = typeof SpellKeys[keyof typeof SpellKeys];
|
23
|
+
export declare type SpellName = typeof SpellNames[keyof typeof SpellNames];
|
24
|
+
/**
|
25
|
+
* There are 3 main Rune ID types:
|
26
|
+
* - `RuneId` (all),
|
27
|
+
* - `TreeRuneId` (all but stat runes),
|
28
|
+
* - `StatRuneId` (only stat runes).
|
29
|
+
*
|
30
|
+
* There are 6 more specific Rune ID types as well:
|
31
|
+
* - `KeystoneRuneId`,
|
32
|
+
* - `PrecisionTreeRuneId`,
|
33
|
+
* - `DominationTreeRuneId`,
|
34
|
+
* - `SorceryTreeRuneId`,
|
35
|
+
* - `ResolveTreeRuneId`,
|
36
|
+
* - `InspirationTreeRuneId`,
|
37
|
+
*/
|
38
|
+
export declare type RuneId = typeof RuneIds[keyof typeof RuneIds];
|
39
|
+
export declare type RuneName = typeof RuneNames[keyof typeof RuneNames];
|
40
|
+
/**
|
41
|
+
* There are 3 main Rune ID types:
|
42
|
+
* - `RuneId` (all),
|
43
|
+
* - `TreeRuneId` (all but stat runes),
|
44
|
+
* - `StatRuneId` (only stat runes).
|
45
|
+
*
|
46
|
+
* There are 6 more specific Rune ID types as well:
|
47
|
+
* - `KeystoneRuneId`,
|
48
|
+
* - `PrecisionTreeRuneId`,
|
49
|
+
* - `DominationTreeRuneId`,
|
50
|
+
* - `SorceryTreeRuneId`,
|
51
|
+
* - `ResolveTreeRuneId`,
|
52
|
+
* - `InspirationTreeRuneId`,
|
53
|
+
*/
|
54
|
+
export declare type TreeRuneId = typeof TreeRuneIds[keyof typeof TreeRuneIds];
|
55
|
+
export declare type TreeRuneName = typeof TreeRuneNames[keyof typeof TreeRuneNames];
|
56
|
+
/**
|
57
|
+
* There are 3 main Rune ID types:
|
58
|
+
* - `RuneId` (all),
|
59
|
+
* - `TreeRuneId` (all but stat runes),
|
60
|
+
* - `StatRuneId` (only stat runes).
|
61
|
+
*
|
62
|
+
* There are 6 more specific Rune ID types as well:
|
63
|
+
* - `KeystoneRuneId`,
|
64
|
+
* - `PrecisionTreeRuneId`,
|
65
|
+
* - `DominationTreeRuneId`,
|
66
|
+
* - `SorceryTreeRuneId`,
|
67
|
+
* - `ResolveTreeRuneId`,
|
68
|
+
* - `InspirationTreeRuneId`,
|
69
|
+
*/
|
70
|
+
export declare type StatRuneId = typeof StatRuneIds[keyof typeof StatRuneIds];
|
71
|
+
export declare type StatRuneName = typeof StatRuneNames[keyof typeof StatRuneNames];
|
72
|
+
/**
|
73
|
+
* There are 3 main Rune ID types:
|
74
|
+
* - `RuneId` (all),
|
75
|
+
* - `TreeRuneId` (all but stat runes),
|
76
|
+
* - `StatRuneId` (only stat runes).
|
77
|
+
*
|
78
|
+
* There are 6 more specific Rune ID types as well:
|
79
|
+
* - `KeystoneRuneId`,
|
80
|
+
* - `PrecisionTreeRuneId`,
|
81
|
+
* - `DominationTreeRuneId`,
|
82
|
+
* - `SorceryTreeRuneId`,
|
83
|
+
* - `ResolveTreeRuneId`,
|
84
|
+
* - `InspirationTreeRuneId`,
|
85
|
+
*/
|
86
|
+
export declare type KeystoneRuneId = Extract<typeof RuneSets.Keystones[keyof typeof RuneSets.Keystones], string>;
|
87
|
+
/**
|
88
|
+
* There are 3 main Rune ID types:
|
89
|
+
* - `RuneId` (all),
|
90
|
+
* - `TreeRuneId` (all but stat runes),
|
91
|
+
* - `StatRuneId` (only stat runes).
|
92
|
+
*
|
93
|
+
* There are 6 more specific Rune ID types as well:
|
94
|
+
* - `KeystoneRuneId`,
|
95
|
+
* - `PrecisionTreeRuneId`,
|
96
|
+
* - `DominationTreeRuneId`,
|
97
|
+
* - `SorceryTreeRuneId`,
|
98
|
+
* - `ResolveTreeRuneId`,
|
99
|
+
* - `InspirationTreeRuneId`,
|
100
|
+
*/
|
101
|
+
export declare type PrecisionTreeRuneId = Extract<typeof RuneSets.PrimaryTrees.Precision[keyof typeof RuneSets.PrimaryTrees.Precision], string>;
|
102
|
+
/**
|
103
|
+
* There are 3 main Rune ID types:
|
104
|
+
* - `RuneId` (all),
|
105
|
+
* - `TreeRuneId` (all but stat runes),
|
106
|
+
* - `StatRuneId` (only stat runes).
|
107
|
+
*
|
108
|
+
* There are 6 more specific Rune ID types as well:
|
109
|
+
* - `KeystoneRuneId`,
|
110
|
+
* - `PrecisionTreeRuneId`,
|
111
|
+
* - `DominationTreeRuneId`,
|
112
|
+
* - `SorceryTreeRuneId`,
|
113
|
+
* - `ResolveTreeRuneId`,
|
114
|
+
* - `InspirationTreeRuneId`,
|
115
|
+
*/
|
116
|
+
export declare type DominationTreeRuneId = Extract<typeof RuneSets.PrimaryTrees.Domination[keyof typeof RuneSets.PrimaryTrees.Domination], string>;
|
117
|
+
/**
|
118
|
+
* There are 3 main Rune ID types:
|
119
|
+
* - `RuneId` (all),
|
120
|
+
* - `TreeRuneId` (all but stat runes),
|
121
|
+
* - `StatRuneId` (only stat runes).
|
122
|
+
*
|
123
|
+
* There are 6 more specific Rune ID types as well:
|
124
|
+
* - `KeystoneRuneId`,
|
125
|
+
* - `PrecisionTreeRuneId`,
|
126
|
+
* - `DominationTreeRuneId`,
|
127
|
+
* - `SorceryTreeRuneId`,
|
128
|
+
* - `ResolveTreeRuneId`,
|
129
|
+
* - `InspirationTreeRuneId`,
|
130
|
+
*/
|
131
|
+
export declare type SorceryTreeRuneId = Extract<typeof RuneSets.PrimaryTrees.Sorcery[keyof typeof RuneSets.PrimaryTrees.Sorcery], string>;
|
132
|
+
/**
|
133
|
+
* There are 3 main Rune ID types:
|
134
|
+
* - `RuneId` (all),
|
135
|
+
* - `TreeRuneId` (all but stat runes),
|
136
|
+
* - `StatRuneId` (only stat runes).
|
137
|
+
*
|
138
|
+
* There are 6 more specific Rune ID types as well:
|
139
|
+
* - `KeystoneRuneId`,
|
140
|
+
* - `PrecisionTreeRuneId`,
|
141
|
+
* - `DominationTreeRuneId`,
|
142
|
+
* - `SorceryTreeRuneId`,
|
143
|
+
* - `ResolveTreeRuneId`,
|
144
|
+
* - `InspirationTreeRuneId`,
|
145
|
+
*/
|
146
|
+
export declare type ResolveTreeRuneId = Extract<typeof RuneSets.PrimaryTrees.Resolve[keyof typeof RuneSets.PrimaryTrees.Resolve], string>;
|
147
|
+
/**
|
148
|
+
* There are 3 main Rune ID types:
|
149
|
+
* - `RuneId` (all),
|
150
|
+
* - `TreeRuneId` (all but stat runes),
|
151
|
+
* - `StatRuneId` (only stat runes).
|
152
|
+
*
|
153
|
+
* There are 6 more specific Rune ID types as well:
|
154
|
+
* - `KeystoneRuneId`,
|
155
|
+
* - `PrecisionTreeRuneId`,
|
156
|
+
* - `DominationTreeRuneId`,
|
157
|
+
* - `SorceryTreeRuneId`,
|
158
|
+
* - `ResolveTreeRuneId`,
|
159
|
+
* - `InspirationTreeRuneId`,
|
160
|
+
*/
|
161
|
+
export declare type InspirationTreeRuneId = Extract<typeof RuneSets.PrimaryTrees.Inspiration[keyof typeof RuneSets.PrimaryTrees.Inspiration], string>;
|
24
162
|
export declare type XP = number;
|
25
163
|
export declare type Minute = number;
|
26
|
-
export declare type
|
27
|
-
export declare type
|
28
|
-
export declare type
|
164
|
+
export declare type Position = 'TOP' | 'JUNGLE' | 'MIDDLE' | 'BOTTOM' | 'UTILITY';
|
165
|
+
export declare type Lane = 'TOP' | 'JUNGLE' | 'MIDDLE' | 'BOTTOM';
|
166
|
+
export declare type RuneTreeName = 'Precision' | 'Domination' | 'Sorcery' | 'Resolve' | 'Inspiration';
|
29
167
|
export declare type Level = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18;
|
30
168
|
export declare type Skill = 'Q' | 'W' | 'E' | 'R';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "lol-constants",
|
3
|
-
"version": "0.
|
3
|
+
"version": "1.0.0",
|
4
4
|
"description": "League of Legends constants and data resources, such as champion, item, runes reforged, summoner spells.",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -13,7 +13,7 @@
|
|
13
13
|
"publish-new-major": "tsc && npm version major && npm publish",
|
14
14
|
"publish-new-minor": "tsc && npm version minor && npm publish",
|
15
15
|
"publish-new-patch": "tsc && npm version patch && npm publish",
|
16
|
-
"generate": "node dist/scripts/generate-all
|
16
|
+
"generate": "node dist/scripts/generate-all"
|
17
17
|
},
|
18
18
|
"devDependencies": {
|
19
19
|
"@types/node": "^17.0.42"
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.SummonerIds = void 0;
|
7
|
-
const summoner_json_1 = __importDefault(require("../assets/summoner.json"));
|
8
|
-
exports.SummonerIds = (Object.keys(summoner_json_1.default.data).map(id => id));
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.SummonerKeys = void 0;
|
7
|
-
const summonerByKey_json_1 = __importDefault(require("../generated/summonerByKey.json"));
|
8
|
-
exports.SummonerKeys = (Object.keys(summonerByKey_json_1.default.data).map(key => key));
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.SummonerNames = void 0;
|
7
|
-
const summonerByName_json_1 = __importDefault(require("../generated/summonerByName.json"));
|
8
|
-
exports.SummonerNames = (Object.keys(summonerByName_json_1.default.data).map(name => name));
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.SummonerSpellIds = void 0;
|
7
|
-
const summoner_json_1 = __importDefault(require("../assets/summoner.json"));
|
8
|
-
exports.SummonerSpellIds = (Object.keys(summoner_json_1.default.data).map(id => id));
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.SummonerSpellKeys = void 0;
|
7
|
-
const summonerByKey_json_1 = __importDefault(require("../generated/summonerByKey.json"));
|
8
|
-
exports.SummonerSpellKeys = (Object.keys(summonerByKey_json_1.default.data).map(key => key));
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.SummonerSpellNames = void 0;
|
7
|
-
const summonerByName_json_1 = __importDefault(require("../generated/summonerByName.json"));
|
8
|
-
exports.SummonerSpellNames = (Object.keys(summonerByName_json_1.default.data).map(name => name));
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function generateChampionsByKey(): void;
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function generateChampionsByName(): void;
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function generateItemsByName(): void;
|
@@ -1,25 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.generateItemsByName = void 0;
|
7
|
-
const fs_1 = __importDefault(require("fs"));
|
8
|
-
const item_json_1 = __importDefault(require("../assets/item.json"));
|
9
|
-
function generateItemsByName() {
|
10
|
-
const itemByName = {
|
11
|
-
data: {},
|
12
|
-
version: '',
|
13
|
-
};
|
14
|
-
let itemKey;
|
15
|
-
for (itemKey in item_json_1.default.data) {
|
16
|
-
const itemData = item_json_1.default.data[itemKey];
|
17
|
-
itemByName.data[itemData.name] = {
|
18
|
-
...itemData,
|
19
|
-
key: itemKey,
|
20
|
-
};
|
21
|
-
}
|
22
|
-
itemByName.version = item_json_1.default.version;
|
23
|
-
fs_1.default.writeFileSync(`src/generated/itemByName.json`, JSON.stringify(itemByName));
|
24
|
-
}
|
25
|
-
exports.generateItemsByName = generateItemsByName;
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function generateRunesById(): void;
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function generateRunesByName(): void;
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function generateSummonerSpellsByKey(): void;
|
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.generateSummonerSpellsByKey = void 0;
|
7
|
-
const fs_1 = __importDefault(require("fs"));
|
8
|
-
const summoner_json_1 = __importDefault(require("../assets/summoner.json"));
|
9
|
-
function generateSummonerSpellsByKey() {
|
10
|
-
const summonersByKey = {
|
11
|
-
data: {},
|
12
|
-
version: '',
|
13
|
-
};
|
14
|
-
let summonerId;
|
15
|
-
for (summonerId in summoner_json_1.default.data) {
|
16
|
-
const summonerData = summoner_json_1.default.data[summonerId];
|
17
|
-
summonersByKey.data[summonerData.key] = {
|
18
|
-
...summonerData,
|
19
|
-
};
|
20
|
-
}
|
21
|
-
summonersByKey.version = summoner_json_1.default.version;
|
22
|
-
fs_1.default.writeFileSync(`src/generated/summonerByKey.json`, JSON.stringify(summonersByKey));
|
23
|
-
}
|
24
|
-
exports.generateSummonerSpellsByKey = generateSummonerSpellsByKey;
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function generateSummonerSpellsByName(): void;
|
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.generateSummonerSpellsByName = void 0;
|
7
|
-
const fs_1 = __importDefault(require("fs"));
|
8
|
-
const summoner_json_1 = __importDefault(require("../assets/summoner.json"));
|
9
|
-
function generateSummonerSpellsByName() {
|
10
|
-
const summonersByName = {
|
11
|
-
data: {},
|
12
|
-
version: '',
|
13
|
-
};
|
14
|
-
let summonerId;
|
15
|
-
for (summonerId in summoner_json_1.default.data) {
|
16
|
-
const summonerData = summoner_json_1.default.data[summonerId];
|
17
|
-
summonersByName.data[summonerData.name] = {
|
18
|
-
...summonerData,
|
19
|
-
};
|
20
|
-
}
|
21
|
-
summonersByName.version = summoner_json_1.default.version;
|
22
|
-
fs_1.default.writeFileSync(`src/generated/summonerByName.json`, JSON.stringify(summonersByName));
|
23
|
-
}
|
24
|
-
exports.generateSummonerSpellsByName = generateSummonerSpellsByName;
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function generateSummonersByKey(): void;
|
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.generateSummonersByKey = void 0;
|
7
|
-
const fs_1 = __importDefault(require("fs"));
|
8
|
-
const summoner_json_1 = __importDefault(require("../assets/summoner.json"));
|
9
|
-
function generateSummonersByKey() {
|
10
|
-
const summonersByKey = {
|
11
|
-
data: {},
|
12
|
-
version: '',
|
13
|
-
};
|
14
|
-
let summonerId;
|
15
|
-
for (summonerId in summoner_json_1.default.data) {
|
16
|
-
const summonerData = summoner_json_1.default.data[summonerId];
|
17
|
-
summonersByKey.data[summonerData.key] = {
|
18
|
-
...summonerData,
|
19
|
-
};
|
20
|
-
}
|
21
|
-
summonersByKey.version = summoner_json_1.default.version;
|
22
|
-
fs_1.default.writeFileSync(`src/generated/summonerByKey.json`, JSON.stringify(summonersByKey));
|
23
|
-
}
|
24
|
-
exports.generateSummonersByKey = generateSummonersByKey;
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function generateSummonersByName(): void;
|
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.generateSummonersByName = void 0;
|
7
|
-
const fs_1 = __importDefault(require("fs"));
|
8
|
-
const summoner_json_1 = __importDefault(require("../assets/summoner.json"));
|
9
|
-
function generateSummonersByName() {
|
10
|
-
const summonersByName = {
|
11
|
-
data: {},
|
12
|
-
version: '',
|
13
|
-
};
|
14
|
-
let summonerId;
|
15
|
-
for (summonerId in summoner_json_1.default.data) {
|
16
|
-
const summonerData = summoner_json_1.default.data[summonerId];
|
17
|
-
summonersByName.data[summonerData.name] = {
|
18
|
-
...summonerData,
|
19
|
-
};
|
20
|
-
}
|
21
|
-
summonersByName.version = summoner_json_1.default.version;
|
22
|
-
fs_1.default.writeFileSync(`src/generated/summonerByName.json`, JSON.stringify(summonersByName));
|
23
|
-
}
|
24
|
-
exports.generateSummonersByName = generateSummonersByName;
|
@@ -1,11 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.getSummonerSpellKeyByName = void 0;
|
7
|
-
const summonerByName_json_1 = __importDefault(require("../generated/summonerByName.json"));
|
8
|
-
function getSummonerSpellKeyByName(name) {
|
9
|
-
return summonerByName_json_1.default.data[name].key;
|
10
|
-
}
|
11
|
-
exports.getSummonerSpellKeyByName = getSummonerSpellKeyByName;
|