lol-constants 2.4.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +15 -0
- package/assets/scripts/constants/RuneIdComment.d.ts +1 -1
- package/assets/scripts/constants/RuneIdComment.js +14 -6
- package/assets/scripts/generate-all.d.ts +3 -3
- package/assets/scripts/generate-all.js +3 -3
- package/assets/scripts/generate-non-stat-rune-ids-num.d.ts +1 -0
- package/assets/scripts/generate-non-stat-rune-ids-num.js +23 -0
- package/assets/scripts/generate-non-stat-rune-ids.d.ts +1 -0
- package/assets/scripts/generate-non-stat-rune-ids.js +24 -0
- package/assets/scripts/generate-non-stat-rune-names.d.ts +1 -0
- package/assets/scripts/generate-non-stat-rune-names.js +22 -0
- package/assets/scripts/generate-rune-sets-by-rune-names-num.js +16 -11
- package/assets/scripts/generate-rune-sets-by-rune-names.js +11 -11
- package/assets/scripts/generate-rune-sets.js +11 -11
- package/core/constants/Continents.d.ts +8 -0
- package/core/constants/Continents.js +13 -0
- package/core/constants/DataDragonUrls.d.ts +13 -0
- package/core/constants/DataDragonUrls.js +15 -1
- package/core/constants/Locales.d.ts +29 -1
- package/core/constants/Locales.js +29 -1
- package/core/constants/MapIds.d.ts +17 -0
- package/core/constants/MapIds.js +22 -0
- package/core/constants/ParticipantIds.d.ts +14 -0
- package/core/constants/ParticipantIds.js +19 -0
- package/core/constants/PlatformApiUris.d.ts +20 -0
- package/core/constants/PlatformApiUris.js +25 -0
- package/core/constants/PlatformIds.d.ts +8 -0
- package/core/constants/PlatformIds.js +11 -1
- package/core/constants/QueueDescriptions.d.ts +21 -0
- package/core/constants/QueueDescriptions.js +26 -0
- package/core/constants/QueueIds.d.ts +56 -0
- package/core/constants/QueueIds.js +61 -0
- package/core/constants/RegionalApiUris.d.ts +8 -0
- package/core/constants/RegionalApiUris.js +13 -0
- package/core/constants/Regions.d.ts +8 -0
- package/core/constants/Regions.js +11 -8
- package/core/constants/Runes/NonStatRuneIds.d.ts +88 -0
- package/core/constants/Runes/NonStatRuneIds.js +4 -0
- package/core/constants/Runes/NonStatRuneIdsNum.d.ts +66 -0
- package/core/constants/Runes/NonStatRuneIdsNum.js +4 -0
- package/core/constants/Runes/NonStatRuneNames.d.ts +66 -0
- package/core/constants/Runes/NonStatRuneNames.js +4 -0
- package/core/constants/Runes/RuneSets.d.ts +2 -2
- package/core/constants/Runes/RuneSets.js +3 -3
- package/core/constants/Runes/RuneSetsByRuneNames.d.ts +30 -14
- package/core/constants/Runes/RuneSetsByRuneNames.js +3 -3
- package/core/constants/Runes/RuneSetsByRuneNamesNum.d.ts +48 -2
- package/core/constants/Runes/RuneSetsByRuneNamesNum.js +3 -3
- package/core/constants/Runes/TreeRuneIds.d.ts +5 -5
- package/core/constants/SkillSlots.d.ts +1 -1
- package/core/constants/SkillSlots.js +1 -1
- package/core/constants/TeamIds.d.ts +6 -0
- package/core/constants/TeamIds.js +11 -0
- package/core/helpers/Champions/isChampionKeyNum.d.ts +2 -0
- package/core/helpers/Champions/isChampionKeyNum.js +8 -0
- package/core/helpers/Items/isItemKeyNum.d.ts +2 -0
- package/core/helpers/Items/isItemKeyNum.js +8 -0
- package/core/helpers/Runes/getNonStatRuneIdByName.d.ts +3 -0
- package/core/helpers/Runes/getNonStatRuneIdByName.js +8 -0
- package/core/helpers/Runes/getNonStatRuneNameById.d.ts +3 -0
- package/core/helpers/Runes/getNonStatRuneNameById.js +8 -0
- package/core/helpers/Runes/isDominationRuneId.d.ts +2 -0
- package/core/helpers/Runes/isDominationRuneId.js +8 -0
- package/core/helpers/Runes/isDominationRuneIdNum.d.ts +2 -0
- package/core/helpers/Runes/isDominationRuneIdNum.js +8 -0
- package/core/helpers/Runes/isDominationRuneName.d.ts +2 -0
- package/core/helpers/Runes/isDominationRuneName.js +8 -0
- package/core/helpers/Runes/isInspirationRuneId.d.ts +2 -0
- package/core/helpers/Runes/isInspirationRuneId.js +8 -0
- package/core/helpers/Runes/isInspirationRuneIdNum.d.ts +2 -0
- package/core/helpers/Runes/isInspirationRuneIdNum.js +8 -0
- package/core/helpers/Runes/isInspirationRuneName.d.ts +2 -0
- package/core/helpers/Runes/isInspirationRuneName.js +8 -0
- package/core/helpers/Runes/isKeystoneRuneIdNum.d.ts +2 -0
- package/core/helpers/Runes/isKeystoneRuneIdNum.js +8 -0
- package/core/helpers/Runes/isKeystoneRuneName.d.ts +2 -0
- package/core/helpers/Runes/isKeystoneRuneName.js +8 -0
- package/core/helpers/Runes/isNonStatRuneId.d.ts +2 -0
- package/core/helpers/Runes/isNonStatRuneId.js +8 -0
- package/core/helpers/Runes/isNonStatRuneIdNum.d.ts +2 -0
- package/core/helpers/Runes/isNonStatRuneIdNum.js +8 -0
- package/core/helpers/Runes/isNonStatRuneName.d.ts +2 -0
- package/core/helpers/Runes/isNonStatRuneName.js +8 -0
- package/core/helpers/Runes/isPrecisionRuneId.d.ts +2 -0
- package/core/helpers/Runes/isPrecisionRuneId.js +8 -0
- package/core/helpers/Runes/isPrecisionRuneIdNum.d.ts +2 -0
- package/core/helpers/Runes/isPrecisionRuneIdNum.js +8 -0
- package/core/helpers/Runes/isPrecisionRuneName.d.ts +2 -0
- package/core/helpers/Runes/isPrecisionRuneName.js +8 -0
- package/core/helpers/Runes/isResolveRuneId.d.ts +2 -0
- package/core/helpers/Runes/isResolveRuneId.js +8 -0
- package/core/helpers/Runes/isResolveRuneIdNum.d.ts +2 -0
- package/core/helpers/Runes/isResolveRuneIdNum.js +8 -0
- package/core/helpers/Runes/isResolveRuneName.d.ts +2 -0
- package/core/helpers/Runes/isResolveRuneName.js +8 -0
- package/core/helpers/Runes/isRuneIdNum.d.ts +2 -0
- package/core/helpers/Runes/isRuneIdNum.js +8 -0
- package/core/helpers/Runes/isSorceryRuneId.d.ts +2 -0
- package/core/helpers/Runes/isSorceryRuneId.js +8 -0
- package/core/helpers/Runes/isSorceryRuneIdNum.d.ts +2 -0
- package/core/helpers/Runes/isSorceryRuneIdNum.js +8 -0
- package/core/helpers/Runes/isSorceryRuneName.d.ts +2 -0
- package/core/helpers/Runes/isSorceryRuneName.js +8 -0
- package/core/helpers/Runes/isStatRuneIdNum.d.ts +2 -0
- package/core/helpers/Runes/isStatRuneIdNum.js +8 -0
- package/core/helpers/Spells/isSpellKeyNum.d.ts +2 -0
- package/core/helpers/Spells/isSpellKeyNum.js +8 -0
- package/core/index.d.ts +35 -12
- package/core/index.js +35 -12
- package/core/types/types.d.ts +199 -82
- package/package.json +1 -1
package/README.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
Provides constants and types for League of Legends related stuff within the context of [Riot APIs](https://developer.riotgames.com/docs/lol). Types such as [`ChampionId`](src/core/constants/Champions/ChampionIds.ts), [`ChampionName`](src/core/constants/Champions/ChampionNames.ts), [`ItemKey`](src/core/constants/Items/ItemKeys.ts), [`RuneId`](src/core/constants/Runes/RuneSetsByRuneNames.ts#L55), [`SpellName`](src/core/constants/Spells/SpellNames.ts), [`Position`](src/core/constants/Positions.ts), [`Queue`](src/core/constants/Queues.ts), [`RankedTier`](src/core/constants/RankedTiers.ts), [`Region`](src/core/constants/Regions.ts) and more are provided. Certain URLs and URIs are available as constants as well in [`DataDragonUrls`](src/core/constants/DataDragonUrls.ts), [`PlatformApiUris`](src/core/constants/PlatformApiUris.ts), [`RegionalApiUris`](src/core/constants/RegionalApiUris.ts).
|
2
|
+
|
3
|
+
Advantages:
|
4
|
+
- Four categories — champions, items, runes, summoner spells — are armed with getter functions that exchange between id–key–name such as [`getChampionNameByKey`](src/core/helpers/Champions/getChampionNameByKey.ts)–[`getChampionIdByName`](src/core/helpers/Champions/getChampionIdByName.ts)–[`getChampionKeyById`](src/core/helpers/Champions/getChampionKeyById.ts)
|
5
|
+
- Types can be validated through type-validating functions such as [`isChampionName`](src/core/helpers/Champions/isChampionName.ts)
|
6
|
+
- Type validation functions such as [`isChampionName`](src/core/helpers/Champions/isChampionName.ts) and getter functions such as [`getChampionNameByKey`](src/core/helpers/Champions/getChampionNameByKey.ts) are instantaneous $O(1)$ and do not iterate over many elements
|
7
|
+
|
8
|
+
# Champions
|
9
|
+
| constants | types | getters | type-validators
|
10
|
+
| --- | --- | --- | --- |
|
11
|
+
| `ChampionIds`, `ChampionIdsByName`, `ChampionKeys`, `ChampionKeysNum`, `ChampionNames` | `ChampionId`, `ChampionKey`, `ChampionKeyNum`, `ChampionName` | `getChampionIdByKey`, `getChampionIdByName`, `getChampionKeyById`, `getChampionKeyByName`, `getChampionNameById`, `getChampionNameByKey` | `isChampionId`, `isChampionKey`, `isChampionKeyNum`, `isChampionName`
|
12
|
+
# Items
|
13
|
+
# Runes
|
14
|
+
# Summoner spells
|
15
|
+
# Other
|
@@ -1 +1 @@
|
|
1
|
-
export declare const RuneIdComment: "\n/**\n * There are 3 main Rune ID types:\n * - `RuneId` (all),\n * - `
|
1
|
+
export declare const RuneIdComment: "\n/**\n * There are 3 main Rune ID types:\n * - `RuneId` (all),\n * - `NonStatRuneId` (all but stat runes),\n * - `StatRuneId` (only stat runes).\n * \n * There are 6 more specific Rune ID types as well:\n * - `KeystoneRuneId`,\n * - `PrecisionRuneId`,\n * - `DominationRuneId`,\n * - `SorceryRuneId`,\n * - `ResolveRuneId`,\n * - `InspirationRuneId`.\n * \n * There are 6 numerical Rune ID types:\n * - `KeystoneRuneIdNum`,\n * - `PrecisionRuneIdNum`,\n * - `DominationRuneIdNum`,\n * - `SorceryRuneIdNum`,\n * - `ResolveRuneIdNum`,\n * - `InspirationRuneIdNum`.\n */\n";
|
@@ -5,15 +5,23 @@ exports.RuneIdComment = `
|
|
5
5
|
/**
|
6
6
|
* There are 3 main Rune ID types:
|
7
7
|
* - \`RuneId\` (all),
|
8
|
-
* - \`
|
8
|
+
* - \`NonStatRuneId\` (all but stat runes),
|
9
9
|
* - \`StatRuneId\` (only stat runes).
|
10
10
|
*
|
11
11
|
* There are 6 more specific Rune ID types as well:
|
12
12
|
* - \`KeystoneRuneId\`,
|
13
|
-
* - \`
|
14
|
-
* - \`
|
15
|
-
* - \`
|
16
|
-
* - \`
|
17
|
-
* - \`
|
13
|
+
* - \`PrecisionRuneId\`,
|
14
|
+
* - \`DominationRuneId\`,
|
15
|
+
* - \`SorceryRuneId\`,
|
16
|
+
* - \`ResolveRuneId\`,
|
17
|
+
* - \`InspirationRuneId\`.
|
18
|
+
*
|
19
|
+
* There are 6 numerical Rune ID types:
|
20
|
+
* - \`KeystoneRuneIdNum\`,
|
21
|
+
* - \`PrecisionRuneIdNum\`,
|
22
|
+
* - \`DominationRuneIdNum\`,
|
23
|
+
* - \`SorceryRuneIdNum\`,
|
24
|
+
* - \`ResolveRuneIdNum\`,
|
25
|
+
* - \`InspirationRuneIdNum\`.
|
18
26
|
*/
|
19
27
|
`;
|
@@ -9,6 +9,9 @@ import './generate-champion-names';
|
|
9
9
|
import './generate-item-keys-num';
|
10
10
|
import './generate-item-keys';
|
11
11
|
import './generate-item-names';
|
12
|
+
import './generate-non-stat-rune-ids-num';
|
13
|
+
import './generate-non-stat-rune-ids';
|
14
|
+
import './generate-non-stat-rune-names';
|
12
15
|
import './generate-rune-picking-relationships';
|
13
16
|
import './generate-rune-sets-by-rune-names-num';
|
14
17
|
import './generate-rune-sets-by-rune-names';
|
@@ -18,6 +21,3 @@ import './generate-spell-ids';
|
|
18
21
|
import './generate-spell-keys-num';
|
19
22
|
import './generate-spell-keys';
|
20
23
|
import './generate-spell-names';
|
21
|
-
import './generate-tree-rune-ids-num';
|
22
|
-
import './generate-tree-rune-ids';
|
23
|
-
import './generate-tree-rune-names';
|
@@ -11,6 +11,9 @@ require("./generate-champion-names");
|
|
11
11
|
require("./generate-item-keys-num");
|
12
12
|
require("./generate-item-keys");
|
13
13
|
require("./generate-item-names");
|
14
|
+
require("./generate-non-stat-rune-ids-num");
|
15
|
+
require("./generate-non-stat-rune-ids");
|
16
|
+
require("./generate-non-stat-rune-names");
|
14
17
|
// import './generate-rune-ids'
|
15
18
|
// import './generate-rune-names'
|
16
19
|
require("./generate-rune-picking-relationships");
|
@@ -24,6 +27,3 @@ require("./generate-spell-keys");
|
|
24
27
|
require("./generate-spell-names");
|
25
28
|
// import './generate-stat-rune-ids'
|
26
29
|
// import './generate-stat-rune-names'
|
27
|
-
require("./generate-tree-rune-ids-num");
|
28
|
-
require("./generate-tree-rune-ids");
|
29
|
-
require("./generate-tree-rune-names");
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const RunesReforged_1 = require("../constants/RunesReforged");
|
4
|
+
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
5
|
+
(async () => {
|
6
|
+
const runeIds = {};
|
7
|
+
// Construct the new data and assign it to product object
|
8
|
+
for (const runeTree of RunesReforged_1.RunesReforged) {
|
9
|
+
for (const { runes } of runeTree.slots) {
|
10
|
+
for (const rune of runes) {
|
11
|
+
runeIds[rune.name] = rune.id;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
15
|
+
// Write to file
|
16
|
+
const constName = 'NonStatRuneIdsNum';
|
17
|
+
const typeName = 'NonStatRuneIdNum';
|
18
|
+
(0, writeToTmpFile_1.writeToTmpFile)(constName, {
|
19
|
+
constName,
|
20
|
+
typeName,
|
21
|
+
json: runeIds,
|
22
|
+
});
|
23
|
+
})();
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const RunesReforged_1 = require("../constants/RunesReforged");
|
4
|
+
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
5
|
+
const RuneIdComment_1 = require("./constants/RuneIdComment");
|
6
|
+
(async () => {
|
7
|
+
const runeIds = {};
|
8
|
+
// Construct the new data and assign it to product object
|
9
|
+
for (const runeTree of RunesReforged_1.RunesReforged) {
|
10
|
+
for (const { runes } of runeTree.slots) {
|
11
|
+
for (const rune of runes) {
|
12
|
+
runeIds[rune.name] = String(rune.id);
|
13
|
+
}
|
14
|
+
}
|
15
|
+
}
|
16
|
+
// Write to file
|
17
|
+
const constName = 'NonStatRuneIds';
|
18
|
+
(0, writeToTmpFile_1.writeToTmpFile)(constName, {
|
19
|
+
constName,
|
20
|
+
includeAutoTypeName: true,
|
21
|
+
typeComment: RuneIdComment_1.RuneIdComment,
|
22
|
+
json: runeIds,
|
23
|
+
});
|
24
|
+
})();
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const RunesReforged_1 = require("../constants/RunesReforged");
|
4
|
+
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
5
|
+
(async () => {
|
6
|
+
const runeNames = {};
|
7
|
+
// Construct the new data and assign it to product object
|
8
|
+
for (const runeTree of RunesReforged_1.RunesReforged) {
|
9
|
+
for (const { runes } of runeTree.slots) {
|
10
|
+
for (const rune of runes) {
|
11
|
+
runeNames[rune.id] = rune.name;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
15
|
+
// Write to file
|
16
|
+
const constName = 'NonStatRuneNames';
|
17
|
+
(0, writeToTmpFile_1.writeToTmpFile)(constName, {
|
18
|
+
constName,
|
19
|
+
includeAutoTypeName: true,
|
20
|
+
json: runeNames,
|
21
|
+
});
|
22
|
+
})();
|
@@ -2,6 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const RunesReforged_1 = require("../constants/RunesReforged");
|
4
4
|
const StatRunesByRow_1 = require("../constants/StatRunesByRow");
|
5
|
+
const RuneIdComment_1 = require("./constants/RuneIdComment");
|
5
6
|
const validateNumber_1 = require("./helpers/validateNumber");
|
6
7
|
const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
7
8
|
(async () => {
|
@@ -11,7 +12,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
11
12
|
SecondaryRuneTrees: {},
|
12
13
|
KeystoneIds: {},
|
13
14
|
StatRuneIds: {},
|
14
|
-
|
15
|
+
RuneHSets: {},
|
15
16
|
StatRuneHSets: {},
|
16
17
|
};
|
17
18
|
const keystoneHSetIdx = 0;
|
@@ -39,12 +40,12 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
39
40
|
if (currentHSetIdx == keystoneHSetIdx) {
|
40
41
|
runeSets.KeystoneIds[runeName] = id;
|
41
42
|
}
|
42
|
-
// Add to
|
43
|
-
if (!(runeTreeName in runeSets.
|
44
|
-
runeSets.
|
45
|
-
if (!runeSets.
|
46
|
-
runeSets.
|
47
|
-
runeSets.
|
43
|
+
// Add to RuneHSets
|
44
|
+
if (!(runeTreeName in runeSets.RuneHSets))
|
45
|
+
runeSets.RuneHSets[runeTreeName] = {};
|
46
|
+
if (!runeSets.RuneHSets[runeTreeName][currentHSetIdx])
|
47
|
+
runeSets.RuneHSets[runeTreeName][currentHSetIdx] = {};
|
48
|
+
runeSets.RuneHSets[runeTreeName][currentHSetIdx][runeName] = id;
|
48
49
|
}
|
49
50
|
++currentHSetIdx;
|
50
51
|
}
|
@@ -75,9 +76,13 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
75
76
|
json: runeSets.KeystoneIds,
|
76
77
|
}, {
|
77
78
|
constName: 'StatRuneIdsNum',
|
79
|
+
typeName: 'StatRuneIdNum',
|
80
|
+
typeComment: RuneIdComment_1.RuneIdComment,
|
78
81
|
json: runeSets.StatRuneIds,
|
79
82
|
}, {
|
80
83
|
constName: 'RuneIdsNum',
|
84
|
+
typeName: 'RuneIdNum',
|
85
|
+
typeComment: RuneIdComment_1.RuneIdComment,
|
81
86
|
json: {
|
82
87
|
1: '...PrimaryRuneTreesByRuneNamesNum.Precision',
|
83
88
|
2: '...PrimaryRuneTreesByRuneNamesNum.Domination',
|
@@ -88,8 +93,8 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
88
93
|
},
|
89
94
|
keysToEscape: [1, 2, 3, 4, 5, 6],
|
90
95
|
}, {
|
91
|
-
constName: '
|
92
|
-
json: runeSets.
|
96
|
+
constName: 'RuneHSetsByRuneNamesNum',
|
97
|
+
json: runeSets.RuneHSets,
|
93
98
|
}, {
|
94
99
|
constName: 'StatRuneHSetsByRuneNamesNum',
|
95
100
|
json: runeSets.StatRuneHSets,
|
@@ -102,7 +107,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
102
107
|
'KeystoneIdsNum': 'KeystoneIdsNum',
|
103
108
|
'StatRuneIdsNum': 'StatRuneIdsNum',
|
104
109
|
'RuneIdsNum': 'RuneIdsNum',
|
105
|
-
'
|
110
|
+
'RuneHSetsByRuneNamesNum': 'RuneHSetsByRuneNamesNum',
|
106
111
|
'StatRuneHSetsByRuneNamesNum': 'StatRuneHSetsByRuneNamesNum',
|
107
112
|
},
|
108
113
|
keysToEscape: [
|
@@ -111,7 +116,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
111
116
|
'KeystoneIdsNum',
|
112
117
|
'StatRuneIdsNum',
|
113
118
|
'RuneIdsNum',
|
114
|
-
'
|
119
|
+
'RuneHSetsByRuneNamesNum',
|
115
120
|
'StatRuneHSetsByRuneNamesNum',
|
116
121
|
],
|
117
122
|
});
|
@@ -11,7 +11,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
11
11
|
SecondaryRuneTrees: {},
|
12
12
|
KeystoneIds: {},
|
13
13
|
StatRuneIds: {},
|
14
|
-
|
14
|
+
RuneHSets: {},
|
15
15
|
StatRuneHSets: {},
|
16
16
|
};
|
17
17
|
const keystoneHSetIdx = 0;
|
@@ -39,12 +39,12 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
39
39
|
if (currentHSetIdx == keystoneHSetIdx) {
|
40
40
|
runeSets.KeystoneIds[runeName] = String(id);
|
41
41
|
}
|
42
|
-
// Add to
|
43
|
-
if (!(runeTreeName in runeSets.
|
44
|
-
runeSets.
|
45
|
-
if (!runeSets.
|
46
|
-
runeSets.
|
47
|
-
runeSets.
|
42
|
+
// Add to RuneHSets
|
43
|
+
if (!(runeTreeName in runeSets.RuneHSets))
|
44
|
+
runeSets.RuneHSets[runeTreeName] = {};
|
45
|
+
if (!runeSets.RuneHSets[runeTreeName][currentHSetIdx])
|
46
|
+
runeSets.RuneHSets[runeTreeName][currentHSetIdx] = {};
|
47
|
+
runeSets.RuneHSets[runeTreeName][currentHSetIdx][runeName] = String(id);
|
48
48
|
}
|
49
49
|
++currentHSetIdx;
|
50
50
|
}
|
@@ -91,8 +91,8 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
91
91
|
},
|
92
92
|
keysToEscape: [1, 2, 3, 4, 5, 6],
|
93
93
|
}, {
|
94
|
-
constName: '
|
95
|
-
json: runeSets.
|
94
|
+
constName: 'RuneHSetsByRuneNames',
|
95
|
+
json: runeSets.RuneHSets,
|
96
96
|
}, {
|
97
97
|
constName: 'StatRuneHSetsByRuneNames',
|
98
98
|
json: runeSets.StatRuneHSets,
|
@@ -105,7 +105,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
105
105
|
'KeystoneIds': 'KeystoneIds',
|
106
106
|
'StatRuneIds': 'StatRuneIds',
|
107
107
|
'RuneIds': 'RuneIds',
|
108
|
-
'
|
108
|
+
'RuneHSetsByRuneNames': 'RuneHSetsByRuneNames',
|
109
109
|
'StatRuneHSetsByRuneNames': 'StatRuneHSetsByRuneNames',
|
110
110
|
},
|
111
111
|
keysToEscape: [
|
@@ -114,7 +114,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
114
114
|
'KeystoneIds',
|
115
115
|
'StatRuneIds',
|
116
116
|
'RuneIds',
|
117
|
-
'
|
117
|
+
'RuneHSetsByRuneNames',
|
118
118
|
'StatRuneHSetsByRuneNames',
|
119
119
|
],
|
120
120
|
});
|
@@ -10,7 +10,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
10
10
|
SecondaryRuneTrees: {},
|
11
11
|
KeystoneNames: {},
|
12
12
|
StatRuneNames: {},
|
13
|
-
|
13
|
+
RuneHSets: {},
|
14
14
|
StatRuneHSets: {},
|
15
15
|
};
|
16
16
|
const keystoneHSetIdx = 0;
|
@@ -38,12 +38,12 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
38
38
|
if (currentHSetIdx == keystoneHSetIdx) {
|
39
39
|
runeSets.KeystoneNames[id] = runeName;
|
40
40
|
}
|
41
|
-
// Add to
|
42
|
-
if (!(runeTreeName in runeSets.
|
43
|
-
runeSets.
|
44
|
-
if (!runeSets.
|
45
|
-
runeSets.
|
46
|
-
runeSets.
|
41
|
+
// Add to RuneHSets
|
42
|
+
if (!(runeTreeName in runeSets.RuneHSets))
|
43
|
+
runeSets.RuneHSets[runeTreeName] = {};
|
44
|
+
if (!runeSets.RuneHSets[runeTreeName][currentHSetIdx])
|
45
|
+
runeSets.RuneHSets[runeTreeName][currentHSetIdx] = {};
|
46
|
+
runeSets.RuneHSets[runeTreeName][currentHSetIdx][id] = runeName;
|
47
47
|
}
|
48
48
|
++currentHSetIdx;
|
49
49
|
}
|
@@ -88,8 +88,8 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
88
88
|
},
|
89
89
|
keysToEscape: [1, 2, 3, 4, 5, 6],
|
90
90
|
}, {
|
91
|
-
constName: '
|
92
|
-
json: runeSets.
|
91
|
+
constName: 'RuneHSets',
|
92
|
+
json: runeSets.RuneHSets,
|
93
93
|
}, {
|
94
94
|
constName: 'StatRuneHSets',
|
95
95
|
json: runeSets.StatRuneHSets,
|
@@ -102,7 +102,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
102
102
|
'KeystoneNames': 'KeystoneNames',
|
103
103
|
'StatRuneNames': 'StatRuneNames',
|
104
104
|
'RuneNames': 'RuneNames',
|
105
|
-
'
|
105
|
+
'RuneHSets': 'RuneHSets',
|
106
106
|
'StatRuneHSets': 'StatRuneHSets',
|
107
107
|
},
|
108
108
|
keysToEscape: [
|
@@ -111,7 +111,7 @@ const writeToTmpFile_1 = require("./helpers/writeToTmpFile");
|
|
111
111
|
'KeystoneNames',
|
112
112
|
'StatRuneNames',
|
113
113
|
'RuneNames',
|
114
|
-
'
|
114
|
+
'RuneHSets',
|
115
115
|
'StatRuneHSets',
|
116
116
|
],
|
117
117
|
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export declare const Continents: {
|
2
|
+
readonly AMERICAS: "AMERICAS";
|
3
|
+
readonly ASIA: "ASIA";
|
4
|
+
readonly EUROPE: "EUROPE";
|
5
|
+
readonly SEA: "SEA";
|
6
|
+
};
|
7
|
+
export type Continent = typeof Continents[keyof typeof Continents];
|
8
|
+
export declare function isContinent(value: any): value is Continent;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isContinent = exports.Continents = void 0;
|
4
|
+
exports.Continents = {
|
5
|
+
'AMERICAS': 'AMERICAS',
|
6
|
+
'ASIA': 'ASIA',
|
7
|
+
'EUROPE': 'EUROPE',
|
8
|
+
'SEA': 'SEA',
|
9
|
+
};
|
10
|
+
function isContinent(value) {
|
11
|
+
return typeof value == 'string' && value in exports.Continents;
|
12
|
+
}
|
13
|
+
exports.isContinent = isContinent;
|
@@ -2,6 +2,8 @@
|
|
2
2
|
* Data Dragon CDN Paths.
|
3
3
|
*/
|
4
4
|
export declare const DataDragonUrls: {
|
5
|
+
readonly DATA_DRAGON_BASE: string;
|
6
|
+
readonly COMMUNITY_DRAGON_BASE: string;
|
5
7
|
/**
|
6
8
|
* Append with `/MonkeyKing.png` (`/{championId}.png`).
|
7
9
|
*/
|
@@ -26,6 +28,14 @@ export declare const DataDragonUrls: {
|
|
26
28
|
* Append with `/1001.png` (`/{itemId}.png`).
|
27
29
|
*/
|
28
30
|
readonly ITEM_ICON_BASE: `${string}/img/item`;
|
31
|
+
/**
|
32
|
+
* Append with `/MonkeyKing.json` (`/{championId}.json`).
|
33
|
+
*/
|
34
|
+
readonly CHAMPION_BASE: `${string}/data/en_US/champion`;
|
35
|
+
readonly CHAMPION: `${string}/data/en_US/champion.json`;
|
36
|
+
readonly ITEM: `${string}/data/en_US/item.json`;
|
37
|
+
readonly RUNES_REFORGED: `${string}/data/en_US/runesReforged.json`;
|
38
|
+
readonly SUMMONER: `${string}/data/en_US/summoner.json`;
|
29
39
|
/**
|
30
40
|
* @see https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/v1/perk-images/statmods
|
31
41
|
*/
|
@@ -34,5 +44,8 @@ export declare const DataDragonUrls: {
|
|
34
44
|
* @see https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/v1/perk-images/styles
|
35
45
|
*/
|
36
46
|
readonly TREE_RUNE_ICON_BASE: `${string}/plugins/rcp-be-lol-game-data/global/default/v1/perk-images/styles`;
|
47
|
+
/**
|
48
|
+
* @see https://raw.communitydragon.org/latest/plugins/rcp-fe-lol-static-assets/global/default/svg
|
49
|
+
*/
|
37
50
|
readonly POSITION_ICON_BASE: `${string}/plugins/rcp-fe-lol-static-assets/global/default/svg`;
|
38
51
|
};
|
@@ -2,13 +2,16 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.DataDragonUrls = void 0;
|
4
4
|
const version = '13.10.1';
|
5
|
-
const base = `https://ddragon.leagueoflegends.com/cdn/${version}`;
|
6
5
|
const cdragonVersion = '13.10';
|
6
|
+
const base = `https://ddragon.leagueoflegends.com/cdn/${version}`;
|
7
7
|
const cdragonBase = `https://raw.communitydragon.org/${cdragonVersion}`;
|
8
|
+
const locale = 'en_US';
|
8
9
|
/**
|
9
10
|
* Data Dragon CDN Paths.
|
10
11
|
*/
|
11
12
|
exports.DataDragonUrls = {
|
13
|
+
DATA_DRAGON_BASE: base,
|
14
|
+
COMMUNITY_DRAGON_BASE: cdragonBase,
|
12
15
|
/**
|
13
16
|
* Append with `/MonkeyKing.png` (`/{championId}.png`).
|
14
17
|
*/
|
@@ -33,6 +36,14 @@ exports.DataDragonUrls = {
|
|
33
36
|
* Append with `/1001.png` (`/{itemId}.png`).
|
34
37
|
*/
|
35
38
|
ITEM_ICON_BASE: `${base}/img/item`,
|
39
|
+
/**
|
40
|
+
* Append with `/MonkeyKing.json` (`/{championId}.json`).
|
41
|
+
*/
|
42
|
+
CHAMPION_BASE: `${base}/data/${locale}/champion`,
|
43
|
+
CHAMPION: `${base}/data/${locale}/champion.json`,
|
44
|
+
ITEM: `${base}/data/${locale}/item.json`,
|
45
|
+
RUNES_REFORGED: `${base}/data/${locale}/runesReforged.json`,
|
46
|
+
SUMMONER: `${base}/data/${locale}/summoner.json`,
|
36
47
|
/**
|
37
48
|
* @see https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/v1/perk-images/statmods
|
38
49
|
*/
|
@@ -41,5 +52,8 @@ exports.DataDragonUrls = {
|
|
41
52
|
* @see https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/v1/perk-images/styles
|
42
53
|
*/
|
43
54
|
TREE_RUNE_ICON_BASE: `${cdragonBase}/plugins/rcp-be-lol-game-data/global/default/v1/perk-images/styles`,
|
55
|
+
/**
|
56
|
+
* @see https://raw.communitydragon.org/latest/plugins/rcp-fe-lol-static-assets/global/default/svg
|
57
|
+
*/
|
44
58
|
POSITION_ICON_BASE: `${cdragonBase}/plugins/rcp-fe-lol-static-assets/global/default/svg`,
|
45
59
|
};
|
@@ -1,31 +1,59 @@
|
|
1
1
|
export declare const Locales: {
|
2
|
+
/** Czech (Czech Republic) */
|
2
3
|
readonly cs_CZ: "cs_CZ";
|
4
|
+
/** Greek (Greece) */
|
3
5
|
readonly el_GR: "el_GR";
|
6
|
+
/** Polish (Poland) */
|
4
7
|
readonly pl_PL: "pl_PL";
|
8
|
+
/** Romanian (Romania) */
|
5
9
|
readonly ro_RO: "ro_RO";
|
10
|
+
/** Hungarian (Hungary) */
|
6
11
|
readonly hu_HU: "hu_HU";
|
12
|
+
/** English (United Kingdom) */
|
7
13
|
readonly en_GB: "en_GB";
|
14
|
+
/** German (Germany) */
|
8
15
|
readonly de_DE: "de_DE";
|
16
|
+
/** Spanish (Spain) */
|
9
17
|
readonly es_ES: "es_ES";
|
18
|
+
/** Italian (Italy) */
|
10
19
|
readonly it_IT: "it_IT";
|
20
|
+
/** French (France) */
|
11
21
|
readonly fr_FR: "fr_FR";
|
22
|
+
/** Japanese (Japan) */
|
12
23
|
readonly ja_JP: "ja_JP";
|
24
|
+
/** Korean (Korea) */
|
13
25
|
readonly ko_KR: "ko_KR";
|
26
|
+
/** Spanish (Mexico) */
|
14
27
|
readonly es_MX: "es_MX";
|
28
|
+
/** Spanish (Argentina) */
|
15
29
|
readonly es_AR: "es_AR";
|
30
|
+
/** Portuguese (Brazil) */
|
16
31
|
readonly pt_BR: "pt_BR";
|
32
|
+
/** English (United States) */
|
17
33
|
readonly en_US: "en_US";
|
34
|
+
/** English (Australia) */
|
18
35
|
readonly en_AU: "en_AU";
|
36
|
+
/** Russian (Russia) */
|
19
37
|
readonly ru_RU: "ru_RU";
|
38
|
+
/** Turkish (Turkey) */
|
20
39
|
readonly tr_TR: "tr_TR";
|
40
|
+
/** Malay (Malaysia) */
|
21
41
|
readonly ms_MY: "ms_MY";
|
42
|
+
/** English (Republic of the Philippines) */
|
22
43
|
readonly en_PH: "en_PH";
|
44
|
+
/** English (Singapore) */
|
23
45
|
readonly en_SG: "en_SG";
|
46
|
+
/** Thai (Thailand) */
|
24
47
|
readonly th_TH: "th_TH";
|
25
|
-
|
48
|
+
/** Vietnamese (Viet Nam) */
|
49
|
+
readonly vi_VN: "vi_VN";
|
50
|
+
/** Indonesian (Indonesia) */
|
26
51
|
readonly id_ID: "id_ID";
|
52
|
+
/** Chinese (Malaysia) */
|
27
53
|
readonly zh_MY: "zh_MY";
|
54
|
+
/** Chinese (China) */
|
28
55
|
readonly zh_CN: "zh_CN";
|
56
|
+
/** Chinese (Taiwan) */
|
29
57
|
readonly zh_TW: "zh_TW";
|
30
58
|
};
|
31
59
|
export type Locale = typeof Locales[keyof typeof Locales];
|
@@ -2,33 +2,61 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.isLocale = exports.Locales = void 0;
|
4
4
|
exports.Locales = {
|
5
|
+
/** Czech (Czech Republic) */
|
5
6
|
'cs_CZ': 'cs_CZ',
|
7
|
+
/** Greek (Greece) */
|
6
8
|
'el_GR': 'el_GR',
|
9
|
+
/** Polish (Poland) */
|
7
10
|
'pl_PL': 'pl_PL',
|
11
|
+
/** Romanian (Romania) */
|
8
12
|
'ro_RO': 'ro_RO',
|
13
|
+
/** Hungarian (Hungary) */
|
9
14
|
'hu_HU': 'hu_HU',
|
15
|
+
/** English (United Kingdom) */
|
10
16
|
'en_GB': 'en_GB',
|
17
|
+
/** German (Germany) */
|
11
18
|
'de_DE': 'de_DE',
|
19
|
+
/** Spanish (Spain) */
|
12
20
|
'es_ES': 'es_ES',
|
21
|
+
/** Italian (Italy) */
|
13
22
|
'it_IT': 'it_IT',
|
23
|
+
/** French (France) */
|
14
24
|
'fr_FR': 'fr_FR',
|
25
|
+
/** Japanese (Japan) */
|
15
26
|
'ja_JP': 'ja_JP',
|
27
|
+
/** Korean (Korea) */
|
16
28
|
'ko_KR': 'ko_KR',
|
29
|
+
/** Spanish (Mexico) */
|
17
30
|
'es_MX': 'es_MX',
|
31
|
+
/** Spanish (Argentina) */
|
18
32
|
'es_AR': 'es_AR',
|
33
|
+
/** Portuguese (Brazil) */
|
19
34
|
'pt_BR': 'pt_BR',
|
35
|
+
/** English (United States) */
|
20
36
|
'en_US': 'en_US',
|
37
|
+
/** English (Australia) */
|
21
38
|
'en_AU': 'en_AU',
|
39
|
+
/** Russian (Russia) */
|
22
40
|
'ru_RU': 'ru_RU',
|
41
|
+
/** Turkish (Turkey) */
|
23
42
|
'tr_TR': 'tr_TR',
|
43
|
+
/** Malay (Malaysia) */
|
24
44
|
'ms_MY': 'ms_MY',
|
45
|
+
/** English (Republic of the Philippines) */
|
25
46
|
'en_PH': 'en_PH',
|
47
|
+
/** English (Singapore) */
|
26
48
|
'en_SG': 'en_SG',
|
49
|
+
/** Thai (Thailand) */
|
27
50
|
'th_TH': 'th_TH',
|
28
|
-
|
51
|
+
/** Vietnamese (Viet Nam) */
|
52
|
+
'vi_VN': 'vi_VN',
|
53
|
+
/** Indonesian (Indonesia) */
|
29
54
|
'id_ID': 'id_ID',
|
55
|
+
/** Chinese (Malaysia) */
|
30
56
|
'zh_MY': 'zh_MY',
|
57
|
+
/** Chinese (China) */
|
31
58
|
'zh_CN': 'zh_CN',
|
59
|
+
/** Chinese (Taiwan) */
|
32
60
|
'zh_TW': 'zh_TW',
|
33
61
|
};
|
34
62
|
function isLocale(value) {
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* 11 — Summoner's Rift
|
3
|
+
*
|
4
|
+
* 12 — Howling Abyss
|
5
|
+
*
|
6
|
+
* 21 — Nexus Blitz
|
7
|
+
*
|
8
|
+
* 22 — Convergence
|
9
|
+
*/
|
10
|
+
export declare const MapIds: {
|
11
|
+
readonly 11: 11;
|
12
|
+
readonly 12: 12;
|
13
|
+
readonly 21: 21;
|
14
|
+
readonly 22: 22;
|
15
|
+
};
|
16
|
+
export type MapId = typeof MapIds[keyof typeof MapIds];
|
17
|
+
export declare function isMapId(value: number): value is MapId;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isMapId = exports.MapIds = void 0;
|
4
|
+
/**
|
5
|
+
* 11 — Summoner's Rift
|
6
|
+
*
|
7
|
+
* 12 — Howling Abyss
|
8
|
+
*
|
9
|
+
* 21 — Nexus Blitz
|
10
|
+
*
|
11
|
+
* 22 — Convergence
|
12
|
+
*/
|
13
|
+
exports.MapIds = {
|
14
|
+
11: 11,
|
15
|
+
12: 12,
|
16
|
+
21: 21,
|
17
|
+
22: 22,
|
18
|
+
};
|
19
|
+
function isMapId(value) {
|
20
|
+
return value in exports.MapIds;
|
21
|
+
}
|
22
|
+
exports.isMapId = isMapId;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export declare const ParticipantIds: {
|
2
|
+
readonly 1: 1;
|
3
|
+
readonly 2: 2;
|
4
|
+
readonly 3: 3;
|
5
|
+
readonly 4: 4;
|
6
|
+
readonly 5: 5;
|
7
|
+
readonly 6: 6;
|
8
|
+
readonly 7: 7;
|
9
|
+
readonly 8: 8;
|
10
|
+
readonly 9: 9;
|
11
|
+
readonly 10: 10;
|
12
|
+
};
|
13
|
+
export type ParticipantId = typeof ParticipantIds[keyof typeof ParticipantIds];
|
14
|
+
export declare function isParticipantId(value: number): value is ParticipantId;
|