lol-constants 0.10.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. package/{dist/Constants → assets}/StatRunes.d.ts +0 -0
  2. package/{dist/Constants → assets}/StatRunes.js +0 -0
  3. package/assets/champion.json +1 -0
  4. package/assets/index.d.ts +17216 -0
  5. package/assets/index.js +17 -0
  6. package/assets/item.json +1 -0
  7. package/assets/runesReforged.json +1 -0
  8. package/assets/scripts/Helpers/getExportStatement.d.ts +6 -0
  9. package/assets/scripts/Helpers/getExportStatement.js +10 -0
  10. package/assets/scripts/generate-all.d.ts +16 -0
  11. package/assets/scripts/generate-all.js +18 -0
  12. package/{dist/scripts/generate-all.d.ts → assets/scripts/generate-champion-ids-by-name.d.ts} +0 -0
  13. package/assets/scripts/generate-champion-ids-by-name.js +20 -0
  14. package/assets/scripts/generate-champion-ids.d.ts +1 -0
  15. package/assets/scripts/generate-champion-ids.js +20 -0
  16. package/assets/scripts/generate-champion-keys.d.ts +1 -0
  17. package/assets/scripts/generate-champion-keys.js +20 -0
  18. package/assets/scripts/generate-champion-names.d.ts +1 -0
  19. package/assets/scripts/generate-champion-names.js +20 -0
  20. package/assets/scripts/generate-item-keys.d.ts +1 -0
  21. package/assets/scripts/generate-item-keys.js +21 -0
  22. package/assets/scripts/generate-item-names.d.ts +1 -0
  23. package/assets/scripts/generate-item-names.js +21 -0
  24. package/assets/scripts/generate-rune-ids.d.ts +1 -0
  25. package/assets/scripts/generate-rune-ids.js +29 -0
  26. package/assets/scripts/generate-rune-names.d.ts +1 -0
  27. package/assets/scripts/generate-rune-names.js +29 -0
  28. package/assets/scripts/generate-spell-ids-by-name.d.ts +1 -0
  29. package/assets/scripts/generate-spell-ids-by-name.js +20 -0
  30. package/assets/scripts/generate-spell-ids.d.ts +1 -0
  31. package/assets/scripts/generate-spell-ids.js +20 -0
  32. package/assets/scripts/generate-spell-keys.d.ts +1 -0
  33. package/assets/scripts/generate-spell-keys.js +20 -0
  34. package/assets/scripts/generate-spell-names.d.ts +1 -0
  35. package/assets/scripts/generate-spell-names.js +20 -0
  36. package/assets/scripts/generate-stat-rune-ids.d.ts +1 -0
  37. package/assets/scripts/generate-stat-rune-ids.js +20 -0
  38. package/assets/scripts/generate-stat-rune-names.d.ts +1 -0
  39. package/assets/scripts/generate-stat-rune-names.js +20 -0
  40. package/assets/scripts/generate-tree-rune-ids.d.ts +1 -0
  41. package/{dist/Helpers/generateRunesById.js → assets/scripts/generate-tree-rune-ids.js} +8 -8
  42. package/assets/scripts/generate-tree-rune-names.d.ts +1 -0
  43. package/{dist/Helpers/generateRunesByName.js → assets/scripts/generate-tree-rune-names.js} +8 -8
  44. package/{dist/assets → assets}/summoner.json +1 -1
  45. package/dist/Constants/ChampionIds.d.ts +162 -0
  46. package/dist/Constants/ChampionIds.js +4 -0
  47. package/dist/Constants/ChampionIdsByName.d.ts +162 -0
  48. package/dist/Constants/ChampionIdsByName.js +4 -0
  49. package/dist/Constants/ChampionKeys.d.ts +162 -2
  50. package/dist/Constants/ChampionKeys.js +1 -5
  51. package/dist/Constants/ChampionNames.d.ts +162 -2
  52. package/dist/Constants/ChampionNames.js +1 -5
  53. package/dist/Constants/DDPaths.d.ts +24 -6
  54. package/dist/Constants/DDPaths.js +26 -8
  55. package/dist/Constants/ItemKeys.d.ts +250 -2
  56. package/dist/Constants/ItemKeys.js +1 -5
  57. package/dist/Constants/ItemNames.d.ts +256 -2
  58. package/dist/Constants/ItemNames.js +1 -5
  59. package/dist/Constants/RuneIds.d.ts +74 -2
  60. package/dist/Constants/RuneIds.js +1 -9
  61. package/dist/Constants/RuneNames.d.ts +74 -2
  62. package/dist/Constants/RuneNames.js +1 -5
  63. package/dist/Constants/RuneSets.d.ts +34 -0
  64. package/dist/Constants/RuneSets.js +15 -15
  65. package/dist/Constants/SpellIds.d.ts +18 -0
  66. package/dist/Constants/SpellIds.js +4 -0
  67. package/dist/Constants/SpellIdsByName.d.ts +17 -0
  68. package/dist/Constants/SpellIdsByName.js +4 -0
  69. package/dist/Constants/SpellKeys.d.ts +18 -0
  70. package/dist/Constants/SpellKeys.js +4 -0
  71. package/dist/Constants/SpellNames.d.ts +18 -0
  72. package/dist/Constants/SpellNames.js +4 -0
  73. package/dist/Constants/StatRuneIds.d.ts +11 -2
  74. package/dist/Constants/StatRuneIds.js +1 -2
  75. package/dist/Constants/StatRuneNames.d.ts +11 -2
  76. package/dist/Constants/StatRuneNames.js +1 -2
  77. package/dist/Constants/TreeRuneIds.d.ts +65 -2
  78. package/dist/Constants/TreeRuneIds.js +1 -5
  79. package/dist/Constants/TreeRuneNames.d.ts +65 -2
  80. package/dist/Constants/TreeRuneNames.js +1 -5
  81. package/dist/Helpers/getChampionIdByKey.d.ts +2 -0
  82. package/dist/Helpers/getChampionIdByKey.js +8 -0
  83. package/dist/Helpers/getChampionIdByName.d.ts +2 -0
  84. package/dist/Helpers/getChampionIdByName.js +8 -0
  85. package/dist/Helpers/getChampionKeyById.d.ts +2 -0
  86. package/dist/Helpers/getChampionKeyById.js +8 -0
  87. package/dist/Helpers/getChampionKeyByName.js +3 -5
  88. package/dist/Helpers/getChampionNameById.d.ts +2 -0
  89. package/dist/Helpers/getChampionNameById.js +9 -0
  90. package/dist/Helpers/getChampionNameByKey.js +2 -5
  91. package/dist/Helpers/getItemKeyByName.js +2 -5
  92. package/dist/Helpers/getItemNameByKey.js +2 -5
  93. package/dist/Helpers/getRuneIdByName.js +2 -17
  94. package/dist/Helpers/getRuneNameById.js +2 -9
  95. package/dist/Helpers/getSpellIdByKey.d.ts +2 -0
  96. package/dist/Helpers/getSpellIdByKey.js +8 -0
  97. package/dist/Helpers/getSpellIdByName.d.ts +2 -0
  98. package/dist/Helpers/getSpellIdByName.js +8 -0
  99. package/dist/Helpers/getSpellKeyById.d.ts +2 -0
  100. package/dist/Helpers/getSpellKeyById.js +8 -0
  101. package/dist/Helpers/getSpellKeyByName.d.ts +2 -0
  102. package/dist/Helpers/getSpellKeyByName.js +9 -0
  103. package/dist/Helpers/getSpellNameById.d.ts +2 -0
  104. package/dist/Helpers/getSpellNameById.js +9 -0
  105. package/dist/Helpers/getSpellNameByKey.d.ts +2 -0
  106. package/dist/Helpers/getSpellNameByKey.js +8 -0
  107. package/dist/Helpers/getStatRuneIdByName.d.ts +2 -0
  108. package/dist/Helpers/getStatRuneIdByName.js +8 -0
  109. package/dist/Helpers/getStatRuneNameById.d.ts +2 -0
  110. package/dist/Helpers/getStatRuneNameById.js +8 -0
  111. package/dist/Helpers/getTreeRuneIdByName.d.ts +2 -0
  112. package/dist/Helpers/getTreeRuneIdByName.js +8 -0
  113. package/dist/Helpers/getTreeRuneNameById.d.ts +2 -0
  114. package/dist/Helpers/getTreeRuneNameById.js +8 -0
  115. package/dist/Helpers/isChampionId.d.ts +2 -0
  116. package/dist/Helpers/isChampionId.js +8 -0
  117. package/dist/Helpers/isChampionKey.d.ts +1 -1
  118. package/dist/Helpers/isChampionKey.js +2 -4
  119. package/dist/Helpers/isChampionName.d.ts +1 -1
  120. package/dist/Helpers/isChampionName.js +2 -4
  121. package/dist/Helpers/isItemKey.d.ts +1 -1
  122. package/dist/Helpers/isItemKey.js +2 -4
  123. package/dist/Helpers/isItemName.d.ts +1 -1
  124. package/dist/Helpers/isItemName.js +2 -4
  125. package/dist/Helpers/isRuneId.d.ts +1 -1
  126. package/dist/Helpers/isRuneId.js +2 -4
  127. package/dist/Helpers/isRuneName.d.ts +1 -1
  128. package/dist/Helpers/isRuneName.js +2 -4
  129. package/dist/Helpers/isSpellId.d.ts +2 -0
  130. package/dist/Helpers/isSpellId.js +8 -0
  131. package/dist/Helpers/isSpellKey.d.ts +2 -0
  132. package/dist/Helpers/isSpellKey.js +8 -0
  133. package/dist/Helpers/isSpellName.d.ts +2 -0
  134. package/dist/Helpers/isSpellName.js +8 -0
  135. package/dist/Helpers/isStatRuneId.d.ts +1 -1
  136. package/dist/Helpers/isStatRuneId.js +2 -4
  137. package/dist/Helpers/isStatRuneName.d.ts +1 -1
  138. package/dist/Helpers/isStatRuneName.js +2 -4
  139. package/dist/Helpers/isTreeRuneId.d.ts +1 -1
  140. package/dist/Helpers/isTreeRuneId.js +2 -4
  141. package/dist/Helpers/isTreeRuneName.d.ts +1 -1
  142. package/dist/Helpers/isTreeRuneName.js +2 -4
  143. package/dist/index.d.ts +24 -43394
  144. package/dist/index.js +74 -48
  145. package/dist/types/index.d.ts +28 -23
  146. package/package.json +4 -3
  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/generateChampionsByKey.js +0 -25
  161. package/dist/Helpers/generateChampionsByName.d.ts +0 -1
  162. package/dist/Helpers/generateChampionsByName.js +0 -25
  163. package/dist/Helpers/generateItemsByName.d.ts +0 -1
  164. package/dist/Helpers/generateItemsByName.js +0 -30
  165. package/dist/Helpers/generateRunesById.d.ts +0 -1
  166. package/dist/Helpers/generateRunesByName.d.ts +0 -1
  167. package/dist/Helpers/generateSummonerSpellsByKey.d.ts +0 -1
  168. package/dist/Helpers/generateSummonerSpellsByKey.js +0 -27
  169. package/dist/Helpers/generateSummonerSpellsByName.d.ts +0 -1
  170. package/dist/Helpers/generateSummonerSpellsByName.js +0 -27
  171. package/dist/Helpers/generateSummonersByKey.d.ts +0 -1
  172. package/dist/Helpers/generateSummonersByKey.js +0 -24
  173. package/dist/Helpers/generateSummonersByName.d.ts +0 -1
  174. package/dist/Helpers/generateSummonersByName.js +0 -24
  175. package/dist/Helpers/getSummonerSpellKeyByName.d.ts +0 -2
  176. package/dist/Helpers/getSummonerSpellKeyByName.js +0 -11
  177. package/dist/Helpers/getSummonerSpellNameByKey.d.ts +0 -2
  178. package/dist/Helpers/getSummonerSpellNameByKey.js +0 -11
  179. package/dist/Helpers/isSummonerId.d.ts +0 -2
  180. package/dist/Helpers/isSummonerId.js +0 -10
  181. package/dist/Helpers/isSummonerKey.d.ts +0 -2
  182. package/dist/Helpers/isSummonerKey.js +0 -10
  183. package/dist/Helpers/isSummonerName.d.ts +0 -2
  184. package/dist/Helpers/isSummonerName.js +0 -10
  185. package/dist/Helpers/isSummonerSpellId.d.ts +0 -2
  186. package/dist/Helpers/isSummonerSpellId.js +0 -10
  187. package/dist/Helpers/isSummonerSpellKey.d.ts +0 -2
  188. package/dist/Helpers/isSummonerSpellKey.js +0 -10
  189. package/dist/Helpers/isSummonerSpellName.d.ts +0 -2
  190. package/dist/Helpers/isSummonerSpellName.js +0 -10
  191. package/dist/assets/champion.json +0 -1
  192. package/dist/assets/item.json +0 -1
  193. package/dist/assets/runesReforged.json +0 -1
  194. package/dist/generated/championByKey.json +0 -1
  195. package/dist/generated/championByName.json +0 -1
  196. package/dist/generated/itemByKey.json +0 -1
  197. package/dist/generated/itemByName.json +0 -1
  198. package/dist/generated/runesById.json +0 -1
  199. package/dist/generated/runesByName.json +0 -1
  200. package/dist/generated/summonerByKey.json +0 -1
  201. package/dist/generated/summonerByName.json +0 -1
  202. package/dist/scripts/generate-all.js +0 -19
package/dist/index.js CHANGED
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ // # assets
3
+ // TEMP
4
+ // import _champion from './assets/champion.json'
5
+ // import _item from './assets/item.json'
6
+ // import _runesReforged from './assets/runesReforged.json'
7
+ // import _summoner from './assets/summoner.json'
8
+ // export const champion = _champion
9
+ // export const item = _item
10
+ // export const runesReforged = _runesReforged
11
+ // export const summoner = _summoner
12
+ // export { StatRunes } from './assets/StatRunes'
2
13
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
14
  if (k2 === undefined) k2 = k;
4
15
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -13,21 +24,14 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
13
24
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
25
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
26
  };
16
- var __importDefault = (this && this.__importDefault) || function (mod) {
17
- return (mod && mod.__esModule) ? mod : { "default": mod };
18
- };
19
27
  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.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
22
- const champion_json_1 = __importDefault(require("./assets/champion.json"));
23
- const item_json_1 = __importDefault(require("./assets/item.json"));
24
- const runesReforged_json_1 = __importDefault(require("./assets/runesReforged.json"));
25
- const summoner_json_1 = __importDefault(require("./assets/summoner.json"));
26
- exports.champion = champion_json_1.default;
27
- exports.item = item_json_1.default;
28
- exports.runesReforged = runesReforged_json_1.default;
29
- exports.summoner = summoner_json_1.default;
28
+ exports.isTreeRuneId = exports.isStatRuneName = exports.isStatRuneId = exports.isSpellName = exports.isSpellKey = exports.isSpellId = exports.isRuneName = exports.isRuneId = exports.isItemName = exports.isItemKey = exports.isChampionName = exports.isChampionKey = exports.isChampionId = exports.getTreeRuneNameById = exports.getTreeRuneIdByName = exports.getStatRuneNameById = exports.getStatRuneIdByName = exports.getSpellNameByKey = exports.getSpellNameById = exports.getSpellKeyByName = exports.getSpellKeyById = exports.getSpellIdByName = exports.getSpellIdByKey = exports.getRuneNameById = exports.getRuneIdByName = exports.getItemNameByKey = exports.getItemKeyByName = exports.getChampionNameById = exports.getChampionKeyByName = exports.getChampionKeyById = exports.getChampionIdByName = exports.getChampionIdByKey = exports.TreeRuneNames = exports.TreeRuneIds = exports.StatRuneNames = exports.StatRuneIds = exports.SpellNames = exports.SpellKeys = exports.SpellIdsByName = exports.SpellIds = exports.RuneSets = exports.RuneNames = exports.RuneIds = exports.ItemNames = exports.ItemKeys = exports.DDPaths = exports.ChampionNames = exports.ChampionKeys = exports.ChampionIdsByName = exports.ChampionIds = void 0;
29
+ exports.isTreeRuneName = void 0;
30
30
  // # Constants
31
+ var ChampionIds_1 = require("./Constants/ChampionIds");
32
+ Object.defineProperty(exports, "ChampionIds", { enumerable: true, get: function () { return ChampionIds_1.ChampionIds; } });
33
+ var ChampionIdsByName_1 = require("./Constants/ChampionIdsByName");
34
+ Object.defineProperty(exports, "ChampionIdsByName", { enumerable: true, get: function () { return ChampionIdsByName_1.ChampionIdsByName; } });
31
35
  var ChampionKeys_1 = require("./Constants/ChampionKeys");
32
36
  Object.defineProperty(exports, "ChampionKeys", { enumerable: true, get: function () { return ChampionKeys_1.ChampionKeys; } });
33
37
  var ChampionNames_1 = require("./Constants/ChampionNames");
@@ -44,81 +48,103 @@ var RuneNames_1 = require("./Constants/RuneNames");
44
48
  Object.defineProperty(exports, "RuneNames", { enumerable: true, get: function () { return RuneNames_1.RuneNames; } });
45
49
  var RuneSets_1 = require("./Constants/RuneSets");
46
50
  Object.defineProperty(exports, "RuneSets", { enumerable: true, get: function () { return RuneSets_1.RuneSets; } });
51
+ var SpellIds_1 = require("./Constants/SpellIds");
52
+ Object.defineProperty(exports, "SpellIds", { enumerable: true, get: function () { return SpellIds_1.SpellIds; } });
53
+ var SpellIdsByName_1 = require("./Constants/SpellIdsByName");
54
+ Object.defineProperty(exports, "SpellIdsByName", { enumerable: true, get: function () { return SpellIdsByName_1.SpellIdsByName; } });
55
+ var SpellKeys_1 = require("./Constants/SpellKeys");
56
+ Object.defineProperty(exports, "SpellKeys", { enumerable: true, get: function () { return SpellKeys_1.SpellKeys; } });
57
+ var SpellNames_1 = require("./Constants/SpellNames");
58
+ Object.defineProperty(exports, "SpellNames", { enumerable: true, get: function () { return SpellNames_1.SpellNames; } });
47
59
  var StatRuneIds_1 = require("./Constants/StatRuneIds");
48
60
  Object.defineProperty(exports, "StatRuneIds", { enumerable: true, get: function () { return StatRuneIds_1.StatRuneIds; } });
49
61
  var StatRuneNames_1 = require("./Constants/StatRuneNames");
50
62
  Object.defineProperty(exports, "StatRuneNames", { enumerable: true, get: function () { return StatRuneNames_1.StatRuneNames; } });
51
- var StatRunes_1 = require("./Constants/StatRunes");
52
- Object.defineProperty(exports, "StatRunes", { enumerable: true, get: function () { return StatRunes_1.StatRunes; } });
53
- var SummonerSpellIds_1 = require("./Constants/SummonerSpellIds");
54
- Object.defineProperty(exports, "SummonerSpellIds", { enumerable: true, get: function () { return SummonerSpellIds_1.SummonerSpellIds; } });
55
- var SummonerSpellKeys_1 = require("./Constants/SummonerSpellKeys");
56
- Object.defineProperty(exports, "SummonerSpellKeys", { enumerable: true, get: function () { return SummonerSpellKeys_1.SummonerSpellKeys; } });
57
- var SummonerSpellNames_1 = require("./Constants/SummonerSpellNames");
58
- Object.defineProperty(exports, "SummonerSpellNames", { enumerable: true, get: function () { return SummonerSpellNames_1.SummonerSpellNames; } });
59
63
  var TreeRuneIds_1 = require("./Constants/TreeRuneIds");
60
64
  Object.defineProperty(exports, "TreeRuneIds", { enumerable: true, get: function () { return TreeRuneIds_1.TreeRuneIds; } });
61
65
  var TreeRuneNames_1 = require("./Constants/TreeRuneNames");
62
66
  Object.defineProperty(exports, "TreeRuneNames", { enumerable: true, get: function () { return TreeRuneNames_1.TreeRuneNames; } });
63
- // # generated
64
- const championByKey_json_1 = __importDefault(require("./generated/championByKey.json"));
65
- const championByName_json_1 = __importDefault(require("./generated/championByName.json"));
66
- const itemByName_json_1 = __importDefault(require("./generated/itemByName.json"));
67
- const runesById_json_1 = __importDefault(require("./generated/runesById.json"));
68
- const runesByName_json_1 = __importDefault(require("./generated/runesByName.json"));
69
- const summonerByKey_json_1 = __importDefault(require("./generated/summonerByKey.json"));
70
- const summonerByName_json_1 = __importDefault(require("./generated/summonerByName.json"));
71
- exports.championByKey = championByKey_json_1.default;
72
- exports.championByName = championByName_json_1.default;
73
- exports.itemByName = itemByName_json_1.default;
74
- exports.runesById = runesById_json_1.default;
75
- exports.runesByName = runesByName_json_1.default;
76
- exports.summonerByKey = summonerByKey_json_1.default;
77
- exports.summonerByName = summonerByName_json_1.default;
78
67
  // # Helpers
68
+ // ##
69
+ var getChampionIdByKey_1 = require("./Helpers/getChampionIdByKey");
70
+ Object.defineProperty(exports, "getChampionIdByKey", { enumerable: true, get: function () { return getChampionIdByKey_1.getChampionIdByKey; } });
71
+ var getChampionIdByName_1 = require("./Helpers/getChampionIdByName");
72
+ Object.defineProperty(exports, "getChampionIdByName", { enumerable: true, get: function () { return getChampionIdByName_1.getChampionIdByName; } });
73
+ var getChampionKeyById_1 = require("./Helpers/getChampionKeyById");
74
+ Object.defineProperty(exports, "getChampionKeyById", { enumerable: true, get: function () { return getChampionKeyById_1.getChampionKeyById; } });
79
75
  var getChampionKeyByName_1 = require("./Helpers/getChampionKeyByName");
80
76
  Object.defineProperty(exports, "getChampionKeyByName", { enumerable: true, get: function () { return getChampionKeyByName_1.getChampionKeyByName; } });
81
- var getChampionNameByKey_1 = require("./Helpers/getChampionNameByKey");
82
- Object.defineProperty(exports, "getChampionNameByKey", { enumerable: true, get: function () { return getChampionNameByKey_1.getChampionNameByKey; } });
77
+ var getChampionNameById_1 = require("./Helpers/getChampionNameById");
78
+ Object.defineProperty(exports, "getChampionNameById", { enumerable: true, get: function () { return getChampionNameById_1.getChampionNameById; } });
79
+ // ##
83
80
  var getItemKeyByName_1 = require("./Helpers/getItemKeyByName");
84
81
  Object.defineProperty(exports, "getItemKeyByName", { enumerable: true, get: function () { return getItemKeyByName_1.getItemKeyByName; } });
85
82
  var getItemNameByKey_1 = require("./Helpers/getItemNameByKey");
86
83
  Object.defineProperty(exports, "getItemNameByKey", { enumerable: true, get: function () { return getItemNameByKey_1.getItemNameByKey; } });
84
+ // ##
87
85
  var getRuneIdByName_1 = require("./Helpers/getRuneIdByName");
88
86
  Object.defineProperty(exports, "getRuneIdByName", { enumerable: true, get: function () { return getRuneIdByName_1.getRuneIdByName; } });
89
87
  var getRuneNameById_1 = require("./Helpers/getRuneNameById");
90
88
  Object.defineProperty(exports, "getRuneNameById", { enumerable: true, get: function () { return getRuneNameById_1.getRuneNameById; } });
91
- var getSummonerSpellKeyByName_1 = require("./Helpers/getSummonerSpellKeyByName");
92
- Object.defineProperty(exports, "getSummonerSpellKeyByName", { enumerable: true, get: function () { return getSummonerSpellKeyByName_1.getSummonerSpellKeyByName; } });
93
- var getSummonerSpellNameByKey_1 = require("./Helpers/getSummonerSpellNameByKey");
94
- Object.defineProperty(exports, "getSummonerSpellNameByKey", { enumerable: true, get: function () { return getSummonerSpellNameByKey_1.getSummonerSpellNameByKey; } });
89
+ // ##
90
+ var getSpellIdByKey_1 = require("./Helpers/getSpellIdByKey");
91
+ Object.defineProperty(exports, "getSpellIdByKey", { enumerable: true, get: function () { return getSpellIdByKey_1.getSpellIdByKey; } });
92
+ var getSpellIdByName_1 = require("./Helpers/getSpellIdByName");
93
+ Object.defineProperty(exports, "getSpellIdByName", { enumerable: true, get: function () { return getSpellIdByName_1.getSpellIdByName; } });
94
+ var getSpellKeyById_1 = require("./Helpers/getSpellKeyById");
95
+ Object.defineProperty(exports, "getSpellKeyById", { enumerable: true, get: function () { return getSpellKeyById_1.getSpellKeyById; } });
96
+ var getSpellKeyByName_1 = require("./Helpers/getSpellKeyByName");
97
+ Object.defineProperty(exports, "getSpellKeyByName", { enumerable: true, get: function () { return getSpellKeyByName_1.getSpellKeyByName; } });
98
+ var getSpellNameById_1 = require("./Helpers/getSpellNameById");
99
+ Object.defineProperty(exports, "getSpellNameById", { enumerable: true, get: function () { return getSpellNameById_1.getSpellNameById; } });
100
+ var getSpellNameByKey_1 = require("./Helpers/getSpellNameByKey");
101
+ Object.defineProperty(exports, "getSpellNameByKey", { enumerable: true, get: function () { return getSpellNameByKey_1.getSpellNameByKey; } });
102
+ // ##
103
+ var getStatRuneIdByName_1 = require("./Helpers/getStatRuneIdByName");
104
+ Object.defineProperty(exports, "getStatRuneIdByName", { enumerable: true, get: function () { return getStatRuneIdByName_1.getStatRuneIdByName; } });
105
+ var getStatRuneNameById_1 = require("./Helpers/getStatRuneNameById");
106
+ Object.defineProperty(exports, "getStatRuneNameById", { enumerable: true, get: function () { return getStatRuneNameById_1.getStatRuneNameById; } });
107
+ // ##
108
+ var getTreeRuneIdByName_1 = require("./Helpers/getTreeRuneIdByName");
109
+ Object.defineProperty(exports, "getTreeRuneIdByName", { enumerable: true, get: function () { return getTreeRuneIdByName_1.getTreeRuneIdByName; } });
110
+ var getTreeRuneNameById_1 = require("./Helpers/getTreeRuneNameById");
111
+ Object.defineProperty(exports, "getTreeRuneNameById", { enumerable: true, get: function () { return getTreeRuneNameById_1.getTreeRuneNameById; } });
112
+ // ##
113
+ var isChampionId_1 = require("./Helpers/isChampionId");
114
+ Object.defineProperty(exports, "isChampionId", { enumerable: true, get: function () { return isChampionId_1.isChampionId; } });
95
115
  var isChampionKey_1 = require("./Helpers/isChampionKey");
96
116
  Object.defineProperty(exports, "isChampionKey", { enumerable: true, get: function () { return isChampionKey_1.isChampionKey; } });
97
117
  var isChampionName_1 = require("./Helpers/isChampionName");
98
118
  Object.defineProperty(exports, "isChampionName", { enumerable: true, get: function () { return isChampionName_1.isChampionName; } });
119
+ // ##
99
120
  var isItemKey_1 = require("./Helpers/isItemKey");
100
121
  Object.defineProperty(exports, "isItemKey", { enumerable: true, get: function () { return isItemKey_1.isItemKey; } });
101
122
  var isItemName_1 = require("./Helpers/isItemName");
102
123
  Object.defineProperty(exports, "isItemName", { enumerable: true, get: function () { return isItemName_1.isItemName; } });
124
+ // ##
103
125
  var isRuneId_1 = require("./Helpers/isRuneId");
104
126
  Object.defineProperty(exports, "isRuneId", { enumerable: true, get: function () { return isRuneId_1.isRuneId; } });
105
127
  var isRuneName_1 = require("./Helpers/isRuneName");
106
128
  Object.defineProperty(exports, "isRuneName", { enumerable: true, get: function () { return isRuneName_1.isRuneName; } });
129
+ // ##
130
+ var isSpellId_1 = require("./Helpers/isSpellId");
131
+ Object.defineProperty(exports, "isSpellId", { enumerable: true, get: function () { return isSpellId_1.isSpellId; } });
132
+ var isSpellKey_1 = require("./Helpers/isSpellKey");
133
+ Object.defineProperty(exports, "isSpellKey", { enumerable: true, get: function () { return isSpellKey_1.isSpellKey; } });
134
+ var isSpellName_1 = require("./Helpers/isSpellName");
135
+ Object.defineProperty(exports, "isSpellName", { enumerable: true, get: function () { return isSpellName_1.isSpellName; } });
136
+ // ##
107
137
  var isStatRuneId_1 = require("./Helpers/isStatRuneId");
108
138
  Object.defineProperty(exports, "isStatRuneId", { enumerable: true, get: function () { return isStatRuneId_1.isStatRuneId; } });
109
139
  var isStatRuneName_1 = require("./Helpers/isStatRuneName");
110
140
  Object.defineProperty(exports, "isStatRuneName", { enumerable: true, get: function () { return isStatRuneName_1.isStatRuneName; } });
111
- var isSummonerSpellId_1 = require("./Helpers/isSummonerSpellId");
112
- Object.defineProperty(exports, "isSummonerSpellId", { enumerable: true, get: function () { return isSummonerSpellId_1.isSummonerSpellId; } });
113
- var isSummonerSpellKey_1 = require("./Helpers/isSummonerSpellKey");
114
- Object.defineProperty(exports, "isSummonerSpellKey", { enumerable: true, get: function () { return isSummonerSpellKey_1.isSummonerSpellKey; } });
115
- var isSummonerSpellName_1 = require("./Helpers/isSummonerSpellName");
116
- Object.defineProperty(exports, "isSummonerSpellName", { enumerable: true, get: function () { return isSummonerSpellName_1.isSummonerSpellName; } });
141
+ // ##
117
142
  var isTreeRuneId_1 = require("./Helpers/isTreeRuneId");
118
143
  Object.defineProperty(exports, "isTreeRuneId", { enumerable: true, get: function () { return isTreeRuneId_1.isTreeRuneId; } });
119
144
  var isTreeRuneName_1 = require("./Helpers/isTreeRuneName");
120
145
  Object.defineProperty(exports, "isTreeRuneName", { enumerable: true, get: function () { return isTreeRuneName_1.isTreeRuneName; } });
121
146
  // # scripts
147
+ // —
122
148
  // # types
123
149
  __exportStar(require("./types"), exports);
124
150
  __exportStar(require("./types/Meta"), exports);
@@ -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,19 +1,20 @@
1
1
  {
2
2
  "name": "lol-constants",
3
- "version": "0.10.1",
3
+ "version": "1.0.2",
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",
7
7
  "license": "MIT",
8
8
  "files": [
9
- "/dist"
9
+ "/dist",
10
+ "/assets"
10
11
  ],
11
12
  "scripts": {
12
13
  "clean-build": "rmdir /s /q dist && tsc",
13
14
  "publish-new-major": "tsc && npm version major && npm publish",
14
15
  "publish-new-minor": "tsc && npm version minor && npm publish",
15
16
  "publish-new-patch": "tsc && npm version patch && npm publish",
16
- "generate": "node dist/scripts/generate-all && tsc"
17
+ "generate": "node dist/scripts/generate-all"
17
18
  },
18
19
  "devDependencies": {
19
20
  "@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,25 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.generateChampionsByKey = void 0;
7
- const fs_1 = __importDefault(require("fs"));
8
- const champion_json_1 = __importDefault(require("../assets/champion.json"));
9
- function generateChampionsByKey() {
10
- const championsByKey = {
11
- data: {},
12
- version: '',
13
- };
14
- // Add all champions' data to each corresponding key value
15
- let championId;
16
- for (championId in champion_json_1.default.data) {
17
- const championData = champion_json_1.default.data[championId];
18
- championsByKey.data[championData.key] = championData;
19
- }
20
- // Add version to the product object
21
- championsByKey.version = champion_json_1.default.version;
22
- // Write to file
23
- fs_1.default.writeFileSync(`src/generated/championByKey.json`, JSON.stringify(championsByKey));
24
- }
25
- exports.generateChampionsByKey = generateChampionsByKey;
@@ -1 +0,0 @@
1
- export declare function generateChampionsByName(): void;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.generateChampionsByName = void 0;
7
- const fs_1 = __importDefault(require("fs"));
8
- const champion_json_1 = __importDefault(require("../assets/champion.json"));
9
- function generateChampionsByName() {
10
- const championsByName = {
11
- data: {},
12
- version: '',
13
- };
14
- // Extract all champion names from `champion.json`
15
- let championId;
16
- for (championId in champion_json_1.default.data) {
17
- const championData = champion_json_1.default.data[championId];
18
- championsByName.data[championData.name] = championData;
19
- }
20
- // Add version to the product object
21
- championsByName.version = champion_json_1.default.version;
22
- // Write to file
23
- fs_1.default.writeFileSync(`src/generated/championByName.json`, JSON.stringify(championsByName));
24
- }
25
- exports.generateChampionsByName = generateChampionsByName;
@@ -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;