lol-constants 1.0.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. package/assets/scripts/Helpers/enableSpreadValues.d.ts +15 -0
  2. package/assets/scripts/Helpers/enableSpreadValues.js +38 -0
  3. package/assets/scripts/Helpers/getExportStatement.d.ts +1 -1
  4. package/assets/scripts/Helpers/getExportStatement.js +8 -2
  5. package/assets/scripts/Helpers/getFmtdComment.d.ts +5 -0
  6. package/assets/scripts/Helpers/getFmtdComment.js +15 -0
  7. package/assets/scripts/Helpers/writeToTmpFile.d.ts +8 -0
  8. package/assets/scripts/Helpers/writeToTmpFile.js +22 -0
  9. package/assets/scripts/generate-all.d.ts +1 -0
  10. package/assets/scripts/generate-all.js +1 -0
  11. package/assets/scripts/generate-rune-sets.d.ts +1 -0
  12. package/assets/scripts/generate-rune-sets.js +94 -0
  13. package/dist/Constants/{ChampionIds.d.ts → Champions/ChampionIds.d.ts} +0 -0
  14. package/dist/Constants/{ChampionIds.js → Champions/ChampionIds.js} +0 -0
  15. package/dist/Constants/{ChampionIdsByName.d.ts → Champions/ChampionIdsByName.d.ts} +0 -0
  16. package/dist/Constants/{ChampionIdsByName.js → Champions/ChampionIdsByName.js} +0 -0
  17. package/dist/Constants/{ChampionKeys.d.ts → Champions/ChampionKeys.d.ts} +0 -0
  18. package/dist/Constants/{ChampionKeys.js → Champions/ChampionKeys.js} +0 -0
  19. package/dist/Constants/{ChampionNames.d.ts → Champions/ChampionNames.d.ts} +0 -0
  20. package/dist/Constants/{ChampionNames.js → Champions/ChampionNames.js} +0 -0
  21. package/dist/Constants/{ItemKeys.d.ts → Items/ItemKeys.d.ts} +0 -0
  22. package/dist/Constants/{ItemKeys.js → Items/ItemKeys.js} +0 -0
  23. package/dist/Constants/{ItemNames.d.ts → Items/ItemNames.d.ts} +0 -0
  24. package/dist/Constants/{ItemNames.js → Items/ItemNames.js} +0 -0
  25. package/dist/Constants/Lanes.d.ts +6 -0
  26. package/dist/Constants/Lanes.js +9 -0
  27. package/dist/Constants/Levels.d.ts +20 -0
  28. package/dist/Constants/Levels.js +23 -0
  29. package/dist/Constants/Positions.d.ts +7 -0
  30. package/dist/Constants/Positions.js +10 -0
  31. package/dist/Constants/{RuneIds.d.ts → Runes/RuneIds.d.ts} +9 -9
  32. package/dist/Constants/Runes/RuneIds.js +9 -0
  33. package/dist/Constants/{RuneNames.d.ts → Runes/RuneNames.d.ts} +3 -3
  34. package/dist/Constants/Runes/RuneNames.js +9 -0
  35. package/dist/Constants/Runes/RuneSets.d.ts +479 -0
  36. package/dist/Constants/Runes/RuneSets.js +12 -0
  37. package/dist/Constants/Runes/RuneTreeNames.d.ts +7 -0
  38. package/dist/Constants/Runes/RuneTreeNames.js +10 -0
  39. package/dist/Constants/Runes/RuneTreeTypes.d.ts +4 -0
  40. package/dist/Constants/Runes/RuneTreeTypes.js +7 -0
  41. package/dist/Constants/{StatRuneIds.d.ts → Runes/StatRuneIds.d.ts} +0 -0
  42. package/dist/Constants/{StatRuneIds.js → Runes/StatRuneIds.js} +0 -0
  43. package/dist/Constants/{StatRuneNames.d.ts → Runes/StatRuneNames.d.ts} +0 -0
  44. package/dist/Constants/{StatRuneNames.js → Runes/StatRuneNames.js} +0 -0
  45. package/dist/Constants/{TreeRuneIds.d.ts → Runes/TreeRuneIds.d.ts} +0 -0
  46. package/dist/Constants/{TreeRuneIds.js → Runes/TreeRuneIds.js} +0 -0
  47. package/dist/Constants/{TreeRuneNames.d.ts → Runes/TreeRuneNames.d.ts} +0 -0
  48. package/dist/Constants/{TreeRuneNames.js → Runes/TreeRuneNames.js} +0 -0
  49. package/dist/Constants/Skills.d.ts +6 -0
  50. package/dist/Constants/Skills.js +9 -0
  51. package/dist/Constants/{SpellIds.d.ts → Spells/SpellIds.d.ts} +0 -0
  52. package/dist/Constants/{SpellIds.js → Spells/SpellIds.js} +0 -0
  53. package/dist/Constants/{SpellIdsByName.d.ts → Spells/SpellIdsByName.d.ts} +0 -0
  54. package/dist/Constants/{SpellIdsByName.js → Spells/SpellIdsByName.js} +0 -0
  55. package/dist/Constants/{SpellKeys.d.ts → Spells/SpellKeys.d.ts} +0 -0
  56. package/dist/Constants/{SpellKeys.js → Spells/SpellKeys.js} +0 -0
  57. package/dist/Constants/{SpellNames.d.ts → Spells/SpellNames.d.ts} +0 -0
  58. package/dist/Constants/{SpellNames.js → Spells/SpellNames.js} +0 -0
  59. package/dist/Helpers/{getChampionIdByKey.d.ts → Champions/getChampionIdByKey.d.ts} +1 -1
  60. package/dist/Helpers/{getChampionIdByKey.js → Champions/getChampionIdByKey.js} +1 -1
  61. package/dist/Helpers/{getChampionIdByName.d.ts → Champions/getChampionIdByName.d.ts} +1 -1
  62. package/dist/Helpers/{getChampionIdByName.js → Champions/getChampionIdByName.js} +1 -1
  63. package/dist/Helpers/{getChampionKeyById.d.ts → Champions/getChampionKeyById.d.ts} +1 -1
  64. package/dist/Helpers/{getChampionKeyById.js → Champions/getChampionKeyById.js} +1 -1
  65. package/dist/Helpers/{getChampionKeyByName.d.ts → Champions/getChampionKeyByName.d.ts} +1 -1
  66. package/dist/Helpers/{getChampionKeyByName.js → Champions/getChampionKeyByName.js} +2 -2
  67. package/dist/Helpers/{getChampionNameById.d.ts → Champions/getChampionNameById.d.ts} +1 -1
  68. package/dist/Helpers/{getChampionNameById.js → Champions/getChampionNameById.js} +2 -2
  69. package/dist/Helpers/{getChampionNameByKey.d.ts → Champions/getChampionNameByKey.d.ts} +1 -1
  70. package/dist/Helpers/{getChampionNameByKey.js → Champions/getChampionNameByKey.js} +1 -1
  71. package/dist/Helpers/{isChampionId.d.ts → Champions/isChampionId.d.ts} +1 -1
  72. package/dist/Helpers/{isChampionId.js → Champions/isChampionId.js} +1 -1
  73. package/dist/Helpers/{isChampionKey.d.ts → Champions/isChampionKey.d.ts} +1 -1
  74. package/dist/Helpers/{isChampionKey.js → Champions/isChampionKey.js} +1 -1
  75. package/dist/Helpers/{isChampionName.d.ts → Champions/isChampionName.d.ts} +1 -1
  76. package/dist/Helpers/{isChampionName.js → Champions/isChampionName.js} +1 -1
  77. package/dist/Helpers/{getItemKeyByName.d.ts → Items/getItemKeyByName.d.ts} +1 -1
  78. package/dist/Helpers/{getItemKeyByName.js → Items/getItemKeyByName.js} +1 -1
  79. package/dist/Helpers/{getItemNameByKey.d.ts → Items/getItemNameByKey.d.ts} +1 -1
  80. package/dist/Helpers/{getItemNameByKey.js → Items/getItemNameByKey.js} +1 -1
  81. package/dist/Helpers/{isItemKey.d.ts → Items/isItemKey.d.ts} +1 -1
  82. package/dist/Helpers/{isItemKey.js → Items/isItemKey.js} +1 -1
  83. package/dist/Helpers/{isItemName.d.ts → Items/isItemName.d.ts} +1 -1
  84. package/dist/Helpers/{isItemName.js → Items/isItemName.js} +1 -1
  85. package/dist/Helpers/{getRuneIdByName.d.ts → Runes/getRuneIdByName.d.ts} +1 -1
  86. package/dist/Helpers/{getRuneIdByName.js → Runes/getRuneIdByName.js} +1 -1
  87. package/dist/Helpers/{getRuneNameById.d.ts → Runes/getRuneNameById.d.ts} +1 -1
  88. package/dist/Helpers/{getRuneNameById.js → Runes/getRuneNameById.js} +1 -1
  89. package/dist/Helpers/{getStatRuneIdByName.d.ts → Runes/getStatRuneIdByName.d.ts} +1 -1
  90. package/dist/Helpers/{getStatRuneIdByName.js → Runes/getStatRuneIdByName.js} +1 -1
  91. package/dist/Helpers/{getStatRuneNameById.d.ts → Runes/getStatRuneNameById.d.ts} +1 -1
  92. package/dist/Helpers/{getStatRuneNameById.js → Runes/getStatRuneNameById.js} +1 -1
  93. package/dist/Helpers/{getTreeRuneIdByName.d.ts → Runes/getTreeRuneIdByName.d.ts} +1 -1
  94. package/dist/Helpers/{getTreeRuneIdByName.js → Runes/getTreeRuneIdByName.js} +1 -1
  95. package/dist/Helpers/{getTreeRuneNameById.d.ts → Runes/getTreeRuneNameById.d.ts} +1 -1
  96. package/dist/Helpers/{getTreeRuneNameById.js → Runes/getTreeRuneNameById.js} +1 -1
  97. package/dist/Helpers/Runes/isDominationTreeRuneId.d.ts +2 -0
  98. package/dist/Helpers/Runes/isDominationTreeRuneId.js +8 -0
  99. package/dist/Helpers/Runes/isInspirationTreeRuneId.d.ts +2 -0
  100. package/dist/Helpers/Runes/isInspirationTreeRuneId.js +8 -0
  101. package/dist/Helpers/Runes/isKeystoneRuneId.d.ts +2 -0
  102. package/dist/Helpers/Runes/isKeystoneRuneId.js +8 -0
  103. package/dist/Helpers/Runes/isPrecisionTreeRuneId.d.ts +2 -0
  104. package/dist/Helpers/Runes/isPrecisionTreeRuneId.js +8 -0
  105. package/dist/Helpers/Runes/isResolveTreeRuneId.d.ts +2 -0
  106. package/dist/Helpers/Runes/isResolveTreeRuneId.js +8 -0
  107. package/dist/Helpers/{isRuneId.d.ts → Runes/isRuneId.d.ts} +1 -1
  108. package/dist/Helpers/{isRuneId.js → Runes/isRuneId.js} +1 -1
  109. package/dist/Helpers/{isRuneName.d.ts → Runes/isRuneName.d.ts} +1 -1
  110. package/dist/Helpers/{isRuneName.js → Runes/isRuneName.js} +1 -1
  111. package/dist/Helpers/Runes/isRuneTreeName.d.ts +2 -0
  112. package/dist/Helpers/Runes/isRuneTreeName.js +8 -0
  113. package/dist/Helpers/Runes/isRuneTreeType.d.ts +2 -0
  114. package/dist/Helpers/Runes/isRuneTreeType.js +8 -0
  115. package/dist/Helpers/Runes/isSorceryTreeRuneId.d.ts +2 -0
  116. package/dist/Helpers/Runes/isSorceryTreeRuneId.js +8 -0
  117. package/dist/Helpers/{isStatRuneId.d.ts → Runes/isStatRuneId.d.ts} +1 -1
  118. package/dist/Helpers/{isStatRuneId.js → Runes/isStatRuneId.js} +1 -1
  119. package/dist/Helpers/{isStatRuneName.d.ts → Runes/isStatRuneName.d.ts} +1 -1
  120. package/dist/Helpers/{isStatRuneName.js → Runes/isStatRuneName.js} +1 -1
  121. package/dist/Helpers/{isTreeRuneId.d.ts → Runes/isTreeRuneId.d.ts} +1 -1
  122. package/dist/Helpers/{isTreeRuneId.js → Runes/isTreeRuneId.js} +1 -1
  123. package/dist/Helpers/{isTreeRuneName.d.ts → Runes/isTreeRuneName.d.ts} +1 -1
  124. package/dist/Helpers/{isTreeRuneName.js → Runes/isTreeRuneName.js} +1 -1
  125. package/dist/Helpers/{getSpellIdByKey.d.ts → Spells/getSpellIdByKey.d.ts} +1 -1
  126. package/dist/Helpers/{getSpellIdByKey.js → Spells/getSpellIdByKey.js} +1 -1
  127. package/dist/Helpers/{getSpellIdByName.d.ts → Spells/getSpellIdByName.d.ts} +1 -1
  128. package/dist/Helpers/{getSpellIdByName.js → Spells/getSpellIdByName.js} +1 -1
  129. package/dist/Helpers/{getSpellKeyById.d.ts → Spells/getSpellKeyById.d.ts} +1 -1
  130. package/dist/Helpers/{getSpellKeyById.js → Spells/getSpellKeyById.js} +1 -1
  131. package/dist/Helpers/{getSpellKeyByName.d.ts → Spells/getSpellKeyByName.d.ts} +1 -1
  132. package/dist/Helpers/{getSpellKeyByName.js → Spells/getSpellKeyByName.js} +2 -2
  133. package/dist/Helpers/{getSpellNameById.d.ts → Spells/getSpellNameById.d.ts} +1 -1
  134. package/dist/Helpers/{getSpellNameById.js → Spells/getSpellNameById.js} +2 -2
  135. package/dist/Helpers/{getSpellNameByKey.d.ts → Spells/getSpellNameByKey.d.ts} +1 -1
  136. package/dist/Helpers/{getSpellNameByKey.js → Spells/getSpellNameByKey.js} +1 -1
  137. package/dist/Helpers/{isSpellId.d.ts → Spells/isSpellId.d.ts} +1 -1
  138. package/dist/Helpers/{isSpellId.js → Spells/isSpellId.js} +1 -1
  139. package/dist/Helpers/{isSpellKey.d.ts → Spells/isSpellKey.d.ts} +1 -1
  140. package/dist/Helpers/{isSpellKey.js → Spells/isSpellKey.js} +1 -1
  141. package/dist/Helpers/{isSpellName.d.ts → Spells/isSpellName.d.ts} +1 -1
  142. package/dist/Helpers/{isSpellName.js → Spells/isSpellName.js} +1 -1
  143. package/dist/Helpers/isLane.d.ts +2 -0
  144. package/dist/Helpers/isLane.js +8 -0
  145. package/dist/Helpers/isLevel.d.ts +2 -0
  146. package/dist/Helpers/isLevel.js +8 -0
  147. package/dist/Helpers/isPosition.d.ts +2 -0
  148. package/dist/Helpers/isPosition.js +8 -0
  149. package/dist/Helpers/isSkill.d.ts +2 -0
  150. package/dist/Helpers/isSkill.js +8 -0
  151. package/dist/index.d.ts +56 -50
  152. package/dist/index.js +92 -95
  153. package/dist/types/Meta.d.ts +1 -0
  154. package/dist/types/index.d.ts +33 -26
  155. package/package.json +3 -5
  156. package/dist/Constants/RuneIds.js +0 -4
  157. package/dist/Constants/RuneNames.js +0 -4
  158. package/dist/Constants/RuneSets.d.ts +0 -77
  159. package/dist/Constants/RuneSets.js +0 -210
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Basically a modified `JSON.stringify()` function.
3
+ *
4
+ * Assumes that what you're trying to do is simply "escape" the value
5
+ * of a key in `keysToSpread`, clearing it away from:
6
+ * - its own key and its 2 quotation marks `"` and its colon `:`,
7
+ * - the 2 quotation marks `"` around the value.
8
+ *
9
+ * This way enabling the spreading of a Constant into the end object.
10
+ * Example:
11
+ * `{"key":"...ConstantValue"} => {...ConstantValue}`
12
+ */
13
+ export declare function enableSpreadValues(obj: {
14
+ [k: string]: any;
15
+ }, keysToSpread: (string | number)[]): string;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.enableSpreadValues = void 0;
4
+ /**
5
+ * Basically a modified `JSON.stringify()` function.
6
+ *
7
+ * Assumes that what you're trying to do is simply "escape" the value
8
+ * of a key in `keysToSpread`, clearing it away from:
9
+ * - its own key and its 2 quotation marks `"` and its colon `:`,
10
+ * - the 2 quotation marks `"` around the value.
11
+ *
12
+ * This way enabling the spreading of a Constant into the end object.
13
+ * Example:
14
+ * `{"key":"...ConstantValue"} => {...ConstantValue}`
15
+ */
16
+ function enableSpreadValues(obj, keysToSpread) {
17
+ let json = JSON.stringify(obj);
18
+ for (let key of keysToSpread) {
19
+ const stringifiedKey = `"${key}":`;
20
+ let stKeyIdx = json.indexOf(stringifiedKey);
21
+ // Skip if for whatever reason not found
22
+ if (stKeyIdx == -1)
23
+ continue;
24
+ // Remove the key with its 2 quotation marks and colon
25
+ json =
26
+ json.slice(0, stKeyIdx)
27
+ + json.slice(stKeyIdx + stringifiedKey.length);
28
+ // Remove the next 2 quotation marks for supposed spread value
29
+ for (let i = 0; i < 2; ++i) {
30
+ const idxToRemove = json.indexOf('"', stKeyIdx);
31
+ json =
32
+ json.slice(0, idxToRemove)
33
+ + json.slice(idxToRemove + 1);
34
+ }
35
+ }
36
+ return json;
37
+ }
38
+ exports.enableSpreadValues = enableSpreadValues;
@@ -3,4 +3,4 @@
3
3
  */
4
4
  export declare function getExportStatement(constName: string, json: {
5
5
  [k: string]: any;
6
- }): string;
6
+ }, keysToSpread?: (string | number)[], comment?: string): string;
@@ -1,10 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getExportStatement = void 0;
4
+ const enableSpreadValues_1 = require("./enableSpreadValues");
5
+ const getFmtdComment_1 = require("./getFmtdComment");
4
6
  /**
5
7
  * Wraps the provided JSON in a TS export-as-const statement.
6
8
  */
7
- function getExportStatement(constName, json) {
8
- return `export const ${constName} = ${JSON.stringify(json)} as const`;
9
+ function getExportStatement(constName, json, keysToSpread, comment) {
10
+ const stringifiedJson = keysToSpread
11
+ ? (0, enableSpreadValues_1.enableSpreadValues)(json, keysToSpread)
12
+ : JSON.stringify(json);
13
+ const fmtdComment = comment ? (0, getFmtdComment_1.getFmtdComment)(comment) : '';
14
+ return fmtdComment + `export const ${constName} = ${stringifiedJson} as const`;
9
15
  }
10
16
  exports.getExportStatement = getExportStatement;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Returns a JavaScript-formatted comment,
3
+ * the kind you put on top of functions, for example.
4
+ */
5
+ export declare function getFmtdComment(comment: string): string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFmtdComment = void 0;
4
+ /**
5
+ * Returns a JavaScript-formatted comment,
6
+ * the kind you put on top of functions, for example.
7
+ */
8
+ function getFmtdComment(comment) {
9
+ let st = '';
10
+ st += '/**\n';
11
+ st += ' * ' + comment + '\n';
12
+ st += ' */\n';
13
+ return st;
14
+ }
15
+ exports.getFmtdComment = getFmtdComment;
@@ -0,0 +1,8 @@
1
+ export declare function writeToTmpFile(mainConstName: string, ...constants: {
2
+ constName: string;
3
+ comment?: string;
4
+ json: {
5
+ [k: string]: any;
6
+ };
7
+ keysToSpread?: (string | number)[];
8
+ }[]): Promise<void>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.writeToTmpFile = void 0;
4
+ const fs_1 = require("fs");
5
+ const getExportStatement_1 = require("./getExportStatement");
6
+ function writeToTmpFile(mainConstName, ...constants) {
7
+ return new Promise((res, rej) => {
8
+ const exportStatements = constants.reduce((finalSt, { constName, comment, json, keysToSpread, }, i) => {
9
+ let exportStatement = (0, getExportStatement_1.getExportStatement)(constName, json, keysToSpread, comment);
10
+ return (finalSt
11
+ + exportStatement
12
+ // On last statement, provide only a single empty ending line
13
+ + (i + 1 == constants.length ? '\n' : '\n\n'));
14
+ }, '');
15
+ (0, fs_1.writeFile)(`tmp/${mainConstName}.ts`, exportStatements, err => {
16
+ if (err)
17
+ rej(err);
18
+ res();
19
+ });
20
+ });
21
+ }
22
+ exports.writeToTmpFile = writeToTmpFile;
@@ -6,6 +6,7 @@ import './generate-item-keys';
6
6
  import './generate-item-names';
7
7
  import './generate-rune-ids';
8
8
  import './generate-rune-names';
9
+ import './generate-rune-sets';
9
10
  import './generate-spell-ids-by-name';
10
11
  import './generate-spell-ids';
11
12
  import './generate-spell-keys';
@@ -8,6 +8,7 @@ require("./generate-item-keys");
8
8
  require("./generate-item-names");
9
9
  require("./generate-rune-ids");
10
10
  require("./generate-rune-names");
11
+ require("./generate-rune-sets");
11
12
  require("./generate-spell-ids-by-name");
12
13
  require("./generate-spell-ids");
13
14
  require("./generate-spell-keys");
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,94 @@
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 runesReforged_json_1 = __importDefault(require("../runesReforged.json"));
7
+ const StatRunes_1 = require("../StatRunes");
8
+ const writeToTmpFile_1 = require("./Helpers/writeToTmpFile");
9
+ (async () => {
10
+ const constant = 'RuneSets';
11
+ const runeSets = {
12
+ PrimaryTrees: {},
13
+ SecondaryTrees: {},
14
+ Keystones: {},
15
+ StatRunes: {},
16
+ };
17
+ const keystoneHSetIdx = 0;
18
+ let totalRuneAmt = 0;
19
+ for (const runeTree of runesReforged_json_1.default) {
20
+ const runeTreeName = runeTree.name;
21
+ const horizontalSets = runeTree.slots;
22
+ let currentHSetIdx = 0;
23
+ for (const { runes, } of horizontalSets) {
24
+ for (let { id, name: runeName, } of runes) {
25
+ totalRuneAmt += 1;
26
+ // Add to PrimaryTrees
27
+ if (!(runeTreeName in runeSets.PrimaryTrees))
28
+ runeSets.PrimaryTrees[runeTreeName] = {};
29
+ runeSets.PrimaryTrees[runeTreeName][id] = runeName;
30
+ // Add to SecondaryTrees
31
+ if (!(runeTreeName in runeSets.SecondaryTrees))
32
+ runeSets.SecondaryTrees[runeTreeName] = {};
33
+ // But only if it isn't a keystone rune
34
+ if (currentHSetIdx != keystoneHSetIdx) {
35
+ runeSets.SecondaryTrees[runeTreeName][id] = runeName;
36
+ }
37
+ // Add to Keystones
38
+ // But only if it is a keystone rune
39
+ if (currentHSetIdx == keystoneHSetIdx) {
40
+ runeSets.Keystones[id] = runeName;
41
+ }
42
+ }
43
+ ++currentHSetIdx;
44
+ }
45
+ }
46
+ let statRuneId;
47
+ for (statRuneId in StatRunes_1.StatRunes) {
48
+ totalRuneAmt += 1;
49
+ // Add to StatRunes
50
+ runeSets.StatRunes[statRuneId] = StatRunes_1.StatRunes[statRuneId];
51
+ }
52
+ // Write to file
53
+ await (0, writeToTmpFile_1.writeToTmpFile)(constant, {
54
+ constName: 'PrimaryTrees',
55
+ json: runeSets.PrimaryTrees,
56
+ }, {
57
+ constName: 'SecondaryTrees',
58
+ json: runeSets.SecondaryTrees,
59
+ }, {
60
+ constName: 'Keystones',
61
+ json: runeSets.Keystones,
62
+ }, {
63
+ constName: 'StatRunes',
64
+ json: runeSets.StatRunes,
65
+ }, {
66
+ constName: 'All',
67
+ json: {
68
+ 1: '...PrimaryTrees.Precision',
69
+ 2: '...PrimaryTrees.Domination',
70
+ 3: '...PrimaryTrees.Sorcery',
71
+ 4: '...PrimaryTrees.Resolve',
72
+ 5: '...PrimaryTrees.Inspiration',
73
+ 6: '...StatRunes',
74
+ },
75
+ keysToSpread: [1, 2, 3, 4, 5, 6],
76
+ }, {
77
+ constName: 'RuneSets',
78
+ comment: `Contains all Rune IDs that are known to man in the game of League of Legends. Sorted by various useful categories. There are a total of ${totalRuneAmt} runes in the game.`,
79
+ json: {
80
+ 'PrimaryTrees': 'PrimaryTrees',
81
+ 'SecondaryTrees': 'SecondaryTrees',
82
+ 'Keystones': 'Keystones',
83
+ 'StatRunes': 'StatRunes',
84
+ 'All': 'All',
85
+ },
86
+ keysToSpread: [
87
+ 'PrimaryTrees',
88
+ 'SecondaryTrees',
89
+ 'Keystones',
90
+ 'StatRunes',
91
+ 'All',
92
+ ],
93
+ });
94
+ })();
@@ -0,0 +1,6 @@
1
+ export declare const Lanes: {
2
+ readonly TOP: "TOP";
3
+ readonly JUNGLE: "JUNGLE";
4
+ readonly MIDDLE: "MIDDLE";
5
+ readonly BOTTOM: "BOTTOM";
6
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Lanes = void 0;
4
+ exports.Lanes = {
5
+ 'TOP': 'TOP',
6
+ 'JUNGLE': 'JUNGLE',
7
+ 'MIDDLE': 'MIDDLE',
8
+ 'BOTTOM': 'BOTTOM',
9
+ };
@@ -0,0 +1,20 @@
1
+ export declare const Levels: {
2
+ readonly 1: 1;
3
+ readonly 2: 2;
4
+ readonly 3: 3;
5
+ readonly 4: 4;
6
+ readonly 5: 5;
7
+ readonly 6: 6;
8
+ readonly 7: 7;
9
+ readonly 8: 8;
10
+ readonly 9: 9;
11
+ readonly 10: 10;
12
+ readonly 11: 11;
13
+ readonly 12: 12;
14
+ readonly 13: 13;
15
+ readonly 14: 14;
16
+ readonly 15: 15;
17
+ readonly 16: 16;
18
+ readonly 17: 17;
19
+ readonly 18: 18;
20
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Levels = void 0;
4
+ exports.Levels = {
5
+ 1: 1,
6
+ 2: 2,
7
+ 3: 3,
8
+ 4: 4,
9
+ 5: 5,
10
+ 6: 6,
11
+ 7: 7,
12
+ 8: 8,
13
+ 9: 9,
14
+ 10: 10,
15
+ 11: 11,
16
+ 12: 12,
17
+ 13: 13,
18
+ 14: 14,
19
+ 15: 15,
20
+ 16: 16,
21
+ 17: 17,
22
+ 18: 18,
23
+ };
@@ -0,0 +1,7 @@
1
+ export declare const Positions: {
2
+ readonly TOP: "TOP";
3
+ readonly JUNGLE: "JUNGLE";
4
+ readonly MIDDLE: "MIDDLE";
5
+ readonly BOTTOM: "BOTTOM";
6
+ readonly UTILITY: "UTILITY";
7
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Positions = void 0;
4
+ exports.Positions = {
5
+ 'TOP': 'TOP',
6
+ 'JUNGLE': 'JUNGLE',
7
+ 'MIDDLE': 'MIDDLE',
8
+ 'BOTTOM': 'BOTTOM',
9
+ 'UTILITY': 'UTILITY',
10
+ };
@@ -1,4 +1,13 @@
1
1
  export declare const RuneIds: {
2
+ readonly "Defense (HP)": "5001";
3
+ readonly "Defense (AR)": "5002";
4
+ readonly "Defense (MR)": "5003";
5
+ readonly "Offense (AS)": "5005";
6
+ readonly "Offense (AH)": "5007";
7
+ readonly "Offense (AF)": "5008";
8
+ readonly "Flex (AR)": "5002f";
9
+ readonly "Flex (MR)": "5003f";
10
+ readonly "Flex (AF)": "5008f";
2
11
  readonly Electrocute: "8112";
3
12
  readonly Predator: "8124";
4
13
  readonly "Dark Harvest": "8128";
@@ -62,13 +71,4 @@ export declare const RuneIds: {
62
71
  readonly Scorch: "8237";
63
72
  readonly Waterwalking: "8232";
64
73
  readonly "Gathering Storm": "8236";
65
- readonly "Defense (HP)": "5001";
66
- readonly "Defense (AR)": "5002";
67
- readonly "Defense (MR)": "5003";
68
- readonly "Offense (AS)": "5005";
69
- readonly "Offense (AH)": "5007";
70
- readonly "Offense (AF)": "5008";
71
- readonly "Flex (AR)": "5002f";
72
- readonly "Flex (MR)": "5003f";
73
- readonly "Flex (AF)": "5008f";
74
74
  };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RuneIds = void 0;
4
+ const StatRuneIds_1 = require("./StatRuneIds");
5
+ const TreeRuneIds_1 = require("./TreeRuneIds");
6
+ exports.RuneIds = {
7
+ ...TreeRuneIds_1.TreeRuneIds,
8
+ ...StatRuneIds_1.StatRuneIds,
9
+ };
@@ -5,6 +5,9 @@ export declare const RuneNames: {
5
5
  readonly "5005": "Offense (AS)";
6
6
  readonly "5007": "Offense (AH)";
7
7
  readonly "5008": "Offense (AF)";
8
+ readonly "5002f": "Flex (AR)";
9
+ readonly "5003f": "Flex (MR)";
10
+ readonly "5008f": "Flex (AF)";
8
11
  readonly "8005": "Press the Attack";
9
12
  readonly "8008": "Lethal Tempo";
10
13
  readonly "8009": "Presence of Mind";
@@ -68,7 +71,4 @@ export declare const RuneNames: {
68
71
  readonly "9105": "Legend: Tenacity";
69
72
  readonly "9111": "Triumph";
70
73
  readonly "9923": "Hail of Blades";
71
- readonly "5002f": "Flex (AR)";
72
- readonly "5003f": "Flex (MR)";
73
- readonly "5008f": "Flex (AF)";
74
74
  };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RuneNames = void 0;
4
+ const StatRuneNames_1 = require("./StatRuneNames");
5
+ const TreeRuneNames_1 = require("./TreeRuneNames");
6
+ exports.RuneNames = {
7
+ ...TreeRuneNames_1.TreeRuneNames,
8
+ ...StatRuneNames_1.StatRuneNames,
9
+ };