intlayer-editor 7.1.4 → 7.1.6

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 (95) hide show
  1. package/client/dist/assets/{CodeBlockShiki-DKhht_eB.js → CodeBlockShiki-0jwM_dRT.js} +8 -8
  2. package/client/dist/assets/{angular-html-CqDu7dYI.js → angular-html-ChYFFmg7.js} +1 -1
  3. package/client/dist/assets/{angular-ts-JUgYMaAO.js → angular-ts-CpuGw9DZ.js} +3 -3
  4. package/client/dist/assets/{astro-DgRPb09x.js → astro-B0lt4qz0.js} +2 -2
  5. package/client/dist/assets/{blade-BNo76U2i.js → blade-DtOFwYfC.js} +3 -3
  6. package/client/dist/assets/{bundle-web-Cw-fHx1Z.js → bundle-web-DGfBFzL-.js} +91 -54
  7. package/client/dist/assets/catppuccin-frappe-C21OPQfC.js +4 -0
  8. package/client/dist/assets/catppuccin-latte-0ZtXlsrX.js +4 -0
  9. package/client/dist/assets/catppuccin-macchiato-BD_FR4sl.js +4 -0
  10. package/client/dist/assets/catppuccin-mocha-C653csR5.js +4 -0
  11. package/client/dist/assets/{coffee-DRmm8L99.js → coffee-DJkIX6_2.js} +1 -1
  12. package/client/dist/assets/csv-Ba84L8e5.js +7 -0
  13. package/client/dist/assets/{dark-plus-DmZ1Dzd4.js → dark-plus-D1BtfNxb.js} +1 -1
  14. package/client/dist/assets/{graphql-BRx9mrhY.js → graphql-oNSp8dGZ.js} +2 -2
  15. package/client/dist/assets/{gruvbox-dark-hard-C89wZ4s3.js → gruvbox-dark-hard-DVsRsETr.js} +1 -1
  16. package/client/dist/assets/{gruvbox-dark-medium-swz85q_b.js → gruvbox-dark-medium-B5JBrQdg.js} +1 -1
  17. package/client/dist/assets/{gruvbox-dark-soft-BYHBHQJW.js → gruvbox-dark-soft-Db-YOqRx.js} +1 -1
  18. package/client/dist/assets/{gruvbox-light-hard-DEF_ZxYZ.js → gruvbox-light-hard-CXzJt7DI.js} +1 -1
  19. package/client/dist/assets/{gruvbox-light-medium-ziUMnHJx.js → gruvbox-light-medium-B89RAI1Y.js} +1 -1
  20. package/client/dist/assets/{gruvbox-light-soft-Cuwp0tsB.js → gruvbox-light-soft-Cs0hTZYv.js} +1 -1
  21. package/client/dist/assets/{haml-O037W7a8.js → haml-BJ44RGT2.js} +1 -1
  22. package/client/dist/assets/{handlebars-kwM0CYPJ.js → handlebars-DTnHNTeU.js} +2 -2
  23. package/client/dist/assets/{html-Dkr1GMsP.js → html-BOjX3v2Q.js} +1 -1
  24. package/client/dist/assets/{html-derivative-9rfoponC.js → html-derivative-Cswrtqyq.js} +2 -2
  25. package/client/dist/assets/{http-CB4Cm8yY.js → http-B1QlEqj7.js} +3 -3
  26. package/client/dist/assets/hurl-Br_hZn4E.js +18 -0
  27. package/client/dist/assets/{index-wlmXkWJe.js → index-BscemyLr.js} +3188 -12455
  28. package/client/dist/assets/{index-HnG5A4Ve.css → index-UvWk4YN-.css} +0 -42
  29. package/client/dist/assets/{javascript-BXO33K-2.js → javascript-DLs729Nk.js} +1 -1
  30. package/client/dist/assets/{jinja-DX5epABU.js → jinja-BAZ4h1JD.js} +2 -2
  31. package/client/dist/assets/{jison-5-r4c8L1.js → jison-Bwp1bXaL.js} +1 -1
  32. package/client/dist/assets/{julia-CSYRDJn0.js → julia-D0f5tMoo.js} +1 -1
  33. package/client/dist/assets/{marko-D6KBFqYp.js → marko-rwefYVra.js} +1 -1
  34. package/client/dist/assets/{mdc-N73HqDUD.js → mdc-ucHOH9Vl.js} +3 -3
  35. package/client/dist/assets/{php-D0sxH1LE.js → php-CI-6KGJr.js} +2 -2
  36. package/client/dist/assets/{pug-HL4PJmfE.js → pug-C-LeC0-n.js} +2 -2
  37. package/client/dist/assets/{svelte-zeq24KqG.js → svelte-CYSO_rLN.js} +2 -2
  38. package/client/dist/assets/{ts-tags-CINmazHI.js → ts-tags-DCkNjov3.js} +3 -3
  39. package/client/dist/assets/{typescript-j4TNaYMi.js → typescript-Cju7JbYj.js} +1 -1
  40. package/client/dist/assets/{vue-CV5z08t_.js → vue-M1-XqLgv.js} +4 -4
  41. package/client/dist/assets/{vue-html-k04GfWOW.js → vue-html-BzXE5pTE.js} +5 -5
  42. package/client/dist/assets/{vue-vine-BL_nHMoY.js → vue-vine-BT_ihGGO.js} +5 -5
  43. package/client/dist/index.html +2 -2
  44. package/package.json +17 -16
  45. package/server/dist/_virtual/rolldown_runtime.cjs +0 -4
  46. package/server/dist/controllers/dictionary.controller.cjs +2 -2
  47. package/server/dist/controllers/dictionary.controller.cjs.map +1 -1
  48. package/server/dist/controllers/dictionary.controller.mjs +1 -1
  49. package/server/dist/index.cjs +1 -1
  50. package/server/dist/index.mjs +1 -1
  51. package/client/dist/assets/catppuccin-frappe-CHwQEOgD.js +0 -4
  52. package/client/dist/assets/catppuccin-latte-CmwvB_4H.js +0 -4
  53. package/client/dist/assets/catppuccin-macchiato-CnXZ85T9.js +0 -4
  54. package/client/dist/assets/catppuccin-mocha-CSstQplL.js +0 -4
  55. package/server/dist/_virtual/rolldown_runtime.mjs +0 -31
  56. package/server/dist/controllers/configuration.controller.d.ts.map +0 -1
  57. package/server/dist/controllers/dictionary.controller.d.ts.map +0 -1
  58. package/server/dist/packages/@intlayer/chokidar/dist/esm/_virtual/_utils_asset.cjs +0 -99
  59. package/server/dist/packages/@intlayer/chokidar/dist/esm/_virtual/_utils_asset.cjs.map +0 -1
  60. package/server/dist/packages/@intlayer/chokidar/dist/esm/_virtual/_utils_asset.mjs +0 -98
  61. package/server/dist/packages/@intlayer/chokidar/dist/esm/_virtual/_utils_asset.mjs.map +0 -1
  62. package/server/dist/packages/@intlayer/chokidar/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs +0 -36
  63. package/server/dist/packages/@intlayer/chokidar/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs.map +0 -1
  64. package/server/dist/packages/@intlayer/chokidar/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs +0 -35
  65. package/server/dist/packages/@intlayer/chokidar/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs.map +0 -1
  66. package/server/dist/packages/@intlayer/chokidar/dist/esm/utils/getFormatFromExtension.cjs +0 -18
  67. package/server/dist/packages/@intlayer/chokidar/dist/esm/utils/getFormatFromExtension.cjs.map +0 -1
  68. package/server/dist/packages/@intlayer/chokidar/dist/esm/utils/getFormatFromExtension.mjs +0 -17
  69. package/server/dist/packages/@intlayer/chokidar/dist/esm/utils/getFormatFromExtension.mjs.map +0 -1
  70. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/detectFormatCommand.cjs +0 -25
  71. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/detectFormatCommand.cjs.map +0 -1
  72. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/detectFormatCommand.mjs +0 -24
  73. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/detectFormatCommand.mjs.map +0 -1
  74. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/processContentDeclarationContent.cjs +0 -72
  75. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/processContentDeclarationContent.cjs.map +0 -1
  76. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs +0 -71
  77. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs.map +0 -1
  78. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/transformJSFile.cjs +0 -1744
  79. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/transformJSFile.cjs.map +0 -1
  80. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/transformJSFile.mjs +0 -1743
  81. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/transformJSFile.mjs.map +0 -1
  82. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeContentDeclaration.cjs +0 -115
  83. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeContentDeclaration.cjs.map +0 -1
  84. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs +0 -114
  85. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs.map +0 -1
  86. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeJSFile.cjs +0 -66
  87. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeJSFile.cjs.map +0 -1
  88. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeJSFile.mjs +0 -65
  89. package/server/dist/packages/@intlayer/chokidar/dist/esm/writeContentDeclaration/writeJSFile.mjs.map +0 -1
  90. package/server/dist/routes/config.routes.d.ts.map +0 -1
  91. package/server/dist/routes/dictionary.routes.d.ts.map +0 -1
  92. package/server/dist/types/Routes.d.ts.map +0 -1
  93. package/server/dist/utils/checkPortAvailability.d.ts.map +0 -1
  94. package/server/dist/utils/httpStatusCodes.d.ts.map +0 -1
  95. package/server/dist/utils/responseData.d.ts.map +0 -1
@@ -1,66 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.cjs');
2
- const require_getContentDeclarationFileTemplate = require('../getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs');
3
- const require_getFormatFromExtension = require('../utils/getFormatFromExtension.cjs');
4
- const require_transformJSFile = require('./transformJSFile.cjs');
5
- const require_detectFormatCommand = require('./detectFormatCommand.cjs');
6
- let __intlayer_config = require("@intlayer/config");
7
- let node_fs = require("node:fs");
8
- let node_fs_promises = require("node:fs/promises");
9
- let node_path = require("node:path");
10
- let node_child_process = require("node:child_process");
11
-
12
- //#region ../@intlayer/chokidar/dist/esm/writeContentDeclaration/writeJSFile.mjs
13
- /**
14
- * Updates a JavaScript/TypeScript file based on the provided JSON instructions.
15
- * It targets a specific dictionary object within the file (identified by its 'key' property)
16
- * and updates its 'content' entries. Currently, it focuses on modifying arguments
17
- * of 't' (translation) function calls.
18
- */
19
- const writeJSFile = async (filePath, dictionary, configuration) => {
20
- const mergedDictionary = {
21
- ...configuration.dictionary,
22
- ...dictionary
23
- };
24
- const appLogger = (0, __intlayer_config.getAppLogger)(configuration);
25
- if (!(0, node_fs.existsSync)(filePath)) {
26
- const format = require_getFormatFromExtension.getFormatFromExtension((0, node_path.extname)(filePath));
27
- appLogger("File does not exist, creating it", { isVerbose: true });
28
- await (0, node_fs_promises.writeFile)(filePath, await require_getContentDeclarationFileTemplate.getContentDeclarationFileTemplate(mergedDictionary.key, format, Object.fromEntries(Object.entries({
29
- id: mergedDictionary.id,
30
- locale: mergedDictionary.locale,
31
- filled: mergedDictionary.filled,
32
- fill: mergedDictionary.fill,
33
- description: mergedDictionary.description,
34
- title: mergedDictionary.title,
35
- tags: mergedDictionary.tags,
36
- version: mergedDictionary.version,
37
- priority: mergedDictionary.priority,
38
- live: mergedDictionary.live
39
- }).filter(([, value]) => value !== void 0))), "utf-8");
40
- }
41
- const finalCode = await require_transformJSFile.transformJSFile(await (0, node_fs_promises.readFile)(filePath, "utf-8"), dictionary);
42
- try {
43
- await (0, node_fs_promises.writeFile)(filePath, finalCode, "utf-8");
44
- (0, __intlayer_config.logger)(`Successfully updated ${filePath}`, {
45
- level: "info",
46
- isVerbose: true
47
- });
48
- } catch (error) {
49
- const err = error;
50
- (0, __intlayer_config.logger)(`Failed to write updated file: ${filePath}`, { level: "error" });
51
- throw new Error(`Failed to write updated file ${filePath}: ${err.message}`);
52
- }
53
- const formatCommand = require_detectFormatCommand.detectFormatCommand(configuration);
54
- if (formatCommand) try {
55
- (0, node_child_process.execSync)(formatCommand.replace("{{file}}", filePath), {
56
- stdio: "inherit",
57
- cwd: configuration.content.baseDir
58
- });
59
- } catch (error) {
60
- console.error(error);
61
- }
62
- };
63
-
64
- //#endregion
65
- exports.writeJSFile = writeJSFile;
66
- //# sourceMappingURL=writeJSFile.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"writeJSFile.cjs","names":["getFormatFromExtension","getContentDeclarationFileTemplate","transformJSFile","detectFormatCommand"],"sources":["../../../../../../../../../@intlayer/chokidar/dist/esm/writeContentDeclaration/writeJSFile.mjs"],"sourcesContent":["import { getContentDeclarationFileTemplate } from \"../getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs\";\nimport { getFormatFromExtension } from \"../utils/getFormatFromExtension.mjs\";\nimport { transformJSFile } from \"./transformJSFile.mjs\";\nimport { detectFormatCommand } from \"./detectFormatCommand.mjs\";\nimport { existsSync } from \"node:fs\";\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { getAppLogger, logger } from \"@intlayer/config\";\nimport { extname } from \"node:path\";\nimport { execSync } from \"node:child_process\";\n\n//#region src/writeContentDeclaration/writeJSFile.ts\n/**\n* Updates a JavaScript/TypeScript file based on the provided JSON instructions.\n* It targets a specific dictionary object within the file (identified by its 'key' property)\n* and updates its 'content' entries. Currently, it focuses on modifying arguments\n* of 't' (translation) function calls.\n*/\nconst writeJSFile = async (filePath, dictionary, configuration) => {\n\tconst mergedDictionary = {\n\t\t...configuration.dictionary,\n\t\t...dictionary\n\t};\n\tconst appLogger = getAppLogger(configuration);\n\tif (!existsSync(filePath)) {\n\t\tconst format = getFormatFromExtension(extname(filePath));\n\t\tappLogger(\"File does not exist, creating it\", { isVerbose: true });\n\t\tawait writeFile(filePath, await getContentDeclarationFileTemplate(mergedDictionary.key, format, Object.fromEntries(Object.entries({\n\t\t\tid: mergedDictionary.id,\n\t\t\tlocale: mergedDictionary.locale,\n\t\t\tfilled: mergedDictionary.filled,\n\t\t\tfill: mergedDictionary.fill,\n\t\t\tdescription: mergedDictionary.description,\n\t\t\ttitle: mergedDictionary.title,\n\t\t\ttags: mergedDictionary.tags,\n\t\t\tversion: mergedDictionary.version,\n\t\t\tpriority: mergedDictionary.priority,\n\t\t\tlive: mergedDictionary.live\n\t\t}).filter(([, value]) => value !== void 0))), \"utf-8\");\n\t}\n\tconst finalCode = await transformJSFile(await readFile(filePath, \"utf-8\"), dictionary);\n\ttry {\n\t\tawait writeFile(filePath, finalCode, \"utf-8\");\n\t\tlogger(`Successfully updated ${filePath}`, {\n\t\t\tlevel: \"info\",\n\t\t\tisVerbose: true\n\t\t});\n\t} catch (error) {\n\t\tconst err = error;\n\t\tlogger(`Failed to write updated file: ${filePath}`, { level: \"error\" });\n\t\tthrow new Error(`Failed to write updated file ${filePath}: ${err.message}`);\n\t}\n\tconst formatCommand = detectFormatCommand(configuration);\n\tif (formatCommand) try {\n\t\texecSync(formatCommand.replace(\"{{file}}\", filePath), {\n\t\t\tstdio: \"inherit\",\n\t\t\tcwd: configuration.content.baseDir\n\t\t});\n\t} catch (error) {\n\t\tconsole.error(error);\n\t}\n};\n\n//#endregion\nexport { writeJSFile };\n//# sourceMappingURL=writeJSFile.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,MAAM,cAAc,OAAO,UAAU,YAAY,kBAAkB;CAClE,MAAM,mBAAmB;EACxB,GAAG,cAAc;EACjB,GAAG;EACH;CACD,MAAM,gDAAyB,cAAc;AAC7C,KAAI,yBAAY,SAAS,EAAE;EAC1B,MAAM,SAASA,6EAA+B,SAAS,CAAC;AACxD,YAAU,oCAAoC,EAAE,WAAW,MAAM,CAAC;AAClE,wCAAgB,UAAU,MAAMC,4EAAkC,iBAAiB,KAAK,QAAQ,OAAO,YAAY,OAAO,QAAQ;GACjI,IAAI,iBAAiB;GACrB,QAAQ,iBAAiB;GACzB,QAAQ,iBAAiB;GACzB,MAAM,iBAAiB;GACvB,aAAa,iBAAiB;GAC9B,OAAO,iBAAiB;GACxB,MAAM,iBAAiB;GACvB,SAAS,iBAAiB;GAC1B,UAAU,iBAAiB;GAC3B,MAAM,iBAAiB;GACvB,CAAC,CAAC,QAAQ,GAAG,WAAW,UAAU,KAAK,EAAE,CAAC,CAAC,EAAE,QAAQ;;CAEvD,MAAM,YAAY,MAAMC,wCAAgB,qCAAe,UAAU,QAAQ,EAAE,WAAW;AACtF,KAAI;AACH,wCAAgB,UAAU,WAAW,QAAQ;AAC7C,gCAAO,wBAAwB,YAAY;GAC1C,OAAO;GACP,WAAW;GACX,CAAC;UACM,OAAO;EACf,MAAM,MAAM;AACZ,gCAAO,iCAAiC,YAAY,EAAE,OAAO,SAAS,CAAC;AACvE,QAAM,IAAI,MAAM,gCAAgC,SAAS,IAAI,IAAI,UAAU;;CAE5E,MAAM,gBAAgBC,gDAAoB,cAAc;AACxD,KAAI,cAAe,KAAI;AACtB,mCAAS,cAAc,QAAQ,YAAY,SAAS,EAAE;GACrD,OAAO;GACP,KAAK,cAAc,QAAQ;GAC3B,CAAC;UACM,OAAO;AACf,UAAQ,MAAM,MAAM"}
@@ -1,65 +0,0 @@
1
- import { getContentDeclarationFileTemplate } from "../getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs";
2
- import { getFormatFromExtension } from "../utils/getFormatFromExtension.mjs";
3
- import { transformJSFile } from "./transformJSFile.mjs";
4
- import { detectFormatCommand } from "./detectFormatCommand.mjs";
5
- import { getAppLogger, logger } from "@intlayer/config";
6
- import { existsSync } from "node:fs";
7
- import { readFile, writeFile } from "node:fs/promises";
8
- import { extname } from "node:path";
9
- import { execSync } from "node:child_process";
10
-
11
- //#region ../@intlayer/chokidar/dist/esm/writeContentDeclaration/writeJSFile.mjs
12
- /**
13
- * Updates a JavaScript/TypeScript file based on the provided JSON instructions.
14
- * It targets a specific dictionary object within the file (identified by its 'key' property)
15
- * and updates its 'content' entries. Currently, it focuses on modifying arguments
16
- * of 't' (translation) function calls.
17
- */
18
- const writeJSFile = async (filePath, dictionary, configuration) => {
19
- const mergedDictionary = {
20
- ...configuration.dictionary,
21
- ...dictionary
22
- };
23
- const appLogger = getAppLogger(configuration);
24
- if (!existsSync(filePath)) {
25
- const format = getFormatFromExtension(extname(filePath));
26
- appLogger("File does not exist, creating it", { isVerbose: true });
27
- await writeFile(filePath, await getContentDeclarationFileTemplate(mergedDictionary.key, format, Object.fromEntries(Object.entries({
28
- id: mergedDictionary.id,
29
- locale: mergedDictionary.locale,
30
- filled: mergedDictionary.filled,
31
- fill: mergedDictionary.fill,
32
- description: mergedDictionary.description,
33
- title: mergedDictionary.title,
34
- tags: mergedDictionary.tags,
35
- version: mergedDictionary.version,
36
- priority: mergedDictionary.priority,
37
- live: mergedDictionary.live
38
- }).filter(([, value]) => value !== void 0))), "utf-8");
39
- }
40
- const finalCode = await transformJSFile(await readFile(filePath, "utf-8"), dictionary);
41
- try {
42
- await writeFile(filePath, finalCode, "utf-8");
43
- logger(`Successfully updated ${filePath}`, {
44
- level: "info",
45
- isVerbose: true
46
- });
47
- } catch (error) {
48
- const err = error;
49
- logger(`Failed to write updated file: ${filePath}`, { level: "error" });
50
- throw new Error(`Failed to write updated file ${filePath}: ${err.message}`);
51
- }
52
- const formatCommand = detectFormatCommand(configuration);
53
- if (formatCommand) try {
54
- execSync(formatCommand.replace("{{file}}", filePath), {
55
- stdio: "inherit",
56
- cwd: configuration.content.baseDir
57
- });
58
- } catch (error) {
59
- console.error(error);
60
- }
61
- };
62
-
63
- //#endregion
64
- export { writeJSFile };
65
- //# sourceMappingURL=writeJSFile.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"writeJSFile.mjs","names":[],"sources":["../../../../../../../../../@intlayer/chokidar/dist/esm/writeContentDeclaration/writeJSFile.mjs"],"sourcesContent":["import { getContentDeclarationFileTemplate } from \"../getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs\";\nimport { getFormatFromExtension } from \"../utils/getFormatFromExtension.mjs\";\nimport { transformJSFile } from \"./transformJSFile.mjs\";\nimport { detectFormatCommand } from \"./detectFormatCommand.mjs\";\nimport { existsSync } from \"node:fs\";\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { getAppLogger, logger } from \"@intlayer/config\";\nimport { extname } from \"node:path\";\nimport { execSync } from \"node:child_process\";\n\n//#region src/writeContentDeclaration/writeJSFile.ts\n/**\n* Updates a JavaScript/TypeScript file based on the provided JSON instructions.\n* It targets a specific dictionary object within the file (identified by its 'key' property)\n* and updates its 'content' entries. Currently, it focuses on modifying arguments\n* of 't' (translation) function calls.\n*/\nconst writeJSFile = async (filePath, dictionary, configuration) => {\n\tconst mergedDictionary = {\n\t\t...configuration.dictionary,\n\t\t...dictionary\n\t};\n\tconst appLogger = getAppLogger(configuration);\n\tif (!existsSync(filePath)) {\n\t\tconst format = getFormatFromExtension(extname(filePath));\n\t\tappLogger(\"File does not exist, creating it\", { isVerbose: true });\n\t\tawait writeFile(filePath, await getContentDeclarationFileTemplate(mergedDictionary.key, format, Object.fromEntries(Object.entries({\n\t\t\tid: mergedDictionary.id,\n\t\t\tlocale: mergedDictionary.locale,\n\t\t\tfilled: mergedDictionary.filled,\n\t\t\tfill: mergedDictionary.fill,\n\t\t\tdescription: mergedDictionary.description,\n\t\t\ttitle: mergedDictionary.title,\n\t\t\ttags: mergedDictionary.tags,\n\t\t\tversion: mergedDictionary.version,\n\t\t\tpriority: mergedDictionary.priority,\n\t\t\tlive: mergedDictionary.live\n\t\t}).filter(([, value]) => value !== void 0))), \"utf-8\");\n\t}\n\tconst finalCode = await transformJSFile(await readFile(filePath, \"utf-8\"), dictionary);\n\ttry {\n\t\tawait writeFile(filePath, finalCode, \"utf-8\");\n\t\tlogger(`Successfully updated ${filePath}`, {\n\t\t\tlevel: \"info\",\n\t\t\tisVerbose: true\n\t\t});\n\t} catch (error) {\n\t\tconst err = error;\n\t\tlogger(`Failed to write updated file: ${filePath}`, { level: \"error\" });\n\t\tthrow new Error(`Failed to write updated file ${filePath}: ${err.message}`);\n\t}\n\tconst formatCommand = detectFormatCommand(configuration);\n\tif (formatCommand) try {\n\t\texecSync(formatCommand.replace(\"{{file}}\", filePath), {\n\t\t\tstdio: \"inherit\",\n\t\t\tcwd: configuration.content.baseDir\n\t\t});\n\t} catch (error) {\n\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AQ,MAAM,MAAM"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.routes.d.ts","names":[],"sources":["../../src/routes/config.routes.ts"],"sourcesContent":[],"mappings":";;;cAKa,qBAAqB;cAMrB;EANA,gBAAA,EAAA;IAMA,QAAA,EAAA,MAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dictionary.routes.d.ts","names":[],"sources":["../../src/routes/dictionary.routes.ts"],"sourcesContent":[],"mappings":";;;cAQa,kBAAkB;cAMlB;EANA,eAAA,EAAA;IAMA,QAAA,EAAA,MAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Routes.d.ts","names":[],"sources":["../../src/types/Routes.ts"],"sourcesContent":[],"mappings":";KAAY,KAAA;EAAA,QAAK,EAAA,MAAA;EAOL,GAAA,EAAA,MAAM,GAAA,CAAA,CAAA,IAAA,EAAkB,GAAA,EAAA,GAAf,MAAM,CAAA;;;KAAf,MAAA,GAAS,eAAe"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkPortAvailability.d.ts","names":[],"sources":["../../src/utils/checkPortAvailability.ts"],"sourcesContent":[],"mappings":";cAEa,yCAAwC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"httpStatusCodes.d.ts","names":[],"sources":["../../src/utils/httpStatusCodes.ts"],"sourcesContent":[],"mappings":";;AAgJA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAAY,eAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"responseData.d.ts","names":[],"sources":["../../src/utils/responseData.ts"],"sourcesContent":[],"mappings":";;;KAEK,SAAA;;EAAA,KAAA,EAAA,MAAS;EAMF,OAAA,EAAA,MAAY;CAId,GAAA,MAAA;AACF,KALI,YAKJ,CAAA,IAAA,IAAA,CAAA,GAAA;EACE,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