lol-constants 0.10.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. package/dist/Constants/ChampionIds.d.ts +162 -0
  2. package/dist/Constants/ChampionIds.js +4 -0
  3. package/dist/Constants/ChampionIdsByName.d.ts +162 -0
  4. package/dist/Constants/ChampionIdsByName.js +4 -0
  5. package/dist/Constants/ChampionKeys.d.ts +162 -2
  6. package/dist/Constants/ChampionKeys.js +1 -5
  7. package/dist/Constants/ChampionNames.d.ts +162 -2
  8. package/dist/Constants/ChampionNames.js +1 -5
  9. package/dist/Constants/DDPaths.d.ts +24 -6
  10. package/dist/Constants/DDPaths.js +26 -8
  11. package/dist/Constants/ItemKeys.d.ts +250 -2
  12. package/dist/Constants/ItemKeys.js +1 -5
  13. package/dist/Constants/ItemNames.d.ts +256 -2
  14. package/dist/Constants/ItemNames.js +1 -5
  15. package/dist/Constants/RuneIds.d.ts +74 -2
  16. package/dist/Constants/RuneIds.js +1 -9
  17. package/dist/Constants/RuneNames.d.ts +74 -2
  18. package/dist/Constants/RuneNames.js +1 -5
  19. package/dist/Constants/RuneSets.d.ts +34 -0
  20. package/dist/Constants/RuneSets.js +15 -15
  21. package/dist/Constants/SpellIds.d.ts +18 -0
  22. package/dist/Constants/SpellIds.js +4 -0
  23. package/dist/Constants/SpellIdsByName.d.ts +17 -0
  24. package/dist/Constants/SpellIdsByName.js +4 -0
  25. package/dist/Constants/SpellKeys.d.ts +18 -0
  26. package/dist/Constants/SpellKeys.js +4 -0
  27. package/dist/Constants/SpellNames.d.ts +18 -0
  28. package/dist/Constants/SpellNames.js +4 -0
  29. package/dist/Constants/StatRuneIds.d.ts +11 -2
  30. package/dist/Constants/StatRuneIds.js +1 -2
  31. package/dist/Constants/StatRuneNames.d.ts +11 -2
  32. package/dist/Constants/StatRuneNames.js +1 -2
  33. package/dist/Constants/TreeRuneIds.d.ts +65 -2
  34. package/dist/Constants/TreeRuneIds.js +1 -5
  35. package/dist/Constants/TreeRuneNames.d.ts +65 -2
  36. package/dist/Constants/TreeRuneNames.js +1 -5
  37. package/dist/Helpers/getChampionIdByKey.d.ts +2 -0
  38. package/dist/Helpers/getChampionIdByKey.js +8 -0
  39. package/dist/Helpers/getChampionIdByName.d.ts +2 -0
  40. package/dist/Helpers/getChampionIdByName.js +8 -0
  41. package/dist/Helpers/getChampionKeyById.d.ts +2 -0
  42. package/dist/Helpers/getChampionKeyById.js +8 -0
  43. package/dist/Helpers/getChampionKeyByName.js +3 -5
  44. package/dist/Helpers/getChampionNameById.d.ts +2 -0
  45. package/dist/Helpers/getChampionNameById.js +9 -0
  46. package/dist/Helpers/getChampionNameByKey.js +2 -5
  47. package/dist/Helpers/getItemKeyByName.js +2 -5
  48. package/dist/Helpers/getItemNameByKey.js +2 -5
  49. package/dist/Helpers/getRuneIdByName.js +2 -17
  50. package/dist/Helpers/getRuneNameById.js +2 -9
  51. package/dist/Helpers/getSpellIdByKey.d.ts +2 -0
  52. package/dist/Helpers/getSpellIdByKey.js +8 -0
  53. package/dist/Helpers/getSpellIdByName.d.ts +2 -0
  54. package/dist/Helpers/getSpellIdByName.js +8 -0
  55. package/dist/Helpers/getSpellKeyById.d.ts +2 -0
  56. package/dist/Helpers/getSpellKeyById.js +8 -0
  57. package/dist/Helpers/getSpellKeyByName.d.ts +2 -0
  58. package/dist/Helpers/getSpellKeyByName.js +9 -0
  59. package/dist/Helpers/getSpellNameById.d.ts +2 -0
  60. package/dist/Helpers/getSpellNameById.js +9 -0
  61. package/dist/Helpers/getSpellNameByKey.d.ts +2 -0
  62. package/dist/Helpers/getSpellNameByKey.js +8 -0
  63. package/dist/Helpers/getStatRuneIdByName.d.ts +2 -0
  64. package/dist/Helpers/getStatRuneIdByName.js +8 -0
  65. package/dist/Helpers/getStatRuneNameById.d.ts +2 -0
  66. package/dist/Helpers/getStatRuneNameById.js +8 -0
  67. package/dist/Helpers/getTreeRuneIdByName.d.ts +2 -0
  68. package/dist/Helpers/getTreeRuneIdByName.js +8 -0
  69. package/dist/Helpers/getTreeRuneNameById.d.ts +2 -0
  70. package/dist/Helpers/getTreeRuneNameById.js +8 -0
  71. package/dist/Helpers/isChampionId.d.ts +2 -0
  72. package/dist/Helpers/isChampionId.js +8 -0
  73. package/dist/Helpers/isChampionKey.d.ts +1 -1
  74. package/dist/Helpers/isChampionKey.js +2 -4
  75. package/dist/Helpers/isChampionName.d.ts +1 -1
  76. package/dist/Helpers/isChampionName.js +2 -4
  77. package/dist/Helpers/isItemKey.d.ts +1 -1
  78. package/dist/Helpers/isItemKey.js +2 -4
  79. package/dist/Helpers/isItemName.d.ts +1 -1
  80. package/dist/Helpers/isItemName.js +2 -4
  81. package/dist/Helpers/isRuneId.d.ts +1 -1
  82. package/dist/Helpers/isRuneId.js +2 -4
  83. package/dist/Helpers/isRuneName.d.ts +1 -1
  84. package/dist/Helpers/isRuneName.js +2 -4
  85. package/dist/Helpers/isSpellId.d.ts +2 -0
  86. package/dist/Helpers/isSpellId.js +8 -0
  87. package/dist/Helpers/isSpellKey.d.ts +2 -0
  88. package/dist/Helpers/isSpellKey.js +8 -0
  89. package/dist/Helpers/isSpellName.d.ts +2 -0
  90. package/dist/Helpers/isSpellName.js +8 -0
  91. package/dist/Helpers/isStatRuneId.d.ts +1 -1
  92. package/dist/Helpers/isStatRuneId.js +2 -4
  93. package/dist/Helpers/isStatRuneName.d.ts +1 -1
  94. package/dist/Helpers/isStatRuneName.js +2 -4
  95. package/dist/Helpers/isTreeRuneId.d.ts +1 -1
  96. package/dist/Helpers/isTreeRuneId.js +2 -4
  97. package/dist/Helpers/isTreeRuneName.d.ts +1 -1
  98. package/dist/Helpers/isTreeRuneName.js +2 -4
  99. package/dist/{Constants → assets}/StatRunes.d.ts +0 -0
  100. package/dist/{Constants → assets}/StatRunes.js +0 -0
  101. package/dist/assets/champion.json +1 -1
  102. package/dist/assets/index.d.ts +17216 -0
  103. package/dist/assets/index.js +17 -0
  104. package/dist/assets/item.json +1 -1
  105. package/dist/assets/runesReforged.json +1 -1
  106. package/dist/assets/summoner.json +1 -1
  107. package/dist/index.d.ts +24 -43394
  108. package/dist/index.js +74 -48
  109. package/dist/scripts/Helpers/getExportStatement.d.ts +6 -0
  110. package/dist/scripts/Helpers/getExportStatement.js +10 -0
  111. package/dist/scripts/generate-all.d.ts +16 -1
  112. package/dist/scripts/generate-all.js +16 -17
  113. package/dist/scripts/generate-champion-ids-by-name.d.ts +1 -0
  114. package/dist/scripts/generate-champion-ids-by-name.js +20 -0
  115. package/dist/scripts/generate-champion-ids.d.ts +1 -0
  116. package/dist/scripts/generate-champion-ids.js +20 -0
  117. package/dist/scripts/generate-champion-keys.d.ts +1 -0
  118. package/dist/{Helpers/generateChampionsByKey.js → scripts/generate-champion-keys.js} +7 -12
  119. package/dist/scripts/generate-champion-names.d.ts +1 -0
  120. package/dist/{Helpers/generateChampionsByName.js → scripts/generate-champion-names.js} +7 -12
  121. package/dist/scripts/generate-item-keys.d.ts +1 -0
  122. package/dist/scripts/generate-item-keys.js +21 -0
  123. package/dist/scripts/generate-item-names.d.ts +1 -0
  124. package/dist/scripts/generate-item-names.js +21 -0
  125. package/dist/scripts/generate-rune-ids.d.ts +1 -0
  126. package/dist/scripts/generate-rune-ids.js +29 -0
  127. package/dist/scripts/generate-rune-names.d.ts +1 -0
  128. package/dist/scripts/generate-rune-names.js +29 -0
  129. package/dist/scripts/generate-spell-ids-by-name.d.ts +1 -0
  130. package/dist/scripts/generate-spell-ids-by-name.js +20 -0
  131. package/dist/scripts/generate-spell-ids.d.ts +1 -0
  132. package/dist/scripts/generate-spell-ids.js +20 -0
  133. package/dist/scripts/generate-spell-keys.d.ts +1 -0
  134. package/dist/scripts/generate-spell-keys.js +20 -0
  135. package/dist/scripts/generate-spell-names.d.ts +1 -0
  136. package/dist/scripts/generate-spell-names.js +20 -0
  137. package/dist/scripts/generate-stat-rune-ids.d.ts +1 -0
  138. package/dist/scripts/generate-stat-rune-ids.js +20 -0
  139. package/dist/scripts/generate-stat-rune-names.d.ts +1 -0
  140. package/dist/scripts/generate-stat-rune-names.js +20 -0
  141. package/dist/scripts/generate-tree-rune-ids.d.ts +1 -0
  142. package/dist/{Helpers/generateRunesById.js → scripts/generate-tree-rune-ids.js} +7 -7
  143. package/dist/scripts/generate-tree-rune-names.d.ts +1 -0
  144. package/dist/{Helpers/generateRunesByName.js → scripts/generate-tree-rune-names.js} +7 -7
  145. package/dist/types/index.d.ts +28 -23
  146. package/package.json +2 -2
  147. package/dist/Constants/SummonerIds.d.ts +0 -2
  148. package/dist/Constants/SummonerIds.js +0 -8
  149. package/dist/Constants/SummonerKeys.d.ts +0 -2
  150. package/dist/Constants/SummonerKeys.js +0 -8
  151. package/dist/Constants/SummonerNames.d.ts +0 -2
  152. package/dist/Constants/SummonerNames.js +0 -8
  153. package/dist/Constants/SummonerSpellIds.d.ts +0 -2
  154. package/dist/Constants/SummonerSpellIds.js +0 -8
  155. package/dist/Constants/SummonerSpellKeys.d.ts +0 -2
  156. package/dist/Constants/SummonerSpellKeys.js +0 -8
  157. package/dist/Constants/SummonerSpellNames.d.ts +0 -2
  158. package/dist/Constants/SummonerSpellNames.js +0 -8
  159. package/dist/Helpers/generateChampionsByKey.d.ts +0 -1
  160. package/dist/Helpers/generateChampionsByName.d.ts +0 -1
  161. package/dist/Helpers/generateItemsByName.d.ts +0 -1
  162. package/dist/Helpers/generateItemsByName.js +0 -30
  163. package/dist/Helpers/generateRunesById.d.ts +0 -1
  164. package/dist/Helpers/generateRunesByName.d.ts +0 -1
  165. package/dist/Helpers/generateSummonerSpellsByKey.d.ts +0 -1
  166. package/dist/Helpers/generateSummonerSpellsByKey.js +0 -27
  167. package/dist/Helpers/generateSummonerSpellsByName.d.ts +0 -1
  168. package/dist/Helpers/generateSummonerSpellsByName.js +0 -27
  169. package/dist/Helpers/generateSummonersByKey.d.ts +0 -1
  170. package/dist/Helpers/generateSummonersByKey.js +0 -24
  171. package/dist/Helpers/generateSummonersByName.d.ts +0 -1
  172. package/dist/Helpers/generateSummonersByName.js +0 -24
  173. package/dist/Helpers/getSummonerSpellKeyByName.d.ts +0 -2
  174. package/dist/Helpers/getSummonerSpellKeyByName.js +0 -11
  175. package/dist/Helpers/getSummonerSpellNameByKey.d.ts +0 -2
  176. package/dist/Helpers/getSummonerSpellNameByKey.js +0 -11
  177. package/dist/Helpers/isSummonerId.d.ts +0 -2
  178. package/dist/Helpers/isSummonerId.js +0 -10
  179. package/dist/Helpers/isSummonerKey.d.ts +0 -2
  180. package/dist/Helpers/isSummonerKey.js +0 -10
  181. package/dist/Helpers/isSummonerName.d.ts +0 -2
  182. package/dist/Helpers/isSummonerName.js +0 -10
  183. package/dist/Helpers/isSummonerSpellId.d.ts +0 -2
  184. package/dist/Helpers/isSummonerSpellId.js +0 -10
  185. package/dist/Helpers/isSummonerSpellKey.d.ts +0 -2
  186. package/dist/Helpers/isSummonerSpellKey.js +0 -10
  187. package/dist/Helpers/isSummonerSpellName.d.ts +0 -2
  188. package/dist/Helpers/isSummonerSpellName.js +0 -10
  189. package/dist/generated/championByKey.json +0 -1
  190. package/dist/generated/championByName.json +0 -1
  191. package/dist/generated/itemByKey.json +0 -1
  192. package/dist/generated/itemByName.json +0 -1
  193. package/dist/generated/runesById.json +0 -1
  194. package/dist/generated/runesByName.json +0 -1
  195. package/dist/generated/summonerByKey.json +0 -1
  196. package/dist/generated/summonerByName.json +0 -1
@@ -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,20 +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
- function generateRunesById() {
10
- const runesById = {};
8
+ const getExportStatement_1 = require("./Helpers/getExportStatement");
9
+ (async () => {
10
+ const runeIds = {};
11
11
  // Construct the new data and assign it to product object
12
12
  for (const runeTree of runesReforged_json_1.default) {
13
13
  for (const { runes } of runeTree.slots) {
14
14
  for (const rune of runes) {
15
- runesById[rune.id] = rune;
15
+ runeIds[rune.name] = String(rune.id);
16
16
  }
17
17
  }
18
18
  }
19
19
  // Write to file
20
- fs_1.default.writeFileSync(`src/generated/runesById.json`, JSON.stringify(runesById));
21
- }
22
- exports.generateRunesById = generateRunesById;
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,20 +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
- function generateRunesByName() {
10
- const runesByName = {};
8
+ const getExportStatement_1 = require("./Helpers/getExportStatement");
9
+ (async () => {
10
+ const runeIds = {};
11
11
  // Construct the new data and assign it to product object
12
12
  for (const runeTree of runesReforged_json_1.default) {
13
13
  for (const { runes } of runeTree.slots) {
14
14
  for (const rune of runes) {
15
- runesByName[rune.name] = rune;
15
+ runeIds[rune.id] = rune.name;
16
16
  }
17
17
  }
18
18
  }
19
19
  // Write to file
20
- fs_1.default.writeFileSync(`src/generated/runesByName.json`, JSON.stringify(runesByName));
21
- }
22
- exports.generateRunesByName = generateRunesByName;
20
+ const constName = 'TreeRuneNames';
21
+ fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, runeIds));
22
+ })();
@@ -1,21 +1,26 @@
1
- import championByKey from '../generated/championByKey.json';
2
- import championByName from '../generated/championByName.json';
3
- import item from '../assets/item.json';
4
- import itemByName from '../generated/itemByName.json';
5
- import summoner from '../assets/summoner.json';
6
- import summonerByKey from '../generated/summonerByKey.json';
7
- import summonerByName from '../generated/summonerByName.json';
8
- import runesById from '../generated/runesById.json';
9
- import { StatRunes } from '../Constants/StatRunes';
10
- import runesByName from '../generated/runesByName.json';
11
1
  import { RuneSets } from '../Constants/RuneSets';
12
- export declare type ChampionKey = keyof typeof championByKey.data;
13
- export declare type ChampionName = keyof typeof championByName.data;
14
- export declare type ItemKey = keyof typeof item.data;
15
- export declare type ItemName = keyof typeof itemByName.data;
16
- export declare type SummonerSpellId = keyof typeof summoner.data;
17
- export declare type SummonerSpellKey = keyof typeof summonerByKey.data;
18
- export declare type SummonerSpellName = keyof typeof summonerByName.data;
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];
19
24
  /**
20
25
  * There are 3 main Rune ID types:
21
26
  * - `RuneId` (all),
@@ -30,8 +35,8 @@ export declare type SummonerSpellName = keyof typeof summonerByName.data;
30
35
  * - `ResolveTreeRuneId`,
31
36
  * - `InspirationTreeRuneId`,
32
37
  */
33
- export declare type RuneId = TreeRuneId | StatRuneId;
34
- export declare type RuneName = TreeRuneName | StatRuneName;
38
+ export declare type RuneId = typeof RuneIds[keyof typeof RuneIds];
39
+ export declare type RuneName = typeof RuneNames[keyof typeof RuneNames];
35
40
  /**
36
41
  * There are 3 main Rune ID types:
37
42
  * - `RuneId` (all),
@@ -46,8 +51,8 @@ export declare type RuneName = TreeRuneName | StatRuneName;
46
51
  * - `ResolveTreeRuneId`,
47
52
  * - `InspirationTreeRuneId`,
48
53
  */
49
- export declare type TreeRuneId = keyof typeof runesById;
50
- export declare type TreeRuneName = keyof typeof runesByName;
54
+ export declare type TreeRuneId = typeof TreeRuneIds[keyof typeof TreeRuneIds];
55
+ export declare type TreeRuneName = typeof TreeRuneNames[keyof typeof TreeRuneNames];
51
56
  /**
52
57
  * There are 3 main Rune ID types:
53
58
  * - `RuneId` (all),
@@ -62,8 +67,8 @@ export declare type TreeRuneName = keyof typeof runesByName;
62
67
  * - `ResolveTreeRuneId`,
63
68
  * - `InspirationTreeRuneId`,
64
69
  */
65
- export declare type StatRuneId = keyof typeof StatRunes;
66
- export declare type StatRuneName = typeof StatRunes[keyof typeof StatRunes];
70
+ export declare type StatRuneId = typeof StatRuneIds[keyof typeof StatRuneIds];
71
+ export declare type StatRuneName = typeof StatRuneNames[keyof typeof StatRuneNames];
67
72
  /**
68
73
  * There are 3 main Rune ID types:
69
74
  * - `RuneId` (all),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lol-constants",
3
- "version": "0.10.1",
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 && tsc"
16
+ "generate": "node dist/scripts/generate-all"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/node": "^17.0.42"
@@ -1,2 +0,0 @@
1
- import { SummonerId } from '../types';
2
- export declare const SummonerIds: SummonerId[];
@@ -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,2 +0,0 @@
1
- import { SummonerKey } from '../types';
2
- export declare const SummonerKeys: SummonerKey[];
@@ -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,2 +0,0 @@
1
- import { SummonerName } from '../types';
2
- export declare const SummonerNames: SummonerName[];
@@ -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,2 +0,0 @@
1
- import { SummonerSpellId } from '../types';
2
- export declare const SummonerSpellIds: SummonerSpellId[];
@@ -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,2 +0,0 @@
1
- import { SummonerSpellKey } from '../types';
2
- export declare const SummonerSpellKeys: SummonerSpellKey[];
@@ -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,2 +0,0 @@
1
- import { SummonerSpellName } from '../types';
2
- export declare const SummonerSpellNames: SummonerSpellName[];
@@ -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,30 +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
- // Add all items' data to each corresponding name value
15
- let itemKey;
16
- for (itemKey in item_json_1.default.data) {
17
- const itemData = item_json_1.default.data[itemKey];
18
- itemByName.data[itemData.name] = {
19
- ...itemData,
20
- // Add the extra variable: `key`
21
- // because it is esentially being overwritten.
22
- key: itemKey,
23
- };
24
- }
25
- // Add version to the product object
26
- itemByName.version = item_json_1.default.version;
27
- // Write to file
28
- fs_1.default.writeFileSync(`src/generated/itemByName.json`, JSON.stringify(itemByName));
29
- }
30
- 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,27 +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
- // Add all summoners' data to each corresponding key value
15
- let summonerId;
16
- for (summonerId in summoner_json_1.default.data) {
17
- const summonerData = summoner_json_1.default.data[summonerId];
18
- summonersByKey.data[summonerData.key] = {
19
- ...summonerData,
20
- };
21
- }
22
- // Add version to the product object
23
- summonersByKey.version = summoner_json_1.default.version;
24
- // Write to file
25
- fs_1.default.writeFileSync(`src/generated/summonerByKey.json`, JSON.stringify(summonersByKey));
26
- }
27
- exports.generateSummonerSpellsByKey = generateSummonerSpellsByKey;
@@ -1 +0,0 @@
1
- export declare function generateSummonerSpellsByName(): void;
@@ -1,27 +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
- // Add all summoners' data to each corresponding name value
15
- let summonerId;
16
- for (summonerId in summoner_json_1.default.data) {
17
- const summonerData = summoner_json_1.default.data[summonerId];
18
- summonersByName.data[summonerData.name] = {
19
- ...summonerData,
20
- };
21
- }
22
- // Add version to the product object
23
- summonersByName.version = summoner_json_1.default.version;
24
- // Write to file
25
- fs_1.default.writeFileSync(`src/generated/summonerByName.json`, JSON.stringify(summonersByName));
26
- }
27
- 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,2 +0,0 @@
1
- import { SummonerSpellKey, SummonerSpellName } from '../types';
2
- export declare function getSummonerSpellKeyByName(name: SummonerSpellName): SummonerSpellKey;
@@ -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;
@@ -1,2 +0,0 @@
1
- import { SummonerSpellKey, SummonerSpellName } from '../types';
2
- export declare function getSummonerSpellNameByKey(key: SummonerSpellKey): SummonerSpellName;
@@ -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.getSummonerSpellNameByKey = void 0;
7
- const summonerByKey_json_1 = __importDefault(require("../generated/summonerByKey.json"));
8
- function getSummonerSpellNameByKey(key) {
9
- return summonerByKey_json_1.default.data[key].name;
10
- }
11
- exports.getSummonerSpellNameByKey = getSummonerSpellNameByKey;
@@ -1,2 +0,0 @@
1
- import { SummonerId } from '../types';
2
- export declare function isSummonerId(id: any): id is SummonerId;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSummonerId = void 0;
4
- const SummonerIds_1 = require("../Constants/SummonerIds");
5
- function isSummonerId(id) {
6
- if (SummonerIds_1.SummonerIds.includes(id))
7
- return true;
8
- return false;
9
- }
10
- exports.isSummonerId = isSummonerId;
@@ -1,2 +0,0 @@
1
- import { SummonerKey } from '../types';
2
- export declare function isSummonerKey(key: any): key is SummonerKey;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSummonerKey = void 0;
4
- const SummonerKeys_1 = require("../Constants/SummonerKeys");
5
- function isSummonerKey(key) {
6
- if (SummonerKeys_1.SummonerKeys.includes(key))
7
- return true;
8
- return false;
9
- }
10
- exports.isSummonerKey = isSummonerKey;
@@ -1,2 +0,0 @@
1
- import { SummonerName } from '../types';
2
- export declare function isSummonerName(name: any): name is SummonerName;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSummonerName = void 0;
4
- const SummonerNames_1 = require("../Constants/SummonerNames");
5
- function isSummonerName(name) {
6
- if (SummonerNames_1.SummonerNames.includes(name))
7
- return true;
8
- return false;
9
- }
10
- exports.isSummonerName = isSummonerName;
@@ -1,2 +0,0 @@
1
- import { SummonerSpellId } from '../types';
2
- export declare function isSummonerSpellId(id: any): id is SummonerSpellId;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSummonerSpellId = void 0;
4
- const SummonerSpellIds_1 = require("../Constants/SummonerSpellIds");
5
- function isSummonerSpellId(id) {
6
- if (SummonerSpellIds_1.SummonerSpellIds.includes(id))
7
- return true;
8
- return false;
9
- }
10
- exports.isSummonerSpellId = isSummonerSpellId;
@@ -1,2 +0,0 @@
1
- import { SummonerSpellKey } from '../types';
2
- export declare function isSummonerSpellKey(key: any): key is SummonerSpellKey;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSummonerSpellKey = void 0;
4
- const SummonerSpellKeys_1 = require("../Constants/SummonerSpellKeys");
5
- function isSummonerSpellKey(key) {
6
- if (SummonerSpellKeys_1.SummonerSpellKeys.includes(key))
7
- return true;
8
- return false;
9
- }
10
- exports.isSummonerSpellKey = isSummonerSpellKey;
@@ -1,2 +0,0 @@
1
- import { SummonerSpellName } from '../types';
2
- export declare function isSummonerSpellName(name: any): name is SummonerSpellName;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSummonerSpellName = void 0;
4
- const SummonerSpellNames_1 = require("../Constants/SummonerSpellNames");
5
- function isSummonerSpellName(name) {
6
- if (SummonerSpellNames_1.SummonerSpellNames.includes(name))
7
- return true;
8
- return false;
9
- }
10
- exports.isSummonerSpellName = isSummonerSpellName;