intlayer-editor 4.0.4 → 4.1.0
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/bin/intlayer-editor.mjs +2 -2
- package/{dist/assets/cobol-BT52btWN.js → client/dist/assets/cobol-PTqiYgYu.js} +1 -1
- package/client/dist/assets/index-C4F8qLwg.css +1 -0
- package/{dist/assets/index-BoH7Xogx.js → client/dist/assets/index-CgcMqFX2.js} +102 -98
- package/{dist/assets/razor-iKTp_yOP.js → client/dist/assets/razor-CNLDkMZG.js} +1 -1
- package/client/dist/assets/scala-DQVVAn-B.js +1 -0
- package/client/dist/assets/swift-BSxZ-RaX.js +1 -0
- package/{dist → client/dist}/index.html +2 -2
- package/package.json +43 -25
- package/server/dist/controllers/configuration.controller.cjs +52 -0
- package/server/dist/controllers/configuration.controller.cjs.map +1 -0
- package/server/dist/controllers/configuration.controller.mjs +30 -0
- package/server/dist/controllers/configuration.controller.mjs.map +1 -0
- package/server/dist/controllers/dictionary.controller.cjs +57 -0
- package/server/dist/controllers/dictionary.controller.cjs.map +1 -0
- package/server/dist/controllers/dictionary.controller.mjs +33 -0
- package/server/dist/controllers/dictionary.controller.mjs.map +1 -0
- package/server/dist/export.cjs +23 -0
- package/server/dist/export.cjs.map +1 -0
- package/server/dist/export.mjs +2 -0
- package/server/dist/export.mjs.map +1 -0
- package/server/dist/index.cjs +77 -0
- package/server/dist/index.cjs.map +1 -0
- package/server/dist/index.mjs +53 -0
- package/server/dist/index.mjs.map +1 -0
- package/server/dist/routes/config.routes.cjs +57 -0
- package/server/dist/routes/config.routes.cjs.map +1 -0
- package/server/dist/routes/config.routes.mjs +22 -0
- package/server/dist/routes/config.routes.mjs.map +1 -0
- package/server/dist/routes/dictionary.routes.cjs +47 -0
- package/server/dist/routes/dictionary.routes.cjs.map +1 -0
- package/server/dist/routes/dictionary.routes.mjs +22 -0
- package/server/dist/routes/dictionary.routes.mjs.map +1 -0
- package/server/dist/types/Routes.cjs +17 -0
- package/server/dist/types/Routes.cjs.map +1 -0
- package/server/dist/types/Routes.mjs +1 -0
- package/server/dist/types/Routes.mjs.map +1 -0
- package/server/dist/utils/httpStatusCodes.cjs +93 -0
- package/server/dist/utils/httpStatusCodes.cjs.map +1 -0
- package/server/dist/utils/httpStatusCodes.mjs +69 -0
- package/server/dist/utils/httpStatusCodes.mjs.map +1 -0
- package/server/dist/utils/responseData.cjs +74 -0
- package/server/dist/utils/responseData.cjs.map +1 -0
- package/server/dist/utils/responseData.mjs +49 -0
- package/server/dist/utils/responseData.mjs.map +1 -0
- package/dist/assets/index-MH9z7Tro.css +0 -1
- package/dist/assets/scala-B_49xXYf.js +0 -1
- package/dist/assets/swift-Ye_uPAM8.js +0 -1
- /package/{dist → client/dist}/assets/Inter-VariableFont-c8O0ljhh.ttf +0 -0
- /package/{dist → client/dist}/assets/abap-DsBKuouk.js +0 -0
- /package/{dist → client/dist}/assets/actionscript-3-D_z4Izcz.js +0 -0
- /package/{dist → client/dist}/assets/ada-727ZlQH0.js +0 -0
- /package/{dist → client/dist}/assets/andromeeda-C3khCPGq.js +0 -0
- /package/{dist → client/dist}/assets/angular-html-LfdN0zeE.js +0 -0
- /package/{dist → client/dist}/assets/angular-ts-CKsD7JZE.js +0 -0
- /package/{dist → client/dist}/assets/apache-Dn00JSTd.js +0 -0
- /package/{dist → client/dist}/assets/apex-COJ4H7py.js +0 -0
- /package/{dist → client/dist}/assets/apl-BBq3IX1j.js +0 -0
- /package/{dist → client/dist}/assets/applescript-Bu5BbsvL.js +0 -0
- /package/{dist → client/dist}/assets/ara-7O62HKoU.js +0 -0
- /package/{dist → client/dist}/assets/asciidoc-BPT9niGB.js +0 -0
- /package/{dist → client/dist}/assets/asm-Dhn9LcZ4.js +0 -0
- /package/{dist → client/dist}/assets/astro-CqkE3fuf.js +0 -0
- /package/{dist → client/dist}/assets/aurora-x-D-2ljcwZ.js +0 -0
- /package/{dist → client/dist}/assets/awk-eg146-Ew.js +0 -0
- /package/{dist → client/dist}/assets/ayu-dark-Cv9koXgw.js +0 -0
- /package/{dist → client/dist}/assets/ballerina-Du268qiB.js +0 -0
- /package/{dist → client/dist}/assets/bat-fje9CFhw.js +0 -0
- /package/{dist → client/dist}/assets/beancount-BwXTMy5W.js +0 -0
- /package/{dist → client/dist}/assets/berry-3xVqZejG.js +0 -0
- /package/{dist → client/dist}/assets/bibtex-xW4inM5L.js +0 -0
- /package/{dist → client/dist}/assets/bicep-DHo0CJ0O.js +0 -0
- /package/{dist → client/dist}/assets/blade-a8OxSdnT.js +0 -0
- /package/{dist → client/dist}/assets/bsl-Dgyn0ogV.js +0 -0
- /package/{dist → client/dist}/assets/c-C3t2pwGQ.js +0 -0
- /package/{dist → client/dist}/assets/cadence-DNquZEk8.js +0 -0
- /package/{dist → client/dist}/assets/cairo--RitsXJZ.js +0 -0
- /package/{dist → client/dist}/assets/catppuccin-frappe-CD_QflpE.js +0 -0
- /package/{dist → client/dist}/assets/catppuccin-latte-DRW-0cLl.js +0 -0
- /package/{dist → client/dist}/assets/catppuccin-macchiato-C-_shW-Y.js +0 -0
- /package/{dist → client/dist}/assets/catppuccin-mocha-LGGdnPYs.js +0 -0
- /package/{dist → client/dist}/assets/clarity-BHOwM8T6.js +0 -0
- /package/{dist → client/dist}/assets/clojure-DxSadP1t.js +0 -0
- /package/{dist → client/dist}/assets/cmake-DbXoA79R.js +0 -0
- /package/{dist → client/dist}/assets/codeowners-Bp6g37R7.js +0 -0
- /package/{dist → client/dist}/assets/codeql-sacFqUAJ.js +0 -0
- /package/{dist → client/dist}/assets/coffee-dyiR41kL.js +0 -0
- /package/{dist → client/dist}/assets/common-lisp-C7gG9l05.js +0 -0
- /package/{dist → client/dist}/assets/coq-Dsg_Bt_b.js +0 -0
- /package/{dist → client/dist}/assets/cpp-BksuvNSY.js +0 -0
- /package/{dist → client/dist}/assets/crystal-DtDmRg-F.js +0 -0
- /package/{dist → client/dist}/assets/csharp-D9R-vmeu.js +0 -0
- /package/{dist → client/dist}/assets/css-BPhBrDlE.js +0 -0
- /package/{dist → client/dist}/assets/csv-B0qRVHPH.js +0 -0
- /package/{dist → client/dist}/assets/cue-DtFQj3wx.js +0 -0
- /package/{dist → client/dist}/assets/cypher-m2LEI-9-.js +0 -0
- /package/{dist → client/dist}/assets/d-BoXegm-a.js +0 -0
- /package/{dist → client/dist}/assets/dark-plus-C3mMm8J8.js +0 -0
- /package/{dist → client/dist}/assets/dart-B9wLZaAG.js +0 -0
- /package/{dist → client/dist}/assets/dax-ClGRhx96.js +0 -0
- /package/{dist → client/dist}/assets/desktop-DEIpsLCJ.js +0 -0
- /package/{dist → client/dist}/assets/diff-BgYniUM_.js +0 -0
- /package/{dist → client/dist}/assets/docker-COcR7UxN.js +0 -0
- /package/{dist → client/dist}/assets/dotenv-BjQB5zDj.js +0 -0
- /package/{dist → client/dist}/assets/dracula-BzJJZx-M.js +0 -0
- /package/{dist → client/dist}/assets/dracula-soft-BXkSAIEj.js +0 -0
- /package/{dist → client/dist}/assets/dream-maker-C-nORZOA.js +0 -0
- /package/{dist → client/dist}/assets/edge-D5gP-w-T.js +0 -0
- /package/{dist → client/dist}/assets/elixir-CLiX3zqd.js +0 -0
- /package/{dist → client/dist}/assets/elm-CmHSxxaM.js +0 -0
- /package/{dist → client/dist}/assets/emacs-lisp-BX77sIaO.js +0 -0
- /package/{dist → client/dist}/assets/erb-BYTLMnw6.js +0 -0
- /package/{dist → client/dist}/assets/erlang-B-DoSBHF.js +0 -0
- /package/{dist → client/dist}/assets/everforest-dark-BgDCqdQA.js +0 -0
- /package/{dist → client/dist}/assets/everforest-light-C8M2exoo.js +0 -0
- /package/{dist → client/dist}/assets/fennel-bCA53EVm.js +0 -0
- /package/{dist → client/dist}/assets/fish-w-ucz2PV.js +0 -0
- /package/{dist → client/dist}/assets/fluent-Dayu4EKP.js +0 -0
- /package/{dist → client/dist}/assets/fortran-fixed-form-TqA4NnZg.js +0 -0
- /package/{dist → client/dist}/assets/fortran-free-form-DKXYxT9g.js +0 -0
- /package/{dist → client/dist}/assets/fsharp-XplgxFYe.js +0 -0
- /package/{dist → client/dist}/assets/gdresource-BHYsBjWJ.js +0 -0
- /package/{dist → client/dist}/assets/gdscript-DfxzS6Rs.js +0 -0
- /package/{dist → client/dist}/assets/gdshader-SKMF96pI.js +0 -0
- /package/{dist → client/dist}/assets/genie-ajMbGru0.js +0 -0
- /package/{dist → client/dist}/assets/gherkin--30QC5Em.js +0 -0
- /package/{dist → client/dist}/assets/git-commit-i4q6IMui.js +0 -0
- /package/{dist → client/dist}/assets/git-rebase-B-v9cOL2.js +0 -0
- /package/{dist → client/dist}/assets/github-dark-DHJKELXO.js +0 -0
- /package/{dist → client/dist}/assets/github-dark-default-Cuk6v7N8.js +0 -0
- /package/{dist → client/dist}/assets/github-dark-dimmed-DH5Ifo-i.js +0 -0
- /package/{dist → client/dist}/assets/github-dark-high-contrast-E3gJ1_iC.js +0 -0
- /package/{dist → client/dist}/assets/github-light-DAi9KRSo.js +0 -0
- /package/{dist → client/dist}/assets/github-light-default-D7oLnXFd.js +0 -0
- /package/{dist → client/dist}/assets/github-light-high-contrast-BfjtVDDH.js +0 -0
- /package/{dist → client/dist}/assets/gleam-B430Bg39.js +0 -0
- /package/{dist → client/dist}/assets/glimmer-js-D-cwc0-E.js +0 -0
- /package/{dist → client/dist}/assets/glimmer-ts-pgjy16dm.js +0 -0
- /package/{dist → client/dist}/assets/glsl-DBO2IWDn.js +0 -0
- /package/{dist → client/dist}/assets/gnuplot-CM8KxXT1.js +0 -0
- /package/{dist → client/dist}/assets/go-B1SYOhNW.js +0 -0
- /package/{dist → client/dist}/assets/graphql-cDcHW_If.js +0 -0
- /package/{dist → client/dist}/assets/groovy-DkBy-JyN.js +0 -0
- /package/{dist → client/dist}/assets/hack-D1yCygmZ.js +0 -0
- /package/{dist → client/dist}/assets/haml-B2EZWmdv.js +0 -0
- /package/{dist → client/dist}/assets/handlebars-BQGss363.js +0 -0
- /package/{dist → client/dist}/assets/haskell-BILxekzW.js +0 -0
- /package/{dist → client/dist}/assets/haxe-C5wWYbrZ.js +0 -0
- /package/{dist → client/dist}/assets/hcl-HzYwdGDm.js +0 -0
- /package/{dist → client/dist}/assets/hjson-T-Tgc4AT.js +0 -0
- /package/{dist → client/dist}/assets/hlsl-ifBTmRxC.js +0 -0
- /package/{dist → client/dist}/assets/houston-DnULxvSX.js +0 -0
- /package/{dist → client/dist}/assets/html-C2L_23MC.js +0 -0
- /package/{dist → client/dist}/assets/html-derivative-CSfWNPLT.js +0 -0
- /package/{dist → client/dist}/assets/http-FRrOvY1W.js +0 -0
- /package/{dist → client/dist}/assets/hxml-TIA70rKU.js +0 -0
- /package/{dist → client/dist}/assets/hy-BMj5Y0dO.js +0 -0
- /package/{dist → client/dist}/assets/imba-bv_oIlVt.js +0 -0
- /package/{dist → client/dist}/assets/ini-BjABl1g7.js +0 -0
- /package/{dist → client/dist}/assets/java-xI-RfyKK.js +0 -0
- /package/{dist → client/dist}/assets/javascript-ySlJ1b_l.js +0 -0
- /package/{dist → client/dist}/assets/jinja-DGy0s7-h.js +0 -0
- /package/{dist → client/dist}/assets/jison-BqZprYcd.js +0 -0
- /package/{dist → client/dist}/assets/json-BQoSv7ci.js +0 -0
- /package/{dist → client/dist}/assets/json5-w8dY5SsB.js +0 -0
- /package/{dist → client/dist}/assets/jsonc-TU54ms6u.js +0 -0
- /package/{dist → client/dist}/assets/jsonl-DREVFZK8.js +0 -0
- /package/{dist → client/dist}/assets/jsonnet-BfivnA6A.js +0 -0
- /package/{dist → client/dist}/assets/jssm-P4WzXJd0.js +0 -0
- /package/{dist → client/dist}/assets/jsx-BAng5TT0.js +0 -0
- /package/{dist → client/dist}/assets/julia-BBuGR-5E.js +0 -0
- /package/{dist → client/dist}/assets/kanagawa-dragon-CkXjmgJE.js +0 -0
- /package/{dist → client/dist}/assets/kanagawa-lotus-CfQXZHmo.js +0 -0
- /package/{dist → client/dist}/assets/kanagawa-wave-DWedfzmr.js +0 -0
- /package/{dist → client/dist}/assets/kotlin-B5lbUyaz.js +0 -0
- /package/{dist → client/dist}/assets/kusto-mebxcVVE.js +0 -0
- /package/{dist → client/dist}/assets/laserwave-DUszq2jm.js +0 -0
- /package/{dist → client/dist}/assets/latex-C-cWTeAZ.js +0 -0
- /package/{dist → client/dist}/assets/lean-XBlWyCtg.js +0 -0
- /package/{dist → client/dist}/assets/less-BfCpw3nA.js +0 -0
- /package/{dist → client/dist}/assets/light-plus-B7mTdjB0.js +0 -0
- /package/{dist → client/dist}/assets/liquid-D3W5UaiH.js +0 -0
- /package/{dist → client/dist}/assets/log-Cc5clBb7.js +0 -0
- /package/{dist → client/dist}/assets/logo-IuBKFhSY.js +0 -0
- /package/{dist → client/dist}/assets/lua-CvWAzNxB.js +0 -0
- /package/{dist → client/dist}/assets/luau-Du5NY7AG.js +0 -0
- /package/{dist → client/dist}/assets/make-Bvotw-X0.js +0 -0
- /package/{dist → client/dist}/assets/markdown-UIAJJxZW.js +0 -0
- /package/{dist → client/dist}/assets/marko-z0MBrx5-.js +0 -0
- /package/{dist → client/dist}/assets/material-theme-D5KoaKCx.js +0 -0
- /package/{dist → client/dist}/assets/material-theme-darker-BfHTSMKl.js +0 -0
- /package/{dist → client/dist}/assets/material-theme-lighter-B0m2ddpp.js +0 -0
- /package/{dist → client/dist}/assets/material-theme-ocean-CyktbL80.js +0 -0
- /package/{dist → client/dist}/assets/material-theme-palenight-Csfq5Kiy.js +0 -0
- /package/{dist → client/dist}/assets/matlab-D9-PGadD.js +0 -0
- /package/{dist → client/dist}/assets/mdc-DB_EDNY_.js +0 -0
- /package/{dist → client/dist}/assets/mdx-sdHcTMYB.js +0 -0
- /package/{dist → client/dist}/assets/mermaid-Ci6OQyBP.js +0 -0
- /package/{dist → client/dist}/assets/min-dark-CafNBF8u.js +0 -0
- /package/{dist → client/dist}/assets/min-light-CTRr51gU.js +0 -0
- /package/{dist → client/dist}/assets/mipsasm-BC5c_5Pe.js +0 -0
- /package/{dist → client/dist}/assets/mojo-Tz6hzZYG.js +0 -0
- /package/{dist → client/dist}/assets/monokai-D4h5O-jR.js +0 -0
- /package/{dist → client/dist}/assets/move-DB_GagMm.js +0 -0
- /package/{dist → client/dist}/assets/narrat-DLbgOhZU.js +0 -0
- /package/{dist → client/dist}/assets/nextflow-B0XVJmRM.js +0 -0
- /package/{dist → client/dist}/assets/nginx-D_VnBJ67.js +0 -0
- /package/{dist → client/dist}/assets/night-owl-C39BiMTA.js +0 -0
- /package/{dist → client/dist}/assets/nim-ZlGxZxc3.js +0 -0
- /package/{dist → client/dist}/assets/nix-shcSOmrb.js +0 -0
- /package/{dist → client/dist}/assets/nord-Ddv68eIx.js +0 -0
- /package/{dist → client/dist}/assets/nushell-D4Tzg5kh.js +0 -0
- /package/{dist → client/dist}/assets/objective-c-Deuh7S70.js +0 -0
- /package/{dist → client/dist}/assets/objective-cpp-BUEGK8hf.js +0 -0
- /package/{dist → client/dist}/assets/ocaml-BNioltXt.js +0 -0
- /package/{dist → client/dist}/assets/one-dark-pro-GBQ2dnAY.js +0 -0
- /package/{dist → client/dist}/assets/one-light-PoHY5YXO.js +0 -0
- /package/{dist → client/dist}/assets/pascal-JqZropPD.js +0 -0
- /package/{dist → client/dist}/assets/perl-CHQXSrWU.js +0 -0
- /package/{dist → client/dist}/assets/php-B5ebYQev.js +0 -0
- /package/{dist → client/dist}/assets/plastic-3e1v2bzS.js +0 -0
- /package/{dist → client/dist}/assets/plsql-LKU2TuZ1.js +0 -0
- /package/{dist → client/dist}/assets/po-BFLt1xDp.js +0 -0
- /package/{dist → client/dist}/assets/poimandres-CS3Unz2-.js +0 -0
- /package/{dist → client/dist}/assets/polar-DKykz6zU.js +0 -0
- /package/{dist → client/dist}/assets/postcss-B3ZDOciz.js +0 -0
- /package/{dist → client/dist}/assets/powerquery-CSHBycmS.js +0 -0
- /package/{dist → client/dist}/assets/powershell-BIEUsx6d.js +0 -0
- /package/{dist → client/dist}/assets/prisma-B48N-Iqd.js +0 -0
- /package/{dist → client/dist}/assets/prolog-BY-TUvya.js +0 -0
- /package/{dist → client/dist}/assets/proto-zocC4JxJ.js +0 -0
- /package/{dist → client/dist}/assets/pug-CM9l7STV.js +0 -0
- /package/{dist → client/dist}/assets/puppet-Cza_XSSt.js +0 -0
- /package/{dist → client/dist}/assets/purescript-Bg-kzb6g.js +0 -0
- /package/{dist → client/dist}/assets/python-DhUJRlN_.js +0 -0
- /package/{dist → client/dist}/assets/qml-D8XfuvdV.js +0 -0
- /package/{dist → client/dist}/assets/qmldir-C8lEn-DE.js +0 -0
- /package/{dist → client/dist}/assets/qss-DhMKtDLN.js +0 -0
- /package/{dist → client/dist}/assets/r-CwjWoCRV.js +0 -0
- /package/{dist → client/dist}/assets/racket-CzouJOBO.js +0 -0
- /package/{dist → client/dist}/assets/raku-B1bQXN8T.js +0 -0
- /package/{dist → client/dist}/assets/red-bN70gL4F.js +0 -0
- /package/{dist → client/dist}/assets/reg-5LuOXUq_.js +0 -0
- /package/{dist → client/dist}/assets/regexp-DWJ3fJO_.js +0 -0
- /package/{dist → client/dist}/assets/rel-DJlmqQ1C.js +0 -0
- /package/{dist → client/dist}/assets/riscv-QhoSD0DR.js +0 -0
- /package/{dist → client/dist}/assets/rose-pine-CmCqftbK.js +0 -0
- /package/{dist → client/dist}/assets/rose-pine-dawn-Ds-gbosJ.js +0 -0
- /package/{dist → client/dist}/assets/rose-pine-moon-CjDtw9vr.js +0 -0
- /package/{dist → client/dist}/assets/rst-4NLicBqY.js +0 -0
- /package/{dist → client/dist}/assets/ruby-DeZ3UC14.js +0 -0
- /package/{dist → client/dist}/assets/rust-Be6lgOlo.js +0 -0
- /package/{dist → client/dist}/assets/sas-BmTFh92c.js +0 -0
- /package/{dist → client/dist}/assets/sass-BJ4Li9vH.js +0 -0
- /package/{dist → client/dist}/assets/scheme-BJGe-b2p.js +0 -0
- /package/{dist → client/dist}/assets/scss-C31hgJw-.js +0 -0
- /package/{dist → client/dist}/assets/sdbl-BLhTXw86.js +0 -0
- /package/{dist → client/dist}/assets/shaderlab-B7qAK45m.js +0 -0
- /package/{dist → client/dist}/assets/shellscript-atvbtKCR.js +0 -0
- /package/{dist → client/dist}/assets/shellsession-C_rIy8kc.js +0 -0
- /package/{dist → client/dist}/assets/slack-dark-BthQWCQV.js +0 -0
- /package/{dist → client/dist}/assets/slack-ochin-DqwNpetd.js +0 -0
- /package/{dist → client/dist}/assets/smalltalk-DkLiglaE.js +0 -0
- /package/{dist → client/dist}/assets/snazzy-light-Bw305WKR.js +0 -0
- /package/{dist → client/dist}/assets/solarized-dark-DXbdFlpD.js +0 -0
- /package/{dist → client/dist}/assets/solarized-light-L9t79GZl.js +0 -0
- /package/{dist → client/dist}/assets/solidity-C1w2a3ep.js +0 -0
- /package/{dist → client/dist}/assets/soy-C-lX7w71.js +0 -0
- /package/{dist → client/dist}/assets/sparql-bYkjHRlG.js +0 -0
- /package/{dist → client/dist}/assets/splunk-Cf8iN4DR.js +0 -0
- /package/{dist → client/dist}/assets/sql-COK4E0Yg.js +0 -0
- /package/{dist → client/dist}/assets/ssh-config-BknIz3MU.js +0 -0
- /package/{dist → client/dist}/assets/stata-DorPZHa4.js +0 -0
- /package/{dist → client/dist}/assets/stylus-BeQkCIfX.js +0 -0
- /package/{dist → client/dist}/assets/svelte-MSaWC3Je.js +0 -0
- /package/{dist → client/dist}/assets/synthwave-84-CbfX1IO0.js +0 -0
- /package/{dist → client/dist}/assets/system-verilog-C7L56vO4.js +0 -0
- /package/{dist → client/dist}/assets/systemd-CUnW07Te.js +0 -0
- /package/{dist → client/dist}/assets/talonscript-C1XDQQGZ.js +0 -0
- /package/{dist → client/dist}/assets/tasl-CQjiPCtT.js +0 -0
- /package/{dist → client/dist}/assets/tcl-DQ1-QYvQ.js +0 -0
- /package/{dist → client/dist}/assets/templ-dwX3ZSMB.js +0 -0
- /package/{dist → client/dist}/assets/terraform-BbSNqyBO.js +0 -0
- /package/{dist → client/dist}/assets/tex-rYs2v40G.js +0 -0
- /package/{dist → client/dist}/assets/tokyo-night-DBQeEorK.js +0 -0
- /package/{dist → client/dist}/assets/toml-CB2ApiWb.js +0 -0
- /package/{dist → client/dist}/assets/ts-tags-CipyTH0X.js +0 -0
- /package/{dist → client/dist}/assets/tsv-B_m7g4N7.js +0 -0
- /package/{dist → client/dist}/assets/tsx-B6W0miNI.js +0 -0
- /package/{dist → client/dist}/assets/turtle-BMR_PYu6.js +0 -0
- /package/{dist → client/dist}/assets/twig-NC5TFiHP.js +0 -0
- /package/{dist → client/dist}/assets/typescript-Dj6nwHGl.js +0 -0
- /package/{dist → client/dist}/assets/typespec-BpWG_bgh.js +0 -0
- /package/{dist → client/dist}/assets/typst-BVUVsWT6.js +0 -0
- /package/{dist → client/dist}/assets/v-CAQ2eGtk.js +0 -0
- /package/{dist → client/dist}/assets/vala-BFOHcciG.js +0 -0
- /package/{dist → client/dist}/assets/vb-CdO5JTpU.js +0 -0
- /package/{dist → client/dist}/assets/verilog-CJaU5se_.js +0 -0
- /package/{dist → client/dist}/assets/vesper-BEBZ7ncR.js +0 -0
- /package/{dist → client/dist}/assets/vhdl-DYoNaHQp.js +0 -0
- /package/{dist → client/dist}/assets/viml-m4uW47V2.js +0 -0
- /package/{dist → client/dist}/assets/vitesse-black-Bkuqu6BP.js +0 -0
- /package/{dist → client/dist}/assets/vitesse-dark-D0r3Knsf.js +0 -0
- /package/{dist → client/dist}/assets/vitesse-light-CVO1_9PV.js +0 -0
- /package/{dist → client/dist}/assets/vue-BuYVFjOK.js +0 -0
- /package/{dist → client/dist}/assets/vue-html-xdeiXROB.js +0 -0
- /package/{dist → client/dist}/assets/vyper-nyqBNV6O.js +0 -0
- /package/{dist → client/dist}/assets/wasm-C6j12Q_x.js +0 -0
- /package/{dist → client/dist}/assets/wasm-CG6Dc4jp.js +0 -0
- /package/{dist → client/dist}/assets/wenyan-7A4Fjokl.js +0 -0
- /package/{dist → client/dist}/assets/wgsl-CB0Krxn9.js +0 -0
- /package/{dist → client/dist}/assets/wikitext-DCE3LsBG.js +0 -0
- /package/{dist → client/dist}/assets/wolfram-C3FkfJm5.js +0 -0
- /package/{dist → client/dist}/assets/xml-e3z08dGr.js +0 -0
- /package/{dist → client/dist}/assets/xsl-Dd0NUgwM.js +0 -0
- /package/{dist → client/dist}/assets/yaml-CVw76BM1.js +0 -0
- /package/{dist → client/dist}/assets/zenscript-HnGAYVZD.js +0 -0
- /package/{dist → client/dist}/assets/zig-BVz_zdnA.js +0 -0
- /package/{dist → client/dist}/favicon.ico +0 -0
|
@@ -5,8 +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-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-CgcMqFX2.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-C4F8qLwg.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intlayer-editor",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
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": [
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"type": "module",
|
|
35
35
|
"exports": {
|
|
36
36
|
".": {
|
|
37
|
-
"types": "./
|
|
38
|
-
"import": "./
|
|
39
|
-
"require": "./
|
|
37
|
+
"types": "./server/dist/export.d.ts",
|
|
38
|
+
"import": "./server/dist/export.mjs",
|
|
39
|
+
"require": "./server/dist/export.cjs"
|
|
40
40
|
},
|
|
41
41
|
"./package.json": "./package.json"
|
|
42
42
|
},
|
|
@@ -54,26 +54,35 @@
|
|
|
54
54
|
"intlayer-editor": "./bin/intlayer-editor.mjs"
|
|
55
55
|
},
|
|
56
56
|
"files": [
|
|
57
|
-
"./dist",
|
|
57
|
+
"./client/dist",
|
|
58
|
+
"./server/dist",
|
|
58
59
|
"./bin",
|
|
59
60
|
"./package.json"
|
|
60
61
|
],
|
|
61
62
|
"dependencies": {
|
|
63
|
+
"compression": "^1.7.5",
|
|
64
|
+
"cookie-parser": "^1.4.7",
|
|
65
|
+
"cors": "^2.8.5",
|
|
66
|
+
"express": "^5.0.1",
|
|
62
67
|
"framer-motion": "^11.18.0",
|
|
68
|
+
"helmet": "^8.0.0",
|
|
63
69
|
"lucide-react": "^0.471.1",
|
|
70
|
+
"mime": "^4.0.6",
|
|
64
71
|
"react": "^18.3.1",
|
|
65
72
|
"react-dom": "^18.3.1",
|
|
66
73
|
"react-router-dom": "^7.1.1",
|
|
67
|
-
"
|
|
68
|
-
"@intlayer/
|
|
69
|
-
"@intlayer/editor-react": "4.0
|
|
70
|
-
"@intlayer/
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"@intlayer/
|
|
74
|
-
"vite-intlayer": "^4.0
|
|
74
|
+
"@intlayer/core": "4.1.0",
|
|
75
|
+
"@intlayer/api": "4.1.0",
|
|
76
|
+
"@intlayer/editor-react": "4.1.0",
|
|
77
|
+
"@intlayer/design-system": "4.1.0",
|
|
78
|
+
"react-intlayer": "^4.1.0",
|
|
79
|
+
"@intlayer/editor": "4.1.0",
|
|
80
|
+
"@intlayer/config": "4.1.0",
|
|
81
|
+
"vite-intlayer": "^4.1.0"
|
|
75
82
|
},
|
|
76
83
|
"devDependencies": {
|
|
84
|
+
"@types/cors": "^2.8.17",
|
|
85
|
+
"@types/express": "^5.0.0",
|
|
77
86
|
"@types/react": "^18.3.18",
|
|
78
87
|
"@types/react-dom": "^18.3.5",
|
|
79
88
|
"@vitejs/plugin-react": "^4.3.4",
|
|
@@ -84,24 +93,30 @@
|
|
|
84
93
|
"globals": "^15.14.0",
|
|
85
94
|
"postcss": "^8.5.1",
|
|
86
95
|
"tailwindcss": "^3.4.17",
|
|
96
|
+
"tsup": "^8.3.5",
|
|
87
97
|
"typescript": "~5.6.2",
|
|
88
98
|
"typescript-eslint": "^8.18.2",
|
|
89
|
-
"vite": "^6.0.
|
|
99
|
+
"vite": "^6.0.7",
|
|
100
|
+
"vitest": "^2.1.8",
|
|
101
|
+
"@intlayer/backend": "4.1.0"
|
|
90
102
|
},
|
|
91
103
|
"peerDependencies": {
|
|
104
|
+
"@types/compression": "^1.7.5",
|
|
105
|
+
"@types/cookie-parser": "^1.4.8",
|
|
92
106
|
"clsx": "^2.1.1",
|
|
93
107
|
"framer-motion": "^11.18.0",
|
|
94
108
|
"react": ">=16.0.0",
|
|
95
109
|
"react-dom": ">=16.0.0",
|
|
96
110
|
"react-router-dom": ">=6.0.0",
|
|
97
111
|
"tailwind-merge": "^2.6.0",
|
|
98
|
-
"@intlayer/config": "4.0
|
|
99
|
-
"@intlayer/
|
|
100
|
-
"@intlayer/editor
|
|
101
|
-
"
|
|
102
|
-
"intlayer": "4.0
|
|
103
|
-
"@intlayer/design-system": "4.0
|
|
104
|
-
"
|
|
112
|
+
"@intlayer/config": "4.1.0",
|
|
113
|
+
"@intlayer/editor-react": "4.1.0",
|
|
114
|
+
"@intlayer/editor": "4.1.0",
|
|
115
|
+
"intlayer": "4.1.0",
|
|
116
|
+
"react-intlayer": "^4.1.0",
|
|
117
|
+
"@intlayer/design-system": "4.1.0",
|
|
118
|
+
"@intlayer/core": "4.1.0",
|
|
119
|
+
"vite-intlayer": "^4.1.0"
|
|
105
120
|
},
|
|
106
121
|
"engines": {
|
|
107
122
|
"node": ">=14.18"
|
|
@@ -110,10 +125,13 @@
|
|
|
110
125
|
"url": "https://github.com/aymericzip/intlayer/issues"
|
|
111
126
|
},
|
|
112
127
|
"scripts": {
|
|
113
|
-
"build": "
|
|
114
|
-
"
|
|
128
|
+
"build": "pnpm build:client && pnpm build:server",
|
|
129
|
+
"build:client": "vite build --config ./client/vite.config.ts",
|
|
130
|
+
"build:server": "tsup 'server/src/**/*.ts' --out-dir server/dist --config ./server/tsup.config.ts --tsconfig ./server/tsconfig.json",
|
|
131
|
+
"dev:client": "vite dev --config ./client/vite.config.ts",
|
|
132
|
+
"dev:server": "node --import=tsx --watch ./server/src/index.ts",
|
|
115
133
|
"lint": "eslint .",
|
|
116
|
-
"preview": "vite preview",
|
|
117
|
-
"start": "
|
|
134
|
+
"preview": "vite preview --config ./client/vite.config.ts",
|
|
135
|
+
"start": "NODE_ENV=production node --import=tsx server/dist/index.mjs"
|
|
118
136
|
}
|
|
119
137
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var configuration_controller_exports = {};
|
|
20
|
+
__export(configuration_controller_exports, {
|
|
21
|
+
getConfiguration: () => getConfiguration
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(configuration_controller_exports);
|
|
24
|
+
var import_config = require("@intlayer/config");
|
|
25
|
+
var import_responseData = require('./../utils/responseData.cjs');
|
|
26
|
+
const getConfiguration = async (req, res, _next) => {
|
|
27
|
+
try {
|
|
28
|
+
const config = (0, import_config.getConfiguration)();
|
|
29
|
+
const formattedResponse = (0, import_responseData.formatResponse)({
|
|
30
|
+
data: config
|
|
31
|
+
});
|
|
32
|
+
res.json(formattedResponse);
|
|
33
|
+
return;
|
|
34
|
+
} catch (err) {
|
|
35
|
+
const errorMessage = err ?? "Internal Server Error";
|
|
36
|
+
const formattedErrorResponse = (0, import_responseData.formatResponse)({
|
|
37
|
+
error: {
|
|
38
|
+
message: errorMessage.message ?? "Internal Server Error",
|
|
39
|
+
code: "INTERNAL_SERVER_ERROR",
|
|
40
|
+
title: "Internal Server Error"
|
|
41
|
+
},
|
|
42
|
+
status: errorMessage.status ?? 500
|
|
43
|
+
});
|
|
44
|
+
res.json(formattedErrorResponse);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
+
0 && (module.exports = {
|
|
50
|
+
getConfiguration
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=configuration.controller.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/controllers/configuration.controller.ts"],"sourcesContent":["import {\n getConfiguration as getApplicationConfiguration,\n IntlayerConfig,\n} from '@intlayer/config';\nimport { formatResponse, ResponseData } from '@utils/responseData';\nimport type { NextFunction, Request, Response } from 'express';\n\nexport type GetConfigurationResult = ResponseData<IntlayerConfig>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getConfiguration = async (\n req: Request,\n res: Response<GetConfigurationResult>,\n _next: NextFunction\n): Promise<void> => {\n try {\n const config = getApplicationConfiguration();\n\n const formattedResponse = formatResponse<IntlayerConfig>({\n data: config,\n });\n\n res.json(formattedResponse);\n return;\n } catch (err) {\n const errorMessage =\n (err as { message?: string; status?: number }) ?? 'Internal Server Error';\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 res.json(formattedErrorResponse);\n return;\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAGO;AACP,0BAA6C;AAQtC,MAAM,mBAAmB,OAC9B,KACA,KACA,UACkB;AAClB,MAAI;AACF,UAAM,aAAS,cAAAA,kBAA4B;AAE3C,UAAM,wBAAoB,oCAA+B;AAAA,MACvD,MAAM;AAAA,IACR,CAAC;AAED,QAAI,KAAK,iBAAiB;AAC1B;AAAA,EACF,SAAS,KAAK;AACZ,UAAM,eACH,OAAiD;AAEpD,UAAM,6BAAyB,oCAA+B;AAAA,MAC5D,OAAO;AAAA,QACL,SAAS,aAAa,WAAW;AAAA,QACjC,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MACA,QAAQ,aAAa,UAAU;AAAA,IACjC,CAAC;AAED,QAAI,KAAK,sBAAsB;AAC/B;AAAA,EACF;AACF;","names":["getApplicationConfiguration"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getConfiguration as getApplicationConfiguration
|
|
3
|
+
} from "@intlayer/config";
|
|
4
|
+
import { formatResponse } from "./../utils/responseData.mjs";
|
|
5
|
+
const getConfiguration = async (req, res, _next) => {
|
|
6
|
+
try {
|
|
7
|
+
const config = getApplicationConfiguration();
|
|
8
|
+
const formattedResponse = formatResponse({
|
|
9
|
+
data: config
|
|
10
|
+
});
|
|
11
|
+
res.json(formattedResponse);
|
|
12
|
+
return;
|
|
13
|
+
} catch (err) {
|
|
14
|
+
const errorMessage = err ?? "Internal Server Error";
|
|
15
|
+
const formattedErrorResponse = formatResponse({
|
|
16
|
+
error: {
|
|
17
|
+
message: errorMessage.message ?? "Internal Server Error",
|
|
18
|
+
code: "INTERNAL_SERVER_ERROR",
|
|
19
|
+
title: "Internal Server Error"
|
|
20
|
+
},
|
|
21
|
+
status: errorMessage.status ?? 500
|
|
22
|
+
});
|
|
23
|
+
res.json(formattedErrorResponse);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
getConfiguration
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=configuration.controller.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/controllers/configuration.controller.ts"],"sourcesContent":["import {\n getConfiguration as getApplicationConfiguration,\n IntlayerConfig,\n} from '@intlayer/config';\nimport { formatResponse, ResponseData } from '@utils/responseData';\nimport type { NextFunction, Request, Response } from 'express';\n\nexport type GetConfigurationResult = ResponseData<IntlayerConfig>;\n\n/**\n * Get the Intlayer configuration\n */\nexport const getConfiguration = async (\n req: Request,\n res: Response<GetConfigurationResult>,\n _next: NextFunction\n): Promise<void> => {\n try {\n const config = getApplicationConfiguration();\n\n const formattedResponse = formatResponse<IntlayerConfig>({\n data: config,\n });\n\n res.json(formattedResponse);\n return;\n } catch (err) {\n const errorMessage =\n (err as { message?: string; status?: number }) ?? 'Internal Server Error';\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 res.json(formattedErrorResponse);\n return;\n }\n};\n"],"mappings":"AAAA;AAAA,EACE,oBAAoB;AAAA,OAEf;AACP,SAAS,sBAAoC;AAQtC,MAAM,mBAAmB,OAC9B,KACA,KACA,UACkB;AAClB,MAAI;AACF,UAAM,SAAS,4BAA4B;AAE3C,UAAM,oBAAoB,eAA+B;AAAA,MACvD,MAAM;AAAA,IACR,CAAC;AAED,QAAI,KAAK,iBAAiB;AAC1B;AAAA,EACF,SAAS,KAAK;AACZ,UAAM,eACH,OAAiD;AAEpD,UAAM,yBAAyB,eAA+B;AAAA,MAC5D,OAAO;AAAA,QACL,SAAS,aAAa,WAAW;AAAA,QACjC,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MACA,QAAQ,aAAa,UAAU;AAAA,IACjC,CAAC;AAED,QAAI,KAAK,sBAAsB;AAC/B;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var dictionary_controller_exports = {};
|
|
20
|
+
__export(dictionary_controller_exports, {
|
|
21
|
+
writeContentDeclaration: () => writeContentDeclaration
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(dictionary_controller_exports);
|
|
24
|
+
var import_config = require("@intlayer/config");
|
|
25
|
+
var import_server = require("@intlayer/editor/server");
|
|
26
|
+
var import_responseData = require('./../utils/responseData.cjs');
|
|
27
|
+
const writeContentDeclaration = async (req, res, _next) => {
|
|
28
|
+
const dictionaryData = req.body;
|
|
29
|
+
const config = (0, import_config.getConfiguration)();
|
|
30
|
+
try {
|
|
31
|
+
const result = await (0, import_server.writeContentDeclaration)(dictionaryData, config);
|
|
32
|
+
const formattedResponse = (0, import_responseData.formatResponse)(
|
|
33
|
+
{
|
|
34
|
+
data: result
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
res.json(formattedResponse);
|
|
38
|
+
return;
|
|
39
|
+
} catch (err) {
|
|
40
|
+
const errorMessage = err ?? "Internal Server Error";
|
|
41
|
+
const formattedErrorResponse = (0, import_responseData.formatResponse)({
|
|
42
|
+
error: {
|
|
43
|
+
message: errorMessage.message ?? "Internal Server Error",
|
|
44
|
+
code: "INTERNAL_SERVER_ERROR",
|
|
45
|
+
title: "Internal Server Error"
|
|
46
|
+
},
|
|
47
|
+
status: errorMessage.status ?? 500
|
|
48
|
+
});
|
|
49
|
+
res.json(formattedErrorResponse);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
54
|
+
0 && (module.exports = {
|
|
55
|
+
writeContentDeclaration
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=dictionary.controller.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/controllers/dictionary.controller.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { getConfiguration } from '@intlayer/config';\nimport { type Dictionary } from '@intlayer/core';\nimport { DictionaryStatus } from '@intlayer/editor';\nimport { writeContentDeclaration as writeContentDeclarationEditor } from '@intlayer/editor/server';\nimport { formatResponse, ResponseData } from '@utils/responseData';\nimport type { NextFunction, Request, Response } from 'express';\n\nexport type WriteContentDeclarationBody = 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: Request<any, any, WriteContentDeclarationBody>,\n res: Response<WriteContentDeclarationResult>,\n _next: NextFunction\n): Promise<void> => {\n const dictionaryData = req.body;\n\n const config = getConfiguration();\n\n try {\n const result = await writeContentDeclarationEditor(dictionaryData, config);\n\n const formattedResponse = formatResponse<WriteContentDeclarationResultData>(\n {\n data: result,\n }\n );\n\n res.json(formattedResponse);\n return;\n } catch (err) {\n const errorMessage =\n (err as { message?: string; status?: number }) ?? 'Internal Server Error';\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 res.json(formattedErrorResponse);\n return;\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAiC;AAGjC,oBAAyE;AACzE,0BAA6C;AActC,MAAM,0BAA0B,OACrC,KACA,KACA,UACkB;AAClB,QAAM,iBAAiB,IAAI;AAE3B,QAAM,aAAS,gCAAiB;AAEhC,MAAI;AACF,UAAM,SAAS,UAAM,cAAAA,yBAA8B,gBAAgB,MAAM;AAEzE,UAAM,wBAAoB;AAAA,MACxB;AAAA,QACE,MAAM;AAAA,MACR;AAAA,IACF;AAEA,QAAI,KAAK,iBAAiB;AAC1B;AAAA,EACF,SAAS,KAAK;AACZ,UAAM,eACH,OAAiD;AAEpD,UAAM,6BACJ,oCAAkD;AAAA,MAChD,OAAO;AAAA,QACL,SAAS,aAAa,WAAW;AAAA,QACjC,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MACA,QAAQ,aAAa,UAAU;AAAA,IACjC,CAAC;AAEH,QAAI,KAAK,sBAAsB;AAC/B;AAAA,EACF;AACF;","names":["writeContentDeclarationEditor"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { getConfiguration } from "@intlayer/config";
|
|
2
|
+
import { writeContentDeclaration as writeContentDeclarationEditor } from "@intlayer/editor/server";
|
|
3
|
+
import { formatResponse } from "./../utils/responseData.mjs";
|
|
4
|
+
const writeContentDeclaration = async (req, res, _next) => {
|
|
5
|
+
const dictionaryData = req.body;
|
|
6
|
+
const config = getConfiguration();
|
|
7
|
+
try {
|
|
8
|
+
const result = await writeContentDeclarationEditor(dictionaryData, config);
|
|
9
|
+
const formattedResponse = formatResponse(
|
|
10
|
+
{
|
|
11
|
+
data: result
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
res.json(formattedResponse);
|
|
15
|
+
return;
|
|
16
|
+
} catch (err) {
|
|
17
|
+
const errorMessage = err ?? "Internal Server Error";
|
|
18
|
+
const formattedErrorResponse = formatResponse({
|
|
19
|
+
error: {
|
|
20
|
+
message: errorMessage.message ?? "Internal Server Error",
|
|
21
|
+
code: "INTERNAL_SERVER_ERROR",
|
|
22
|
+
title: "Internal Server Error"
|
|
23
|
+
},
|
|
24
|
+
status: errorMessage.status ?? 500
|
|
25
|
+
});
|
|
26
|
+
res.json(formattedErrorResponse);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
writeContentDeclaration
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=dictionary.controller.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/controllers/dictionary.controller.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { getConfiguration } from '@intlayer/config';\nimport { type Dictionary } from '@intlayer/core';\nimport { DictionaryStatus } from '@intlayer/editor';\nimport { writeContentDeclaration as writeContentDeclarationEditor } from '@intlayer/editor/server';\nimport { formatResponse, ResponseData } from '@utils/responseData';\nimport type { NextFunction, Request, Response } from 'express';\n\nexport type WriteContentDeclarationBody = 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: Request<any, any, WriteContentDeclarationBody>,\n res: Response<WriteContentDeclarationResult>,\n _next: NextFunction\n): Promise<void> => {\n const dictionaryData = req.body;\n\n const config = getConfiguration();\n\n try {\n const result = await writeContentDeclarationEditor(dictionaryData, config);\n\n const formattedResponse = formatResponse<WriteContentDeclarationResultData>(\n {\n data: result,\n }\n );\n\n res.json(formattedResponse);\n return;\n } catch (err) {\n const errorMessage =\n (err as { message?: string; status?: number }) ?? 'Internal Server Error';\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 res.json(formattedErrorResponse);\n return;\n }\n};\n"],"mappings":"AACA,SAAS,wBAAwB;AAGjC,SAAS,2BAA2B,qCAAqC;AACzE,SAAS,sBAAoC;AActC,MAAM,0BAA0B,OACrC,KACA,KACA,UACkB;AAClB,QAAM,iBAAiB,IAAI;AAE3B,QAAM,SAAS,iBAAiB;AAEhC,MAAI;AACF,UAAM,SAAS,MAAM,8BAA8B,gBAAgB,MAAM;AAEzE,UAAM,oBAAoB;AAAA,MACxB;AAAA,QACE,MAAM;AAAA,MACR;AAAA,IACF;AAEA,QAAI,KAAK,iBAAiB;AAC1B;AAAA,EACF,SAAS,KAAK;AACZ,UAAM,eACH,OAAiD;AAEpD,UAAM,yBACJ,eAAkD;AAAA,MAChD,OAAO;AAAA,QACL,SAAS,aAAa,WAAW;AAAA,QACjC,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MACA,QAAQ,aAAa,UAAU;AAAA,IACjC,CAAC;AAEH,QAAI,KAAK,sBAAsB;AAC/B;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var export_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(export_exports);
|
|
18
|
+
__reExport(export_exports, require('./controllers/dictionary.controller.cjs'), module.exports);
|
|
19
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
20
|
+
0 && (module.exports = {
|
|
21
|
+
...require('./controllers/dictionary.controller.cjs')
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=export.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/export.ts"],"sourcesContent":["export * from './controllers/dictionary.controller';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAc,gDAAd;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/export.ts"],"sourcesContent":["export * from './controllers/dictionary.controller';\n"],"mappings":"AAAA,cAAc;","names":[]}
|
|
@@ -0,0 +1,77 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var import_node_fs = require("node:fs");
|
|
25
|
+
var import_node_path = __toESM(require("node:path"), 1);
|
|
26
|
+
var import_node_url = require("node:url");
|
|
27
|
+
var import_config = require("@intlayer/config");
|
|
28
|
+
var import_config2 = require('./routes/config.routes.cjs');
|
|
29
|
+
var import_dictionary = require('./routes/dictionary.routes.cjs');
|
|
30
|
+
var import_compression = __toESM(require("compression"), 1);
|
|
31
|
+
var import_cookie_parser = __toESM(require("cookie-parser"), 1);
|
|
32
|
+
var import_cors = __toESM(require("cors"), 1);
|
|
33
|
+
var import_express = __toESM(require("express"), 1);
|
|
34
|
+
var import_helmet = __toESM(require("helmet"), 1);
|
|
35
|
+
var import_mime = __toESM(require("mime"), 1);
|
|
36
|
+
const import_meta = {};
|
|
37
|
+
const app = (0, import_express.default)();
|
|
38
|
+
const FALLBACK_PORT = 8e3;
|
|
39
|
+
const config = (0, import_config.getConfiguration)();
|
|
40
|
+
const port = config.editor.port ?? FALLBACK_PORT;
|
|
41
|
+
const __dirname = (0, import_node_path.dirname)((0, import_node_url.fileURLToPath)(import_meta.url));
|
|
42
|
+
const clientDistPath = (0, import_node_path.resolve)(__dirname, "../../client/dist");
|
|
43
|
+
const corsOptions = {
|
|
44
|
+
origin: "*",
|
|
45
|
+
credentials: true
|
|
46
|
+
};
|
|
47
|
+
const startServer = async (app2) => {
|
|
48
|
+
app2.disable("x-powered-by");
|
|
49
|
+
app2.use(
|
|
50
|
+
(0, import_helmet.default)({
|
|
51
|
+
contentSecurityPolicy: false
|
|
52
|
+
})
|
|
53
|
+
);
|
|
54
|
+
app2.use((0, import_cors.default)(corsOptions));
|
|
55
|
+
app2.use((0, import_compression.default)());
|
|
56
|
+
app2.use(import_express.default.json());
|
|
57
|
+
app2.use((0, import_cookie_parser.default)());
|
|
58
|
+
app2.use(import_express.default.urlencoded({ extended: true }));
|
|
59
|
+
app2.use("/api/dictionary", import_dictionary.dictionaryRouter);
|
|
60
|
+
app2.use("/api/config", import_config2.configurationRouter);
|
|
61
|
+
app2.use(import_express.default.static(clientDistPath));
|
|
62
|
+
app2.get(/(.*)/, (req, res) => {
|
|
63
|
+
const requestedPath = import_node_path.default.join(clientDistPath, req.url);
|
|
64
|
+
if ((0, import_node_fs.existsSync)(requestedPath) && (0, import_node_fs.lstatSync)(requestedPath).isFile()) {
|
|
65
|
+
const mimeType = import_mime.default.getType(requestedPath) ?? "application/octet-stream";
|
|
66
|
+
res.setHeader("Content-Type", mimeType);
|
|
67
|
+
res.sendFile(requestedPath);
|
|
68
|
+
} else {
|
|
69
|
+
res.sendFile((0, import_node_path.resolve)(clientDistPath, "index.html"));
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
app2.listen(port, () => {
|
|
73
|
+
console.log(`Intlayer editor running at http://localhost:${port}`);
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
startServer(app);
|
|
77
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { existsSync, lstatSync } from 'node:fs';\nimport path, { dirname, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { getConfiguration } from '@intlayer/config';\nimport { configurationRouter } from '@routes/config.routes';\nimport { dictionaryRouter } from '@routes/dictionary.routes';\nimport compression from 'compression';\nimport cookieParser from 'cookie-parser';\nimport cors, { type CorsOptions } from 'cors';\nimport express, { type Express } from 'express';\nimport helmet from 'helmet';\nimport mime from 'mime';\n\nconst app: Express = express();\n\nconst FALLBACK_PORT = 8000;\nconst config = getConfiguration();\nconst port = config.editor.port ?? FALLBACK_PORT;\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\nconst clientDistPath = resolve(__dirname, '../../client/dist');\n\nconst corsOptions: CorsOptions = {\n origin: '*',\n credentials: true,\n};\n\nconst startServer = async (app: Express) => {\n app.disable('x-powered-by'); // Disabled to prevent attackers from knowing that the app is running Express\n app.use(\n helmet({\n contentSecurityPolicy: false,\n })\n );\n\n app.use(cors(corsOptions));\n\n // Compress all HTTP responses\n app.use(compression());\n\n app.use(express.json());\n\n app.use(cookieParser());\n\n // Parse incoming requests with urlencoded payloads\n app.use(express.urlencoded({ extended: true }));\n\n app.use('/api/dictionary', dictionaryRouter);\n\n app.use('/api/config', configurationRouter);\n\n app.use(express.static(clientDistPath));\n\n // For single-page applications, redirect all unmatched routes to index.html\n app.get(/(.*)/, (req, res) => {\n const requestedPath = path.join(clientDistPath, req.url); // Full path of the requested file\n\n if (existsSync(requestedPath) && lstatSync(requestedPath).isFile()) {\n // If the requested file exists, determine its MIME type and serve it\n const mimeType =\n mime.getType(requestedPath) ?? 'application/octet-stream';\n res.setHeader('Content-Type', mimeType);\n res.sendFile(requestedPath);\n } else {\n // Otherwise, serve the index.html for React Router fallback\n res.sendFile(resolve(clientDistPath, 'index.html'));\n }\n });\n\n app.listen(port, () => {\n console.log(`Intlayer editor running at http://localhost:${port}`);\n });\n};\n\n// Start it up!\nstartServer(app);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAsC;AACtC,uBAAuC;AACvC,sBAA8B;AAC9B,oBAAiC;AACjC,IAAAA,iBAAoC;AACpC,wBAAiC;AACjC,yBAAwB;AACxB,2BAAyB;AACzB,kBAAuC;AACvC,qBAAsC;AACtC,oBAAmB;AACnB,kBAAiB;AAXjB;AAaA,MAAM,UAAe,eAAAC,SAAQ;AAE7B,MAAM,gBAAgB;AACtB,MAAM,aAAS,gCAAiB;AAChC,MAAM,OAAO,OAAO,OAAO,QAAQ;AAEnC,MAAM,gBAAY,8BAAQ,+BAAc,YAAY,GAAG,CAAC;AACxD,MAAM,qBAAiB,0BAAQ,WAAW,mBAAmB;AAE7D,MAAM,cAA2B;AAAA,EAC/B,QAAQ;AAAA,EACR,aAAa;AACf;AAEA,MAAM,cAAc,OAAOC,SAAiB;AAC1C,EAAAA,KAAI,QAAQ,cAAc;AAC1B,EAAAA,KAAI;AAAA,QACF,cAAAC,SAAO;AAAA,MACL,uBAAuB;AAAA,IACzB,CAAC;AAAA,EACH;AAEA,EAAAD,KAAI,QAAI,YAAAE,SAAK,WAAW,CAAC;AAGzB,EAAAF,KAAI,QAAI,mBAAAG,SAAY,CAAC;AAErB,EAAAH,KAAI,IAAI,eAAAD,QAAQ,KAAK,CAAC;AAEtB,EAAAC,KAAI,QAAI,qBAAAI,SAAa,CAAC;AAGtB,EAAAJ,KAAI,IAAI,eAAAD,QAAQ,WAAW,EAAE,UAAU,KAAK,CAAC,CAAC;AAE9C,EAAAC,KAAI,IAAI,mBAAmB,kCAAgB;AAE3C,EAAAA,KAAI,IAAI,eAAe,kCAAmB;AAE1C,EAAAA,KAAI,IAAI,eAAAD,QAAQ,OAAO,cAAc,CAAC;AAGtC,EAAAC,KAAI,IAAI,QAAQ,CAAC,KAAK,QAAQ;AAC5B,UAAM,gBAAgB,iBAAAK,QAAK,KAAK,gBAAgB,IAAI,GAAG;AAEvD,YAAI,2BAAW,aAAa,SAAK,0BAAU,aAAa,EAAE,OAAO,GAAG;AAElE,YAAM,WACJ,YAAAC,QAAK,QAAQ,aAAa,KAAK;AACjC,UAAI,UAAU,gBAAgB,QAAQ;AACtC,UAAI,SAAS,aAAa;AAAA,IAC5B,OAAO;AAEL,UAAI,aAAS,0BAAQ,gBAAgB,YAAY,CAAC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,EAAAN,KAAI,OAAO,MAAM,MAAM;AACrB,YAAQ,IAAI,+CAA+C,IAAI,EAAE;AAAA,EACnE,CAAC;AACH;AAGA,YAAY,GAAG;","names":["import_config","express","app","helmet","cors","compression","cookieParser","path","mime"]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { existsSync, lstatSync } from "node:fs";
|
|
2
|
+
import path, { dirname, resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { getConfiguration } from "@intlayer/config";
|
|
5
|
+
import { configurationRouter } from "./routes/config.routes.mjs";
|
|
6
|
+
import { dictionaryRouter } from "./routes/dictionary.routes.mjs";
|
|
7
|
+
import compression from "compression";
|
|
8
|
+
import cookieParser from "cookie-parser";
|
|
9
|
+
import cors from "cors";
|
|
10
|
+
import express from "express";
|
|
11
|
+
import helmet from "helmet";
|
|
12
|
+
import mime from "mime";
|
|
13
|
+
const app = express();
|
|
14
|
+
const FALLBACK_PORT = 8e3;
|
|
15
|
+
const config = getConfiguration();
|
|
16
|
+
const port = config.editor.port ?? FALLBACK_PORT;
|
|
17
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
18
|
+
const clientDistPath = resolve(__dirname, "../../client/dist");
|
|
19
|
+
const corsOptions = {
|
|
20
|
+
origin: "*",
|
|
21
|
+
credentials: true
|
|
22
|
+
};
|
|
23
|
+
const startServer = async (app2) => {
|
|
24
|
+
app2.disable("x-powered-by");
|
|
25
|
+
app2.use(
|
|
26
|
+
helmet({
|
|
27
|
+
contentSecurityPolicy: false
|
|
28
|
+
})
|
|
29
|
+
);
|
|
30
|
+
app2.use(cors(corsOptions));
|
|
31
|
+
app2.use(compression());
|
|
32
|
+
app2.use(express.json());
|
|
33
|
+
app2.use(cookieParser());
|
|
34
|
+
app2.use(express.urlencoded({ extended: true }));
|
|
35
|
+
app2.use("/api/dictionary", dictionaryRouter);
|
|
36
|
+
app2.use("/api/config", configurationRouter);
|
|
37
|
+
app2.use(express.static(clientDistPath));
|
|
38
|
+
app2.get(/(.*)/, (req, res) => {
|
|
39
|
+
const requestedPath = path.join(clientDistPath, req.url);
|
|
40
|
+
if (existsSync(requestedPath) && lstatSync(requestedPath).isFile()) {
|
|
41
|
+
const mimeType = mime.getType(requestedPath) ?? "application/octet-stream";
|
|
42
|
+
res.setHeader("Content-Type", mimeType);
|
|
43
|
+
res.sendFile(requestedPath);
|
|
44
|
+
} else {
|
|
45
|
+
res.sendFile(resolve(clientDistPath, "index.html"));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
app2.listen(port, () => {
|
|
49
|
+
console.log(`Intlayer editor running at http://localhost:${port}`);
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
startServer(app);
|
|
53
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { existsSync, lstatSync } from 'node:fs';\nimport path, { dirname, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { getConfiguration } from '@intlayer/config';\nimport { configurationRouter } from '@routes/config.routes';\nimport { dictionaryRouter } from '@routes/dictionary.routes';\nimport compression from 'compression';\nimport cookieParser from 'cookie-parser';\nimport cors, { type CorsOptions } from 'cors';\nimport express, { type Express } from 'express';\nimport helmet from 'helmet';\nimport mime from 'mime';\n\nconst app: Express = express();\n\nconst FALLBACK_PORT = 8000;\nconst config = getConfiguration();\nconst port = config.editor.port ?? FALLBACK_PORT;\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\nconst clientDistPath = resolve(__dirname, '../../client/dist');\n\nconst corsOptions: CorsOptions = {\n origin: '*',\n credentials: true,\n};\n\nconst startServer = async (app: Express) => {\n app.disable('x-powered-by'); // Disabled to prevent attackers from knowing that the app is running Express\n app.use(\n helmet({\n contentSecurityPolicy: false,\n })\n );\n\n app.use(cors(corsOptions));\n\n // Compress all HTTP responses\n app.use(compression());\n\n app.use(express.json());\n\n app.use(cookieParser());\n\n // Parse incoming requests with urlencoded payloads\n app.use(express.urlencoded({ extended: true }));\n\n app.use('/api/dictionary', dictionaryRouter);\n\n app.use('/api/config', configurationRouter);\n\n app.use(express.static(clientDistPath));\n\n // For single-page applications, redirect all unmatched routes to index.html\n app.get(/(.*)/, (req, res) => {\n const requestedPath = path.join(clientDistPath, req.url); // Full path of the requested file\n\n if (existsSync(requestedPath) && lstatSync(requestedPath).isFile()) {\n // If the requested file exists, determine its MIME type and serve it\n const mimeType =\n mime.getType(requestedPath) ?? 'application/octet-stream';\n res.setHeader('Content-Type', mimeType);\n res.sendFile(requestedPath);\n } else {\n // Otherwise, serve the index.html for React Router fallback\n res.sendFile(resolve(clientDistPath, 'index.html'));\n }\n });\n\n app.listen(port, () => {\n console.log(`Intlayer editor running at http://localhost:${port}`);\n });\n};\n\n// Start it up!\nstartServer(app);\n"],"mappings":"AAAA,SAAS,YAAY,iBAAiB;AACtC,OAAO,QAAQ,SAAS,eAAe;AACvC,SAAS,qBAAqB;AAC9B,SAAS,wBAAwB;AACjC,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,OAAO,iBAAiB;AACxB,OAAO,kBAAkB;AACzB,OAAO,UAAgC;AACvC,OAAO,aAA+B;AACtC,OAAO,YAAY;AACnB,OAAO,UAAU;AAEjB,MAAM,MAAe,QAAQ;AAE7B,MAAM,gBAAgB;AACtB,MAAM,SAAS,iBAAiB;AAChC,MAAM,OAAO,OAAO,OAAO,QAAQ;AAEnC,MAAM,YAAY,QAAQ,cAAc,YAAY,GAAG,CAAC;AACxD,MAAM,iBAAiB,QAAQ,WAAW,mBAAmB;AAE7D,MAAM,cAA2B;AAAA,EAC/B,QAAQ;AAAA,EACR,aAAa;AACf;AAEA,MAAM,cAAc,OAAOA,SAAiB;AAC1C,EAAAA,KAAI,QAAQ,cAAc;AAC1B,EAAAA,KAAI;AAAA,IACF,OAAO;AAAA,MACL,uBAAuB;AAAA,IACzB,CAAC;AAAA,EACH;AAEA,EAAAA,KAAI,IAAI,KAAK,WAAW,CAAC;AAGzB,EAAAA,KAAI,IAAI,YAAY,CAAC;AAErB,EAAAA,KAAI,IAAI,QAAQ,KAAK,CAAC;AAEtB,EAAAA,KAAI,IAAI,aAAa,CAAC;AAGtB,EAAAA,KAAI,IAAI,QAAQ,WAAW,EAAE,UAAU,KAAK,CAAC,CAAC;AAE9C,EAAAA,KAAI,IAAI,mBAAmB,gBAAgB;AAE3C,EAAAA,KAAI,IAAI,eAAe,mBAAmB;AAE1C,EAAAA,KAAI,IAAI,QAAQ,OAAO,cAAc,CAAC;AAGtC,EAAAA,KAAI,IAAI,QAAQ,CAAC,KAAK,QAAQ;AAC5B,UAAM,gBAAgB,KAAK,KAAK,gBAAgB,IAAI,GAAG;AAEvD,QAAI,WAAW,aAAa,KAAK,UAAU,aAAa,EAAE,OAAO,GAAG;AAElE,YAAM,WACJ,KAAK,QAAQ,aAAa,KAAK;AACjC,UAAI,UAAU,gBAAgB,QAAQ;AACtC,UAAI,SAAS,aAAa;AAAA,IAC5B,OAAO;AAEL,UAAI,SAAS,QAAQ,gBAAgB,YAAY,CAAC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,EAAAA,KAAI,OAAO,MAAM,MAAM;AACrB,YAAQ,IAAI,+CAA+C,IAAI,EAAE;AAAA,EACnE,CAAC;AACH;AAGA,YAAY,GAAG;","names":["app"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
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 config_routes_exports = {};
|
|
30
|
+
__export(config_routes_exports, {
|
|
31
|
+
configurationRouter: () => configurationRouter,
|
|
32
|
+
configurationRoutes: () => configurationRoutes
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(config_routes_exports);
|
|
35
|
+
var configurationController = __toESM(require('./../controllers/configuration.controller.cjs'), 1);
|
|
36
|
+
var import_client = require("@intlayer/config/client");
|
|
37
|
+
var import_express = require("express");
|
|
38
|
+
const configurationRouter = (0, import_express.Router)();
|
|
39
|
+
const { editor } = (0, import_client.getConfiguration)();
|
|
40
|
+
const baseURL = `${editor.applicationURL}/api/dictionary`;
|
|
41
|
+
const configurationRoutes = {
|
|
42
|
+
getConfiguration: {
|
|
43
|
+
urlModel: "/",
|
|
44
|
+
url: baseURL,
|
|
45
|
+
method: "GET"
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
configurationRouter.get(
|
|
49
|
+
configurationRoutes.getConfiguration.urlModel,
|
|
50
|
+
configurationController.getConfiguration
|
|
51
|
+
);
|
|
52
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
53
|
+
0 && (module.exports = {
|
|
54
|
+
configurationRouter,
|
|
55
|
+
configurationRoutes
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=config.routes.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/routes/config.routes.ts"],"sourcesContent":["import * as configurationController from '@controllers/configuration.controller';\nimport { getConfiguration } from '@intlayer/config/client';\nimport { Router } from 'express';\nimport { Routes } from '@/types/Routes';\n\nexport const configurationRouter: Router = Router();\n\nconst { editor } = getConfiguration();\n\nconst baseURL = `${editor.applicationURL}/api/dictionary`;\n\nexport const configurationRoutes = {\n getConfiguration: {\n urlModel: '/',\n url: baseURL,\n method: 'GET',\n },\n} satisfies Routes;\n\nconfigurationRouter.get(\n configurationRoutes.getConfiguration.urlModel,\n configurationController.getConfiguration\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAyC;AACzC,oBAAiC;AACjC,qBAAuB;AAGhB,MAAM,0BAA8B,uBAAO;AAElD,MAAM,EAAE,OAAO,QAAI,gCAAiB;AAEpC,MAAM,UAAU,GAAG,OAAO,cAAc;AAEjC,MAAM,sBAAsB;AAAA,EACjC,kBAAkB;AAAA,IAChB,UAAU;AAAA,IACV,KAAK;AAAA,IACL,QAAQ;AAAA,EACV;AACF;AAEA,oBAAoB;AAAA,EAClB,oBAAoB,iBAAiB;AAAA,EACrC,wBAAwB;AAC1B;","names":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as configurationController from "./../controllers/configuration.controller.mjs";
|
|
2
|
+
import { getConfiguration } from "@intlayer/config/client";
|
|
3
|
+
import { Router } from "express";
|
|
4
|
+
const configurationRouter = Router();
|
|
5
|
+
const { editor } = getConfiguration();
|
|
6
|
+
const baseURL = `${editor.applicationURL}/api/dictionary`;
|
|
7
|
+
const configurationRoutes = {
|
|
8
|
+
getConfiguration: {
|
|
9
|
+
urlModel: "/",
|
|
10
|
+
url: baseURL,
|
|
11
|
+
method: "GET"
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
configurationRouter.get(
|
|
15
|
+
configurationRoutes.getConfiguration.urlModel,
|
|
16
|
+
configurationController.getConfiguration
|
|
17
|
+
);
|
|
18
|
+
export {
|
|
19
|
+
configurationRouter,
|
|
20
|
+
configurationRoutes
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=config.routes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/routes/config.routes.ts"],"sourcesContent":["import * as configurationController from '@controllers/configuration.controller';\nimport { getConfiguration } from '@intlayer/config/client';\nimport { Router } from 'express';\nimport { Routes } from '@/types/Routes';\n\nexport const configurationRouter: Router = Router();\n\nconst { editor } = getConfiguration();\n\nconst baseURL = `${editor.applicationURL}/api/dictionary`;\n\nexport const configurationRoutes = {\n getConfiguration: {\n urlModel: '/',\n url: baseURL,\n method: 'GET',\n },\n} satisfies Routes;\n\nconfigurationRouter.get(\n configurationRoutes.getConfiguration.urlModel,\n configurationController.getConfiguration\n);\n"],"mappings":"AAAA,YAAY,6BAA6B;AACzC,SAAS,wBAAwB;AACjC,SAAS,cAAc;AAGhB,MAAM,sBAA8B,OAAO;AAElD,MAAM,EAAE,OAAO,IAAI,iBAAiB;AAEpC,MAAM,UAAU,GAAG,OAAO,cAAc;AAEjC,MAAM,sBAAsB;AAAA,EACjC,kBAAkB;AAAA,IAChB,UAAU;AAAA,IACV,KAAK;AAAA,IACL,QAAQ;AAAA,EACV;AACF;AAEA,oBAAoB;AAAA,EAClB,oBAAoB,iBAAiB;AAAA,EACrC,wBAAwB;AAC1B;","names":[]}
|