docs-i18n 0.9.2 → 0.11.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/admin/app/lib/auth-client.ts +21 -0
- package/admin/app/lib/auth.server.ts +62 -0
- package/admin/app/routeTree.gen.ts +21 -3
- package/admin/app/routes/index.tsx +68 -8
- package/admin/app/routes/login.tsx +207 -0
- package/admin/app/server.ts +23 -0
- package/admin/app/styles.css +146 -0
- package/admin/app/worker.ts +18 -0
- package/admin/dist/client/assets/auth-client-DqJZaFZR.js +3 -0
- package/admin/dist/client/assets/login-CQjkiBAF.js +1 -0
- package/admin/dist/client/assets/main-bc5tcdGg.js +18 -0
- package/admin/dist/client/assets/routes-CTPOG_v1.js +3 -0
- package/admin/dist/client/assets/{styles-DJ6QEJmN.css → styles-zS0BbO7e.css} +1 -1
- package/admin/dist/client/assets/useNavigate-CEOVvMjz.js +1 -0
- package/admin/dist/server/assets/{react-dom-CpO9xk_L.js → __tanstack-start-server-fn-resolver-qK0Yfvti.js} +83 -507
- package/admin/dist/server/assets/_tanstack-start-manifest_v-BgMVPPt2.js +21 -0
- package/admin/dist/server/assets/adapter-DjXlUL1J.js +2253 -0
- package/admin/dist/server/assets/auth-client-CoUpyQIM.js +807 -0
- package/admin/dist/server/assets/auth-dSAIPjBw.js +72 -0
- package/admin/dist/server/assets/auth.server-BLVDnTCZ.js +31352 -0
- package/admin/dist/server/assets/bun-sqlite-dialect-C8OaCWSL-BNNY-FoT.js +154 -0
- package/admin/dist/server/assets/compiled-query-CnFG_BVV.js +6967 -0
- package/admin/dist/server/assets/d1-sqlite-dialect-sYHNqBte-Bjz-cybU.js +115 -0
- package/admin/dist/server/assets/dist-C3-e8E2B.js +215 -0
- package/admin/dist/server/assets/dist-CUzFWZag.js +6039 -0
- package/admin/dist/server/assets/{init-DJr2glb3.js → dist-DBv71kqn.js} +21 -381
- package/admin/dist/server/assets/error-CASJ5tIm.js +457 -0
- package/admin/dist/server/assets/error-codes-BhMTGvV6.js +1153 -0
- package/admin/dist/server/assets/init-CJJUsPDL.js +49 -0
- package/admin/dist/server/assets/job-manager-D9Ab9hgu.js +179 -0
- package/admin/dist/server/assets/{jobs-bQfYqSk7.js → jobs-DrEe9YOj.js} +18 -5
- package/admin/dist/server/assets/kysely-adapter-YC8RFPyc.js +2 -0
- package/admin/dist/server/assets/login-SqzTMYOZ.js +228 -0
- package/admin/dist/server/assets/migrator-ZpVZslbq.js +2926 -0
- package/admin/dist/server/assets/{misc-DOk3t9vs.js → misc-BSoYldBT.js} +22 -9
- package/admin/dist/server/assets/{models-CBb8Owe5.js → models-CoviNHUP.js} +1 -1
- package/admin/dist/server/assets/node-sqlite-dialect-BJIaP6lL.js +154 -0
- package/admin/dist/server/assets/{router-DlU_fGDK.js → router-D-82slI-.js} +23 -11
- package/admin/dist/server/assets/{routes-BcfX6iub.js → routes-B1pNmxF3.js} +43 -29
- package/admin/dist/server/assets/{routes-pIM0fgUO.js → routes-C9huiZHw.js} +56 -22
- package/admin/dist/server/assets/sqlite-adapter-CL2EidjD.js +69 -0
- package/admin/dist/server/assets/{start-BS52hm79.js → start-BiybVoR2.js} +1 -1
- package/admin/dist/server/assets/status-B1AGLvHn.js +162 -0
- package/admin/dist/server/assets/status-D7PU72hm.js +262 -0
- package/admin/dist/server/assets/string-B4XlckmJ.js +6 -0
- package/admin/dist/server/assets/useNavigate-0H08s_Q2.js +29 -0
- package/admin/dist/server/assets/useRouter-BXJvr8to.js +508 -0
- package/admin/dist/server/server.js +70 -90
- package/admin/package.json +6 -1
- package/admin/server/functions/auth.ts +89 -0
- package/admin/server/functions/jobs.ts +30 -2
- package/admin/server/functions/misc.ts +25 -5
- package/admin/server/functions/status.ts +52 -3
- package/admin/server/index.ts +1 -1
- package/admin/server/init.ts +21 -9
- package/admin/server/services/d1-status.ts +282 -0
- package/admin/vite.config.ts +29 -15
- package/admin/wrangler.jsonc +16 -0
- package/package.json +1 -1
- package/template/app/components/markdown/Markdown.tsx +7 -1
- package/template/app/utils/docs.server.ts +37 -4
- package/template/app/worker.ts +16 -0
- package/template/content/docs-i18n/en/cli.md +9 -5
- package/template/content/docs-i18n/en/deployment.md +85 -68
- package/template/dist/client/assets/{Doc-CGhUfH9r.js → Doc-BKO69_nz.js} +1 -1
- package/template/dist/client/assets/{DocsLayout-CoPL9BM9.js → DocsLayout-BGugXxEQ.js} +1 -1
- package/template/dist/client/assets/{FileTabs-DsPkEUu7.js → FileTabs-4fZriOj4.js} +1 -1
- package/template/dist/client/assets/{Footer-4faHyha8.js → Footer-DYh1AfWA.js} +1 -1
- package/template/dist/client/assets/{FrameworkContent-Cxg_X_EP.js → FrameworkContent-rVvjxASn.js} +1 -1
- package/template/dist/client/assets/{MarkdownHeadingContext-CwDqQdSh.js → MarkdownHeadingContext-CdvUDZFU.js} +4 -4
- package/template/dist/client/assets/{PostNotFound-1ZaWdycM.js → PostNotFound-WoSYGsGu.js} +1 -1
- package/template/dist/client/assets/{_basePickBy-FbrKkfHa.js → _basePickBy-Dd7GuR7A.js} +1 -1
- package/template/dist/client/assets/{_baseUniq-g6ljCkn8.js → _baseUniq-DMxQLGFI.js} +1 -1
- package/template/dist/client/assets/_lang-3AqGszEy.js +1 -0
- package/template/dist/client/assets/_lang._project-COkrIqzH.js +1 -0
- package/template/dist/client/assets/_lang._project._version-B8vRZczu.js +1 -0
- package/template/dist/client/assets/{_lang._project._version.docs-DjZ_USgK.js → _lang._project._version.docs-DokNGgvU.js} +1 -1
- package/template/dist/client/assets/{_lang._project._version.docs._-CNb1EMFX.js → _lang._project._version.docs._-CXCNZzOb.js} +1 -1
- package/template/dist/client/assets/_lang._project._version.docs._-DR0WSQEb.js +1 -0
- package/template/dist/client/assets/_lang._project._version.docs.framework._framework._-C_Grro8r.js +1 -0
- package/template/dist/client/assets/{_lang._project._version.docs.framework._framework.index-CqyVy6eq.js → _lang._project._version.docs.framework._framework.index-DsYjXRdj.js} +1 -1
- package/template/dist/client/assets/{_lang._project._version.docs.framework.index-S3Frbfn4.js → _lang._project._version.docs.framework.index-DQX1lBi3.js} +1 -1
- package/template/dist/client/assets/{_lang._project.docs-CkmM5v1V.js → _lang._project.docs-DsYQj9jI.js} +1 -1
- package/template/dist/client/assets/_lang._project.docs._-DlM_D6DD.js +1 -0
- package/template/dist/client/assets/{_lang._project.docs._-BHYKQj_2.js → _lang._project.docs._-l2tTjx80.js} +1 -1
- package/template/dist/client/assets/_lang.blog-CEwEtalL.js +1 -0
- package/template/dist/client/assets/_lang.blog-D6YGC3tK.js +1 -0
- package/template/dist/client/assets/_lang.blog._-DgHu4oLy.js +1 -0
- package/template/dist/client/assets/{_lang.blog._-bXJwKw9E.js → _lang.blog._-Umz18sQE.js} +1 -1
- package/template/dist/client/assets/_lang.blog.index-C8LKUFtD.js +1 -0
- package/template/dist/client/assets/{_lang.blog.index-CdR5PZOo.js → _lang.blog.index-DzUqpOBE.js} +1 -1
- package/template/dist/client/assets/{_lang.docs-Cp3wmc9k.js → _lang.docs-CUh3R7DD.js} +1 -1
- package/template/dist/client/assets/{_lang.docs._-0bwIpeOn.js → _lang.docs._-DlgTPy3s.js} +1 -1
- package/template/dist/client/assets/_lang.docs._-DmaQE7lx.js +1 -0
- package/template/dist/client/assets/_lang.docs.framework._framework._-B4C4uDFp.js +1 -0
- package/template/dist/client/assets/{_lang.docs.framework._framework.index-BLgwIvQA.js → _lang.docs.framework._framework.index-DTg6Xd3p.js} +1 -1
- package/template/dist/client/assets/{_lang.docs.framework.index-CzW7Dul3.js → _lang.docs.framework.index-BQ2enasl.js} +1 -1
- package/template/dist/client/assets/{arc-B4lRpBfi.js → arc-DGPgC_QF.js} +1 -1
- package/template/dist/client/assets/{architectureDiagram-2XIMDMQ5-Coq1Gceq.js → architectureDiagram-2XIMDMQ5-yI53_GAi.js} +1 -1
- package/template/dist/client/assets/{blockDiagram-WCTKOSBZ-C7BGTzDN.js → blockDiagram-WCTKOSBZ-C3tr24zy.js} +1 -1
- package/template/dist/client/assets/{c4Diagram-IC4MRINW-xTBVTs0q.js → c4Diagram-IC4MRINW-DOA-mowm.js} +1 -1
- package/template/dist/client/assets/channel-DzZD7dUQ.js +1 -0
- package/template/dist/client/assets/{chunk-4BX2VUAB-DUUHBu75.js → chunk-4BX2VUAB-B6NSnNJJ.js} +1 -1
- package/template/dist/client/assets/{chunk-55IACEB6-MUxF_n9_.js → chunk-55IACEB6-CWYwArBH.js} +1 -1
- package/template/dist/client/assets/{chunk-FMBD7UC4-BWh6wvYo.js → chunk-FMBD7UC4-DSyn2wIW.js} +1 -1
- package/template/dist/client/assets/{chunk-JSJVCQXG-CLUdUV5u.js → chunk-JSJVCQXG-D83nm5W0.js} +1 -1
- package/template/dist/client/assets/{chunk-KX2RTZJC-CAlz_cXA.js → chunk-KX2RTZJC-DD7fN9e9.js} +1 -1
- package/template/dist/client/assets/{chunk-NQ4KR5QH-BaYKfUVy.js → chunk-NQ4KR5QH-C3YlYiU5.js} +1 -1
- package/template/dist/client/assets/{chunk-QZHKN3VN-NxDloxi5.js → chunk-QZHKN3VN-B7wBEuCG.js} +1 -1
- package/template/dist/client/assets/{chunk-WL4C6EOR-C2Ncbi5S.js → chunk-WL4C6EOR-ByA1FloT.js} +1 -1
- package/template/dist/client/assets/classDiagram-VBA2DB6C-CRozKaUD.js +1 -0
- package/template/dist/client/assets/classDiagram-v2-RAHNMMFH-CRozKaUD.js +1 -0
- package/template/dist/client/assets/clone-CGnOEl4E.js +1 -0
- package/template/dist/client/assets/{cose-bilkent-S5V4N54A-Ct9-ZJcv.js → cose-bilkent-S5V4N54A-nt_sXfWc.js} +1 -1
- package/template/dist/client/assets/{dagre-KLK3FWXG-u9dz8dcq.js → dagre-KLK3FWXG-DUsyMTPd.js} +1 -1
- package/template/dist/client/assets/{diagram-E7M64L7V-BXmcaktT.js → diagram-E7M64L7V-D5SAypX0.js} +1 -1
- package/template/dist/client/assets/{diagram-IFDJBPK2-CRlP5SeV.js → diagram-IFDJBPK2-WhP5c8Vz.js} +1 -1
- package/template/dist/client/assets/{diagram-P4PSJMXO-B9rJcj_H.js → diagram-P4PSJMXO-AMrwIlhf.js} +1 -1
- package/template/dist/client/assets/{erDiagram-INFDFZHY-DX-vee6w.js → erDiagram-INFDFZHY-BxifSpCV.js} +1 -1
- package/template/dist/client/assets/{flowDiagram-PKNHOUZH-CoBCSOFc.js → flowDiagram-PKNHOUZH-BMAowE9I.js} +1 -1
- package/template/dist/client/assets/{ganttDiagram-A5KZAMGK-BlqU_ghi.js → ganttDiagram-A5KZAMGK-Bay-0iRq.js} +1 -1
- package/template/dist/client/assets/{gitGraphDiagram-K3NZZRJ6-CntCsuti.js → gitGraphDiagram-K3NZZRJ6-Va91W3gw.js} +1 -1
- package/template/dist/client/assets/{graph-CZaxZzO8.js → graph-CbBYObK_.js} +1 -1
- package/template/dist/client/assets/{index-XelhTkgl.js → index-CF6qz2tX.js} +1 -1
- package/template/dist/client/assets/{infoDiagram-LFFYTUFH-_jCC8Jtt.js → infoDiagram-LFFYTUFH-Byd5C-4U.js} +1 -1
- package/template/dist/client/assets/{ishikawaDiagram-PHBUUO56-D3m_r2ig.js → ishikawaDiagram-PHBUUO56-DxOKnE1v.js} +1 -1
- package/template/dist/client/assets/{journeyDiagram-4ABVD52K-CvRNm03C.js → journeyDiagram-4ABVD52K-IRmt7RI4.js} +1 -1
- package/template/dist/client/assets/{kanban-definition-K7BYSVSG-nQcLuNSy.js → kanban-definition-K7BYSVSG-BjTVXn-R.js} +1 -1
- package/template/dist/client/assets/{layout-DZIdDq97.js → layout-Bbx6A0bC.js} +1 -1
- package/template/dist/client/assets/{linear-C2JcF5ss.js → linear-Df2eAW4A.js} +1 -1
- package/template/dist/client/assets/{main-C8MldI1o.js → main-DqZtiCro.js} +2 -2
- package/template/dist/client/assets/{mermaid.core-DlB0QBo2.js → mermaid.core-BIoiBcAA.js} +4 -4
- package/template/dist/client/assets/{mindmap-definition-YRQLILUH-D9OjtrBW.js → mindmap-definition-YRQLILUH-Btzz0iIP.js} +1 -1
- package/template/dist/client/assets/ordinal-Cboi1Yqb.js +1 -0
- package/template/dist/client/assets/{pieDiagram-SKSYHLDU-DoYJZfNJ.js → pieDiagram-SKSYHLDU-C2amrGtU.js} +1 -1
- package/template/dist/client/assets/{quadrantDiagram-337W2JSQ-Bs71YHJr.js → quadrantDiagram-337W2JSQ-EVgH9VuN.js} +1 -1
- package/template/dist/client/assets/{react-C0klD_r9.js → react-qvbbiZob.js} +1 -1
- package/template/dist/client/assets/{requirementDiagram-Z7DCOOCP-BWvQcALn.js → requirementDiagram-Z7DCOOCP-BkYPbRis.js} +1 -1
- package/template/dist/client/assets/{sankeyDiagram-WA2Y5GQK-CiGy1SQP.js → sankeyDiagram-WA2Y5GQK-B5EIaP-h.js} +1 -1
- package/template/dist/client/assets/{sequenceDiagram-2WXFIKYE-DRZim8vR.js → sequenceDiagram-2WXFIKYE-BC33VGOc.js} +1 -1
- package/template/dist/client/assets/{stateDiagram-RAJIS63D-BoqzJeL7.js → stateDiagram-RAJIS63D-DiKvWUYb.js} +1 -1
- package/template/dist/client/assets/stateDiagram-v2-FVOUBMTO-DjKMPYGe.js +1 -0
- package/template/dist/client/assets/{timeline-definition-YZTLITO2-CyvR95Wz.js → timeline-definition-YZTLITO2-QiFlgbRA.js} +1 -1
- package/template/dist/client/assets/{treemap-KZPCXAKY-DkXgGvs_.js → treemap-KZPCXAKY-BOYbyS9G.js} +1 -1
- package/template/dist/client/assets/{vennDiagram-LZ73GAT5-CVpGZu6p.js → vennDiagram-LZ73GAT5-CqmW7j4r.js} +1 -1
- package/template/dist/client/assets/{xychartDiagram-JWTSCODW-Cjqbi_DU.js → xychartDiagram-JWTSCODW-gj6oWX8l.js} +1 -1
- package/template/dist/server/assets/{Doc-DKBxQduk.js → Doc-9tJiX5y6.js} +3 -3
- package/template/dist/server/assets/{DocsLayout-CQfCTal3.js → DocsLayout-BTjhU_W5.js} +2 -2
- package/template/dist/server/assets/{Footer-Dcw5XVqX.js → Footer-CefTi2yh.js} +1 -1
- package/template/dist/server/assets/{FrameworkContent-OJfvCBHi.js → FrameworkContent-BkJvuP04.js} +2 -2
- package/template/dist/server/assets/{MarkdownHeadingContext-h4SfZq-C.js → MarkdownHeadingContext-37oQpb36.js} +8 -4
- package/template/dist/server/assets/{PostNotFound-DRJpnWrj.js → PostNotFound-BqBZf83v.js} +1 -1
- package/template/dist/server/assets/{_basePickBy-DJ9gzwF8.js → _basePickBy-DZ3TPUta.js} +2 -2
- package/template/dist/server/assets/{_baseUniq-CezmbvU2.js → _baseUniq-DKicWTQT.js} +1 -1
- package/template/dist/server/assets/{_lang._project._version.docs-CE_Z2zvG.js → _lang._project._version.docs-DOTNQiDb.js} +1 -1
- package/template/dist/server/assets/{_lang._project._version.docs-sJvASz_e.js → _lang._project._version.docs-U-t4mk5_.js} +3 -3
- package/template/dist/server/assets/{_lang._project._version.docs._-B2vf_QGY.js → _lang._project._version.docs._-DMgnElWM.js} +5 -5
- package/template/dist/server/assets/{_lang._project._version.docs._-CQcamDns.js → _lang._project._version.docs._-DSg82-Ug.js} +1 -1
- package/template/dist/server/assets/{_lang._project._version.docs.framework._framework._-54LEIllb.js → _lang._project._version.docs.framework._framework._-DbeN6toN.js} +1 -1
- package/template/dist/server/assets/{_lang._project._version.docs.framework._framework._-Dmn8xCf0.js → _lang._project._version.docs.framework._framework._-kBw_9L-F.js} +5 -5
- package/template/dist/server/assets/{_lang._project._version.docs.framework._framework.index-COKb9ffR.js → _lang._project._version.docs.framework._framework.index-Bsyj0DD5.js} +1 -1
- package/template/dist/server/assets/{_lang._project._version.docs.framework.index-DoEddI6Z.js → _lang._project._version.docs.framework.index-CmLAP_Io.js} +1 -1
- package/template/dist/server/assets/{_lang._project.docs-BjOhmwp6.js → _lang._project.docs-Bb4ZZ_jr.js} +3 -3
- package/template/dist/server/assets/{_lang._project.docs-dl8MxaGg.js → _lang._project.docs-BsnkRf-R.js} +1 -1
- package/template/dist/server/assets/{_lang._project.docs._-hSRVM-U7.js → _lang._project.docs._-ChrpJ61j.js} +5 -5
- package/template/dist/server/assets/{_lang._project.docs._-Bq0ajlaH.js → _lang._project.docs._-axRfm8vS.js} +1 -1
- package/template/dist/server/assets/{_lang.blog-Dk36D6Ol.js → _lang.blog-8j6IvzvQ.js} +2 -2
- package/template/dist/server/assets/{_lang.blog._-Cm8zXsPs.js → _lang.blog._-BPzP97Ac.js} +2 -2
- package/template/dist/server/assets/{_lang.blog._-D4CEjSkM.js → _lang.blog._-CjgFipz7.js} +1 -1
- package/template/dist/server/assets/{_lang.blog.index-orWcAgbi.js → _lang.blog._-DNX8UglA.js} +2 -2
- package/template/dist/server/assets/{_lang.blog.index-ZhMds6Jp.js → _lang.blog.index-CeZnMJBi.js} +1 -1
- package/template/dist/server/assets/{_lang.blog.index-Dfy48Gbt.js → _lang.blog.index-Dk5fYp4Q.js} +1 -1
- package/template/dist/server/assets/{_lang.blog._-A8h17fpC.js → _lang.blog.index-DzVKqoC4.js} +2 -2
- package/template/dist/server/assets/{_lang.docs-CAEkhcnT.js → _lang.docs-B4StnHMb.js} +3 -3
- package/template/dist/server/assets/{_lang.docs-CB1sGjRO.js → _lang.docs-DSB3iI6a.js} +1 -1
- package/template/dist/server/assets/{_lang.docs._-Zbv8OwJU.js → _lang.docs._--c0In1AT.js} +5 -5
- package/template/dist/server/assets/{_lang.docs._-DEX6FutM.js → _lang.docs._-S-y4-3Qn.js} +1 -1
- package/template/dist/server/assets/{_lang.docs.framework._framework._-BnpTV3KM.js → _lang.docs.framework._framework._-BFWLyU2h.js} +1 -1
- package/template/dist/server/assets/{_lang.docs.framework._framework._-4s4-ZCYh.js → _lang.docs.framework._framework._-Be0U7cDg.js} +5 -5
- package/template/dist/server/assets/{_lang.docs.framework._framework.index-BLryfsl2.js → _lang.docs.framework._framework.index-BZ512aSk.js} +1 -1
- package/template/dist/server/assets/{_lang.docs.framework.index-DGxWQH6q.js → _lang.docs.framework.index-U8z3j4kz.js} +1 -1
- package/template/dist/server/assets/{_tanstack-start-manifest_v-CURwM8Tc.js → _tanstack-start-manifest_v-DXpQ8503.js} +1 -1
- package/template/dist/server/assets/{arc-BwftnT5H.js → arc-B4h6h_n6.js} +1 -1
- package/template/dist/server/assets/{architecture-PBZL5I3N-KbDVC6gM.js → architecture-PBZL5I3N-CUwqLXkR.js} +6 -6
- package/template/dist/server/assets/{architectureDiagram-2XIMDMQ5-BoLvWxb3.js → architectureDiagram-2XIMDMQ5-CuCoxdBe.js} +6 -6
- package/template/dist/server/assets/{blockDiagram-WCTKOSBZ-GPFcXs-f.js → blockDiagram-WCTKOSBZ-D5PsUOim.js} +6 -6
- package/template/dist/server/assets/{blog.server-Bbk2Ifog.js → blog.server-WqzZ00iA.js} +1 -1
- package/template/dist/server/assets/{c4Diagram-IC4MRINW-EQwQCspo.js → c4Diagram-IC4MRINW-CXy5xO3o.js} +2 -2
- package/template/dist/server/assets/{channel-CxvwuPH7.js → channel-D0l-mWaF.js} +1 -1
- package/template/dist/server/assets/{chunk-4BX2VUAB-DUgcw5ei.js → chunk-4BX2VUAB-M7FVHMss.js} +1 -1
- package/template/dist/server/assets/{chunk-55IACEB6-Cn15uD91.js → chunk-55IACEB6-D_gDAje5.js} +1 -1
- package/template/dist/server/assets/{chunk-FMBD7UC4-Ck3iyLPu.js → chunk-FMBD7UC4-B5Bebx-Y.js} +1 -1
- package/template/dist/server/assets/{chunk-JSJVCQXG-VAT8yncE.js → chunk-JSJVCQXG-DxBkq-uB.js} +1 -1
- package/template/dist/server/assets/{chunk-KX2RTZJC-B1bd2VmA.js → chunk-KX2RTZJC-BMHm1EGi.js} +1 -1
- package/template/dist/server/assets/{chunk-NQ4KR5QH-CR67GG9C.js → chunk-NQ4KR5QH-Cp28pTwT.js} +3 -3
- package/template/dist/server/assets/{chunk-QZHKN3VN-B9SSazM4.js → chunk-QZHKN3VN-Bq5GZqaR.js} +1 -1
- package/template/dist/server/assets/{chunk-WL4C6EOR-DZ4Pjuao.js → chunk-WL4C6EOR-C9Nj5GdW.js} +5 -5
- package/template/dist/server/assets/{classDiagram-VBA2DB6C-CA6_4Wb2.js → classDiagram-VBA2DB6C-CUchv9T5.js} +6 -6
- package/template/dist/server/assets/{classDiagram-v2-RAHNMMFH-CA6_4Wb2.js → classDiagram-v2-RAHNMMFH-CUchv9T5.js} +6 -6
- package/template/dist/server/assets/{clone-DJHP_iVy.js → clone-CJcTi58S.js} +1 -1
- package/template/dist/server/assets/{cose-bilkent-S5V4N54A-DtU-cN6W.js → cose-bilkent-S5V4N54A-CxvCMhN_.js} +1 -1
- package/template/dist/server/assets/{dagre-KLK3FWXG-yZYrVU4p.js → dagre-KLK3FWXG-B5bQP7FL.js} +6 -6
- package/template/dist/server/assets/{diagram-E7M64L7V-8Yyz0aw0.js → diagram-E7M64L7V-NjHca90S.js} +8 -8
- package/template/dist/server/assets/{diagram-IFDJBPK2-DcxFYI3M.js → diagram-IFDJBPK2-CoTCfBKd.js} +6 -6
- package/template/dist/server/assets/{diagram-P4PSJMXO-CehxUcI0.js → diagram-P4PSJMXO-DHvGgYjH.js} +6 -6
- package/template/dist/server/assets/{docs.server-7EUAkSBN.js → docs.server-BSH7IvIU.js} +3884 -444
- package/template/dist/server/assets/{erDiagram-INFDFZHY-Bu2p1_Pj.js → erDiagram-INFDFZHY-01crajKr.js} +4 -4
- package/template/dist/server/assets/{flowDiagram-PKNHOUZH-B_eKR7I0.js → flowDiagram-PKNHOUZH-BkUQ_vxg.js} +6 -6
- package/template/dist/server/assets/{ganttDiagram-A5KZAMGK-DP6YEZof.js → ganttDiagram-A5KZAMGK-DvrO-w2P.js} +2 -2
- package/template/dist/server/assets/{gitGraph-HDMCJU4V-Bt0qhVL4.js → gitGraph-HDMCJU4V-h9JNaxB7.js} +6 -6
- package/template/dist/server/assets/{gitGraphDiagram-K3NZZRJ6-DwvkdYrg.js → gitGraphDiagram-K3NZZRJ6-BoKm6Fm-.js} +7 -7
- package/template/dist/server/assets/{graph-BVFNe_k5.js → graph-BoxbfI7Z.js} +2 -2
- package/template/dist/server/assets/{index-BvagF3L5.js → index-Jfzi6SZW.js} +2 -2
- package/template/dist/server/assets/{info-3K5VOQVL-CFejRnvB.js → info-3K5VOQVL-DgaSHqkS.js} +6 -6
- package/template/dist/server/assets/{infoDiagram-LFFYTUFH-D0v9uyXI.js → infoDiagram-LFFYTUFH-DgV5W8-I.js} +5 -5
- package/template/dist/server/assets/{ishikawaDiagram-PHBUUO56-DZumspL4.js → ishikawaDiagram-PHBUUO56-CqlMQ0Fq.js} +1 -1
- package/template/dist/server/assets/{journeyDiagram-4ABVD52K-nRp_-qZp.js → journeyDiagram-4ABVD52K-D6ySTub8.js} +4 -4
- package/template/dist/server/assets/{kanban-definition-K7BYSVSG-BMKyyzjt.js → kanban-definition-K7BYSVSG-BT8m7Cwk.js} +2 -2
- package/template/dist/server/assets/{layout-mpiN5R-5.js → layout-CkYcErfn.js} +4 -4
- package/template/dist/server/assets/{linear-CqNYgjEx.js → linear-F_0dWGZL.js} +1 -1
- package/template/dist/server/assets/{mermaid-parser.core-B8Uu3QZY.js → mermaid-parser.core-q5MdUJuo.js} +11 -11
- package/template/dist/server/assets/{mermaid.core-BI3nMhNO.js → mermaid.core-DOWTODR1.js} +31 -31
- package/template/dist/server/assets/{mindmap-definition-YRQLILUH-DCoFqLPh.js → mindmap-definition-YRQLILUH-BQxlQqn-.js} +3 -3
- package/template/dist/server/assets/{ordinal-Bcam90FY.js → ordinal-CxptdPJm.js} +1 -1
- package/template/dist/server/assets/{packet-RMMSAZCW-djgonfKN.js → packet-RMMSAZCW-D8FkLZuP.js} +6 -6
- package/template/dist/server/assets/{pie-UPGHQEXC-Dug2t-PE.js → pie-UPGHQEXC-Diw2fHLk.js} +6 -6
- package/template/dist/server/assets/{pieDiagram-SKSYHLDU-CS0_hW4w.js → pieDiagram-SKSYHLDU-B1J4UJZ7.js} +8 -8
- package/template/dist/server/assets/{quadrantDiagram-337W2JSQ-BpQNM0zu.js → quadrantDiagram-337W2JSQ-BvjKLapg.js} +2 -2
- package/template/dist/server/assets/{radar-KQ55EAFF-3ir2W9Wi.js → radar-KQ55EAFF-CcBdPU3n.js} +6 -6
- package/template/dist/server/assets/{requirementDiagram-Z7DCOOCP-D92RyjV4.js → requirementDiagram-Z7DCOOCP-Bgr_wnAs.js} +3 -3
- package/template/dist/server/assets/{router-DK1vpPhv.js → router-DxwPl-Dc.js} +18 -18
- package/template/dist/server/assets/{sankeyDiagram-WA2Y5GQK-DCPRB-xO.js → sankeyDiagram-WA2Y5GQK-B0UwtyW3.js} +2 -2
- package/template/dist/server/assets/{sequenceDiagram-2WXFIKYE-C1ab2VvU.js → sequenceDiagram-2WXFIKYE-BbxQJHjO.js} +3 -3
- package/template/dist/server/assets/{stateDiagram-RAJIS63D-GhG1G3ff.js → stateDiagram-RAJIS63D-Cg-uJ_UO.js} +8 -8
- package/template/dist/server/assets/{stateDiagram-v2-FVOUBMTO-C-KtMadV.js → stateDiagram-v2-FVOUBMTO-BWVPrqfa.js} +4 -4
- package/template/dist/server/assets/{timeline-definition-YZTLITO2-DyfAQCd4.js → timeline-definition-YZTLITO2-DCSJT2WT.js} +2 -2
- package/template/dist/server/assets/{treemap-KZPCXAKY-Cn0Cw4Cl.js → treemap-KZPCXAKY-a0nhlKgx.js} +6 -6
- package/template/dist/server/assets/{vennDiagram-LZ73GAT5-D2Ak5JUa.js → vennDiagram-LZ73GAT5-Bk2HQEQq.js} +1 -1
- package/template/dist/server/assets/{xychartDiagram-JWTSCODW-DqoBOs1L.js → xychartDiagram-JWTSCODW-C4svHkt_.js} +3 -3
- package/template/dist/server/server.js +16 -16
- package/template/package.json +2 -0
- package/template/vite.config.ts +33 -18
- package/template/wrangler.jsonc +2 -2
- package/admin/dist/client/assets/main-CSFhgz4p.js +0 -17
- package/admin/dist/client/assets/routes-C6bCOSX-.js +0 -3
- package/admin/dist/server/assets/_tanstack-start-manifest_v-BE5XHVZ2.js +0 -17
- package/admin/dist/server/assets/redirect-DtfSYi2g.js +0 -51
- package/admin/dist/server/assets/status-CZz8Rs_7.js +0 -81
- package/template/dist/client/assets/_lang-Cpuy5xmU.js +0 -1
- package/template/dist/client/assets/_lang._project-DBdR04In.js +0 -1
- package/template/dist/client/assets/_lang._project._version-CtCLMJs2.js +0 -1
- package/template/dist/client/assets/_lang._project._version.docs._-CxgRZ17Q.js +0 -1
- package/template/dist/client/assets/_lang._project._version.docs.framework._framework._-Qph6wahA.js +0 -1
- package/template/dist/client/assets/_lang._project.docs._-C_ZfXEJ7.js +0 -1
- package/template/dist/client/assets/_lang.blog-BcRmhv23.js +0 -1
- package/template/dist/client/assets/_lang.blog-C5Aa7k5r.js +0 -1
- package/template/dist/client/assets/_lang.blog._-BVw4vhtF.js +0 -1
- package/template/dist/client/assets/_lang.blog.index-Y35iFzkp.js +0 -1
- package/template/dist/client/assets/_lang.docs._-B9hwwoTY.js +0 -1
- package/template/dist/client/assets/_lang.docs.framework._framework._-BENbKZIu.js +0 -1
- package/template/dist/client/assets/channel-C_1F7tzH.js +0 -1
- package/template/dist/client/assets/classDiagram-VBA2DB6C-CqViWWFw.js +0 -1
- package/template/dist/client/assets/classDiagram-v2-RAHNMMFH-CqViWWFw.js +0 -1
- package/template/dist/client/assets/clone-EeiNAO_N.js +0 -1
- package/template/dist/client/assets/ordinal-BENe2yWM.js +0 -1
- package/template/dist/client/assets/stateDiagram-v2-FVOUBMTO-CJYWvllO.js +0 -1
- /package/admin/dist/server/assets/{createServerRpc-DJq9yo-B.js → createServerRpc-Cyyxq9HQ.js} +0 -0
|
@@ -1,189 +1,12 @@
|
|
|
1
1
|
import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./chunk-CNvmzFzq.js";
|
|
2
2
|
import crypto from "crypto";
|
|
3
|
-
import
|
|
4
|
-
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
5
|
-
import minpath, { join, resolve } from "node:path";
|
|
3
|
+
import minpath from "node:path";
|
|
6
4
|
import minproc from "node:process";
|
|
7
5
|
import { fileURLToPath as urlToPath } from "node:url";
|
|
8
|
-
import fs, { readFileSync
|
|
9
|
-
import path, { dirname, resolve as resolve$1 } from "path";
|
|
6
|
+
import fs, { readFileSync } from "fs";
|
|
7
|
+
import path$1, { dirname, resolve as resolve$1 } from "path";
|
|
10
8
|
import { createRequire } from "module";
|
|
11
9
|
import { fileURLToPath } from "url";
|
|
12
|
-
//#region server/services/job-manager.ts
|
|
13
|
-
function getProjectRoot$1() {
|
|
14
|
-
if (process.env.DOCS_I18N_PROJECT_ROOT) return process.env.DOCS_I18N_PROJECT_ROOT;
|
|
15
|
-
try {
|
|
16
|
-
return readFileSync(resolve(process.env.TMPDIR || process.env.TEMP || "/tmp", "docs-i18n-project-root"), "utf-8").trim();
|
|
17
|
-
} catch {}
|
|
18
|
-
return process.cwd();
|
|
19
|
-
}
|
|
20
|
-
var _config$2;
|
|
21
|
-
function setConfig(config) {
|
|
22
|
-
_config$2 = config;
|
|
23
|
-
}
|
|
24
|
-
var JobManager = class {
|
|
25
|
-
jobs = /* @__PURE__ */ new Map();
|
|
26
|
-
processes = /* @__PURE__ */ new Map();
|
|
27
|
-
subscribers = /* @__PURE__ */ new Map();
|
|
28
|
-
nextId = 1;
|
|
29
|
-
start(opts) {
|
|
30
|
-
for (const [, job] of this.jobs) if (job.lang === opts.lang && job.version === opts.version && job.status === "running") throw new Error(`Job already running for ${opts.lang}/${opts.version}`);
|
|
31
|
-
const id = `job-${this.nextId++}`;
|
|
32
|
-
const job = {
|
|
33
|
-
id,
|
|
34
|
-
lang: opts.lang,
|
|
35
|
-
version: opts.version,
|
|
36
|
-
project: opts.project ?? "",
|
|
37
|
-
status: "running",
|
|
38
|
-
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
39
|
-
logLines: [],
|
|
40
|
-
translatedFiles: 0,
|
|
41
|
-
totalFiles: 0,
|
|
42
|
-
toTranslate: 0,
|
|
43
|
-
errorFiles: 0
|
|
44
|
-
};
|
|
45
|
-
this.jobs.set(id, job);
|
|
46
|
-
let projectArg = opts.project ?? "";
|
|
47
|
-
let versionArg = opts.version;
|
|
48
|
-
if (!projectArg && opts.version.includes("/")) {
|
|
49
|
-
const parts = opts.version.split("/");
|
|
50
|
-
projectArg = parts.slice(0, -1).join("/");
|
|
51
|
-
versionArg = parts[parts.length - 1];
|
|
52
|
-
}
|
|
53
|
-
const args = [
|
|
54
|
-
"translate",
|
|
55
|
-
"--lang",
|
|
56
|
-
opts.lang,
|
|
57
|
-
"--version",
|
|
58
|
-
versionArg,
|
|
59
|
-
"--max",
|
|
60
|
-
String(opts.max ?? 999),
|
|
61
|
-
"--concurrency",
|
|
62
|
-
String(opts.concurrency ?? 3)
|
|
63
|
-
];
|
|
64
|
-
if (projectArg) args.push("--project", projectArg);
|
|
65
|
-
if (opts.model) args.push("--model", opts.model);
|
|
66
|
-
if (opts.files?.length) args.push("--files", opts.files.join(","));
|
|
67
|
-
const apiKey = _config$2?.llm?.apiKey || process.env.OPENROUTER_API_KEY || process.env.OPENAI_API_KEY || "";
|
|
68
|
-
if (apiKey) args.push("--api-key", apiKey);
|
|
69
|
-
const projectRoot = getProjectRoot$1();
|
|
70
|
-
const childEnv = {
|
|
71
|
-
...process.env,
|
|
72
|
-
NO_TTY: "1",
|
|
73
|
-
FORCE_COLOR: "0"
|
|
74
|
-
};
|
|
75
|
-
try {
|
|
76
|
-
const envContent = readFileSync(resolve(projectRoot, ".env"), "utf-8");
|
|
77
|
-
for (const line of envContent.split("\n")) {
|
|
78
|
-
const match = line.match(/^\s*([A-Z_][A-Z0-9_]*)\s*=\s*(.*)\s*$/);
|
|
79
|
-
if (match && !childEnv[match[1]]) childEnv[match[1]] = match[2];
|
|
80
|
-
}
|
|
81
|
-
} catch {}
|
|
82
|
-
const proc = spawn("npx", ["docs-i18n", ...args], {
|
|
83
|
-
cwd: projectRoot,
|
|
84
|
-
stdio: [
|
|
85
|
-
"ignore",
|
|
86
|
-
"pipe",
|
|
87
|
-
"pipe"
|
|
88
|
-
],
|
|
89
|
-
env: childEnv,
|
|
90
|
-
shell: true
|
|
91
|
-
});
|
|
92
|
-
this.processes.set(id, proc);
|
|
93
|
-
proc.stdout?.on("data", (d) => {
|
|
94
|
-
for (const line of d.toString().split("\n").filter(Boolean)) {
|
|
95
|
-
this.addLog(id, line);
|
|
96
|
-
this.parseProgress(job, line);
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
proc.stderr?.on("data", (d) => {
|
|
100
|
-
for (const line of d.toString().split("\n").filter(Boolean)) this.addLog(id, line);
|
|
101
|
-
});
|
|
102
|
-
proc.on("exit", (code) => {
|
|
103
|
-
job.status = code === 0 ? "completed" : "failed";
|
|
104
|
-
job.exitCode = code;
|
|
105
|
-
job.finishedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
106
|
-
job.currentFile = void 0;
|
|
107
|
-
this.addLog(id, `Process exited with code ${code}`);
|
|
108
|
-
this.processes.delete(id);
|
|
109
|
-
this.emit(id, {
|
|
110
|
-
type: "exit",
|
|
111
|
-
code
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
proc.on("error", (err) => {
|
|
115
|
-
job.status = "failed";
|
|
116
|
-
job.finishedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
117
|
-
this.addLog(id, `Process error: ${err.message}`);
|
|
118
|
-
this.processes.delete(id);
|
|
119
|
-
this.emit(id, {
|
|
120
|
-
type: "exit",
|
|
121
|
-
code: -1
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
return job;
|
|
125
|
-
}
|
|
126
|
-
cancel(id) {
|
|
127
|
-
const proc = this.processes.get(id);
|
|
128
|
-
const job = this.jobs.get(id);
|
|
129
|
-
if (!proc || !job) return false;
|
|
130
|
-
proc.kill("SIGTERM");
|
|
131
|
-
job.status = "cancelled";
|
|
132
|
-
job.finishedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
133
|
-
this.processes.delete(id);
|
|
134
|
-
this.emit(id, {
|
|
135
|
-
type: "exit",
|
|
136
|
-
code: null
|
|
137
|
-
});
|
|
138
|
-
return true;
|
|
139
|
-
}
|
|
140
|
-
list() {
|
|
141
|
-
return [...this.jobs.values()].sort((a, b) => new Date(b.startedAt).getTime() - new Date(a.startedAt).getTime());
|
|
142
|
-
}
|
|
143
|
-
get(id) {
|
|
144
|
-
return this.jobs.get(id);
|
|
145
|
-
}
|
|
146
|
-
remove(id) {
|
|
147
|
-
const job = this.jobs.get(id);
|
|
148
|
-
if (!job || job.status === "running") return false;
|
|
149
|
-
this.jobs.delete(id);
|
|
150
|
-
this.subscribers.delete(id);
|
|
151
|
-
return true;
|
|
152
|
-
}
|
|
153
|
-
subscribe(id, callback) {
|
|
154
|
-
if (!this.subscribers.has(id)) this.subscribers.set(id, /* @__PURE__ */ new Set());
|
|
155
|
-
this.subscribers.get(id)?.add(callback);
|
|
156
|
-
return () => {
|
|
157
|
-
this.subscribers.get(id)?.delete(callback);
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
addLog(id, line) {
|
|
161
|
-
const job = this.jobs.get(id);
|
|
162
|
-
if (!job) return;
|
|
163
|
-
const entry = `[${(/* @__PURE__ */ new Date()).toLocaleTimeString("en-US", { hour12: false })}] ${line}`;
|
|
164
|
-
job.logLines = job.logLines ?? [];
|
|
165
|
-
job.logLines.push(entry);
|
|
166
|
-
if (job.logLines.length > 500) job.logLines.shift();
|
|
167
|
-
this.emit(id, {
|
|
168
|
-
type: "log",
|
|
169
|
-
data: entry
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
emit(id, event) {
|
|
173
|
-
this.subscribers.get(id)?.forEach((cb) => cb(event));
|
|
174
|
-
}
|
|
175
|
-
parseProgress(job, line) {
|
|
176
|
-
const cached = line.match(/\+(\d+) cached/);
|
|
177
|
-
if (cached) job.translatedFiles += Number.parseInt(cached[1], 10);
|
|
178
|
-
const untranslated = line.match(/(\d+) untranslated keys/);
|
|
179
|
-
if (untranslated) job.toTranslate = Number.parseInt(untranslated[1], 10);
|
|
180
|
-
const chunk = line.match(/chunk \d+\/(\d+)/);
|
|
181
|
-
if (chunk) job.totalFiles = Number.parseInt(chunk[1], 10);
|
|
182
|
-
if (line.includes("⏳")) job.currentFile = line.replace(/^⏳\s*/, "");
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
var jobManager = new JobManager();
|
|
186
|
-
//#endregion
|
|
187
10
|
//#region ../../node_modules/.bun/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.js
|
|
188
11
|
/**
|
|
189
12
|
* @typedef {import('mdast').Nodes} Nodes
|
|
@@ -23942,7 +23765,7 @@ var domain = {
|
|
|
23942
23765
|
tokenize: tokenizeDomain,
|
|
23943
23766
|
partial: true
|
|
23944
23767
|
};
|
|
23945
|
-
var path$
|
|
23768
|
+
var path$2 = {
|
|
23946
23769
|
tokenize: tokenizePath,
|
|
23947
23770
|
partial: true
|
|
23948
23771
|
};
|
|
@@ -24138,7 +23961,7 @@ function tokenizeWwwAutolink(effects, ok, nok) {
|
|
|
24138
23961
|
if (code !== 87 && code !== 119 || !previousWww.call(self, self.previous) || previousUnbalanced(self.events)) return nok(code);
|
|
24139
23962
|
effects.enter("literalAutolink");
|
|
24140
23963
|
effects.enter("literalAutolinkWww");
|
|
24141
|
-
return effects.check(wwwPrefix, effects.attempt(domain, effects.attempt(path$
|
|
23964
|
+
return effects.check(wwwPrefix, effects.attempt(domain, effects.attempt(path$2, wwwAfter), nok), nok)(code);
|
|
24142
23965
|
}
|
|
24143
23966
|
/**
|
|
24144
23967
|
* After a www autolink literal.
|
|
@@ -24247,7 +24070,7 @@ function tokenizeProtocolAutolink(effects, ok, nok) {
|
|
|
24247
24070
|
* @type {State}
|
|
24248
24071
|
*/
|
|
24249
24072
|
function afterProtocol(code) {
|
|
24250
|
-
return code === null || asciiControl(code) || markdownLineEndingOrSpace(code) || unicodeWhitespace(code) || unicodePunctuation(code) ? nok(code) : effects.attempt(domain, effects.attempt(path$
|
|
24073
|
+
return code === null || asciiControl(code) || markdownLineEndingOrSpace(code) || unicodeWhitespace(code) || unicodePunctuation(code) ? nok(code) : effects.attempt(domain, effects.attempt(path$2, protocolAfter), nok)(code);
|
|
24251
24074
|
}
|
|
24252
24075
|
/**
|
|
24253
24076
|
* After a protocol autolink literal.
|
|
@@ -38618,7 +38441,8 @@ function visualizeCharacter(char) {
|
|
|
38618
38441
|
function visualizeCharacterCode(charCode) {
|
|
38619
38442
|
return "0x" + charCode.toString(16).toUpperCase();
|
|
38620
38443
|
}
|
|
38621
|
-
|
|
38444
|
+
//#endregion
|
|
38445
|
+
//#region ../../node_modules/.bun/rehype-callouts@2.1.2/node_modules/rehype-callouts/dist/themes/github/config.js
|
|
38622
38446
|
var githubCallouts = {
|
|
38623
38447
|
note: {
|
|
38624
38448
|
title: "Note",
|
|
@@ -38819,7 +38643,7 @@ function convertKeysToLowercase(object) {
|
|
|
38819
38643
|
/**
|
|
38820
38644
|
* Constructs the configuration.
|
|
38821
38645
|
*/
|
|
38822
|
-
function getConfig
|
|
38646
|
+
function getConfig(userOptions) {
|
|
38823
38647
|
const defaultOptions = {
|
|
38824
38648
|
theme: "obsidian",
|
|
38825
38649
|
callouts: themes.obsidian,
|
|
@@ -39025,7 +38849,7 @@ function getFoldIcon(tag, props) {
|
|
|
39025
38849
|
* @see https://github.com/lin-stephanie/rehype-callouts
|
|
39026
38850
|
*/
|
|
39027
38851
|
var rehypeCallouts = (options) => {
|
|
39028
|
-
const { theme, callouts, aliases, showIndicator, tags, props } = getConfig
|
|
38852
|
+
const { theme, callouts, aliases, showIndicator, tags, props } = getConfig(options);
|
|
39029
38853
|
const { nonCollapsibleContainerTagName, nonCollapsibleTitleTagName, contentTagName, titleIconTagName, titleTextTagName, foldIconTagName } = tags;
|
|
39030
38854
|
const { containerProps, titleProps, contentProps, titleIconProps, titleTextProps, foldIconProps } = props;
|
|
39031
38855
|
return (tree) => {
|
|
@@ -41126,6 +40950,12 @@ function rehypeStringify(options) {
|
|
|
41126
40950
|
}
|
|
41127
40951
|
//#endregion
|
|
41128
40952
|
//#region ../core/dist/index.js
|
|
40953
|
+
var dist_exports = /* @__PURE__ */ __exportAll({
|
|
40954
|
+
TranslationCache: () => TranslationCache,
|
|
40955
|
+
flattenSources: () => flattenSources,
|
|
40956
|
+
getPackageVersion: () => getPackageVersion
|
|
40957
|
+
});
|
|
40958
|
+
require_dist();
|
|
41129
40959
|
function flattenSources(config) {
|
|
41130
40960
|
const projects = Object.entries(config.projects);
|
|
41131
40961
|
const singleProject = projects.length === 1;
|
|
@@ -41165,7 +40995,7 @@ var TranslationCache = class {
|
|
|
41165
40995
|
constructor(cacheDir) {
|
|
41166
40996
|
this.cacheDir = cacheDir;
|
|
41167
40997
|
fs.mkdirSync(cacheDir, { recursive: true });
|
|
41168
|
-
this.db = openDatabase(path.join(cacheDir, "translations.db"));
|
|
40998
|
+
this.db = openDatabase(path$1.join(cacheDir, "translations.db"));
|
|
41169
40999
|
this.db.pragma("journal_mode = WAL");
|
|
41170
41000
|
this.db.pragma("busy_timeout = 5000");
|
|
41171
41001
|
this.db.pragma("synchronous = NORMAL");
|
|
@@ -41415,7 +41245,7 @@ var TranslationCache = class {
|
|
|
41415
41245
|
if (srcs.length > 0) entry.src = srcs.map((s) => s.loc);
|
|
41416
41246
|
lines.push(JSON.stringify(entry));
|
|
41417
41247
|
}
|
|
41418
|
-
fs.mkdirSync(path.dirname(outputPath), { recursive: true });
|
|
41248
|
+
fs.mkdirSync(path$1.dirname(outputPath), { recursive: true });
|
|
41419
41249
|
fs.writeFileSync(outputPath, `${lines.join("\n")}
|
|
41420
41250
|
`, "utf8");
|
|
41421
41251
|
return rows.length;
|
|
@@ -41438,7 +41268,7 @@ var TranslationCache = class {
|
|
|
41438
41268
|
}
|
|
41439
41269
|
/** Export a readable markdown index for IDE navigation */
|
|
41440
41270
|
exportIndex(lang) {
|
|
41441
|
-
const indexPath = path.join(this.cacheDir, `${lang}.index.md`);
|
|
41271
|
+
const indexPath = path$1.join(this.cacheDir, `${lang}.index.md`);
|
|
41442
41272
|
const rows = this.db.prepare(`
|
|
41443
41273
|
SELECT t.key, t.value,
|
|
41444
41274
|
GROUP_CONCAT(sf.file || ':' || sf.line, char(10)) as sources
|
|
@@ -41505,7 +41335,7 @@ function getPackageVersion() {
|
|
|
41505
41335
|
let dir = dirname(fileURLToPath(import.meta.url));
|
|
41506
41336
|
for (let i = 0; i < 5; i++) {
|
|
41507
41337
|
try {
|
|
41508
|
-
const pkg = JSON.parse(readFileSync
|
|
41338
|
+
const pkg = JSON.parse(readFileSync(resolve$1(dir, "package.json"), "utf-8"));
|
|
41509
41339
|
if (pkg.name === "docs-i18n") return pkg.version;
|
|
41510
41340
|
} catch {}
|
|
41511
41341
|
dir = dirname(dir);
|
|
@@ -41514,194 +41344,4 @@ function getPackageVersion() {
|
|
|
41514
41344
|
return "unknown";
|
|
41515
41345
|
}
|
|
41516
41346
|
//#endregion
|
|
41517
|
-
|
|
41518
|
-
var _config$1;
|
|
41519
|
-
var _cache = null;
|
|
41520
|
-
var _projectRoot = process.cwd();
|
|
41521
|
-
function initStatus(config) {
|
|
41522
|
-
_config$1 = config;
|
|
41523
|
-
_cache = null;
|
|
41524
|
-
_projectRoot = process.env.DOCS_I18N_PROJECT_ROOT || process.cwd();
|
|
41525
|
-
}
|
|
41526
|
-
function getVersions() {
|
|
41527
|
-
return flattenSources(_config$1).map((s) => s.versionKey);
|
|
41528
|
-
}
|
|
41529
|
-
function getLangs() {
|
|
41530
|
-
return _config$1.languages;
|
|
41531
|
-
}
|
|
41532
|
-
function getCache() {
|
|
41533
|
-
if (!_cache) _cache = new TranslationCache(resolve(_projectRoot, _config$1.cacheDir ?? ".cache"));
|
|
41534
|
-
return _cache;
|
|
41535
|
-
}
|
|
41536
|
-
function getSourcePath(versionKey) {
|
|
41537
|
-
const source = flattenSources(_config$1).find((s) => s.versionKey === versionKey);
|
|
41538
|
-
return source ? resolve(_projectRoot, source.sourcePath) : null;
|
|
41539
|
-
}
|
|
41540
|
-
function walkFiles(dir) {
|
|
41541
|
-
const results = [];
|
|
41542
|
-
if (!existsSync(dir)) return results;
|
|
41543
|
-
const exts = (_config$1.include ?? ["**/*.mdx", "**/*.md"]).map((p) => p.replace("**/*", ""));
|
|
41544
|
-
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
41545
|
-
const fullPath = join(dir, entry.name);
|
|
41546
|
-
if (entry.isDirectory()) results.push(...walkFiles(fullPath));
|
|
41547
|
-
else if (exts.some((ext) => entry.name.endsWith(ext))) results.push(fullPath);
|
|
41548
|
-
}
|
|
41549
|
-
return results;
|
|
41550
|
-
}
|
|
41551
|
-
function ensureScanned(version) {
|
|
41552
|
-
const cache = getCache();
|
|
41553
|
-
const enDir = getSourcePath(version);
|
|
41554
|
-
if (!enDir || !existsSync(enDir)) return;
|
|
41555
|
-
const files = walkFiles(enDir);
|
|
41556
|
-
if (cache.sourceCount(version) >= files.length) return;
|
|
41557
|
-
cache.clearSources("", version);
|
|
41558
|
-
for (const file of files) {
|
|
41559
|
-
const relPath = file.slice(enDir.length + 1);
|
|
41560
|
-
const content = readFileSync(file, "utf8");
|
|
41561
|
-
const nodes = parseMdx(content);
|
|
41562
|
-
for (const node of nodes) if (node.needsTranslation && node.md5) {
|
|
41563
|
-
const line = content.substring(0, node.startOffset).split("\n").length;
|
|
41564
|
-
cache.setSource(node.md5, node.rawText, node.type);
|
|
41565
|
-
cache.updateSource("", node.md5, relPath, line, version);
|
|
41566
|
-
}
|
|
41567
|
-
}
|
|
41568
|
-
}
|
|
41569
|
-
function rescan(version) {
|
|
41570
|
-
const cache = getCache();
|
|
41571
|
-
const enDir = getSourcePath(version);
|
|
41572
|
-
if (!enDir || !existsSync(enDir)) return 0;
|
|
41573
|
-
const files = walkFiles(enDir);
|
|
41574
|
-
cache.clearSources("", version);
|
|
41575
|
-
for (const file of files) {
|
|
41576
|
-
const relPath = file.slice(enDir.length + 1);
|
|
41577
|
-
const content = readFileSync(file, "utf8");
|
|
41578
|
-
const nodes = parseMdx(content);
|
|
41579
|
-
for (const node of nodes) if (node.needsTranslation && node.md5) {
|
|
41580
|
-
const line = content.substring(0, node.startOffset).split("\n").length;
|
|
41581
|
-
cache.setSource(node.md5, node.rawText, node.type);
|
|
41582
|
-
cache.updateSource("", node.md5, relPath, line, version);
|
|
41583
|
-
}
|
|
41584
|
-
}
|
|
41585
|
-
return files.length;
|
|
41586
|
-
}
|
|
41587
|
-
function getOverview() {
|
|
41588
|
-
const cache = getCache();
|
|
41589
|
-
const versions = getVersions();
|
|
41590
|
-
const langs = getLangs();
|
|
41591
|
-
const result = {};
|
|
41592
|
-
for (const version of versions) {
|
|
41593
|
-
ensureScanned(version);
|
|
41594
|
-
const enDir = getSourcePath(version);
|
|
41595
|
-
const enFileCount = enDir && existsSync(enDir) ? walkFiles(enDir).length : 0;
|
|
41596
|
-
const langStats = {};
|
|
41597
|
-
for (const lang of langs) {
|
|
41598
|
-
const sections = cache.sectionStats(version, lang);
|
|
41599
|
-
let totalFiles = 0, translatedFiles = 0, totalNodes = 0, translatedNodes = 0;
|
|
41600
|
-
const sectionMap = {};
|
|
41601
|
-
for (const s of sections) {
|
|
41602
|
-
sectionMap[s.section] = s;
|
|
41603
|
-
totalFiles += s.totalFiles;
|
|
41604
|
-
translatedFiles += s.translatedFiles;
|
|
41605
|
-
totalNodes += s.totalNodes;
|
|
41606
|
-
translatedNodes += s.translatedNodes;
|
|
41607
|
-
}
|
|
41608
|
-
langStats[lang] = {
|
|
41609
|
-
sections: sectionMap,
|
|
41610
|
-
totalFiles,
|
|
41611
|
-
translatedFiles,
|
|
41612
|
-
totalNodes,
|
|
41613
|
-
translatedNodes
|
|
41614
|
-
};
|
|
41615
|
-
}
|
|
41616
|
-
result[version] = {
|
|
41617
|
-
enFileCount,
|
|
41618
|
-
langs: langStats
|
|
41619
|
-
};
|
|
41620
|
-
}
|
|
41621
|
-
return result;
|
|
41622
|
-
}
|
|
41623
|
-
function getFileCoverage(version, lang) {
|
|
41624
|
-
ensureScanned(version);
|
|
41625
|
-
return getCache().fileCoverage(version, lang);
|
|
41626
|
-
}
|
|
41627
|
-
function getFileBlocks(version, lang, file) {
|
|
41628
|
-
const enDir = getSourcePath(version);
|
|
41629
|
-
if (!enDir) return null;
|
|
41630
|
-
const enPath = join(enDir, file);
|
|
41631
|
-
if (!existsSync(enPath)) return null;
|
|
41632
|
-
const cache = getCache();
|
|
41633
|
-
const content = readFileSync(enPath, "utf8");
|
|
41634
|
-
const nodes = parseMdx(content);
|
|
41635
|
-
const blocks = [];
|
|
41636
|
-
let lastEnd = 0;
|
|
41637
|
-
for (const node of nodes) {
|
|
41638
|
-
if (node.startOffset > lastEnd) {
|
|
41639
|
-
const gap = content.substring(lastEnd, node.startOffset);
|
|
41640
|
-
blocks.push({
|
|
41641
|
-
md5: null,
|
|
41642
|
-
type: "gap",
|
|
41643
|
-
source: gap,
|
|
41644
|
-
translation: null
|
|
41645
|
-
});
|
|
41646
|
-
}
|
|
41647
|
-
if (node.needsTranslation && node.md5) {
|
|
41648
|
-
const translation = lang === "en" ? null : cache.get(lang, node.md5) ?? null;
|
|
41649
|
-
blocks.push({
|
|
41650
|
-
md5: node.md5,
|
|
41651
|
-
type: node.type,
|
|
41652
|
-
source: node.rawText,
|
|
41653
|
-
translation
|
|
41654
|
-
});
|
|
41655
|
-
} else blocks.push({
|
|
41656
|
-
md5: null,
|
|
41657
|
-
type: node.type,
|
|
41658
|
-
source: node.rawText,
|
|
41659
|
-
translation: null
|
|
41660
|
-
});
|
|
41661
|
-
lastEnd = node.endOffset;
|
|
41662
|
-
}
|
|
41663
|
-
if (lastEnd < content.length) {
|
|
41664
|
-
const tail = content.substring(lastEnd);
|
|
41665
|
-
if (tail.trim()) blocks.push({
|
|
41666
|
-
md5: null,
|
|
41667
|
-
type: "gap",
|
|
41668
|
-
source: tail,
|
|
41669
|
-
translation: null
|
|
41670
|
-
});
|
|
41671
|
-
}
|
|
41672
|
-
return blocks;
|
|
41673
|
-
}
|
|
41674
|
-
//#endregion
|
|
41675
|
-
//#region server/init.ts
|
|
41676
|
-
var _initialized = false;
|
|
41677
|
-
var _config;
|
|
41678
|
-
/**
|
|
41679
|
-
* Initialize admin server services with the project config.
|
|
41680
|
-
*/
|
|
41681
|
-
function initAdmin(config) {
|
|
41682
|
-
_config = config;
|
|
41683
|
-
initStatus(config);
|
|
41684
|
-
setConfig(config);
|
|
41685
|
-
_initialized = true;
|
|
41686
|
-
}
|
|
41687
|
-
function getConfig() {
|
|
41688
|
-
return _config;
|
|
41689
|
-
}
|
|
41690
|
-
function getProjectRoot() {
|
|
41691
|
-
if (process.env.DOCS_I18N_PROJECT_ROOT) return process.env.DOCS_I18N_PROJECT_ROOT;
|
|
41692
|
-
try {
|
|
41693
|
-
return readFileSync(resolve(process.env.TMPDIR || process.env.TEMP || "/tmp", "docs-i18n-project-root"), "utf-8").trim();
|
|
41694
|
-
} catch {}
|
|
41695
|
-
return process.cwd();
|
|
41696
|
-
}
|
|
41697
|
-
/**
|
|
41698
|
-
* Ensure admin is initialized. Lazy-loads config on first call.
|
|
41699
|
-
*/
|
|
41700
|
-
async function ensureInit() {
|
|
41701
|
-
if (_initialized) return;
|
|
41702
|
-
if (typeof window !== "undefined") return;
|
|
41703
|
-
const mod = await import(`${getProjectRoot()}/docs-i18n.config.ts`);
|
|
41704
|
-
initAdmin(mod.default ?? mod);
|
|
41705
|
-
}
|
|
41706
|
-
//#endregion
|
|
41707
|
-
export { getOverview as a, getPackageVersion as c, ensureInit, getConfig, getProjectRoot, getLangs as i, jobManager as l, getFileBlocks as n, getVersions as o, getFileCoverage as r, rescan as s, getCache as t };
|
|
41347
|
+
export { parseMdx as i, dist_exports as n, flattenSources as r, TranslationCache as t };
|