lol-constants 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Constants/DDPaths.d.ts +4 -0
- package/dist/Constants/DDPaths.js +4 -0
- package/dist/Constants/RuneSets.d.ts +25 -0
- package/dist/Constants/RuneSets.js +188 -144
- package/dist/Helpers/generateChampionsByKey.js +3 -0
- package/dist/Helpers/generateChampionsByName.js +3 -0
- package/dist/Helpers/generateItemsByName.js +5 -0
- package/dist/Helpers/generateRunesById.js +2 -0
- package/dist/Helpers/generateRunesByName.js +2 -0
- package/dist/Helpers/generateSummonerSpellsByKey.js +3 -0
- package/dist/Helpers/generateSummonerSpellsByName.js +3 -0
- package/dist/Helpers/getRuneIdByName.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -1
- package/dist/types/Meta.d.ts +25 -0
- package/dist/types/index.d.ts +126 -0
- package/package.json +1 -1
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DDPaths = void 0;
|
4
4
|
const VERSION = '12.8.1';
|
5
5
|
const BASE = `http://ddragon.leagueoflegends.com/cdn/${VERSION}/`;
|
6
|
+
/**
|
7
|
+
* DataDragon CDN Paths.
|
8
|
+
* All paths end with '/'.
|
9
|
+
*/
|
6
10
|
exports.DDPaths = {
|
7
11
|
CHAMPION_ICON_BASE: `${BASE}img/champion/`,
|
8
12
|
SPELL_ICON_BASE: `${BASE}img/spell/`,
|
@@ -1,9 +1,33 @@
|
|
1
|
+
/**
|
2
|
+
* There are 17 Keystone Runes in the game.
|
3
|
+
*/
|
4
|
+
export declare const Keystones: readonly ["8005", "8008", "8021", "8010", "8112", "8124", "8128", "9923", "8214", "8229", "8230", "8437", "8439", "8465", "8351", "8360", "8369"];
|
5
|
+
/**
|
6
|
+
* Contains all Rune IDs
|
7
|
+
* that are known to man in the game of League of Legends.
|
8
|
+
* Sorted by various useful categories.
|
9
|
+
*/
|
1
10
|
export declare const RuneSets: {
|
2
11
|
readonly PrimaryTrees: {
|
12
|
+
/**
|
13
|
+
* There are 13 Precision Runes in the game.
|
14
|
+
*/
|
3
15
|
readonly Precision: readonly ["8005", "8008", "8021", "8010", "9101", "9111", "8009", "9104", "9105", "9103", "8014", "8017", "8299"];
|
16
|
+
/**
|
17
|
+
* There are 13 Domination Runes in the game.
|
18
|
+
*/
|
4
19
|
readonly Domination: readonly ["8112", "8124", "8128", "9923", "8126", "8139", "8143", "8136", "8138", "8135", "8134", "8105", "8106"];
|
20
|
+
/**
|
21
|
+
* There are 12 Sorcery Runes in the game.
|
22
|
+
*/
|
5
23
|
readonly Sorcery: readonly ["8214", "8229", "8230", "8224", "8226", "8275", "8210", "8234", "8233", "8237", "8232", "8236"];
|
24
|
+
/**
|
25
|
+
* There are 11 Resolve Runes in the game.
|
26
|
+
*/
|
6
27
|
readonly Resolve: readonly ["8437", "8439", "8465", "8446", "8463", "8401", "8429", "8444", "8473", "8451", "8453", "8242"];
|
28
|
+
/**
|
29
|
+
* There are 12 Inspiration Runes in the game.
|
30
|
+
*/
|
7
31
|
readonly Inspiration: readonly ["8351", "8360", "8369", "8306", "8304", "8313", "8321", "8316", "8345", "8347", "8410", "8352"];
|
8
32
|
};
|
9
33
|
readonly SecondaryTrees: {
|
@@ -15,4 +39,5 @@ export declare const RuneSets: {
|
|
15
39
|
};
|
16
40
|
readonly Keystones: readonly ["8005", "8008", "8021", "8010", "8112", "8124", "8128", "9923", "8214", "8229", "8230", "8437", "8439", "8465", "8351", "8360", "8369"];
|
17
41
|
readonly StatRunes: readonly ["5001", "5002", "5002f", "5003", "5003f", "5005", "5007", "5008", "5008f"];
|
42
|
+
readonly All: readonly ["8005", "8008", "8021", "8010", "9101", "9111", "8009", "9104", "9105", "9103", "8014", "8017", "8299", "8112", "8124", "8128", "9923", "8126", "8139", "8143", "8136", "8138", "8135", "8134", "8105", "8106", "8214", "8229", "8230", "8224", "8226", "8275", "8210", "8234", "8233", "8237", "8232", "8236", "8437", "8439", "8465", "8446", "8463", "8401", "8429", "8444", "8473", "8451", "8453", "8242", "8351", "8360", "8369", "8306", "8304", "8313", "8321", "8316", "8345", "8347", "8410", "8352", "5001", "5002", "5002f", "5003", "5003f", "5005", "5007", "5008", "5008f"];
|
18
43
|
};
|
@@ -1,166 +1,210 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.RuneSets = void 0;
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
'8021',
|
10
|
-
'8010',
|
11
|
-
'9101',
|
12
|
-
'9111',
|
13
|
-
'8009',
|
14
|
-
'9104',
|
15
|
-
'9105',
|
16
|
-
'9103',
|
17
|
-
'8014',
|
18
|
-
'8017',
|
19
|
-
'8299',
|
20
|
-
],
|
21
|
-
'Domination': [
|
22
|
-
'8112',
|
23
|
-
'8124',
|
24
|
-
'8128',
|
25
|
-
'9923',
|
26
|
-
'8126',
|
27
|
-
'8139',
|
28
|
-
'8143',
|
29
|
-
'8136',
|
30
|
-
'8138',
|
31
|
-
'8135',
|
32
|
-
'8134',
|
33
|
-
'8105',
|
34
|
-
'8106',
|
35
|
-
],
|
36
|
-
'Sorcery': [
|
37
|
-
'8214',
|
38
|
-
'8229',
|
39
|
-
'8230',
|
40
|
-
'8224',
|
41
|
-
'8226',
|
42
|
-
'8275',
|
43
|
-
'8210',
|
44
|
-
'8234',
|
45
|
-
'8233',
|
46
|
-
'8237',
|
47
|
-
'8232',
|
48
|
-
'8236',
|
49
|
-
],
|
50
|
-
'Resolve': [
|
51
|
-
'8437',
|
52
|
-
'8439',
|
53
|
-
'8465',
|
54
|
-
'8446',
|
55
|
-
'8463',
|
56
|
-
'8401',
|
57
|
-
'8429',
|
58
|
-
'8444',
|
59
|
-
'8473',
|
60
|
-
'8451',
|
61
|
-
'8453',
|
62
|
-
'8242',
|
63
|
-
],
|
64
|
-
'Inspiration': [
|
65
|
-
'8351',
|
66
|
-
'8360',
|
67
|
-
'8369',
|
68
|
-
'8306',
|
69
|
-
'8304',
|
70
|
-
'8313',
|
71
|
-
'8321',
|
72
|
-
'8316',
|
73
|
-
'8345',
|
74
|
-
'8347',
|
75
|
-
'8410',
|
76
|
-
'8352',
|
77
|
-
],
|
78
|
-
},
|
79
|
-
SecondaryTrees: {
|
80
|
-
'Precision': [
|
81
|
-
'9101',
|
82
|
-
'9111',
|
83
|
-
'8009',
|
84
|
-
'9104',
|
85
|
-
'9105',
|
86
|
-
'9103',
|
87
|
-
'8014',
|
88
|
-
'8017',
|
89
|
-
'8299',
|
90
|
-
],
|
91
|
-
'Domination': [
|
92
|
-
'8126',
|
93
|
-
'8139',
|
94
|
-
'8143',
|
95
|
-
'8136',
|
96
|
-
'8138',
|
97
|
-
'8135',
|
98
|
-
'8134',
|
99
|
-
'8105',
|
100
|
-
'8106',
|
101
|
-
],
|
102
|
-
'Sorcery': [
|
103
|
-
'8224',
|
104
|
-
'8226',
|
105
|
-
'8275',
|
106
|
-
'8210',
|
107
|
-
'8234',
|
108
|
-
'8233',
|
109
|
-
'8237',
|
110
|
-
'8232',
|
111
|
-
'8236',
|
112
|
-
],
|
113
|
-
'Resolve': [
|
114
|
-
'8446',
|
115
|
-
'8463',
|
116
|
-
'8401',
|
117
|
-
'8429',
|
118
|
-
'8444',
|
119
|
-
'8473',
|
120
|
-
'8451',
|
121
|
-
'8453',
|
122
|
-
'8242',
|
123
|
-
],
|
124
|
-
'Inspiration': [
|
125
|
-
'8306',
|
126
|
-
'8304',
|
127
|
-
'8313',
|
128
|
-
'8321',
|
129
|
-
'8316',
|
130
|
-
'8345',
|
131
|
-
'8347',
|
132
|
-
'8410',
|
133
|
-
'8352',
|
134
|
-
],
|
135
|
-
},
|
136
|
-
Keystones: [
|
3
|
+
exports.RuneSets = exports.Keystones = void 0;
|
4
|
+
const PrimaryTrees = {
|
5
|
+
/**
|
6
|
+
* There are 13 Precision Runes in the game.
|
7
|
+
*/
|
8
|
+
'Precision': [
|
137
9
|
'8005',
|
138
10
|
'8008',
|
139
11
|
'8021',
|
140
12
|
'8010',
|
13
|
+
'9101',
|
14
|
+
'9111',
|
15
|
+
'8009',
|
16
|
+
'9104',
|
17
|
+
'9105',
|
18
|
+
'9103',
|
19
|
+
'8014',
|
20
|
+
'8017',
|
21
|
+
'8299',
|
22
|
+
],
|
23
|
+
/**
|
24
|
+
* There are 13 Domination Runes in the game.
|
25
|
+
*/
|
26
|
+
'Domination': [
|
141
27
|
'8112',
|
142
28
|
'8124',
|
143
29
|
'8128',
|
144
30
|
'9923',
|
31
|
+
'8126',
|
32
|
+
'8139',
|
33
|
+
'8143',
|
34
|
+
'8136',
|
35
|
+
'8138',
|
36
|
+
'8135',
|
37
|
+
'8134',
|
38
|
+
'8105',
|
39
|
+
'8106',
|
40
|
+
],
|
41
|
+
/**
|
42
|
+
* There are 12 Sorcery Runes in the game.
|
43
|
+
*/
|
44
|
+
'Sorcery': [
|
145
45
|
'8214',
|
146
46
|
'8229',
|
147
47
|
'8230',
|
48
|
+
'8224',
|
49
|
+
'8226',
|
50
|
+
'8275',
|
51
|
+
'8210',
|
52
|
+
'8234',
|
53
|
+
'8233',
|
54
|
+
'8237',
|
55
|
+
'8232',
|
56
|
+
'8236',
|
57
|
+
],
|
58
|
+
/**
|
59
|
+
* There are 11 Resolve Runes in the game.
|
60
|
+
*/
|
61
|
+
'Resolve': [
|
148
62
|
'8437',
|
149
63
|
'8439',
|
150
64
|
'8465',
|
65
|
+
'8446',
|
66
|
+
'8463',
|
67
|
+
'8401',
|
68
|
+
'8429',
|
69
|
+
'8444',
|
70
|
+
'8473',
|
71
|
+
'8451',
|
72
|
+
'8453',
|
73
|
+
'8242',
|
74
|
+
],
|
75
|
+
/**
|
76
|
+
* There are 12 Inspiration Runes in the game.
|
77
|
+
*/
|
78
|
+
'Inspiration': [
|
151
79
|
'8351',
|
152
80
|
'8360',
|
153
81
|
'8369',
|
82
|
+
'8306',
|
83
|
+
'8304',
|
84
|
+
'8313',
|
85
|
+
'8321',
|
86
|
+
'8316',
|
87
|
+
'8345',
|
88
|
+
'8347',
|
89
|
+
'8410',
|
90
|
+
'8352',
|
91
|
+
],
|
92
|
+
};
|
93
|
+
const SecondaryTrees = {
|
94
|
+
'Precision': [
|
95
|
+
'9101',
|
96
|
+
'9111',
|
97
|
+
'8009',
|
98
|
+
'9104',
|
99
|
+
'9105',
|
100
|
+
'9103',
|
101
|
+
'8014',
|
102
|
+
'8017',
|
103
|
+
'8299',
|
104
|
+
],
|
105
|
+
'Domination': [
|
106
|
+
'8126',
|
107
|
+
'8139',
|
108
|
+
'8143',
|
109
|
+
'8136',
|
110
|
+
'8138',
|
111
|
+
'8135',
|
112
|
+
'8134',
|
113
|
+
'8105',
|
114
|
+
'8106',
|
115
|
+
],
|
116
|
+
'Sorcery': [
|
117
|
+
'8224',
|
118
|
+
'8226',
|
119
|
+
'8275',
|
120
|
+
'8210',
|
121
|
+
'8234',
|
122
|
+
'8233',
|
123
|
+
'8237',
|
124
|
+
'8232',
|
125
|
+
'8236',
|
154
126
|
],
|
155
|
-
|
156
|
-
'
|
157
|
-
'
|
158
|
-
'
|
159
|
-
'
|
160
|
-
'
|
161
|
-
'
|
162
|
-
'
|
163
|
-
'
|
164
|
-
'
|
127
|
+
'Resolve': [
|
128
|
+
'8446',
|
129
|
+
'8463',
|
130
|
+
'8401',
|
131
|
+
'8429',
|
132
|
+
'8444',
|
133
|
+
'8473',
|
134
|
+
'8451',
|
135
|
+
'8453',
|
136
|
+
'8242',
|
165
137
|
],
|
138
|
+
'Inspiration': [
|
139
|
+
'8306',
|
140
|
+
'8304',
|
141
|
+
'8313',
|
142
|
+
'8321',
|
143
|
+
'8316',
|
144
|
+
'8345',
|
145
|
+
'8347',
|
146
|
+
'8410',
|
147
|
+
'8352',
|
148
|
+
],
|
149
|
+
};
|
150
|
+
/**
|
151
|
+
* There are 17 Keystone Runes in the game.
|
152
|
+
*/
|
153
|
+
exports.Keystones = [
|
154
|
+
// Precision
|
155
|
+
'8005',
|
156
|
+
'8008',
|
157
|
+
'8021',
|
158
|
+
'8010',
|
159
|
+
// Domination
|
160
|
+
'8112',
|
161
|
+
'8124',
|
162
|
+
'8128',
|
163
|
+
'9923',
|
164
|
+
// Sorcery
|
165
|
+
'8214',
|
166
|
+
'8229',
|
167
|
+
'8230',
|
168
|
+
// Resolve
|
169
|
+
'8437',
|
170
|
+
'8439',
|
171
|
+
'8465',
|
172
|
+
// Inspiration
|
173
|
+
'8351',
|
174
|
+
'8360',
|
175
|
+
'8369',
|
176
|
+
];
|
177
|
+
/**
|
178
|
+
* There are 9 Stat Runes in the game.
|
179
|
+
*/
|
180
|
+
const StatRunes = [
|
181
|
+
'5001',
|
182
|
+
'5002',
|
183
|
+
'5002f',
|
184
|
+
'5003',
|
185
|
+
'5003f',
|
186
|
+
'5005',
|
187
|
+
'5007',
|
188
|
+
'5008',
|
189
|
+
'5008f',
|
190
|
+
];
|
191
|
+
const All = [
|
192
|
+
...PrimaryTrees.Precision,
|
193
|
+
...PrimaryTrees.Domination,
|
194
|
+
...PrimaryTrees.Sorcery,
|
195
|
+
...PrimaryTrees.Resolve,
|
196
|
+
...PrimaryTrees.Inspiration,
|
197
|
+
...StatRunes,
|
198
|
+
];
|
199
|
+
/**
|
200
|
+
* Contains all Rune IDs
|
201
|
+
* that are known to man in the game of League of Legends.
|
202
|
+
* Sorted by various useful categories.
|
203
|
+
*/
|
204
|
+
exports.RuneSets = {
|
205
|
+
PrimaryTrees,
|
206
|
+
SecondaryTrees,
|
207
|
+
Keystones: exports.Keystones,
|
208
|
+
StatRunes,
|
209
|
+
All,
|
166
210
|
};
|
@@ -11,12 +11,15 @@ function generateChampionsByKey() {
|
|
11
11
|
data: {},
|
12
12
|
version: '',
|
13
13
|
};
|
14
|
+
// Add all champions' data to each corresponding key value
|
14
15
|
let championId;
|
15
16
|
for (championId in champion_json_1.default.data) {
|
16
17
|
const championData = champion_json_1.default.data[championId];
|
17
18
|
championsByKey.data[championData.key] = championData;
|
18
19
|
}
|
20
|
+
// Add version to the product object
|
19
21
|
championsByKey.version = champion_json_1.default.version;
|
22
|
+
// Write to file
|
20
23
|
fs_1.default.writeFileSync(`src/generated/championByKey.json`, JSON.stringify(championsByKey));
|
21
24
|
}
|
22
25
|
exports.generateChampionsByKey = generateChampionsByKey;
|
@@ -11,12 +11,15 @@ function generateChampionsByName() {
|
|
11
11
|
data: {},
|
12
12
|
version: '',
|
13
13
|
};
|
14
|
+
// Extract all champion names from `champion.json`
|
14
15
|
let championId;
|
15
16
|
for (championId in champion_json_1.default.data) {
|
16
17
|
const championData = champion_json_1.default.data[championId];
|
17
18
|
championsByName.data[championData.name] = championData;
|
18
19
|
}
|
20
|
+
// Add version to the product object
|
19
21
|
championsByName.version = champion_json_1.default.version;
|
22
|
+
// Write to file
|
20
23
|
fs_1.default.writeFileSync(`src/generated/championByName.json`, JSON.stringify(championsByName));
|
21
24
|
}
|
22
25
|
exports.generateChampionsByName = generateChampionsByName;
|
@@ -11,15 +11,20 @@ function generateItemsByName() {
|
|
11
11
|
data: {},
|
12
12
|
version: '',
|
13
13
|
};
|
14
|
+
// Add all items' data to each corresponding name value
|
14
15
|
let itemKey;
|
15
16
|
for (itemKey in item_json_1.default.data) {
|
16
17
|
const itemData = item_json_1.default.data[itemKey];
|
17
18
|
itemByName.data[itemData.name] = {
|
18
19
|
...itemData,
|
20
|
+
// Add the extra variable: `key`
|
21
|
+
// because it is esentially being overwritten.
|
19
22
|
key: itemKey,
|
20
23
|
};
|
21
24
|
}
|
25
|
+
// Add version to the product object
|
22
26
|
itemByName.version = item_json_1.default.version;
|
27
|
+
// Write to file
|
23
28
|
fs_1.default.writeFileSync(`src/generated/itemByName.json`, JSON.stringify(itemByName));
|
24
29
|
}
|
25
30
|
exports.generateItemsByName = generateItemsByName;
|
@@ -8,6 +8,7 @@ const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const runesReforged_json_1 = __importDefault(require("../assets/runesReforged.json"));
|
9
9
|
function generateRunesById() {
|
10
10
|
const runesById = {};
|
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) {
|
@@ -15,6 +16,7 @@ function generateRunesById() {
|
|
15
16
|
}
|
16
17
|
}
|
17
18
|
}
|
19
|
+
// Write to file
|
18
20
|
fs_1.default.writeFileSync(`src/generated/runesById.json`, JSON.stringify(runesById));
|
19
21
|
}
|
20
22
|
exports.generateRunesById = generateRunesById;
|
@@ -8,6 +8,7 @@ const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const runesReforged_json_1 = __importDefault(require("../assets/runesReforged.json"));
|
9
9
|
function generateRunesByName() {
|
10
10
|
const runesByName = {};
|
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) {
|
@@ -15,6 +16,7 @@ function generateRunesByName() {
|
|
15
16
|
}
|
16
17
|
}
|
17
18
|
}
|
19
|
+
// Write to file
|
18
20
|
fs_1.default.writeFileSync(`src/generated/runesByName.json`, JSON.stringify(runesByName));
|
19
21
|
}
|
20
22
|
exports.generateRunesByName = generateRunesByName;
|
@@ -11,6 +11,7 @@ function generateSummonerSpellsByKey() {
|
|
11
11
|
data: {},
|
12
12
|
version: '',
|
13
13
|
};
|
14
|
+
// Add all summoners' data to each corresponding key value
|
14
15
|
let summonerId;
|
15
16
|
for (summonerId in summoner_json_1.default.data) {
|
16
17
|
const summonerData = summoner_json_1.default.data[summonerId];
|
@@ -18,7 +19,9 @@ function generateSummonerSpellsByKey() {
|
|
18
19
|
...summonerData,
|
19
20
|
};
|
20
21
|
}
|
22
|
+
// Add version to the product object
|
21
23
|
summonersByKey.version = summoner_json_1.default.version;
|
24
|
+
// Write to file
|
22
25
|
fs_1.default.writeFileSync(`src/generated/summonerByKey.json`, JSON.stringify(summonersByKey));
|
23
26
|
}
|
24
27
|
exports.generateSummonerSpellsByKey = generateSummonerSpellsByKey;
|
@@ -11,6 +11,7 @@ function generateSummonerSpellsByName() {
|
|
11
11
|
data: {},
|
12
12
|
version: '',
|
13
13
|
};
|
14
|
+
// Add all summoners' data to each corresponding name value
|
14
15
|
let summonerId;
|
15
16
|
for (summonerId in summoner_json_1.default.data) {
|
16
17
|
const summonerData = summoner_json_1.default.data[summonerId];
|
@@ -18,7 +19,9 @@ function generateSummonerSpellsByName() {
|
|
18
19
|
...summonerData,
|
19
20
|
};
|
20
21
|
}
|
22
|
+
// Add version to the product object
|
21
23
|
summonersByName.version = summoner_json_1.default.version;
|
24
|
+
// Write to file
|
22
25
|
fs_1.default.writeFileSync(`src/generated/summonerByName.json`, JSON.stringify(summonersByName));
|
23
26
|
}
|
24
27
|
exports.generateSummonerSpellsByName = generateSummonerSpellsByName;
|
@@ -14,6 +14,8 @@ function getRuneIdByName(name) {
|
|
14
14
|
if (StatRunes_1.StatRunes[statRuneId] == name)
|
15
15
|
return statRuneId;
|
16
16
|
}
|
17
|
+
// Code will never run this far
|
18
|
+
// but this to satisfy TypeScript and not put `statRuneName` in tree runes.
|
17
19
|
return '5001';
|
18
20
|
}
|
19
21
|
return runesByName_json_1.default[name].id;
|
package/dist/index.d.ts
CHANGED
@@ -17232,6 +17232,7 @@ export { ItemKeys } from './Constants/ItemKeys';
|
|
17232
17232
|
export { ItemNames } from './Constants/ItemNames';
|
17233
17233
|
export { RuneIds } from './Constants/RuneIds';
|
17234
17234
|
export { RuneNames } from './Constants/RuneNames';
|
17235
|
+
export { RuneSets } from './Constants/RuneSets';
|
17235
17236
|
export { StatRuneIds } from './Constants/StatRuneIds';
|
17236
17237
|
export { StatRuneNames } from './Constants/StatRuneNames';
|
17237
17238
|
export { StatRunes } from './Constants/StatRunes';
|
package/dist/index.js
CHANGED
@@ -17,7 +17,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
18
18
|
};
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
20
|
-
exports.isTreeRuneName = exports.isTreeRuneId = exports.isSummonerSpellName = exports.isSummonerSpellKey = exports.isSummonerSpellId = exports.isStatRuneName = exports.isStatRuneId = exports.isRuneName = exports.isRuneId = exports.isItemName = exports.isItemKey = exports.isChampionName = exports.isChampionKey = exports.getSummonerSpellNameByKey = exports.getSummonerSpellKeyByName = exports.getRuneNameById = exports.getRuneIdByName = exports.getItemNameByKey = exports.getItemKeyByName = exports.getChampionNameByKey = exports.getChampionKeyByName = exports.summonerByName = exports.summonerByKey = exports.runesByName = exports.runesById = exports.itemByName = exports.championByName = exports.championByKey = exports.TreeRuneNames = exports.TreeRuneIds = exports.SummonerSpellNames = exports.SummonerSpellKeys = exports.SummonerSpellIds = exports.StatRunes = exports.StatRuneNames = exports.StatRuneIds = exports.RuneNames = exports.RuneIds = exports.ItemNames = exports.ItemKeys = exports.DDPaths = exports.ChampionNames = exports.ChampionKeys = exports.summoner = exports.runesReforged = exports.item = exports.champion = void 0;
|
20
|
+
exports.isTreeRuneName = exports.isTreeRuneId = exports.isSummonerSpellName = exports.isSummonerSpellKey = exports.isSummonerSpellId = exports.isStatRuneName = exports.isStatRuneId = exports.isRuneName = exports.isRuneId = exports.isItemName = exports.isItemKey = exports.isChampionName = exports.isChampionKey = exports.getSummonerSpellNameByKey = exports.getSummonerSpellKeyByName = exports.getRuneNameById = exports.getRuneIdByName = exports.getItemNameByKey = exports.getItemKeyByName = exports.getChampionNameByKey = exports.getChampionKeyByName = exports.summonerByName = exports.summonerByKey = exports.runesByName = exports.runesById = exports.itemByName = exports.championByName = exports.championByKey = exports.TreeRuneNames = exports.TreeRuneIds = exports.SummonerSpellNames = exports.SummonerSpellKeys = exports.SummonerSpellIds = exports.StatRunes = exports.StatRuneNames = exports.StatRuneIds = exports.RuneSets = exports.RuneNames = exports.RuneIds = exports.ItemNames = exports.ItemKeys = exports.DDPaths = exports.ChampionNames = exports.ChampionKeys = exports.summoner = exports.runesReforged = exports.item = exports.champion = void 0;
|
21
|
+
// # assets
|
21
22
|
const champion_json_1 = __importDefault(require("./assets/champion.json"));
|
22
23
|
const item_json_1 = __importDefault(require("./assets/item.json"));
|
23
24
|
const runesReforged_json_1 = __importDefault(require("./assets/runesReforged.json"));
|
@@ -26,6 +27,7 @@ exports.champion = champion_json_1.default;
|
|
26
27
|
exports.item = item_json_1.default;
|
27
28
|
exports.runesReforged = runesReforged_json_1.default;
|
28
29
|
exports.summoner = summoner_json_1.default;
|
30
|
+
// # Constants
|
29
31
|
var ChampionKeys_1 = require("./Constants/ChampionKeys");
|
30
32
|
Object.defineProperty(exports, "ChampionKeys", { enumerable: true, get: function () { return ChampionKeys_1.ChampionKeys; } });
|
31
33
|
var ChampionNames_1 = require("./Constants/ChampionNames");
|
@@ -40,6 +42,8 @@ var RuneIds_1 = require("./Constants/RuneIds");
|
|
40
42
|
Object.defineProperty(exports, "RuneIds", { enumerable: true, get: function () { return RuneIds_1.RuneIds; } });
|
41
43
|
var RuneNames_1 = require("./Constants/RuneNames");
|
42
44
|
Object.defineProperty(exports, "RuneNames", { enumerable: true, get: function () { return RuneNames_1.RuneNames; } });
|
45
|
+
var RuneSets_1 = require("./Constants/RuneSets");
|
46
|
+
Object.defineProperty(exports, "RuneSets", { enumerable: true, get: function () { return RuneSets_1.RuneSets; } });
|
43
47
|
var StatRuneIds_1 = require("./Constants/StatRuneIds");
|
44
48
|
Object.defineProperty(exports, "StatRuneIds", { enumerable: true, get: function () { return StatRuneIds_1.StatRuneIds; } });
|
45
49
|
var StatRuneNames_1 = require("./Constants/StatRuneNames");
|
@@ -56,6 +60,7 @@ var TreeRuneIds_1 = require("./Constants/TreeRuneIds");
|
|
56
60
|
Object.defineProperty(exports, "TreeRuneIds", { enumerable: true, get: function () { return TreeRuneIds_1.TreeRuneIds; } });
|
57
61
|
var TreeRuneNames_1 = require("./Constants/TreeRuneNames");
|
58
62
|
Object.defineProperty(exports, "TreeRuneNames", { enumerable: true, get: function () { return TreeRuneNames_1.TreeRuneNames; } });
|
63
|
+
// # generated
|
59
64
|
const championByKey_json_1 = __importDefault(require("./generated/championByKey.json"));
|
60
65
|
const championByName_json_1 = __importDefault(require("./generated/championByName.json"));
|
61
66
|
const itemByName_json_1 = __importDefault(require("./generated/itemByName.json"));
|
@@ -70,6 +75,7 @@ exports.runesById = runesById_json_1.default;
|
|
70
75
|
exports.runesByName = runesByName_json_1.default;
|
71
76
|
exports.summonerByKey = summonerByKey_json_1.default;
|
72
77
|
exports.summonerByName = summonerByName_json_1.default;
|
78
|
+
// # Helpers
|
73
79
|
var getChampionKeyByName_1 = require("./Helpers/getChampionKeyByName");
|
74
80
|
Object.defineProperty(exports, "getChampionKeyByName", { enumerable: true, get: function () { return getChampionKeyByName_1.getChampionKeyByName; } });
|
75
81
|
var getChampionNameByKey_1 = require("./Helpers/getChampionNameByKey");
|
@@ -112,5 +118,7 @@ var isTreeRuneId_1 = require("./Helpers/isTreeRuneId");
|
|
112
118
|
Object.defineProperty(exports, "isTreeRuneId", { enumerable: true, get: function () { return isTreeRuneId_1.isTreeRuneId; } });
|
113
119
|
var isTreeRuneName_1 = require("./Helpers/isTreeRuneName");
|
114
120
|
Object.defineProperty(exports, "isTreeRuneName", { enumerable: true, get: function () { return isTreeRuneName_1.isTreeRuneName; } });
|
121
|
+
// # scripts
|
122
|
+
// # types
|
115
123
|
__exportStar(require("./types"), exports);
|
116
124
|
__exportStar(require("./types/Meta"), exports);
|
package/dist/types/Meta.d.ts
CHANGED
@@ -6,7 +6,32 @@ export declare type GameType = 'CUSTOM_GAME' | 'TUTORIAL_GAME' | 'MATCHED_GAME';
|
|
6
6
|
export declare type GameMode = 'CLASSIC' | 'ARAM' | 'TUTORIAL' | 'URF' | 'ONEFORALL' | 'KINGPORO' | 'GAMEMODEX' | 'ULTBOOK';
|
7
7
|
export declare type PlatformId = 'BR1' | 'EUN1' | 'EUW1' | 'JP1' | 'KR' | 'LA1' | 'LA2' | 'NA1' | 'OC1' | 'TR1' | 'RU';
|
8
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
|
+
*/
|
9
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
|
+
*/
|
10
35
|
export declare type MapId = 11 | 12 | 21 | 22;
|
11
36
|
export declare type TeamId = 100 | 200;
|
12
37
|
export declare type ParticipantId = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
|
package/dist/types/index.d.ts
CHANGED
@@ -16,17 +16,143 @@ export declare type ItemName = keyof typeof itemByName.data;
|
|
16
16
|
export declare type SummonerSpellId = keyof typeof summoner.data;
|
17
17
|
export declare type SummonerSpellKey = keyof typeof summonerByKey.data;
|
18
18
|
export declare type SummonerSpellName = keyof typeof summonerByName.data;
|
19
|
+
/**
|
20
|
+
* There are 3 main Rune ID types:
|
21
|
+
* - `RuneId` (all),
|
22
|
+
* - `TreeRuneId` (all but stat runes),
|
23
|
+
* - `StatRuneId` (only stat runes).
|
24
|
+
*
|
25
|
+
* There are 6 more specific Rune ID types as well:
|
26
|
+
* - `KeystoneRuneId`,
|
27
|
+
* - `PrecisionTreeRuneId`,
|
28
|
+
* - `DominationTreeRuneId`,
|
29
|
+
* - `SorceryTreeRuneId`,
|
30
|
+
* - `ResolveTreeRuneId`,
|
31
|
+
* - `InspirationTreeRuneId`,
|
32
|
+
*/
|
19
33
|
export declare type RuneId = TreeRuneId | StatRuneId;
|
20
34
|
export declare type RuneName = TreeRuneName | StatRuneName;
|
35
|
+
/**
|
36
|
+
* There are 3 main Rune ID types:
|
37
|
+
* - `RuneId` (all),
|
38
|
+
* - `TreeRuneId` (all but stat runes),
|
39
|
+
* - `StatRuneId` (only stat runes).
|
40
|
+
*
|
41
|
+
* There are 6 more specific Rune ID types as well:
|
42
|
+
* - `KeystoneRuneId`,
|
43
|
+
* - `PrecisionTreeRuneId`,
|
44
|
+
* - `DominationTreeRuneId`,
|
45
|
+
* - `SorceryTreeRuneId`,
|
46
|
+
* - `ResolveTreeRuneId`,
|
47
|
+
* - `InspirationTreeRuneId`,
|
48
|
+
*/
|
21
49
|
export declare type TreeRuneId = keyof typeof runesById;
|
22
50
|
export declare type TreeRuneName = keyof typeof runesByName;
|
51
|
+
/**
|
52
|
+
* There are 3 main Rune ID types:
|
53
|
+
* - `RuneId` (all),
|
54
|
+
* - `TreeRuneId` (all but stat runes),
|
55
|
+
* - `StatRuneId` (only stat runes).
|
56
|
+
*
|
57
|
+
* There are 6 more specific Rune ID types as well:
|
58
|
+
* - `KeystoneRuneId`,
|
59
|
+
* - `PrecisionTreeRuneId`,
|
60
|
+
* - `DominationTreeRuneId`,
|
61
|
+
* - `SorceryTreeRuneId`,
|
62
|
+
* - `ResolveTreeRuneId`,
|
63
|
+
* - `InspirationTreeRuneId`,
|
64
|
+
*/
|
23
65
|
export declare type StatRuneId = keyof typeof StatRunes;
|
24
66
|
export declare type StatRuneName = typeof StatRunes[keyof typeof StatRunes];
|
67
|
+
/**
|
68
|
+
* There are 3 main Rune ID types:
|
69
|
+
* - `RuneId` (all),
|
70
|
+
* - `TreeRuneId` (all but stat runes),
|
71
|
+
* - `StatRuneId` (only stat runes).
|
72
|
+
*
|
73
|
+
* There are 6 more specific Rune ID types as well:
|
74
|
+
* - `KeystoneRuneId`,
|
75
|
+
* - `PrecisionTreeRuneId`,
|
76
|
+
* - `DominationTreeRuneId`,
|
77
|
+
* - `SorceryTreeRuneId`,
|
78
|
+
* - `ResolveTreeRuneId`,
|
79
|
+
* - `InspirationTreeRuneId`,
|
80
|
+
*/
|
25
81
|
export declare type KeystoneRuneId = Extract<typeof RuneSets.Keystones[keyof typeof RuneSets.Keystones], string>;
|
82
|
+
/**
|
83
|
+
* There are 3 main Rune ID types:
|
84
|
+
* - `RuneId` (all),
|
85
|
+
* - `TreeRuneId` (all but stat runes),
|
86
|
+
* - `StatRuneId` (only stat runes).
|
87
|
+
*
|
88
|
+
* There are 6 more specific Rune ID types as well:
|
89
|
+
* - `KeystoneRuneId`,
|
90
|
+
* - `PrecisionTreeRuneId`,
|
91
|
+
* - `DominationTreeRuneId`,
|
92
|
+
* - `SorceryTreeRuneId`,
|
93
|
+
* - `ResolveTreeRuneId`,
|
94
|
+
* - `InspirationTreeRuneId`,
|
95
|
+
*/
|
26
96
|
export declare type PrecisionTreeRuneId = Extract<typeof RuneSets.PrimaryTrees.Precision[keyof typeof RuneSets.PrimaryTrees.Precision], string>;
|
97
|
+
/**
|
98
|
+
* There are 3 main Rune ID types:
|
99
|
+
* - `RuneId` (all),
|
100
|
+
* - `TreeRuneId` (all but stat runes),
|
101
|
+
* - `StatRuneId` (only stat runes).
|
102
|
+
*
|
103
|
+
* There are 6 more specific Rune ID types as well:
|
104
|
+
* - `KeystoneRuneId`,
|
105
|
+
* - `PrecisionTreeRuneId`,
|
106
|
+
* - `DominationTreeRuneId`,
|
107
|
+
* - `SorceryTreeRuneId`,
|
108
|
+
* - `ResolveTreeRuneId`,
|
109
|
+
* - `InspirationTreeRuneId`,
|
110
|
+
*/
|
27
111
|
export declare type DominationTreeRuneId = Extract<typeof RuneSets.PrimaryTrees.Domination[keyof typeof RuneSets.PrimaryTrees.Domination], string>;
|
112
|
+
/**
|
113
|
+
* There are 3 main Rune ID types:
|
114
|
+
* - `RuneId` (all),
|
115
|
+
* - `TreeRuneId` (all but stat runes),
|
116
|
+
* - `StatRuneId` (only stat runes).
|
117
|
+
*
|
118
|
+
* There are 6 more specific Rune ID types as well:
|
119
|
+
* - `KeystoneRuneId`,
|
120
|
+
* - `PrecisionTreeRuneId`,
|
121
|
+
* - `DominationTreeRuneId`,
|
122
|
+
* - `SorceryTreeRuneId`,
|
123
|
+
* - `ResolveTreeRuneId`,
|
124
|
+
* - `InspirationTreeRuneId`,
|
125
|
+
*/
|
28
126
|
export declare type SorceryTreeRuneId = Extract<typeof RuneSets.PrimaryTrees.Sorcery[keyof typeof RuneSets.PrimaryTrees.Sorcery], string>;
|
127
|
+
/**
|
128
|
+
* There are 3 main Rune ID types:
|
129
|
+
* - `RuneId` (all),
|
130
|
+
* - `TreeRuneId` (all but stat runes),
|
131
|
+
* - `StatRuneId` (only stat runes).
|
132
|
+
*
|
133
|
+
* There are 6 more specific Rune ID types as well:
|
134
|
+
* - `KeystoneRuneId`,
|
135
|
+
* - `PrecisionTreeRuneId`,
|
136
|
+
* - `DominationTreeRuneId`,
|
137
|
+
* - `SorceryTreeRuneId`,
|
138
|
+
* - `ResolveTreeRuneId`,
|
139
|
+
* - `InspirationTreeRuneId`,
|
140
|
+
*/
|
29
141
|
export declare type ResolveTreeRuneId = Extract<typeof RuneSets.PrimaryTrees.Resolve[keyof typeof RuneSets.PrimaryTrees.Resolve], string>;
|
142
|
+
/**
|
143
|
+
* There are 3 main Rune ID types:
|
144
|
+
* - `RuneId` (all),
|
145
|
+
* - `TreeRuneId` (all but stat runes),
|
146
|
+
* - `StatRuneId` (only stat runes).
|
147
|
+
*
|
148
|
+
* There are 6 more specific Rune ID types as well:
|
149
|
+
* - `KeystoneRuneId`,
|
150
|
+
* - `PrecisionTreeRuneId`,
|
151
|
+
* - `DominationTreeRuneId`,
|
152
|
+
* - `SorceryTreeRuneId`,
|
153
|
+
* - `ResolveTreeRuneId`,
|
154
|
+
* - `InspirationTreeRuneId`,
|
155
|
+
*/
|
30
156
|
export declare type InspirationTreeRuneId = Extract<typeof RuneSets.PrimaryTrees.Inspiration[keyof typeof RuneSets.PrimaryTrees.Inspiration], string>;
|
31
157
|
export declare type XP = number;
|
32
158
|
export declare type Minute = number;
|
package/package.json
CHANGED