intlayer-editor 8.4.0 → 8.4.2
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.
- package/client/dist/assets/{CodeBlockShiki-k-_aip9S.js → CodeBlockShiki-BQ0Urv39.js} +17 -18
- package/client/dist/assets/{angular-html-C9KJai8F.js → angular-html-B40pL6wl.js} +1 -1
- package/client/dist/assets/{angular-ts-BVoYf76x.js → angular-ts-DEfIxZMp.js} +2 -2
- package/client/dist/assets/{astro-CthjkCYm.js → astro-DDXXh1_1.js} +6 -6
- package/client/dist/assets/bash-Ctbhv6bB.js +2 -0
- package/client/dist/assets/{blade-BtLAoZmt.js → blade-BqWGpLk3.js} +7 -7
- package/client/dist/assets/{bundle-web-m4UDFBJk.js → bundle-web-CQgz7w95.js} +124 -124
- package/client/dist/assets/{coffee-B4Wyhs45.js → coffee-B7kx3Cid.js} +1 -1
- package/client/dist/assets/{cpp-7dTvF10R.js → cpp-3L9-cBo7.js} +3 -3
- package/client/dist/assets/github-dark-C5-x0-6C.js +2 -0
- package/client/dist/assets/github-light-ByNhJa3j.js +2 -0
- package/client/dist/assets/{glsl-CrUwbCO_.js → glsl-D7GhljHe.js} +1 -1
- package/client/dist/assets/{graphql-BeV7Adoa.js → graphql-CFwfqi3h.js} +4 -4
- package/client/dist/assets/{haml-DH35i0Df.js → haml-AGy9GVVj.js} +2 -2
- package/client/dist/assets/{handlebars-CYzbg5Zd.js → handlebars-vOgalqpV.js} +4 -4
- package/client/dist/assets/{html-DIIpd-Y_.js → html-B0M7Ubrz.js} +2 -2
- package/client/dist/assets/html-Cla_1apk.js +2 -0
- package/client/dist/assets/{html-derivative-C5VsVRfx.js → html-derivative-B7ZIKlQ2.js} +1 -1
- package/client/dist/assets/{http-D8W38g2W.js → http-Bw1SWifZ.js} +4 -4
- package/client/dist/assets/{hurl-CjtGt5KL.js → hurl-zcy5Fl2y.js} +3 -3
- package/client/dist/assets/{index-CZPUiNfr.js → index-DT2mmysE.js} +4008 -2157
- package/client/dist/assets/javascript-BeimltzM.js +2 -0
- package/client/dist/assets/{jinja-BNrxSmwS.js → jinja-CpV-HaFu.js} +1 -1
- package/client/dist/assets/{jison-BTSoi8vr.js → jison-DaIhV8hg.js} +1 -1
- package/client/dist/assets/json-DPD_iq4F.js +2 -0
- package/client/dist/assets/json5-DcYx4UAX.js +2 -0
- package/client/dist/assets/{julia-BoLZ5opG.js → julia-BwktqeJq.js} +5 -5
- package/client/dist/assets/{marko-DYFloQgs.js → marko-DZhB4BDZ.js} +4 -4
- package/client/dist/assets/{mdc-Ce5YP0gO.js → mdc-ByFPmJVb.js} +3 -3
- package/client/dist/assets/{php-Cvoz1XWD.js → php-Cq-zzIgW.js} +6 -6
- package/client/dist/assets/{pug-B254dajO.js → pug-BqsC6HRi.js} +3 -3
- package/client/dist/assets/{scss-DBQoQ692.js → scss-BDzsPcer.js} +1 -1
- package/client/dist/assets/{svelte-sPCLa-5U.js → svelte-7kInhlba.js} +4 -4
- package/client/dist/assets/{ts-tags-BBvI9Ei0.js → ts-tags-CmxNgKEj.js} +7 -7
- package/client/dist/assets/tsx-CHlTOe14.js +2 -0
- package/client/dist/assets/typescript-B4HgavCc.js +2 -0
- package/client/dist/assets/{vue-C1PsK9gt.js → vue-CG7sAwHH.js} +6 -6
- package/client/dist/assets/vue-DlaU9qIx.js +2 -0
- package/client/dist/assets/{vue-html-D5qVhuGI.js → vue-html-DHRq-ZD1.js} +1 -1
- package/client/dist/assets/{vue-vine-DRRB0gmq.js → vue-vine-BAAyauNs.js} +6 -6
- package/client/dist/assets/xml-Bp8m4wBs.js +2 -0
- package/client/dist/assets/{xml-Bnc0qLkR.js → xml-CPgLmR05.js} +1 -1
- package/client/dist/assets/yaml-CX3TwziJ.js +2 -0
- package/client/dist/index.html +1 -4
- package/package.json +14 -14
- package/server/dist/checkPortAvailability-BQTphbYJ.cjs +2 -0
- package/server/dist/checkPortAvailability-BQTphbYJ.cjs.map +1 -0
- package/server/dist/controllers/configuration.controller.cjs +1 -1
- package/server/dist/controllers/configuration.controller.cjs.map +1 -1
- package/server/dist/controllers/configuration.controller.d.ts +1 -1
- package/server/dist/controllers/dictionary.controller.cjs +1 -1
- package/server/dist/controllers/dictionary.controller.cjs.map +1 -1
- package/server/dist/controllers/dictionary.controller.d.ts +1 -1
- package/server/dist/httpStatusCodes-Bscj19Pj.d.ts +407 -0
- package/server/dist/index.cjs +7 -7
- package/server/dist/index.cjs.map +1 -1
- package/server/dist/responseData-DcKPpb9v.d.ts +87 -0
- package/server/dist/routes/config.routes.cjs +1 -1
- package/server/dist/routes/config.routes.cjs.map +1 -1
- package/server/dist/routes/dictionary.routes.cjs +1 -1
- package/server/dist/routes/dictionary.routes.cjs.map +1 -1
- package/server/dist/utils/checkPortAvailability.cjs +1 -2
- package/server/dist/utils/httpStatusCodes.d.ts +2 -407
- package/server/dist/utils/responseData.d.ts +2 -87
- package/client/dist/assets/MarkdownMetadataRendererInternal-DRejf1v9.js +0 -42
- package/client/dist/assets/bash-CgEmcnYZ.js +0 -2
- package/client/dist/assets/esm-B-khX_jr.js +0 -1739
- package/client/dist/assets/getContentNodeByKeyPath-C6o6zIBZ.js +0 -155
- package/client/dist/assets/github-dark-CeyRTViw.js +0 -2
- package/client/dist/assets/github-light-DkC943a0.js +0 -2
- package/client/dist/assets/html-D-5QhVQ7.js +0 -2
- package/client/dist/assets/javascript-CmhSbI20.js +0 -2
- package/client/dist/assets/json-COHoP3SY.js +0 -2
- package/client/dist/assets/json5-B9APma8F.js +0 -2
- package/client/dist/assets/preload-helper-CoI0IUIE.js +0 -61
- package/client/dist/assets/tsx-Dd1aPV59.js +0 -2
- package/client/dist/assets/typescript-BL5DoVSN.js +0 -2
- package/client/dist/assets/vue--x-KJx_U.js +0 -2
- package/client/dist/assets/xml-BZimFlwz.js +0 -2
- package/client/dist/assets/yaml-BW9EBdAv.js +0 -2
- /package/client/dist/assets/{andromeeda-D9tXBqC-.js → andromeeda-BY8O__rD.js} +0 -0
- /package/client/dist/assets/{aurora-x-C104ZGur.js → aurora-x-CwL-GNR7.js} +0 -0
- /package/client/dist/assets/{ayu-dark-DWpCtGc6.js → ayu-dark-BBLnrtAD.js} +0 -0
- /package/client/dist/assets/{ayu-light-CECQ0nGX.js → ayu-light-DXc4qGzs.js} +0 -0
- /package/client/dist/assets/{ayu-mirage-COuDN4ns.js → ayu-mirage-CUqxsSY9.js} +0 -0
- /package/client/dist/assets/{c-YE5E93Zf.js → c-rYJZrW1k.js} +0 -0
- /package/client/dist/assets/{catppuccin-frappe-h7rVaSlW.js → catppuccin-frappe-BU7j5Tpb.js} +0 -0
- /package/client/dist/assets/{catppuccin-latte-DuYSKRbe.js → catppuccin-latte-2Mz3CxtD.js} +0 -0
- /package/client/dist/assets/{catppuccin-macchiato-oQGqG0MQ.js → catppuccin-macchiato-C8_0LbtV.js} +0 -0
- /package/client/dist/assets/{catppuccin-mocha-D7aZCK2q.js → catppuccin-mocha-DZJpk67z.js} +0 -0
- /package/client/dist/assets/{css-CbVdw2Vx.js → css-BznhwoPH.js} +0 -0
- /package/client/dist/assets/{csv-B9m8dC01.js → csv-BglKJHzp.js} +0 -0
- /package/client/dist/assets/{dark-plus-py6_0-oZ.js → dark-plus-BrB11_Kq.js} +0 -0
- /package/client/dist/assets/{dist-BP4OKmDF.js → dist-JL9Mfqir.js} +0 -0
- /package/client/dist/assets/{dracula-KE0gm51O.js → dracula-DyxKP7j4.js} +0 -0
- /package/client/dist/assets/{dracula-soft-B8U_ir5T.js → dracula-soft-BZFuOs8M.js} +0 -0
- /package/client/dist/assets/{everforest-dark-B2JgZR5v.js → everforest-dark-Wuu7DlvF.js} +0 -0
- /package/client/dist/assets/{everforest-light-yiC4xIKi.js → everforest-light-CBnZ6Gdn.js} +0 -0
- /package/client/dist/assets/{github-dark-default-cvKXPsGo.js → github-dark-default-DLYIApiv.js} +0 -0
- /package/client/dist/assets/{github-dark-dimmed-K3wk9czK.js → github-dark-dimmed-D-v6GD-D.js} +0 -0
- /package/client/dist/assets/{github-dark-high-contrast-BljHNUFs.js → github-dark-high-contrast-6fANxq9H.js} +0 -0
- /package/client/dist/assets/{github-dark-Dls1MHlQ.js → github-dark-mYD1tu1x.js} +0 -0
- /package/client/dist/assets/{github-light-DssNX3QF.js → github-light-DqxaZC5J.js} +0 -0
- /package/client/dist/assets/{github-light-default-CqDRRARt.js → github-light-default-BPXrwD2R.js} +0 -0
- /package/client/dist/assets/{github-light-high-contrast-MgohVKyD.js → github-light-high-contrast-CSfjfk1G.js} +0 -0
- /package/client/dist/assets/{gruvbox-dark-hard-D-zn943j.js → gruvbox-dark-hard-D0YE4G_7.js} +0 -0
- /package/client/dist/assets/{gruvbox-dark-medium-DJ8_rVKi.js → gruvbox-dark-medium-lrOhwMWw.js} +0 -0
- /package/client/dist/assets/{gruvbox-dark-soft-DYdEaxoi.js → gruvbox-dark-soft-D3zz0Ino.js} +0 -0
- /package/client/dist/assets/{gruvbox-light-hard-BRbDZM7a.js → gruvbox-light-hard-Bflom6T7.js} +0 -0
- /package/client/dist/assets/{gruvbox-light-medium-B44e04Yo.js → gruvbox-light-medium-Cuc0uMCb.js} +0 -0
- /package/client/dist/assets/{gruvbox-light-soft-DwzQ4IYg.js → gruvbox-light-soft-Bv7Ot-z0.js} +0 -0
- /package/client/dist/assets/{horizon-ZzEu6UnM.js → horizon-DhXoK0Ed.js} +0 -0
- /package/client/dist/assets/{horizon-bright-MN7Rxqk4.js → horizon-bright-DXfweL4O.js} +0 -0
- /package/client/dist/assets/{houston-DbO_nj2G.js → houston-C4ja_8uc.js} +0 -0
- /package/client/dist/assets/{imba-Dtz0Qjpr.js → imba-DU1sijU9.js} +0 -0
- /package/client/dist/assets/{java-CsNM0d7y.js → java-BsMRZzwb.js} +0 -0
- /package/client/dist/assets/{javascript-BdACqf10.js → javascript-CU3PIJIe.js} +0 -0
- /package/client/dist/assets/{json-DBTd2yrx.js → json-NRUJ3A8Z.js} +0 -0
- /package/client/dist/assets/{json5-Db2KhhlZ.js → json5-B2F_IK8O.js} +0 -0
- /package/client/dist/assets/{jsonc-CHN8QUfU.js → jsonc-DZe5qY2D.js} +0 -0
- /package/client/dist/assets/{jsonl-CGjv98wH.js → jsonl-X5ySelg7.js} +0 -0
- /package/client/dist/assets/{jsx-CWWDUN98.js → jsx-D27Zcp8f.js} +0 -0
- /package/client/dist/assets/{kanagawa-dragon-B7DwHOPg.js → kanagawa-dragon-BNuJwYwU.js} +0 -0
- /package/client/dist/assets/{kanagawa-lotus-wvBYqRx0.js → kanagawa-lotus-orsoMpUb.js} +0 -0
- /package/client/dist/assets/{kanagawa-wave-Dm7q3hJz.js → kanagawa-wave-lD9IY0rm.js} +0 -0
- /package/client/dist/assets/{laserwave-CPDGEaT_.js → laserwave-CvDHcYwO.js} +0 -0
- /package/client/dist/assets/{less-DXhlwFaK.js → less-PRJULh4Y.js} +0 -0
- /package/client/dist/assets/{light-plus-ByxFuNBG.js → light-plus-MOK32u24.js} +0 -0
- /package/client/dist/assets/{markdown-DLj4nrva.js → markdown-DkH4joIR.js} +0 -0
- /package/client/dist/assets/{material-theme-53qDBBiZ.js → material-theme-TzV_qhce.js} +0 -0
- /package/client/dist/assets/{material-theme-darker-BMgigqK-.js → material-theme-darker-Dth3Bzr_.js} +0 -0
- /package/client/dist/assets/{material-theme-lighter-Du7QlnOy.js → material-theme-lighter-ZXCQGpY6.js} +0 -0
- /package/client/dist/assets/{material-theme-ocean-D7OelWl-.js → material-theme-ocean-WKfsvas6.js} +0 -0
- /package/client/dist/assets/{material-theme-palenight-DuU45xLi.js → material-theme-palenight-Ck3Djj-_.js} +0 -0
- /package/client/dist/assets/{mdx-CA-fbmGc.js → mdx-CSWbZhEy.js} +0 -0
- /package/client/dist/assets/{min-dark-DaQKcOrv.js → min-dark-S0TYVSZ3.js} +0 -0
- /package/client/dist/assets/{min-light-B8hhGQs9.js → min-light-gRt6aDOF.js} +0 -0
- /package/client/dist/assets/{monokai-BxMUzvLk.js → monokai-CAeGk1-c.js} +0 -0
- /package/client/dist/assets/{night-owl-BkjnEots.js → night-owl-DSfRe8yr.js} +0 -0
- /package/client/dist/assets/{night-owl-light-oxBO-tCU.js → night-owl-light-DyKOenVJ.js} +0 -0
- /package/client/dist/assets/{nord-CGl-72px.js → nord-kFvBSECm.js} +0 -0
- /package/client/dist/assets/{one-dark-pro-iaIbXpZM.js → one-dark-pro-DgHxW_dT.js} +0 -0
- /package/client/dist/assets/{one-light-DVukLUfQ.js → one-light-BWIlrqaS.js} +0 -0
- /package/client/dist/assets/{plastic-BZlO8SrG.js → plastic-CPlugWGY.js} +0 -0
- /package/client/dist/assets/{poimandres-mI0gepuf.js → poimandres-JTNwIe-T.js} +0 -0
- /package/client/dist/assets/{postcss-DQkOD--_.js → postcss-cbpEYqBI.js} +0 -0
- /package/client/dist/assets/{python-Ce1zJ0DU.js → python-Bfe-Zzhs.js} +0 -0
- /package/client/dist/assets/{r-debCGJJk.js → r-BuiJQRlB.js} +0 -0
- /package/client/dist/assets/{red-DqRf4Qb0.js → red-CqzFqTyK.js} +0 -0
- /package/client/dist/assets/{regexp-aTTFcG_n.js → regexp-Bv54x_SM.js} +0 -0
- /package/client/dist/assets/{rose-pine-DopQf0Iy.js → rose-pine-D8ryEJo3.js} +0 -0
- /package/client/dist/assets/{rose-pine-dawn-CHPViTKc.js → rose-pine-dawn-C_3wVJ2a.js} +0 -0
- /package/client/dist/assets/{rose-pine-moon-DfcFJff9.js → rose-pine-moon-DvTNfSgC.js} +0 -0
- /package/client/dist/assets/{sass-BG-FQdXa.js → sass-DDKRa81x.js} +0 -0
- /package/client/dist/assets/{shellscript-C36bN5hG.js → shellscript-D6OjgcVH.js} +0 -0
- /package/client/dist/assets/{slack-dark-BjFW27lz.js → slack-dark-Dj4xwn1T.js} +0 -0
- /package/client/dist/assets/{slack-ochin-VXH_9cNQ.js → slack-ochin-BMn5Zs5S.js} +0 -0
- /package/client/dist/assets/{snazzy-light-aa2zLeH6.js → snazzy-light-CDOxNc-C.js} +0 -0
- /package/client/dist/assets/{solarized-dark-Bk84Eels.js → solarized-dark-CqkLujkP.js} +0 -0
- /package/client/dist/assets/{solarized-light-DEKDy82g.js → solarized-light-gCxA62ZX.js} +0 -0
- /package/client/dist/assets/{sql-C9giXO6o.js → sql-D1VHE84D.js} +0 -0
- /package/client/dist/assets/{stylus-CH9ua47t.js → stylus-CXea6hG4.js} +0 -0
- /package/client/dist/assets/{synthwave-84-CrF6pgTc.js → synthwave-84-CuzI5rUG.js} +0 -0
- /package/client/dist/assets/{tokyo-night-D2kyPuzj.js → tokyo-night-DBDiYG21.js} +0 -0
- /package/client/dist/assets/{tsx-egH0NXjJ.js → tsx-CzwR-tnf.js} +0 -0
- /package/client/dist/assets/{typescript-BAhv7dky.js → typescript-BRHrOBpy.js} +0 -0
- /package/client/dist/assets/{unmerged_dictionaries-C2Zsjv5l.js → unmerged_dictionaries-BOX6ozHh.js} +0 -0
- /package/client/dist/assets/{vesper-BWwcA-27.js → vesper-DXqrrAMY.js} +0 -0
- /package/client/dist/assets/{vitesse-black-DUSn-VDu.js → vitesse-black-BlH0x4Vs.js} +0 -0
- /package/client/dist/assets/{vitesse-dark-wIOKBkKs.js → vitesse-dark-CIMLnJG1.js} +0 -0
- /package/client/dist/assets/{vitesse-light-BTT8juqx.js → vitesse-light-ClQGNaN6.js} +0 -0
- /package/client/dist/assets/{wasm-BPjyAYt9.js → wasm-BGVToWLA.js} +0 -0
- /package/client/dist/assets/{wasm-dpeUm50f.js → wasm-DVnmThbD.js} +0 -0
- /package/client/dist/assets/{wgsl-BAQZQFAS.js → wgsl-Dd291c7U.js} +0 -0
- /package/client/dist/assets/{wit-BbR8NOgQ.js → wit-Bi1XtBiP.js} +0 -0
- /package/client/dist/assets/{yaml-BkL6USz4.js → yaml-D8NLwOzu.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as __exportAll } from "./chunk-CC9Q-vWm.js";
|
|
2
|
-
import { t as java_default } from "./java-
|
|
2
|
+
import { t as java_default } from "./java-BsMRZzwb.js";
|
|
3
3
|
//#region ../../node_modules/.bun/@shikijs+langs@4.0.2/node_modules/@shikijs/langs/dist/xml.mjs
|
|
4
4
|
var xml_exports = /* @__PURE__ */ __exportAll({ default: () => xml_default });
|
|
5
5
|
var lang = Object.freeze(JSON.parse("{\"displayName\":\"XML\",\"name\":\"xml\",\"patterns\":[{\"begin\":\"(<\\\\?)\\\\s*([-0-9A-Z_a-z]+)\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"entity.name.tag.xml\"}},\"end\":\"(\\\\?>)\",\"name\":\"meta.tag.preprocessor.xml\",\"patterns\":[{\"match\":\" ([-A-Za-z]+)\",\"name\":\"entity.other.attribute-name.xml\"},{\"include\":\"#doublequotedString\"},{\"include\":\"#singlequotedString\"}]},{\"begin\":\"(<!)(DOCTYPE)\\\\s+([:A-Z_a-z][-.0-:A-Z_a-z]*)\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"keyword.other.doctype.xml\"},\"3\":{\"name\":\"variable.language.documentroot.xml\"}},\"end\":\"\\\\s*(>)\",\"name\":\"meta.tag.sgml.doctype.xml\",\"patterns\":[{\"include\":\"#internalSubset\"}]},{\"include\":\"#comments\"},{\"begin\":\"(<)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(?=(\\\\s[^>]*)?></\\\\2>)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"entity.name.tag.xml\"},\"3\":{\"name\":\"entity.name.tag.namespace.xml\"},\"4\":{\"name\":\"punctuation.separator.namespace.xml\"},\"5\":{\"name\":\"entity.name.tag.localname.xml\"}},\"end\":\"(>)(</)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(>)\",\"endCaptures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"punctuation.definition.tag.xml\"},\"3\":{\"name\":\"entity.name.tag.xml\"},\"4\":{\"name\":\"entity.name.tag.namespace.xml\"},\"5\":{\"name\":\"punctuation.separator.namespace.xml\"},\"6\":{\"name\":\"entity.name.tag.localname.xml\"},\"7\":{\"name\":\"punctuation.definition.tag.xml\"}},\"name\":\"meta.tag.no-content.xml\",\"patterns\":[{\"include\":\"#tagStuff\"}]},{\"begin\":\"(</?)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"entity.name.tag.namespace.xml\"},\"3\":{\"name\":\"entity.name.tag.xml\"},\"4\":{\"name\":\"punctuation.separator.namespace.xml\"},\"5\":{\"name\":\"entity.name.tag.localname.xml\"}},\"end\":\"(/?>)\",\"name\":\"meta.tag.xml\",\"patterns\":[{\"include\":\"#tagStuff\"}]},{\"include\":\"#entity\"},{\"include\":\"#bare-ampersand\"},{\"begin\":\"<%@\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.begin.xml\"}},\"end\":\"%>\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.end.xml\"}},\"name\":\"source.java-props.embedded.xml\",\"patterns\":[{\"match\":\"page|include|taglib\",\"name\":\"keyword.other.page-props.xml\"}]},{\"begin\":\"<%[!=]?(?!--)\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.begin.xml\"}},\"end\":\"(?!--)%>\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.end.xml\"}},\"name\":\"source.java.embedded.xml\",\"patterns\":[{\"include\":\"source.java\"}]},{\"begin\":\"<!\\\\[CDATA\\\\[\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.xml\"}},\"end\":\"]]>\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.xml\"}},\"name\":\"string.unquoted.cdata.xml\"}],\"repository\":{\"EntityDecl\":{\"begin\":\"(<!)(ENTITY)\\\\s+(%\\\\s+)?([:A-Z_a-z][-.0-:A-Z_a-z]*)(\\\\s+(?:SYSTEM|PUBLIC)\\\\s+)?\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"keyword.other.entity.xml\"},\"3\":{\"name\":\"punctuation.definition.entity.xml\"},\"4\":{\"name\":\"variable.language.entity.xml\"},\"5\":{\"name\":\"keyword.other.entitytype.xml\"}},\"end\":\"(>)\",\"patterns\":[{\"include\":\"#doublequotedString\"},{\"include\":\"#singlequotedString\"}]},\"bare-ampersand\":{\"match\":\"&\",\"name\":\"invalid.illegal.bad-ampersand.xml\"},\"comments\":{\"patterns\":[{\"begin\":\"<%--\",\"captures\":{\"0\":{\"name\":\"punctuation.definition.comment.xml\"},\"end\":\"--%>\",\"name\":\"comment.block.xml\"}},{\"begin\":\"<!--\",\"captures\":{\"0\":{\"name\":\"punctuation.definition.comment.xml\"}},\"end\":\"-->\",\"name\":\"comment.block.xml\",\"patterns\":[{\"begin\":\"--(?!>)\",\"captures\":{\"0\":{\"name\":\"invalid.illegal.bad-comments-or-CDATA.xml\"}}}]}]},\"doublequotedString\":{\"begin\":\"\\\"\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.xml\"}},\"end\":\"\\\"\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.xml\"}},\"name\":\"string.quoted.double.xml\",\"patterns\":[{\"include\":\"#entity\"},{\"include\":\"#bare-ampersand\"}]},\"entity\":{\"captures\":{\"1\":{\"name\":\"punctuation.definition.constant.xml\"},\"3\":{\"name\":\"punctuation.definition.constant.xml\"}},\"match\":\"(&)([:A-Z_a-z][-.0-:A-Z_a-z]*|#[0-9]+|#x\\\\h+)(;)\",\"name\":\"constant.character.entity.xml\"},\"internalSubset\":{\"begin\":\"(\\\\[)\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.constant.xml\"}},\"end\":\"(])\",\"name\":\"meta.internalsubset.xml\",\"patterns\":[{\"include\":\"#EntityDecl\"},{\"include\":\"#parameterEntity\"},{\"include\":\"#comments\"}]},\"parameterEntity\":{\"captures\":{\"1\":{\"name\":\"punctuation.definition.constant.xml\"},\"3\":{\"name\":\"punctuation.definition.constant.xml\"}},\"match\":\"(%)([:A-Z_a-z][-.0-:A-Z_a-z]*)(;)\",\"name\":\"constant.character.parameter-entity.xml\"},\"singlequotedString\":{\"begin\":\"'\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.xml\"}},\"end\":\"'\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.xml\"}},\"name\":\"string.quoted.single.xml\",\"patterns\":[{\"include\":\"#entity\"},{\"include\":\"#bare-ampersand\"}]},\"tagStuff\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"entity.other.attribute-name.namespace.xml\"},\"2\":{\"name\":\"entity.other.attribute-name.xml\"},\"3\":{\"name\":\"punctuation.separator.namespace.xml\"},\"4\":{\"name\":\"entity.other.attribute-name.localname.xml\"}},\"match\":\"(?:^|\\\\s+)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\\\\s*=\"},{\"include\":\"#doublequotedString\"},{\"include\":\"#singlequotedString\"}]}},\"scopeName\":\"text.xml\",\"embeddedLangs\":[\"java\"]}"));
|
package/client/dist/index.html
CHANGED
|
@@ -5,11 +5,8 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Intlayer Editor</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-DT2mmysE.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/chunk-CC9Q-vWm.js">
|
|
10
|
-
<link rel="modulepreload" crossorigin href="/assets/preload-helper-CoI0IUIE.js">
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/assets/getContentNodeByKeyPath-C6o6zIBZ.js">
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/esm-B-khX_jr.js">
|
|
13
10
|
<link rel="modulepreload" crossorigin href="/assets/react-BPfKr7Oj.js">
|
|
14
11
|
<link rel="stylesheet" crossorigin href="/assets/index-D6NEtBOG.css">
|
|
15
12
|
</head>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intlayer-editor",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Integrate the Intlayer visual editor into your Intlayer projects, enabling CMS-like content management with multilingual support.",
|
|
6
6
|
"keywords": [
|
|
@@ -93,19 +93,19 @@
|
|
|
93
93
|
"@fastify/formbody": "8.0.2",
|
|
94
94
|
"@fastify/helmet": "13.0.2",
|
|
95
95
|
"@fastify/static": "9.0.0",
|
|
96
|
-
"@intlayer/chokidar": "8.4.
|
|
97
|
-
"@intlayer/config": "8.4.
|
|
98
|
-
"@intlayer/unmerged-dictionaries-entry": "8.4.
|
|
96
|
+
"@intlayer/chokidar": "8.4.2",
|
|
97
|
+
"@intlayer/config": "8.4.2",
|
|
98
|
+
"@intlayer/unmerged-dictionaries-entry": "8.4.2",
|
|
99
99
|
"fastify": "5.8.2",
|
|
100
|
-
"fastify-intlayer": "8.4.
|
|
100
|
+
"fastify-intlayer": "8.4.2",
|
|
101
101
|
"mime": "4.1.0"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
|
-
"@intlayer/design-system": "8.4.
|
|
105
|
-
"@intlayer/editor-react": "8.4.
|
|
106
|
-
"@intlayer/types": "8.4.
|
|
104
|
+
"@intlayer/design-system": "8.4.2",
|
|
105
|
+
"@intlayer/editor-react": "8.4.2",
|
|
106
|
+
"@intlayer/types": "8.4.2",
|
|
107
107
|
"@tailwindcss/vite": "4.2.1",
|
|
108
|
-
"@tanstack/react-query": "5.
|
|
108
|
+
"@tanstack/react-query": "5.91.0",
|
|
109
109
|
"@types/node": "25.5.0",
|
|
110
110
|
"@types/react": "19.2.14",
|
|
111
111
|
"@types/react-dom": "19.2.3",
|
|
@@ -114,21 +114,21 @@
|
|
|
114
114
|
"autoprefixer": "10.4.27",
|
|
115
115
|
"babel-plugin-react-compiler": "1.0.0",
|
|
116
116
|
"clsx": "2.1.1",
|
|
117
|
-
"framer-motion": "12.
|
|
117
|
+
"framer-motion": "12.38.0",
|
|
118
118
|
"fuse.js": "7.1.0",
|
|
119
119
|
"globals": "17.4.0",
|
|
120
|
-
"intlayer": "8.4.
|
|
120
|
+
"intlayer": "8.4.2",
|
|
121
121
|
"lucide-react": "0.577.0",
|
|
122
122
|
"react": "19.2.4",
|
|
123
123
|
"react-dom": "19.2.4",
|
|
124
|
-
"react-intlayer": "8.4.
|
|
124
|
+
"react-intlayer": "8.4.2",
|
|
125
125
|
"react-router-dom": "7.13.1",
|
|
126
126
|
"tailwind-merge": "3.5.0",
|
|
127
|
-
"tailwindcss": "4.2.
|
|
127
|
+
"tailwindcss": "4.2.2",
|
|
128
128
|
"tsdown": "0.21.4",
|
|
129
129
|
"typescript": "5.9.3",
|
|
130
130
|
"vite": "8.0.0",
|
|
131
|
-
"vite-intlayer": "8.4.
|
|
131
|
+
"vite-intlayer": "8.4.2",
|
|
132
132
|
"vitest": "4.1.0"
|
|
133
133
|
},
|
|
134
134
|
"engines": {
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`node:net`);c=s(c);const l=e=>new Promise(t=>{let n=c.default.createServer();n.once(`error`,e=>{e.code===`EADDRINUSE`?t(!1):t(!0)}),n.once(`listening`,()=>{n.close(),t(!0)}),n.listen(e)});Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
|
|
2
|
+
//# sourceMappingURL=checkPortAvailability-BQTphbYJ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkPortAvailability-BQTphbYJ.cjs","names":["net"],"sources":["../src/utils/checkPortAvailability.ts"],"sourcesContent":["import net from 'node:net';\n\nexport const checkPortAvailability = (port: number): Promise<boolean> => {\n return new Promise((resolve) => {\n const server = net.createServer();\n\n server.once('error', (err: any) => {\n if (err.code === 'EADDRINUSE') {\n resolve(false); // Port is in use\n } else {\n resolve(true);\n }\n });\n\n server.once('listening', () => {\n server.close();\n resolve(true); // Port is available\n });\n\n server.listen(port);\n });\n};\n"],"mappings":"+fAEA,MAAa,EAAyB,GAC7B,IAAI,QAAS,GAAY,CAC9B,IAAM,EAASA,EAAAA,QAAI,cAAc,CAEjC,EAAO,KAAK,QAAU,GAAa,CAC7B,EAAI,OAAS,aACf,EAAQ,GAAM,CAEd,EAAQ,GAAK,EAEf,CAEF,EAAO,KAAK,gBAAmB,CAC7B,EAAO,OAAO,CACd,EAAQ,GAAK,EACb,CAEF,EAAO,OAAO,EAAK,EACnB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../checkPortAvailability-BQTphbYJ.cjs`);const e=require(`../utils/responseData.cjs`);let t=require(`@intlayer/config/node`);const n=async(n,r)=>{try{let n=e.formatResponse({data:(0,t.getConfiguration)()});return r.send(n)}catch(t){let n=t??{message:`Internal Server Error`,status:500},i=e.formatResponse({error:{message:n.message??`Internal Server Error`,code:`INTERNAL_SERVER_ERROR`,title:`Internal Server Error`},status:n.status??500});return r.send(i)}};exports.getConfiguration=n;
|
|
2
2
|
//# sourceMappingURL=configuration.controller.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.controller.cjs","names":["formatResponse"],"sources":["../../src/controllers/configuration.controller.ts"],"sourcesContent":["import { getConfiguration as getApplicationConfiguration } from '@intlayer/config/node';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\n\nexport type GetConfigurationResult = ResponseData<IntlayerConfig>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getConfiguration = async (\n _req: FastifyRequest,\n res: FastifyReply\n): Promise<void> => {\n try {\n const config = getApplicationConfiguration();\n\n const formattedResponse = formatResponse<IntlayerConfig>({\n data: config,\n });\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<IntlayerConfig>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"configuration.controller.cjs","names":["formatResponse"],"sources":["../../src/controllers/configuration.controller.ts"],"sourcesContent":["import { getConfiguration as getApplicationConfiguration } from '@intlayer/config/node';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\n\nexport type GetConfigurationResult = ResponseData<IntlayerConfig>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getConfiguration = async (\n _req: FastifyRequest,\n res: FastifyReply\n): Promise<void> => {\n try {\n const config = getApplicationConfiguration();\n\n const formattedResponse = formatResponse<IntlayerConfig>({\n data: config,\n });\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<IntlayerConfig>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n"],"mappings":"wMAUA,MAAa,EAAmB,MAC9B,EACA,IACkB,CAClB,GAAI,CAGF,IAAM,EAAoBA,EAAAA,eAA+B,CACvD,MAAA,EAAA,EAAA,mBAH0C,CAI3C,CAAC,CAEF,OAAO,EAAI,KAAK,EAAkB,OAC3B,EAAK,CACZ,IAAM,EAAgB,GAAiD,CACrE,QAAS,wBACT,OAAQ,IACT,CAEK,EAAyBA,EAAAA,eAA+B,CAC5D,MAAO,CACL,QAAS,EAAa,SAAW,wBACjC,KAAM,wBACN,MAAO,wBACR,CACD,OAAQ,EAAa,QAAU,IAChC,CAAC,CAEF,OAAO,EAAI,KAAK,EAAuB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../checkPortAvailability-BQTphbYJ.cjs`);const e=require(`../utils/responseData.cjs`);let t=require(`@intlayer/config/node`),n=require(`@intlayer/chokidar/build`),r=require(`@intlayer/unmerged-dictionaries-entry`),i=require(`fastify-intlayer`);const a=async(t,n)=>{try{let t=e.formatResponse({data:(0,r.getUnmergedDictionaries)()});return n.send(t)}catch(t){let r=t??{message:`Internal Server Error`,status:500},i=e.formatResponse({error:{message:r.message??`Internal Server Error`,code:`INTERNAL_SERVER_ERROR`,title:`Internal Server Error`},status:r.status??500});return n.send(i)}},o=async(r,a)=>{try{let o=r.body.dictionary,s=await(0,n.writeContentDeclaration)(o,(0,t.getConfiguration)()),c=``;switch(s.status){case`created`:c=(0,i.t)({en:`Content declaration created successfully`,fr:`Déclaration de contenu créée avec succès`,es:`Declaración de contenido creada con éxito`});break;case`updated`:c=(0,i.t)({en:`Content declaration updated successfully`,fr:`Déclaration de contenu mise à jour avec succès`,es:`Declaración de contenido actualizada con éxito`});break;case`reimported in JSON`:c=(0,i.t)({en:`Content declaration reimported in JSON successfully`,fr:`Déclaration de contenu réimportée en JSON avec succès`,es:`Declaración de contenido reimportada en JSON con éxito`});break;case`new content file`:c=(0,i.t)({en:`Content declaration new content file successfully`,fr:`Déclaration de contenu réimportée dans un nouveau emplacement avec succès`,es:`Declaración de contenido reimportada en un nuevo lugar con éxito`});break;default:c=(0,i.t)({en:`Content declaration written successfully`,fr:`Déclaration de contenu écrite avec succès`,es:`Declaración de contenido escrita con éxito`});break}let l=e.formatResponse({data:s,message:(0,i.t)({en:`Content declaration written`,fr:`Déclaration de contenu écrite`,es:`Declaración de contenido escrita`}),description:c});return a.send(l)}catch(t){let n=t??{message:`Internal Server Error`,status:500};console.error(n);let r=e.formatResponse({error:{message:n.message??`Internal Server Error`,code:`INTERNAL_SERVER_ERROR`,title:`Internal Server Error`},status:n.status??500});return a.send(r)}};exports.getDictionaries=a,exports.writeContentDeclaration=o;
|
|
2
2
|
//# sourceMappingURL=dictionary.controller.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.controller.cjs","names":["formatResponse"],"sources":["../../src/controllers/dictionary.controller.ts"],"sourcesContent":["import {\n type DictionaryStatus,\n writeContentDeclaration as writeContentDeclarationEditor,\n} from '@intlayer/chokidar/build';\nimport { getConfiguration } from '@intlayer/config/node';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport {\n getUnmergedDictionaries,\n type UnmergedDictionaries,\n} from '@intlayer/unmerged-dictionaries-entry';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\nimport { t } from 'fastify-intlayer';\n\nexport type GetEditorDictionariesResult = ResponseData<UnmergedDictionaries>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getDictionaries = async (\n _req: FastifyRequest,\n res: FastifyReply\n): Promise<void> => {\n try {\n const formattedResponse = formatResponse<UnmergedDictionaries>({\n data: getUnmergedDictionaries(),\n });\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<UnmergedDictionaries>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n\nexport type WriteContentDeclarationBody = { dictionary: Dictionary };\ntype WriteContentDeclarationResultData = {\n status: DictionaryStatus;\n path: string;\n};\nexport type WriteContentDeclarationResult =\n ResponseData<WriteContentDeclarationResultData>;\n\n/**\n * Adds a new dictionary to the database.\n */\nexport const writeContentDeclaration = async (\n req: FastifyRequest<{ Body: WriteContentDeclarationBody }>,\n res: FastifyReply\n): Promise<void> => {\n try {\n const dictionaryData = req.body.dictionary;\n\n const config = getConfiguration();\n\n const result = await writeContentDeclarationEditor(dictionaryData, config);\n\n let description = '';\n\n switch (result.status) {\n case 'created': {\n description = t({\n en: 'Content declaration created successfully',\n fr: 'Déclaration de contenu créée avec succès',\n es: 'Declaración de contenido creada con éxito',\n });\n break;\n }\n\n case 'updated': {\n description = t({\n en: 'Content declaration updated successfully',\n fr: 'Déclaration de contenu mise à jour avec succès',\n es: 'Declaración de contenido actualizada con éxito',\n });\n break;\n }\n case 'reimported in JSON': {\n description = t({\n en: 'Content declaration reimported in JSON successfully',\n fr: 'Déclaration de contenu réimportée en JSON avec succès',\n es: 'Declaración de contenido reimportada en JSON con éxito',\n });\n break;\n }\n case 'new content file': {\n description = t({\n en: 'Content declaration new content file successfully',\n fr: 'Déclaration de contenu réimportée dans un nouveau emplacement avec succès',\n es: 'Declaración de contenido reimportada en un nuevo lugar con éxito',\n });\n break;\n }\n default: {\n description = t({\n en: 'Content declaration written successfully',\n fr: 'Déclaration de contenu écrite avec succès',\n es: 'Declaración de contenido escrita con éxito',\n });\n break;\n }\n }\n\n const formattedResponse = formatResponse<WriteContentDeclarationResultData>(\n {\n data: result,\n message: t({\n en: 'Content declaration written',\n fr: 'Déclaration de contenu écrite',\n es: 'Declaración de contenido escrita',\n }),\n description,\n }\n );\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n console.error(errorMessage);\n\n const formattedErrorResponse =\n formatResponse<WriteContentDeclarationResultData>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dictionary.controller.cjs","names":["formatResponse"],"sources":["../../src/controllers/dictionary.controller.ts"],"sourcesContent":["import {\n type DictionaryStatus,\n writeContentDeclaration as writeContentDeclarationEditor,\n} from '@intlayer/chokidar/build';\nimport { getConfiguration } from '@intlayer/config/node';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport {\n getUnmergedDictionaries,\n type UnmergedDictionaries,\n} from '@intlayer/unmerged-dictionaries-entry';\nimport { formatResponse, type ResponseData } from '@utils/responseData';\nimport type { FastifyReply, FastifyRequest } from 'fastify';\nimport { t } from 'fastify-intlayer';\n\nexport type GetEditorDictionariesResult = ResponseData<UnmergedDictionaries>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getDictionaries = async (\n _req: FastifyRequest,\n res: FastifyReply\n): Promise<void> => {\n try {\n const formattedResponse = formatResponse<UnmergedDictionaries>({\n data: getUnmergedDictionaries(),\n });\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n const formattedErrorResponse = formatResponse<UnmergedDictionaries>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n\nexport type WriteContentDeclarationBody = { dictionary: Dictionary };\ntype WriteContentDeclarationResultData = {\n status: DictionaryStatus;\n path: string;\n};\nexport type WriteContentDeclarationResult =\n ResponseData<WriteContentDeclarationResultData>;\n\n/**\n * Adds a new dictionary to the database.\n */\nexport const writeContentDeclaration = async (\n req: FastifyRequest<{ Body: WriteContentDeclarationBody }>,\n res: FastifyReply\n): Promise<void> => {\n try {\n const dictionaryData = req.body.dictionary;\n\n const config = getConfiguration();\n\n const result = await writeContentDeclarationEditor(dictionaryData, config);\n\n let description = '';\n\n switch (result.status) {\n case 'created': {\n description = t({\n en: 'Content declaration created successfully',\n fr: 'Déclaration de contenu créée avec succès',\n es: 'Declaración de contenido creada con éxito',\n });\n break;\n }\n\n case 'updated': {\n description = t({\n en: 'Content declaration updated successfully',\n fr: 'Déclaration de contenu mise à jour avec succès',\n es: 'Declaración de contenido actualizada con éxito',\n });\n break;\n }\n case 'reimported in JSON': {\n description = t({\n en: 'Content declaration reimported in JSON successfully',\n fr: 'Déclaration de contenu réimportée en JSON avec succès',\n es: 'Declaración de contenido reimportada en JSON con éxito',\n });\n break;\n }\n case 'new content file': {\n description = t({\n en: 'Content declaration new content file successfully',\n fr: 'Déclaration de contenu réimportée dans un nouveau emplacement avec succès',\n es: 'Declaración de contenido reimportada en un nuevo lugar con éxito',\n });\n break;\n }\n default: {\n description = t({\n en: 'Content declaration written successfully',\n fr: 'Déclaration de contenu écrite avec succès',\n es: 'Declaración de contenido escrita con éxito',\n });\n break;\n }\n }\n\n const formattedResponse = formatResponse<WriteContentDeclarationResultData>(\n {\n data: result,\n message: t({\n en: 'Content declaration written',\n fr: 'Déclaration de contenu écrite',\n es: 'Declaración de contenido escrita',\n }),\n description,\n }\n );\n\n return res.send(formattedResponse);\n } catch (err) {\n const errorMessage = (err as { message?: string; status?: number }) ?? {\n message: 'Internal Server Error',\n status: 500,\n };\n\n console.error(errorMessage);\n\n const formattedErrorResponse =\n formatResponse<WriteContentDeclarationResultData>({\n error: {\n message: errorMessage.message ?? 'Internal Server Error',\n code: 'INTERNAL_SERVER_ERROR',\n title: 'Internal Server Error',\n },\n status: errorMessage.status ?? 500,\n });\n\n return res.send(formattedErrorResponse);\n }\n};\n"],"mappings":"+TAmBA,MAAa,EAAkB,MAC7B,EACA,IACkB,CAClB,GAAI,CACF,IAAM,EAAoBA,EAAAA,eAAqC,CAC7D,MAAA,EAAA,EAAA,0BAA+B,CAChC,CAAC,CAEF,OAAO,EAAI,KAAK,EAAkB,OAC3B,EAAK,CACZ,IAAM,EAAgB,GAAiD,CACrE,QAAS,wBACT,OAAQ,IACT,CAEK,EAAyBA,EAAAA,eAAqC,CAClE,MAAO,CACL,QAAS,EAAa,SAAW,wBACjC,KAAM,wBACN,MAAO,wBACR,CACD,OAAQ,EAAa,QAAU,IAChC,CAAC,CAEF,OAAO,EAAI,KAAK,EAAuB,GAe9B,EAA0B,MACrC,EACA,IACkB,CAClB,GAAI,CACF,IAAM,EAAiB,EAAI,KAAK,WAI1B,EAAS,MAAA,EAAA,EAAA,yBAAoC,GAAA,EAAA,EAAA,mBAFlB,CAEyC,CAEtE,EAAc,GAElB,OAAQ,EAAO,OAAf,CACE,IAAK,UACH,GAAA,EAAA,EAAA,GAAgB,CACd,GAAI,2CACJ,GAAI,2CACJ,GAAI,4CACL,CAAC,CACF,MAGF,IAAK,UACH,GAAA,EAAA,EAAA,GAAgB,CACd,GAAI,2CACJ,GAAI,iDACJ,GAAI,iDACL,CAAC,CACF,MAEF,IAAK,qBACH,GAAA,EAAA,EAAA,GAAgB,CACd,GAAI,sDACJ,GAAI,wDACJ,GAAI,yDACL,CAAC,CACF,MAEF,IAAK,mBACH,GAAA,EAAA,EAAA,GAAgB,CACd,GAAI,oDACJ,GAAI,4EACJ,GAAI,mEACL,CAAC,CACF,MAEF,QACE,GAAA,EAAA,EAAA,GAAgB,CACd,GAAI,2CACJ,GAAI,4CACJ,GAAI,6CACL,CAAC,CACF,MAIJ,IAAM,EAAoBA,EAAAA,eACxB,CACE,KAAM,EACN,SAAA,EAAA,EAAA,GAAW,CACT,GAAI,8BACJ,GAAI,gCACJ,GAAI,mCACL,CAAC,CACF,cACD,CACF,CAED,OAAO,EAAI,KAAK,EAAkB,OAC3B,EAAK,CACZ,IAAM,EAAgB,GAAiD,CACrE,QAAS,wBACT,OAAQ,IACT,CAED,QAAQ,MAAM,EAAa,CAE3B,IAAM,EACJA,EAAAA,eAAkD,CAChD,MAAO,CACL,QAAS,EAAa,SAAW,wBACjC,KAAM,wBACN,MAAO,wBACR,CACD,OAAQ,EAAa,QAAU,IAChC,CAAC,CAEJ,OAAO,EAAI,KAAK,EAAuB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ResponseData } from "../
|
|
1
|
+
import { n as ResponseData } from "../responseData-DcKPpb9v.js";
|
|
2
2
|
import { FastifyReply, FastifyRequest } from "fastify";
|
|
3
3
|
import { DictionaryStatus } from "@intlayer/chokidar/build";
|
|
4
4
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
//#region src/utils/httpStatusCodes.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Enum for HTTP response status codes.
|
|
4
|
+
* Contains all the possible HTTP response codes according to the standard.
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* 1xx: Informational responses
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* 100 - CONTINUE - The server has received the request headers and the client should proceed to send the request body.
|
|
11
|
+
*
|
|
12
|
+
* 101 - SWITCHING_PROTOCOLS - The requester has asked the server to switch protocols and the server has agreed to do so.
|
|
13
|
+
*
|
|
14
|
+
* 102 - PROCESSING - Used to return some response headers before final HTTP message.
|
|
15
|
+
*
|
|
16
|
+
* 103 - EARLY_HINTS - Early hints - part of optimization to improve page load time.
|
|
17
|
+
*
|
|
18
|
+
*
|
|
19
|
+
* 2xx: Successful responses
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* 200 - OK - The request has succeeded.
|
|
23
|
+
*
|
|
24
|
+
* 201 - CREATED - The request has been fulfilled and has resulted in one or more new resources being created.
|
|
25
|
+
*
|
|
26
|
+
* 202 - ACCEPTED - The request has been accepted for processing, but the processing has not been completed.
|
|
27
|
+
*
|
|
28
|
+
* 203 - NON_AUTHORITATIVE_INFORMATION - The server successfully processed the request, but is returning information that may be from another source.
|
|
29
|
+
*
|
|
30
|
+
* 204 - NO_CONTENT - The server successfully processed the request and is not returning any content.
|
|
31
|
+
*
|
|
32
|
+
* 205 - RESET_CONTENT - The server successfully processed the request, but is not returning any content and requires that the requester reset the document view.
|
|
33
|
+
*
|
|
34
|
+
* 206 - PARTIAL_CONTENT - The server is delivering only part of the resource due to a range header sent by the client.
|
|
35
|
+
*
|
|
36
|
+
* 207 - MULTI_STATUS - Multi-status response providing status for multiple independent operations.
|
|
37
|
+
*
|
|
38
|
+
* 208 - ALREADY_REPORTED - The members of a DAV binding have already been enumerated in a preceding part of the request.
|
|
39
|
+
*
|
|
40
|
+
* 226 - IM_USED - The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance manipulations applied to the current instance.
|
|
41
|
+
*
|
|
42
|
+
*
|
|
43
|
+
* 3xx: Redirection messages
|
|
44
|
+
*
|
|
45
|
+
*
|
|
46
|
+
* 300 - MULTIPLE_CHOICES - The request has more than one possible response. The user-agent or user should choose one of them.
|
|
47
|
+
*
|
|
48
|
+
* 301 - MOVED_PERMANENTLY - The URL of the requested resource has been changed permanently.
|
|
49
|
+
*
|
|
50
|
+
* 302 - FOUND - The requested resource is available at a different URI.
|
|
51
|
+
*
|
|
52
|
+
* 303 - SEE_OTHER - The response to the request can be found under another URI using a GET method.
|
|
53
|
+
*
|
|
54
|
+
* 304 - NOT_MODIFIED - Indicates that the resource has not been modified since the version specified by the request headers.
|
|
55
|
+
*
|
|
56
|
+
* 305 - USE_PROXY - The requested resource must be accessed through the proxy given by the Location field.
|
|
57
|
+
*
|
|
58
|
+
* 306 - SWITCH_PROXY - No longer used. Originally meant to direct the client to switch to a different proxy.
|
|
59
|
+
*
|
|
60
|
+
* 307 - TEMPORARY_REDIRECT - The requested resource resides temporarily under a different URI.
|
|
61
|
+
*
|
|
62
|
+
* 308 - PERMANENT_REDIRECT - The request should be repeated with another URI, but future requests should still use the original URI.
|
|
63
|
+
*
|
|
64
|
+
*
|
|
65
|
+
* 4xx: Client error responses
|
|
66
|
+
*
|
|
67
|
+
*
|
|
68
|
+
* 400 - BAD_REQUEST - The server cannot or will not process the request due to something perceived to be a client error.
|
|
69
|
+
*
|
|
70
|
+
* 401 - UNAUTHORIZED - The client must authenticate itself to get the requested response.
|
|
71
|
+
*
|
|
72
|
+
* 403 - FORBIDDEN - The client does not have access rights to the content.
|
|
73
|
+
*
|
|
74
|
+
* 404 - NOT_FOUND - The server can not find the requested resource.
|
|
75
|
+
*
|
|
76
|
+
* 405 - METHOD_NOT_ALLOWED - The request method is known by the server but is not supported by the target resource.
|
|
77
|
+
*
|
|
78
|
+
* 406 - NOT_ACCEPTABLE - This response is sent when the requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
|
|
79
|
+
*
|
|
80
|
+
* 407 - PROXY_AUTHENTICATION_REQUIRED - This is similar to 401 but authentication is needed to be done by a proxy.
|
|
81
|
+
*
|
|
82
|
+
* 408 - REQUEST_TIMEOUT - This response is sent on an idle connection by some servers, even without any previous request by the client.
|
|
83
|
+
*
|
|
84
|
+
* 409 - CONFLICT - This response is sent when a request conflicts with the current state of the server.
|
|
85
|
+
*
|
|
86
|
+
* 410 - GONE - This response is sent when the requested resource is no longer available and will not be available again.
|
|
87
|
+
*
|
|
88
|
+
* 411 - LENGTH_REQUIRED - The request did not specify the length of its content, which is required by the requested resource.
|
|
89
|
+
*
|
|
90
|
+
* 412 - PRECONDITION_FAILED - The server does not meet one of the preconditions that the requester put on the request.
|
|
91
|
+
*
|
|
92
|
+
* 413 - PAYLOAD_TOO_LARGE - The request is larger than the server is willing or able to process.
|
|
93
|
+
*
|
|
94
|
+
* 414 - URI_TOO_LONG - The URI requested by the client is longer than the server is willing to interpret.
|
|
95
|
+
*
|
|
96
|
+
* 415 - UNSUPPORTED_MEDIA_TYPE - The media format of the requested data is not supported by the server.
|
|
97
|
+
*
|
|
98
|
+
* 416 - RANGE_NOT_SATISFIABLE - The range specified by the Range header field in the request can't be fulfilled.
|
|
99
|
+
*
|
|
100
|
+
* 417 - EXPECTATION_FAILED - The expectation indicated by the Expect request header field can't be met by the server.
|
|
101
|
+
*
|
|
102
|
+
* 418 - IM_A_TEAPOT - The server refuses the attempt to brew coffee with a teapot.
|
|
103
|
+
*
|
|
104
|
+
* 421 - MISDIRECTED_REQUEST - The request was directed at a server that is not able to produce a response.
|
|
105
|
+
*
|
|
106
|
+
* 422 - UNPROCESSABLE_ENTITY - The request was well-formed but was unable to be followed due to semantic errors.
|
|
107
|
+
*
|
|
108
|
+
* 423 - LOCKED - The resource that is being accessed is locked.
|
|
109
|
+
*
|
|
110
|
+
* 424 - FAILED_DEPENDENCY - The request failed due to failure of a previous request.
|
|
111
|
+
*
|
|
112
|
+
* 425 - TOO_EARLY - Indicates that the server is unwilling to risk processing a request that might be replayed.
|
|
113
|
+
*
|
|
114
|
+
* 426 - UPGRADE_REQUIRED - The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.
|
|
115
|
+
*
|
|
116
|
+
* 428 - PRECONDITION_REQUIRED - The origin server requires the request to be conditional.
|
|
117
|
+
*
|
|
118
|
+
* 429 - TOO_MANY_REQUESTS - The user has sent too many requests in a given amount of time.
|
|
119
|
+
*
|
|
120
|
+
* 431 - REQUEST_HEADER_FIELDS_TOO_LARGE - The server is unwilling to process the request because its header fields are too large.
|
|
121
|
+
*
|
|
122
|
+
* 451 - UNAVAILABLE_FOR_LEGAL_REASONS - The user-agent requested a resource that cannot legally be provided, such as a censored resource.
|
|
123
|
+
*
|
|
124
|
+
*
|
|
125
|
+
* 5xx: Server error responses
|
|
126
|
+
*
|
|
127
|
+
*
|
|
128
|
+
* 500 - INTERNAL_SERVER_ERROR - The server encountered an unexpected condition that prevented it from fulfilling the request.
|
|
129
|
+
*
|
|
130
|
+
* 501 - NOT_IMPLEMENTED - The server does not support the functionality required to fulfill the request.
|
|
131
|
+
*
|
|
132
|
+
* 502 - BAD_GATEWAY - The server, while acting as a gateway or proxy, received an invalid response from the upstream server.
|
|
133
|
+
*
|
|
134
|
+
* 503 - SERVICE_UNAVAILABLE - The server is currently unavailable (because it is overloaded or down for maintenance).
|
|
135
|
+
*
|
|
136
|
+
* 504 - GATEWAY_TIMEOUT - The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
|
|
137
|
+
*
|
|
138
|
+
* 505 - HTTP_VERSION_NOT_SUPPORTED - The server does not support the HTTP protocol version used in the request.
|
|
139
|
+
*
|
|
140
|
+
* 506 - VARIANT_ALSO_NEGOTIATES - The server has an internal configuration error, such as a misconfigured gateway.
|
|
141
|
+
*
|
|
142
|
+
* 507 - INSUFFICIENT_STORAGE - The server is unable to store the representation needed to complete the request.
|
|
143
|
+
*
|
|
144
|
+
* 508 - LOOP_DETECTED - The server detected an infinite loop while processing a request.
|
|
145
|
+
*/
|
|
146
|
+
declare enum HttpStatusCodes {
|
|
147
|
+
/**
|
|
148
|
+
* The server has received the request headers and the client should proceed to send the request body.
|
|
149
|
+
*/
|
|
150
|
+
CONTINUE_100 = 100,
|
|
151
|
+
/**
|
|
152
|
+
* The requester has asked the server to switch protocols and the server has agreed to do so.
|
|
153
|
+
*/
|
|
154
|
+
SWITCHING_PROTOCOLS_101 = 101,
|
|
155
|
+
/**
|
|
156
|
+
* Used to return some response headers before final HTTP message.
|
|
157
|
+
*/
|
|
158
|
+
PROCESSING_102 = 102,
|
|
159
|
+
// WebDAV
|
|
160
|
+
/**
|
|
161
|
+
* Early hints - part of optimization to improve page load time.
|
|
162
|
+
*/
|
|
163
|
+
EARLY_HINTS_103 = 103,
|
|
164
|
+
/**
|
|
165
|
+
* The request has succeeded.
|
|
166
|
+
*/
|
|
167
|
+
OK_200 = 200,
|
|
168
|
+
/**
|
|
169
|
+
* The request has been fulfilled and has resulted in one or more new resources being created.
|
|
170
|
+
*/
|
|
171
|
+
CREATED_201 = 201,
|
|
172
|
+
/**
|
|
173
|
+
* The request has been accepted for processing, but the processing has not been completed.
|
|
174
|
+
*/
|
|
175
|
+
ACCEPTED_202 = 202,
|
|
176
|
+
/**
|
|
177
|
+
* The server successfully processed the request, but is returning information that may be from another source.
|
|
178
|
+
*/
|
|
179
|
+
NON_AUTHORITATIVE_INFORMATION_203 = 203,
|
|
180
|
+
/**
|
|
181
|
+
* The server successfully processed the request and is not returning any content.
|
|
182
|
+
*/
|
|
183
|
+
NO_CONTENT_204 = 204,
|
|
184
|
+
/**
|
|
185
|
+
* The server successfully processed the request, but is not returning any content and requires that the requester reset the document view.
|
|
186
|
+
*/
|
|
187
|
+
RESET_CONTENT_205 = 205,
|
|
188
|
+
/**
|
|
189
|
+
* The server is delivering only part of the resource due to a range header sent by the client.
|
|
190
|
+
*/
|
|
191
|
+
PARTIAL_CONTENT_206 = 206,
|
|
192
|
+
/**
|
|
193
|
+
* Multi-status response providing status for multiple independent operations.
|
|
194
|
+
*/
|
|
195
|
+
MULTI_STATUS_207 = 207,
|
|
196
|
+
// WebDAV
|
|
197
|
+
/**
|
|
198
|
+
* The members of a DAV binding have already been enumerated in a preceding part of the request.
|
|
199
|
+
*/
|
|
200
|
+
ALREADY_REPORTED_208 = 208,
|
|
201
|
+
// WebDAV
|
|
202
|
+
/**
|
|
203
|
+
* The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance manipulations applied to the current instance.
|
|
204
|
+
*/
|
|
205
|
+
IM_USED_226 = 226,
|
|
206
|
+
/**
|
|
207
|
+
* The request has more than one possible response. The user-agent or user should choose one of them.
|
|
208
|
+
*/
|
|
209
|
+
MULTIPLE_CHOICES_300 = 300,
|
|
210
|
+
/**
|
|
211
|
+
* The URL of the requested resource has been changed permanently.
|
|
212
|
+
*/
|
|
213
|
+
MOVED_PERMANENTLY_301 = 301,
|
|
214
|
+
/**
|
|
215
|
+
* The requested resource is available at a different URI.
|
|
216
|
+
*/
|
|
217
|
+
FOUND_302 = 302,
|
|
218
|
+
/**
|
|
219
|
+
* The response to the request can be found under another URI using a GET method.
|
|
220
|
+
*/
|
|
221
|
+
SEE_OTHER_303 = 303,
|
|
222
|
+
/**
|
|
223
|
+
* Indicates that the resource has not been modified since the version specified by the request headers.
|
|
224
|
+
*/
|
|
225
|
+
NOT_MODIFIED_304 = 304,
|
|
226
|
+
/**
|
|
227
|
+
* The requested resource must be accessed through the proxy given by the Location field.
|
|
228
|
+
*/
|
|
229
|
+
USE_PROXY_305 = 305,
|
|
230
|
+
/**
|
|
231
|
+
* No longer used. Originally meant to direct the client to switch to a different proxy.
|
|
232
|
+
*/
|
|
233
|
+
SWITCH_PROXY_306 = 306,
|
|
234
|
+
/**
|
|
235
|
+
* The requested resource resides temporarily under a different URI.
|
|
236
|
+
*/
|
|
237
|
+
TEMPORARY_REDIRECT_307 = 307,
|
|
238
|
+
/**
|
|
239
|
+
* The request should be repeated with another URI, but future requests should still use the original URI.
|
|
240
|
+
*/
|
|
241
|
+
PERMANENT_REDIRECT_308 = 308,
|
|
242
|
+
/**
|
|
243
|
+
* The server cannot or will not process the request due to something perceived to be a client error.
|
|
244
|
+
*/
|
|
245
|
+
BAD_REQUEST_400 = 400,
|
|
246
|
+
/**
|
|
247
|
+
* The client must authenticate itself to get the requested response.
|
|
248
|
+
*/
|
|
249
|
+
UNAUTHORIZED_401 = 401,
|
|
250
|
+
/**
|
|
251
|
+
* The client does not have access rights to the content.
|
|
252
|
+
*/
|
|
253
|
+
FORBIDDEN_403 = 403,
|
|
254
|
+
/**
|
|
255
|
+
* The server can not find the requested resource.
|
|
256
|
+
*/
|
|
257
|
+
NOT_FOUND_404 = 404,
|
|
258
|
+
/**
|
|
259
|
+
* The request method is known by the server but is not supported by the target resource.
|
|
260
|
+
*/
|
|
261
|
+
METHOD_NOT_ALLOWED_405 = 405,
|
|
262
|
+
/**
|
|
263
|
+
* This response is sent when the requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
|
|
264
|
+
*/
|
|
265
|
+
NOT_ACCEPTABLE_406 = 406,
|
|
266
|
+
/**
|
|
267
|
+
* This is similar to 401 but authentication is needed to be done by a proxy.
|
|
268
|
+
*/
|
|
269
|
+
PROXY_AUTHENTICATION_REQUIRED_407 = 407,
|
|
270
|
+
/**
|
|
271
|
+
* This response is sent on an idle connection by some servers, even without any previous request by the client.
|
|
272
|
+
*/
|
|
273
|
+
REQUEST_TIMEOUT_408 = 408,
|
|
274
|
+
/**
|
|
275
|
+
* This response is sent when a request conflicts with the current state of the server.
|
|
276
|
+
*/
|
|
277
|
+
CONFLICT_409 = 409,
|
|
278
|
+
/**
|
|
279
|
+
* This response is sent when the requested resource is no longer available and will not be available again.
|
|
280
|
+
*/
|
|
281
|
+
GONE_410 = 410,
|
|
282
|
+
/**
|
|
283
|
+
* The request did not specify the length of its content, which is required by the requested resource.
|
|
284
|
+
*/
|
|
285
|
+
LENGTH_REQUIRED_411 = 411,
|
|
286
|
+
/**
|
|
287
|
+
* The server does not meet one of the preconditions that the requester put on the request.
|
|
288
|
+
*/
|
|
289
|
+
PRECONDITION_FAILED_412 = 412,
|
|
290
|
+
/**
|
|
291
|
+
* The request is larger than the server is willing or able to process.
|
|
292
|
+
*/
|
|
293
|
+
PAYLOAD_TOO_LARGE_413 = 413,
|
|
294
|
+
/**
|
|
295
|
+
* The URI requested by the client is longer than the server is willing to interpret.
|
|
296
|
+
*/
|
|
297
|
+
URI_TOO_LONG_414 = 414,
|
|
298
|
+
/**
|
|
299
|
+
* The media format of the requested data is not supported by the server.
|
|
300
|
+
*/
|
|
301
|
+
UNSUPPORTED_MEDIA_TYPE_415 = 415,
|
|
302
|
+
/**
|
|
303
|
+
* The range specified by the Range header field in the request can't be fulfilled.
|
|
304
|
+
*/
|
|
305
|
+
RANGE_NOT_SATISFIABLE_416 = 416,
|
|
306
|
+
/**
|
|
307
|
+
* The expectation indicated by the Expect request header field can't be met by the server.
|
|
308
|
+
*/
|
|
309
|
+
EXPECTATION_FAILED_417 = 417,
|
|
310
|
+
/**
|
|
311
|
+
* The server refuses the attempt to brew coffee with a teapot.
|
|
312
|
+
*/
|
|
313
|
+
IM_A_TEAPOT_418 = 418,
|
|
314
|
+
// Easter egg from the HTCPCP/1.0 protocol.
|
|
315
|
+
/**
|
|
316
|
+
* The request was directed at a server that is not able to produce a response.
|
|
317
|
+
*/
|
|
318
|
+
MISDIRECTED_REQUEST_421 = 421,
|
|
319
|
+
/**
|
|
320
|
+
* The request was well-formed but was unable to be followed due to semantic errors.
|
|
321
|
+
*/
|
|
322
|
+
UNPROCESSABLE_ENTITY_422 = 422,
|
|
323
|
+
// WebDAV
|
|
324
|
+
/**
|
|
325
|
+
* The resource that is being accessed is locked.
|
|
326
|
+
*/
|
|
327
|
+
LOCKED_423 = 423,
|
|
328
|
+
// WebDAV
|
|
329
|
+
/**
|
|
330
|
+
* The request failed due to failure of a previous request.
|
|
331
|
+
*/
|
|
332
|
+
FAILED_DEPENDENCY_424 = 424,
|
|
333
|
+
// WebDAV
|
|
334
|
+
/**
|
|
335
|
+
* Indicates that the server is unwilling to risk processing a request that might be replayed.
|
|
336
|
+
*/
|
|
337
|
+
TOO_EARLY_425 = 425,
|
|
338
|
+
/**
|
|
339
|
+
* The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.
|
|
340
|
+
*/
|
|
341
|
+
UPGRADE_REQUIRED_426 = 426,
|
|
342
|
+
/**
|
|
343
|
+
* The origin server requires the request to be conditional.
|
|
344
|
+
*/
|
|
345
|
+
PRECONDITION_REQUIRED_428 = 428,
|
|
346
|
+
/**
|
|
347
|
+
* The user has sent too many requests in a given amount of time.
|
|
348
|
+
*/
|
|
349
|
+
TOO_MANY_REQUESTS_429 = 429,
|
|
350
|
+
/**
|
|
351
|
+
* The server is unwilling to process the request because its header fields are too large.
|
|
352
|
+
*/
|
|
353
|
+
REQUEST_HEADER_FIELDS_TOO_LARGE_431 = 431,
|
|
354
|
+
/**
|
|
355
|
+
* The user-agent requested a resource that cannot legally be provided, such as a censored resource.
|
|
356
|
+
*/
|
|
357
|
+
UNAVAILABLE_FOR_LEGAL_REASONS_451 = 451,
|
|
358
|
+
/**
|
|
359
|
+
* The server encountered an unexpected condition that prevented it from fulfilling the request.
|
|
360
|
+
*/
|
|
361
|
+
INTERNAL_SERVER_ERROR_500 = 500,
|
|
362
|
+
/**
|
|
363
|
+
* The server does not support the functionality required to fulfill the request.
|
|
364
|
+
*/
|
|
365
|
+
NOT_IMPLEMENTED_501 = 501,
|
|
366
|
+
/**
|
|
367
|
+
* The server, while acting as a gateway or proxy, received an invalid response from the upstream server.
|
|
368
|
+
*/
|
|
369
|
+
BAD_GATEWAY_502 = 502,
|
|
370
|
+
/**
|
|
371
|
+
* The server is currently unavailable (because it is overloaded or down for maintenance).
|
|
372
|
+
*/
|
|
373
|
+
SERVICE_UNAVAILABLE_503 = 503,
|
|
374
|
+
/**
|
|
375
|
+
* The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
|
|
376
|
+
*/
|
|
377
|
+
GATEWAY_TIMEOUT_504 = 504,
|
|
378
|
+
/**
|
|
379
|
+
* The server does not support the HTTP protocol version used in the request.
|
|
380
|
+
*/
|
|
381
|
+
HTTP_VERSION_NOT_SUPPORTED_505 = 505,
|
|
382
|
+
/**
|
|
383
|
+
* The server has an internal configuration error, such as a misconfigured gateway.
|
|
384
|
+
*/
|
|
385
|
+
VARIANT_ALSO_NEGOTIATES_506 = 506,
|
|
386
|
+
/**
|
|
387
|
+
* The server is unable to store the representation needed to complete the request.
|
|
388
|
+
*/
|
|
389
|
+
INSUFFICIENT_STORAGE_507 = 507,
|
|
390
|
+
// WebDAV
|
|
391
|
+
/**
|
|
392
|
+
* The server detected an infinite loop while processing a request.
|
|
393
|
+
*/
|
|
394
|
+
LOOP_DETECTED_508 = 508,
|
|
395
|
+
// WebDAV
|
|
396
|
+
/**
|
|
397
|
+
* Further extensions to the request are required for the server to fulfill it.
|
|
398
|
+
*/
|
|
399
|
+
NOT_EXTENDED_510 = 510,
|
|
400
|
+
/**
|
|
401
|
+
* The client needs to authenticate to gain network access.
|
|
402
|
+
*/
|
|
403
|
+
NETWORK_AUTHENTICATION_REQUIRED_511 = 511
|
|
404
|
+
}
|
|
405
|
+
//#endregion
|
|
406
|
+
export { HttpStatusCodes as t };
|
|
407
|
+
//# sourceMappingURL=httpStatusCodes-Bscj19Pj.d.ts.map
|
package/server/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const e=require(`./
|
|
2
|
-
${(0,
|
|
1
|
+
const e=require(`./checkPortAvailability-BQTphbYJ.cjs`),t=require(`./routes/config.routes.cjs`),n=require(`./routes/dictionary.routes.cjs`);let r=require(`@intlayer/config/node`),i=require(`fastify-intlayer`),a=require(`node:fs`),o=require(`node:path`),s=require(`node:url`),c=require(`@fastify/compress`);c=e.n(c);let l=require(`@fastify/cookie`);l=e.n(l);let u=require(`@fastify/cors`);u=e.n(u);let d=require(`@fastify/formbody`);d=e.n(d);let f=require(`@fastify/helmet`);f=e.n(f);let p=require(`@fastify/static`);p=e.n(p);let m=require(`@intlayer/config/env`),h=require(`@intlayer/config/logger`),g=require(`fastify`);g=e.n(g);let _=require(`mime`);_=e.n(_);const v=(0,o.dirname)((0,s.fileURLToPath)(require(`url`).pathToFileURL(__filename).href)),y={env:process.env.NODE_ENV,envFile:process.env.ENV_FILE},b=(0,r.getConfiguration)(y),x=(0,h.getAppLogger)(b),S=b.editor.port??8e3;b.editor.enabled||(x(`Editor is not enabled. Add ${(0,h.colorize)(`editor.enabled`,h.ANSIColors.BLUE)} to ${(0,h.colorizePath)(`intlayer.config.ts`)} file to enable it.`,{level:`error`}),process.exit(0));const C=JSON.parse((0,a.readFileSync)((0,o.resolve)(v,`../../package.json`),`utf8`)),w=(0,g.default)({disableRequestLogging:!0});w.register(i.intlayer);const T=(0,o.resolve)(v,`../../client/dist`),E={origin:`*`,credentials:!0};(async r=>{await e.t(S)||(x(`Error: Port ${S} is already in use.`,{level:`error`}),process.exit(255)),await r.register(f.default,{contentSecurityPolicy:!1,global:!0}),await r.register(u.default,E),await r.register(c.default),await r.register(l.default),await r.register(d.default),await r.register(n.dictionaryRouter,{prefix:`/api/dictionary`}),await r.register(t.configurationRouter,{prefix:`/api/config`}),await r.register(p.default,{root:T,wildcard:!1}),r.setNotFoundHandler((e,t)=>{let n=(0,o.join)(T,e.raw.url||`/`);if((0,a.existsSync)(n)&&(0,a.lstatSync)(n).isFile()){let r=_.default.getType(n)??`application/octet-stream`;return t.header(`Content-Type`,r),t.sendFile(e.raw.url?.split(`/`).pop()||`index.html`)}else return t.sendFile(`index.html`)});try{await r.listen({port:S,host:`0.0.0.0`});let e=(0,m.getEnvFilePath)(y.env,y.envFile);console.log(`
|
|
2
|
+
${(0,h.colorize)((0,h.colorize)(`INTLAYER`,h.ANSIColors.BOLD),h.ANSIColors.GREY_DARK)} ${(0,h.colorize)(`v${C.version}`,h.ANSIColors.GREY_DARK)}
|
|
3
3
|
|
|
4
|
-
Editor running at: ${(0,
|
|
5
|
-
${(0,
|
|
6
|
-
${(0,
|
|
7
|
-
${(0,
|
|
8
|
-
`)}catch(
|
|
4
|
+
Editor running at: ${(0,h.colorizePath)(`http://localhost:${S}`)}
|
|
5
|
+
${(0,h.colorize)(`➜`,h.ANSIColors.GREY_DARK)} Watching application at: ${b.editor.applicationURL===``?`-`:(0,h.colorizePath)(b.editor.applicationURL)}
|
|
6
|
+
${(0,h.colorize)(`➜`,h.ANSIColors.GREY_DARK)} Access key: ${b.editor.clientId??`-`}
|
|
7
|
+
${(0,h.colorize)(`➜`,h.ANSIColors.GREY_DARK)} Environment: ${e??`-`}
|
|
8
|
+
`)}catch(e){r.log.error(e),process.exit(1)}})(w);
|
|
9
9
|
//# sourceMappingURL=index.cjs.map
|