lol-constants 0.4.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Constants/ChampionKeys.d.ts +2 -0
- package/dist/Constants/ChampionKeys.js +8 -0
- package/dist/Constants/ChampionNames.d.ts +2 -0
- package/dist/Constants/ChampionNames.js +8 -0
- package/dist/Constants/ItemKeys.d.ts +2 -0
- package/dist/Constants/ItemKeys.js +8 -0
- package/dist/Constants/ItemNames.d.ts +2 -0
- package/dist/Constants/ItemNames.js +8 -0
- package/dist/Constants/RuneIds.d.ts +2 -0
- package/dist/Constants/RuneIds.js +12 -0
- package/dist/Constants/RuneNames.d.ts +2 -0
- package/dist/Constants/RuneNames.js +8 -0
- package/dist/Constants/StatRunes.d.ts +11 -0
- package/dist/Constants/StatRunes.js +14 -0
- package/dist/Constants/SummonerIds.d.ts +2 -0
- package/dist/Constants/SummonerIds.js +8 -0
- package/dist/Constants/SummonerKeys.d.ts +2 -0
- package/dist/Constants/SummonerKeys.js +8 -0
- package/dist/Constants/SummonerNames.d.ts +2 -0
- package/dist/Constants/SummonerNames.js +8 -0
- package/dist/Helpers/generateItemsByName.d.ts +1 -0
- package/dist/Helpers/generateItemsByName.js +25 -0
- package/dist/Helpers/generateRunesById.d.ts +1 -0
- package/dist/Helpers/generateRunesById.js +20 -0
- package/dist/Helpers/generateRunesByName.d.ts +1 -0
- package/dist/Helpers/generateRunesByName.js +20 -0
- package/dist/Helpers/generateSummonersByKey.d.ts +1 -0
- package/dist/Helpers/generateSummonersByKey.js +24 -0
- package/dist/Helpers/generateSummonersByName.d.ts +1 -0
- package/dist/Helpers/generateSummonersByName.js +24 -0
- package/dist/generated/itemByKey.json +1 -0
- package/dist/generated/itemByName.json +1 -0
- package/dist/generated/runesById.json +1 -0
- package/dist/generated/runesByName.json +1 -0
- package/dist/generated/summonerByKey.json +1 -0
- package/dist/generated/summonerByName.json +1 -0
- package/dist/index.d.ts +11117 -0
- package/dist/index.js +31 -1
- package/dist/scripts/generate-all.js +10 -0
- package/dist/types/index.d.ts +18 -1
- package/package.json +4 -4
@@ -0,0 +1,8 @@
|
|
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.ChampionKeys = void 0;
|
7
|
+
const championByKey_json_1 = __importDefault(require("../generated/championByKey.json"));
|
8
|
+
exports.ChampionKeys = (Object.keys(championByKey_json_1.default.data).map(key => key));
|
@@ -0,0 +1,8 @@
|
|
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.ChampionNames = void 0;
|
7
|
+
const championByName_json_1 = __importDefault(require("../generated/championByName.json"));
|
8
|
+
exports.ChampionNames = (Object.keys(championByName_json_1.default.data).map(name => name));
|
@@ -0,0 +1,8 @@
|
|
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.ItemKeys = void 0;
|
7
|
+
const item_json_1 = __importDefault(require("../assets/item.json"));
|
8
|
+
exports.ItemKeys = (Object.keys(item_json_1.default.data).map(key => key));
|
@@ -0,0 +1,8 @@
|
|
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.ItemNames = void 0;
|
7
|
+
const itemByName_json_1 = __importDefault(require("../generated/itemByName.json"));
|
8
|
+
exports.ItemNames = (Object.keys(itemByName_json_1.default.data).map(name => name));
|
@@ -0,0 +1,12 @@
|
|
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.RuneIds = void 0;
|
7
|
+
const runesById_json_1 = __importDefault(require("../generated/runesById.json"));
|
8
|
+
const StatRunes_1 = require("./StatRunes");
|
9
|
+
exports.RuneIds = [
|
10
|
+
...Object.keys(runesById_json_1.default).map(id => id),
|
11
|
+
...Object.keys(StatRunes_1.StatRunes).map(id => id),
|
12
|
+
];
|
@@ -0,0 +1,8 @@
|
|
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.RuneNames = void 0;
|
7
|
+
const runesByName_json_1 = __importDefault(require("../generated/runesByName.json"));
|
8
|
+
exports.RuneNames = (Object.keys(runesByName_json_1.default).map(name => name));
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export declare const StatRunes: {
|
2
|
+
readonly '5001': "DefenseHP";
|
3
|
+
readonly '5002': "DefenseAR";
|
4
|
+
readonly '5003': "DefenseMR";
|
5
|
+
readonly '5002f': "FlexAR";
|
6
|
+
readonly '5003f': "FlexMR";
|
7
|
+
readonly '5008f': "FlexAF";
|
8
|
+
readonly '5005': "OffenseAS";
|
9
|
+
readonly '5007': "OffenseAH";
|
10
|
+
readonly '5008': "OffenseAF";
|
11
|
+
};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.StatRunes = void 0;
|
4
|
+
exports.StatRunes = {
|
5
|
+
'5001': 'DefenseHP',
|
6
|
+
'5002': 'DefenseAR',
|
7
|
+
'5003': 'DefenseMR',
|
8
|
+
'5002f': 'FlexAR',
|
9
|
+
'5003f': 'FlexMR',
|
10
|
+
'5008f': 'FlexAF',
|
11
|
+
'5005': 'OffenseAS',
|
12
|
+
'5007': 'OffenseAH',
|
13
|
+
'5008': 'OffenseAF',
|
14
|
+
};
|
@@ -0,0 +1,8 @@
|
|
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));
|
@@ -0,0 +1,8 @@
|
|
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));
|
@@ -0,0 +1,8 @@
|
|
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));
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function generateItemsByName(): void;
|
@@ -0,0 +1,25 @@
|
|
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;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function generateRunesById(): void;
|
@@ -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
|
+
exports.generateRunesById = void 0;
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
8
|
+
const runesReforged_json_1 = __importDefault(require("../assets/runesReforged.json"));
|
9
|
+
function generateRunesById() {
|
10
|
+
const runesById = {};
|
11
|
+
for (const runeTree of runesReforged_json_1.default) {
|
12
|
+
for (const { runes } of runeTree.slots) {
|
13
|
+
for (const rune of runes) {
|
14
|
+
runesById[rune.id] = rune;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
fs_1.default.writeFileSync(`src/generated/runesById.json`, JSON.stringify(runesById));
|
19
|
+
}
|
20
|
+
exports.generateRunesById = generateRunesById;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function generateRunesByName(): void;
|
@@ -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
|
+
exports.generateRunesByName = void 0;
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
8
|
+
const runesReforged_json_1 = __importDefault(require("../assets/runesReforged.json"));
|
9
|
+
function generateRunesByName() {
|
10
|
+
const runesByName = {};
|
11
|
+
for (const runeTree of runesReforged_json_1.default) {
|
12
|
+
for (const { runes } of runeTree.slots) {
|
13
|
+
for (const rune of runes) {
|
14
|
+
runesByName[rune.name] = rune;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
fs_1.default.writeFileSync(`src/generated/runesByName.json`, JSON.stringify(runesByName));
|
19
|
+
}
|
20
|
+
exports.generateRunesByName = generateRunesByName;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function generateSummonersByKey(): void;
|
@@ -0,0 +1,24 @@
|
|
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;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function generateSummonersByName(): void;
|
@@ -0,0 +1,24 @@
|
|
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;
|