@intlayer/chokidar 5.8.1 → 6.0.0-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/dist/cjs/chokidar/watcher.cjs +15 -20
  2. package/dist/cjs/chokidar/watcher.cjs.map +1 -1
  3. package/dist/cjs/fetchDistantDictionaries.cjs +18 -37
  4. package/dist/cjs/fetchDistantDictionaries.cjs.map +1 -1
  5. package/dist/cjs/{fetchDistantDictionaryKeys.cjs → fetchDistantDictionaryKeysAndUpdateTimestamp.cjs} +11 -19
  6. package/dist/cjs/fetchDistantDictionaryKeysAndUpdateTimestamp.cjs.map +1 -0
  7. package/dist/cjs/filterInvalidDictionaries.cjs +70 -0
  8. package/dist/cjs/filterInvalidDictionaries.cjs.map +1 -0
  9. package/dist/cjs/getBuiltFetchDictionariesPath.cjs +52 -0
  10. package/dist/cjs/getBuiltFetchDictionariesPath.cjs.map +1 -0
  11. package/dist/cjs/getBuiltRemoteDictionariesPath.cjs +51 -0
  12. package/dist/cjs/getBuiltRemoteDictionariesPath.cjs.map +1 -0
  13. package/dist/cjs/index.cjs +13 -11
  14. package/dist/cjs/index.cjs.map +1 -1
  15. package/dist/cjs/loadDictionaries/index.cjs +4 -4
  16. package/dist/cjs/loadDictionaries/index.cjs.map +1 -1
  17. package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs +57 -17
  18. package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs.map +1 -1
  19. package/dist/cjs/loadDictionaries/loadDictionaries.cjs +128 -53
  20. package/dist/cjs/loadDictionaries/loadDictionaries.cjs.map +1 -1
  21. package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs +108 -0
  22. package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs.map +1 -0
  23. package/dist/cjs/loadDictionaries/log.cjs +144 -0
  24. package/dist/cjs/loadDictionaries/log.cjs.map +1 -0
  25. package/dist/cjs/mergeDictionaries.cjs +18 -22
  26. package/dist/cjs/mergeDictionaries.cjs.map +1 -1
  27. package/dist/cjs/orderDictionaries.cjs +71 -0
  28. package/dist/cjs/orderDictionaries.cjs.map +1 -0
  29. package/dist/cjs/prepareContentDeclaration.cjs +4 -1
  30. package/dist/cjs/prepareContentDeclaration.cjs.map +1 -1
  31. package/dist/cjs/prepareIntlayer.cjs +9 -4
  32. package/dist/cjs/prepareIntlayer.cjs.map +1 -1
  33. package/dist/cjs/processPerLocaleDictionary.cjs.map +1 -1
  34. package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.cjs +22 -8
  35. package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.cjs.map +1 -1
  36. package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDynamicDictionary.cjs +44 -42
  37. package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDynamicDictionary.cjs.map +1 -1
  38. package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeFetchDictionary.cjs +83 -0
  39. package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeFetchDictionary.cjs.map +1 -0
  40. package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeMergedDictionary.cjs +29 -21
  41. package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeMergedDictionary.cjs.map +1 -1
  42. package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeRemoteDictionary.cjs +52 -0
  43. package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeRemoteDictionary.cjs.map +1 -0
  44. package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeUnmergedDictionary.cjs +44 -29
  45. package/dist/cjs/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeUnmergedDictionary.cjs.map +1 -1
  46. package/dist/cjs/transpiler/dictionary_to_main/createDictionaryEntryPoint.cjs +39 -34
  47. package/dist/cjs/transpiler/dictionary_to_main/createDictionaryEntryPoint.cjs.map +1 -1
  48. package/dist/cjs/transpiler/dictionary_to_type/createModuleAugmentation.cjs +4 -6
  49. package/dist/cjs/transpiler/dictionary_to_type/createModuleAugmentation.cjs.map +1 -1
  50. package/dist/cjs/transpiler/dictionary_to_type/createType.cjs +17 -16
  51. package/dist/cjs/transpiler/dictionary_to_type/createType.cjs.map +1 -1
  52. package/dist/cjs/utils/formatter.cjs +50 -0
  53. package/dist/cjs/utils/formatter.cjs.map +1 -0
  54. package/dist/cjs/utils/parallelize.cjs +43 -0
  55. package/dist/cjs/utils/parallelize.cjs.map +1 -0
  56. package/dist/cjs/utils/runOnce.cjs +2 -1
  57. package/dist/cjs/utils/runOnce.cjs.map +1 -1
  58. package/dist/cjs/writeContentDeclaration/dictionaryStatus.cjs.map +1 -1
  59. package/dist/cjs/writeContentDeclaration/formatCode.cjs +7 -4
  60. package/dist/cjs/writeContentDeclaration/formatCode.cjs.map +1 -1
  61. package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs +6 -2
  62. package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs.map +1 -1
  63. package/dist/cjs/writeContentDeclaration/writeJSFile.cjs +43 -25
  64. package/dist/cjs/writeContentDeclaration/writeJSFile.cjs.map +1 -1
  65. package/dist/esm/chokidar/watcher.mjs +16 -21
  66. package/dist/esm/chokidar/watcher.mjs.map +1 -1
  67. package/dist/esm/fetchDistantDictionaries.mjs +24 -28
  68. package/dist/esm/fetchDistantDictionaries.mjs.map +1 -1
  69. package/dist/esm/fetchDistantDictionaryKeysAndUpdateTimestamp.mjs +21 -0
  70. package/dist/esm/fetchDistantDictionaryKeysAndUpdateTimestamp.mjs.map +1 -0
  71. package/dist/esm/filterInvalidDictionaries.mjs +40 -0
  72. package/dist/esm/filterInvalidDictionaries.mjs.map +1 -0
  73. package/dist/esm/getBuiltFetchDictionariesPath.mjs +18 -0
  74. package/dist/esm/getBuiltFetchDictionariesPath.mjs.map +1 -0
  75. package/dist/esm/getBuiltRemoteDictionariesPath.mjs +17 -0
  76. package/dist/esm/getBuiltRemoteDictionariesPath.mjs.map +1 -0
  77. package/dist/esm/index.mjs +10 -9
  78. package/dist/esm/index.mjs.map +1 -1
  79. package/dist/esm/loadDictionaries/index.mjs +2 -2
  80. package/dist/esm/loadDictionaries/index.mjs.map +1 -1
  81. package/dist/esm/loadDictionaries/loadContentDeclaration.mjs +61 -18
  82. package/dist/esm/loadDictionaries/loadContentDeclaration.mjs.map +1 -1
  83. package/dist/esm/loadDictionaries/loadDictionaries.mjs +132 -53
  84. package/dist/esm/loadDictionaries/loadDictionaries.mjs.map +1 -1
  85. package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs +73 -0
  86. package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs.map +1 -0
  87. package/dist/esm/loadDictionaries/log.mjs +125 -0
  88. package/dist/esm/loadDictionaries/log.mjs.map +1 -0
  89. package/dist/esm/mergeDictionaries.mjs +19 -23
  90. package/dist/esm/mergeDictionaries.mjs.map +1 -1
  91. package/dist/esm/orderDictionaries.mjs +37 -0
  92. package/dist/esm/orderDictionaries.mjs.map +1 -0
  93. package/dist/esm/prepareContentDeclaration.mjs +4 -1
  94. package/dist/esm/prepareContentDeclaration.mjs.map +1 -1
  95. package/dist/esm/prepareIntlayer.mjs +9 -4
  96. package/dist/esm/prepareIntlayer.mjs.map +1 -1
  97. package/dist/esm/processPerLocaleDictionary.mjs.map +1 -1
  98. package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.mjs +25 -9
  99. package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.mjs.map +1 -1
  100. package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDynamicDictionary.mjs +45 -43
  101. package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDynamicDictionary.mjs.map +1 -1
  102. package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeFetchDictionary.mjs +58 -0
  103. package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeFetchDictionary.mjs.map +1 -0
  104. package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeMergedDictionary.mjs +29 -21
  105. package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeMergedDictionary.mjs.map +1 -1
  106. package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeRemoteDictionary.mjs +28 -0
  107. package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeRemoteDictionary.mjs.map +1 -0
  108. package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeUnmergedDictionary.mjs +45 -30
  109. package/dist/esm/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeUnmergedDictionary.mjs.map +1 -1
  110. package/dist/esm/transpiler/dictionary_to_main/createDictionaryEntryPoint.mjs +39 -34
  111. package/dist/esm/transpiler/dictionary_to_main/createDictionaryEntryPoint.mjs.map +1 -1
  112. package/dist/esm/transpiler/dictionary_to_type/createModuleAugmentation.mjs +4 -6
  113. package/dist/esm/transpiler/dictionary_to_type/createModuleAugmentation.mjs.map +1 -1
  114. package/dist/esm/transpiler/dictionary_to_type/createType.mjs +17 -16
  115. package/dist/esm/transpiler/dictionary_to_type/createType.mjs.map +1 -1
  116. package/dist/esm/utils/formatter.mjs +15 -0
  117. package/dist/esm/utils/formatter.mjs.map +1 -0
  118. package/dist/esm/utils/parallelize.mjs +9 -0
  119. package/dist/esm/utils/parallelize.mjs.map +1 -0
  120. package/dist/esm/utils/runOnce.mjs +2 -1
  121. package/dist/esm/utils/runOnce.mjs.map +1 -1
  122. package/dist/esm/writeContentDeclaration/formatCode.mjs +8 -5
  123. package/dist/esm/writeContentDeclaration/formatCode.mjs.map +1 -1
  124. package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs +6 -2
  125. package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs.map +1 -1
  126. package/dist/esm/writeContentDeclaration/writeJSFile.mjs +40 -22
  127. package/dist/esm/writeContentDeclaration/writeJSFile.mjs.map +1 -1
  128. package/dist/types/chokidar/watcher.d.ts.map +1 -1
  129. package/dist/types/fetchDistantDictionaries.d.ts +2 -1
  130. package/dist/types/fetchDistantDictionaries.d.ts.map +1 -1
  131. package/dist/types/fetchDistantDictionaryKeysAndUpdateTimestamp.d.ts +3 -0
  132. package/dist/types/fetchDistantDictionaryKeysAndUpdateTimestamp.d.ts.map +1 -0
  133. package/dist/types/filterInvalidDictionaries.d.ts +3 -0
  134. package/dist/types/filterInvalidDictionaries.d.ts.map +1 -0
  135. package/dist/types/getBuiltFetchDictionariesPath.d.ts +5 -0
  136. package/dist/types/getBuiltFetchDictionariesPath.d.ts.map +1 -0
  137. package/dist/types/getBuiltRemoteDictionariesPath.d.ts +5 -0
  138. package/dist/types/getBuiltRemoteDictionariesPath.d.ts.map +1 -0
  139. package/dist/types/index.d.ts +4 -4
  140. package/dist/types/index.d.ts.map +1 -1
  141. package/dist/types/loadDictionaries/index.d.ts +2 -2
  142. package/dist/types/loadDictionaries/index.d.ts.map +1 -1
  143. package/dist/types/loadDictionaries/loadContentDeclaration.d.ts +4 -1
  144. package/dist/types/loadDictionaries/loadContentDeclaration.d.ts.map +1 -1
  145. package/dist/types/loadDictionaries/loadDictionaries.d.ts +11 -1
  146. package/dist/types/loadDictionaries/loadDictionaries.d.ts.map +1 -1
  147. package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts +6 -0
  148. package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts.map +1 -0
  149. package/dist/types/loadDictionaries/log.d.ts +19 -0
  150. package/dist/types/loadDictionaries/log.d.ts.map +1 -0
  151. package/dist/types/mergeDictionaries.d.ts +1 -1
  152. package/dist/types/mergeDictionaries.d.ts.map +1 -1
  153. package/dist/types/orderDictionaries.d.ts +10 -0
  154. package/dist/types/orderDictionaries.d.ts.map +1 -0
  155. package/dist/types/prepareContentDeclaration.d.ts.map +1 -1
  156. package/dist/types/prepareIntlayer.d.ts.map +1 -1
  157. package/dist/types/processPerLocaleDictionary.d.ts +1 -1
  158. package/dist/types/transpiler/declaration_file_to_dictionary/index.d.ts +1 -0
  159. package/dist/types/transpiler/declaration_file_to_dictionary/index.d.ts.map +1 -1
  160. package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.d.ts +4 -3
  161. package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.d.ts.map +1 -1
  162. package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDynamicDictionary.d.ts +1 -1
  163. package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeDynamicDictionary.d.ts.map +1 -1
  164. package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeFetchDictionary.d.ts +23 -0
  165. package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeFetchDictionary.d.ts.map +1 -0
  166. package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeMergedDictionary.d.ts +1 -1
  167. package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeMergedDictionary.d.ts.map +1 -1
  168. package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeRemoteDictionary.d.ts +19 -0
  169. package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeRemoteDictionary.d.ts.map +1 -0
  170. package/dist/types/transpiler/declaration_file_to_dictionary/intlayer_dictionary/writeUnmergedDictionary.d.ts.map +1 -1
  171. package/dist/types/transpiler/dictionary_to_main/createDictionaryEntryPoint.d.ts +1 -1
  172. package/dist/types/transpiler/dictionary_to_main/createDictionaryEntryPoint.d.ts.map +1 -1
  173. package/dist/types/transpiler/dictionary_to_type/createModuleAugmentation.d.ts +1 -1
  174. package/dist/types/transpiler/dictionary_to_type/createModuleAugmentation.d.ts.map +1 -1
  175. package/dist/types/transpiler/dictionary_to_type/createType.d.ts +1 -1
  176. package/dist/types/transpiler/dictionary_to_type/createType.d.ts.map +1 -1
  177. package/dist/types/utils/formatter.d.ts +4 -0
  178. package/dist/types/utils/formatter.d.ts.map +1 -0
  179. package/dist/types/utils/parallelize.d.ts +2 -0
  180. package/dist/types/utils/parallelize.d.ts.map +1 -0
  181. package/dist/types/utils/runOnce.d.ts +1 -1
  182. package/dist/types/utils/runOnce.d.ts.map +1 -1
  183. package/dist/types/writeContentDeclaration/dictionaryStatus.d.ts +1 -1
  184. package/dist/types/writeContentDeclaration/dictionaryStatus.d.ts.map +1 -1
  185. package/dist/types/writeContentDeclaration/formatCode.d.ts.map +1 -1
  186. package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts +1 -1
  187. package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts.map +1 -1
  188. package/dist/types/writeContentDeclaration/writeJSFile.d.ts +1 -1
  189. package/dist/types/writeContentDeclaration/writeJSFile.d.ts.map +1 -1
  190. package/package.json +17 -15
  191. package/dist/cjs/checkDictionaryChanges.cjs +0 -58
  192. package/dist/cjs/checkDictionaryChanges.cjs.map +0 -1
  193. package/dist/cjs/fetchDistantDictionaryKeys.cjs.map +0 -1
  194. package/dist/cjs/getFilteredLocalesContent.cjs +0 -70
  195. package/dist/cjs/getFilteredLocalesContent.cjs.map +0 -1
  196. package/dist/cjs/loadDictionaries/loadDistantDictionaries.cjs +0 -44
  197. package/dist/cjs/loadDictionaries/loadDistantDictionaries.cjs.map +0 -1
  198. package/dist/cjs/log.cjs +0 -296
  199. package/dist/cjs/log.cjs.map +0 -1
  200. package/dist/esm/checkDictionaryChanges.mjs +0 -37
  201. package/dist/esm/checkDictionaryChanges.mjs.map +0 -1
  202. package/dist/esm/fetchDistantDictionaryKeys.mjs +0 -29
  203. package/dist/esm/fetchDistantDictionaryKeys.mjs.map +0 -1
  204. package/dist/esm/getFilteredLocalesContent.mjs +0 -49
  205. package/dist/esm/getFilteredLocalesContent.mjs.map +0 -1
  206. package/dist/esm/loadDictionaries/loadDistantDictionaries.mjs +0 -20
  207. package/dist/esm/loadDictionaries/loadDistantDictionaries.mjs.map +0 -1
  208. package/dist/esm/log.mjs +0 -262
  209. package/dist/esm/log.mjs.map +0 -1
  210. package/dist/types/checkDictionaryChanges.d.ts +0 -3
  211. package/dist/types/checkDictionaryChanges.d.ts.map +0 -1
  212. package/dist/types/fetchDistantDictionaryKeys.d.ts +0 -3
  213. package/dist/types/fetchDistantDictionaryKeys.d.ts.map +0 -1
  214. package/dist/types/getFilteredLocalesContent.d.ts +0 -4
  215. package/dist/types/getFilteredLocalesContent.d.ts.map +0 -1
  216. package/dist/types/loadDictionaries/loadDistantDictionaries.d.ts +0 -8
  217. package/dist/types/loadDictionaries/loadDistantDictionaries.d.ts.map +0 -1
  218. package/dist/types/log.d.ts +0 -45
  219. package/dist/types/log.d.ts.map +0 -1
package/dist/cjs/log.cjs DELETED
@@ -1,296 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var log_exports = {};
30
- __export(log_exports, {
31
- logger: () => logger
32
- });
33
- module.exports = __toCommonJS(log_exports);
34
- var import_config = require("@intlayer/config");
35
- var import_readline = __toESM(require("readline"));
36
- var import_sortAlphabetically = require('./utils/sortAlphabetically.cjs');
37
- const LINE_DETECTOR = "\u200B\u200B\u200B";
38
- const SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
39
- const RESET = "\x1B[0m";
40
- const GREEN = "\x1B[32m";
41
- const RED = "\x1B[31m";
42
- const BLUE = "\x1B[34m";
43
- const GREY = "\x1B[90m";
44
- const GREY_DARK = "\x1B[90m";
45
- class Logger {
46
- dictionariesStatuses = [];
47
- spinnerTimer = null;
48
- maxDictionaryKeyLength = 0;
49
- previousLineCount = 0;
50
- lineDifCounter = 0;
51
- originalStdoutWrite = null;
52
- extraLines = 0;
53
- isUpdating = false;
54
- config;
55
- // Singleton instance
56
- static instance;
57
- constructor() {
58
- }
59
- static getInstance() {
60
- if (!Logger.instance) {
61
- Logger.instance = new Logger();
62
- }
63
- return Logger.instance;
64
- }
65
- init(localDictionariesKeys, distantDictionariesKeys, configuration = (0, import_config.getConfiguration)()) {
66
- this.config = configuration;
67
- const allKeys = Array.from(
68
- new Set(
69
- [...localDictionariesKeys, ...distantDictionariesKeys].sort(
70
- import_sortAlphabetically.sortAlphabetically
71
- )
72
- )
73
- );
74
- this.maxDictionaryKeyLength = allKeys.reduce(
75
- (max, key) => key.length > max ? key.length : max,
76
- 0
77
- );
78
- this.dictionariesStatuses = allKeys.map((dictionaryKey) => {
79
- const states = [];
80
- if (localDictionariesKeys.includes(dictionaryKey)) {
81
- states.push({
82
- type: "local",
83
- status: "pending",
84
- spinnerFrameIndex: 0
85
- });
86
- }
87
- if (distantDictionariesKeys.includes(dictionaryKey)) {
88
- states.push({
89
- type: "distant",
90
- status: "pending",
91
- spinnerFrameIndex: 0
92
- });
93
- }
94
- return {
95
- dictionaryKey,
96
- state: states
97
- };
98
- });
99
- this.startSpinner();
100
- this.updateAllStatusLines();
101
- }
102
- // New method to add dictionary keys after initialization
103
- addDictionaryKeys(type, dictionaryKeys) {
104
- for (const dictionaryKey of dictionaryKeys) {
105
- if (dictionaryKey.length > this.maxDictionaryKeyLength) {
106
- this.maxDictionaryKeyLength = dictionaryKey.length;
107
- }
108
- let statusObj = this.dictionariesStatuses.find(
109
- (ds) => ds.dictionaryKey === dictionaryKey
110
- );
111
- if (!statusObj) {
112
- statusObj = {
113
- dictionaryKey,
114
- state: []
115
- };
116
- this.dictionariesStatuses.push(statusObj);
117
- const newState = {
118
- type,
119
- status: "pending",
120
- spinnerFrameIndex: 0
121
- };
122
- statusObj.state.push(newState);
123
- } else {
124
- const existingState = statusObj.state.find((s) => s.type === type);
125
- if (!existingState) {
126
- const newState = {
127
- type,
128
- status: "pending",
129
- spinnerFrameIndex: 0
130
- };
131
- statusObj.state.push(newState);
132
- }
133
- }
134
- }
135
- this.updateAllStatusLines();
136
- }
137
- startSpinner() {
138
- if (!this.spinnerTimer) {
139
- this.spinnerTimer = setInterval(() => {
140
- this.updateAllStatusLines();
141
- }, 100);
142
- }
143
- }
144
- stopSpinner() {
145
- if (this.spinnerTimer) {
146
- clearInterval(this.spinnerTimer);
147
- this.spinnerTimer = null;
148
- }
149
- }
150
- // Method to update the terminal output
151
- updateOutput(content) {
152
- if (this.config?.log.mode !== "verbose") return;
153
- if (!this.originalStdoutWrite) {
154
- this.originalStdoutWrite = process.stdout.write.bind(process.stdout);
155
- this.extraLines = 0;
156
- const write = (chunk, encoding, callback) => {
157
- const str = typeof chunk === "string" ? chunk : chunk.toString();
158
- const newLines = (str.match(/\n/g) ?? []).length;
159
- if (!this.isUpdating) {
160
- this.extraLines += newLines;
161
- }
162
- return this.originalStdoutWrite(chunk, encoding, callback);
163
- };
164
- process.stdout.write = write;
165
- }
166
- this.isUpdating = true;
167
- const contentLines = content.split("\n");
168
- const indexOfLineDetector = contentLines.indexOf(LINE_DETECTOR.trim());
169
- if (indexOfLineDetector > 0) {
170
- this.lineDifCounter = indexOfLineDetector;
171
- } else {
172
- this.lineDifCounter = 0;
173
- }
174
- const totalLinesToMoveUp = this.previousLineCount + this.lineDifCounter + this.extraLines;
175
- import_readline.default.moveCursor(process.stdout, 0, -totalLinesToMoveUp);
176
- import_readline.default.clearScreenDown(process.stdout);
177
- contentLines.forEach((line) => {
178
- process.stdout.write(`${line}\x1B[K
179
- `);
180
- });
181
- this.previousLineCount = contentLines.length;
182
- this.extraLines = 0;
183
- this.isUpdating = false;
184
- }
185
- stop() {
186
- this.stopSpinner();
187
- }
188
- updateStatus(dictionaries) {
189
- for (const { dictionaryKey, type, status } of dictionaries) {
190
- const statusObj = this.dictionariesStatuses.find(
191
- (ds) => ds.dictionaryKey === dictionaryKey
192
- );
193
- if (statusObj) {
194
- const state = statusObj.state.find((s) => s.type === type);
195
- if (state) {
196
- Object.assign(state, status);
197
- } else {
198
- if (status.status === void 0) {
199
- status.status = "pending";
200
- }
201
- const newState = {
202
- type,
203
- status: status.status,
204
- icon: status.icon ?? "",
205
- error: status.error,
206
- errorMessage: status.errorMessage,
207
- spinnerFrameIndex: status.spinnerFrameIndex ?? 0
208
- };
209
- statusObj.state.push(newState);
210
- }
211
- } else {
212
- const newState = {
213
- type,
214
- status: status.status ?? "pending",
215
- icon: status.icon ?? "",
216
- error: status.error,
217
- errorMessage: status.errorMessage,
218
- spinnerFrameIndex: status.spinnerFrameIndex ?? 0
219
- };
220
- this.dictionariesStatuses.push({
221
- dictionaryKey,
222
- state: [newState]
223
- });
224
- }
225
- }
226
- this.updateAllStatusLines();
227
- }
228
- getStatusIcon(status) {
229
- const statusIcons = {
230
- pending: "\u23F2",
231
- fetching: "",
232
- // Spinner handled separately
233
- built: "\u2714",
234
- imported: "\u2714",
235
- error: "\u2716"
236
- };
237
- return statusIcons[status] ?? "";
238
- }
239
- getStatusLine(statusObj) {
240
- const keyPadding = this.maxDictionaryKeyLength - statusObj.dictionaryKey.length;
241
- const paddedKey = `${statusObj.dictionaryKey}${" ".repeat(keyPadding)}`;
242
- const states = statusObj.state.map((state) => {
243
- let colorStart = "";
244
- let colorEnd = "";
245
- let icon = this.getStatusIcon(state.status);
246
- if (state.status === "fetching") {
247
- icon = SPINNER_FRAMES[state.spinnerFrameIndex % SPINNER_FRAMES.length];
248
- colorStart = BLUE;
249
- colorEnd = RESET;
250
- } else if (state.status === "error") {
251
- colorStart = RED;
252
- colorEnd = RESET;
253
- } else if (state.status === "imported" || state.status === "built") {
254
- colorStart = GREEN;
255
- colorEnd = RESET;
256
- } else {
257
- colorStart = GREY;
258
- colorEnd = RESET;
259
- }
260
- const statusBlock = `${GREY_DARK}[${state.type}: ${colorStart}${icon} ${state.status}${GREY_DARK}]${colorEnd}`;
261
- return `${colorStart}${statusBlock}${colorEnd}`;
262
- });
263
- return `${this.config?.log.prefix}- ${paddedKey} ${states.join(" ")}`;
264
- }
265
- // Replace logUpdate calls with your custom methods
266
- updateAllStatusLines() {
267
- const terminalHeight = process.stdout.rows;
268
- const maxVisibleLines = terminalHeight - 1;
269
- const lines = this.dictionariesStatuses.map((statusObj) => {
270
- statusObj.state.forEach((state) => {
271
- if (state.status === "fetching") {
272
- state.spinnerFrameIndex = (state.spinnerFrameIndex + 1) % SPINNER_FRAMES.length;
273
- }
274
- });
275
- return this.getStatusLine(statusObj);
276
- });
277
- let content;
278
- if (lines.length > maxVisibleLines) {
279
- const visibleLines = lines.slice(0, maxVisibleLines - 5);
280
- const summary = `${this.config?.log.prefix}... and ${lines.length - visibleLines.length} more`;
281
- content = LINE_DETECTOR + visibleLines.join("\n") + "\n" + summary;
282
- } else {
283
- content = lines.join("\n");
284
- }
285
- this.updateOutput(content);
286
- }
287
- getStatuses() {
288
- return this.dictionariesStatuses;
289
- }
290
- }
291
- const logger = Logger.getInstance();
292
- // Annotate the CommonJS export names for ESM import in node:
293
- 0 && (module.exports = {
294
- logger
295
- });
296
- //# sourceMappingURL=log.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/log.ts"],"sourcesContent":["import { type IntlayerConfig, getConfiguration } from '@intlayer/config';\nimport readline from 'readline';\nimport { sortAlphabetically } from './utils/sortAlphabetically';\n\nexport type State = {\n type: 'local' | 'distant';\n status: 'pending' | 'fetching' | 'fetched' | 'error' | 'imported' | 'built';\n icon?: string;\n error?: Error;\n errorMessage?: string;\n spinnerFrameIndex?: number;\n};\n\nexport type DictionariesStatus = {\n dictionaryKey: string;\n state: State[];\n};\n\nconst LINE_DETECTOR = '\\u200B\\u200B\\u200B'; // Three zero-width spaces\nconst SPINNER_FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];\n\n// ANSI color codes\nconst RESET = '\\x1b[0m';\nconst GREEN = '\\x1b[32m';\nconst RED = '\\x1b[31m';\nconst BLUE = '\\x1b[34m';\nconst GREY = '\\x1b[90m';\nconst GREY_DARK = '\\x1b[90m';\n\nclass Logger {\n private dictionariesStatuses: DictionariesStatus[] = [];\n private spinnerTimer: NodeJS.Timeout | null = null;\n private maxDictionaryKeyLength: number = 0;\n private previousLineCount: number = 0;\n private lineDifCounter: number = 0;\n private originalStdoutWrite:\n | ((\n chunk: string | Uint8Array, // `chunk` can be either a string or a Uint8Array\n encoding?: BufferEncoding, // `encoding` is optional and should be a BufferEncoding\n callback?: (err?: Error | null) => void // `callback` is optional and a function\n ) => boolean)\n | null = null;\n private extraLines: number = 0;\n private isUpdating: boolean = false;\n private config?: IntlayerConfig;\n\n // Singleton instance\n private static instance: Logger;\n\n private constructor() {}\n\n public static getInstance(): Logger {\n if (!Logger.instance) {\n Logger.instance = new Logger();\n }\n return Logger.instance;\n }\n\n public init(\n localDictionariesKeys: string[],\n distantDictionariesKeys: string[],\n configuration: IntlayerConfig = getConfiguration()\n ) {\n this.config = configuration;\n\n const allKeys = Array.from(\n new Set(\n [...localDictionariesKeys, ...distantDictionariesKeys].sort(\n sortAlphabetically\n )\n )\n );\n\n this.maxDictionaryKeyLength = allKeys.reduce(\n (max, key) => (key.length > max ? key.length : max),\n 0\n );\n\n this.dictionariesStatuses = allKeys.map((dictionaryKey) => {\n const states: State[] = [];\n\n if (localDictionariesKeys.includes(dictionaryKey)) {\n states.push({\n type: 'local',\n status: 'pending',\n spinnerFrameIndex: 0,\n });\n }\n if (distantDictionariesKeys.includes(dictionaryKey)) {\n states.push({\n type: 'distant',\n status: 'pending',\n spinnerFrameIndex: 0,\n });\n }\n\n return {\n dictionaryKey,\n state: states,\n };\n });\n\n // Start spinner timer\n this.startSpinner();\n\n // Update all status lines (this will output the initial statuses)\n this.updateAllStatusLines();\n }\n\n // New method to add dictionary keys after initialization\n public addDictionaryKeys(\n type: 'local' | 'distant',\n dictionaryKeys: string[]\n ) {\n for (const dictionaryKey of dictionaryKeys) {\n // Update maxDictionaryKeyLength if the new key is longer\n if (dictionaryKey.length > this.maxDictionaryKeyLength) {\n this.maxDictionaryKeyLength = dictionaryKey.length;\n }\n\n let statusObj = this.dictionariesStatuses.find(\n (ds) => ds.dictionaryKey === dictionaryKey\n );\n\n if (!statusObj) {\n // If the dictionaryKey doesn't exist yet, create a new DictionariesStatus\n\n statusObj = {\n dictionaryKey,\n state: [],\n };\n this.dictionariesStatuses.push(statusObj);\n\n const newState: State = {\n type,\n status: 'pending',\n spinnerFrameIndex: 0,\n };\n statusObj.state.push(newState);\n } else {\n const existingState = statusObj.state.find((s) => s.type === type);\n if (!existingState) {\n // Add new state for the type\n\n const newState: State = {\n type,\n status: 'pending',\n spinnerFrameIndex: 0,\n };\n statusObj.state.push(newState);\n }\n }\n }\n\n // Call updateAllStatusLines() to refresh the output\n this.updateAllStatusLines();\n }\n\n private startSpinner() {\n if (!this.spinnerTimer) {\n this.spinnerTimer = setInterval(() => {\n this.updateAllStatusLines();\n }, 100); // Update every 100ms\n }\n }\n\n private stopSpinner() {\n if (this.spinnerTimer) {\n clearInterval(this.spinnerTimer);\n this.spinnerTimer = null;\n }\n }\n\n // Method to update the terminal output\n private updateOutput(content: string) {\n if (this.config?.log.mode !== 'verbose') return;\n\n // Monkey-patch process.stdout.write to keep track of extra lines\n if (!this.originalStdoutWrite) {\n this.originalStdoutWrite = process.stdout.write.bind(process.stdout);\n this.extraLines = 0;\n\n const write = (\n chunk: string | Uint8Array, // `chunk` can be either a string or a Uint8Array\n encoding?: BufferEncoding, // `encoding` is optional and should be a BufferEncoding\n callback?: (err?: Error | null) => void // `callback` is optional and a function\n ) => {\n const str = typeof chunk === 'string' ? chunk : chunk.toString();\n const newLines = (str.match(/\\n/g) ?? []).length;\n\n // If the write is not initiated by Logger's updateOutput method\n if (!this.isUpdating) {\n this.extraLines += newLines;\n }\n\n return this.originalStdoutWrite!(chunk, encoding, callback);\n };\n\n process.stdout.write = write as typeof process.stdout.write;\n }\n\n // Set a flag to indicate that updateOutput is running\n this.isUpdating = true;\n\n // Adjust lineDifCounter if LINE_DETECTOR is not the first line\n const contentLines = content.split('\\n');\n const indexOfLineDetector = contentLines.indexOf(LINE_DETECTOR.trim());\n\n if (indexOfLineDetector > 0) {\n // LINE_DETECTOR is not at the first line\n this.lineDifCounter = indexOfLineDetector;\n } else {\n this.lineDifCounter = 0;\n }\n\n // Calculate total lines to move up\n const totalLinesToMoveUp =\n this.previousLineCount + this.lineDifCounter + this.extraLines;\n\n // Move cursor up by totalLinesToMoveUp\n readline.moveCursor(process.stdout, 0, -totalLinesToMoveUp);\n\n // Clear all lines downwards\n readline.clearScreenDown(process.stdout);\n\n // Write the updated content\n contentLines.forEach((line) => {\n process.stdout.write(`${line}\\x1b[K\\n`);\n });\n\n // Update previousLineCount\n this.previousLineCount = contentLines.length;\n\n // Reset extraLines counter and updating flag\n this.extraLines = 0;\n this.isUpdating = false;\n }\n\n public stop() {\n this.stopSpinner();\n }\n\n public updateStatus(\n dictionaries: {\n dictionaryKey: string;\n type: 'local' | 'distant';\n status: Partial<State>;\n }[]\n ) {\n for (const { dictionaryKey, type, status } of dictionaries) {\n const statusObj = this.dictionariesStatuses.find(\n (ds) => ds.dictionaryKey === dictionaryKey\n );\n if (statusObj) {\n const state = statusObj.state.find((s) => s.type === type);\n if (state) {\n // Update existing state\n Object.assign(state, status);\n } else {\n // If the state for this type doesn't exist yet, add it\n if (status.status === undefined) {\n status.status = 'pending'; // Provide default status\n }\n const newState: State = {\n type,\n status: status.status,\n icon: status.icon ?? '',\n error: status.error,\n errorMessage: status.errorMessage,\n spinnerFrameIndex: status.spinnerFrameIndex ?? 0,\n };\n statusObj.state.push(newState);\n }\n } else {\n // If the status object doesn't exist, create it\n const newState: State = {\n type,\n status: status.status ?? 'pending',\n icon: status.icon ?? '',\n error: status.error,\n errorMessage: status.errorMessage,\n spinnerFrameIndex: status.spinnerFrameIndex ?? 0,\n };\n this.dictionariesStatuses.push({\n dictionaryKey,\n state: [newState],\n });\n }\n }\n\n // Update the display after status change\n this.updateAllStatusLines();\n }\n\n private getStatusIcon(status: string): string {\n const statusIcons: Record<string, string> = {\n pending: '⏲',\n fetching: '', // Spinner handled separately\n built: '✔',\n imported: '✔',\n error: '✖',\n };\n return statusIcons[status] ?? '';\n }\n\n private getStatusLine(statusObj: DictionariesStatus): string {\n const keyPadding =\n this.maxDictionaryKeyLength - statusObj.dictionaryKey.length;\n const paddedKey = `${statusObj.dictionaryKey}${' '.repeat(keyPadding)}`;\n\n const states = statusObj.state.map((state) => {\n let colorStart = '';\n let colorEnd = '';\n let icon = this.getStatusIcon(state.status);\n if (state.status === 'fetching') {\n // Use spinner frame\n icon = SPINNER_FRAMES[state.spinnerFrameIndex! % SPINNER_FRAMES.length];\n colorStart = BLUE;\n colorEnd = RESET;\n } else if (state.status === 'error') {\n colorStart = RED;\n colorEnd = RESET;\n } else if (state.status === 'imported' || state.status === 'built') {\n colorStart = GREEN;\n colorEnd = RESET;\n } else {\n colorStart = GREY;\n colorEnd = RESET;\n }\n\n // Format the status block\n const statusBlock = `${GREY_DARK}[${state.type}: ${colorStart}${icon} ${state.status}${GREY_DARK}]${colorEnd}`;\n\n return `${colorStart}${statusBlock}${colorEnd}`;\n });\n\n return `${this.config?.log.prefix}- ${paddedKey} ${states.join(' ')}`;\n }\n\n // Replace logUpdate calls with your custom methods\n private updateAllStatusLines() {\n const terminalHeight = process.stdout.rows;\n const maxVisibleLines = terminalHeight - 1;\n\n const lines = this.dictionariesStatuses.map((statusObj) => {\n statusObj.state.forEach((state) => {\n if (state.status === 'fetching') {\n // Update spinner frame\n state.spinnerFrameIndex =\n (state.spinnerFrameIndex! + 1) % SPINNER_FRAMES.length;\n }\n });\n return this.getStatusLine(statusObj);\n });\n\n let content;\n\n if (lines.length > maxVisibleLines) {\n const visibleLines = lines.slice(0, maxVisibleLines - 5);\n const summary = `${this.config?.log.prefix}... and ${lines.length - visibleLines.length} more`;\n content = LINE_DETECTOR + visibleLines.join('\\n') + '\\n' + summary;\n } else {\n content = lines.join('\\n');\n }\n\n this.updateOutput(content);\n }\n\n public getStatuses() {\n return this.dictionariesStatuses;\n }\n}\n\nexport const logger = Logger.getInstance();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAsD;AACtD,sBAAqB;AACrB,gCAAmC;AAgBnC,MAAM,gBAAgB;AACtB,MAAM,iBAAiB,CAAC,UAAK,UAAK,UAAK,UAAK,UAAK,UAAK,UAAK,UAAK,UAAK,QAAG;AAGxE,MAAM,QAAQ;AACd,MAAM,QAAQ;AACd,MAAM,MAAM;AACZ,MAAM,OAAO;AACb,MAAM,OAAO;AACb,MAAM,YAAY;AAElB,MAAM,OAAO;AAAA,EACH,uBAA6C,CAAC;AAAA,EAC9C,eAAsC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AI,KAAK,UAAU,GAAG,IAAI,IAAI,MAAM,MAAM,GAAG,SAAS,IAAI,QAAQ;AAE5G,aAAO,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ;AAAA,IAC/C,CAAC;AAED,WAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,KAAK,SAAS,IAAI,OAAO,KAAK,GAAG,CAAC;AAAA,EACrE;AAAA;AAAA,EAGQ,uBAAuB;AAC7B,UAAM,iBAAiB,QAAQ,OAAO;AACtC,UAAM,kBAAkB,iBAAiB;AAEzC,UAAM,QAAQ,KAAK,qBAAqB,IAAI,CAAC,cAAc;AACzD,gBAAU,MAAM,QAAQ,CAAC,UAAU;AACjC,YAAI,MAAM,WAAW,YAAY;AAE/B,gBAAM,qBACH,MAAM,oBAAqB,KAAK,eAAe;AAAA,QACpD;AAAA,MACF,CAAC;AACD,aAAO,KAAK,cAAc,SAAS;AAAA,IACrC,CAAC;AAED,QAAI;AAEJ,QAAI,MAAM,SAAS,iBAAiB;AAClC,YAAM,eAAe,MAAM,MAAM,GAAG,kBAAkB,CAAC;AACvD,YAAM,UAAU,GAAG,KAAK,QAAQ,IAAI,MAAM,WAAW,MAAM,SAAS,aAAa,MAAM;AACvF,gBAAU,gBAAgB,aAAa,KAAK,IAAI,IAAI,OAAO;AAAA,IAC7D,OAAO;AACL,gBAAU,MAAM,KAAK,IAAI;AAAA,IAC3B;AAEA,SAAK,aAAa,OAAO;AAAA,EAC3B;AAAA,EAEO,cAAc;AACnB,WAAO,KAAK;AAAA,EACd;AACF;AAEO,MAAM,SAAS,OAAO,YAAY;","names":["readline"]}
@@ -1,37 +0,0 @@
1
- import { IntlayerEventListener } from "@intlayer/api";
2
- import {
3
- getAppLogger,
4
- getConfiguration
5
- } from "@intlayer/config";
6
- import { buildIntlayerDictionary } from "./transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary.mjs";
7
- const writeDictionary = async (dictionary, configuration) => {
8
- const appLogger = getAppLogger(configuration);
9
- appLogger(`Writing dictionary ${dictionary.key}`);
10
- await buildIntlayerDictionary([dictionary]);
11
- };
12
- const checkDictionaryChanges = async () => {
13
- const configuration = getConfiguration();
14
- const appLogger = getAppLogger(configuration);
15
- const { editor } = configuration;
16
- if (!editor.hotReload) return;
17
- if (!editor.clientId) return;
18
- if (!editor.clientSecret) return;
19
- const eventSource = new IntlayerEventListener(configuration);
20
- try {
21
- await eventSource.initialize().then(() => {
22
- appLogger("Connected to Intlayer. Hot reload enabled");
23
- });
24
- } catch (error) {
25
- appLogger("Error initializing IntlayerEventListener:", {
26
- level: "error"
27
- });
28
- }
29
- eventSource.onDictionaryAdded = (dictionary) => writeDictionary(dictionary, configuration);
30
- eventSource.onDictionaryChange = (dictionary) => writeDictionary(dictionary, configuration);
31
- eventSource.onDictionaryDeleted = (dictionary) => writeDictionary(dictionary, configuration);
32
- return eventSource;
33
- };
34
- export {
35
- checkDictionaryChanges
36
- };
37
- //# sourceMappingURL=checkDictionaryChanges.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/checkDictionaryChanges.ts"],"sourcesContent":["import { IntlayerEventListener } from '@intlayer/api';\n// @ts-ignore: @intlayer/backend is not built yet\nimport type { DictionaryAPI } from '@intlayer/backend';\nimport {\n getAppLogger,\n getConfiguration,\n IntlayerConfig,\n} from '@intlayer/config';\nimport { buildIntlayerDictionary } from './transpiler/declaration_file_to_dictionary/intlayer_dictionary/buildIntlayerDictionary';\n\nconst writeDictionary = async (\n dictionary: DictionaryAPI,\n configuration: IntlayerConfig\n) => {\n const appLogger = getAppLogger(configuration);\n appLogger(`Writing dictionary ${dictionary.key}`);\n await buildIntlayerDictionary([dictionary]);\n};\n\nexport const checkDictionaryChanges = async () => {\n const configuration = getConfiguration();\n const appLogger = getAppLogger(configuration);\n\n const { editor } = configuration;\n\n if (!editor.hotReload) return;\n if (!editor.clientId) return;\n if (!editor.clientSecret) return;\n\n const eventSource = new IntlayerEventListener(configuration);\n\n try {\n await eventSource.initialize().then(() => {\n appLogger('Connected to Intlayer. Hot reload enabled');\n });\n } catch (error) {\n appLogger('Error initializing IntlayerEventListener:', {\n level: 'error',\n });\n }\n\n eventSource.onDictionaryAdded = (dictionary) =>\n writeDictionary(dictionary, configuration);\n eventSource.onDictionaryChange = (dictionary) =>\n writeDictionary(dictionary, configuration);\n eventSource.onDictionaryDeleted = (dictionary) =>\n writeDictionary(dictionary, configuration);\n\n return eventSource;\n};\n"],"mappings":"AAAA,SAAS,6BAA6B;AAGtC;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AACP,SAAS,+BAA+B;AAExC,MAAM,kBAAkB,OACtB,YACA,kBACG;AACH,QAAM,YAAY,aAAa,aAAa;AAC5C,YAAU,sBAAsB,WAAW,GAAG,EAAE;AAChD,QAAM,wBAAwB,CAAC,UAAU,CAAC;AAC5C;AAEO,MAAM,yBAAyB,YAAY;AAChD,QAAM,gBAAgB,iBAAiB;AACvC,QAAM,YAAY,aAAa,aAAa;AAE5C,QAAM,EAAE,OAAO,IAAI;AAEnB,MAAI,CAAC,OAAO,UAAW;AACvB,MAAI,CAAC,OAAO,SAAU;AACtB,MAAI,CAAC,OAAO,aAAc;AAE1B,QAAM,cAAc,IAAI,sBAAsB,aAAa;AAE3D,MAAI;AACF,UAAM,YAAY,WAAW,EAAE,KAAK,MAAM;AACxC,gBAAU,2CAA2C;AAAA,IACvD,CAAC;AAAA,EACH,SAAS,OAAO;AACd,cAAU,6CAA6C;AAAA,MACrD,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,cAAY,oBAAoB,CAAC,eAC/B,gBAAgB,YAAY,aAAa;AAC3C,cAAY,qBAAqB,CAAC,eAChC,gBAAgB,YAAY,aAAa;AAC3C,cAAY,sBAAsB,CAAC,eACjC,gBAAgB,YAAY,aAAa;AAE3C,SAAO;AACT;","names":[]}
@@ -1,29 +0,0 @@
1
- import { getIntlayerAPI } from "@intlayer/api";
2
- import { getConfiguration } from "@intlayer/config";
3
- const fetchDistantDictionaryKeys = async (configuration = getConfiguration()) => {
4
- const { clientId, clientSecret } = configuration.editor;
5
- if (!clientId || !clientSecret) {
6
- throw new Error(
7
- "Missing OAuth2 client ID or client secret. To get access token go to https://intlayer.org/dashboard/project."
8
- );
9
- }
10
- const intlayerAPI = getIntlayerAPI(void 0, configuration);
11
- const oAuth2TokenResult = await intlayerAPI.oAuth.getOAuth2AccessToken();
12
- const oAuth2AccessToken = oAuth2TokenResult.data?.accessToken;
13
- const getDictionariesKeysResult = await intlayerAPI.dictionary.getDictionariesKeys({
14
- ...oAuth2AccessToken && {
15
- headers: {
16
- Authorization: `Bearer ${oAuth2AccessToken}`
17
- }
18
- }
19
- });
20
- if (!getDictionariesKeysResult.data) {
21
- throw new Error("No distant dictionaries found");
22
- }
23
- const distantDictionariesKeys = getDictionariesKeysResult.data;
24
- return distantDictionariesKeys;
25
- };
26
- export {
27
- fetchDistantDictionaryKeys
28
- };
29
- //# sourceMappingURL=fetchDistantDictionaryKeys.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/fetchDistantDictionaryKeys.ts"],"sourcesContent":["import { getIntlayerAPI } from '@intlayer/api';\nimport { getConfiguration, type IntlayerConfig } from '@intlayer/config';\n\nexport const fetchDistantDictionaryKeys = async (\n configuration: IntlayerConfig = getConfiguration()\n): Promise<string[]> => {\n const { clientId, clientSecret } = configuration.editor;\n\n if (!clientId || !clientSecret) {\n throw new Error(\n 'Missing OAuth2 client ID or client secret. To get access token go to https://intlayer.org/dashboard/project.'\n );\n }\n\n const intlayerAPI = getIntlayerAPI(undefined, configuration);\n\n const oAuth2TokenResult = await intlayerAPI.oAuth.getOAuth2AccessToken();\n\n const oAuth2AccessToken = oAuth2TokenResult.data?.accessToken;\n\n // Get the list of dictionary keys\n const getDictionariesKeysResult =\n await intlayerAPI.dictionary.getDictionariesKeys({\n ...(oAuth2AccessToken && {\n headers: {\n Authorization: `Bearer ${oAuth2AccessToken}`,\n },\n }),\n });\n\n if (!getDictionariesKeysResult.data) {\n throw new Error('No distant dictionaries found');\n }\n\n const distantDictionariesKeys: string[] = getDictionariesKeysResult.data;\n\n // Apply any filtering if needed\n return distantDictionariesKeys;\n};\n"],"mappings":"AAAA,SAAS,sBAAsB;AAC/B,SAAS,wBAA6C;AAE/C,MAAM,6BAA6B,OACxC,gBAAgC,iBAAiB,MAC3B;AACtB,QAAM,EAAE,UAAU,aAAa,IAAI,cAAc;AAEjD,MAAI,CAAC,YAAY,CAAC,cAAc;AAC9B,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,QAAM,cAAc,eAAe,QAAW,aAAa;AAE3D,QAAM,oBAAoB,MAAM,YAAY,MAAM,qBAAqB;AAEvE,QAAM,oBAAoB,kBAAkB,MAAM;AAGlD,QAAM,4BACJ,MAAM,YAAY,WAAW,oBAAoB;AAAA,IAC/C,GAAI,qBAAqB;AAAA,MACvB,SAAS;AAAA,QACP,eAAe,UAAU,iBAAiB;AAAA,MAC5C;AAAA,IACF;AAAA,EACF,CAAC;AAEH,MAAI,CAAC,0BAA0B,MAAM;AACnC,UAAM,IAAI,MAAM,+BAA+B;AAAA,EACjD;AAEA,QAAM,0BAAoC,0BAA0B;AAGpE,SAAO;AACT;","names":[]}
@@ -1,49 +0,0 @@
1
- import {
2
- deepTransformNode,
3
- NodeType
4
- } from "@intlayer/core";
5
- const filterTranlationsPlugin = (locales, fallback = void 0) => ({
6
- id: "filter-translations-plugin",
7
- canHandle: (node) => typeof node === "object" && node?.nodeType === NodeType.Translation,
8
- transform: (node, props, deepTransformNode2) => {
9
- const translationMap = node.translation;
10
- const localesArray = Array.isArray(locales) ? locales : [locales];
11
- const isSingleLocale = localesArray.length === 1;
12
- if (isSingleLocale) {
13
- let content = translationMap[localesArray[0]];
14
- if (typeof content === "undefined" && fallback) {
15
- content = translationMap[fallback];
16
- }
17
- return deepTransformNode2(content, props);
18
- }
19
- const filteredTranslationMap = Object.fromEntries(
20
- Object.entries(translationMap).filter(
21
- ([key]) => locales.includes(key)
22
- )
23
- );
24
- return {
25
- ...node,
26
- translation: deepTransformNode2(filteredTranslationMap, {
27
- ...props,
28
- keyPath: [
29
- ...props.keyPath,
30
- { type: NodeType.Object, key: NodeType.Translation }
31
- ]
32
- })
33
- };
34
- }
35
- });
36
- const getFilteredLocalesContent = (node, locale, nodeProps, fallback) => {
37
- const plugins = [
38
- filterTranlationsPlugin(locale, fallback),
39
- ...nodeProps.plugins ?? []
40
- ];
41
- return deepTransformNode(node, {
42
- ...nodeProps,
43
- plugins
44
- });
45
- };
46
- export {
47
- getFilteredLocalesContent
48
- };
49
- //# sourceMappingURL=getFilteredLocalesContent.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/getFilteredLocalesContent.ts"],"sourcesContent":["import type { Locales, LocalesValues } from '@intlayer/config/client';\nimport {\n ContentNode,\n deepTransformNode,\n NodeType,\n type NodeProps,\n type Plugins,\n} from '@intlayer/core';\n\nconst filterTranlationsPlugin = (\n locales: LocalesValues[] | LocalesValues,\n fallback: LocalesValues | undefined = undefined // fallback mean that if field is not translated, it will use the default locale,\n): Plugins => ({\n id: 'filter-translations-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeType.Translation,\n transform: (node, props, deepTransformNode) => {\n const translationMap = node.translation as Record<Locales, string>;\n\n const localesArray = Array.isArray(locales) ? locales : [locales];\n const isSingleLocale = localesArray.length === 1;\n\n if (isSingleLocale) {\n let content = translationMap[localesArray[0] as Locales];\n\n if (typeof content === 'undefined' && fallback) {\n content = translationMap[fallback as Locales];\n }\n\n return deepTransformNode(content, props);\n }\n\n const filteredTranslationMap = Object.fromEntries(\n Object.entries(translationMap).filter(([key]) =>\n locales.includes(key as Locales)\n )\n );\n\n return {\n ...node,\n translation: deepTransformNode(filteredTranslationMap, {\n ...props,\n keyPath: [\n ...props.keyPath,\n { type: NodeType.Object, key: NodeType.Translation },\n ],\n }),\n };\n },\n});\n\nexport const getFilteredLocalesContent = (\n node: ContentNode,\n locale: LocalesValues | LocalesValues[],\n nodeProps: NodeProps,\n fallback?: LocalesValues // fallback mean that if field is not translated, it will use the default locale,\n) => {\n const plugins: Plugins[] = [\n filterTranlationsPlugin(locale, fallback),\n ...(nodeProps.plugins ?? []),\n ];\n\n return deepTransformNode(node, {\n ...nodeProps,\n plugins,\n });\n};\n"],"mappings":"AACA;AAAA,EAEE;AAAA,EACA;AAAA,OAGK;AAEP,MAAM,0BAA0B,CAC9B,SACA,WAAsC,YACzB;AAAA,EACb,IAAI;AAAA,EACJ,WAAW,CAAC,SACV,OAAO,SAAS,YAAY,MAAM,aAAa,SAAS;AAAA,EAC1D,WAAW,CAAC,MAAM,OAAOA,uBAAsB;AAC7C,UAAM,iBAAiB,KAAK;AAE5B,UAAM,eAAe,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO;AAChE,UAAM,iBAAiB,aAAa,WAAW;AAE/C,QAAI,gBAAgB;AAClB,UAAI,UAAU,eAAe,aAAa,CAAC,CAAY;AAEvD,UAAI,OAAO,YAAY,eAAe,UAAU;AAC9C,kBAAU,eAAe,QAAmB;AAAA,MAC9C;AAEA,aAAOA,mBAAkB,SAAS,KAAK;AAAA,IACzC;AAEA,UAAM,yBAAyB,OAAO;AAAA,MACpC,OAAO,QAAQ,cAAc,EAAE;AAAA,QAAO,CAAC,CAAC,GAAG,MACzC,QAAQ,SAAS,GAAc;AAAA,MACjC;AAAA,IACF;AAEA,WAAO;AAAA,MACL,GAAG;AAAA,MACH,aAAaA,mBAAkB,wBAAwB;AAAA,QACrD,GAAG;AAAA,QACH,SAAS;AAAA,UACP,GAAG,MAAM;AAAA,UACT,EAAE,MAAM,SAAS,QAAQ,KAAK,SAAS,YAAY;AAAA,QACrD;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF;AAEO,MAAM,4BAA4B,CACvC,MACA,QACA,WACA,aACG;AACH,QAAM,UAAqB;AAAA,IACzB,wBAAwB,QAAQ,QAAQ;AAAA,IACxC,GAAI,UAAU,WAAW,CAAC;AAAA,EAC5B;AAEA,SAAO,kBAAkB,MAAM;AAAA,IAC7B,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH;","names":["deepTransformNode"]}
@@ -1,20 +0,0 @@
1
- import { fetchDistantDictionaries } from "../fetchDistantDictionaries.mjs";
2
- const formatDistantDictionaries = (dictionaries) => {
3
- return dictionaries.map((dict) => ({
4
- ...dict,
5
- location: "distant"
6
- }));
7
- };
8
- const loadDistantDictionaries = async (options) => {
9
- try {
10
- const distantDictionaries = await fetchDistantDictionaries(options);
11
- return formatDistantDictionaries(distantDictionaries);
12
- } catch (error) {
13
- console.error(error);
14
- return [];
15
- }
16
- };
17
- export {
18
- loadDistantDictionaries
19
- };
20
- //# sourceMappingURL=loadDistantDictionaries.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/loadDictionaries/loadDistantDictionaries.ts"],"sourcesContent":["// @ts-ignore @intlayer/backend is not build yet\nimport type { DictionaryAPI } from '@intlayer/backend';\nimport { fetchDistantDictionaries } from '../fetchDistantDictionaries';\n\ntype LoadDistantDictionariesOptions = {\n dictionaryKeys: string[];\n newDictionariesPath?: string;\n};\n\nconst formatDistantDictionaries = (dictionaries: DictionaryAPI[]) => {\n return dictionaries.map((dict) => ({\n ...dict,\n location: 'distant' as const,\n }));\n};\n\nexport const loadDistantDictionaries = async (\n options: LoadDistantDictionariesOptions\n): Promise<DictionaryAPI[]> => {\n try {\n const distantDictionaries = await fetchDistantDictionaries(options);\n\n return formatDistantDictionaries(distantDictionaries);\n } catch (error) {\n console.error(error);\n return [];\n }\n};\n"],"mappings":"AAEA,SAAS,gCAAgC;AAOzC,MAAM,4BAA4B,CAAC,iBAAkC;AACnE,SAAO,aAAa,IAAI,CAAC,UAAU;AAAA,IACjC,GAAG;AAAA,IACH,UAAU;AAAA,EACZ,EAAE;AACJ;AAEO,MAAM,0BAA0B,OACrC,YAC6B;AAC7B,MAAI;AACF,UAAM,sBAAsB,MAAM,yBAAyB,OAAO;AAElE,WAAO,0BAA0B,mBAAmB;AAAA,EACtD,SAAS,OAAO;AACd,YAAQ,MAAM,KAAK;AACnB,WAAO,CAAC;AAAA,EACV;AACF;","names":[]}