kiki-agent 0.6.0-beta.3 → 0.6.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/dist/cpu-worker.mjs +218 -3841
- package/dist/docs/en/configuration/config-files.md +14 -8
- package/dist/docs/en/customization/hooks.md +13 -13
- package/dist/docs/en/customization/plugins.md +2 -2
- package/dist/docs/en/customization/prompt-fields.md +1 -1
- package/dist/docs/en/getting-started/installation.md +51 -2
- package/dist/docs/en/reference/command.md +1 -1
- package/dist/docs/en/reference/tools.md +3 -3
- package/dist/docs/en/server/rest-api.md +13 -8
- package/dist/docs/zh/configuration/config-files.md +14 -8
- package/dist/docs/zh/customization/hooks.md +14 -14
- package/dist/docs/zh/customization/plugins.md +2 -2
- package/dist/docs/zh/customization/prompt-fields.md +1 -1
- package/dist/docs/zh/getting-started/installation.md +51 -2
- package/dist/docs/zh/reference/command.md +1 -1
- package/dist/docs/zh/reference/tools.md +3 -3
- package/dist/docs/zh/server/rest-api.md +13 -8
- package/dist/history-navigation-worker.mjs +5362 -5309
- package/dist/hostRunner.mjs +357 -3
- package/dist/main.mjs +2 -2
- package/dist/native/windows-process-helper.exe +0 -0
- package/dist/query-store-worker.mjs +650 -21
- package/dist/sqlite-indexer.mjs +14 -2
- package/dist/sqlite-query-worker.mjs +12 -0
- package/dist/usage-read-model-worker.mjs +16 -9
- package/dist/web/assets/App-DCxEkgD4.js +181 -0
- package/dist/web/assets/App-DCxEkgD4.js.br +0 -0
- package/dist/web/assets/App-DCxEkgD4.js.gz +0 -0
- package/dist/web/assets/AppErrorBoundary-C2kI_Mfb.js +1 -0
- package/dist/web/assets/AppErrorBoundary-C2kI_Mfb.js.br +0 -0
- package/dist/web/assets/AppErrorBoundary-C2kI_Mfb.js.gz +0 -0
- package/dist/web/assets/ArchivedSessionsPage-CJQBRKlz.js +1 -0
- package/dist/web/assets/ArchivedSessionsPage-CJQBRKlz.js.br +0 -0
- package/dist/web/assets/ArchivedSessionsPage-CJQBRKlz.js.gz +0 -0
- package/dist/web/assets/CapabilitiesPage-C4ggBXI7.js +15 -0
- package/dist/web/assets/CapabilitiesPage-C4ggBXI7.js.br +0 -0
- package/dist/web/assets/CapabilitiesPage-C4ggBXI7.js.gz +0 -0
- package/dist/web/assets/CodeEditor-BAdDaRcl.js +4 -0
- package/dist/web/assets/CodeEditor-BAdDaRcl.js.br +0 -0
- package/dist/web/assets/CodeEditor-BAdDaRcl.js.gz +0 -0
- package/dist/web/assets/ExternalEnginesSection-Ci1_RIkB.js +2 -0
- package/dist/web/assets/ExternalEnginesSection-Ci1_RIkB.js.br +0 -0
- package/dist/web/assets/ExternalEnginesSection-Ci1_RIkB.js.gz +0 -0
- package/dist/web/assets/GlobalCronPanel-DEYDD-iB.js +1 -0
- package/dist/web/assets/GlobalCronPanel-DEYDD-iB.js.br +0 -0
- package/dist/web/assets/GlobalCronPanel-DEYDD-iB.js.gz +0 -0
- package/dist/web/assets/ImageViewport-osmMzHUM.js +1 -0
- package/dist/web/assets/ImageViewport-osmMzHUM.js.br +0 -0
- package/dist/web/assets/ImageViewport-osmMzHUM.js.gz +0 -0
- package/dist/web/assets/ListParts-DL6n2vZD.js +1 -0
- package/dist/web/assets/ListParts-DL6n2vZD.js.br +0 -0
- package/dist/web/assets/ListParts-DL6n2vZD.js.gz +0 -0
- package/dist/web/assets/MediaLightbox-DfDTfyyo.js +1 -0
- package/dist/web/assets/MediaLightbox-DfDTfyyo.js.br +0 -0
- package/dist/web/assets/MediaLightbox-DfDTfyyo.js.gz +0 -0
- package/dist/web/assets/MemoryPage-C4VM8pO8.js +1 -0
- package/dist/web/assets/MemoryPage-C4VM8pO8.js.br +0 -0
- package/dist/web/assets/MemoryPage-C4VM8pO8.js.gz +0 -0
- package/dist/web/assets/Middleware-CQ3TZHhI.js +67 -0
- package/dist/web/assets/Middleware-CQ3TZHhI.js.br +0 -0
- package/dist/web/assets/Middleware-CQ3TZHhI.js.gz +0 -0
- package/dist/web/assets/MobileAppShell-CPW83S2x.js +23 -0
- package/dist/web/assets/MobileAppShell-CPW83S2x.js.br +0 -0
- package/dist/web/assets/MobileAppShell-CPW83S2x.js.gz +0 -0
- package/dist/web/assets/{ModelConnectCard-DZ3oD99k.js → ModelConnectCard-CY1w-R_8.js} +2 -2
- package/dist/web/assets/ModelConnectCard-CY1w-R_8.js.br +0 -0
- package/dist/web/assets/ModelConnectCard-CY1w-R_8.js.gz +0 -0
- package/dist/web/assets/NavScopeBoundary-7FLzmaAe.js +1 -0
- package/dist/web/assets/NavScopeBoundary-7FLzmaAe.js.br +0 -0
- package/dist/web/assets/NavScopeBoundary-7FLzmaAe.js.gz +0 -0
- package/dist/web/assets/PersonasPage-CB5q8dUU.js +3 -0
- package/dist/web/assets/PersonasPage-CB5q8dUU.js.br +0 -0
- package/dist/web/assets/PersonasPage-CB5q8dUU.js.gz +0 -0
- package/dist/web/assets/PluginPanelHost-BNSzFpXj.js +1 -0
- package/dist/web/assets/PluginPanelHost-BNSzFpXj.js.br +0 -0
- package/dist/web/assets/PluginPanelHost-BNSzFpXj.js.gz +0 -0
- package/dist/web/assets/PreviewWorkspace-itdg7TxB.js +1 -0
- package/dist/web/assets/PreviewWorkspace-itdg7TxB.js.br +0 -0
- package/dist/web/assets/PreviewWorkspace-itdg7TxB.js.gz +0 -0
- package/dist/web/assets/RoomPage-DqICeoEq.js +1 -0
- package/dist/web/assets/RoomPage-DqICeoEq.js.br +0 -0
- package/dist/web/assets/RoomPage-DqICeoEq.js.gz +0 -0
- package/dist/web/assets/{SecretField-DFIbmeTY.js → SecretField-DhvasDWA.js} +1 -1
- package/dist/web/assets/SecretField-DhvasDWA.js.br +0 -0
- package/dist/web/assets/SecretField-DhvasDWA.js.gz +0 -0
- package/dist/web/assets/{SectionCard-DWTLEA6F.js → SectionCard-CDWn1QiO.js} +1 -1
- package/dist/web/assets/SectionCard-CDWn1QiO.js.br +0 -0
- package/dist/web/assets/SectionCard-CDWn1QiO.js.gz +0 -0
- package/dist/web/assets/SettingsPage-BhaVVzpG.js +259 -0
- package/dist/web/assets/SettingsPage-BhaVVzpG.js.br +0 -0
- package/dist/web/assets/SettingsPage-BhaVVzpG.js.gz +0 -0
- package/dist/web/assets/ShellEntry-DNaOXNB7.js +2 -0
- package/dist/web/assets/ShellEntry-DNaOXNB7.js.br +0 -0
- package/dist/web/assets/ShellEntry-DNaOXNB7.js.gz +0 -0
- package/dist/web/assets/TasksPage-HHJ20hzK.js +1 -0
- package/dist/web/assets/TasksPage-HHJ20hzK.js.br +0 -0
- package/dist/web/assets/TasksPage-HHJ20hzK.js.gz +0 -0
- package/dist/web/assets/{TerminalPanel-QWFMyS_C.js → TerminalPanel-D7EDH4hR.js} +2 -2
- package/dist/web/assets/TerminalPanel-D7EDH4hR.js.br +0 -0
- package/dist/web/assets/TerminalPanel-D7EDH4hR.js.gz +0 -0
- package/dist/web/assets/UsagePage-CyB5c-8F.js +1 -0
- package/dist/web/assets/UsagePage-CyB5c-8F.js.br +0 -0
- package/dist/web/assets/UsagePage-CyB5c-8F.js.gz +0 -0
- package/dist/web/assets/WorkPage-hiw_Nngy.js +1 -0
- package/dist/web/assets/WorkPage-hiw_Nngy.js.br +0 -0
- package/dist/web/assets/WorkPage-hiw_Nngy.js.gz +0 -0
- package/dist/web/assets/abap-BdImnpbu.js.br +0 -0
- package/dist/web/assets/abap-BdImnpbu.js.gz +0 -0
- package/dist/web/assets/actionscript-3-CoDkCxhg.js.br +0 -0
- package/dist/web/assets/actionscript-3-CoDkCxhg.js.gz +0 -0
- package/dist/web/assets/ada-bCR0ucgS.js.br +0 -0
- package/dist/web/assets/ada-bCR0ucgS.js.gz +0 -0
- package/dist/web/assets/androidBridge-DgaAG2Pi.js +1 -0
- package/dist/web/assets/androidBridge-DgaAG2Pi.js.br +0 -0
- package/dist/web/assets/androidBridge-DgaAG2Pi.js.gz +0 -0
- package/dist/web/assets/andromeeda-C4gqWexZ.js.br +0 -0
- package/dist/web/assets/andromeeda-C4gqWexZ.js.gz +0 -0
- package/dist/web/assets/angular-html-CU67Zn6k.js.br +0 -0
- package/dist/web/assets/angular-html-CU67Zn6k.js.gz +0 -0
- package/dist/web/assets/angular-ts-BwZT4LLn.js.br +0 -0
- package/dist/web/assets/angular-ts-BwZT4LLn.js.gz +0 -0
- package/dist/web/assets/apache-Pmp26Uib.js.br +0 -0
- package/dist/web/assets/apache-Pmp26Uib.js.gz +0 -0
- package/dist/web/assets/apex-D8_7TLub.js.br +0 -0
- package/dist/web/assets/apex-D8_7TLub.js.gz +0 -0
- package/dist/web/assets/apl-B4CMkyY2.js.br +0 -0
- package/dist/web/assets/apl-B4CMkyY2.js.gz +0 -0
- package/dist/web/assets/apl-dKokRX4l.js.br +0 -0
- package/dist/web/assets/apl-dKokRX4l.js.gz +0 -0
- package/dist/web/assets/applescript-Co6uUVPk.js.br +0 -0
- package/dist/web/assets/applescript-Co6uUVPk.js.gz +0 -0
- package/dist/web/assets/ara-BRHolxvo.js.br +0 -0
- package/dist/web/assets/ara-BRHolxvo.js.gz +0 -0
- package/dist/web/assets/arc-DoGfTGgR.js +1 -0
- package/dist/web/assets/arc-DoGfTGgR.js.br +0 -0
- package/dist/web/assets/arc-DoGfTGgR.js.gz +0 -0
- package/dist/web/assets/asciiarmor-Df11BRmG.js.br +0 -0
- package/dist/web/assets/asciiarmor-Df11BRmG.js.gz +0 -0
- package/dist/web/assets/asciidoc-Ve4PFQV2.js.br +0 -0
- package/dist/web/assets/asciidoc-Ve4PFQV2.js.gz +0 -0
- package/dist/web/assets/{askKiki-NJNt6ZhE.js → askKiki-CgAsWGRZ.js} +2 -2
- package/dist/web/assets/askKiki-CgAsWGRZ.js.br +0 -0
- package/dist/web/assets/askKiki-CgAsWGRZ.js.gz +0 -0
- package/dist/web/assets/asm-D_Q5rh1f.js.br +0 -0
- package/dist/web/assets/asm-D_Q5rh1f.js.gz +0 -0
- package/dist/web/assets/asn1-EdZsLKOL.js.br +0 -0
- package/dist/web/assets/asn1-EdZsLKOL.js.gz +0 -0
- package/dist/web/assets/asterisk-B-8jnY81.js.br +0 -0
- package/dist/web/assets/asterisk-B-8jnY81.js.gz +0 -0
- package/dist/web/assets/astro-CbQHKStN.js.br +0 -0
- package/dist/web/assets/astro-CbQHKStN.js.gz +0 -0
- package/dist/web/assets/aurora-x-D-2ljcwZ.js.br +0 -0
- package/dist/web/assets/aurora-x-D-2ljcwZ.js.gz +0 -0
- package/dist/web/assets/awk-DMzUqQB5.js.br +0 -0
- package/dist/web/assets/awk-DMzUqQB5.js.gz +0 -0
- package/dist/web/assets/ayu-dark-DYE7WIF3.js.br +0 -0
- package/dist/web/assets/ayu-dark-DYE7WIF3.js.gz +0 -0
- package/dist/web/assets/ayu-light-BA47KaF1.js.br +0 -0
- package/dist/web/assets/ayu-light-BA47KaF1.js.gz +0 -0
- package/dist/web/assets/ayu-mirage-32ctXXKs.js.br +0 -0
- package/dist/web/assets/ayu-mirage-32ctXXKs.js.gz +0 -0
- package/dist/web/assets/ballerina-BFfxhgS-.js.br +0 -0
- package/dist/web/assets/ballerina-BFfxhgS-.js.gz +0 -0
- package/dist/web/assets/band-dPffDWoQ.js +1 -0
- package/dist/web/assets/band-dPffDWoQ.js.br +0 -0
- package/dist/web/assets/band-dPffDWoQ.js.gz +0 -0
- package/dist/web/assets/bat-BkioyH1T.js.br +0 -0
- package/dist/web/assets/bat-BkioyH1T.js.gz +0 -0
- package/dist/web/assets/beancount-k_qm7-4y.js.br +0 -0
- package/dist/web/assets/beancount-k_qm7-4y.js.gz +0 -0
- package/dist/web/assets/berry-uYugtg8r.js.br +0 -0
- package/dist/web/assets/berry-uYugtg8r.js.gz +0 -0
- package/dist/web/assets/bibtex-CHM0blh-.js.br +0 -0
- package/dist/web/assets/bibtex-CHM0blh-.js.gz +0 -0
- package/dist/web/assets/bicep-Bmn6On1c.js.br +0 -0
- package/dist/web/assets/bicep-Bmn6On1c.js.gz +0 -0
- package/dist/web/assets/bird2-DPOp833l.js.br +0 -0
- package/dist/web/assets/bird2-DPOp833l.js.gz +0 -0
- package/dist/web/assets/blade-D4QpJJKB.js.br +0 -0
- package/dist/web/assets/blade-D4QpJJKB.js.gz +0 -0
- package/dist/web/assets/brainfuck-C4LP7Hcl.js.br +0 -0
- package/dist/web/assets/brainfuck-C4LP7Hcl.js.gz +0 -0
- package/dist/web/assets/bsl-BO_Y6i37.js.br +0 -0
- package/dist/web/assets/bsl-BO_Y6i37.js.gz +0 -0
- package/dist/web/assets/c-BIGW1oBm.js.br +0 -0
- package/dist/web/assets/c-BIGW1oBm.js.gz +0 -0
- package/dist/web/assets/c3-eo99z4R2.js.br +0 -0
- package/dist/web/assets/c3-eo99z4R2.js.gz +0 -0
- package/dist/web/assets/cadence-Bv_4Rxtq.js.br +0 -0
- package/dist/web/assets/cadence-Bv_4Rxtq.js.gz +0 -0
- package/dist/web/assets/cairo-KRGpt6FW.js.br +0 -0
- package/dist/web/assets/cairo-KRGpt6FW.js.gz +0 -0
- package/dist/web/assets/catppuccin-frappe-DFWUc33u.js.br +0 -0
- package/dist/web/assets/catppuccin-frappe-DFWUc33u.js.gz +0 -0
- package/dist/web/assets/catppuccin-latte-C9dUb6Cb.js.br +0 -0
- package/dist/web/assets/catppuccin-latte-C9dUb6Cb.js.gz +0 -0
- package/dist/web/assets/catppuccin-macchiato-DQyhUUbL.js.br +0 -0
- package/dist/web/assets/catppuccin-macchiato-DQyhUUbL.js.gz +0 -0
- package/dist/web/assets/catppuccin-mocha-D87Tk5Gz.js.br +0 -0
- package/dist/web/assets/catppuccin-mocha-D87Tk5Gz.js.gz +0 -0
- package/dist/web/assets/channel-BwCaPRlV.js +1 -0
- package/dist/web/assets/channel-BwCaPRlV.js.br +0 -0
- package/dist/web/assets/channel-BwCaPRlV.js.gz +0 -0
- package/dist/web/assets/clarity-D53aC0YG.js.br +0 -0
- package/dist/web/assets/clarity-D53aC0YG.js.gz +0 -0
- package/dist/web/assets/client-cAizUM-b.js +7 -0
- package/dist/web/assets/client-cAizUM-b.js.br +0 -0
- package/dist/web/assets/client-cAizUM-b.js.gz +0 -0
- package/dist/web/assets/clike-B9uivgTg.js.br +0 -0
- package/dist/web/assets/clike-B9uivgTg.js.gz +0 -0
- package/dist/web/assets/clojure-BMjYHr_A.js.br +0 -0
- package/dist/web/assets/clojure-BMjYHr_A.js.gz +0 -0
- package/dist/web/assets/clojure-P80f7IUj.js.br +0 -0
- package/dist/web/assets/clojure-P80f7IUj.js.gz +0 -0
- package/dist/web/assets/clone-JiRK1kR-.js +1 -0
- package/dist/web/assets/clone-JiRK1kR-.js.br +0 -0
- package/dist/web/assets/clone-JiRK1kR-.js.gz +0 -0
- package/dist/web/assets/cmake-BQqOBYOt.js.br +0 -0
- package/dist/web/assets/cmake-BQqOBYOt.js.gz +0 -0
- package/dist/web/assets/cmake-D1j8_8rp.js.br +0 -0
- package/dist/web/assets/cmake-D1j8_8rp.js.gz +0 -0
- package/dist/web/assets/cobol-CWcv1MsR.js.br +0 -0
- package/dist/web/assets/cobol-CWcv1MsR.js.gz +0 -0
- package/dist/web/assets/cobol-nwyudZeR.js.br +0 -0
- package/dist/web/assets/cobol-nwyudZeR.js.gz +0 -0
- package/dist/web/assets/codeowners-Bp6g37R7.js.br +0 -0
- package/dist/web/assets/codeowners-Bp6g37R7.js.gz +0 -0
- package/dist/web/assets/codeql-DsOJ9woJ.js.br +0 -0
- package/dist/web/assets/codeql-DsOJ9woJ.js.gz +0 -0
- package/dist/web/assets/coffee-Ch7k5sss.js.br +0 -0
- package/dist/web/assets/coffee-Ch7k5sss.js.gz +0 -0
- package/dist/web/assets/coffeescript-S37ZYGWr.js.br +0 -0
- package/dist/web/assets/coffeescript-S37ZYGWr.js.gz +0 -0
- package/dist/web/assets/common-lisp-Cg-RD9OK.js.br +0 -0
- package/dist/web/assets/common-lisp-Cg-RD9OK.js.gz +0 -0
- package/dist/web/assets/commonlisp-DBKNyK5s.js.br +0 -0
- package/dist/web/assets/commonlisp-DBKNyK5s.js.gz +0 -0
- package/dist/web/assets/connection-5XKg4sL2.js +404 -0
- package/dist/web/assets/connection-5XKg4sL2.js.br +0 -0
- package/dist/web/assets/connection-5XKg4sL2.js.gz +0 -0
- package/dist/web/assets/controls-C3UrNiBn.js +1 -0
- package/dist/web/assets/controls-C3UrNiBn.js.br +0 -0
- package/dist/web/assets/controls-C3UrNiBn.js.gz +0 -0
- package/dist/web/assets/coq-DkFqJrB1.js.br +0 -0
- package/dist/web/assets/coq-DkFqJrB1.js.gz +0 -0
- package/dist/web/assets/cpp-CofmeUqb.js.br +0 -0
- package/dist/web/assets/cpp-CofmeUqb.js.gz +0 -0
- package/dist/web/assets/crystal-SjHAIU92.js.br +0 -0
- package/dist/web/assets/crystal-SjHAIU92.js.gz +0 -0
- package/dist/web/assets/crystal-tKQVLTB8.js.br +0 -0
- package/dist/web/assets/crystal-tKQVLTB8.js.gz +0 -0
- package/dist/web/assets/csharp-COcwbKMJ.js.br +0 -0
- package/dist/web/assets/csharp-COcwbKMJ.js.gz +0 -0
- package/dist/web/assets/css-BnMrqG3P.js.br +0 -0
- package/dist/web/assets/css-BnMrqG3P.js.gz +0 -0
- package/dist/web/assets/css-DPfMkruS.js.br +0 -0
- package/dist/web/assets/css-DPfMkruS.js.gz +0 -0
- package/dist/web/assets/csv-fuZLfV_i.js.br +0 -0
- package/dist/web/assets/csv-fuZLfV_i.js.gz +0 -0
- package/dist/web/assets/cue-D82EKSYY.js.br +0 -0
- package/dist/web/assets/cue-D82EKSYY.js.gz +0 -0
- package/dist/web/assets/cypher-COkxafJQ.js.br +0 -0
- package/dist/web/assets/cypher-COkxafJQ.js.gz +0 -0
- package/dist/web/assets/cypher-C_CwsFkJ.js.br +0 -0
- package/dist/web/assets/cypher-C_CwsFkJ.js.gz +0 -0
- package/dist/web/assets/cytoscape-cose-bilkent-CGdh9URw.js +1 -0
- package/dist/web/assets/cytoscape-cose-bilkent-CGdh9URw.js.br +0 -0
- package/dist/web/assets/cytoscape-cose-bilkent-CGdh9URw.js.gz +0 -0
- package/dist/web/assets/cytoscape-fcose-ZavmgdCc.js +1 -0
- package/dist/web/assets/cytoscape-fcose-ZavmgdCc.js.br +0 -0
- package/dist/web/assets/cytoscape-fcose-ZavmgdCc.js.gz +0 -0
- package/dist/web/assets/cytoscape.esm-nFXppDBa.js.br +0 -0
- package/dist/web/assets/cytoscape.esm-nFXppDBa.js.gz +0 -0
- package/dist/web/assets/d-85-TOEBH.js.br +0 -0
- package/dist/web/assets/d-85-TOEBH.js.gz +0 -0
- package/dist/web/assets/d-pRatUO7H.js.br +0 -0
- package/dist/web/assets/d-pRatUO7H.js.gz +0 -0
- package/dist/web/assets/dark-plus-C3mMm8J8.js.br +0 -0
- package/dist/web/assets/dark-plus-C3mMm8J8.js.gz +0 -0
- package/dist/web/assets/dart-CF10PKvl.js.br +0 -0
- package/dist/web/assets/dart-CF10PKvl.js.gz +0 -0
- package/dist/web/assets/dax-CEL-wOlO.js.br +0 -0
- package/dist/web/assets/dax-CEL-wOlO.js.gz +0 -0
- package/dist/web/assets/{defaultLocale-DX6XiGOO.js → defaultLocale-5voVPcsN.js} +1 -1
- package/dist/web/assets/defaultLocale-5voVPcsN.js.br +0 -0
- package/dist/web/assets/defaultLocale-5voVPcsN.js.gz +0 -0
- package/dist/web/assets/desktop-BmXAJ9_W.js.br +0 -0
- package/dist/web/assets/desktop-BmXAJ9_W.js.gz +0 -0
- package/dist/web/assets/diff-D97Zzqfu.js.br +0 -0
- package/dist/web/assets/diff-D97Zzqfu.js.gz +0 -0
- package/dist/web/assets/diff-DbItnlRl.js.br +0 -0
- package/dist/web/assets/diff-DbItnlRl.js.gz +0 -0
- package/dist/web/assets/docker-BcOcwvcX.js.br +0 -0
- package/dist/web/assets/docker-BcOcwvcX.js.gz +0 -0
- package/dist/web/assets/dockerfile-BKs6k2Af.js.br +0 -0
- package/dist/web/assets/dockerfile-BKs6k2Af.js.gz +0 -0
- package/dist/web/assets/dotenv-Da5cRb03.js.br +0 -0
- package/dist/web/assets/dotenv-Da5cRb03.js.gz +0 -0
- package/dist/web/assets/dracula-BzJJZx-M.js.br +0 -0
- package/dist/web/assets/dracula-BzJJZx-M.js.gz +0 -0
- package/dist/web/assets/dracula-soft-BXkSAIEj.js.br +0 -0
- package/dist/web/assets/dracula-soft-BXkSAIEj.js.gz +0 -0
- package/dist/web/assets/dream-maker-BtqSS_iP.js.br +0 -0
- package/dist/web/assets/dream-maker-BtqSS_iP.js.gz +0 -0
- package/dist/web/assets/dtd-DF_7sFjM.js.br +0 -0
- package/dist/web/assets/dtd-DF_7sFjM.js.gz +0 -0
- package/dist/web/assets/duration-BNAPaH6N.js +1 -0
- package/dist/web/assets/duration-BNAPaH6N.js.br +0 -0
- package/dist/web/assets/duration-BNAPaH6N.js.gz +0 -0
- package/dist/web/assets/dylan-DwRh75JA.js.br +0 -0
- package/dist/web/assets/dylan-DwRh75JA.js.gz +0 -0
- package/dist/web/assets/ebnf-CDyGwa7X.js.br +0 -0
- package/dist/web/assets/ebnf-CDyGwa7X.js.gz +0 -0
- package/dist/web/assets/ecl-Cabwm37j.js.br +0 -0
- package/dist/web/assets/ecl-Cabwm37j.js.gz +0 -0
- package/dist/web/assets/edge-BkV0erSs.js.br +0 -0
- package/dist/web/assets/edge-BkV0erSs.js.gz +0 -0
- package/dist/web/assets/eiffel-CnydiIhH.js.br +0 -0
- package/dist/web/assets/eiffel-CnydiIhH.js.gz +0 -0
- package/dist/web/assets/elixir-CDX3lj18.js.br +0 -0
- package/dist/web/assets/elixir-CDX3lj18.js.gz +0 -0
- package/dist/web/assets/elm-DbKCFpqz.js.br +0 -0
- package/dist/web/assets/elm-DbKCFpqz.js.gz +0 -0
- package/dist/web/assets/elm-vLlmbW-K.js.br +0 -0
- package/dist/web/assets/elm-vLlmbW-K.js.gz +0 -0
- package/dist/web/assets/emacs-lisp-C9XAeP06.js.br +0 -0
- package/dist/web/assets/emacs-lisp-C9XAeP06.js.gz +0 -0
- package/dist/web/assets/erb-B12qg9BL.js.br +0 -0
- package/dist/web/assets/erb-B12qg9BL.js.gz +0 -0
- package/dist/web/assets/erlang-BNw1qcRV.js.br +0 -0
- package/dist/web/assets/erlang-BNw1qcRV.js.gz +0 -0
- package/dist/web/assets/erlang-DsQrWhSR.js.br +0 -0
- package/dist/web/assets/erlang-DsQrWhSR.js.gz +0 -0
- package/dist/web/assets/everforest-dark-BgDCqdQA.js.br +0 -0
- package/dist/web/assets/everforest-dark-BgDCqdQA.js.gz +0 -0
- package/dist/web/assets/everforest-light-C8M2exoo.js.br +0 -0
- package/dist/web/assets/everforest-light-C8M2exoo.js.gz +0 -0
- package/dist/web/assets/{export-mMswqyX7.js → export-BlURphmw.js} +2 -2
- package/dist/web/assets/export-BlURphmw.js.br +0 -0
- package/dist/web/assets/export-BlURphmw.js.gz +0 -0
- package/dist/web/assets/factor-kuTfRLto.js.br +0 -0
- package/dist/web/assets/factor-kuTfRLto.js.gz +0 -0
- package/dist/web/assets/fcl-Kvtd6kyn.js.br +0 -0
- package/dist/web/assets/fcl-Kvtd6kyn.js.gz +0 -0
- package/dist/web/assets/fennel-BYunw83y.js.br +0 -0
- package/dist/web/assets/fennel-BYunw83y.js.gz +0 -0
- package/dist/web/assets/fish-BvzEVeQv.js.br +0 -0
- package/dist/web/assets/fish-BvzEVeQv.js.gz +0 -0
- package/dist/web/assets/fluent-C4IJs8-o.js.br +0 -0
- package/dist/web/assets/fluent-C4IJs8-o.js.gz +0 -0
- package/dist/web/assets/forth-Ffai-XNe.js.br +0 -0
- package/dist/web/assets/forth-Ffai-XNe.js.gz +0 -0
- package/dist/web/assets/fortran-DYz_wnZ1.js.br +0 -0
- package/dist/web/assets/fortran-DYz_wnZ1.js.gz +0 -0
- package/dist/web/assets/fortran-fixed-form-CkoXwp7k.js.br +0 -0
- package/dist/web/assets/fortran-fixed-form-CkoXwp7k.js.gz +0 -0
- package/dist/web/assets/fortran-free-form-BxgE0vQu.js.br +0 -0
- package/dist/web/assets/fortran-free-form-BxgE0vQu.js.gz +0 -0
- package/dist/web/assets/fsharp-CXgrBDvD.js.br +0 -0
- package/dist/web/assets/fsharp-CXgrBDvD.js.gz +0 -0
- package/dist/web/assets/gas-Bneqetm1.js.br +0 -0
- package/dist/web/assets/gas-Bneqetm1.js.gz +0 -0
- package/dist/web/assets/gdresource-BOOCDP_w.js.br +0 -0
- package/dist/web/assets/gdresource-BOOCDP_w.js.gz +0 -0
- package/dist/web/assets/gdscript-C5YyOfLZ.js.br +0 -0
- package/dist/web/assets/gdscript-C5YyOfLZ.js.gz +0 -0
- package/dist/web/assets/gdshader-DkwncUOv.js.br +0 -0
- package/dist/web/assets/gdshader-DkwncUOv.js.gz +0 -0
- package/dist/web/assets/genie-D0YGMca9.js.br +0 -0
- package/dist/web/assets/genie-D0YGMca9.js.gz +0 -0
- package/dist/web/assets/gherkin-DyxjwDmM.js.br +0 -0
- package/dist/web/assets/gherkin-DyxjwDmM.js.gz +0 -0
- package/dist/web/assets/gherkin-heZmZLOM.js.br +0 -0
- package/dist/web/assets/gherkin-heZmZLOM.js.gz +0 -0
- package/dist/web/assets/git-commit-F4YmCXRG.js.br +0 -0
- package/dist/web/assets/git-commit-F4YmCXRG.js.gz +0 -0
- package/dist/web/assets/git-rebase-r7XF79zn.js.br +0 -0
- package/dist/web/assets/git-rebase-r7XF79zn.js.gz +0 -0
- package/dist/web/assets/github-dark-DHJKELXO.js.br +0 -0
- package/dist/web/assets/github-dark-DHJKELXO.js.gz +0 -0
- package/dist/web/assets/github-dark-default-Cuk6v7N8.js.br +0 -0
- package/dist/web/assets/github-dark-default-Cuk6v7N8.js.gz +0 -0
- package/dist/web/assets/github-dark-dimmed-DH5Ifo-i.js.br +0 -0
- package/dist/web/assets/github-dark-dimmed-DH5Ifo-i.js.gz +0 -0
- package/dist/web/assets/github-dark-high-contrast-E3gJ1_iC.js.br +0 -0
- package/dist/web/assets/github-dark-high-contrast-E3gJ1_iC.js.gz +0 -0
- package/dist/web/assets/github-light-DAi9KRSo.js.br +0 -0
- package/dist/web/assets/github-light-DAi9KRSo.js.gz +0 -0
- package/dist/web/assets/github-light-default-D7oLnXFd.js.br +0 -0
- package/dist/web/assets/github-light-default-D7oLnXFd.js.gz +0 -0
- package/dist/web/assets/github-light-high-contrast-BfjtVDDH.js.br +0 -0
- package/dist/web/assets/github-light-high-contrast-BfjtVDDH.js.gz +0 -0
- package/dist/web/assets/gleam-BspZqrRM.js.br +0 -0
- package/dist/web/assets/gleam-BspZqrRM.js.gz +0 -0
- package/dist/web/assets/glimmer-js-Rg0-pVw9.js.br +0 -0
- package/dist/web/assets/glimmer-js-Rg0-pVw9.js.gz +0 -0
- package/dist/web/assets/glimmer-ts-U6CK756n.js.br +0 -0
- package/dist/web/assets/glimmer-ts-U6CK756n.js.gz +0 -0
- package/dist/web/assets/glsl-DplSGwfg.js.br +0 -0
- package/dist/web/assets/glsl-DplSGwfg.js.gz +0 -0
- package/dist/web/assets/gn-n2N0HUVH.js.br +0 -0
- package/dist/web/assets/gn-n2N0HUVH.js.gz +0 -0
- package/dist/web/assets/gnuplot-DdkO51Og.js.br +0 -0
- package/dist/web/assets/gnuplot-DdkO51Og.js.gz +0 -0
- package/dist/web/assets/go-CxLEBnE3.js.br +0 -0
- package/dist/web/assets/go-CxLEBnE3.js.gz +0 -0
- package/dist/web/assets/graph--OzhPTMs.js.br +0 -0
- package/dist/web/assets/graph--OzhPTMs.js.gz +0 -0
- package/dist/web/assets/graphql-ChdNCCLP.js.br +0 -0
- package/dist/web/assets/graphql-ChdNCCLP.js.gz +0 -0
- package/dist/web/assets/groovy-D9Dt4D0W.js.br +0 -0
- package/dist/web/assets/groovy-D9Dt4D0W.js.gz +0 -0
- package/dist/web/assets/groovy-gcz8RCvz.js.br +0 -0
- package/dist/web/assets/groovy-gcz8RCvz.js.gz +0 -0
- package/dist/web/assets/gruvbox-dark-hard-CFHQjOhq.js.br +0 -0
- package/dist/web/assets/gruvbox-dark-hard-CFHQjOhq.js.gz +0 -0
- package/dist/web/assets/gruvbox-dark-medium-GsRaNv29.js.br +0 -0
- package/dist/web/assets/gruvbox-dark-medium-GsRaNv29.js.gz +0 -0
- package/dist/web/assets/gruvbox-dark-soft-CVdnzihN.js.br +0 -0
- package/dist/web/assets/gruvbox-dark-soft-CVdnzihN.js.gz +0 -0
- package/dist/web/assets/gruvbox-light-hard-CH1njM8p.js.br +0 -0
- package/dist/web/assets/gruvbox-light-hard-CH1njM8p.js.gz +0 -0
- package/dist/web/assets/gruvbox-light-medium-DRw_LuNl.js.br +0 -0
- package/dist/web/assets/gruvbox-light-medium-DRw_LuNl.js.gz +0 -0
- package/dist/web/assets/gruvbox-light-soft-hJgmCMqR.js.br +0 -0
- package/dist/web/assets/gruvbox-light-soft-hJgmCMqR.js.gz +0 -0
- package/dist/web/assets/hack-CaT9iCJl.js.br +0 -0
- package/dist/web/assets/hack-CaT9iCJl.js.gz +0 -0
- package/dist/web/assets/haml-B8DHNrY2.js.br +0 -0
- package/dist/web/assets/haml-B8DHNrY2.js.gz +0 -0
- package/dist/web/assets/handlebars-BL8al0AC.js.br +0 -0
- package/dist/web/assets/handlebars-BL8al0AC.js.gz +0 -0
- package/dist/web/assets/haskell-Cw1EW3IL.js.br +0 -0
- package/dist/web/assets/haskell-Cw1EW3IL.js.gz +0 -0
- package/dist/web/assets/haskell-Df6bDoY_.js.br +0 -0
- package/dist/web/assets/haskell-Df6bDoY_.js.gz +0 -0
- package/dist/web/assets/haxe-CzTSHFRz.js.br +0 -0
- package/dist/web/assets/haxe-CzTSHFRz.js.gz +0 -0
- package/dist/web/assets/haxe-H-WmDvRZ.js.br +0 -0
- package/dist/web/assets/haxe-H-WmDvRZ.js.gz +0 -0
- package/dist/web/assets/hcl-BWvSN4gD.js.br +0 -0
- package/dist/web/assets/hcl-BWvSN4gD.js.gz +0 -0
- package/dist/web/assets/highlighted-body-OFNGDK62-CF-6XyfM.js +1 -0
- package/dist/web/assets/highlighted-body-OFNGDK62-CF-6XyfM.js.br +0 -0
- package/dist/web/assets/highlighted-body-OFNGDK62-CF-6XyfM.js.gz +0 -0
- package/dist/web/assets/hjson-D5-asLiD.js.br +0 -0
- package/dist/web/assets/hjson-D5-asLiD.js.gz +0 -0
- package/dist/web/assets/hlsl-D3lLCCz7.js.br +0 -0
- package/dist/web/assets/hlsl-D3lLCCz7.js.gz +0 -0
- package/dist/web/assets/horizon-BUw7H-hv.js.br +0 -0
- package/dist/web/assets/horizon-BUw7H-hv.js.gz +0 -0
- package/dist/web/assets/horizon-bright-Cn-bp-IR.js.br +0 -0
- package/dist/web/assets/horizon-bright-Cn-bp-IR.js.gz +0 -0
- package/dist/web/assets/houston-DnULxvSX.js.br +0 -0
- package/dist/web/assets/houston-DnULxvSX.js.gz +0 -0
- package/dist/web/assets/html-GMplVEZG.js.br +0 -0
- package/dist/web/assets/html-GMplVEZG.js.gz +0 -0
- package/dist/web/assets/html-derivative-BFtXZ54Q.js.br +0 -0
- package/dist/web/assets/html-derivative-BFtXZ54Q.js.gz +0 -0
- package/dist/web/assets/http-DBlCnlav.js.br +0 -0
- package/dist/web/assets/http-DBlCnlav.js.gz +0 -0
- package/dist/web/assets/http-jrhK8wxY.js.br +0 -0
- package/dist/web/assets/http-jrhK8wxY.js.gz +0 -0
- package/dist/web/assets/hurl-irOxFIW8.js.br +0 -0
- package/dist/web/assets/hurl-irOxFIW8.js.gz +0 -0
- package/dist/web/assets/hxml-Bvhsp5Yf.js.br +0 -0
- package/dist/web/assets/hxml-Bvhsp5Yf.js.gz +0 -0
- package/dist/web/assets/hy-DFXneXwc.js.br +0 -0
- package/dist/web/assets/hy-DFXneXwc.js.gz +0 -0
- package/dist/web/assets/idl-BEugSyMb.js.br +0 -0
- package/dist/web/assets/idl-BEugSyMb.js.gz +0 -0
- package/dist/web/assets/imba-DGztddWO.js.br +0 -0
- package/dist/web/assets/imba-DGztddWO.js.gz +0 -0
- package/dist/web/assets/index-AtrTtxWl.js +1 -0
- package/dist/web/assets/index-AtrTtxWl.js.br +0 -0
- package/dist/web/assets/index-AtrTtxWl.js.gz +0 -0
- package/dist/web/assets/index-BBEGEj83.js +1 -0
- package/dist/web/assets/index-BBEGEj83.js.br +0 -0
- package/dist/web/assets/index-BBEGEj83.js.gz +0 -0
- package/dist/web/assets/index-BDdIDEp4.js +1 -0
- package/dist/web/assets/index-BDdIDEp4.js.br +0 -0
- package/dist/web/assets/index-BDdIDEp4.js.gz +0 -0
- package/dist/web/assets/index-BIfumokk.js +1 -0
- package/dist/web/assets/index-BIfumokk.js.br +0 -0
- package/dist/web/assets/index-BIfumokk.js.gz +0 -0
- package/dist/web/assets/index-BLi2nTxe.js +206 -0
- package/dist/web/assets/index-BLi2nTxe.js.br +0 -0
- package/dist/web/assets/index-BLi2nTxe.js.gz +0 -0
- package/dist/web/assets/{index-BHly9bb_.js → index-BNFiIuBC.js} +1 -1
- package/dist/web/assets/index-BNFiIuBC.js.br +0 -0
- package/dist/web/assets/index-BNFiIuBC.js.gz +0 -0
- package/dist/web/assets/index-BOXDlCpS.js +1 -0
- package/dist/web/assets/index-BOXDlCpS.js.br +0 -0
- package/dist/web/assets/index-BOXDlCpS.js.gz +0 -0
- package/dist/web/assets/index-BPG2nU9y.js +1 -0
- package/dist/web/assets/index-BPG2nU9y.js.br +0 -0
- package/dist/web/assets/index-BPG2nU9y.js.gz +0 -0
- package/dist/web/assets/index-BSVOVe3D.js +1 -0
- package/dist/web/assets/index-BSVOVe3D.js.br +0 -0
- package/dist/web/assets/index-BSVOVe3D.js.gz +0 -0
- package/dist/web/assets/{index-C9M75mVg.js → index-BT8zjpNF.js} +4 -4
- package/dist/web/assets/index-BT8zjpNF.js.br +0 -0
- package/dist/web/assets/index-BT8zjpNF.js.gz +0 -0
- package/dist/web/assets/{index-Bry0pMwp.js → index-BTHoDcN1.js} +2 -2
- package/dist/web/assets/index-BTHoDcN1.js.br +0 -0
- package/dist/web/assets/index-BTHoDcN1.js.gz +0 -0
- package/dist/web/assets/{index-DxlP-RnZ.js → index-BWFj-16K.js} +1 -1
- package/dist/web/assets/index-BWFj-16K.js.br +0 -0
- package/dist/web/assets/index-BWFj-16K.js.gz +0 -0
- package/dist/web/assets/index-BYkQjRc-.js +1 -0
- package/dist/web/assets/index-BYkQjRc-.js.br +0 -0
- package/dist/web/assets/index-BYkQjRc-.js.gz +0 -0
- package/dist/web/assets/{index-wYbP0VdO.js → index-BbmM2LEW.js} +2 -2
- package/dist/web/assets/index-BbmM2LEW.js.br +0 -0
- package/dist/web/assets/index-BbmM2LEW.js.gz +0 -0
- package/dist/web/assets/{index-BA9G_SDz.js → index-C6n6XERd.js} +1 -1
- package/dist/web/assets/index-C6n6XERd.js.br +0 -0
- package/dist/web/assets/index-C6n6XERd.js.gz +0 -0
- package/dist/web/assets/index-C83WoUbd.js +1 -0
- package/dist/web/assets/index-C83WoUbd.js.br +0 -0
- package/dist/web/assets/index-C83WoUbd.js.gz +0 -0
- package/dist/web/assets/index-C8DDOUJx.css +1 -0
- package/dist/web/assets/index-C8DDOUJx.css.br +0 -0
- package/dist/web/assets/index-C8DDOUJx.css.gz +0 -0
- package/dist/web/assets/{index-Bdx0etDz.js → index-C9DdZFNJ.js} +1 -1
- package/dist/web/assets/index-C9DdZFNJ.js.br +0 -0
- package/dist/web/assets/index-C9DdZFNJ.js.gz +0 -0
- package/dist/web/assets/index-CP99-KdF.js +1 -0
- package/dist/web/assets/index-CP99-KdF.js.br +0 -0
- package/dist/web/assets/index-CP99-KdF.js.gz +0 -0
- package/dist/web/assets/{index-Bf5YCkSy.js → index-CVrtusX9.js} +1 -1
- package/dist/web/assets/index-CVrtusX9.js.br +0 -0
- package/dist/web/assets/index-CVrtusX9.js.gz +0 -0
- package/dist/web/assets/{index-BcSha9Jz.js → index-ChTpz7dO.js} +2 -2
- package/dist/web/assets/index-ChTpz7dO.js.br +0 -0
- package/dist/web/assets/index-ChTpz7dO.js.gz +0 -0
- package/dist/web/assets/{index-DHMHDDXt.js → index-CjceQ8Nh.js} +1 -1
- package/dist/web/assets/index-CjceQ8Nh.js.br +0 -0
- package/dist/web/assets/index-CjceQ8Nh.js.gz +0 -0
- package/dist/web/assets/index-CsKZwkF5.js +1 -0
- package/dist/web/assets/index-CsKZwkF5.js.br +0 -0
- package/dist/web/assets/index-CsKZwkF5.js.gz +0 -0
- package/dist/web/assets/index-CvYzv8kf.js +1 -0
- package/dist/web/assets/index-CvYzv8kf.js.br +0 -0
- package/dist/web/assets/index-CvYzv8kf.js.gz +0 -0
- package/dist/web/assets/index-D2CHDVPg.js +1 -0
- package/dist/web/assets/index-D2CHDVPg.js.br +0 -0
- package/dist/web/assets/index-D2CHDVPg.js.gz +0 -0
- package/dist/web/assets/index-D4M-EXnj.js +1 -0
- package/dist/web/assets/index-D4M-EXnj.js.br +0 -0
- package/dist/web/assets/index-D4M-EXnj.js.gz +0 -0
- package/dist/web/assets/{index-jXLzpyDX.js → index-DHqpUC48.js} +2 -2
- package/dist/web/assets/index-DHqpUC48.js.br +0 -0
- package/dist/web/assets/index-DHqpUC48.js.gz +0 -0
- package/dist/web/assets/{index-0gPR5d3F.js → index-Da0Nrt28.js} +1 -1
- package/dist/web/assets/index-Da0Nrt28.js.br +0 -0
- package/dist/web/assets/index-Da0Nrt28.js.gz +0 -0
- package/dist/web/assets/index-DyWRj5df.js +1 -0
- package/dist/web/assets/index-DyWRj5df.js.br +0 -0
- package/dist/web/assets/index-DyWRj5df.js.gz +0 -0
- package/dist/web/assets/{index-Ke_VZNNU.js → index-DyZAPivK.js} +5 -5
- package/dist/web/assets/index-DyZAPivK.js.br +0 -0
- package/dist/web/assets/index-DyZAPivK.js.gz +0 -0
- package/dist/web/assets/index-FqFCN7CT.js +13 -0
- package/dist/web/assets/index-FqFCN7CT.js.br +0 -0
- package/dist/web/assets/index-FqFCN7CT.js.gz +0 -0
- package/dist/web/assets/index-L9ABPsXe.js +1 -0
- package/dist/web/assets/index-L9ABPsXe.js.br +0 -0
- package/dist/web/assets/index-L9ABPsXe.js.gz +0 -0
- package/dist/web/assets/ini-BEwlwnbL.js.br +0 -0
- package/dist/web/assets/ini-BEwlwnbL.js.gz +0 -0
- package/dist/web/assets/init-Gi6I4Gst.js.br +0 -0
- package/dist/web/assets/init-Gi6I4Gst.js.gz +0 -0
- package/dist/web/assets/java-CylS5w8V.js.br +0 -0
- package/dist/web/assets/java-CylS5w8V.js.gz +0 -0
- package/dist/web/assets/javascript-iXu5QeM3.js.br +0 -0
- package/dist/web/assets/javascript-iXu5QeM3.js.gz +0 -0
- package/dist/web/assets/javascript-wDzz0qaB.js.br +0 -0
- package/dist/web/assets/javascript-wDzz0qaB.js.gz +0 -0
- package/dist/web/assets/jinja-4LBKfQ-Z.js.br +0 -0
- package/dist/web/assets/jinja-4LBKfQ-Z.js.gz +0 -0
- package/dist/web/assets/jison-wvAkD_A8.js.br +0 -0
- package/dist/web/assets/jison-wvAkD_A8.js.gz +0 -0
- package/dist/web/assets/json-Cp-IABpG.js.br +0 -0
- package/dist/web/assets/json-Cp-IABpG.js.gz +0 -0
- package/dist/web/assets/json-DQCdPPbD.js +1 -0
- package/dist/web/assets/json-DQCdPPbD.js.br +0 -0
- package/dist/web/assets/json-DQCdPPbD.js.gz +0 -0
- package/dist/web/assets/json5-C9tS-k6U.js.br +0 -0
- package/dist/web/assets/json5-C9tS-k6U.js.gz +0 -0
- package/dist/web/assets/jsonc-Des-eS-w.js.br +0 -0
- package/dist/web/assets/jsonc-Des-eS-w.js.gz +0 -0
- package/dist/web/assets/jsonl-DcaNXYhu.js.br +0 -0
- package/dist/web/assets/jsonl-DcaNXYhu.js.gz +0 -0
- package/dist/web/assets/jsonnet-DFQXde-d.js.br +0 -0
- package/dist/web/assets/jsonnet-DFQXde-d.js.gz +0 -0
- package/dist/web/assets/jssm-C2t-YnRu.js.br +0 -0
- package/dist/web/assets/jssm-C2t-YnRu.js.gz +0 -0
- package/dist/web/assets/jsx-g9-lgVsj.js.br +0 -0
- package/dist/web/assets/jsx-g9-lgVsj.js.gz +0 -0
- package/dist/web/assets/julia-CxzCAyBv.js.br +0 -0
- package/dist/web/assets/julia-CxzCAyBv.js.gz +0 -0
- package/dist/web/assets/julia-DuME0IfC.js.br +0 -0
- package/dist/web/assets/julia-DuME0IfC.js.gz +0 -0
- package/dist/web/assets/just-Cw27pwNe.js.br +0 -0
- package/dist/web/assets/just-Cw27pwNe.js.gz +0 -0
- package/dist/web/assets/kanagawa-dragon-CkXjmgJE.js.br +0 -0
- package/dist/web/assets/kanagawa-dragon-CkXjmgJE.js.gz +0 -0
- package/dist/web/assets/kanagawa-lotus-CfQXZHmo.js.br +0 -0
- package/dist/web/assets/kanagawa-lotus-CfQXZHmo.js.gz +0 -0
- package/dist/web/assets/kanagawa-wave-DWedfzmr.js.br +0 -0
- package/dist/web/assets/kanagawa-wave-DWedfzmr.js.gz +0 -0
- package/dist/web/assets/katex-HP8lGamR.js.br +0 -0
- package/dist/web/assets/katex-HP8lGamR.js.gz +0 -0
- package/dist/web/assets/kdl-DV7GczEv.js.br +0 -0
- package/dist/web/assets/kdl-DV7GczEv.js.gz +0 -0
- package/dist/web/assets/kotlin-BdnUsdx6.js.br +0 -0
- package/dist/web/assets/kotlin-BdnUsdx6.js.gz +0 -0
- package/dist/web/assets/kusto-DZf3V79B.js.br +0 -0
- package/dist/web/assets/kusto-DZf3V79B.js.gz +0 -0
- package/dist/web/assets/laserwave-DUszq2jm.js.br +0 -0
- package/dist/web/assets/laserwave-DUszq2jm.js.gz +0 -0
- package/dist/web/assets/latex-CWtU0Tv5.js.br +0 -0
- package/dist/web/assets/latex-CWtU0Tv5.js.gz +0 -0
- package/dist/web/assets/layout-SsrduOYp.js.br +0 -0
- package/dist/web/assets/layout-SsrduOYp.js.gz +0 -0
- package/dist/web/assets/layoutHooks-BzE4xDdh.js +1 -0
- package/dist/web/assets/layoutHooks-BzE4xDdh.js.br +0 -0
- package/dist/web/assets/layoutHooks-BzE4xDdh.js.gz +0 -0
- package/dist/web/assets/lean-BZvkOJ9d.js.br +0 -0
- package/dist/web/assets/lean-BZvkOJ9d.js.gz +0 -0
- package/dist/web/assets/less-B1dDrJ26.js.br +0 -0
- package/dist/web/assets/less-B1dDrJ26.js.gz +0 -0
- package/dist/web/assets/light-plus-B7mTdjB0.js.br +0 -0
- package/dist/web/assets/light-plus-B7mTdjB0.js.gz +0 -0
- package/dist/web/assets/linear-8XOvhBtb.js +1 -0
- package/dist/web/assets/linear-8XOvhBtb.js.br +0 -0
- package/dist/web/assets/linear-8XOvhBtb.js.gz +0 -0
- package/dist/web/assets/liquid-DYVedYrR.js.br +0 -0
- package/dist/web/assets/liquid-DYVedYrR.js.gz +0 -0
- package/dist/web/assets/livescript-BwQOo05w.js.br +0 -0
- package/dist/web/assets/livescript-BwQOo05w.js.gz +0 -0
- package/dist/web/assets/llvm-DjAJT7YJ.js.br +0 -0
- package/dist/web/assets/llvm-DjAJT7YJ.js.gz +0 -0
- package/dist/web/assets/log-2UxHyX5q.js.br +0 -0
- package/dist/web/assets/log-2UxHyX5q.js.gz +0 -0
- package/dist/web/assets/logo-BtOb2qkB.js.br +0 -0
- package/dist/web/assets/logo-BtOb2qkB.js.gz +0 -0
- package/dist/web/assets/lua-BaeVxFsk.js.br +0 -0
- package/dist/web/assets/lua-BaeVxFsk.js.gz +0 -0
- package/dist/web/assets/lua-VAEuO923.js.br +0 -0
- package/dist/web/assets/lua-VAEuO923.js.gz +0 -0
- package/dist/web/assets/luau-C-HG3fhB.js.br +0 -0
- package/dist/web/assets/luau-C-HG3fhB.js.gz +0 -0
- package/dist/web/assets/make-CHLpvVh8.js.br +0 -0
- package/dist/web/assets/make-CHLpvVh8.js.gz +0 -0
- package/dist/web/assets/markdown-Cvjx9yec.js.br +0 -0
- package/dist/web/assets/markdown-Cvjx9yec.js.gz +0 -0
- package/dist/web/assets/marko-CnJfTvn9.js.br +0 -0
- package/dist/web/assets/marko-CnJfTvn9.js.gz +0 -0
- package/dist/web/assets/material-theme-D5KoaKCx.js.br +0 -0
- package/dist/web/assets/material-theme-D5KoaKCx.js.gz +0 -0
- package/dist/web/assets/material-theme-darker-BfHTSMKl.js.br +0 -0
- package/dist/web/assets/material-theme-darker-BfHTSMKl.js.gz +0 -0
- package/dist/web/assets/material-theme-lighter-B0m2ddpp.js.br +0 -0
- package/dist/web/assets/material-theme-lighter-B0m2ddpp.js.gz +0 -0
- package/dist/web/assets/material-theme-ocean-CyktbL80.js.br +0 -0
- package/dist/web/assets/material-theme-ocean-CyktbL80.js.gz +0 -0
- package/dist/web/assets/material-theme-palenight-Csfq5Kiy.js.br +0 -0
- package/dist/web/assets/material-theme-palenight-Csfq5Kiy.js.gz +0 -0
- package/dist/web/assets/mathematica-DTrFuWx2.js.br +0 -0
- package/dist/web/assets/mathematica-DTrFuWx2.js.gz +0 -0
- package/dist/web/assets/matlab-D7o27uSR.js.br +0 -0
- package/dist/web/assets/matlab-D7o27uSR.js.gz +0 -0
- package/dist/web/assets/mbox-CNhZ1qSd.js.br +0 -0
- package/dist/web/assets/mbox-CNhZ1qSd.js.gz +0 -0
- package/dist/web/assets/mdc-BMNejdWA.js.br +0 -0
- package/dist/web/assets/mdc-BMNejdWA.js.gz +0 -0
- package/dist/web/assets/mdx-Cmh6b_Ma.js.br +0 -0
- package/dist/web/assets/mdx-Cmh6b_Ma.js.gz +0 -0
- package/dist/web/assets/{memoryAuthority-DU5hzCm_.js → memoryAuthority-B8YSN2MI.js} +1 -1
- package/dist/web/assets/memoryAuthority-B8YSN2MI.js.br +0 -0
- package/dist/web/assets/memoryAuthority-B8YSN2MI.js.gz +0 -0
- package/dist/web/assets/mermaid-GHXKKRXX-D3Z62_uv.css +1 -0
- package/dist/web/assets/mermaid-GHXKKRXX-D3Z62_uv.css.br +0 -0
- package/dist/web/assets/mermaid-GHXKKRXX-D3Z62_uv.css.gz +0 -0
- package/dist/web/assets/mermaid-GHXKKRXX-DmcDxWiS.js +190 -0
- package/dist/web/assets/mermaid-GHXKKRXX-DmcDxWiS.js.br +0 -0
- package/dist/web/assets/mermaid-GHXKKRXX-DmcDxWiS.js.gz +0 -0
- package/dist/web/assets/mermaid-engine-AE7SfXFQ.js +2547 -0
- package/dist/web/assets/mermaid-engine-AE7SfXFQ.js.br +0 -0
- package/dist/web/assets/mermaid-engine-AE7SfXFQ.js.gz +0 -0
- package/dist/web/assets/mermaid-mWjccvbQ.js.br +0 -0
- package/dist/web/assets/mermaid-mWjccvbQ.js.gz +0 -0
- package/dist/web/assets/min-dark-CafNBF8u.js.br +0 -0
- package/dist/web/assets/min-dark-CafNBF8u.js.gz +0 -0
- package/dist/web/assets/min-light-CTRr51gU.js.br +0 -0
- package/dist/web/assets/min-light-CTRr51gU.js.gz +0 -0
- package/dist/web/assets/mipsasm-CKIfxQSi.js.br +0 -0
- package/dist/web/assets/mipsasm-CKIfxQSi.js.gz +0 -0
- package/dist/web/assets/mirc-CjQqDB4T.js.br +0 -0
- package/dist/web/assets/mirc-CjQqDB4T.js.gz +0 -0
- package/dist/web/assets/mllike-CXdrOF99.js.br +0 -0
- package/dist/web/assets/mllike-CXdrOF99.js.gz +0 -0
- package/dist/web/assets/modelica-Dc1JOy9r.js.br +0 -0
- package/dist/web/assets/modelica-Dc1JOy9r.js.gz +0 -0
- package/dist/web/assets/mojo-rZm6bMo-.js.br +0 -0
- package/dist/web/assets/mojo-rZm6bMo-.js.gz +0 -0
- package/dist/web/assets/monokai-D4h5O-jR.js.br +0 -0
- package/dist/web/assets/monokai-D4h5O-jR.js.gz +0 -0
- package/dist/web/assets/moonbit-_H4v1dQx.js.br +0 -0
- package/dist/web/assets/moonbit-_H4v1dQx.js.gz +0 -0
- package/dist/web/assets/move-IF9eRakj.js.br +0 -0
- package/dist/web/assets/move-IF9eRakj.js.gz +0 -0
- package/dist/web/assets/mscgen-BA5vi2Kp.js.br +0 -0
- package/dist/web/assets/mscgen-BA5vi2Kp.js.gz +0 -0
- package/dist/web/assets/mumps-BT43cFF4.js.br +0 -0
- package/dist/web/assets/mumps-BT43cFF4.js.gz +0 -0
- package/dist/web/assets/narrat-DRg8JJMk.js.br +0 -0
- package/dist/web/assets/narrat-DRg8JJMk.js.gz +0 -0
- package/dist/web/assets/nextflow-Zz6hmt5N.js.br +0 -0
- package/dist/web/assets/nextflow-Zz6hmt5N.js.gz +0 -0
- package/dist/web/assets/nextflow-groovy-BeH2EWoN.js.br +0 -0
- package/dist/web/assets/nextflow-groovy-BeH2EWoN.js.gz +0 -0
- package/dist/web/assets/nginx-BpAMiNFr.js.br +0 -0
- package/dist/web/assets/nginx-BpAMiNFr.js.gz +0 -0
- package/dist/web/assets/nginx-DdIZxoE0.js.br +0 -0
- package/dist/web/assets/nginx-DdIZxoE0.js.gz +0 -0
- package/dist/web/assets/night-owl-C39BiMTA.js.br +0 -0
- package/dist/web/assets/night-owl-C39BiMTA.js.gz +0 -0
- package/dist/web/assets/night-owl-light-CMTm3GFP.js.br +0 -0
- package/dist/web/assets/night-owl-light-CMTm3GFP.js.gz +0 -0
- package/dist/web/assets/nim-CVrawwO9.js.br +0 -0
- package/dist/web/assets/nim-CVrawwO9.js.gz +0 -0
- package/dist/web/assets/nix-CwoSXNpI.js.br +0 -0
- package/dist/web/assets/nix-CwoSXNpI.js.gz +0 -0
- package/dist/web/assets/nord-Ddv68eIx.js.br +0 -0
- package/dist/web/assets/nord-Ddv68eIx.js.gz +0 -0
- package/dist/web/assets/nsis-LdVXkNf5.js.br +0 -0
- package/dist/web/assets/nsis-LdVXkNf5.js.gz +0 -0
- package/dist/web/assets/ntriples-BfvgReVJ.js.br +0 -0
- package/dist/web/assets/ntriples-BfvgReVJ.js.gz +0 -0
- package/dist/web/assets/nushell-Cz2AlsmD.js.br +0 -0
- package/dist/web/assets/nushell-Cz2AlsmD.js.gz +0 -0
- package/dist/web/assets/objective-c-DXmwc3jG.js.br +0 -0
- package/dist/web/assets/objective-c-DXmwc3jG.js.gz +0 -0
- package/dist/web/assets/objective-cpp-CLxacb5B.js.br +0 -0
- package/dist/web/assets/objective-cpp-CLxacb5B.js.gz +0 -0
- package/dist/web/assets/ocaml-C0hk2d4L.js.br +0 -0
- package/dist/web/assets/ocaml-C0hk2d4L.js.gz +0 -0
- package/dist/web/assets/octave-Ck1zUtKM.js.br +0 -0
- package/dist/web/assets/octave-Ck1zUtKM.js.gz +0 -0
- package/dist/web/assets/odin-BBf5iR-q.js.br +0 -0
- package/dist/web/assets/odin-BBf5iR-q.js.gz +0 -0
- package/dist/web/assets/one-dark-pro-DVMEJ2y_.js.br +0 -0
- package/dist/web/assets/one-dark-pro-DVMEJ2y_.js.gz +0 -0
- package/dist/web/assets/one-light-C3Wv6jpd.js.br +0 -0
- package/dist/web/assets/one-light-C3Wv6jpd.js.gz +0 -0
- package/dist/web/assets/openscad-C4EeE6gA.js.br +0 -0
- package/dist/web/assets/openscad-C4EeE6gA.js.gz +0 -0
- package/dist/web/assets/ordinal-Cboi1Yqb.js.br +0 -0
- package/dist/web/assets/ordinal-Cboi1Yqb.js.gz +0 -0
- package/dist/web/assets/oz-BzwKVEFT.js.br +0 -0
- package/dist/web/assets/oz-BzwKVEFT.js.gz +0 -0
- package/dist/web/assets/packs-Bee69jWU.js +1 -0
- package/dist/web/assets/packs-Bee69jWU.js.br +0 -0
- package/dist/web/assets/packs-Bee69jWU.js.gz +0 -0
- package/dist/web/assets/pascal--L3eBynH.js.br +0 -0
- package/dist/web/assets/pascal--L3eBynH.js.gz +0 -0
- package/dist/web/assets/pascal-D93ZcfNL.js.br +0 -0
- package/dist/web/assets/pascal-D93ZcfNL.js.gz +0 -0
- package/dist/web/assets/pdf-CIFzrehN.js.br +0 -0
- package/dist/web/assets/pdf-CIFzrehN.js.gz +0 -0
- package/dist/web/assets/perl-C0TMdlhV.js.br +0 -0
- package/dist/web/assets/perl-C0TMdlhV.js.gz +0 -0
- package/dist/web/assets/perl-CdXCOZ3F.js.br +0 -0
- package/dist/web/assets/perl-CdXCOZ3F.js.gz +0 -0
- package/dist/web/assets/php-Dhbhpdrm.js.br +0 -0
- package/dist/web/assets/php-Dhbhpdrm.js.gz +0 -0
- package/dist/web/assets/pie-DJOJsNN1.js +1 -0
- package/dist/web/assets/pie-DJOJsNN1.js.br +0 -0
- package/dist/web/assets/pie-DJOJsNN1.js.gz +0 -0
- package/dist/web/assets/pig-CevX1Tat.js.br +0 -0
- package/dist/web/assets/pig-CevX1Tat.js.gz +0 -0
- package/dist/web/assets/pkl-u5AG7uiY.js.br +0 -0
- package/dist/web/assets/pkl-u5AG7uiY.js.gz +0 -0
- package/dist/web/assets/plastic-3e1v2bzS.js.br +0 -0
- package/dist/web/assets/plastic-3e1v2bzS.js.gz +0 -0
- package/dist/web/assets/plsql-ChMvpjG-.js.br +0 -0
- package/dist/web/assets/plsql-ChMvpjG-.js.gz +0 -0
- package/dist/web/assets/po-BTJTHyun.js.br +0 -0
- package/dist/web/assets/po-BTJTHyun.js.gz +0 -0
- package/dist/web/assets/poimandres-CS3Unz2-.js.br +0 -0
- package/dist/web/assets/poimandres-CS3Unz2-.js.gz +0 -0
- package/dist/web/assets/polar-C0HS_06l.js.br +0 -0
- package/dist/web/assets/polar-C0HS_06l.js.gz +0 -0
- package/dist/web/assets/postcss-CXtECtnM.js.br +0 -0
- package/dist/web/assets/postcss-CXtECtnM.js.gz +0 -0
- package/dist/web/assets/powerquery-CEu0bR-o.js.br +0 -0
- package/dist/web/assets/powerquery-CEu0bR-o.js.gz +0 -0
- package/dist/web/assets/powershell-CFHJl5sT.js.br +0 -0
- package/dist/web/assets/powershell-CFHJl5sT.js.gz +0 -0
- package/dist/web/assets/powershell-Dpen1YoG.js.br +0 -0
- package/dist/web/assets/powershell-Dpen1YoG.js.gz +0 -0
- package/dist/web/assets/prisma-Dd19v3D-.js.br +0 -0
- package/dist/web/assets/prisma-Dd19v3D-.js.gz +0 -0
- package/dist/web/assets/prolog-CbFg5uaA.js.br +0 -0
- package/dist/web/assets/prolog-CbFg5uaA.js.gz +0 -0
- package/dist/web/assets/properties-C78fOPTZ.js.br +0 -0
- package/dist/web/assets/properties-C78fOPTZ.js.gz +0 -0
- package/dist/web/assets/proto-C7zT0LnQ.js.br +0 -0
- package/dist/web/assets/proto-C7zT0LnQ.js.gz +0 -0
- package/dist/web/assets/protobuf-ChK-085T.js.br +0 -0
- package/dist/web/assets/protobuf-ChK-085T.js.gz +0 -0
- package/dist/web/assets/pug-CGlum2m_.js.br +0 -0
- package/dist/web/assets/pug-CGlum2m_.js.gz +0 -0
- package/dist/web/assets/pug-DeIclll2.js.br +0 -0
- package/dist/web/assets/pug-DeIclll2.js.gz +0 -0
- package/dist/web/assets/puppet-BMWR74SV.js.br +0 -0
- package/dist/web/assets/puppet-BMWR74SV.js.gz +0 -0
- package/dist/web/assets/puppet-DMA9R1ak.js.br +0 -0
- package/dist/web/assets/puppet-DMA9R1ak.js.gz +0 -0
- package/dist/web/assets/purescript-CklMAg4u.js.br +0 -0
- package/dist/web/assets/purescript-CklMAg4u.js.gz +0 -0
- package/dist/web/assets/python-B6aJPvgy.js.br +0 -0
- package/dist/web/assets/python-B6aJPvgy.js.gz +0 -0
- package/dist/web/assets/python-BuPzkPfP.js.br +0 -0
- package/dist/web/assets/python-BuPzkPfP.js.gz +0 -0
- package/dist/web/assets/q-pXgVlZs6.js.br +0 -0
- package/dist/web/assets/q-pXgVlZs6.js.gz +0 -0
- package/dist/web/assets/qml-3beO22l8.js.br +0 -0
- package/dist/web/assets/qml-3beO22l8.js.gz +0 -0
- package/dist/web/assets/qmldir-C8lEn-DE.js.br +0 -0
- package/dist/web/assets/qmldir-C8lEn-DE.js.gz +0 -0
- package/dist/web/assets/qss-IeuSbFQv.js.br +0 -0
- package/dist/web/assets/qss-IeuSbFQv.js.gz +0 -0
- package/dist/web/assets/r-B6wPVr8A.js.br +0 -0
- package/dist/web/assets/r-B6wPVr8A.js.gz +0 -0
- package/dist/web/assets/r-Dspwwk_N.js.br +0 -0
- package/dist/web/assets/r-Dspwwk_N.js.gz +0 -0
- package/dist/web/assets/racket-BqYA7rlc.js.br +0 -0
- package/dist/web/assets/racket-BqYA7rlc.js.gz +0 -0
- package/dist/web/assets/raku-DXvB9xmW.js.br +0 -0
- package/dist/web/assets/raku-DXvB9xmW.js.gz +0 -0
- package/dist/web/assets/razor-Uh8Bk_45.js.br +0 -0
- package/dist/web/assets/razor-Uh8Bk_45.js.gz +0 -0
- package/dist/web/assets/red-bN70gL4F.js.br +0 -0
- package/dist/web/assets/red-bN70gL4F.js.gz +0 -0
- package/dist/web/assets/reg-C-SQnVFl.js.br +0 -0
- package/dist/web/assets/reg-C-SQnVFl.js.gz +0 -0
- package/dist/web/assets/regexp-CDVJQ6XC.js.br +0 -0
- package/dist/web/assets/regexp-CDVJQ6XC.js.gz +0 -0
- package/dist/web/assets/rel-C3B-1QV4.js.br +0 -0
- package/dist/web/assets/rel-C3B-1QV4.js.gz +0 -0
- package/dist/web/assets/riscv-BM1_JUlF.js.br +0 -0
- package/dist/web/assets/riscv-BM1_JUlF.js.gz +0 -0
- package/dist/web/assets/ron-D8l8udqQ.js.br +0 -0
- package/dist/web/assets/ron-D8l8udqQ.js.gz +0 -0
- package/dist/web/assets/rose-pine-dawn-DHQR4-dF.js.br +0 -0
- package/dist/web/assets/rose-pine-dawn-DHQR4-dF.js.gz +0 -0
- package/dist/web/assets/rose-pine-moon-D4_iv3hh.js.br +0 -0
- package/dist/web/assets/rose-pine-moon-D4_iv3hh.js.gz +0 -0
- package/dist/web/assets/rose-pine-qdsjHGoJ.js.br +0 -0
- package/dist/web/assets/rose-pine-qdsjHGoJ.js.gz +0 -0
- package/dist/web/assets/rosmsg-BJDFO7_C.js.br +0 -0
- package/dist/web/assets/rosmsg-BJDFO7_C.js.gz +0 -0
- package/dist/web/assets/rpm-CTu-6PCP.js.br +0 -0
- package/dist/web/assets/rpm-CTu-6PCP.js.gz +0 -0
- package/dist/web/assets/rst-BrH8l1NY.js.br +0 -0
- package/dist/web/assets/rst-BrH8l1NY.js.gz +0 -0
- package/dist/web/assets/ruby-B2Rjki9n.js.br +0 -0
- package/dist/web/assets/ruby-B2Rjki9n.js.gz +0 -0
- package/dist/web/assets/ruby-Dw2BHqvy.js.br +0 -0
- package/dist/web/assets/ruby-Dw2BHqvy.js.gz +0 -0
- package/dist/web/assets/rust-B1yitclQ.js.br +0 -0
- package/dist/web/assets/rust-B1yitclQ.js.gz +0 -0
- package/dist/web/assets/sankeyLinkHorizontal-FH_jDQz2.js +1 -0
- package/dist/web/assets/sankeyLinkHorizontal-FH_jDQz2.js.br +0 -0
- package/dist/web/assets/sankeyLinkHorizontal-FH_jDQz2.js.gz +0 -0
- package/dist/web/assets/sas-B4kiWyti.js.br +0 -0
- package/dist/web/assets/sas-B4kiWyti.js.gz +0 -0
- package/dist/web/assets/sas-cz2c8ADy.js.br +0 -0
- package/dist/web/assets/sas-cz2c8ADy.js.gz +0 -0
- package/dist/web/assets/sass-Cj5Yp3dK.js.br +0 -0
- package/dist/web/assets/sass-Cj5Yp3dK.js.gz +0 -0
- package/dist/web/assets/scala-C151Ov-r.js.br +0 -0
- package/dist/web/assets/scala-C151Ov-r.js.gz +0 -0
- package/dist/web/assets/scheme-C41bIUwD.js.br +0 -0
- package/dist/web/assets/scheme-C41bIUwD.js.gz +0 -0
- package/dist/web/assets/scheme-C98Dy4si.js.br +0 -0
- package/dist/web/assets/scheme-C98Dy4si.js.gz +0 -0
- package/dist/web/assets/scss-OYdSNvt2.js.br +0 -0
- package/dist/web/assets/scss-OYdSNvt2.js.gz +0 -0
- package/dist/web/assets/sdbl-DVxCFoDh.js.br +0 -0
- package/dist/web/assets/sdbl-DVxCFoDh.js.gz +0 -0
- package/dist/web/assets/shaderlab-Dg9Lc6iA.js.br +0 -0
- package/dist/web/assets/shaderlab-Dg9Lc6iA.js.gz +0 -0
- package/dist/web/assets/shell-CjFT_Tl9.js.br +0 -0
- package/dist/web/assets/shell-CjFT_Tl9.js.gz +0 -0
- package/dist/web/assets/shellscript-Yzrsuije.js.br +0 -0
- package/dist/web/assets/shellscript-Yzrsuije.js.gz +0 -0
- package/dist/web/assets/shellsession-BADoaaVG.js.br +0 -0
- package/dist/web/assets/shellsession-BADoaaVG.js.gz +0 -0
- package/dist/web/assets/sieve-C3Gn_uJK.js.br +0 -0
- package/dist/web/assets/sieve-C3Gn_uJK.js.gz +0 -0
- package/dist/web/assets/simple-mode-GW_nhZxv.js.br +0 -0
- package/dist/web/assets/simple-mode-GW_nhZxv.js.gz +0 -0
- package/dist/web/assets/slack-dark-BthQWCQV.js.br +0 -0
- package/dist/web/assets/slack-dark-BthQWCQV.js.gz +0 -0
- package/dist/web/assets/slack-ochin-DqwNpetd.js.br +0 -0
- package/dist/web/assets/slack-ochin-DqwNpetd.js.gz +0 -0
- package/dist/web/assets/smalltalk-BERRCDM3.js.br +0 -0
- package/dist/web/assets/smalltalk-BERRCDM3.js.gz +0 -0
- package/dist/web/assets/smalltalk-CnHTOXQT.js.br +0 -0
- package/dist/web/assets/smalltalk-CnHTOXQT.js.gz +0 -0
- package/dist/web/assets/snazzy-light-Bw305WKR.js.br +0 -0
- package/dist/web/assets/snazzy-light-Bw305WKR.js.gz +0 -0
- package/dist/web/assets/solarized-dark-DXbdFlpD.js.br +0 -0
- package/dist/web/assets/solarized-dark-DXbdFlpD.js.gz +0 -0
- package/dist/web/assets/solarized-light-L9t79GZl.js.br +0 -0
- package/dist/web/assets/solarized-light-L9t79GZl.js.gz +0 -0
- package/dist/web/assets/solidity-rGO070M0.js.br +0 -0
- package/dist/web/assets/solidity-rGO070M0.js.gz +0 -0
- package/dist/web/assets/solr-DehyRSwq.js.br +0 -0
- package/dist/web/assets/solr-DehyRSwq.js.gz +0 -0
- package/dist/web/assets/soy-Brmx7dQM.js.br +0 -0
- package/dist/web/assets/soy-Brmx7dQM.js.gz +0 -0
- package/dist/web/assets/{spaces-BeS8BmJE.js → spaces-wH3o95f_.js} +1 -1
- package/dist/web/assets/spaces-wH3o95f_.js.br +0 -0
- package/dist/web/assets/spaces-wH3o95f_.js.gz +0 -0
- package/dist/web/assets/sparql-DkYu6x3z.js.br +0 -0
- package/dist/web/assets/sparql-DkYu6x3z.js.gz +0 -0
- package/dist/web/assets/sparql-rVzFXLq3.js.br +0 -0
- package/dist/web/assets/sparql-rVzFXLq3.js.gz +0 -0
- package/dist/web/assets/splunk-BtCnVYZw.js.br +0 -0
- package/dist/web/assets/splunk-BtCnVYZw.js.gz +0 -0
- package/dist/web/assets/spreadsheet-BCZA_wO0.js.br +0 -0
- package/dist/web/assets/spreadsheet-BCZA_wO0.js.gz +0 -0
- package/dist/web/assets/sql-BLtJtn59.js.br +0 -0
- package/dist/web/assets/sql-BLtJtn59.js.gz +0 -0
- package/dist/web/assets/sql-D0XecflT.js.br +0 -0
- package/dist/web/assets/sql-D0XecflT.js.gz +0 -0
- package/dist/web/assets/ssh-config-_ykCGR6B.js.br +0 -0
- package/dist/web/assets/ssh-config-_ykCGR6B.js.gz +0 -0
- package/dist/web/assets/stata-BH5u7GGu.js.br +0 -0
- package/dist/web/assets/stata-BH5u7GGu.js.gz +0 -0
- package/dist/web/assets/stex-C3f8Ysf7.js.br +0 -0
- package/dist/web/assets/stex-C3f8Ysf7.js.gz +0 -0
- package/dist/web/assets/stylus-B533Al4x.js.br +0 -0
- package/dist/web/assets/stylus-B533Al4x.js.gz +0 -0
- package/dist/web/assets/stylus-BEDo0Tqx.js.br +0 -0
- package/dist/web/assets/stylus-BEDo0Tqx.js.gz +0 -0
- package/dist/web/assets/surrealql-Bq5Q-fJD.js.br +0 -0
- package/dist/web/assets/surrealql-Bq5Q-fJD.js.gz +0 -0
- package/dist/web/assets/svelte-C_ipcX3V.js.br +0 -0
- package/dist/web/assets/svelte-C_ipcX3V.js.gz +0 -0
- package/dist/web/assets/swift-BzpIVaGY.js.br +0 -0
- package/dist/web/assets/swift-BzpIVaGY.js.gz +0 -0
- package/dist/web/assets/swift-D82vCrfD.js.br +0 -0
- package/dist/web/assets/swift-D82vCrfD.js.gz +0 -0
- package/dist/web/assets/synthwave-84-CbfX1IO0.js.br +0 -0
- package/dist/web/assets/synthwave-84-CbfX1IO0.js.gz +0 -0
- package/dist/web/assets/system-verilog-CnnmHF94.js.br +0 -0
- package/dist/web/assets/system-verilog-CnnmHF94.js.gz +0 -0
- package/dist/web/assets/systemd-4A_iFExJ.js.br +0 -0
- package/dist/web/assets/systemd-4A_iFExJ.js.gz +0 -0
- package/dist/web/assets/talonscript-CkByrt1z.js.br +0 -0
- package/dist/web/assets/talonscript-CkByrt1z.js.gz +0 -0
- package/dist/web/assets/tasl-QIJgUcNo.js.br +0 -0
- package/dist/web/assets/tasl-QIJgUcNo.js.gz +0 -0
- package/dist/web/assets/tcl-DVfN8rqt.js.br +0 -0
- package/dist/web/assets/tcl-DVfN8rqt.js.gz +0 -0
- package/dist/web/assets/tcl-dwOrl1Do.js.br +0 -0
- package/dist/web/assets/tcl-dwOrl1Do.js.gz +0 -0
- package/dist/web/assets/templ-P3uqSqPl.js.br +0 -0
- package/dist/web/assets/templ-P3uqSqPl.js.gz +0 -0
- package/dist/web/assets/terraform-BETggiCN.js.br +0 -0
- package/dist/web/assets/terraform-BETggiCN.js.gz +0 -0
- package/dist/web/assets/tex-idrVyKtj.js.br +0 -0
- package/dist/web/assets/tex-idrVyKtj.js.gz +0 -0
- package/dist/web/assets/textile-CnDTJFAw.js.br +0 -0
- package/dist/web/assets/textile-CnDTJFAw.js.gz +0 -0
- package/dist/web/assets/theme-DVIt3W-5.js +1 -0
- package/dist/web/assets/theme-DVIt3W-5.js.br +0 -0
- package/dist/web/assets/theme-DVIt3W-5.js.gz +0 -0
- package/dist/web/assets/tiddlywiki-DO-Gjzrf.js.br +0 -0
- package/dist/web/assets/tiddlywiki-DO-Gjzrf.js.gz +0 -0
- package/dist/web/assets/tiki-DGYXhP31.js.br +0 -0
- package/dist/web/assets/tiki-DGYXhP31.js.gz +0 -0
- package/dist/web/assets/tokyo-night-hegEt444.js.br +0 -0
- package/dist/web/assets/tokyo-night-hegEt444.js.gz +0 -0
- package/dist/web/assets/toml-Bm5Em-hy.js.br +0 -0
- package/dist/web/assets/toml-Bm5Em-hy.js.gz +0 -0
- package/dist/web/assets/toml-vGWfd6FD.js.br +0 -0
- package/dist/web/assets/toml-vGWfd6FD.js.gz +0 -0
- package/dist/web/assets/troff-wAsdV37c.js.br +0 -0
- package/dist/web/assets/troff-wAsdV37c.js.gz +0 -0
- package/dist/web/assets/ts-tags-zn1MmPIZ.js.br +0 -0
- package/dist/web/assets/ts-tags-zn1MmPIZ.js.gz +0 -0
- package/dist/web/assets/tsv-B_m7g4N7.js.br +0 -0
- package/dist/web/assets/tsv-B_m7g4N7.js.gz +0 -0
- package/dist/web/assets/tsx-COt5Ahok.js.br +0 -0
- package/dist/web/assets/tsx-COt5Ahok.js.gz +0 -0
- package/dist/web/assets/ttcn-CfJYG6tj.js.br +0 -0
- package/dist/web/assets/ttcn-CfJYG6tj.js.gz +0 -0
- package/dist/web/assets/ttcn-cfg-B9xdYoR4.js.br +0 -0
- package/dist/web/assets/ttcn-cfg-B9xdYoR4.js.gz +0 -0
- package/dist/web/assets/turtle-B1tBg_DP.js.br +0 -0
- package/dist/web/assets/turtle-B1tBg_DP.js.gz +0 -0
- package/dist/web/assets/turtle-BsS91CYL.js.br +0 -0
- package/dist/web/assets/turtle-BsS91CYL.js.gz +0 -0
- package/dist/web/assets/twig-DNn4PbVi.js.br +0 -0
- package/dist/web/assets/twig-DNn4PbVi.js.gz +0 -0
- package/dist/web/assets/typescript-BPQ3VLAy.js.br +0 -0
- package/dist/web/assets/typescript-BPQ3VLAy.js.gz +0 -0
- package/dist/web/assets/typespec-BGHnOYBU.js.br +0 -0
- package/dist/web/assets/typespec-BGHnOYBU.js.gz +0 -0
- package/dist/web/assets/typst-DHCkPAjA.js.br +0 -0
- package/dist/web/assets/typst-DHCkPAjA.js.gz +0 -0
- package/dist/web/assets/{uiZoom-Bgw2mRqt.js → uiZoom-CfR9h3Dy.js} +1 -1
- package/dist/web/assets/uiZoom-CfR9h3Dy.js.br +0 -0
- package/dist/web/assets/uiZoom-CfR9h3Dy.js.gz +0 -0
- package/dist/web/assets/v-BcVCzyr7.js.br +0 -0
- package/dist/web/assets/v-BcVCzyr7.js.gz +0 -0
- package/dist/web/assets/v4-Dnyct6Ft.js +1 -0
- package/dist/web/assets/v4-Dnyct6Ft.js.br +0 -0
- package/dist/web/assets/v4-Dnyct6Ft.js.gz +0 -0
- package/dist/web/assets/vala-CsfeWuGM.js.br +0 -0
- package/dist/web/assets/vala-CsfeWuGM.js.gz +0 -0
- package/dist/web/assets/vb-CmGdzxic.js.br +0 -0
- package/dist/web/assets/vb-CmGdzxic.js.gz +0 -0
- package/dist/web/assets/vb-D17OF-Vu.js.br +0 -0
- package/dist/web/assets/vb-D17OF-Vu.js.gz +0 -0
- package/dist/web/assets/vbscript-BuJXcnF6.js.br +0 -0
- package/dist/web/assets/vbscript-BuJXcnF6.js.gz +0 -0
- package/dist/web/assets/velocity-D8B20fx6.js.br +0 -0
- package/dist/web/assets/velocity-D8B20fx6.js.gz +0 -0
- package/dist/web/assets/{vendor-react-C8dhNtzF.js → vendor-react-BqVzR-It.js} +6 -6
- package/dist/web/assets/vendor-react-BqVzR-It.js.br +0 -0
- package/dist/web/assets/vendor-react-BqVzR-It.js.gz +0 -0
- package/dist/web/assets/venn.esm-D6tdiC58.js +7 -0
- package/dist/web/assets/venn.esm-D6tdiC58.js.br +0 -0
- package/dist/web/assets/venn.esm-D6tdiC58.js.gz +0 -0
- package/dist/web/assets/verilog-BQ8w6xss.js.br +0 -0
- package/dist/web/assets/verilog-BQ8w6xss.js.gz +0 -0
- package/dist/web/assets/verilog-C6RDOZhf.js.br +0 -0
- package/dist/web/assets/verilog-C6RDOZhf.js.gz +0 -0
- package/dist/web/assets/vesper-DU1UobuO.js.br +0 -0
- package/dist/web/assets/vesper-DU1UobuO.js.gz +0 -0
- package/dist/web/assets/vhdl-CeAyd5Ju.js.br +0 -0
- package/dist/web/assets/vhdl-CeAyd5Ju.js.gz +0 -0
- package/dist/web/assets/vhdl-lSbBsy5d.js.br +0 -0
- package/dist/web/assets/vhdl-lSbBsy5d.js.gz +0 -0
- package/dist/web/assets/viml-CJc9bBzg.js.br +0 -0
- package/dist/web/assets/viml-CJc9bBzg.js.gz +0 -0
- package/dist/web/assets/vitesse-black-Bkuqu6BP.js.br +0 -0
- package/dist/web/assets/vitesse-black-Bkuqu6BP.js.gz +0 -0
- package/dist/web/assets/vitesse-dark-D0r3Knsf.js.br +0 -0
- package/dist/web/assets/vitesse-dark-D0r3Knsf.js.gz +0 -0
- package/dist/web/assets/vitesse-light-CVO1_9PV.js.br +0 -0
- package/dist/web/assets/vitesse-light-CVO1_9PV.js.gz +0 -0
- package/dist/web/assets/vue-DN_0RTcg.js.br +0 -0
- package/dist/web/assets/vue-DN_0RTcg.js.gz +0 -0
- package/dist/web/assets/vue-html-AaS7Mt5G.js.br +0 -0
- package/dist/web/assets/vue-html-AaS7Mt5G.js.gz +0 -0
- package/dist/web/assets/vue-vine-CQOfvN7w.js.br +0 -0
- package/dist/web/assets/vue-vine-CQOfvN7w.js.gz +0 -0
- package/dist/web/assets/vyper-CDx5xZoG.js.br +0 -0
- package/dist/web/assets/vyper-CDx5xZoG.js.gz +0 -0
- package/dist/web/assets/{wardley-L42UT6IY-Bmi7Nc9-.js → wardley-L42UT6IY-CptWIPkK.js} +1 -1
- package/dist/web/assets/wardley-L42UT6IY-CptWIPkK.js.br +0 -0
- package/dist/web/assets/wardley-L42UT6IY-CptWIPkK.js.gz +0 -0
- package/dist/web/assets/wasm-CG6Dc4jp.js.br +0 -0
- package/dist/web/assets/wasm-CG6Dc4jp.js.gz +0 -0
- package/dist/web/assets/wasm-MzD3tlZU.js.br +0 -0
- package/dist/web/assets/wasm-MzD3tlZU.js.gz +0 -0
- package/dist/web/assets/webidl-ZXfAyPTL.js.br +0 -0
- package/dist/web/assets/webidl-ZXfAyPTL.js.gz +0 -0
- package/dist/web/assets/wenyan-BV7otONQ.js.br +0 -0
- package/dist/web/assets/wenyan-BV7otONQ.js.gz +0 -0
- package/dist/web/assets/wgsl-Dx-B1_4e.js.br +0 -0
- package/dist/web/assets/wgsl-Dx-B1_4e.js.gz +0 -0
- package/dist/web/assets/wikitext-BhOHFoWU.js.br +0 -0
- package/dist/web/assets/wikitext-BhOHFoWU.js.gz +0 -0
- package/dist/web/assets/wit-5i3qLPDT.js.br +0 -0
- package/dist/web/assets/wit-5i3qLPDT.js.gz +0 -0
- package/dist/web/assets/wolfram-lXgVvXCa.js.br +0 -0
- package/dist/web/assets/wolfram-lXgVvXCa.js.gz +0 -0
- package/dist/web/assets/xml-sdJ4AIDG.js.br +0 -0
- package/dist/web/assets/xml-sdJ4AIDG.js.gz +0 -0
- package/dist/web/assets/xquery-DzFWVndE.js.br +0 -0
- package/dist/web/assets/xquery-DzFWVndE.js.gz +0 -0
- package/dist/web/assets/xsl-CtQFsRM5.js.br +0 -0
- package/dist/web/assets/xsl-CtQFsRM5.js.gz +0 -0
- package/dist/web/assets/yacas-BJ4BC0dw.js.br +0 -0
- package/dist/web/assets/yacas-BJ4BC0dw.js.gz +0 -0
- package/dist/web/assets/yaml-Buea-lGh.js.br +0 -0
- package/dist/web/assets/yaml-Buea-lGh.js.gz +0 -0
- package/dist/web/assets/z80-Hz9HOZM7.js.br +0 -0
- package/dist/web/assets/z80-Hz9HOZM7.js.gz +0 -0
- package/dist/web/assets/zenscript-DVFEvuxE.js.br +0 -0
- package/dist/web/assets/zenscript-DVFEvuxE.js.gz +0 -0
- package/dist/web/assets/zig-VOosw3JB.js.br +0 -0
- package/dist/web/assets/zig-VOosw3JB.js.gz +0 -0
- package/dist/web/index.html +4 -17
- package/dist/web/index.html.br +0 -0
- package/dist/web/index.html.gz +0 -0
- package/dist/web/pdfjs/pdf.worker.min.mjs.br +0 -0
- package/dist/web/pdfjs/pdf.worker.min.mjs.gz +0 -0
- package/dist/web/theme-boot.js.br +0 -0
- package/dist/web/theme-boot.js.gz +0 -0
- package/native/auth-native/prebuilds/linux-arm64/auth-native.node +0 -0
- package/native/auth-native/prebuilds/linux-x64/auth-native.node +0 -0
- package/native/auth-native/prebuilds/win32-arm64/auth-native.node +0 -0
- package/native/auth-native/prebuilds/win32-x64/auth-native.node +0 -0
- package/package.json +1 -1
- package/dist/web/assets/AppErrorBoundary-C9VSooQP.js +0 -1
- package/dist/web/assets/ArchivedSessionsPage-QBDgQfmJ.js +0 -1
- package/dist/web/assets/CapabilitiesPage-CGd_8tc1.js +0 -11
- package/dist/web/assets/CodeEditor-BH2oKQ1E.js +0 -4
- package/dist/web/assets/ExternalEnginesSection-Cg0ZHV_Q.js +0 -2
- package/dist/web/assets/GlobalCronPanel-CkxiceFF.js +0 -1
- package/dist/web/assets/ImageViewport-Bm3A9cOx.js +0 -1
- package/dist/web/assets/ListParts-ALUaVCbQ.js +0 -1
- package/dist/web/assets/MediaLightbox-B_ovuTW7.js +0 -1
- package/dist/web/assets/MemoryPage-B7uc5mfC.js +0 -1
- package/dist/web/assets/NavScopeBoundary-BlowWTWB.js +0 -1
- package/dist/web/assets/PersonasPage-DfoIJD5s.js +0 -3
- package/dist/web/assets/PluginPanelHost-DYo0hMIh.js +0 -1
- package/dist/web/assets/PreviewWorkspace-DouCcOAD.js +0 -1
- package/dist/web/assets/RoomPage-H_4BwkAH.js +0 -1
- package/dist/web/assets/SettingsPage-D7XE_1Qb.js +0 -253
- package/dist/web/assets/TasksPage-CSu0juVx.js +0 -1
- package/dist/web/assets/UsagePage-CE_H2MKQ.js +0 -1
- package/dist/web/assets/arc-Do2UT5LJ.js +0 -1
- package/dist/web/assets/architectureDiagram-3BPJPVTR-_lPS4SA2.js +0 -36
- package/dist/web/assets/blockDiagram-GPEHLZMM-Dg_y7shf.js +0 -132
- package/dist/web/assets/c4Diagram-AAUBKEIU-Ytc3U8k7.js +0 -10
- package/dist/web/assets/channel-ftewyUYM.js +0 -1
- package/dist/web/assets/chunk-2J33WTMH-CqGuNCrJ.js +0 -1
- package/dist/web/assets/chunk-4BX2VUAB-DRbcHFwS.js +0 -1
- package/dist/web/assets/chunk-55IACEB6-BNbqFUmr.js +0 -1
- package/dist/web/assets/chunk-727SXJPM-CVRLzEnd.js +0 -206
- package/dist/web/assets/chunk-AQP2D5EJ-WwaaHdh3.js +0 -231
- package/dist/web/assets/chunk-FMBD7UC4-CTnLqBUW.js +0 -15
- package/dist/web/assets/chunk-ND2GUHAM-DfNIka0g.js +0 -1
- package/dist/web/assets/chunk-QZHKN3VN-BoPlJyiP.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-qKmPNr--.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-qKmPNr--.js +0 -1
- package/dist/web/assets/client-D1ri2q1x.js +0 -5
- package/dist/web/assets/connection-ChgSscSb.js +0 -380
- package/dist/web/assets/cose-bilkent-S5V4N54A-WLT7POr1.js +0 -1
- package/dist/web/assets/dagre-BM42HDAG-BXUVmWhW.js +0 -4
- package/dist/web/assets/diagram-2AECGRRQ-MZROjHGa.js +0 -43
- package/dist/web/assets/diagram-5GNKFQAL-CvgKuYL7.js +0 -10
- package/dist/web/assets/diagram-KO2AKTUF-ittFRs4S.js +0 -3
- package/dist/web/assets/diagram-LMA3HP47-BJd5TYg_.js +0 -24
- package/dist/web/assets/diagram-OG6HWLK6-Bpiu3NRl.js +0 -24
- package/dist/web/assets/erDiagram-TEJ5UH35-CxnYHs1J.js +0 -85
- package/dist/web/assets/flowDiagram-I6XJVG4X-CLYrSoLb.js +0 -162
- package/dist/web/assets/ganttDiagram-6RSMTGT7-61QGJn_n.js +0 -292
- package/dist/web/assets/gitGraphDiagram-PVQCEYII-BAhOrVeR.js +0 -106
- package/dist/web/assets/highlighted-body-OFNGDK62-SDd5GB8L.js +0 -1
- package/dist/web/assets/index-BCIhGPzu.js +0 -1
- package/dist/web/assets/index-BXMQKufW.js +0 -1
- package/dist/web/assets/index-BfAzAzpA.css +0 -1
- package/dist/web/assets/index-BnWnRbrf.js +0 -309
- package/dist/web/assets/index-BtPOr38s.js +0 -1
- package/dist/web/assets/index-CIiZeIPv.js +0 -1
- package/dist/web/assets/index-CX9gQtt9.js +0 -1
- package/dist/web/assets/index-CpkOEdmz.js +0 -13
- package/dist/web/assets/index-Cy-BfvW9.js +0 -1
- package/dist/web/assets/index-CyyQI7pL.js +0 -1
- package/dist/web/assets/index-DRz_-PDL.js +0 -1
- package/dist/web/assets/index-DSrINsBp.js +0 -1
- package/dist/web/assets/index-DXDJteB5.js +0 -1
- package/dist/web/assets/index-DibUqmJR.js +0 -1
- package/dist/web/assets/index-DoSMztOD.js +0 -1
- package/dist/web/assets/index-DpYi3xv9.js +0 -206
- package/dist/web/assets/index-h4LfI98N.js +0 -1
- package/dist/web/assets/index-oRr6dIng.js +0 -1
- package/dist/web/assets/index-q0pNyABD.js +0 -1
- package/dist/web/assets/infoDiagram-5YYISTIA-ChA8rWAW.js +0 -2
- package/dist/web/assets/ishikawaDiagram-YF4QCWOH-wAdA3Wum.js +0 -70
- package/dist/web/assets/journeyDiagram-JHISSGLW-XQ27BLI2.js +0 -139
- package/dist/web/assets/kanban-definition-UN3LZRKU-enaS2PwO.js +0 -89
- package/dist/web/assets/linear-dpbaf_C7.js +0 -1
- package/dist/web/assets/mermaid-GHXKKRXX-B_VPMKIu.css +0 -1
- package/dist/web/assets/mermaid-GHXKKRXX-DK-iCZ3T.js +0 -362
- package/dist/web/assets/mindmap-definition-RKZ34NQL-CCR0JUFu.js +0 -96
- package/dist/web/assets/navViewState-Dx1Fcceg.js +0 -1
- package/dist/web/assets/packs-BpjM4FQC.js +0 -1
- package/dist/web/assets/pieDiagram-4H26LBE5-BaLRkfVx.js +0 -30
- package/dist/web/assets/quadrantDiagram-W4KKPZXB-4x90cb4U.js +0 -7
- package/dist/web/assets/requirementDiagram-4Y6WPE33-CJUCq4Dk.js +0 -84
- package/dist/web/assets/sankeyDiagram-5OEKKPKP-Bqgmpo8V.js +0 -40
- package/dist/web/assets/sequenceDiagram-3UESZ5HK-CwReh5y5.js +0 -162
- package/dist/web/assets/sessionList-BPxVFLPa.js +0 -1
- package/dist/web/assets/stateDiagram-AJRCARHV-CqH-TMCh.js +0 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-gUjzaHlq.js +0 -1
- package/dist/web/assets/theme-gMChIIPj.js +0 -1
- package/dist/web/assets/timeline-definition-PNZ67QCA-DcCNXJwx.js +0 -120
- package/dist/web/assets/vennDiagram-CIIHVFJN-CHtc_X23.js +0 -34
- package/dist/web/assets/wardleyDiagram-YWT4CUSO-C3By9c62.js +0 -78
- package/dist/web/assets/xychartDiagram-2RQKCTM6-v4BXQWoy.js +0 -7
package/dist/cpu-worker.mjs
CHANGED
|
@@ -1,30 +1,20 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import fsSync, { constants, createReadStream, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, statSync, watch } from "node:fs";
|
|
2
|
+
import { Worker, parentPort } from "node:worker_threads";
|
|
3
|
+
import { constants, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
4
|
+
import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
6
5
|
import { DatabaseSync } from "node:sqlite";
|
|
7
|
-
import { crc32, deflateSync, inflateSync } from "node:zlib";
|
|
8
|
-
import { existsSync as existsSync$1, promises
|
|
6
|
+
import { crc32, deflateSync, gunzipSync, inflateSync, zstdDecompressSync } from "node:zlib";
|
|
7
|
+
import { existsSync as existsSync$1, promises } from "fs";
|
|
9
8
|
import { ReadableStream as ReadableStream$1 } from "node:stream/web";
|
|
10
9
|
import { PassThrough, Readable, pipeline } from "node:stream";
|
|
11
|
-
import fs, {
|
|
12
|
-
import { type } from "os";
|
|
13
|
-
import { EventEmitter } from "events";
|
|
14
|
-
import * as sysPath from "path";
|
|
10
|
+
import fs, { open, readFile, stat } from "node:fs/promises";
|
|
15
11
|
import path from "path";
|
|
16
12
|
import { isUtf8 } from "node:buffer";
|
|
17
|
-
import {
|
|
18
|
-
import { availableParallelism, tmpdir, totalmem } from "node:os";
|
|
13
|
+
import { availableParallelism, totalmem } from "node:os";
|
|
19
14
|
import { once } from "node:events";
|
|
20
15
|
import { getHeapStatistics, serialize } from "node:v8";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
24
|
-
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
25
|
-
import net from "node:net";
|
|
26
|
-
import { createInterface } from "node:readline";
|
|
27
|
-
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
16
|
+
import { createHash } from "node:crypto";
|
|
17
|
+
import { pathToFileURL } from "node:url";
|
|
28
18
|
|
|
29
19
|
//#region \0rolldown/runtime.js
|
|
30
20
|
var __create = Object.create;
|
|
@@ -26238,7 +26228,7 @@ function applyKernel(image, kernel, x, y) {
|
|
|
26238
26228
|
}
|
|
26239
26229
|
return value;
|
|
26240
26230
|
}
|
|
26241
|
-
function mix
|
|
26231
|
+
function mix(clr, clr2, p = 50) {
|
|
26242
26232
|
return {
|
|
26243
26233
|
r: (clr2.r - clr.r) * (p / 100) + clr.r,
|
|
26244
26234
|
g: (clr2.g - clr.g) * (p / 100) + clr.g,
|
|
@@ -26817,13 +26807,13 @@ var init_esm$18 = __esmMin((() => {
|
|
|
26817
26807
|
};
|
|
26818
26808
|
const colorModifier = (i, amount) => limit255(clr[i] + amount);
|
|
26819
26809
|
actions.forEach((action) => {
|
|
26820
|
-
if (action.apply === "mix") clr = mix
|
|
26821
|
-
else if (action.apply === "tint") clr = mix
|
|
26810
|
+
if (action.apply === "mix") clr = mix(clr, action.params[0], action.params[1]);
|
|
26811
|
+
else if (action.apply === "tint") clr = mix(clr, {
|
|
26822
26812
|
r: 255,
|
|
26823
26813
|
g: 255,
|
|
26824
26814
|
b: 255
|
|
26825
26815
|
}, action.params?.[0]);
|
|
26826
|
-
else if (action.apply === "shade") clr = mix
|
|
26816
|
+
else if (action.apply === "shade") clr = mix(clr, {
|
|
26827
26817
|
r: 0,
|
|
26828
26818
|
g: 0,
|
|
26829
26819
|
b: 0
|
|
@@ -26881,10 +26871,10 @@ var require_await_to_js_umd = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
26881
26871
|
|
|
26882
26872
|
//#endregion
|
|
26883
26873
|
//#region ../../node_modules/.pnpm/@jimp+file-ops@1.6.1/node_modules/@jimp/file-ops/dist/esm/index.js
|
|
26884
|
-
var readFile$1, writeFile
|
|
26874
|
+
var readFile$1, writeFile;
|
|
26885
26875
|
var init_esm$17 = __esmMin((() => {
|
|
26886
26876
|
readFile$1 = promises.readFile;
|
|
26887
|
-
writeFile
|
|
26877
|
+
writeFile = promises.writeFile;
|
|
26888
26878
|
}));
|
|
26889
26879
|
|
|
26890
26880
|
//#endregion
|
|
@@ -29697,9 +29687,9 @@ var init_FileTokenizer = __esmMin((() => {
|
|
|
29697
29687
|
async function fromStream(stream, options) {
|
|
29698
29688
|
const rst = fromStream$1(stream, options);
|
|
29699
29689
|
if (stream.path) {
|
|
29700
|
-
const stat = await stat
|
|
29690
|
+
const stat$1 = await stat(stream.path);
|
|
29701
29691
|
rst.fileInfo.path = stream.path;
|
|
29702
|
-
rst.fileInfo.size = stat.size;
|
|
29692
|
+
rst.fileInfo.size = stat$1.size;
|
|
29703
29693
|
}
|
|
29704
29694
|
return rst;
|
|
29705
29695
|
}
|
|
@@ -29713,7 +29703,7 @@ var init_lib$3 = __esmMin((() => {
|
|
|
29713
29703
|
|
|
29714
29704
|
//#endregion
|
|
29715
29705
|
//#region ../../node_modules/.pnpm/@borewit+text-codec@0.2.2/node_modules/@borewit/text-codec/lib/index.js
|
|
29716
|
-
function utf8Decoder
|
|
29706
|
+
function utf8Decoder() {
|
|
29717
29707
|
if (typeof globalThis.TextDecoder === "undefined") return void 0;
|
|
29718
29708
|
return _utf8Decoder !== null && _utf8Decoder !== void 0 ? _utf8Decoder : _utf8Decoder = new globalThis.TextDecoder("utf-8");
|
|
29719
29709
|
}
|
|
@@ -29724,7 +29714,7 @@ function textDecode(bytes, encoding = "utf-8") {
|
|
|
29724
29714
|
switch (encoding.toLowerCase()) {
|
|
29725
29715
|
case "utf-8":
|
|
29726
29716
|
case "utf8": {
|
|
29727
|
-
const dec = utf8Decoder
|
|
29717
|
+
const dec = utf8Decoder();
|
|
29728
29718
|
return dec ? dec.decode(bytes) : decodeUTF8(bytes);
|
|
29729
29719
|
}
|
|
29730
29720
|
case "utf-16le": return decodeUTF16LE(bytes);
|
|
@@ -34317,7 +34307,7 @@ function createJimp({ plugins: pluginsArg, formats: formatsArg } = {}) {
|
|
|
34317
34307
|
*/
|
|
34318
34308
|
async write(path, options) {
|
|
34319
34309
|
const mimeType = import_lite.default.getType(path);
|
|
34320
|
-
await writeFile
|
|
34310
|
+
await writeFile(path, await this.getBuffer(mimeType, options));
|
|
34321
34311
|
}
|
|
34322
34312
|
/**
|
|
34323
34313
|
* Clone the image into a new Jimp instance.
|
|
@@ -45307,7 +45297,7 @@ var HostFsError = class extends Error2 {
|
|
|
45307
45297
|
this.name = "HostFsError";
|
|
45308
45298
|
}
|
|
45309
45299
|
};
|
|
45310
|
-
const REASONS
|
|
45300
|
+
const REASONS = {
|
|
45311
45301
|
"os.fs.not_found": "path does not exist",
|
|
45312
45302
|
"os.fs.is_directory": "path is a directory",
|
|
45313
45303
|
"os.fs.not_directory": "a path component is not a directory",
|
|
@@ -45318,7 +45308,7 @@ const REASONS$1 = {
|
|
|
45318
45308
|
"os.fs.unavailable": "filesystem resource unavailable",
|
|
45319
45309
|
"os.fs.unknown": "unrecognized filesystem error"
|
|
45320
45310
|
};
|
|
45321
|
-
function readErrno
|
|
45311
|
+
function readErrno(error) {
|
|
45322
45312
|
if (error === null || typeof error !== "object" || !("code" in error)) return void 0;
|
|
45323
45313
|
const code = error.code;
|
|
45324
45314
|
return typeof code === "string" ? code : void 0;
|
|
@@ -45328,7 +45318,7 @@ function readSyscall(error) {
|
|
|
45328
45318
|
const syscall = error.syscall;
|
|
45329
45319
|
return typeof syscall === "string" ? syscall : void 0;
|
|
45330
45320
|
}
|
|
45331
|
-
function mapErrno
|
|
45321
|
+
function mapErrno(errno) {
|
|
45332
45322
|
if (errno === void 0) return OsFsErrors.codes.OS_FS_UNKNOWN;
|
|
45333
45323
|
switch (errno) {
|
|
45334
45324
|
case "ENOENT": return OsFsErrors.codes.OS_FS_NOT_FOUND;
|
|
@@ -45343,9 +45333,9 @@ function mapErrno$1(errno) {
|
|
|
45343
45333
|
}
|
|
45344
45334
|
function toHostFsError(error, ctx) {
|
|
45345
45335
|
if (error instanceof HostFsError) return error;
|
|
45346
|
-
const errno = readErrno
|
|
45347
|
-
const code = mapErrno
|
|
45348
|
-
return new HostFsError(code, `${ctx.op} failed: ${REASONS
|
|
45336
|
+
const errno = readErrno(error);
|
|
45337
|
+
const code = mapErrno(errno);
|
|
45338
|
+
return new HostFsError(code, `${ctx.op} failed: ${REASONS[code]}`, {
|
|
45349
45339
|
details: {
|
|
45350
45340
|
path: ctx.path,
|
|
45351
45341
|
op: ctx.op,
|
|
@@ -45445,7 +45435,7 @@ var LocalLineReader = class {
|
|
|
45445
45435
|
}
|
|
45446
45436
|
async *tailLines(path, page, signal) {
|
|
45447
45437
|
signal?.throwIfAborted();
|
|
45448
|
-
const current = await stat
|
|
45438
|
+
const current = await stat(path);
|
|
45449
45439
|
if (current.size !== page.size || current.mtimeMs !== page.mtimeMs || current.ctimeMs !== page.ctimeMs || current.ino !== page.ino) throw new Error("File changed after locating its tail; retry the read.");
|
|
45450
45440
|
for (const line of page.lines) {
|
|
45451
45441
|
signal?.throwIfAborted();
|
|
@@ -46980,40 +46970,6 @@ var StorageError = class extends Error2 {
|
|
|
46980
46970
|
this.name = "StorageError";
|
|
46981
46971
|
}
|
|
46982
46972
|
};
|
|
46983
|
-
function readErrno(error) {
|
|
46984
|
-
if (error === null || typeof error !== "object" || !("code" in error)) return void 0;
|
|
46985
|
-
const code = error.code;
|
|
46986
|
-
return typeof code === "string" ? code : void 0;
|
|
46987
|
-
}
|
|
46988
|
-
const REASONS = {
|
|
46989
|
-
"storage.not_found": "path does not exist",
|
|
46990
|
-
"storage.io_failed": "unrecognized I/O error",
|
|
46991
|
-
"storage.permission_denied": "permission denied",
|
|
46992
|
-
"storage.disk_full": "no space left on device"
|
|
46993
|
-
};
|
|
46994
|
-
function mapErrno(errno) {
|
|
46995
|
-
switch (errno) {
|
|
46996
|
-
case "ENOENT": return StorageErrors.codes.STORAGE_NOT_FOUND;
|
|
46997
|
-
case "EACCES":
|
|
46998
|
-
case "EPERM": return StorageErrors.codes.STORAGE_PERMISSION_DENIED;
|
|
46999
|
-
case "ENOSPC": return StorageErrors.codes.STORAGE_DISK_FULL;
|
|
47000
|
-
default: return StorageErrors.codes.STORAGE_IO_FAILED;
|
|
47001
|
-
}
|
|
47002
|
-
}
|
|
47003
|
-
function toStorageIoError(error, ctx) {
|
|
47004
|
-
if (error instanceof StorageError) return error;
|
|
47005
|
-
const errno = readErrno(error);
|
|
47006
|
-
const code = mapErrno(errno);
|
|
47007
|
-
return new StorageError(code, `storage ${ctx.op} failed: ${REASONS[code]}`, {
|
|
47008
|
-
details: {
|
|
47009
|
-
path: ctx.path,
|
|
47010
|
-
op: ctx.op,
|
|
47011
|
-
errno,
|
|
47012
|
-
committed: ctx.committed
|
|
47013
|
-
},
|
|
47014
|
-
cause: error
|
|
47015
|
-
});
|
|
47016
|
-
}
|
|
47017
46973
|
const IFileSystemStorageService = createDecorator("fileSystemStorageService");
|
|
47018
46974
|
|
|
47019
46975
|
//#endregion
|
|
@@ -50378,7 +50334,7 @@ const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
|
|
|
50378
50334
|
|
|
50379
50335
|
//#endregion
|
|
50380
50336
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.js
|
|
50381
|
-
const parse
|
|
50337
|
+
const parse = /* @__PURE__ */ _parse(ZodRealError);
|
|
50382
50338
|
const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
50383
50339
|
const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
50384
50340
|
const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
|
|
@@ -50417,7 +50373,7 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
50417
50373
|
reg.add(inst, meta);
|
|
50418
50374
|
return inst;
|
|
50419
50375
|
});
|
|
50420
|
-
inst.parse = (data, params) => parse
|
|
50376
|
+
inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
|
|
50421
50377
|
inst.safeParse = (data, params) => safeParse(inst, data, params);
|
|
50422
50378
|
inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
|
|
50423
50379
|
inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
|
|
@@ -51382,241 +51338,6 @@ var init_utf16 = __esmMin((() => {}));
|
|
|
51382
51338
|
|
|
51383
51339
|
//#endregion
|
|
51384
51340
|
//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
51385
|
-
let _lazyMatch = () => {
|
|
51386
|
-
var __lib__ = (() => {
|
|
51387
|
-
var m = Object.defineProperty, V = Object.getOwnPropertyDescriptor, G = Object.getOwnPropertyNames, T = Object.prototype.hasOwnProperty, q = (r, e) => {
|
|
51388
|
-
for (var n in e) m(r, n, {
|
|
51389
|
-
get: e[n],
|
|
51390
|
-
enumerable: true
|
|
51391
|
-
});
|
|
51392
|
-
}, H = (r, e, n, a) => {
|
|
51393
|
-
if (e && typeof e == "object" || typeof e == "function") for (let t of G(e)) !T.call(r, t) && t !== n && m(r, t, {
|
|
51394
|
-
get: () => e[t],
|
|
51395
|
-
enumerable: !(a = V(e, t)) || a.enumerable
|
|
51396
|
-
});
|
|
51397
|
-
return r;
|
|
51398
|
-
}, J = (r) => H(m({}, "__esModule", { value: true }), r), w = {};
|
|
51399
|
-
q(w, { default: () => re });
|
|
51400
|
-
var A = (r) => Array.isArray(r), d = (r) => typeof r == "function", Q = (r) => r.length === 0, W = (r) => typeof r == "number", K = (r) => typeof r == "object" && r !== null, X = (r) => r instanceof RegExp, b = (r) => typeof r == "string", h = (r) => r === void 0, Y = (r) => {
|
|
51401
|
-
const e = /* @__PURE__ */ new Map();
|
|
51402
|
-
return (n) => {
|
|
51403
|
-
const a = e.get(n);
|
|
51404
|
-
if (a) return a;
|
|
51405
|
-
const t = r(n);
|
|
51406
|
-
return e.set(n, t), t;
|
|
51407
|
-
};
|
|
51408
|
-
}, rr = (r, e, n = {}) => {
|
|
51409
|
-
const a = {
|
|
51410
|
-
cache: {},
|
|
51411
|
-
input: r,
|
|
51412
|
-
index: 0,
|
|
51413
|
-
indexMax: 0,
|
|
51414
|
-
options: n,
|
|
51415
|
-
output: []
|
|
51416
|
-
};
|
|
51417
|
-
if (v(e)(a) && a.index === r.length) return a.output;
|
|
51418
|
-
throw new Error(`Failed to parse at index ${a.indexMax}`);
|
|
51419
|
-
}, i = (r, e) => A(r) ? er(r, e) : b(r) ? ar(r, e) : nr(r, e), er = (r, e) => {
|
|
51420
|
-
const n = {};
|
|
51421
|
-
for (const a of r) {
|
|
51422
|
-
if (a.length !== 1) throw new Error(`Invalid character: "${a}"`);
|
|
51423
|
-
const t = a.charCodeAt(0);
|
|
51424
|
-
n[t] = true;
|
|
51425
|
-
}
|
|
51426
|
-
return (a) => {
|
|
51427
|
-
const t = a.index, o = a.input;
|
|
51428
|
-
for (; a.index < o.length && o.charCodeAt(a.index) in n;) a.index += 1;
|
|
51429
|
-
const u = a.index;
|
|
51430
|
-
if (u > t) {
|
|
51431
|
-
if (!h(e) && !a.options.silent) {
|
|
51432
|
-
const s = a.input.slice(t, u), c = d(e) ? e(s, o, String(t)) : e;
|
|
51433
|
-
h(c) || a.output.push(c);
|
|
51434
|
-
}
|
|
51435
|
-
a.indexMax = Math.max(a.indexMax, a.index);
|
|
51436
|
-
}
|
|
51437
|
-
return true;
|
|
51438
|
-
};
|
|
51439
|
-
}, nr = (r, e) => {
|
|
51440
|
-
const n = r.source, a = r.flags.replace(/y|$/, "y"), t = new RegExp(n, a);
|
|
51441
|
-
return g((o) => {
|
|
51442
|
-
t.lastIndex = o.index;
|
|
51443
|
-
const u = t.exec(o.input);
|
|
51444
|
-
if (u) {
|
|
51445
|
-
if (!h(e) && !o.options.silent) {
|
|
51446
|
-
const s = d(e) ? e(...u, o.input, String(o.index)) : e;
|
|
51447
|
-
h(s) || o.output.push(s);
|
|
51448
|
-
}
|
|
51449
|
-
return o.index += u[0].length, o.indexMax = Math.max(o.indexMax, o.index), true;
|
|
51450
|
-
} else return false;
|
|
51451
|
-
});
|
|
51452
|
-
}, ar = (r, e) => (n) => {
|
|
51453
|
-
if (n.input.startsWith(r, n.index)) {
|
|
51454
|
-
if (!h(e) && !n.options.silent) {
|
|
51455
|
-
const t = d(e) ? e(r, n.input, String(n.index)) : e;
|
|
51456
|
-
h(t) || n.output.push(t);
|
|
51457
|
-
}
|
|
51458
|
-
return n.index += r.length, n.indexMax = Math.max(n.indexMax, n.index), true;
|
|
51459
|
-
} else return false;
|
|
51460
|
-
}, C = (r, e, n, a) => {
|
|
51461
|
-
const t = v(r);
|
|
51462
|
-
return g(_(M((o) => {
|
|
51463
|
-
let u = 0;
|
|
51464
|
-
for (; u < n;) {
|
|
51465
|
-
const s = o.index;
|
|
51466
|
-
if (!t(o) || (u += 1, o.index === s)) break;
|
|
51467
|
-
}
|
|
51468
|
-
return u >= e;
|
|
51469
|
-
})));
|
|
51470
|
-
}, tr = (r, e) => C(r, 0, 1), f = (r, e) => C(r, 0, Infinity), x = (r, e) => {
|
|
51471
|
-
const n = r.map(v);
|
|
51472
|
-
return g(_(M((a) => {
|
|
51473
|
-
for (let t = 0, o = n.length; t < o; t++) if (!n[t](a)) return false;
|
|
51474
|
-
return true;
|
|
51475
|
-
})));
|
|
51476
|
-
}, l = (r, e) => {
|
|
51477
|
-
const n = r.map(v);
|
|
51478
|
-
return g(_((a) => {
|
|
51479
|
-
for (let t = 0, o = n.length; t < o; t++) if (n[t](a)) return true;
|
|
51480
|
-
return false;
|
|
51481
|
-
}));
|
|
51482
|
-
}, M = (r, e = false) => {
|
|
51483
|
-
const n = v(r);
|
|
51484
|
-
return (a) => {
|
|
51485
|
-
const t = a.index, o = a.output.length, u = n(a);
|
|
51486
|
-
return (!u || e) && (a.index = t, a.output.length !== o && (a.output.length = o)), u;
|
|
51487
|
-
};
|
|
51488
|
-
}, _ = (r, e) => {
|
|
51489
|
-
return v(r);
|
|
51490
|
-
}, g = (() => {
|
|
51491
|
-
let r = 0;
|
|
51492
|
-
return (e) => {
|
|
51493
|
-
const n = v(e), a = r += 1;
|
|
51494
|
-
return (t) => {
|
|
51495
|
-
var o;
|
|
51496
|
-
if (t.options.memoization === false) return n(t);
|
|
51497
|
-
const u = t.index, s = (o = t.cache)[a] || (o[a] = /* @__PURE__ */ new Map()), c = s.get(u);
|
|
51498
|
-
if (c === false) return false;
|
|
51499
|
-
if (W(c)) return t.index = c, true;
|
|
51500
|
-
if (c) return t.index = c.index, c.output?.length && t.output.push(...c.output), true;
|
|
51501
|
-
{
|
|
51502
|
-
const Z = t.output.length;
|
|
51503
|
-
if (n(t)) {
|
|
51504
|
-
const D = t.index, U = t.output.length;
|
|
51505
|
-
if (U > Z) {
|
|
51506
|
-
const ee = t.output.slice(Z, U);
|
|
51507
|
-
s.set(u, {
|
|
51508
|
-
index: D,
|
|
51509
|
-
output: ee
|
|
51510
|
-
});
|
|
51511
|
-
} else s.set(u, D);
|
|
51512
|
-
return true;
|
|
51513
|
-
} else return s.set(u, false), false;
|
|
51514
|
-
}
|
|
51515
|
-
};
|
|
51516
|
-
};
|
|
51517
|
-
})(), E = (r) => {
|
|
51518
|
-
let e;
|
|
51519
|
-
return (n) => (e || (e = v(r())), e(n));
|
|
51520
|
-
}, v = Y((r) => {
|
|
51521
|
-
if (d(r)) return Q(r) ? E(r) : r;
|
|
51522
|
-
if (b(r) || X(r)) return i(r);
|
|
51523
|
-
if (A(r)) return x(r);
|
|
51524
|
-
if (K(r)) return l(Object.values(r));
|
|
51525
|
-
throw new Error("Invalid rule");
|
|
51526
|
-
}), P = "abcdefghijklmnopqrstuvwxyz", ir = (r) => {
|
|
51527
|
-
let e = "";
|
|
51528
|
-
for (; r > 0;) e = P[(r - 1) % 26] + e, r = Math.floor((r - 1) / 26);
|
|
51529
|
-
return e;
|
|
51530
|
-
}, O = (r) => {
|
|
51531
|
-
let e = 0;
|
|
51532
|
-
for (let n = 0, a = r.length; n < a; n++) e = e * 26 + P.indexOf(r[n]) + 1;
|
|
51533
|
-
return e;
|
|
51534
|
-
}, S = (r, e) => {
|
|
51535
|
-
if (e < r) return S(e, r);
|
|
51536
|
-
const n = [];
|
|
51537
|
-
for (; r <= e;) n.push(r++);
|
|
51538
|
-
return n;
|
|
51539
|
-
}, or = (r, e, n) => S(r, e).map((a) => String(a).padStart(n, "0")), R = (r, e) => S(O(r), O(e)).map(ir), p = (r) => r, z = (r) => ur((e) => rr(e, r, { memoization: false }).join("")), ur = (r) => {
|
|
51540
|
-
const e = {};
|
|
51541
|
-
return (n) => e[n] ?? (e[n] = r(n));
|
|
51542
|
-
}, sr = i(/^\*\*\/\*$/, ".*"), cr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/, (r, e, n) => `.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}`), lr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/, (r, e, n, a) => `.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}(?:${a.replaceAll(",", "|").replaceAll(".", "\\.")})`), y = i(/\\./, p), pr = i(/[$.*+?^(){}[\]\|]/, (r) => `\\${r}`), vr = i(/./, p), fr = l([i(/^(?:!!)*!(.*)$/, (r, e) => `(?!^${L(e)}$).*?`), i(/^(!!)+/, "")]), j = l([
|
|
51543
|
-
i(/\/(\*\*\/)+/, "(?:/.+/|/)"),
|
|
51544
|
-
i(/^(\*\*\/)+/, "(?:^|.*/)"),
|
|
51545
|
-
i(/\/(\*\*)$/, "(?:/.*|$)"),
|
|
51546
|
-
i(/\*\*/, ".*")
|
|
51547
|
-
]), N = l([i(/\*\/(?!\*\*\/)/, "[^/]*/"), i(/\*/, "[^/]*")]), k = i("?", "[^/]"), $r = i("[", p), wr = i("]", p), Ar = i(/[!^]/, "^/"), br = i(/[a-z]-[a-z]|[0-9]-[0-9]/i, p), Er = l([
|
|
51548
|
-
y,
|
|
51549
|
-
i(/[$.*+?^(){}[\|]/, (r) => `\\${r}`),
|
|
51550
|
-
br,
|
|
51551
|
-
i(/[^\]]/, p)
|
|
51552
|
-
]), B = x([
|
|
51553
|
-
$r,
|
|
51554
|
-
tr(Ar),
|
|
51555
|
-
f(Er),
|
|
51556
|
-
wr
|
|
51557
|
-
]), Pr = i("{", "(?:"), Or = i("}", ")"), I = x([
|
|
51558
|
-
Pr,
|
|
51559
|
-
l([
|
|
51560
|
-
i(/(\d+)\.\.(\d+)/, (r, e, n) => or(+e, +n, Math.min(e.length, n.length)).join("|")),
|
|
51561
|
-
i(/([a-z]+)\.\.([a-z]+)/, (r, e, n) => R(e, n).join("|")),
|
|
51562
|
-
i(/([A-Z]+)\.\.([A-Z]+)/, (r, e, n) => R(e.toLowerCase(), n.toLowerCase()).join("|").toUpperCase())
|
|
51563
|
-
]),
|
|
51564
|
-
Or
|
|
51565
|
-
]), kr = i("{", "(?:"), Br = i("}", ")"), Ir = i(",", "|"), Fr = i(/[$.*+?^(){[\]\|]/, (r) => `\\${r}`), Lr = i(/[^}]/, p), F = x([
|
|
51566
|
-
kr,
|
|
51567
|
-
f(l([
|
|
51568
|
-
j,
|
|
51569
|
-
N,
|
|
51570
|
-
k,
|
|
51571
|
-
B,
|
|
51572
|
-
I,
|
|
51573
|
-
E(() => F),
|
|
51574
|
-
y,
|
|
51575
|
-
Fr,
|
|
51576
|
-
Ir,
|
|
51577
|
-
Lr
|
|
51578
|
-
])),
|
|
51579
|
-
Br
|
|
51580
|
-
]), L = z(f(l([
|
|
51581
|
-
sr,
|
|
51582
|
-
cr,
|
|
51583
|
-
lr,
|
|
51584
|
-
fr,
|
|
51585
|
-
j,
|
|
51586
|
-
N,
|
|
51587
|
-
k,
|
|
51588
|
-
B,
|
|
51589
|
-
I,
|
|
51590
|
-
F,
|
|
51591
|
-
y,
|
|
51592
|
-
pr,
|
|
51593
|
-
vr
|
|
51594
|
-
]))), Tr = i(/\\./, p), qr = i(/./, p), Yr = z(f(l([
|
|
51595
|
-
Tr,
|
|
51596
|
-
i(/\*\*\*+/, "*"),
|
|
51597
|
-
i(/([^/{[(!])\*\*/, (r, e) => `${e}*`),
|
|
51598
|
-
i(/(^|.)\*\*(?=[^*/)\]}])/, (r, e) => `${e}*`),
|
|
51599
|
-
qr
|
|
51600
|
-
]))), $ = (r, e) => {
|
|
51601
|
-
const n = Array.isArray(r) ? r : [r];
|
|
51602
|
-
if (!n.length) return false;
|
|
51603
|
-
const a = n.map($.compile), t = n.every((s) => /(\/(?:\*\*)?|\[\/\])$/.test(s)), o = e.replace(/[\\\/]+/g, "/").replace(/\/$/, t ? "/" : "");
|
|
51604
|
-
return a.some((s) => s.test(o));
|
|
51605
|
-
};
|
|
51606
|
-
$.compile = (r) => new RegExp(`^${L(Yr(r))}$`, "s");
|
|
51607
|
-
var re = $;
|
|
51608
|
-
return J(w);
|
|
51609
|
-
})();
|
|
51610
|
-
return __lib__.default || __lib__;
|
|
51611
|
-
};
|
|
51612
|
-
let _match;
|
|
51613
|
-
const zeptomatch = (path, pattern) => {
|
|
51614
|
-
if (!_match) {
|
|
51615
|
-
_match = _lazyMatch();
|
|
51616
|
-
_lazyMatch = null;
|
|
51617
|
-
}
|
|
51618
|
-
return _match(path, pattern);
|
|
51619
|
-
};
|
|
51620
51341
|
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
51621
51342
|
function normalizeWindowsPath(input = "") {
|
|
51622
51343
|
if (!input) return input;
|
|
@@ -51625,11 +51346,7 @@ function normalizeWindowsPath(input = "") {
|
|
|
51625
51346
|
const _UNC_REGEX = /^[/\\]{2}/;
|
|
51626
51347
|
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
51627
51348
|
const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
51628
|
-
const
|
|
51629
|
-
const _EXTNAME_RE = /.(\.[^./]+|\.)$/;
|
|
51630
|
-
const _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
|
|
51631
|
-
const sep$1 = "/";
|
|
51632
|
-
const normalize$1 = function(path) {
|
|
51349
|
+
const normalize = function(path) {
|
|
51633
51350
|
if (path.length === 0) return ".";
|
|
51634
51351
|
path = normalizeWindowsPath(path);
|
|
51635
51352
|
const isUNCPath = path.match(_UNC_REGEX);
|
|
@@ -51648,7 +51365,7 @@ const normalize$1 = function(path) {
|
|
|
51648
51365
|
}
|
|
51649
51366
|
return isPathAbsolute && !isAbsolute$1(path) ? `/${path}` : path;
|
|
51650
51367
|
};
|
|
51651
|
-
const join$
|
|
51368
|
+
const join$1 = function(...segments) {
|
|
51652
51369
|
let path = "";
|
|
51653
51370
|
for (const seg of segments) {
|
|
51654
51371
|
if (!seg) continue;
|
|
@@ -51659,25 +51376,7 @@ const join$3 = function(...segments) {
|
|
|
51659
51376
|
else path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
51660
51377
|
} else path += seg;
|
|
51661
51378
|
}
|
|
51662
|
-
return normalize
|
|
51663
|
-
};
|
|
51664
|
-
function cwd() {
|
|
51665
|
-
if (typeof process !== "undefined" && typeof process.cwd === "function") return process.cwd().replace(/\\/g, "/");
|
|
51666
|
-
return "/";
|
|
51667
|
-
}
|
|
51668
|
-
const resolve$2 = function(...arguments_) {
|
|
51669
|
-
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
51670
|
-
let resolvedPath = "";
|
|
51671
|
-
let resolvedAbsolute = false;
|
|
51672
|
-
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
51673
|
-
const path = index >= 0 ? arguments_[index] : cwd();
|
|
51674
|
-
if (!path || path.length === 0) continue;
|
|
51675
|
-
resolvedPath = `${path}/${resolvedPath}`;
|
|
51676
|
-
resolvedAbsolute = isAbsolute$1(path);
|
|
51677
|
-
}
|
|
51678
|
-
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
|
51679
|
-
if (resolvedAbsolute && !isAbsolute$1(resolvedPath)) return `/${resolvedPath}`;
|
|
51680
|
-
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
51379
|
+
return normalize(path);
|
|
51681
51380
|
};
|
|
51682
51381
|
function normalizeString(path, allowAboveRoot) {
|
|
51683
51382
|
let res = "";
|
|
@@ -51732,122 +51431,11 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
51732
51431
|
const isAbsolute$1 = function(p) {
|
|
51733
51432
|
return _IS_ABSOLUTE_RE.test(p);
|
|
51734
51433
|
};
|
|
51735
|
-
const
|
|
51736
|
-
return normalizeWindowsPath(p);
|
|
51737
|
-
};
|
|
51738
|
-
const extname = function(p) {
|
|
51739
|
-
if (p === "..") return "";
|
|
51740
|
-
const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
|
|
51741
|
-
return match && match[1] || "";
|
|
51742
|
-
};
|
|
51743
|
-
const relative$1 = function(from, to) {
|
|
51744
|
-
const _from = resolve$2(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
51745
|
-
const _to = resolve$2(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
51746
|
-
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) return _to.join("/");
|
|
51747
|
-
const _fromCopy = [..._from];
|
|
51748
|
-
for (const segment of _fromCopy) {
|
|
51749
|
-
if (_to[0] !== segment) break;
|
|
51750
|
-
_from.shift();
|
|
51751
|
-
_to.shift();
|
|
51752
|
-
}
|
|
51753
|
-
return [..._from.map(() => ".."), ..._to].join("/");
|
|
51754
|
-
};
|
|
51755
|
-
const dirname$3 = function(p) {
|
|
51434
|
+
const dirname$1 = function(p) {
|
|
51756
51435
|
const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
51757
51436
|
if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) segments[0] += "/";
|
|
51758
51437
|
return segments.join("/") || (isAbsolute$1(p) ? "/" : ".");
|
|
51759
51438
|
};
|
|
51760
|
-
const format = function(p) {
|
|
51761
|
-
const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
|
|
51762
|
-
const segments = [
|
|
51763
|
-
p.root,
|
|
51764
|
-
p.dir,
|
|
51765
|
-
p.base ?? (p.name ?? "") + ext
|
|
51766
|
-
].filter(Boolean);
|
|
51767
|
-
return normalizeWindowsPath(p.root ? resolve$2(...segments) : segments.join("/"));
|
|
51768
|
-
};
|
|
51769
|
-
const basename$3 = function(p, extension) {
|
|
51770
|
-
const segments = normalizeWindowsPath(p).split("/");
|
|
51771
|
-
let lastSegment = "";
|
|
51772
|
-
for (let i = segments.length - 1; i >= 0; i--) {
|
|
51773
|
-
const val = segments[i];
|
|
51774
|
-
if (val) {
|
|
51775
|
-
lastSegment = val;
|
|
51776
|
-
break;
|
|
51777
|
-
}
|
|
51778
|
-
}
|
|
51779
|
-
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
51780
|
-
};
|
|
51781
|
-
const parse = function(p) {
|
|
51782
|
-
const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
|
|
51783
|
-
const base = basename$3(p);
|
|
51784
|
-
const extension = extname(base);
|
|
51785
|
-
return {
|
|
51786
|
-
root,
|
|
51787
|
-
dir: dirname$3(p),
|
|
51788
|
-
base,
|
|
51789
|
-
ext: extension,
|
|
51790
|
-
name: base.slice(0, base.length - extension.length)
|
|
51791
|
-
};
|
|
51792
|
-
};
|
|
51793
|
-
const matchesGlob = (path, pattern) => {
|
|
51794
|
-
return zeptomatch(pattern, normalize$1(path));
|
|
51795
|
-
};
|
|
51796
|
-
const _path = {
|
|
51797
|
-
__proto__: null,
|
|
51798
|
-
basename: basename$3,
|
|
51799
|
-
dirname: dirname$3,
|
|
51800
|
-
extname,
|
|
51801
|
-
format,
|
|
51802
|
-
isAbsolute: isAbsolute$1,
|
|
51803
|
-
join: join$3,
|
|
51804
|
-
matchesGlob,
|
|
51805
|
-
normalize: normalize$1,
|
|
51806
|
-
normalizeString,
|
|
51807
|
-
parse,
|
|
51808
|
-
relative: relative$1,
|
|
51809
|
-
resolve: resolve$2,
|
|
51810
|
-
sep: "/",
|
|
51811
|
-
toNamespacedPath
|
|
51812
|
-
};
|
|
51813
|
-
|
|
51814
|
-
//#endregion
|
|
51815
|
-
//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.mjs
|
|
51816
|
-
var dist_exports = /* @__PURE__ */ __exportAll({
|
|
51817
|
-
basename: () => basename$3,
|
|
51818
|
-
default: () => posix$1,
|
|
51819
|
-
delimiter: () => delimiter,
|
|
51820
|
-
dirname: () => dirname$3,
|
|
51821
|
-
extname: () => extname,
|
|
51822
|
-
format: () => format,
|
|
51823
|
-
isAbsolute: () => isAbsolute$1,
|
|
51824
|
-
join: () => join$3,
|
|
51825
|
-
matchesGlob: () => matchesGlob,
|
|
51826
|
-
normalize: () => normalize$1,
|
|
51827
|
-
normalizeString: () => normalizeString,
|
|
51828
|
-
parse: () => parse,
|
|
51829
|
-
posix: () => posix$1,
|
|
51830
|
-
relative: () => relative$1,
|
|
51831
|
-
resolve: () => resolve$2,
|
|
51832
|
-
sep: () => "/",
|
|
51833
|
-
toNamespacedPath: () => toNamespacedPath,
|
|
51834
|
-
win32: () => win32
|
|
51835
|
-
});
|
|
51836
|
-
const delimiter = globalThis.process?.platform === "win32" ? ";" : ":";
|
|
51837
|
-
const _platforms = {
|
|
51838
|
-
posix: void 0,
|
|
51839
|
-
win32: void 0
|
|
51840
|
-
};
|
|
51841
|
-
const mix = (del = delimiter) => {
|
|
51842
|
-
return new Proxy(_path, { get(_, prop) {
|
|
51843
|
-
if (prop === "delimiter") return del;
|
|
51844
|
-
if (prop === "posix") return posix$1;
|
|
51845
|
-
if (prop === "win32") return win32;
|
|
51846
|
-
return _platforms[prop] || _path[prop];
|
|
51847
|
-
} });
|
|
51848
|
-
};
|
|
51849
|
-
const posix$1 = /* @__PURE__ */ mix(":");
|
|
51850
|
-
const win32 = /* @__PURE__ */ mix(";");
|
|
51851
51439
|
|
|
51852
51440
|
//#endregion
|
|
51853
51441
|
//#region ../../packages/agent-core-v2/src/tool/path-access.ts
|
|
@@ -52418,10 +52006,17 @@ function interruptedToolMessage(toolCallId) {
|
|
|
52418
52006
|
};
|
|
52419
52007
|
}
|
|
52420
52008
|
|
|
52009
|
+
//#endregion
|
|
52010
|
+
//#region ../../packages/agent-core-v2/src/agent/contextMemory/types.ts
|
|
52011
|
+
function isThreadWatchNotificationOrigin(origin) {
|
|
52012
|
+
return origin?.kind === "peer_thread" && (origin.notification === true || (origin.source.name?.startsWith("thread-watch:") ?? false));
|
|
52013
|
+
}
|
|
52014
|
+
|
|
52421
52015
|
//#endregion
|
|
52422
52016
|
//#region ../../packages/agent-core-v2/src/agent/contextMemory/conversationTime.ts
|
|
52423
52017
|
function isUndoAnchorOrigin(origin) {
|
|
52424
52018
|
if (origin?.kind === "merged") return origin.origins.some(isUndoAnchorOrigin);
|
|
52019
|
+
if (isThreadWatchNotificationOrigin(origin)) return false;
|
|
52425
52020
|
if (origin?.kind === "external_thread" || origin?.kind === "unknown") return true;
|
|
52426
52021
|
if (origin === void 0 || origin.kind === "user" || origin.kind === "peer_thread" || origin.kind === "bridged_peer" || origin.kind === "agent_message" || origin.kind === "branch_fold" || origin.kind === "system_trigger" && origin.name === "thread_create" || origin.kind === "room_message" && origin.targeted) return true;
|
|
52427
52022
|
return (origin.kind === "skill_activation" || origin.kind === "plugin_command") && origin.trigger === "user-slash";
|
|
@@ -52472,19 +52067,16 @@ const defaultHandler = (err) => {
|
|
|
52472
52067
|
console.error("[unexpected]", err);
|
|
52473
52068
|
};
|
|
52474
52069
|
let currentHandler = defaultHandler;
|
|
52070
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
52475
52071
|
function onUnexpectedError(err) {
|
|
52476
52072
|
try {
|
|
52477
52073
|
currentHandler(err);
|
|
52478
52074
|
} catch (handlerErr) {
|
|
52479
52075
|
console.error("[unexpected] handler threw", handlerErr, "while reporting", err);
|
|
52480
52076
|
}
|
|
52481
|
-
|
|
52482
|
-
|
|
52483
|
-
|
|
52484
|
-
listener();
|
|
52485
|
-
} catch (err) {
|
|
52486
|
-
onUnexpectedError(err);
|
|
52487
|
-
}
|
|
52077
|
+
for (const listener of [...listeners]) try {
|
|
52078
|
+
listener(err);
|
|
52079
|
+
} catch {}
|
|
52488
52080
|
}
|
|
52489
52081
|
|
|
52490
52082
|
//#endregion
|
|
@@ -52938,67 +52530,6 @@ var Node = class Node {
|
|
|
52938
52530
|
|
|
52939
52531
|
//#endregion
|
|
52940
52532
|
//#region ../../packages/agent-core-v2/src/_base/event.ts
|
|
52941
|
-
var EventSubscription = class {
|
|
52942
|
-
_remove;
|
|
52943
|
-
debugLabel;
|
|
52944
|
-
_removed = false;
|
|
52945
|
-
constructor(debugName, _remove) {
|
|
52946
|
-
this._remove = _remove;
|
|
52947
|
-
this.debugLabel = debugName === void 0 ? void 0 : `on:${debugName}`;
|
|
52948
|
-
}
|
|
52949
|
-
dispose() {
|
|
52950
|
-
if (this._removed) return;
|
|
52951
|
-
this._removed = true;
|
|
52952
|
-
this._remove();
|
|
52953
|
-
}
|
|
52954
|
-
};
|
|
52955
|
-
var Emitter = class {
|
|
52956
|
-
debugName;
|
|
52957
|
-
_listeners;
|
|
52958
|
-
_disposed = false;
|
|
52959
|
-
_event;
|
|
52960
|
-
constructor(debugName) {
|
|
52961
|
-
this.debugName = debugName;
|
|
52962
|
-
}
|
|
52963
|
-
get event() {
|
|
52964
|
-
this._event ??= (listener, thisArg, disposables) => {
|
|
52965
|
-
if (this._disposed) return Disposable.None;
|
|
52966
|
-
this._listeners ??= /* @__PURE__ */ new Set();
|
|
52967
|
-
const entry = {
|
|
52968
|
-
listener,
|
|
52969
|
-
thisArg
|
|
52970
|
-
};
|
|
52971
|
-
this._listeners.add(entry);
|
|
52972
|
-
const subscription = new EventSubscription(this.debugName, () => {
|
|
52973
|
-
if (this._disposed) return;
|
|
52974
|
-
this._listeners?.delete(entry);
|
|
52975
|
-
});
|
|
52976
|
-
if (disposables !== void 0) if (disposables instanceof DisposableStore) disposables.add(subscription);
|
|
52977
|
-
else disposables.push(subscription);
|
|
52978
|
-
return subscription;
|
|
52979
|
-
};
|
|
52980
|
-
return this._event;
|
|
52981
|
-
}
|
|
52982
|
-
get listenerCount() {
|
|
52983
|
-
return this._listeners?.size ?? 0;
|
|
52984
|
-
}
|
|
52985
|
-
fire(value) {
|
|
52986
|
-
if (this._disposed || this._listeners === void 0) return;
|
|
52987
|
-
const snapshot = Array.from(this._listeners);
|
|
52988
|
-
for (const entry of snapshot) safelyCallListener(() => {
|
|
52989
|
-
entry.listener.call(entry.thisArg, value);
|
|
52990
|
-
});
|
|
52991
|
-
}
|
|
52992
|
-
dispose() {
|
|
52993
|
-
if (this._disposed) return;
|
|
52994
|
-
this._disposed = true;
|
|
52995
|
-
this._listeners?.clear();
|
|
52996
|
-
this._listeners = void 0;
|
|
52997
|
-
}
|
|
52998
|
-
get isDisposed() {
|
|
52999
|
-
return this._disposed;
|
|
53000
|
-
}
|
|
53001
|
-
};
|
|
53002
52533
|
let Event;
|
|
53003
52534
|
(function(_Event) {
|
|
53004
52535
|
_Event.None = () => Disposable.None;
|
|
@@ -53164,10 +52695,35 @@ const planKey = defineState("plan", () => ({ active: false })).replayable({ sche
|
|
|
53164
52695
|
|
|
53165
52696
|
//#endregion
|
|
53166
52697
|
//#region ../../packages/agent-core-v2/src/agent/systemReminder/systemReminder.ts
|
|
53167
|
-
const
|
|
53168
|
-
const
|
|
52698
|
+
const SYSTEM_REMINDER_OPEN = "<system-reminder>";
|
|
52699
|
+
const SYSTEM_REMINDER_CLOSE = "</system-reminder>";
|
|
52700
|
+
const SYSTEM_REMINDER_PREFIX = `${SYSTEM_REMINDER_OPEN}\n`;
|
|
52701
|
+
const SYSTEM_REMINDER_SUFFIX = `\n${SYSTEM_REMINDER_CLOSE}`;
|
|
52702
|
+
const SYSTEM_REMINDER_CLOSE_RE = /<\/system-reminder>/gi;
|
|
52703
|
+
function parseTopLevelSystemReminderBlocks(trimmed) {
|
|
52704
|
+
if (!trimmed.startsWith(SYSTEM_REMINDER_OPEN) || !trimmed.endsWith(SYSTEM_REMINDER_CLOSE)) return;
|
|
52705
|
+
const blocks = [];
|
|
52706
|
+
let cursor = 0;
|
|
52707
|
+
while (cursor < trimmed.length) {
|
|
52708
|
+
while (cursor < trimmed.length && /\s/.test(trimmed[cursor])) cursor += 1;
|
|
52709
|
+
if (cursor >= trimmed.length) break;
|
|
52710
|
+
if (!trimmed.startsWith(SYSTEM_REMINDER_OPEN, cursor)) return void 0;
|
|
52711
|
+
const bodyStart = cursor + 17;
|
|
52712
|
+
const closeIdx = trimmed.indexOf(SYSTEM_REMINDER_CLOSE, bodyStart);
|
|
52713
|
+
if (closeIdx === -1) return void 0;
|
|
52714
|
+
blocks.push(trimmed.slice(bodyStart, closeIdx).trim());
|
|
52715
|
+
cursor = closeIdx + 18;
|
|
52716
|
+
}
|
|
52717
|
+
return blocks.length > 0 ? blocks : void 0;
|
|
52718
|
+
}
|
|
52719
|
+
function escapeClosingSystemReminder(content) {
|
|
52720
|
+
return content.replace(SYSTEM_REMINDER_CLOSE_RE, "<\\/system-reminder>");
|
|
52721
|
+
}
|
|
53169
52722
|
function wrapSystemReminder(content) {
|
|
53170
|
-
|
|
52723
|
+
const trimmed = content.trim();
|
|
52724
|
+
const blocks = parseTopLevelSystemReminderBlocks(trimmed);
|
|
52725
|
+
if (blocks !== void 0) return blocks.map((block) => `${SYSTEM_REMINDER_PREFIX}${escapeClosingSystemReminder(block)}${SYSTEM_REMINDER_SUFFIX}`).join("\n\n");
|
|
52726
|
+
return `${SYSTEM_REMINDER_PREFIX}${escapeClosingSystemReminder(trimmed)}${SYSTEM_REMINDER_SUFFIX}`;
|
|
53171
52727
|
}
|
|
53172
52728
|
const IAgentSystemReminderService = createDecorator("agentSystemReminderService");
|
|
53173
52729
|
|
|
@@ -53753,33 +53309,6 @@ const ThreadCommunicationErrors = {
|
|
|
53753
53309
|
};
|
|
53754
53310
|
registerErrorDomain(ThreadCommunicationErrors);
|
|
53755
53311
|
|
|
53756
|
-
//#endregion
|
|
53757
|
-
//#region ../../packages/agent-core-v2/src/_base/utils/abort.ts
|
|
53758
|
-
function abortError(message = "Aborted") {
|
|
53759
|
-
const error = new Error(message);
|
|
53760
|
-
error.name = "AbortError";
|
|
53761
|
-
return error;
|
|
53762
|
-
}
|
|
53763
|
-
function abortable(promise, signal) {
|
|
53764
|
-
if (signal.aborted) return Promise.reject(abortReason(signal));
|
|
53765
|
-
return new Promise((resolve, reject) => {
|
|
53766
|
-
const onAbort = () => {
|
|
53767
|
-
reject(abortReason(signal));
|
|
53768
|
-
};
|
|
53769
|
-
signal.addEventListener("abort", onAbort, { once: true });
|
|
53770
|
-
promise.then(resolve, reject).finally(() => {
|
|
53771
|
-
signal.removeEventListener("abort", onAbort);
|
|
53772
|
-
});
|
|
53773
|
-
});
|
|
53774
|
-
}
|
|
53775
|
-
function abortReason(signal) {
|
|
53776
|
-
if (signal.reason instanceof Error && !isDefaultAbortReason(signal.reason)) return signal.reason;
|
|
53777
|
-
return abortError();
|
|
53778
|
-
}
|
|
53779
|
-
function isDefaultAbortReason(reason) {
|
|
53780
|
-
return reason.name === "AbortError" && reason.message === "This operation was aborted";
|
|
53781
|
-
}
|
|
53782
|
-
|
|
53783
53312
|
//#endregion
|
|
53784
53313
|
//#region ../../packages/agent-core-v2/src/kosong/contract/errors.ts
|
|
53785
53314
|
init_errors$1();
|
|
@@ -54895,13 +54424,14 @@ function createContextTranscriptReducer() {
|
|
|
54895
54424
|
logical.push(...entries);
|
|
54896
54425
|
};
|
|
54897
54426
|
const sink = {
|
|
54898
|
-
openAssistant: (time) => {
|
|
54427
|
+
openAssistant: (time, source) => {
|
|
54899
54428
|
openEntry = {
|
|
54900
54429
|
message: {
|
|
54901
54430
|
role: "assistant",
|
|
54902
54431
|
content: [],
|
|
54903
54432
|
toolCalls: [],
|
|
54904
|
-
partial: true
|
|
54433
|
+
partial: true,
|
|
54434
|
+
source
|
|
54905
54435
|
},
|
|
54906
54436
|
time
|
|
54907
54437
|
};
|
|
@@ -54910,8 +54440,13 @@ function createContextTranscriptReducer() {
|
|
|
54910
54440
|
appendOpenContent: (part) => {
|
|
54911
54441
|
openEntry?.message.content.push(part);
|
|
54912
54442
|
},
|
|
54913
|
-
appendOpenToolCall: (call) => {
|
|
54914
|
-
openEntry
|
|
54443
|
+
appendOpenToolCall: (call, source) => {
|
|
54444
|
+
if (openEntry === void 0) return;
|
|
54445
|
+
openEntry.message.toolCalls.push(call);
|
|
54446
|
+
if (source !== void 0) openEntry.message.toolCallSources = {
|
|
54447
|
+
...openEntry.message.toolCallSources,
|
|
54448
|
+
[call.id]: source
|
|
54449
|
+
};
|
|
54915
54450
|
},
|
|
54916
54451
|
dropOpenAssistant: () => {
|
|
54917
54452
|
const entry = openEntry;
|
|
@@ -54924,8 +54459,11 @@ function createContextTranscriptReducer() {
|
|
|
54924
54459
|
if (openEntry !== void 0) openEntry.message.partial = void 0;
|
|
54925
54460
|
openEntry = void 0;
|
|
54926
54461
|
},
|
|
54927
|
-
pushToolMessage: (message, time) => {
|
|
54928
|
-
push(toMutableEntry(message
|
|
54462
|
+
pushToolMessage: (message, time, source) => {
|
|
54463
|
+
push(toMutableEntry(source === void 0 ? message : {
|
|
54464
|
+
...message,
|
|
54465
|
+
source
|
|
54466
|
+
}, time));
|
|
54929
54467
|
},
|
|
54930
54468
|
pushMessage: (message, time) => {
|
|
54931
54469
|
const revision = findProviderMessageRevision(logical, message, (entry) => entry.message);
|
|
@@ -55050,6 +54588,7 @@ function toMutableEntry(message, time) {
|
|
|
55050
54588
|
return {
|
|
55051
54589
|
message: {
|
|
55052
54590
|
id: message.id,
|
|
54591
|
+
inheritedSeed: message.inheritedSeed,
|
|
55053
54592
|
providerMessageId: message.providerMessageId,
|
|
55054
54593
|
role: message.role,
|
|
55055
54594
|
content: [...message.content],
|
|
@@ -55310,3267 +54849,9 @@ function parseThreadTurnRecord(text) {
|
|
|
55310
54849
|
};
|
|
55311
54850
|
}
|
|
55312
54851
|
|
|
55313
|
-
//#endregion
|
|
55314
|
-
//#region ../../packages/agent-core-v2/src/_base/utils/nativeFsWatchErrorGuard.ts
|
|
55315
|
-
const GUARD_STATE = Symbol.for("kiki.nativeFsWatchErrorGuard");
|
|
55316
|
-
const GUARDED_PROTOTYPE = Symbol.for("kiki.nativeFsWatchErrorGuard.prototype");
|
|
55317
|
-
const guardGlobal = globalThis;
|
|
55318
|
-
const guardState = guardGlobal[GUARD_STATE] ??= {
|
|
55319
|
-
installed: false,
|
|
55320
|
-
report: (error) => {
|
|
55321
|
-
console.error("[fs.watch]", error);
|
|
55322
|
-
}
|
|
55323
|
-
};
|
|
55324
|
-
const ownerStorage = guardState.owner ??= new AsyncLocalStorage();
|
|
55325
|
-
function tryCapture(root) {
|
|
55326
|
-
try {
|
|
55327
|
-
const watcher = watch(root, { persistent: false });
|
|
55328
|
-
const proto = Object.getPrototypeOf(watcher);
|
|
55329
|
-
watcher.close();
|
|
55330
|
-
return proto;
|
|
55331
|
-
} catch {
|
|
55332
|
-
return;
|
|
55333
|
-
}
|
|
55334
|
-
}
|
|
55335
|
-
function captureFsWatcherPrototype() {
|
|
55336
|
-
for (const root of [tmpdir(), process.cwd()]) {
|
|
55337
|
-
const proto = tryCapture(root);
|
|
55338
|
-
if (proto !== void 0) return proto;
|
|
55339
|
-
}
|
|
55340
|
-
}
|
|
55341
|
-
function installNativeFsWatchErrorGuard() {
|
|
55342
|
-
if (guardState.installed) return;
|
|
55343
|
-
const proto = captureFsWatcherPrototype();
|
|
55344
|
-
if (proto === void 0) return;
|
|
55345
|
-
if (proto[GUARDED_PROTOTYPE] === true) {
|
|
55346
|
-
guardState.installed = true;
|
|
55347
|
-
return;
|
|
55348
|
-
}
|
|
55349
|
-
const originalEmit = proto.emit;
|
|
55350
|
-
proto.emit = function(event, ...args) {
|
|
55351
|
-
if (event === "error" && this.listenerCount("error") === 0) {
|
|
55352
|
-
const error = args[0];
|
|
55353
|
-
const owner = ownerStorage.getStore();
|
|
55354
|
-
if (owner === void 0) guardState.report(error);
|
|
55355
|
-
else owner(error);
|
|
55356
|
-
return false;
|
|
55357
|
-
}
|
|
55358
|
-
return originalEmit.call(this, event, ...args);
|
|
55359
|
-
};
|
|
55360
|
-
proto[GUARDED_PROTOTYPE] = true;
|
|
55361
|
-
guardState.installed = true;
|
|
55362
|
-
}
|
|
55363
|
-
function setNativeFsWatchErrorReporter(reporter) {
|
|
55364
|
-
guardState.report = reporter;
|
|
55365
|
-
}
|
|
55366
|
-
installNativeFsWatchErrorGuard();
|
|
55367
|
-
|
|
55368
|
-
//#endregion
|
|
55369
|
-
//#region ../../packages/agent-core-v2/src/_base/utils/fsWatchGuard.ts
|
|
55370
|
-
installNativeFsWatchErrorGuard();
|
|
55371
|
-
setNativeFsWatchErrorReporter(onUnexpectedError);
|
|
55372
|
-
const DELETED_WATCH_BURST_WINDOW_MS = 100;
|
|
55373
|
-
const DELETED_WATCH_BURST_THRESHOLD = 4;
|
|
55374
|
-
const DELETED_WATCH_TRACKED_CAP = 256;
|
|
55375
|
-
function guardChokidarDeletedWatchSpin(watcher, exists = existsSync) {
|
|
55376
|
-
const bursts = /* @__PURE__ */ new Map();
|
|
55377
|
-
watcher.on("raw", (eventName, _path, details) => {
|
|
55378
|
-
if (eventName !== "rename" && eventName !== "change") return;
|
|
55379
|
-
const watchedPath = typeof details === "object" && details !== null && "watchedPath" in details ? details.watchedPath : void 0;
|
|
55380
|
-
if (typeof watchedPath !== "string" || watchedPath.length === 0) return;
|
|
55381
|
-
const now = performance.now();
|
|
55382
|
-
const prev = bursts.get(watchedPath);
|
|
55383
|
-
if (prev === void 0 || now - prev.start > DELETED_WATCH_BURST_WINDOW_MS) {
|
|
55384
|
-
if (bursts.size >= DELETED_WATCH_TRACKED_CAP) bursts.clear();
|
|
55385
|
-
bursts.set(watchedPath, {
|
|
55386
|
-
start: now,
|
|
55387
|
-
count: 1
|
|
55388
|
-
});
|
|
55389
|
-
return;
|
|
55390
|
-
}
|
|
55391
|
-
prev.count += 1;
|
|
55392
|
-
if (prev.count < DELETED_WATCH_BURST_THRESHOLD) return;
|
|
55393
|
-
bursts.delete(watchedPath);
|
|
55394
|
-
if (!exists(watchedPath)) watcher.unwatch(watchedPath);
|
|
55395
|
-
});
|
|
55396
|
-
}
|
|
55397
|
-
|
|
55398
|
-
//#endregion
|
|
55399
|
-
//#region ../../node_modules/.pnpm/readdirp@4.1.2/node_modules/readdirp/esm/index.js
|
|
55400
|
-
const EntryTypes = {
|
|
55401
|
-
FILE_TYPE: "files",
|
|
55402
|
-
DIR_TYPE: "directories",
|
|
55403
|
-
FILE_DIR_TYPE: "files_directories",
|
|
55404
|
-
EVERYTHING_TYPE: "all"
|
|
55405
|
-
};
|
|
55406
|
-
const defaultOptions = {
|
|
55407
|
-
root: ".",
|
|
55408
|
-
fileFilter: (_entryInfo) => true,
|
|
55409
|
-
directoryFilter: (_entryInfo) => true,
|
|
55410
|
-
type: EntryTypes.FILE_TYPE,
|
|
55411
|
-
lstat: false,
|
|
55412
|
-
depth: 2147483648,
|
|
55413
|
-
alwaysStat: false,
|
|
55414
|
-
highWaterMark: 4096
|
|
55415
|
-
};
|
|
55416
|
-
Object.freeze(defaultOptions);
|
|
55417
|
-
const RECURSIVE_ERROR_CODE = "READDIRP_RECURSIVE_ERROR";
|
|
55418
|
-
const NORMAL_FLOW_ERRORS = new Set([
|
|
55419
|
-
"ENOENT",
|
|
55420
|
-
"EPERM",
|
|
55421
|
-
"EACCES",
|
|
55422
|
-
"ELOOP",
|
|
55423
|
-
RECURSIVE_ERROR_CODE
|
|
55424
|
-
]);
|
|
55425
|
-
const ALL_TYPES = [
|
|
55426
|
-
EntryTypes.DIR_TYPE,
|
|
55427
|
-
EntryTypes.EVERYTHING_TYPE,
|
|
55428
|
-
EntryTypes.FILE_DIR_TYPE,
|
|
55429
|
-
EntryTypes.FILE_TYPE
|
|
55430
|
-
];
|
|
55431
|
-
const DIR_TYPES = new Set([
|
|
55432
|
-
EntryTypes.DIR_TYPE,
|
|
55433
|
-
EntryTypes.EVERYTHING_TYPE,
|
|
55434
|
-
EntryTypes.FILE_DIR_TYPE
|
|
55435
|
-
]);
|
|
55436
|
-
const FILE_TYPES = new Set([
|
|
55437
|
-
EntryTypes.EVERYTHING_TYPE,
|
|
55438
|
-
EntryTypes.FILE_DIR_TYPE,
|
|
55439
|
-
EntryTypes.FILE_TYPE
|
|
55440
|
-
]);
|
|
55441
|
-
const isNormalFlowError = (error) => NORMAL_FLOW_ERRORS.has(error.code);
|
|
55442
|
-
const wantBigintFsStats = process.platform === "win32";
|
|
55443
|
-
const emptyFn = (_entryInfo) => true;
|
|
55444
|
-
const normalizeFilter = (filter) => {
|
|
55445
|
-
if (filter === void 0) return emptyFn;
|
|
55446
|
-
if (typeof filter === "function") return filter;
|
|
55447
|
-
if (typeof filter === "string") {
|
|
55448
|
-
const fl = filter.trim();
|
|
55449
|
-
return (entry) => entry.basename === fl;
|
|
55450
|
-
}
|
|
55451
|
-
if (Array.isArray(filter)) {
|
|
55452
|
-
const trItems = filter.map((item) => item.trim());
|
|
55453
|
-
return (entry) => trItems.some((f) => entry.basename === f);
|
|
55454
|
-
}
|
|
55455
|
-
return emptyFn;
|
|
55456
|
-
};
|
|
55457
|
-
/** Readable readdir stream, emitting new files as they're being listed. */
|
|
55458
|
-
var ReaddirpStream = class extends Readable {
|
|
55459
|
-
constructor(options = {}) {
|
|
55460
|
-
super({
|
|
55461
|
-
objectMode: true,
|
|
55462
|
-
autoDestroy: true,
|
|
55463
|
-
highWaterMark: options.highWaterMark
|
|
55464
|
-
});
|
|
55465
|
-
const opts = {
|
|
55466
|
-
...defaultOptions,
|
|
55467
|
-
...options
|
|
55468
|
-
};
|
|
55469
|
-
const { root, type } = opts;
|
|
55470
|
-
this._fileFilter = normalizeFilter(opts.fileFilter);
|
|
55471
|
-
this._directoryFilter = normalizeFilter(opts.directoryFilter);
|
|
55472
|
-
const statMethod = opts.lstat ? lstat : stat$1;
|
|
55473
|
-
if (wantBigintFsStats) this._stat = (path) => statMethod(path, { bigint: true });
|
|
55474
|
-
else this._stat = statMethod;
|
|
55475
|
-
this._maxDepth = opts.depth ?? defaultOptions.depth;
|
|
55476
|
-
this._wantsDir = type ? DIR_TYPES.has(type) : false;
|
|
55477
|
-
this._wantsFile = type ? FILE_TYPES.has(type) : false;
|
|
55478
|
-
this._wantsEverything = type === EntryTypes.EVERYTHING_TYPE;
|
|
55479
|
-
this._root = resolve(root);
|
|
55480
|
-
this._isDirent = !opts.alwaysStat;
|
|
55481
|
-
this._statsProp = this._isDirent ? "dirent" : "stats";
|
|
55482
|
-
this._rdOptions = {
|
|
55483
|
-
encoding: "utf8",
|
|
55484
|
-
withFileTypes: this._isDirent
|
|
55485
|
-
};
|
|
55486
|
-
this.parents = [this._exploreDir(root, 1)];
|
|
55487
|
-
this.reading = false;
|
|
55488
|
-
this.parent = void 0;
|
|
55489
|
-
}
|
|
55490
|
-
async _read(batch) {
|
|
55491
|
-
if (this.reading) return;
|
|
55492
|
-
this.reading = true;
|
|
55493
|
-
try {
|
|
55494
|
-
while (!this.destroyed && batch > 0) {
|
|
55495
|
-
const par = this.parent;
|
|
55496
|
-
const fil = par && par.files;
|
|
55497
|
-
if (fil && fil.length > 0) {
|
|
55498
|
-
const { path, depth } = par;
|
|
55499
|
-
const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path));
|
|
55500
|
-
const awaited = await Promise.all(slice);
|
|
55501
|
-
for (const entry of awaited) {
|
|
55502
|
-
if (!entry) continue;
|
|
55503
|
-
if (this.destroyed) return;
|
|
55504
|
-
const entryType = await this._getEntryType(entry);
|
|
55505
|
-
if (entryType === "directory" && this._directoryFilter(entry)) {
|
|
55506
|
-
if (depth <= this._maxDepth) this.parents.push(this._exploreDir(entry.fullPath, depth + 1));
|
|
55507
|
-
if (this._wantsDir) {
|
|
55508
|
-
this.push(entry);
|
|
55509
|
-
batch--;
|
|
55510
|
-
}
|
|
55511
|
-
} else if ((entryType === "file" || this._includeAsFile(entry)) && this._fileFilter(entry)) {
|
|
55512
|
-
if (this._wantsFile) {
|
|
55513
|
-
this.push(entry);
|
|
55514
|
-
batch--;
|
|
55515
|
-
}
|
|
55516
|
-
}
|
|
55517
|
-
}
|
|
55518
|
-
} else {
|
|
55519
|
-
const parent = this.parents.pop();
|
|
55520
|
-
if (!parent) {
|
|
55521
|
-
this.push(null);
|
|
55522
|
-
break;
|
|
55523
|
-
}
|
|
55524
|
-
this.parent = await parent;
|
|
55525
|
-
if (this.destroyed) return;
|
|
55526
|
-
}
|
|
55527
|
-
}
|
|
55528
|
-
} catch (error) {
|
|
55529
|
-
this.destroy(error);
|
|
55530
|
-
} finally {
|
|
55531
|
-
this.reading = false;
|
|
55532
|
-
}
|
|
55533
|
-
}
|
|
55534
|
-
async _exploreDir(path, depth) {
|
|
55535
|
-
let files;
|
|
55536
|
-
try {
|
|
55537
|
-
files = await readdir(path, this._rdOptions);
|
|
55538
|
-
} catch (error) {
|
|
55539
|
-
this._onError(error);
|
|
55540
|
-
}
|
|
55541
|
-
return {
|
|
55542
|
-
files,
|
|
55543
|
-
depth,
|
|
55544
|
-
path
|
|
55545
|
-
};
|
|
55546
|
-
}
|
|
55547
|
-
async _formatEntry(dirent, path) {
|
|
55548
|
-
let entry;
|
|
55549
|
-
const basename = this._isDirent ? dirent.name : dirent;
|
|
55550
|
-
try {
|
|
55551
|
-
const fullPath = resolve(join(path, basename));
|
|
55552
|
-
entry = {
|
|
55553
|
-
path: relative(this._root, fullPath),
|
|
55554
|
-
fullPath,
|
|
55555
|
-
basename
|
|
55556
|
-
};
|
|
55557
|
-
entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
|
|
55558
|
-
} catch (err) {
|
|
55559
|
-
this._onError(err);
|
|
55560
|
-
return;
|
|
55561
|
-
}
|
|
55562
|
-
return entry;
|
|
55563
|
-
}
|
|
55564
|
-
_onError(err) {
|
|
55565
|
-
if (isNormalFlowError(err) && !this.destroyed) this.emit("warn", err);
|
|
55566
|
-
else this.destroy(err);
|
|
55567
|
-
}
|
|
55568
|
-
async _getEntryType(entry) {
|
|
55569
|
-
if (!entry && this._statsProp in entry) return "";
|
|
55570
|
-
const stats = entry[this._statsProp];
|
|
55571
|
-
if (stats.isFile()) return "file";
|
|
55572
|
-
if (stats.isDirectory()) return "directory";
|
|
55573
|
-
if (stats && stats.isSymbolicLink()) {
|
|
55574
|
-
const full = entry.fullPath;
|
|
55575
|
-
try {
|
|
55576
|
-
const entryRealPath = await realpath(full);
|
|
55577
|
-
const entryRealPathStats = await lstat(entryRealPath);
|
|
55578
|
-
if (entryRealPathStats.isFile()) return "file";
|
|
55579
|
-
if (entryRealPathStats.isDirectory()) {
|
|
55580
|
-
const len = entryRealPath.length;
|
|
55581
|
-
if (full.startsWith(entryRealPath) && full.substr(len, 1) === sep) {
|
|
55582
|
-
const recursiveError = /* @__PURE__ */ new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
|
|
55583
|
-
recursiveError.code = RECURSIVE_ERROR_CODE;
|
|
55584
|
-
return this._onError(recursiveError);
|
|
55585
|
-
}
|
|
55586
|
-
return "directory";
|
|
55587
|
-
}
|
|
55588
|
-
} catch (error) {
|
|
55589
|
-
this._onError(error);
|
|
55590
|
-
return "";
|
|
55591
|
-
}
|
|
55592
|
-
}
|
|
55593
|
-
}
|
|
55594
|
-
_includeAsFile(entry) {
|
|
55595
|
-
const stats = entry && entry[this._statsProp];
|
|
55596
|
-
return stats && this._wantsEverything && !stats.isDirectory();
|
|
55597
|
-
}
|
|
55598
|
-
};
|
|
55599
|
-
/**
|
|
55600
|
-
* Streaming version: Reads all files and directories in given root recursively.
|
|
55601
|
-
* Consumes ~constant small amount of RAM.
|
|
55602
|
-
* @param root Root directory
|
|
55603
|
-
* @param options Options to specify root (start directory), filters and recursion depth
|
|
55604
|
-
*/
|
|
55605
|
-
function readdirp(root, options = {}) {
|
|
55606
|
-
let type = options.entryType || options.type;
|
|
55607
|
-
if (type === "both") type = EntryTypes.FILE_DIR_TYPE;
|
|
55608
|
-
if (type) options.type = type;
|
|
55609
|
-
if (!root) throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");
|
|
55610
|
-
else if (typeof root !== "string") throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");
|
|
55611
|
-
else if (type && !ALL_TYPES.includes(type)) throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(", ")}`);
|
|
55612
|
-
options.root = root;
|
|
55613
|
-
return new ReaddirpStream(options);
|
|
55614
|
-
}
|
|
55615
|
-
|
|
55616
|
-
//#endregion
|
|
55617
|
-
//#region ../../node_modules/.pnpm/chokidar@4.0.3/node_modules/chokidar/esm/handler.js
|
|
55618
|
-
const STR_DATA = "data";
|
|
55619
|
-
const STR_END = "end";
|
|
55620
|
-
const STR_CLOSE = "close";
|
|
55621
|
-
const EMPTY_FN = () => {};
|
|
55622
|
-
const pl = process.platform;
|
|
55623
|
-
const isWindows = pl === "win32";
|
|
55624
|
-
const isMacos = pl === "darwin";
|
|
55625
|
-
const isLinux = pl === "linux";
|
|
55626
|
-
const isFreeBSD = pl === "freebsd";
|
|
55627
|
-
const isIBMi = type() === "OS400";
|
|
55628
|
-
const EVENTS = {
|
|
55629
|
-
ALL: "all",
|
|
55630
|
-
READY: "ready",
|
|
55631
|
-
ADD: "add",
|
|
55632
|
-
CHANGE: "change",
|
|
55633
|
-
ADD_DIR: "addDir",
|
|
55634
|
-
UNLINK: "unlink",
|
|
55635
|
-
UNLINK_DIR: "unlinkDir",
|
|
55636
|
-
RAW: "raw",
|
|
55637
|
-
ERROR: "error"
|
|
55638
|
-
};
|
|
55639
|
-
const EV = EVENTS;
|
|
55640
|
-
const THROTTLE_MODE_WATCH = "watch";
|
|
55641
|
-
const statMethods = {
|
|
55642
|
-
lstat: lstat$1,
|
|
55643
|
-
stat: stat$2
|
|
55644
|
-
};
|
|
55645
|
-
const KEY_LISTENERS = "listeners";
|
|
55646
|
-
const KEY_ERR = "errHandlers";
|
|
55647
|
-
const KEY_RAW = "rawEmitters";
|
|
55648
|
-
const HANDLER_KEYS = [
|
|
55649
|
-
KEY_LISTENERS,
|
|
55650
|
-
KEY_ERR,
|
|
55651
|
-
KEY_RAW
|
|
55652
|
-
];
|
|
55653
|
-
const binaryExtensions = new Set([
|
|
55654
|
-
"3dm",
|
|
55655
|
-
"3ds",
|
|
55656
|
-
"3g2",
|
|
55657
|
-
"3gp",
|
|
55658
|
-
"7z",
|
|
55659
|
-
"a",
|
|
55660
|
-
"aac",
|
|
55661
|
-
"adp",
|
|
55662
|
-
"afdesign",
|
|
55663
|
-
"afphoto",
|
|
55664
|
-
"afpub",
|
|
55665
|
-
"ai",
|
|
55666
|
-
"aif",
|
|
55667
|
-
"aiff",
|
|
55668
|
-
"alz",
|
|
55669
|
-
"ape",
|
|
55670
|
-
"apk",
|
|
55671
|
-
"appimage",
|
|
55672
|
-
"ar",
|
|
55673
|
-
"arj",
|
|
55674
|
-
"asf",
|
|
55675
|
-
"au",
|
|
55676
|
-
"avi",
|
|
55677
|
-
"bak",
|
|
55678
|
-
"baml",
|
|
55679
|
-
"bh",
|
|
55680
|
-
"bin",
|
|
55681
|
-
"bk",
|
|
55682
|
-
"bmp",
|
|
55683
|
-
"btif",
|
|
55684
|
-
"bz2",
|
|
55685
|
-
"bzip2",
|
|
55686
|
-
"cab",
|
|
55687
|
-
"caf",
|
|
55688
|
-
"cgm",
|
|
55689
|
-
"class",
|
|
55690
|
-
"cmx",
|
|
55691
|
-
"cpio",
|
|
55692
|
-
"cr2",
|
|
55693
|
-
"cur",
|
|
55694
|
-
"dat",
|
|
55695
|
-
"dcm",
|
|
55696
|
-
"deb",
|
|
55697
|
-
"dex",
|
|
55698
|
-
"djvu",
|
|
55699
|
-
"dll",
|
|
55700
|
-
"dmg",
|
|
55701
|
-
"dng",
|
|
55702
|
-
"doc",
|
|
55703
|
-
"docm",
|
|
55704
|
-
"docx",
|
|
55705
|
-
"dot",
|
|
55706
|
-
"dotm",
|
|
55707
|
-
"dra",
|
|
55708
|
-
"DS_Store",
|
|
55709
|
-
"dsk",
|
|
55710
|
-
"dts",
|
|
55711
|
-
"dtshd",
|
|
55712
|
-
"dvb",
|
|
55713
|
-
"dwg",
|
|
55714
|
-
"dxf",
|
|
55715
|
-
"ecelp4800",
|
|
55716
|
-
"ecelp7470",
|
|
55717
|
-
"ecelp9600",
|
|
55718
|
-
"egg",
|
|
55719
|
-
"eol",
|
|
55720
|
-
"eot",
|
|
55721
|
-
"epub",
|
|
55722
|
-
"exe",
|
|
55723
|
-
"f4v",
|
|
55724
|
-
"fbs",
|
|
55725
|
-
"fh",
|
|
55726
|
-
"fla",
|
|
55727
|
-
"flac",
|
|
55728
|
-
"flatpak",
|
|
55729
|
-
"fli",
|
|
55730
|
-
"flv",
|
|
55731
|
-
"fpx",
|
|
55732
|
-
"fst",
|
|
55733
|
-
"fvt",
|
|
55734
|
-
"g3",
|
|
55735
|
-
"gh",
|
|
55736
|
-
"gif",
|
|
55737
|
-
"graffle",
|
|
55738
|
-
"gz",
|
|
55739
|
-
"gzip",
|
|
55740
|
-
"h261",
|
|
55741
|
-
"h263",
|
|
55742
|
-
"h264",
|
|
55743
|
-
"icns",
|
|
55744
|
-
"ico",
|
|
55745
|
-
"ief",
|
|
55746
|
-
"img",
|
|
55747
|
-
"ipa",
|
|
55748
|
-
"iso",
|
|
55749
|
-
"jar",
|
|
55750
|
-
"jpeg",
|
|
55751
|
-
"jpg",
|
|
55752
|
-
"jpgv",
|
|
55753
|
-
"jpm",
|
|
55754
|
-
"jxr",
|
|
55755
|
-
"key",
|
|
55756
|
-
"ktx",
|
|
55757
|
-
"lha",
|
|
55758
|
-
"lib",
|
|
55759
|
-
"lvp",
|
|
55760
|
-
"lz",
|
|
55761
|
-
"lzh",
|
|
55762
|
-
"lzma",
|
|
55763
|
-
"lzo",
|
|
55764
|
-
"m3u",
|
|
55765
|
-
"m4a",
|
|
55766
|
-
"m4v",
|
|
55767
|
-
"mar",
|
|
55768
|
-
"mdi",
|
|
55769
|
-
"mht",
|
|
55770
|
-
"mid",
|
|
55771
|
-
"midi",
|
|
55772
|
-
"mj2",
|
|
55773
|
-
"mka",
|
|
55774
|
-
"mkv",
|
|
55775
|
-
"mmr",
|
|
55776
|
-
"mng",
|
|
55777
|
-
"mobi",
|
|
55778
|
-
"mov",
|
|
55779
|
-
"movie",
|
|
55780
|
-
"mp3",
|
|
55781
|
-
"mp4",
|
|
55782
|
-
"mp4a",
|
|
55783
|
-
"mpeg",
|
|
55784
|
-
"mpg",
|
|
55785
|
-
"mpga",
|
|
55786
|
-
"mxu",
|
|
55787
|
-
"nef",
|
|
55788
|
-
"npx",
|
|
55789
|
-
"numbers",
|
|
55790
|
-
"nupkg",
|
|
55791
|
-
"o",
|
|
55792
|
-
"odp",
|
|
55793
|
-
"ods",
|
|
55794
|
-
"odt",
|
|
55795
|
-
"oga",
|
|
55796
|
-
"ogg",
|
|
55797
|
-
"ogv",
|
|
55798
|
-
"otf",
|
|
55799
|
-
"ott",
|
|
55800
|
-
"pages",
|
|
55801
|
-
"pbm",
|
|
55802
|
-
"pcx",
|
|
55803
|
-
"pdb",
|
|
55804
|
-
"pdf",
|
|
55805
|
-
"pea",
|
|
55806
|
-
"pgm",
|
|
55807
|
-
"pic",
|
|
55808
|
-
"png",
|
|
55809
|
-
"pnm",
|
|
55810
|
-
"pot",
|
|
55811
|
-
"potm",
|
|
55812
|
-
"potx",
|
|
55813
|
-
"ppa",
|
|
55814
|
-
"ppam",
|
|
55815
|
-
"ppm",
|
|
55816
|
-
"pps",
|
|
55817
|
-
"ppsm",
|
|
55818
|
-
"ppsx",
|
|
55819
|
-
"ppt",
|
|
55820
|
-
"pptm",
|
|
55821
|
-
"pptx",
|
|
55822
|
-
"psd",
|
|
55823
|
-
"pya",
|
|
55824
|
-
"pyc",
|
|
55825
|
-
"pyo",
|
|
55826
|
-
"pyv",
|
|
55827
|
-
"qt",
|
|
55828
|
-
"rar",
|
|
55829
|
-
"ras",
|
|
55830
|
-
"raw",
|
|
55831
|
-
"resources",
|
|
55832
|
-
"rgb",
|
|
55833
|
-
"rip",
|
|
55834
|
-
"rlc",
|
|
55835
|
-
"rmf",
|
|
55836
|
-
"rmvb",
|
|
55837
|
-
"rpm",
|
|
55838
|
-
"rtf",
|
|
55839
|
-
"rz",
|
|
55840
|
-
"s3m",
|
|
55841
|
-
"s7z",
|
|
55842
|
-
"scpt",
|
|
55843
|
-
"sgi",
|
|
55844
|
-
"shar",
|
|
55845
|
-
"snap",
|
|
55846
|
-
"sil",
|
|
55847
|
-
"sketch",
|
|
55848
|
-
"slk",
|
|
55849
|
-
"smv",
|
|
55850
|
-
"snk",
|
|
55851
|
-
"so",
|
|
55852
|
-
"stl",
|
|
55853
|
-
"suo",
|
|
55854
|
-
"sub",
|
|
55855
|
-
"swf",
|
|
55856
|
-
"tar",
|
|
55857
|
-
"tbz",
|
|
55858
|
-
"tbz2",
|
|
55859
|
-
"tga",
|
|
55860
|
-
"tgz",
|
|
55861
|
-
"thmx",
|
|
55862
|
-
"tif",
|
|
55863
|
-
"tiff",
|
|
55864
|
-
"tlz",
|
|
55865
|
-
"ttc",
|
|
55866
|
-
"ttf",
|
|
55867
|
-
"txz",
|
|
55868
|
-
"udf",
|
|
55869
|
-
"uvh",
|
|
55870
|
-
"uvi",
|
|
55871
|
-
"uvm",
|
|
55872
|
-
"uvp",
|
|
55873
|
-
"uvs",
|
|
55874
|
-
"uvu",
|
|
55875
|
-
"viv",
|
|
55876
|
-
"vob",
|
|
55877
|
-
"war",
|
|
55878
|
-
"wav",
|
|
55879
|
-
"wax",
|
|
55880
|
-
"wbmp",
|
|
55881
|
-
"wdp",
|
|
55882
|
-
"weba",
|
|
55883
|
-
"webm",
|
|
55884
|
-
"webp",
|
|
55885
|
-
"whl",
|
|
55886
|
-
"wim",
|
|
55887
|
-
"wm",
|
|
55888
|
-
"wma",
|
|
55889
|
-
"wmv",
|
|
55890
|
-
"wmx",
|
|
55891
|
-
"woff",
|
|
55892
|
-
"woff2",
|
|
55893
|
-
"wrm",
|
|
55894
|
-
"wvx",
|
|
55895
|
-
"xbm",
|
|
55896
|
-
"xif",
|
|
55897
|
-
"xla",
|
|
55898
|
-
"xlam",
|
|
55899
|
-
"xls",
|
|
55900
|
-
"xlsb",
|
|
55901
|
-
"xlsm",
|
|
55902
|
-
"xlsx",
|
|
55903
|
-
"xlt",
|
|
55904
|
-
"xltm",
|
|
55905
|
-
"xltx",
|
|
55906
|
-
"xm",
|
|
55907
|
-
"xmind",
|
|
55908
|
-
"xpi",
|
|
55909
|
-
"xpm",
|
|
55910
|
-
"xwd",
|
|
55911
|
-
"xz",
|
|
55912
|
-
"z",
|
|
55913
|
-
"zip",
|
|
55914
|
-
"zipx"
|
|
55915
|
-
]);
|
|
55916
|
-
const isBinaryPath = (filePath) => binaryExtensions.has(sysPath.extname(filePath).slice(1).toLowerCase());
|
|
55917
|
-
const foreach = (val, fn) => {
|
|
55918
|
-
if (val instanceof Set) val.forEach(fn);
|
|
55919
|
-
else fn(val);
|
|
55920
|
-
};
|
|
55921
|
-
const addAndConvert = (main, prop, item) => {
|
|
55922
|
-
let container = main[prop];
|
|
55923
|
-
if (!(container instanceof Set)) main[prop] = container = new Set([container]);
|
|
55924
|
-
container.add(item);
|
|
55925
|
-
};
|
|
55926
|
-
const clearItem = (cont) => (key) => {
|
|
55927
|
-
const set = cont[key];
|
|
55928
|
-
if (set instanceof Set) set.clear();
|
|
55929
|
-
else delete cont[key];
|
|
55930
|
-
};
|
|
55931
|
-
const delFromSet = (main, prop, item) => {
|
|
55932
|
-
const container = main[prop];
|
|
55933
|
-
if (container instanceof Set) container.delete(item);
|
|
55934
|
-
else if (container === item) delete main[prop];
|
|
55935
|
-
};
|
|
55936
|
-
const isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;
|
|
55937
|
-
const FsWatchInstances = /* @__PURE__ */ new Map();
|
|
55938
|
-
/**
|
|
55939
|
-
* Instantiates the fs_watch interface
|
|
55940
|
-
* @param path to be watched
|
|
55941
|
-
* @param options to be passed to fs_watch
|
|
55942
|
-
* @param listener main event handler
|
|
55943
|
-
* @param errHandler emits info about errors
|
|
55944
|
-
* @param emitRaw emits raw event data
|
|
55945
|
-
* @returns {NativeFsWatcher}
|
|
55946
|
-
*/
|
|
55947
|
-
function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
|
|
55948
|
-
const handleEvent = (rawEvent, evPath) => {
|
|
55949
|
-
listener(path);
|
|
55950
|
-
emitRaw(rawEvent, evPath, { watchedPath: path });
|
|
55951
|
-
if (evPath && path !== evPath) fsWatchBroadcast(sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath));
|
|
55952
|
-
};
|
|
55953
|
-
try {
|
|
55954
|
-
return watch$1(path, { persistent: options.persistent }, handleEvent);
|
|
55955
|
-
} catch (error) {
|
|
55956
|
-
errHandler(error);
|
|
55957
|
-
return;
|
|
55958
|
-
}
|
|
55959
|
-
}
|
|
55960
|
-
/**
|
|
55961
|
-
* Helper for passing fs_watch event data to a collection of listeners
|
|
55962
|
-
* @param fullPath absolute path bound to fs_watch instance
|
|
55963
|
-
*/
|
|
55964
|
-
const fsWatchBroadcast = (fullPath, listenerType, val1, val2, val3) => {
|
|
55965
|
-
const cont = FsWatchInstances.get(fullPath);
|
|
55966
|
-
if (!cont) return;
|
|
55967
|
-
foreach(cont[listenerType], (listener) => {
|
|
55968
|
-
listener(val1, val2, val3);
|
|
55969
|
-
});
|
|
55970
|
-
};
|
|
55971
|
-
/**
|
|
55972
|
-
* Instantiates the fs_watch interface or binds listeners
|
|
55973
|
-
* to an existing one covering the same file system entry
|
|
55974
|
-
* @param path
|
|
55975
|
-
* @param fullPath absolute path
|
|
55976
|
-
* @param options to be passed to fs_watch
|
|
55977
|
-
* @param handlers container for event listener functions
|
|
55978
|
-
*/
|
|
55979
|
-
const setFsWatchListener = (path, fullPath, options, handlers) => {
|
|
55980
|
-
const { listener, errHandler, rawEmitter } = handlers;
|
|
55981
|
-
let cont = FsWatchInstances.get(fullPath);
|
|
55982
|
-
let watcher;
|
|
55983
|
-
if (!options.persistent) {
|
|
55984
|
-
watcher = createFsWatchInstance(path, options, listener, errHandler, rawEmitter);
|
|
55985
|
-
if (!watcher) return;
|
|
55986
|
-
return watcher.close.bind(watcher);
|
|
55987
|
-
}
|
|
55988
|
-
if (cont) {
|
|
55989
|
-
addAndConvert(cont, KEY_LISTENERS, listener);
|
|
55990
|
-
addAndConvert(cont, KEY_ERR, errHandler);
|
|
55991
|
-
addAndConvert(cont, KEY_RAW, rawEmitter);
|
|
55992
|
-
} else {
|
|
55993
|
-
watcher = createFsWatchInstance(path, options, fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), errHandler, fsWatchBroadcast.bind(null, fullPath, KEY_RAW));
|
|
55994
|
-
if (!watcher) return;
|
|
55995
|
-
watcher.on(EV.ERROR, async (error) => {
|
|
55996
|
-
const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR);
|
|
55997
|
-
if (cont) cont.watcherUnusable = true;
|
|
55998
|
-
if (isWindows && error.code === "EPERM") try {
|
|
55999
|
-
await (await open$1(path, "r")).close();
|
|
56000
|
-
broadcastErr(error);
|
|
56001
|
-
} catch (err) {}
|
|
56002
|
-
else broadcastErr(error);
|
|
56003
|
-
});
|
|
56004
|
-
cont = {
|
|
56005
|
-
listeners: listener,
|
|
56006
|
-
errHandlers: errHandler,
|
|
56007
|
-
rawEmitters: rawEmitter,
|
|
56008
|
-
watcher
|
|
56009
|
-
};
|
|
56010
|
-
FsWatchInstances.set(fullPath, cont);
|
|
56011
|
-
}
|
|
56012
|
-
return () => {
|
|
56013
|
-
delFromSet(cont, KEY_LISTENERS, listener);
|
|
56014
|
-
delFromSet(cont, KEY_ERR, errHandler);
|
|
56015
|
-
delFromSet(cont, KEY_RAW, rawEmitter);
|
|
56016
|
-
if (isEmptySet(cont.listeners)) {
|
|
56017
|
-
cont.watcher.close();
|
|
56018
|
-
FsWatchInstances.delete(fullPath);
|
|
56019
|
-
HANDLER_KEYS.forEach(clearItem(cont));
|
|
56020
|
-
cont.watcher = void 0;
|
|
56021
|
-
Object.freeze(cont);
|
|
56022
|
-
}
|
|
56023
|
-
};
|
|
56024
|
-
};
|
|
56025
|
-
const FsWatchFileInstances = /* @__PURE__ */ new Map();
|
|
56026
|
-
/**
|
|
56027
|
-
* Instantiates the fs_watchFile interface or binds listeners
|
|
56028
|
-
* to an existing one covering the same file system entry
|
|
56029
|
-
* @param path to be watched
|
|
56030
|
-
* @param fullPath absolute path
|
|
56031
|
-
* @param options options to be passed to fs_watchFile
|
|
56032
|
-
* @param handlers container for event listener functions
|
|
56033
|
-
* @returns closer
|
|
56034
|
-
*/
|
|
56035
|
-
const setFsWatchFileListener = (path, fullPath, options, handlers) => {
|
|
56036
|
-
const { listener, rawEmitter } = handlers;
|
|
56037
|
-
let cont = FsWatchFileInstances.get(fullPath);
|
|
56038
|
-
const copts = cont && cont.options;
|
|
56039
|
-
if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {
|
|
56040
|
-
unwatchFile(fullPath);
|
|
56041
|
-
cont = void 0;
|
|
56042
|
-
}
|
|
56043
|
-
if (cont) {
|
|
56044
|
-
addAndConvert(cont, KEY_LISTENERS, listener);
|
|
56045
|
-
addAndConvert(cont, KEY_RAW, rawEmitter);
|
|
56046
|
-
} else {
|
|
56047
|
-
cont = {
|
|
56048
|
-
listeners: listener,
|
|
56049
|
-
rawEmitters: rawEmitter,
|
|
56050
|
-
options,
|
|
56051
|
-
watcher: watchFile(fullPath, options, (curr, prev) => {
|
|
56052
|
-
foreach(cont.rawEmitters, (rawEmitter) => {
|
|
56053
|
-
rawEmitter(EV.CHANGE, fullPath, {
|
|
56054
|
-
curr,
|
|
56055
|
-
prev
|
|
56056
|
-
});
|
|
56057
|
-
});
|
|
56058
|
-
const currmtime = curr.mtimeMs;
|
|
56059
|
-
if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) foreach(cont.listeners, (listener) => listener(path, curr));
|
|
56060
|
-
})
|
|
56061
|
-
};
|
|
56062
|
-
FsWatchFileInstances.set(fullPath, cont);
|
|
56063
|
-
}
|
|
56064
|
-
return () => {
|
|
56065
|
-
delFromSet(cont, KEY_LISTENERS, listener);
|
|
56066
|
-
delFromSet(cont, KEY_RAW, rawEmitter);
|
|
56067
|
-
if (isEmptySet(cont.listeners)) {
|
|
56068
|
-
FsWatchFileInstances.delete(fullPath);
|
|
56069
|
-
unwatchFile(fullPath);
|
|
56070
|
-
cont.options = cont.watcher = void 0;
|
|
56071
|
-
Object.freeze(cont);
|
|
56072
|
-
}
|
|
56073
|
-
};
|
|
56074
|
-
};
|
|
56075
|
-
/**
|
|
56076
|
-
* @mixin
|
|
56077
|
-
*/
|
|
56078
|
-
var NodeFsHandler = class {
|
|
56079
|
-
constructor(fsW) {
|
|
56080
|
-
this.fsw = fsW;
|
|
56081
|
-
this._boundHandleError = (error) => fsW._handleError(error);
|
|
56082
|
-
}
|
|
56083
|
-
/**
|
|
56084
|
-
* Watch file for changes with fs_watchFile or fs_watch.
|
|
56085
|
-
* @param path to file or dir
|
|
56086
|
-
* @param listener on fs change
|
|
56087
|
-
* @returns closer for the watcher instance
|
|
56088
|
-
*/
|
|
56089
|
-
_watchWithNodeFs(path, listener) {
|
|
56090
|
-
const opts = this.fsw.options;
|
|
56091
|
-
const directory = sysPath.dirname(path);
|
|
56092
|
-
const basename = sysPath.basename(path);
|
|
56093
|
-
this.fsw._getWatchedDir(directory).add(basename);
|
|
56094
|
-
const absolutePath = sysPath.resolve(path);
|
|
56095
|
-
const options = { persistent: opts.persistent };
|
|
56096
|
-
if (!listener) listener = EMPTY_FN;
|
|
56097
|
-
let closer;
|
|
56098
|
-
if (opts.usePolling) {
|
|
56099
|
-
options.interval = opts.interval !== opts.binaryInterval && isBinaryPath(basename) ? opts.binaryInterval : opts.interval;
|
|
56100
|
-
closer = setFsWatchFileListener(path, absolutePath, options, {
|
|
56101
|
-
listener,
|
|
56102
|
-
rawEmitter: this.fsw._emitRaw
|
|
56103
|
-
});
|
|
56104
|
-
} else closer = setFsWatchListener(path, absolutePath, options, {
|
|
56105
|
-
listener,
|
|
56106
|
-
errHandler: this._boundHandleError,
|
|
56107
|
-
rawEmitter: this.fsw._emitRaw
|
|
56108
|
-
});
|
|
56109
|
-
return closer;
|
|
56110
|
-
}
|
|
56111
|
-
/**
|
|
56112
|
-
* Watch a file and emit add event if warranted.
|
|
56113
|
-
* @returns closer for the watcher instance
|
|
56114
|
-
*/
|
|
56115
|
-
_handleFile(file, stats, initialAdd) {
|
|
56116
|
-
if (this.fsw.closed) return;
|
|
56117
|
-
const dirname = sysPath.dirname(file);
|
|
56118
|
-
const basename = sysPath.basename(file);
|
|
56119
|
-
const parent = this.fsw._getWatchedDir(dirname);
|
|
56120
|
-
let prevStats = stats;
|
|
56121
|
-
if (parent.has(basename)) return;
|
|
56122
|
-
const listener = async (path, newStats) => {
|
|
56123
|
-
if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return;
|
|
56124
|
-
if (!newStats || newStats.mtimeMs === 0) try {
|
|
56125
|
-
const newStats = await stat$2(file);
|
|
56126
|
-
if (this.fsw.closed) return;
|
|
56127
|
-
const at = newStats.atimeMs;
|
|
56128
|
-
const mt = newStats.mtimeMs;
|
|
56129
|
-
if (!at || at <= mt || mt !== prevStats.mtimeMs) this.fsw._emit(EV.CHANGE, file, newStats);
|
|
56130
|
-
if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats.ino) {
|
|
56131
|
-
this.fsw._closeFile(path);
|
|
56132
|
-
prevStats = newStats;
|
|
56133
|
-
const closer = this._watchWithNodeFs(file, listener);
|
|
56134
|
-
if (closer) this.fsw._addPathCloser(path, closer);
|
|
56135
|
-
} else prevStats = newStats;
|
|
56136
|
-
} catch (error) {
|
|
56137
|
-
this.fsw._remove(dirname, basename);
|
|
56138
|
-
}
|
|
56139
|
-
else if (parent.has(basename)) {
|
|
56140
|
-
const at = newStats.atimeMs;
|
|
56141
|
-
const mt = newStats.mtimeMs;
|
|
56142
|
-
if (!at || at <= mt || mt !== prevStats.mtimeMs) this.fsw._emit(EV.CHANGE, file, newStats);
|
|
56143
|
-
prevStats = newStats;
|
|
56144
|
-
}
|
|
56145
|
-
};
|
|
56146
|
-
const closer = this._watchWithNodeFs(file, listener);
|
|
56147
|
-
if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) {
|
|
56148
|
-
if (!this.fsw._throttle(EV.ADD, file, 0)) return;
|
|
56149
|
-
this.fsw._emit(EV.ADD, file, stats);
|
|
56150
|
-
}
|
|
56151
|
-
return closer;
|
|
56152
|
-
}
|
|
56153
|
-
/**
|
|
56154
|
-
* Handle symlinks encountered while reading a dir.
|
|
56155
|
-
* @param entry returned by readdirp
|
|
56156
|
-
* @param directory path of dir being read
|
|
56157
|
-
* @param path of this item
|
|
56158
|
-
* @param item basename of this item
|
|
56159
|
-
* @returns true if no more processing is needed for this entry.
|
|
56160
|
-
*/
|
|
56161
|
-
async _handleSymlink(entry, directory, path, item) {
|
|
56162
|
-
if (this.fsw.closed) return;
|
|
56163
|
-
const full = entry.fullPath;
|
|
56164
|
-
const dir = this.fsw._getWatchedDir(directory);
|
|
56165
|
-
if (!this.fsw.options.followSymlinks) {
|
|
56166
|
-
this.fsw._incrReadyCount();
|
|
56167
|
-
let linkPath;
|
|
56168
|
-
try {
|
|
56169
|
-
linkPath = await realpath$1(path);
|
|
56170
|
-
} catch (e) {
|
|
56171
|
-
this.fsw._emitReady();
|
|
56172
|
-
return true;
|
|
56173
|
-
}
|
|
56174
|
-
if (this.fsw.closed) return;
|
|
56175
|
-
if (dir.has(item)) {
|
|
56176
|
-
if (this.fsw._symlinkPaths.get(full) !== linkPath) {
|
|
56177
|
-
this.fsw._symlinkPaths.set(full, linkPath);
|
|
56178
|
-
this.fsw._emit(EV.CHANGE, path, entry.stats);
|
|
56179
|
-
}
|
|
56180
|
-
} else {
|
|
56181
|
-
dir.add(item);
|
|
56182
|
-
this.fsw._symlinkPaths.set(full, linkPath);
|
|
56183
|
-
this.fsw._emit(EV.ADD, path, entry.stats);
|
|
56184
|
-
}
|
|
56185
|
-
this.fsw._emitReady();
|
|
56186
|
-
return true;
|
|
56187
|
-
}
|
|
56188
|
-
if (this.fsw._symlinkPaths.has(full)) return true;
|
|
56189
|
-
this.fsw._symlinkPaths.set(full, true);
|
|
56190
|
-
}
|
|
56191
|
-
_handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
|
|
56192
|
-
directory = sysPath.join(directory, "");
|
|
56193
|
-
throttler = this.fsw._throttle("readdir", directory, 1e3);
|
|
56194
|
-
if (!throttler) return;
|
|
56195
|
-
const previous = this.fsw._getWatchedDir(wh.path);
|
|
56196
|
-
const current = /* @__PURE__ */ new Set();
|
|
56197
|
-
let stream = this.fsw._readdirp(directory, {
|
|
56198
|
-
fileFilter: (entry) => wh.filterPath(entry),
|
|
56199
|
-
directoryFilter: (entry) => wh.filterDir(entry)
|
|
56200
|
-
});
|
|
56201
|
-
if (!stream) return;
|
|
56202
|
-
stream.on(STR_DATA, async (entry) => {
|
|
56203
|
-
if (this.fsw.closed) {
|
|
56204
|
-
stream = void 0;
|
|
56205
|
-
return;
|
|
56206
|
-
}
|
|
56207
|
-
const item = entry.path;
|
|
56208
|
-
let path = sysPath.join(directory, item);
|
|
56209
|
-
current.add(item);
|
|
56210
|
-
if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) return;
|
|
56211
|
-
if (this.fsw.closed) {
|
|
56212
|
-
stream = void 0;
|
|
56213
|
-
return;
|
|
56214
|
-
}
|
|
56215
|
-
if (item === target || !target && !previous.has(item)) {
|
|
56216
|
-
this.fsw._incrReadyCount();
|
|
56217
|
-
path = sysPath.join(dir, sysPath.relative(dir, path));
|
|
56218
|
-
this._addToNodeFs(path, initialAdd, wh, depth + 1);
|
|
56219
|
-
}
|
|
56220
|
-
}).on(EV.ERROR, this._boundHandleError);
|
|
56221
|
-
return new Promise((resolve, reject) => {
|
|
56222
|
-
if (!stream) return reject();
|
|
56223
|
-
stream.once("end", () => {
|
|
56224
|
-
if (this.fsw.closed) {
|
|
56225
|
-
stream = void 0;
|
|
56226
|
-
return;
|
|
56227
|
-
}
|
|
56228
|
-
const wasThrottled = throttler ? throttler.clear() : false;
|
|
56229
|
-
resolve(void 0);
|
|
56230
|
-
previous.getChildren().filter((item) => {
|
|
56231
|
-
return item !== directory && !current.has(item);
|
|
56232
|
-
}).forEach((item) => {
|
|
56233
|
-
this.fsw._remove(directory, item);
|
|
56234
|
-
});
|
|
56235
|
-
stream = void 0;
|
|
56236
|
-
if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler);
|
|
56237
|
-
});
|
|
56238
|
-
});
|
|
56239
|
-
}
|
|
56240
|
-
/**
|
|
56241
|
-
* Read directory to add / remove files from `@watched` list and re-read it on change.
|
|
56242
|
-
* @param dir fs path
|
|
56243
|
-
* @param stats
|
|
56244
|
-
* @param initialAdd
|
|
56245
|
-
* @param depth relative to user-supplied path
|
|
56246
|
-
* @param target child path targeted for watch
|
|
56247
|
-
* @param wh Common watch helpers for this path
|
|
56248
|
-
* @param realpath
|
|
56249
|
-
* @returns closer for the watcher instance.
|
|
56250
|
-
*/
|
|
56251
|
-
async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {
|
|
56252
|
-
const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
|
|
56253
|
-
const tracked = parentDir.has(sysPath.basename(dir));
|
|
56254
|
-
if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) this.fsw._emit(EV.ADD_DIR, dir, stats);
|
|
56255
|
-
parentDir.add(sysPath.basename(dir));
|
|
56256
|
-
this.fsw._getWatchedDir(dir);
|
|
56257
|
-
let throttler;
|
|
56258
|
-
let closer;
|
|
56259
|
-
const oDepth = this.fsw.options.depth;
|
|
56260
|
-
if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath)) {
|
|
56261
|
-
if (!target) {
|
|
56262
|
-
await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler);
|
|
56263
|
-
if (this.fsw.closed) return;
|
|
56264
|
-
}
|
|
56265
|
-
closer = this._watchWithNodeFs(dir, (dirPath, stats) => {
|
|
56266
|
-
if (stats && stats.mtimeMs === 0) return;
|
|
56267
|
-
this._handleRead(dirPath, false, wh, target, dir, depth, throttler);
|
|
56268
|
-
});
|
|
56269
|
-
}
|
|
56270
|
-
return closer;
|
|
56271
|
-
}
|
|
56272
|
-
/**
|
|
56273
|
-
* Handle added file, directory, or glob pattern.
|
|
56274
|
-
* Delegates call to _handleFile / _handleDir after checks.
|
|
56275
|
-
* @param path to file or ir
|
|
56276
|
-
* @param initialAdd was the file added at watch instantiation?
|
|
56277
|
-
* @param priorWh depth relative to user-supplied path
|
|
56278
|
-
* @param depth Child path actually targeted for watch
|
|
56279
|
-
* @param target Child path actually targeted for watch
|
|
56280
|
-
*/
|
|
56281
|
-
async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
|
|
56282
|
-
const ready = this.fsw._emitReady;
|
|
56283
|
-
if (this.fsw._isIgnored(path) || this.fsw.closed) {
|
|
56284
|
-
ready();
|
|
56285
|
-
return false;
|
|
56286
|
-
}
|
|
56287
|
-
const wh = this.fsw._getWatchHelpers(path);
|
|
56288
|
-
if (priorWh) {
|
|
56289
|
-
wh.filterPath = (entry) => priorWh.filterPath(entry);
|
|
56290
|
-
wh.filterDir = (entry) => priorWh.filterDir(entry);
|
|
56291
|
-
}
|
|
56292
|
-
try {
|
|
56293
|
-
const stats = await statMethods[wh.statMethod](wh.watchPath);
|
|
56294
|
-
if (this.fsw.closed) return;
|
|
56295
|
-
if (this.fsw._isIgnored(wh.watchPath, stats)) {
|
|
56296
|
-
ready();
|
|
56297
|
-
return false;
|
|
56298
|
-
}
|
|
56299
|
-
const follow = this.fsw.options.followSymlinks;
|
|
56300
|
-
let closer;
|
|
56301
|
-
if (stats.isDirectory()) {
|
|
56302
|
-
const absPath = sysPath.resolve(path);
|
|
56303
|
-
const targetPath = follow ? await realpath$1(path) : path;
|
|
56304
|
-
if (this.fsw.closed) return;
|
|
56305
|
-
closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
|
|
56306
|
-
if (this.fsw.closed) return;
|
|
56307
|
-
if (absPath !== targetPath && targetPath !== void 0) this.fsw._symlinkPaths.set(absPath, targetPath);
|
|
56308
|
-
} else if (stats.isSymbolicLink()) {
|
|
56309
|
-
const targetPath = follow ? await realpath$1(path) : path;
|
|
56310
|
-
if (this.fsw.closed) return;
|
|
56311
|
-
const parent = sysPath.dirname(wh.watchPath);
|
|
56312
|
-
this.fsw._getWatchedDir(parent).add(wh.watchPath);
|
|
56313
|
-
this.fsw._emit(EV.ADD, wh.watchPath, stats);
|
|
56314
|
-
closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);
|
|
56315
|
-
if (this.fsw.closed) return;
|
|
56316
|
-
if (targetPath !== void 0) this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath);
|
|
56317
|
-
} else closer = this._handleFile(wh.watchPath, stats, initialAdd);
|
|
56318
|
-
ready();
|
|
56319
|
-
if (closer) this.fsw._addPathCloser(path, closer);
|
|
56320
|
-
return false;
|
|
56321
|
-
} catch (error) {
|
|
56322
|
-
if (this.fsw._handleError(error)) {
|
|
56323
|
-
ready();
|
|
56324
|
-
return path;
|
|
56325
|
-
}
|
|
56326
|
-
}
|
|
56327
|
-
}
|
|
56328
|
-
};
|
|
56329
|
-
|
|
56330
|
-
//#endregion
|
|
56331
|
-
//#region ../../node_modules/.pnpm/chokidar@4.0.3/node_modules/chokidar/esm/index.js
|
|
56332
|
-
/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
|
|
56333
|
-
const SLASH = "/";
|
|
56334
|
-
const SLASH_SLASH = "//";
|
|
56335
|
-
const ONE_DOT = ".";
|
|
56336
|
-
const TWO_DOTS = "..";
|
|
56337
|
-
const STRING_TYPE = "string";
|
|
56338
|
-
const BACK_SLASH_RE = /\\/g;
|
|
56339
|
-
const DOUBLE_SLASH_RE = /\/\//;
|
|
56340
|
-
const DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
|
|
56341
|
-
const REPLACER_RE = /^\.[/\\]/;
|
|
56342
|
-
function arrify(item) {
|
|
56343
|
-
return Array.isArray(item) ? item : [item];
|
|
56344
|
-
}
|
|
56345
|
-
const isMatcherObject = (matcher) => typeof matcher === "object" && matcher !== null && !(matcher instanceof RegExp);
|
|
56346
|
-
function createPattern(matcher) {
|
|
56347
|
-
if (typeof matcher === "function") return matcher;
|
|
56348
|
-
if (typeof matcher === "string") return (string) => matcher === string;
|
|
56349
|
-
if (matcher instanceof RegExp) return (string) => matcher.test(string);
|
|
56350
|
-
if (typeof matcher === "object" && matcher !== null) return (string) => {
|
|
56351
|
-
if (matcher.path === string) return true;
|
|
56352
|
-
if (matcher.recursive) {
|
|
56353
|
-
const relative = sysPath.relative(matcher.path, string);
|
|
56354
|
-
if (!relative) return false;
|
|
56355
|
-
return !relative.startsWith("..") && !sysPath.isAbsolute(relative);
|
|
56356
|
-
}
|
|
56357
|
-
return false;
|
|
56358
|
-
};
|
|
56359
|
-
return () => false;
|
|
56360
|
-
}
|
|
56361
|
-
function normalizePath(path) {
|
|
56362
|
-
if (typeof path !== "string") throw new Error("string expected");
|
|
56363
|
-
path = sysPath.normalize(path);
|
|
56364
|
-
path = path.replace(/\\/g, "/");
|
|
56365
|
-
let prepend = false;
|
|
56366
|
-
if (path.startsWith("//")) prepend = true;
|
|
56367
|
-
const DOUBLE_SLASH_RE = /\/\//;
|
|
56368
|
-
while (path.match(DOUBLE_SLASH_RE)) path = path.replace(DOUBLE_SLASH_RE, "/");
|
|
56369
|
-
if (prepend) path = "/" + path;
|
|
56370
|
-
return path;
|
|
56371
|
-
}
|
|
56372
|
-
function matchPatterns(patterns, testString, stats) {
|
|
56373
|
-
const path = normalizePath(testString);
|
|
56374
|
-
for (let index = 0; index < patterns.length; index++) {
|
|
56375
|
-
const pattern = patterns[index];
|
|
56376
|
-
if (pattern(path, stats)) return true;
|
|
56377
|
-
}
|
|
56378
|
-
return false;
|
|
56379
|
-
}
|
|
56380
|
-
function anymatch(matchers, testString) {
|
|
56381
|
-
if (matchers == null) throw new TypeError("anymatch: specify first argument");
|
|
56382
|
-
const patterns = arrify(matchers).map((matcher) => createPattern(matcher));
|
|
56383
|
-
if (testString == null) return (testString, stats) => {
|
|
56384
|
-
return matchPatterns(patterns, testString, stats);
|
|
56385
|
-
};
|
|
56386
|
-
return matchPatterns(patterns, testString);
|
|
56387
|
-
}
|
|
56388
|
-
const unifyPaths = (paths_) => {
|
|
56389
|
-
const paths = arrify(paths_).flat();
|
|
56390
|
-
if (!paths.every((p) => typeof p === STRING_TYPE)) throw new TypeError(`Non-string provided as watch path: ${paths}`);
|
|
56391
|
-
return paths.map(normalizePathToUnix);
|
|
56392
|
-
};
|
|
56393
|
-
const toUnix = (string) => {
|
|
56394
|
-
let str = string.replace(BACK_SLASH_RE, SLASH);
|
|
56395
|
-
let prepend = false;
|
|
56396
|
-
if (str.startsWith(SLASH_SLASH)) prepend = true;
|
|
56397
|
-
while (str.match(DOUBLE_SLASH_RE)) str = str.replace(DOUBLE_SLASH_RE, SLASH);
|
|
56398
|
-
if (prepend) str = SLASH + str;
|
|
56399
|
-
return str;
|
|
56400
|
-
};
|
|
56401
|
-
const normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path)));
|
|
56402
|
-
const normalizeIgnored = (cwd = "") => (path) => {
|
|
56403
|
-
if (typeof path === "string") return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path));
|
|
56404
|
-
else return path;
|
|
56405
|
-
};
|
|
56406
|
-
const getAbsolutePath = (path, cwd) => {
|
|
56407
|
-
if (sysPath.isAbsolute(path)) return path;
|
|
56408
|
-
return sysPath.join(cwd, path);
|
|
56409
|
-
};
|
|
56410
|
-
const EMPTY_SET = Object.freeze(/* @__PURE__ */ new Set());
|
|
56411
|
-
/**
|
|
56412
|
-
* Directory entry.
|
|
56413
|
-
*/
|
|
56414
|
-
var DirEntry = class {
|
|
56415
|
-
constructor(dir, removeWatcher) {
|
|
56416
|
-
this.path = dir;
|
|
56417
|
-
this._removeWatcher = removeWatcher;
|
|
56418
|
-
this.items = /* @__PURE__ */ new Set();
|
|
56419
|
-
}
|
|
56420
|
-
add(item) {
|
|
56421
|
-
const { items } = this;
|
|
56422
|
-
if (!items) return;
|
|
56423
|
-
if (item !== ONE_DOT && item !== TWO_DOTS) items.add(item);
|
|
56424
|
-
}
|
|
56425
|
-
async remove(item) {
|
|
56426
|
-
const { items } = this;
|
|
56427
|
-
if (!items) return;
|
|
56428
|
-
items.delete(item);
|
|
56429
|
-
if (items.size > 0) return;
|
|
56430
|
-
const dir = this.path;
|
|
56431
|
-
try {
|
|
56432
|
-
await readdir$1(dir);
|
|
56433
|
-
} catch (err) {
|
|
56434
|
-
if (this._removeWatcher) this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir));
|
|
56435
|
-
}
|
|
56436
|
-
}
|
|
56437
|
-
has(item) {
|
|
56438
|
-
const { items } = this;
|
|
56439
|
-
if (!items) return;
|
|
56440
|
-
return items.has(item);
|
|
56441
|
-
}
|
|
56442
|
-
getChildren() {
|
|
56443
|
-
const { items } = this;
|
|
56444
|
-
if (!items) return [];
|
|
56445
|
-
return [...items.values()];
|
|
56446
|
-
}
|
|
56447
|
-
dispose() {
|
|
56448
|
-
this.items.clear();
|
|
56449
|
-
this.path = "";
|
|
56450
|
-
this._removeWatcher = EMPTY_FN;
|
|
56451
|
-
this.items = EMPTY_SET;
|
|
56452
|
-
Object.freeze(this);
|
|
56453
|
-
}
|
|
56454
|
-
};
|
|
56455
|
-
const STAT_METHOD_F = "stat";
|
|
56456
|
-
const STAT_METHOD_L = "lstat";
|
|
56457
|
-
var WatchHelper = class {
|
|
56458
|
-
constructor(path, follow, fsw) {
|
|
56459
|
-
this.fsw = fsw;
|
|
56460
|
-
const watchPath = path;
|
|
56461
|
-
this.path = path = path.replace(REPLACER_RE, "");
|
|
56462
|
-
this.watchPath = watchPath;
|
|
56463
|
-
this.fullWatchPath = sysPath.resolve(watchPath);
|
|
56464
|
-
this.dirParts = [];
|
|
56465
|
-
this.dirParts.forEach((parts) => {
|
|
56466
|
-
if (parts.length > 1) parts.pop();
|
|
56467
|
-
});
|
|
56468
|
-
this.followSymlinks = follow;
|
|
56469
|
-
this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
|
|
56470
|
-
}
|
|
56471
|
-
entryPath(entry) {
|
|
56472
|
-
return sysPath.join(this.watchPath, sysPath.relative(this.watchPath, entry.fullPath));
|
|
56473
|
-
}
|
|
56474
|
-
filterPath(entry) {
|
|
56475
|
-
const { stats } = entry;
|
|
56476
|
-
if (stats && stats.isSymbolicLink()) return this.filterDir(entry);
|
|
56477
|
-
const resolvedPath = this.entryPath(entry);
|
|
56478
|
-
return this.fsw._isntIgnored(resolvedPath, stats) && this.fsw._hasReadPermissions(stats);
|
|
56479
|
-
}
|
|
56480
|
-
filterDir(entry) {
|
|
56481
|
-
return this.fsw._isntIgnored(this.entryPath(entry), entry.stats);
|
|
56482
|
-
}
|
|
56483
|
-
};
|
|
56484
|
-
/**
|
|
56485
|
-
* Watches files & directories for changes. Emitted events:
|
|
56486
|
-
* `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error`
|
|
56487
|
-
*
|
|
56488
|
-
* new FSWatcher()
|
|
56489
|
-
* .add(directories)
|
|
56490
|
-
* .on('add', path => log('File', path, 'was added'))
|
|
56491
|
-
*/
|
|
56492
|
-
var FSWatcher = class extends EventEmitter {
|
|
56493
|
-
constructor(_opts = {}) {
|
|
56494
|
-
super();
|
|
56495
|
-
this.closed = false;
|
|
56496
|
-
this._closers = /* @__PURE__ */ new Map();
|
|
56497
|
-
this._ignoredPaths = /* @__PURE__ */ new Set();
|
|
56498
|
-
this._throttled = /* @__PURE__ */ new Map();
|
|
56499
|
-
this._streams = /* @__PURE__ */ new Set();
|
|
56500
|
-
this._symlinkPaths = /* @__PURE__ */ new Map();
|
|
56501
|
-
this._watched = /* @__PURE__ */ new Map();
|
|
56502
|
-
this._pendingWrites = /* @__PURE__ */ new Map();
|
|
56503
|
-
this._pendingUnlinks = /* @__PURE__ */ new Map();
|
|
56504
|
-
this._readyCount = 0;
|
|
56505
|
-
this._readyEmitted = false;
|
|
56506
|
-
const awf = _opts.awaitWriteFinish;
|
|
56507
|
-
const DEF_AWF = {
|
|
56508
|
-
stabilityThreshold: 2e3,
|
|
56509
|
-
pollInterval: 100
|
|
56510
|
-
};
|
|
56511
|
-
const opts = {
|
|
56512
|
-
persistent: true,
|
|
56513
|
-
ignoreInitial: false,
|
|
56514
|
-
ignorePermissionErrors: false,
|
|
56515
|
-
interval: 100,
|
|
56516
|
-
binaryInterval: 300,
|
|
56517
|
-
followSymlinks: true,
|
|
56518
|
-
usePolling: false,
|
|
56519
|
-
atomic: true,
|
|
56520
|
-
..._opts,
|
|
56521
|
-
ignored: _opts.ignored ? arrify(_opts.ignored) : arrify([]),
|
|
56522
|
-
awaitWriteFinish: awf === true ? DEF_AWF : typeof awf === "object" ? {
|
|
56523
|
-
...DEF_AWF,
|
|
56524
|
-
...awf
|
|
56525
|
-
} : false
|
|
56526
|
-
};
|
|
56527
|
-
if (isIBMi) opts.usePolling = true;
|
|
56528
|
-
if (opts.atomic === void 0) opts.atomic = !opts.usePolling;
|
|
56529
|
-
const envPoll = process.env.CHOKIDAR_USEPOLLING;
|
|
56530
|
-
if (envPoll !== void 0) {
|
|
56531
|
-
const envLower = envPoll.toLowerCase();
|
|
56532
|
-
if (envLower === "false" || envLower === "0") opts.usePolling = false;
|
|
56533
|
-
else if (envLower === "true" || envLower === "1") opts.usePolling = true;
|
|
56534
|
-
else opts.usePolling = !!envLower;
|
|
56535
|
-
}
|
|
56536
|
-
const envInterval = process.env.CHOKIDAR_INTERVAL;
|
|
56537
|
-
if (envInterval) opts.interval = Number.parseInt(envInterval, 10);
|
|
56538
|
-
let readyCalls = 0;
|
|
56539
|
-
this._emitReady = () => {
|
|
56540
|
-
readyCalls++;
|
|
56541
|
-
if (readyCalls >= this._readyCount) {
|
|
56542
|
-
this._emitReady = EMPTY_FN;
|
|
56543
|
-
this._readyEmitted = true;
|
|
56544
|
-
process.nextTick(() => this.emit(EVENTS.READY));
|
|
56545
|
-
}
|
|
56546
|
-
};
|
|
56547
|
-
this._emitRaw = (...args) => this.emit(EVENTS.RAW, ...args);
|
|
56548
|
-
this._boundRemove = this._remove.bind(this);
|
|
56549
|
-
this.options = opts;
|
|
56550
|
-
this._nodeFsHandler = new NodeFsHandler(this);
|
|
56551
|
-
Object.freeze(opts);
|
|
56552
|
-
}
|
|
56553
|
-
_addIgnoredPath(matcher) {
|
|
56554
|
-
if (isMatcherObject(matcher)) {
|
|
56555
|
-
for (const ignored of this._ignoredPaths) if (isMatcherObject(ignored) && ignored.path === matcher.path && ignored.recursive === matcher.recursive) return;
|
|
56556
|
-
}
|
|
56557
|
-
this._ignoredPaths.add(matcher);
|
|
56558
|
-
}
|
|
56559
|
-
_removeIgnoredPath(matcher) {
|
|
56560
|
-
this._ignoredPaths.delete(matcher);
|
|
56561
|
-
if (typeof matcher === "string") {
|
|
56562
|
-
for (const ignored of this._ignoredPaths) if (isMatcherObject(ignored) && ignored.path === matcher) this._ignoredPaths.delete(ignored);
|
|
56563
|
-
}
|
|
56564
|
-
}
|
|
56565
|
-
/**
|
|
56566
|
-
* Adds paths to be watched on an existing FSWatcher instance.
|
|
56567
|
-
* @param paths_ file or file list. Other arguments are unused
|
|
56568
|
-
*/
|
|
56569
|
-
add(paths_, _origAdd, _internal) {
|
|
56570
|
-
const { cwd } = this.options;
|
|
56571
|
-
this.closed = false;
|
|
56572
|
-
this._closePromise = void 0;
|
|
56573
|
-
let paths = unifyPaths(paths_);
|
|
56574
|
-
if (cwd) paths = paths.map((path) => {
|
|
56575
|
-
return getAbsolutePath(path, cwd);
|
|
56576
|
-
});
|
|
56577
|
-
paths.forEach((path) => {
|
|
56578
|
-
this._removeIgnoredPath(path);
|
|
56579
|
-
});
|
|
56580
|
-
this._userIgnored = void 0;
|
|
56581
|
-
if (!this._readyCount) this._readyCount = 0;
|
|
56582
|
-
this._readyCount += paths.length;
|
|
56583
|
-
Promise.all(paths.map(async (path) => {
|
|
56584
|
-
const res = await this._nodeFsHandler._addToNodeFs(path, !_internal, void 0, 0, _origAdd);
|
|
56585
|
-
if (res) this._emitReady();
|
|
56586
|
-
return res;
|
|
56587
|
-
})).then((results) => {
|
|
56588
|
-
if (this.closed) return;
|
|
56589
|
-
results.forEach((item) => {
|
|
56590
|
-
if (item) this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item));
|
|
56591
|
-
});
|
|
56592
|
-
});
|
|
56593
|
-
return this;
|
|
56594
|
-
}
|
|
56595
|
-
/**
|
|
56596
|
-
* Close watchers or start ignoring events from specified paths.
|
|
56597
|
-
*/
|
|
56598
|
-
unwatch(paths_) {
|
|
56599
|
-
if (this.closed) return this;
|
|
56600
|
-
const paths = unifyPaths(paths_);
|
|
56601
|
-
const { cwd } = this.options;
|
|
56602
|
-
paths.forEach((path) => {
|
|
56603
|
-
if (!sysPath.isAbsolute(path) && !this._closers.has(path)) {
|
|
56604
|
-
if (cwd) path = sysPath.join(cwd, path);
|
|
56605
|
-
path = sysPath.resolve(path);
|
|
56606
|
-
}
|
|
56607
|
-
this._closePath(path);
|
|
56608
|
-
this._addIgnoredPath(path);
|
|
56609
|
-
if (this._watched.has(path)) this._addIgnoredPath({
|
|
56610
|
-
path,
|
|
56611
|
-
recursive: true
|
|
56612
|
-
});
|
|
56613
|
-
this._userIgnored = void 0;
|
|
56614
|
-
});
|
|
56615
|
-
return this;
|
|
56616
|
-
}
|
|
56617
|
-
/**
|
|
56618
|
-
* Close watchers and remove all listeners from watched paths.
|
|
56619
|
-
*/
|
|
56620
|
-
close() {
|
|
56621
|
-
if (this._closePromise) return this._closePromise;
|
|
56622
|
-
this.closed = true;
|
|
56623
|
-
this.removeAllListeners();
|
|
56624
|
-
const closers = [];
|
|
56625
|
-
this._closers.forEach((closerList) => closerList.forEach((closer) => {
|
|
56626
|
-
const promise = closer();
|
|
56627
|
-
if (promise instanceof Promise) closers.push(promise);
|
|
56628
|
-
}));
|
|
56629
|
-
this._streams.forEach((stream) => stream.destroy());
|
|
56630
|
-
this._userIgnored = void 0;
|
|
56631
|
-
this._readyCount = 0;
|
|
56632
|
-
this._readyEmitted = false;
|
|
56633
|
-
this._watched.forEach((dirent) => dirent.dispose());
|
|
56634
|
-
this._closers.clear();
|
|
56635
|
-
this._watched.clear();
|
|
56636
|
-
this._streams.clear();
|
|
56637
|
-
this._symlinkPaths.clear();
|
|
56638
|
-
this._throttled.clear();
|
|
56639
|
-
this._closePromise = closers.length ? Promise.all(closers).then(() => void 0) : Promise.resolve();
|
|
56640
|
-
return this._closePromise;
|
|
56641
|
-
}
|
|
56642
|
-
/**
|
|
56643
|
-
* Expose list of watched paths
|
|
56644
|
-
* @returns for chaining
|
|
56645
|
-
*/
|
|
56646
|
-
getWatched() {
|
|
56647
|
-
const watchList = {};
|
|
56648
|
-
this._watched.forEach((entry, dir) => {
|
|
56649
|
-
const index = (this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir) || ONE_DOT;
|
|
56650
|
-
watchList[index] = entry.getChildren().sort();
|
|
56651
|
-
});
|
|
56652
|
-
return watchList;
|
|
56653
|
-
}
|
|
56654
|
-
emitWithAll(event, args) {
|
|
56655
|
-
this.emit(event, ...args);
|
|
56656
|
-
if (event !== EVENTS.ERROR) this.emit(EVENTS.ALL, event, ...args);
|
|
56657
|
-
}
|
|
56658
|
-
/**
|
|
56659
|
-
* Normalize and emit events.
|
|
56660
|
-
* Calling _emit DOES NOT MEAN emit() would be called!
|
|
56661
|
-
* @param event Type of event
|
|
56662
|
-
* @param path File or directory path
|
|
56663
|
-
* @param stats arguments to be passed with event
|
|
56664
|
-
* @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
|
|
56665
|
-
*/
|
|
56666
|
-
async _emit(event, path, stats) {
|
|
56667
|
-
if (this.closed) return;
|
|
56668
|
-
const opts = this.options;
|
|
56669
|
-
if (isWindows) path = sysPath.normalize(path);
|
|
56670
|
-
if (opts.cwd) path = sysPath.relative(opts.cwd, path);
|
|
56671
|
-
const args = [path];
|
|
56672
|
-
if (stats != null) args.push(stats);
|
|
56673
|
-
const awf = opts.awaitWriteFinish;
|
|
56674
|
-
let pw;
|
|
56675
|
-
if (awf && (pw = this._pendingWrites.get(path))) {
|
|
56676
|
-
pw.lastChange = /* @__PURE__ */ new Date();
|
|
56677
|
-
return this;
|
|
56678
|
-
}
|
|
56679
|
-
if (opts.atomic) {
|
|
56680
|
-
if (event === EVENTS.UNLINK) {
|
|
56681
|
-
this._pendingUnlinks.set(path, [event, ...args]);
|
|
56682
|
-
setTimeout(() => {
|
|
56683
|
-
this._pendingUnlinks.forEach((entry, path) => {
|
|
56684
|
-
this.emit(...entry);
|
|
56685
|
-
this.emit(EVENTS.ALL, ...entry);
|
|
56686
|
-
this._pendingUnlinks.delete(path);
|
|
56687
|
-
});
|
|
56688
|
-
}, typeof opts.atomic === "number" ? opts.atomic : 100);
|
|
56689
|
-
return this;
|
|
56690
|
-
}
|
|
56691
|
-
if (event === EVENTS.ADD && this._pendingUnlinks.has(path)) {
|
|
56692
|
-
event = EVENTS.CHANGE;
|
|
56693
|
-
this._pendingUnlinks.delete(path);
|
|
56694
|
-
}
|
|
56695
|
-
}
|
|
56696
|
-
if (awf && (event === EVENTS.ADD || event === EVENTS.CHANGE) && this._readyEmitted) {
|
|
56697
|
-
const awfEmit = (err, stats) => {
|
|
56698
|
-
if (err) {
|
|
56699
|
-
event = EVENTS.ERROR;
|
|
56700
|
-
args[0] = err;
|
|
56701
|
-
this.emitWithAll(event, args);
|
|
56702
|
-
} else if (stats) {
|
|
56703
|
-
if (args.length > 1) args[1] = stats;
|
|
56704
|
-
else args.push(stats);
|
|
56705
|
-
this.emitWithAll(event, args);
|
|
56706
|
-
}
|
|
56707
|
-
};
|
|
56708
|
-
this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit);
|
|
56709
|
-
return this;
|
|
56710
|
-
}
|
|
56711
|
-
if (event === EVENTS.CHANGE) {
|
|
56712
|
-
if (!this._throttle(EVENTS.CHANGE, path, 50)) return this;
|
|
56713
|
-
}
|
|
56714
|
-
if (opts.alwaysStat && stats === void 0 && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
|
|
56715
|
-
const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path;
|
|
56716
|
-
let stats;
|
|
56717
|
-
try {
|
|
56718
|
-
stats = await stat$2(fullPath);
|
|
56719
|
-
} catch (err) {}
|
|
56720
|
-
if (!stats || this.closed) return;
|
|
56721
|
-
args.push(stats);
|
|
56722
|
-
}
|
|
56723
|
-
this.emitWithAll(event, args);
|
|
56724
|
-
return this;
|
|
56725
|
-
}
|
|
56726
|
-
/**
|
|
56727
|
-
* Common handler for errors
|
|
56728
|
-
* @returns The error if defined, otherwise the value of the FSWatcher instance's `closed` flag
|
|
56729
|
-
*/
|
|
56730
|
-
_handleError(error) {
|
|
56731
|
-
const code = error && error.code;
|
|
56732
|
-
if (error && code !== "ENOENT" && code !== "ENOTDIR" && (!this.options.ignorePermissionErrors || code !== "EPERM" && code !== "EACCES")) this.emit(EVENTS.ERROR, error);
|
|
56733
|
-
return error || this.closed;
|
|
56734
|
-
}
|
|
56735
|
-
/**
|
|
56736
|
-
* Helper utility for throttling
|
|
56737
|
-
* @param actionType type being throttled
|
|
56738
|
-
* @param path being acted upon
|
|
56739
|
-
* @param timeout duration of time to suppress duplicate actions
|
|
56740
|
-
* @returns tracking object or false if action should be suppressed
|
|
56741
|
-
*/
|
|
56742
|
-
_throttle(actionType, path, timeout) {
|
|
56743
|
-
if (!this._throttled.has(actionType)) this._throttled.set(actionType, /* @__PURE__ */ new Map());
|
|
56744
|
-
const action = this._throttled.get(actionType);
|
|
56745
|
-
if (!action) throw new Error("invalid throttle");
|
|
56746
|
-
const actionPath = action.get(path);
|
|
56747
|
-
if (actionPath) {
|
|
56748
|
-
actionPath.count++;
|
|
56749
|
-
return false;
|
|
56750
|
-
}
|
|
56751
|
-
let timeoutObject;
|
|
56752
|
-
const clear = () => {
|
|
56753
|
-
const item = action.get(path);
|
|
56754
|
-
const count = item ? item.count : 0;
|
|
56755
|
-
action.delete(path);
|
|
56756
|
-
clearTimeout(timeoutObject);
|
|
56757
|
-
if (item) clearTimeout(item.timeoutObject);
|
|
56758
|
-
return count;
|
|
56759
|
-
};
|
|
56760
|
-
timeoutObject = setTimeout(clear, timeout);
|
|
56761
|
-
const thr = {
|
|
56762
|
-
timeoutObject,
|
|
56763
|
-
clear,
|
|
56764
|
-
count: 0
|
|
56765
|
-
};
|
|
56766
|
-
action.set(path, thr);
|
|
56767
|
-
return thr;
|
|
56768
|
-
}
|
|
56769
|
-
_incrReadyCount() {
|
|
56770
|
-
return this._readyCount++;
|
|
56771
|
-
}
|
|
56772
|
-
/**
|
|
56773
|
-
* Awaits write operation to finish.
|
|
56774
|
-
* Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback.
|
|
56775
|
-
* @param path being acted upon
|
|
56776
|
-
* @param threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished
|
|
56777
|
-
* @param event
|
|
56778
|
-
* @param awfEmit Callback to be called when ready for event to be emitted.
|
|
56779
|
-
*/
|
|
56780
|
-
_awaitWriteFinish(path, threshold, event, awfEmit) {
|
|
56781
|
-
const awf = this.options.awaitWriteFinish;
|
|
56782
|
-
if (typeof awf !== "object") return;
|
|
56783
|
-
const pollInterval = awf.pollInterval;
|
|
56784
|
-
let timeoutHandler;
|
|
56785
|
-
let fullPath = path;
|
|
56786
|
-
if (this.options.cwd && !sysPath.isAbsolute(path)) fullPath = sysPath.join(this.options.cwd, path);
|
|
56787
|
-
const now = /* @__PURE__ */ new Date();
|
|
56788
|
-
const writes = this._pendingWrites;
|
|
56789
|
-
function awaitWriteFinishFn(prevStat) {
|
|
56790
|
-
stat(fullPath, (err, curStat) => {
|
|
56791
|
-
if (err || !writes.has(path)) {
|
|
56792
|
-
if (err && err.code !== "ENOENT") awfEmit(err);
|
|
56793
|
-
return;
|
|
56794
|
-
}
|
|
56795
|
-
const now = Number(/* @__PURE__ */ new Date());
|
|
56796
|
-
if (prevStat && curStat.size !== prevStat.size) writes.get(path).lastChange = now;
|
|
56797
|
-
if (now - writes.get(path).lastChange >= threshold) {
|
|
56798
|
-
writes.delete(path);
|
|
56799
|
-
awfEmit(void 0, curStat);
|
|
56800
|
-
} else timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval, curStat);
|
|
56801
|
-
});
|
|
56802
|
-
}
|
|
56803
|
-
if (!writes.has(path)) {
|
|
56804
|
-
writes.set(path, {
|
|
56805
|
-
lastChange: now,
|
|
56806
|
-
cancelWait: () => {
|
|
56807
|
-
writes.delete(path);
|
|
56808
|
-
clearTimeout(timeoutHandler);
|
|
56809
|
-
return event;
|
|
56810
|
-
}
|
|
56811
|
-
});
|
|
56812
|
-
timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval);
|
|
56813
|
-
}
|
|
56814
|
-
}
|
|
56815
|
-
/**
|
|
56816
|
-
* Determines whether user has asked to ignore this path.
|
|
56817
|
-
*/
|
|
56818
|
-
_isIgnored(path, stats) {
|
|
56819
|
-
if (this.options.atomic && DOT_RE.test(path)) return true;
|
|
56820
|
-
if (!this._userIgnored) {
|
|
56821
|
-
const { cwd } = this.options;
|
|
56822
|
-
const ignored = (this.options.ignored || []).map(normalizeIgnored(cwd));
|
|
56823
|
-
const list = [...[...this._ignoredPaths].map(normalizeIgnored(cwd)), ...ignored];
|
|
56824
|
-
this._userIgnored = anymatch(list, void 0);
|
|
56825
|
-
}
|
|
56826
|
-
return this._userIgnored(path, stats);
|
|
56827
|
-
}
|
|
56828
|
-
_isntIgnored(path, stat) {
|
|
56829
|
-
return !this._isIgnored(path, stat);
|
|
56830
|
-
}
|
|
56831
|
-
/**
|
|
56832
|
-
* Provides a set of common helpers and properties relating to symlink handling.
|
|
56833
|
-
* @param path file or directory pattern being watched
|
|
56834
|
-
*/
|
|
56835
|
-
_getWatchHelpers(path) {
|
|
56836
|
-
return new WatchHelper(path, this.options.followSymlinks, this);
|
|
56837
|
-
}
|
|
56838
|
-
/**
|
|
56839
|
-
* Provides directory tracking objects
|
|
56840
|
-
* @param directory path of the directory
|
|
56841
|
-
*/
|
|
56842
|
-
_getWatchedDir(directory) {
|
|
56843
|
-
const dir = sysPath.resolve(directory);
|
|
56844
|
-
if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove));
|
|
56845
|
-
return this._watched.get(dir);
|
|
56846
|
-
}
|
|
56847
|
-
/**
|
|
56848
|
-
* Check for read permissions: https://stackoverflow.com/a/11781404/1358405
|
|
56849
|
-
*/
|
|
56850
|
-
_hasReadPermissions(stats) {
|
|
56851
|
-
if (this.options.ignorePermissionErrors) return true;
|
|
56852
|
-
return Boolean(Number(stats.mode) & 256);
|
|
56853
|
-
}
|
|
56854
|
-
/**
|
|
56855
|
-
* Handles emitting unlink events for
|
|
56856
|
-
* files and directories, and via recursion, for
|
|
56857
|
-
* files and directories within directories that are unlinked
|
|
56858
|
-
* @param directory within which the following item is located
|
|
56859
|
-
* @param item base path of item/directory
|
|
56860
|
-
*/
|
|
56861
|
-
_remove(directory, item, isDirectory) {
|
|
56862
|
-
const path = sysPath.join(directory, item);
|
|
56863
|
-
const fullPath = sysPath.resolve(path);
|
|
56864
|
-
isDirectory = isDirectory != null ? isDirectory : this._watched.has(path) || this._watched.has(fullPath);
|
|
56865
|
-
if (!this._throttle("remove", path, 100)) return;
|
|
56866
|
-
if (!isDirectory && this._watched.size === 1) this.add(directory, item, true);
|
|
56867
|
-
this._getWatchedDir(path).getChildren().forEach((nested) => this._remove(path, nested));
|
|
56868
|
-
const parent = this._getWatchedDir(directory);
|
|
56869
|
-
const wasTracked = parent.has(item);
|
|
56870
|
-
parent.remove(item);
|
|
56871
|
-
if (this._symlinkPaths.has(fullPath)) this._symlinkPaths.delete(fullPath);
|
|
56872
|
-
let relPath = path;
|
|
56873
|
-
if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path);
|
|
56874
|
-
if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
|
|
56875
|
-
if (this._pendingWrites.get(relPath).cancelWait() === EVENTS.ADD) return;
|
|
56876
|
-
}
|
|
56877
|
-
this._watched.delete(path);
|
|
56878
|
-
this._watched.delete(fullPath);
|
|
56879
|
-
const eventName = isDirectory ? EVENTS.UNLINK_DIR : EVENTS.UNLINK;
|
|
56880
|
-
if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path);
|
|
56881
|
-
this._closePath(path);
|
|
56882
|
-
}
|
|
56883
|
-
/**
|
|
56884
|
-
* Closes all watchers for a path
|
|
56885
|
-
*/
|
|
56886
|
-
_closePath(path) {
|
|
56887
|
-
this._closeFile(path);
|
|
56888
|
-
const dir = sysPath.dirname(path);
|
|
56889
|
-
this._getWatchedDir(dir).remove(sysPath.basename(path));
|
|
56890
|
-
}
|
|
56891
|
-
/**
|
|
56892
|
-
* Closes only file-specific watchers
|
|
56893
|
-
*/
|
|
56894
|
-
_closeFile(path) {
|
|
56895
|
-
const closers = this._closers.get(path);
|
|
56896
|
-
if (!closers) return;
|
|
56897
|
-
closers.forEach((closer) => closer());
|
|
56898
|
-
this._closers.delete(path);
|
|
56899
|
-
}
|
|
56900
|
-
_addPathCloser(path, closer) {
|
|
56901
|
-
if (!closer) return;
|
|
56902
|
-
let list = this._closers.get(path);
|
|
56903
|
-
if (!list) {
|
|
56904
|
-
list = [];
|
|
56905
|
-
this._closers.set(path, list);
|
|
56906
|
-
}
|
|
56907
|
-
list.push(closer);
|
|
56908
|
-
}
|
|
56909
|
-
_readdirp(root, opts) {
|
|
56910
|
-
if (this.closed) return;
|
|
56911
|
-
let stream = readdirp(root, {
|
|
56912
|
-
type: EVENTS.ALL,
|
|
56913
|
-
alwaysStat: true,
|
|
56914
|
-
lstat: true,
|
|
56915
|
-
...opts,
|
|
56916
|
-
depth: 0
|
|
56917
|
-
});
|
|
56918
|
-
this._streams.add(stream);
|
|
56919
|
-
stream.once(STR_CLOSE, () => {
|
|
56920
|
-
stream = void 0;
|
|
56921
|
-
});
|
|
56922
|
-
stream.once("end", () => {
|
|
56923
|
-
if (stream) {
|
|
56924
|
-
this._streams.delete(stream);
|
|
56925
|
-
stream = void 0;
|
|
56926
|
-
}
|
|
56927
|
-
});
|
|
56928
|
-
return stream;
|
|
56929
|
-
}
|
|
56930
|
-
};
|
|
56931
|
-
|
|
56932
54852
|
//#endregion
|
|
56933
54853
|
//#region ../../packages/agent-core-v2/src/_base/utils/fs.ts
|
|
56934
54854
|
init_errors$1();
|
|
56935
|
-
let win32MoveFileReplace;
|
|
56936
|
-
function registerWin32MoveFileReplace(fn) {
|
|
56937
|
-
win32MoveFileReplace = fn;
|
|
56938
|
-
}
|
|
56939
|
-
async function replaceFileNonDestructive(tmpPath, filePath, signal) {
|
|
56940
|
-
signal?.throwIfAborted();
|
|
56941
|
-
if (process.platform !== "win32") {
|
|
56942
|
-
await rename(tmpPath, filePath);
|
|
56943
|
-
return;
|
|
56944
|
-
}
|
|
56945
|
-
let lastError;
|
|
56946
|
-
for (let attempt = 0; attempt < 5; attempt += 1) {
|
|
56947
|
-
signal?.throwIfAborted();
|
|
56948
|
-
try {
|
|
56949
|
-
await rename(tmpPath, filePath);
|
|
56950
|
-
return;
|
|
56951
|
-
} catch (error) {
|
|
56952
|
-
lastError = error;
|
|
56953
|
-
const code = error.code;
|
|
56954
|
-
if (code !== "EPERM" && code !== "EACCES" && code !== "EBUSY") throw error;
|
|
56955
|
-
}
|
|
56956
|
-
await setTimeout$1(10 * (attempt + 1), void 0, { signal });
|
|
56957
|
-
}
|
|
56958
|
-
if (win32MoveFileReplace !== void 0) {
|
|
56959
|
-
await win32MoveFileReplace(tmpPath, filePath, signal);
|
|
56960
|
-
return;
|
|
56961
|
-
}
|
|
56962
|
-
throw lastError;
|
|
56963
|
-
}
|
|
56964
|
-
async function syncDir(dirPath) {
|
|
56965
|
-
if (process.platform === "win32") return;
|
|
56966
|
-
const dirFh = await open(dirPath, "r");
|
|
56967
|
-
try {
|
|
56968
|
-
await dirFh.sync();
|
|
56969
|
-
} finally {
|
|
56970
|
-
await dirFh.close();
|
|
56971
|
-
}
|
|
56972
|
-
}
|
|
56973
|
-
function syncFd(fd) {
|
|
56974
|
-
return new Promise((resolve, reject) => {
|
|
56975
|
-
nodeFs.fsync(fd, (err) => {
|
|
56976
|
-
if (err) {
|
|
56977
|
-
reject(err);
|
|
56978
|
-
return;
|
|
56979
|
-
}
|
|
56980
|
-
resolve();
|
|
56981
|
-
});
|
|
56982
|
-
});
|
|
56983
|
-
}
|
|
56984
|
-
/** Suffix appended to an atomic-write temp file once its bytes are durably synced; only such temps are complete. */
|
|
56985
|
-
const ATOMIC_TEMP_READY_SUFFIX = ".ready";
|
|
56986
|
-
async function markTempReady(tmpPath, signal) {
|
|
56987
|
-
signal?.throwIfAborted();
|
|
56988
|
-
const readyPath = `${tmpPath}${ATOMIC_TEMP_READY_SUFFIX}`;
|
|
56989
|
-
if (process.platform !== "win32") {
|
|
56990
|
-
await rename(tmpPath, readyPath);
|
|
56991
|
-
return readyPath;
|
|
56992
|
-
}
|
|
56993
|
-
let lastError;
|
|
56994
|
-
for (let attempt = 0; attempt < 5; attempt += 1) {
|
|
56995
|
-
signal?.throwIfAborted();
|
|
56996
|
-
try {
|
|
56997
|
-
await rename(tmpPath, readyPath);
|
|
56998
|
-
return readyPath;
|
|
56999
|
-
} catch (error) {
|
|
57000
|
-
lastError = error;
|
|
57001
|
-
const code = error.code;
|
|
57002
|
-
if (code !== "EPERM" && code !== "EACCES" && code !== "EBUSY") throw error;
|
|
57003
|
-
}
|
|
57004
|
-
await setTimeout$1(10 * (attempt + 1), void 0, { signal });
|
|
57005
|
-
}
|
|
57006
|
-
throw lastError;
|
|
57007
|
-
}
|
|
57008
|
-
async function atomicWrite(filePath, content, _syncOverride, mode, signal, preserveDestinationOnError = false) {
|
|
57009
|
-
signal?.throwIfAborted();
|
|
57010
|
-
const hex = randomBytes(4).toString("hex");
|
|
57011
|
-
const stagingPath = `${filePath}.${preserveDestinationOnError ? "stage" : "tmp"}.${process.pid}.${hex}`;
|
|
57012
|
-
let tmpPath = stagingPath;
|
|
57013
|
-
let renamed = false;
|
|
57014
|
-
try {
|
|
57015
|
-
const fh = await open(tmpPath, "w", mode);
|
|
57016
|
-
try {
|
|
57017
|
-
signal?.throwIfAborted();
|
|
57018
|
-
await fh.writeFile(content);
|
|
57019
|
-
signal?.throwIfAborted();
|
|
57020
|
-
await (_syncOverride ?? syncFd)(fh.fd);
|
|
57021
|
-
} finally {
|
|
57022
|
-
await fh.close();
|
|
57023
|
-
}
|
|
57024
|
-
if (!preserveDestinationOnError) tmpPath = await markTempReady(stagingPath, signal);
|
|
57025
|
-
if (preserveDestinationOnError) {
|
|
57026
|
-
await replaceFileNonDestructive(tmpPath, filePath, signal);
|
|
57027
|
-
renamed = true;
|
|
57028
|
-
} else {
|
|
57029
|
-
if (process.platform === "win32") try {
|
|
57030
|
-
await rename(tmpPath, filePath);
|
|
57031
|
-
renamed = true;
|
|
57032
|
-
} catch (error) {
|
|
57033
|
-
if (!(error.code === "EPERM")) throw error;
|
|
57034
|
-
}
|
|
57035
|
-
if (!renamed) {
|
|
57036
|
-
if (process.platform === "win32") try {
|
|
57037
|
-
await unlink(filePath);
|
|
57038
|
-
} catch (error) {
|
|
57039
|
-
if (error.code !== "ENOENT") throw error;
|
|
57040
|
-
}
|
|
57041
|
-
signal?.throwIfAborted();
|
|
57042
|
-
await rename(tmpPath, filePath);
|
|
57043
|
-
renamed = true;
|
|
57044
|
-
}
|
|
57045
|
-
}
|
|
57046
|
-
if (mode !== void 0) try {
|
|
57047
|
-
await chmod(filePath, mode);
|
|
57048
|
-
} catch {
|
|
57049
|
-
if (process.platform !== "win32") throw new BugIndicatingError(`chmod(${filePath}, ${mode.toString(8)}) failed after atomic write`);
|
|
57050
|
-
}
|
|
57051
|
-
} finally {
|
|
57052
|
-
if (!renamed) try {
|
|
57053
|
-
await unlink(tmpPath);
|
|
57054
|
-
} catch {}
|
|
57055
|
-
}
|
|
57056
|
-
}
|
|
57057
|
-
async function atomicWriteStream(filePath, source, mode, signal, preserveDestinationOnError = false) {
|
|
57058
|
-
signal?.throwIfAborted();
|
|
57059
|
-
const hex = randomBytes(4).toString("hex");
|
|
57060
|
-
const stagingPath = `${filePath}.${preserveDestinationOnError ? "stage" : "tmp"}.${process.pid}.${hex}`;
|
|
57061
|
-
let tmpPath = stagingPath;
|
|
57062
|
-
let renamed = false;
|
|
57063
|
-
const destroyable = source;
|
|
57064
|
-
const onAbort = () => {
|
|
57065
|
-
const reason = signal?.reason instanceof Error ? signal.reason : void 0;
|
|
57066
|
-
destroyable.destroy?.(reason);
|
|
57067
|
-
};
|
|
57068
|
-
signal?.addEventListener("abort", onAbort, { once: true });
|
|
57069
|
-
try {
|
|
57070
|
-
const fh = await open(tmpPath, "w", mode);
|
|
57071
|
-
try {
|
|
57072
|
-
for await (const chunk of source) {
|
|
57073
|
-
signal?.throwIfAborted();
|
|
57074
|
-
if (chunk.byteLength > 0) await fh.writeFile(chunk);
|
|
57075
|
-
}
|
|
57076
|
-
signal?.throwIfAborted();
|
|
57077
|
-
await fh.sync();
|
|
57078
|
-
} finally {
|
|
57079
|
-
await fh.close();
|
|
57080
|
-
}
|
|
57081
|
-
if (!preserveDestinationOnError) tmpPath = await markTempReady(stagingPath, signal);
|
|
57082
|
-
if (preserveDestinationOnError) {
|
|
57083
|
-
await replaceFileNonDestructive(tmpPath, filePath, signal);
|
|
57084
|
-
renamed = true;
|
|
57085
|
-
} else {
|
|
57086
|
-
if (process.platform === "win32") try {
|
|
57087
|
-
await rename(tmpPath, filePath);
|
|
57088
|
-
renamed = true;
|
|
57089
|
-
} catch (error) {
|
|
57090
|
-
if (!(error.code === "EPERM")) throw error;
|
|
57091
|
-
}
|
|
57092
|
-
if (!renamed) {
|
|
57093
|
-
if (process.platform === "win32") try {
|
|
57094
|
-
await unlink(filePath);
|
|
57095
|
-
} catch (error) {
|
|
57096
|
-
if (error.code !== "ENOENT") throw error;
|
|
57097
|
-
}
|
|
57098
|
-
signal?.throwIfAborted();
|
|
57099
|
-
await rename(tmpPath, filePath);
|
|
57100
|
-
renamed = true;
|
|
57101
|
-
}
|
|
57102
|
-
}
|
|
57103
|
-
if (mode !== void 0) try {
|
|
57104
|
-
await chmod(filePath, mode);
|
|
57105
|
-
} catch {
|
|
57106
|
-
if (process.platform !== "win32") throw new BugIndicatingError(`chmod(${filePath}, ${mode.toString(8)}) failed after atomic write`);
|
|
57107
|
-
}
|
|
57108
|
-
} finally {
|
|
57109
|
-
signal?.removeEventListener("abort", onAbort);
|
|
57110
|
-
if (!renamed) try {
|
|
57111
|
-
await unlink(tmpPath);
|
|
57112
|
-
} catch {}
|
|
57113
|
-
}
|
|
57114
|
-
}
|
|
57115
|
-
|
|
57116
|
-
//#endregion
|
|
57117
|
-
//#region ../../packages/agent-core-v2/src/persistence/backends/node-fs/sparseFile.ts
|
|
57118
|
-
const WORKER_IDLE_TIMEOUT_MS = 2e3;
|
|
57119
|
-
var SparseHelperUnavailableError = class extends Error {
|
|
57120
|
-
constructor(message) {
|
|
57121
|
-
super(message);
|
|
57122
|
-
this.name = "SparseHelperUnavailableError";
|
|
57123
|
-
}
|
|
57124
|
-
};
|
|
57125
|
-
let activeWorker;
|
|
57126
|
-
let idleTimer;
|
|
57127
|
-
let workerQueue = Promise.resolve();
|
|
57128
|
-
let pendingCommands = 0;
|
|
57129
|
-
let exitHookRegistered = false;
|
|
57130
|
-
function closeSparseFileWorker() {
|
|
57131
|
-
if (idleTimer !== void 0) {
|
|
57132
|
-
clearTimeout(idleTimer);
|
|
57133
|
-
idleTimer = void 0;
|
|
57134
|
-
}
|
|
57135
|
-
const current = activeWorker;
|
|
57136
|
-
activeWorker = void 0;
|
|
57137
|
-
if (current === void 0) return;
|
|
57138
|
-
try {
|
|
57139
|
-
current.rl.close();
|
|
57140
|
-
} catch {}
|
|
57141
|
-
try {
|
|
57142
|
-
current.proc.stdin.end();
|
|
57143
|
-
} catch {}
|
|
57144
|
-
try {
|
|
57145
|
-
current.proc.kill();
|
|
57146
|
-
} catch {}
|
|
57147
|
-
}
|
|
57148
|
-
function armIdleClose() {
|
|
57149
|
-
if (idleTimer !== void 0) clearTimeout(idleTimer);
|
|
57150
|
-
idleTimer = setTimeout(() => {
|
|
57151
|
-
idleTimer = void 0;
|
|
57152
|
-
closeSparseFileWorker();
|
|
57153
|
-
}, WORKER_IDLE_TIMEOUT_MS);
|
|
57154
|
-
idleTimer.unref?.();
|
|
57155
|
-
}
|
|
57156
|
-
function resolveSparseHelperPath() {
|
|
57157
|
-
const configured = process.env["KIKI_WINDOWS_PROCESS_HELPER"];
|
|
57158
|
-
if (configured !== void 0) return configured.length > 0 && existsSync(configured) ? configured : void 0;
|
|
57159
|
-
return [
|
|
57160
|
-
"./windows-process-helper.exe",
|
|
57161
|
-
"./native/windows-process-helper.exe",
|
|
57162
|
-
"../../../../dist/windows-process-helper.exe"
|
|
57163
|
-
].map((rel) => fileURLToPath(new URL(rel, import.meta.url))).find(existsSync);
|
|
57164
|
-
}
|
|
57165
|
-
function ensureWin32Worker() {
|
|
57166
|
-
if (activeWorker !== void 0 && activeWorker.proc.exitCode === null && !activeWorker.proc.killed) return activeWorker;
|
|
57167
|
-
closeSparseFileWorker();
|
|
57168
|
-
const helperPath = resolveSparseHelperPath();
|
|
57169
|
-
if (helperPath === void 0) throw new SparseHelperUnavailableError("windows-process-helper.exe is missing");
|
|
57170
|
-
if (!exitHookRegistered) {
|
|
57171
|
-
exitHookRegistered = true;
|
|
57172
|
-
process.once("exit", () => closeSparseFileWorker());
|
|
57173
|
-
}
|
|
57174
|
-
const proc = spawn(helperPath, ["--sparse-worker", "v1"], {
|
|
57175
|
-
stdio: [
|
|
57176
|
-
"pipe",
|
|
57177
|
-
"pipe",
|
|
57178
|
-
"ignore"
|
|
57179
|
-
],
|
|
57180
|
-
windowsHide: true
|
|
57181
|
-
});
|
|
57182
|
-
proc.unref();
|
|
57183
|
-
proc.stdin.unref?.();
|
|
57184
|
-
proc.stdout.unref?.();
|
|
57185
|
-
const rl = createInterface({
|
|
57186
|
-
input: proc.stdout,
|
|
57187
|
-
crlfDelay: Infinity
|
|
57188
|
-
});
|
|
57189
|
-
const buffered = [];
|
|
57190
|
-
const waiters = [];
|
|
57191
|
-
rl.on("line", (line) => {
|
|
57192
|
-
const waiter = waiters.shift();
|
|
57193
|
-
if (waiter !== void 0) waiter.resolve(line);
|
|
57194
|
-
else buffered.push(line);
|
|
57195
|
-
});
|
|
57196
|
-
const failAll = (error) => {
|
|
57197
|
-
if (activeWorker?.proc === proc) activeWorker = void 0;
|
|
57198
|
-
while (waiters.length > 0) waiters.shift().reject(error);
|
|
57199
|
-
};
|
|
57200
|
-
proc.once("error", (error) => failAll(error instanceof Error ? error : new Error(String(error))));
|
|
57201
|
-
proc.once("close", (code) => failAll(/* @__PURE__ */ new Error(`win32 sparse helper exited (${String(code)})`)));
|
|
57202
|
-
const nextLine = () => {
|
|
57203
|
-
if (buffered.length > 0) return Promise.resolve(buffered.shift());
|
|
57204
|
-
return new Promise((resolvePromise, rejectPromise) => {
|
|
57205
|
-
waiters.push({
|
|
57206
|
-
resolve: resolvePromise,
|
|
57207
|
-
reject: rejectPromise
|
|
57208
|
-
});
|
|
57209
|
-
});
|
|
57210
|
-
};
|
|
57211
|
-
const ready = nextLine().then((banner) => {
|
|
57212
|
-
if (banner !== "ready sparse-v1") {
|
|
57213
|
-
closeSparseFileWorker();
|
|
57214
|
-
throw new SparseHelperUnavailableError(`incompatible windows-process-helper banner: ${banner}`);
|
|
57215
|
-
}
|
|
57216
|
-
}, (error) => {
|
|
57217
|
-
closeSparseFileWorker();
|
|
57218
|
-
throw new SparseHelperUnavailableError(error instanceof Error ? error.message : String(error));
|
|
57219
|
-
});
|
|
57220
|
-
ready.catch(() => {});
|
|
57221
|
-
const worker = {
|
|
57222
|
-
proc,
|
|
57223
|
-
rl,
|
|
57224
|
-
nextLine,
|
|
57225
|
-
ready
|
|
57226
|
-
};
|
|
57227
|
-
activeWorker = worker;
|
|
57228
|
-
return worker;
|
|
57229
|
-
}
|
|
57230
|
-
function setWorkerRef(worker, referenced) {
|
|
57231
|
-
const stdoutHandle = worker.proc.stdout;
|
|
57232
|
-
if (referenced) {
|
|
57233
|
-
worker.proc.ref();
|
|
57234
|
-
stdoutHandle.ref?.();
|
|
57235
|
-
} else {
|
|
57236
|
-
worker.proc.unref();
|
|
57237
|
-
stdoutHandle.unref?.();
|
|
57238
|
-
}
|
|
57239
|
-
}
|
|
57240
|
-
function runWin32Raw(command) {
|
|
57241
|
-
pendingCommands += 1;
|
|
57242
|
-
const result = workerQueue.then(async () => {
|
|
57243
|
-
if (idleTimer !== void 0) {
|
|
57244
|
-
clearTimeout(idleTimer);
|
|
57245
|
-
idleTimer = void 0;
|
|
57246
|
-
}
|
|
57247
|
-
const worker = ensureWin32Worker();
|
|
57248
|
-
setWorkerRef(worker, true);
|
|
57249
|
-
try {
|
|
57250
|
-
await worker.ready;
|
|
57251
|
-
worker.proc.stdin.write(`${command}\n`);
|
|
57252
|
-
return (await worker.nextLine()).split(" ");
|
|
57253
|
-
} finally {
|
|
57254
|
-
pendingCommands = Math.max(0, pendingCommands - 1);
|
|
57255
|
-
if (pendingCommands === 0) {
|
|
57256
|
-
if (activeWorker === worker) setWorkerRef(worker, false);
|
|
57257
|
-
armIdleClose();
|
|
57258
|
-
}
|
|
57259
|
-
}
|
|
57260
|
-
});
|
|
57261
|
-
workerQueue = result.then(() => void 0, () => void 0);
|
|
57262
|
-
return result;
|
|
57263
|
-
}
|
|
57264
|
-
async function runWin32Command(command, signal) {
|
|
57265
|
-
signal?.throwIfAborted();
|
|
57266
|
-
const promise = runWin32Raw(command);
|
|
57267
|
-
const parts = signal === void 0 ? await promise : await abortable(promise, signal);
|
|
57268
|
-
if (parts[0] !== "ok") throw new Error(parts.slice(1).join(" ") || "win32 sparse operation failed");
|
|
57269
|
-
return parts.slice(1);
|
|
57270
|
-
}
|
|
57271
|
-
function encodePath(filePath) {
|
|
57272
|
-
return Buffer.from(filePath, "utf8").toString("base64");
|
|
57273
|
-
}
|
|
57274
|
-
if (process.platform === "win32") registerWin32MoveFileReplace(async (srcPath, destPath, signal) => {
|
|
57275
|
-
await runWin32Command(`replace\t${encodePath(srcPath)}\t${encodePath(destPath)}`, signal);
|
|
57276
|
-
});
|
|
57277
|
-
async function queryWin32ProcessCreationFileTime(pid, signal) {
|
|
57278
|
-
if (process.platform !== "win32") return "unknown";
|
|
57279
|
-
try {
|
|
57280
|
-
const [raw] = await runWin32Command(`proctime\t${pid}`, signal);
|
|
57281
|
-
if (raw === "dead") return "dead";
|
|
57282
|
-
if (raw === "denied" || raw === void 0 || raw.length === 0) return "unknown";
|
|
57283
|
-
return BigInt(raw);
|
|
57284
|
-
} catch {
|
|
57285
|
-
if (signal?.aborted) throw signal.reason;
|
|
57286
|
-
return "unknown";
|
|
57287
|
-
}
|
|
57288
|
-
}
|
|
57289
|
-
|
|
57290
|
-
//#endregion
|
|
57291
|
-
//#region ../../packages/agent-core-v2/src/persistence/backends/node-fs/fileLock.ts
|
|
57292
|
-
const storagePath$1 = process.platform === "win32" ? dist_exports : posix;
|
|
57293
|
-
const basename$2 = (value) => storagePath$1.basename(value);
|
|
57294
|
-
const dirname$2 = (value) => storagePath$1.dirname(value);
|
|
57295
|
-
const join$2 = (...parts) => storagePath$1.join(...parts);
|
|
57296
|
-
const resolve$1 = (...parts) => storagePath$1.resolve(...parts);
|
|
57297
|
-
const DEFAULT_LEASE_MS = 12e4;
|
|
57298
|
-
const DEFAULT_RENEW_INTERVAL_MS = 45e3;
|
|
57299
|
-
const TAKEOVER_SETTLE_BASE_MS = 60;
|
|
57300
|
-
const TAKEOVER_SETTLE_MAX_MS = 2e3;
|
|
57301
|
-
const PROCESS_STARTED_AT = Math.floor(Date.now() - process.uptime() * 1e3);
|
|
57302
|
-
const WINDOWS_EPOCH_OFFSET_MS = 0xa9730b66800;
|
|
57303
|
-
const TRANSIENT_DENIAL_RETRIES = 4;
|
|
57304
|
-
const TRANSIENT_DENIAL_DELAY_MS = 10;
|
|
57305
|
-
const LOCK_WAIT_BASE_MS = 25;
|
|
57306
|
-
const LOCK_WAIT_MAX_MS = 250;
|
|
57307
|
-
const PENDING_UNLINK_RETRY_BASE_MS = 25;
|
|
57308
|
-
const PENDING_UNLINK_RETRY_MAX_MS = 100;
|
|
57309
|
-
const RELEASED_TOKEN_HISTORY_MAX = 4096;
|
|
57310
|
-
const HARD_LINK_UNSUPPORTED_CODES = new Set(["ENOSYS", "ENOTSUP"]);
|
|
57311
|
-
function preferDirectExclusiveCreate() {
|
|
57312
|
-
return process.platform === "android";
|
|
57313
|
-
}
|
|
57314
|
-
function isHardLinkUnsupported(error) {
|
|
57315
|
-
const code = error?.code;
|
|
57316
|
-
return code !== void 0 && HARD_LINK_UNSUPPORTED_CODES.has(code);
|
|
57317
|
-
}
|
|
57318
|
-
const TRANSIENT_DENIAL_CODES = new Set([
|
|
57319
|
-
"EPERM",
|
|
57320
|
-
"EACCES",
|
|
57321
|
-
"EBUSY"
|
|
57322
|
-
]);
|
|
57323
|
-
const HELD = /* @__PURE__ */ new Set();
|
|
57324
|
-
const READER_HELD = /* @__PURE__ */ new Set();
|
|
57325
|
-
const ACTIVE_THREAD_READER_TOKENS = /* @__PURE__ */ new Set();
|
|
57326
|
-
const RELEASED_LOCAL_READER_TOKENS = /* @__PURE__ */ new Set();
|
|
57327
|
-
const PENDING_READER_UNLINKS = /* @__PURE__ */ new Set();
|
|
57328
|
-
const DEAD_LOCAL_THREAD_IDS = /* @__PURE__ */ new Set();
|
|
57329
|
-
const WORKER_BEACON_PROBE_TIMEOUT_MS = 250;
|
|
57330
|
-
let exitHooked = false;
|
|
57331
|
-
let workerProbeHooked = false;
|
|
57332
|
-
let readerBroadcast;
|
|
57333
|
-
let pendingUnlinkTimer;
|
|
57334
|
-
let pendingUnlinkDelayMs = PENDING_UNLINK_RETRY_BASE_MS;
|
|
57335
|
-
let localWorkerBeaconPromise;
|
|
57336
|
-
let localWorkerBeaconAddress;
|
|
57337
|
-
let localWorkerBeaconServer;
|
|
57338
|
-
let sidecarSequence = 0;
|
|
57339
|
-
function nextSidecarSequence() {
|
|
57340
|
-
sidecarSequence += 1;
|
|
57341
|
-
return sidecarSequence;
|
|
57342
|
-
}
|
|
57343
|
-
function pidAlive(pid) {
|
|
57344
|
-
if (typeof pid !== "number" || !Number.isInteger(pid) || pid <= 0) return false;
|
|
57345
|
-
if (pid === process.pid) return true;
|
|
57346
|
-
try {
|
|
57347
|
-
process.kill(pid, 0);
|
|
57348
|
-
return true;
|
|
57349
|
-
} catch (error) {
|
|
57350
|
-
return error.code !== "ESRCH";
|
|
57351
|
-
}
|
|
57352
|
-
}
|
|
57353
|
-
function ensureLocalWorkerBeacon() {
|
|
57354
|
-
if (isMainThread || threadId === 0) return Promise.resolve(void 0);
|
|
57355
|
-
if (localWorkerBeaconAddress !== void 0) return Promise.resolve(localWorkerBeaconAddress);
|
|
57356
|
-
if (localWorkerBeaconPromise !== void 0) return localWorkerBeaconPromise;
|
|
57357
|
-
localWorkerBeaconPromise = new Promise((resolveBeacon, rejectBeacon) => {
|
|
57358
|
-
const server = net.createServer((socket) => {
|
|
57359
|
-
socket.on("error", () => {});
|
|
57360
|
-
socket.end();
|
|
57361
|
-
});
|
|
57362
|
-
server.unref();
|
|
57363
|
-
let settled = false;
|
|
57364
|
-
const fail = (error) => {
|
|
57365
|
-
if (settled) return;
|
|
57366
|
-
settled = true;
|
|
57367
|
-
localWorkerBeaconPromise = void 0;
|
|
57368
|
-
try {
|
|
57369
|
-
server.close();
|
|
57370
|
-
} catch {}
|
|
57371
|
-
rejectBeacon(error instanceof Error ? error : new Error(String(error)));
|
|
57372
|
-
};
|
|
57373
|
-
const succeed = (address) => {
|
|
57374
|
-
if (settled) return;
|
|
57375
|
-
settled = true;
|
|
57376
|
-
localWorkerBeaconAddress = address;
|
|
57377
|
-
localWorkerBeaconServer = server;
|
|
57378
|
-
resolveBeacon(address);
|
|
57379
|
-
};
|
|
57380
|
-
server.once("error", (error) => fail(error));
|
|
57381
|
-
try {
|
|
57382
|
-
if (process.platform === "win32") {
|
|
57383
|
-
const pipePath = `\\\\.\\pipe\\kiki-flk-${process.pid}-${threadId}-${randomUUID()}`;
|
|
57384
|
-
server.listen(pipePath, () => succeed(pipePath));
|
|
57385
|
-
} else server.listen(0, "127.0.0.1", () => {
|
|
57386
|
-
const addr = server.address();
|
|
57387
|
-
if (addr !== null && typeof addr === "object" && typeof addr.port === "number" && addr.port > 0) succeed(`tcp:${addr.port}`);
|
|
57388
|
-
else fail(/* @__PURE__ */ new Error("worker lock beacon failed to bind local port"));
|
|
57389
|
-
});
|
|
57390
|
-
} catch (error) {
|
|
57391
|
-
fail(error);
|
|
57392
|
-
}
|
|
57393
|
-
});
|
|
57394
|
-
return localWorkerBeaconPromise;
|
|
57395
|
-
}
|
|
57396
|
-
function probeForeignWorkerBeacon(beacon, signal) {
|
|
57397
|
-
signal?.throwIfAborted();
|
|
57398
|
-
let socket;
|
|
57399
|
-
if (beacon.startsWith("\\\\.\\pipe\\")) socket = net.connect(beacon);
|
|
57400
|
-
else if (beacon.startsWith("tcp:")) {
|
|
57401
|
-
const port = Number(beacon.slice(4));
|
|
57402
|
-
if (!Number.isSafeInteger(port) || port <= 0 || port > 65535) return Promise.resolve(true);
|
|
57403
|
-
socket = net.connect({
|
|
57404
|
-
host: "127.0.0.1",
|
|
57405
|
-
port
|
|
57406
|
-
});
|
|
57407
|
-
} else return Promise.resolve(true);
|
|
57408
|
-
socket.unref();
|
|
57409
|
-
return new Promise((resolveProbe, rejectProbe) => {
|
|
57410
|
-
let settled = false;
|
|
57411
|
-
const cleanupAbort = () => {
|
|
57412
|
-
signal?.removeEventListener("abort", onAbort);
|
|
57413
|
-
};
|
|
57414
|
-
const finish = (alive) => {
|
|
57415
|
-
if (settled) return;
|
|
57416
|
-
settled = true;
|
|
57417
|
-
clearTimeout(timer);
|
|
57418
|
-
cleanupAbort();
|
|
57419
|
-
socket.destroy();
|
|
57420
|
-
resolveProbe(alive);
|
|
57421
|
-
};
|
|
57422
|
-
const onAbort = () => {
|
|
57423
|
-
if (settled) return;
|
|
57424
|
-
settled = true;
|
|
57425
|
-
clearTimeout(timer);
|
|
57426
|
-
cleanupAbort();
|
|
57427
|
-
socket.destroy();
|
|
57428
|
-
rejectProbe(signal.reason);
|
|
57429
|
-
};
|
|
57430
|
-
const timer = setTimeout(() => finish(true), WORKER_BEACON_PROBE_TIMEOUT_MS);
|
|
57431
|
-
timer.unref?.();
|
|
57432
|
-
if (signal !== void 0) {
|
|
57433
|
-
if (signal.aborted) {
|
|
57434
|
-
onAbort();
|
|
57435
|
-
return;
|
|
57436
|
-
}
|
|
57437
|
-
signal.addEventListener("abort", onAbort, { once: true });
|
|
57438
|
-
}
|
|
57439
|
-
socket.once("connect", () => finish(true));
|
|
57440
|
-
socket.once("error", (err) => {
|
|
57441
|
-
finish(err.code !== "ENOENT" && err.code !== "ECONNREFUSED");
|
|
57442
|
-
});
|
|
57443
|
-
});
|
|
57444
|
-
}
|
|
57445
|
-
async function ownerProcessAlive(payload, signal, provedAt) {
|
|
57446
|
-
signal?.throwIfAborted();
|
|
57447
|
-
if (!pidAlive(payload.pid)) return false;
|
|
57448
|
-
if (payload.pid === process.pid) {
|
|
57449
|
-
if (Math.abs(payload.processStartedAt - PROCESS_STARTED_AT) > 2e3) return false;
|
|
57450
|
-
const ownerThreadId = payload.threadId ?? 0;
|
|
57451
|
-
if (ownerThreadId === 0 || ownerThreadId === threadId) return true;
|
|
57452
|
-
return localWorkerThreadAlive(ownerThreadId);
|
|
57453
|
-
}
|
|
57454
|
-
let hostAlive = true;
|
|
57455
|
-
if (process.platform === "win32") {
|
|
57456
|
-
const identity = `${payload.pid}:${payload.processStartedAt}`;
|
|
57457
|
-
const proved = provedAt?.get(identity);
|
|
57458
|
-
if (proved === void 0 || Date.now() - proved >= 5e3) {
|
|
57459
|
-
const fileTime = await queryWin32ProcessCreationFileTime(payload.pid, signal);
|
|
57460
|
-
if (fileTime === "dead") return false;
|
|
57461
|
-
if (fileTime === "unknown") hostAlive = pidAlive(payload.pid);
|
|
57462
|
-
else {
|
|
57463
|
-
const startedAt = Number(fileTime) / 1e4 - WINDOWS_EPOCH_OFFSET_MS;
|
|
57464
|
-
if (Number.isFinite(startedAt) && startedAt >= 0 && startedAt <= Date.now() + 6e4) hostAlive = Math.abs(startedAt - payload.processStartedAt) <= 2e3;
|
|
57465
|
-
if (hostAlive && provedAt !== void 0) {
|
|
57466
|
-
if (provedAt.size >= 128) provedAt.delete(provedAt.keys().next().value);
|
|
57467
|
-
provedAt.set(identity, Date.now());
|
|
57468
|
-
}
|
|
57469
|
-
}
|
|
57470
|
-
}
|
|
57471
|
-
}
|
|
57472
|
-
if (!hostAlive) return false;
|
|
57473
|
-
if ((payload.threadId ?? 0) > 0 && typeof payload.workerBeacon === "string" && payload.workerBeacon.length > 0) return probeForeignWorkerBeacon(payload.workerBeacon, signal);
|
|
57474
|
-
return true;
|
|
57475
|
-
}
|
|
57476
|
-
function isPayload(value) {
|
|
57477
|
-
if (value === null || typeof value !== "object") return false;
|
|
57478
|
-
const payload = value;
|
|
57479
|
-
if (payload.threadId !== void 0 && (typeof payload.threadId !== "number" || !Number.isSafeInteger(payload.threadId) || payload.threadId < 0)) return false;
|
|
57480
|
-
if (payload.workerBeacon !== void 0 && typeof payload.workerBeacon !== "string") return false;
|
|
57481
|
-
return payload.version === 1 && typeof payload.pid === "number" && Number.isSafeInteger(payload.pid) && payload.pid > 0 && typeof payload.processStartedAt === "number" && Number.isFinite(payload.processStartedAt) && typeof payload.token === "string" && payload.token.length > 0 && typeof payload.acquiredAt === "number" && Number.isFinite(payload.acquiredAt) && typeof payload.leaseMs === "number" && Number.isFinite(payload.leaseMs) && payload.leaseMs > 0;
|
|
57482
|
-
}
|
|
57483
|
-
function isTransientAccessDenial(error) {
|
|
57484
|
-
if (error === null || typeof error !== "object") return false;
|
|
57485
|
-
if (TRANSIENT_DENIAL_CODES.has(error.code ?? "")) return true;
|
|
57486
|
-
const errno = error.details?.errno;
|
|
57487
|
-
return typeof errno === "string" && TRANSIENT_DENIAL_CODES.has(errno);
|
|
57488
|
-
}
|
|
57489
|
-
function tryUnlinkSyncComplete(filePath) {
|
|
57490
|
-
try {
|
|
57491
|
-
fsSync.unlinkSync(filePath);
|
|
57492
|
-
return true;
|
|
57493
|
-
} catch (error) {
|
|
57494
|
-
return error.code === "ENOENT";
|
|
57495
|
-
}
|
|
57496
|
-
}
|
|
57497
|
-
function recordReleasedReaderToken(token) {
|
|
57498
|
-
if (RELEASED_LOCAL_READER_TOKENS.size >= RELEASED_TOKEN_HISTORY_MAX) {
|
|
57499
|
-
const oldest = RELEASED_LOCAL_READER_TOKENS.keys().next().value;
|
|
57500
|
-
if (oldest !== void 0) RELEASED_LOCAL_READER_TOKENS.delete(oldest);
|
|
57501
|
-
}
|
|
57502
|
-
RELEASED_LOCAL_READER_TOKENS.add(token);
|
|
57503
|
-
}
|
|
57504
|
-
function ensureReaderBroadcast() {
|
|
57505
|
-
if (readerBroadcast !== void 0) return readerBroadcast;
|
|
57506
|
-
const channel = new BroadcastChannel("kiki.fileLock.readers.v1");
|
|
57507
|
-
channel.onmessage = (event) => {
|
|
57508
|
-
const data = event?.data;
|
|
57509
|
-
if (data === null || typeof data !== "object") return;
|
|
57510
|
-
const msg = data;
|
|
57511
|
-
if (msg.pid !== process.pid || typeof msg.token !== "string") return;
|
|
57512
|
-
recordReleasedReaderToken(msg.token);
|
|
57513
|
-
if (typeof msg.leasePath === "string" && msg.leasePath.length > 0) if (msg.unlinked === true) PENDING_READER_UNLINKS.delete(msg.leasePath);
|
|
57514
|
-
else enqueuePendingReaderUnlink(msg.leasePath);
|
|
57515
|
-
};
|
|
57516
|
-
channel.unref();
|
|
57517
|
-
readerBroadcast = channel;
|
|
57518
|
-
return channel;
|
|
57519
|
-
}
|
|
57520
|
-
function enqueuePendingReaderUnlink(leasePath) {
|
|
57521
|
-
PENDING_READER_UNLINKS.add(leasePath);
|
|
57522
|
-
schedulePendingReaderUnlinkRetry();
|
|
57523
|
-
}
|
|
57524
|
-
function schedulePendingReaderUnlinkRetry() {
|
|
57525
|
-
if (PENDING_READER_UNLINKS.size === 0 || pendingUnlinkTimer !== void 0) return;
|
|
57526
|
-
const currentDelay = pendingUnlinkDelayMs;
|
|
57527
|
-
pendingUnlinkDelayMs = Math.min(PENDING_UNLINK_RETRY_MAX_MS, pendingUnlinkDelayMs * 2);
|
|
57528
|
-
pendingUnlinkTimer = setTimeout(() => {
|
|
57529
|
-
pendingUnlinkTimer = void 0;
|
|
57530
|
-
flushPendingReaderUnlinks().finally(() => {
|
|
57531
|
-
if (PENDING_READER_UNLINKS.size > 0) schedulePendingReaderUnlinkRetry();
|
|
57532
|
-
else pendingUnlinkDelayMs = PENDING_UNLINK_RETRY_BASE_MS;
|
|
57533
|
-
});
|
|
57534
|
-
}, currentDelay);
|
|
57535
|
-
pendingUnlinkTimer.unref?.();
|
|
57536
|
-
}
|
|
57537
|
-
async function flushPendingReaderUnlinks() {
|
|
57538
|
-
if (PENDING_READER_UNLINKS.size === 0) return;
|
|
57539
|
-
for (const leasePath of Array.from(PENDING_READER_UNLINKS)) try {
|
|
57540
|
-
await unlink(leasePath);
|
|
57541
|
-
PENDING_READER_UNLINKS.delete(leasePath);
|
|
57542
|
-
} catch (error) {
|
|
57543
|
-
if (error.code === "ENOENT") PENDING_READER_UNLINKS.delete(leasePath);
|
|
57544
|
-
}
|
|
57545
|
-
if (PENDING_READER_UNLINKS.size === 0) {
|
|
57546
|
-
pendingUnlinkDelayMs = PENDING_UNLINK_RETRY_BASE_MS;
|
|
57547
|
-
if (pendingUnlinkTimer !== void 0) {
|
|
57548
|
-
clearTimeout(pendingUnlinkTimer);
|
|
57549
|
-
pendingUnlinkTimer = void 0;
|
|
57550
|
-
}
|
|
57551
|
-
}
|
|
57552
|
-
}
|
|
57553
|
-
function hookExit() {
|
|
57554
|
-
ensureReaderBroadcast();
|
|
57555
|
-
if (!workerProbeHooked) {
|
|
57556
|
-
workerProbeHooked = true;
|
|
57557
|
-
process.on("workerMessage", (msg) => {
|
|
57558
|
-
if (msg === null || typeof msg !== "object") return;
|
|
57559
|
-
const probe = msg;
|
|
57560
|
-
if (typeof probe.kikiReaderProbeToken === "string" && probe.state instanceof Int32Array) {
|
|
57561
|
-
const active = ACTIVE_THREAD_READER_TOKENS.has(probe.kikiReaderProbeToken);
|
|
57562
|
-
Atomics.store(probe.state, 0, active ? 1 : 2);
|
|
57563
|
-
Atomics.notify(probe.state, 0);
|
|
57564
|
-
}
|
|
57565
|
-
});
|
|
57566
|
-
}
|
|
57567
|
-
if (exitHooked) return;
|
|
57568
|
-
exitHooked = true;
|
|
57569
|
-
const releaseHeld = () => {
|
|
57570
|
-
for (const lock of HELD) lock.releaseSync();
|
|
57571
|
-
for (const lease of Array.from(READER_HELD)) lease.releaseSync();
|
|
57572
|
-
for (const leasePath of Array.from(PENDING_READER_UNLINKS)) if (tryUnlinkSyncComplete(leasePath)) PENDING_READER_UNLINKS.delete(leasePath);
|
|
57573
|
-
if (localWorkerBeaconServer !== void 0) {
|
|
57574
|
-
try {
|
|
57575
|
-
localWorkerBeaconServer.close();
|
|
57576
|
-
} catch {}
|
|
57577
|
-
localWorkerBeaconServer = void 0;
|
|
57578
|
-
localWorkerBeaconAddress = void 0;
|
|
57579
|
-
localWorkerBeaconPromise = void 0;
|
|
57580
|
-
}
|
|
57581
|
-
};
|
|
57582
|
-
process.on("beforeExit", releaseHeld);
|
|
57583
|
-
process.on("exit", releaseHeld);
|
|
57584
|
-
}
|
|
57585
|
-
async function localWorkerThreadAlive(targetThreadId) {
|
|
57586
|
-
if (DEAD_LOCAL_THREAD_IDS.has(targetThreadId)) return false;
|
|
57587
|
-
try {
|
|
57588
|
-
await postMessageToThread(targetThreadId, { kikiLockProbe: 1 }, 500);
|
|
57589
|
-
return true;
|
|
57590
|
-
} catch (error) {
|
|
57591
|
-
const code = error.code;
|
|
57592
|
-
if (code === "ERR_WORKER_MESSAGING_FAILED" || code === "ERR_WORKER_NOT_RUNNING") {
|
|
57593
|
-
DEAD_LOCAL_THREAD_IDS.add(targetThreadId);
|
|
57594
|
-
return false;
|
|
57595
|
-
}
|
|
57596
|
-
return true;
|
|
57597
|
-
}
|
|
57598
|
-
}
|
|
57599
|
-
const LOCAL_LOCK_QUEUES = /* @__PURE__ */ new Map();
|
|
57600
|
-
function localLockKey(lockPath) {
|
|
57601
|
-
const normalized = resolve$1(lockPath);
|
|
57602
|
-
return process.platform === "win32" ? normalized.toLowerCase() : normalized;
|
|
57603
|
-
}
|
|
57604
|
-
async function acquireLocalLockSlot(key, deadline, signal) {
|
|
57605
|
-
signal?.throwIfAborted();
|
|
57606
|
-
let queue = LOCAL_LOCK_QUEUES.get(key);
|
|
57607
|
-
if (queue === void 0) {
|
|
57608
|
-
queue = {
|
|
57609
|
-
held: true,
|
|
57610
|
-
waiters: []
|
|
57611
|
-
};
|
|
57612
|
-
LOCAL_LOCK_QUEUES.set(key, queue);
|
|
57613
|
-
} else if (!queue.held) queue.held = true;
|
|
57614
|
-
else {
|
|
57615
|
-
const remaining = deadline - Date.now();
|
|
57616
|
-
if (remaining <= 0) return void 0;
|
|
57617
|
-
if (!await new Promise((resolveGrant, rejectGrant) => {
|
|
57618
|
-
const cleanup = () => {
|
|
57619
|
-
clearTimeout(timer);
|
|
57620
|
-
signal?.removeEventListener("abort", onAbort);
|
|
57621
|
-
};
|
|
57622
|
-
const onWake = () => {
|
|
57623
|
-
cleanup();
|
|
57624
|
-
resolveGrant(true);
|
|
57625
|
-
};
|
|
57626
|
-
const onAbort = () => {
|
|
57627
|
-
cleanup();
|
|
57628
|
-
const idx = queue.waiters.indexOf(onWake);
|
|
57629
|
-
if (idx !== -1) queue.waiters.splice(idx, 1);
|
|
57630
|
-
rejectGrant(signal.reason);
|
|
57631
|
-
};
|
|
57632
|
-
const timer = setTimeout(() => {
|
|
57633
|
-
cleanup();
|
|
57634
|
-
const idx = queue.waiters.indexOf(onWake);
|
|
57635
|
-
if (idx !== -1) queue.waiters.splice(idx, 1);
|
|
57636
|
-
resolveGrant(false);
|
|
57637
|
-
}, remaining);
|
|
57638
|
-
timer.unref?.();
|
|
57639
|
-
queue.waiters.push(onWake);
|
|
57640
|
-
signal?.addEventListener("abort", onAbort, { once: true });
|
|
57641
|
-
})) return void 0;
|
|
57642
|
-
if (signal?.aborted) {
|
|
57643
|
-
releaseLocalLockSlot(key, queue);
|
|
57644
|
-
signal.throwIfAborted();
|
|
57645
|
-
}
|
|
57646
|
-
}
|
|
57647
|
-
let released = false;
|
|
57648
|
-
return () => {
|
|
57649
|
-
if (released) return;
|
|
57650
|
-
released = true;
|
|
57651
|
-
releaseLocalLockSlot(key, queue);
|
|
57652
|
-
};
|
|
57653
|
-
}
|
|
57654
|
-
function releaseLocalLockSlot(key, queue) {
|
|
57655
|
-
const next = queue.waiters.shift();
|
|
57656
|
-
if (next !== void 0) {
|
|
57657
|
-
next();
|
|
57658
|
-
return;
|
|
57659
|
-
}
|
|
57660
|
-
queue.held = false;
|
|
57661
|
-
if (LOCAL_LOCK_QUEUES.get(key) === queue) LOCAL_LOCK_QUEUES.delete(key);
|
|
57662
|
-
}
|
|
57663
|
-
/** Acquires a renewable local-filesystem lock with atomic create and process-live watch arbitration
|
|
57664
|
-
* for stale takeover. Reclaims dead or corrupted locks and releases only this instance's token.
|
|
57665
|
-
* Retries an acquisition attempt when the filesystem reports a transient access denial
|
|
57666
|
-
* (`EPERM`/`EACCES`/`EBUSY`), which is how Windows surfaces a concurrent release of the lock
|
|
57667
|
-
* sidecars; a persistent denial is still reported as a permission failure. */
|
|
57668
|
-
async function acquireFileLock(lockPath, options = {}, modes = {}) {
|
|
57669
|
-
const lock = new FileLock(lockPath, options, modes);
|
|
57670
|
-
const waitForMs = Math.max(0, options.waitForMs ?? 0);
|
|
57671
|
-
const deadline = Date.now() + waitForMs;
|
|
57672
|
-
const useLocalQueue = waitForMs > 0;
|
|
57673
|
-
let releaseLocalSlot;
|
|
57674
|
-
let delayMs = LOCK_WAIT_BASE_MS;
|
|
57675
|
-
try {
|
|
57676
|
-
if (useLocalQueue) releaseLocalSlot = await acquireLocalLockSlot(localLockKey(lockPath), deadline, options.signal);
|
|
57677
|
-
for (;;) {
|
|
57678
|
-
options.signal?.throwIfAborted();
|
|
57679
|
-
if (releaseLocalSlot !== void 0 || !useLocalQueue) {
|
|
57680
|
-
if (await lock.acquire()) {
|
|
57681
|
-
if (options.signal?.aborted) {
|
|
57682
|
-
await lock.release();
|
|
57683
|
-
releaseLocalSlot?.();
|
|
57684
|
-
releaseLocalSlot = void 0;
|
|
57685
|
-
options.signal.throwIfAborted();
|
|
57686
|
-
}
|
|
57687
|
-
if (releaseLocalSlot === void 0) return lock;
|
|
57688
|
-
const releaseSlot = releaseLocalSlot;
|
|
57689
|
-
releaseLocalSlot = void 0;
|
|
57690
|
-
return { async release() {
|
|
57691
|
-
try {
|
|
57692
|
-
await lock.release();
|
|
57693
|
-
} finally {
|
|
57694
|
-
releaseSlot();
|
|
57695
|
-
}
|
|
57696
|
-
} };
|
|
57697
|
-
}
|
|
57698
|
-
}
|
|
57699
|
-
if (Date.now() >= deadline) {
|
|
57700
|
-
const inspected = await lock.inspectOwner();
|
|
57701
|
-
const sessionId = inspected?.owner?.["sessionId"];
|
|
57702
|
-
const ownerKind = inspected?.owner?.["kind"];
|
|
57703
|
-
const ownerDetails = inspected?.pid === void 0 ? "" : ` (pid ${inspected.pid}, started ${formatProcessStart(inspected.processStartedAt)}, lock ${lockPath})`;
|
|
57704
|
-
const waitHint = typeof sessionId === "string" ? "; retry with --wait-for-session <seconds>" : ownerKind === "session-index" ? "; another kiki process is updating this KIKI_HOME; retry or use a separate KIKI_HOME" : "";
|
|
57705
|
-
throw new StorageError(StorageErrors.codes.STORAGE_LOCKED, typeof sessionId === "string" ? `Session "${sessionId}" is active in another process${ownerDetails}${waitHint}` : ownerKind === "session-index" ? `Session index is locked by another process${ownerDetails}${waitHint}` : ownerKind === "memory-write" ? `Memory is being saved by another Kiki process${ownerDetails}; retried for ${waitForMs / 1e3}s. Retry once.` : `Storage is locked by another process${ownerDetails}`, { details: {
|
|
57706
|
-
path: lockPath,
|
|
57707
|
-
owner: inspected?.owner,
|
|
57708
|
-
pid: inspected?.pid,
|
|
57709
|
-
processStartedAt: inspected?.processStartedAt,
|
|
57710
|
-
acquiredAt: inspected?.acquiredAt,
|
|
57711
|
-
waitHint
|
|
57712
|
-
} });
|
|
57713
|
-
}
|
|
57714
|
-
const remainingMs = Math.max(1, deadline - Date.now());
|
|
57715
|
-
await setTimeout$1(Math.min(delayMs, remainingMs), void 0, { signal: options.signal });
|
|
57716
|
-
delayMs = Math.min(LOCK_WAIT_MAX_MS, delayMs * 2);
|
|
57717
|
-
}
|
|
57718
|
-
} catch (error) {
|
|
57719
|
-
releaseLocalSlot?.();
|
|
57720
|
-
releaseLocalSlot = void 0;
|
|
57721
|
-
options.signal?.throwIfAborted();
|
|
57722
|
-
if (error instanceof StorageError) throw error;
|
|
57723
|
-
throw toStorageIoError(error, {
|
|
57724
|
-
path: lockPath,
|
|
57725
|
-
op: "lock"
|
|
57726
|
-
});
|
|
57727
|
-
}
|
|
57728
|
-
}
|
|
57729
|
-
function formatProcessStart(value) {
|
|
57730
|
-
return value === void 0 || !Number.isFinite(value) ? "unknown" : new Date(value).toISOString();
|
|
57731
|
-
}
|
|
57732
|
-
var FileLock = class {
|
|
57733
|
-
lockPath;
|
|
57734
|
-
leaseMs;
|
|
57735
|
-
renewIntervalMs;
|
|
57736
|
-
owner;
|
|
57737
|
-
dirMode;
|
|
57738
|
-
fileMode;
|
|
57739
|
-
signal;
|
|
57740
|
-
provedAt = /* @__PURE__ */ new Map();
|
|
57741
|
-
token = "";
|
|
57742
|
-
workerBeacon;
|
|
57743
|
-
acquiredAt = 0;
|
|
57744
|
-
held = false;
|
|
57745
|
-
watchPath;
|
|
57746
|
-
renewTimer;
|
|
57747
|
-
serialized = Promise.resolve();
|
|
57748
|
-
constructor(lockPath, options, modes) {
|
|
57749
|
-
this.lockPath = lockPath;
|
|
57750
|
-
this.leaseMs = Math.max(1e3, options.leaseMs ?? DEFAULT_LEASE_MS);
|
|
57751
|
-
this.renewIntervalMs = Math.max(250, Math.min(options.renewIntervalMs ?? DEFAULT_RENEW_INTERVAL_MS, this.leaseMs / 2));
|
|
57752
|
-
this.owner = options.owner;
|
|
57753
|
-
this.signal = options.signal;
|
|
57754
|
-
this.dirMode = modes.dirMode;
|
|
57755
|
-
this.fileMode = modes.fileMode;
|
|
57756
|
-
}
|
|
57757
|
-
acquire() {
|
|
57758
|
-
return this.runExclusive(() => this.acquireOnce());
|
|
57759
|
-
}
|
|
57760
|
-
release() {
|
|
57761
|
-
return this.runExclusive(async () => {
|
|
57762
|
-
if (!this.held) return;
|
|
57763
|
-
this.stopHeartbeat();
|
|
57764
|
-
try {
|
|
57765
|
-
if ((await this.inspect())?.mine === true) await unlink(this.lockPath).catch((error) => {
|
|
57766
|
-
if (error.code !== "ENOENT") onUnexpectedError(error);
|
|
57767
|
-
});
|
|
57768
|
-
} finally {
|
|
57769
|
-
await this.removeWatch();
|
|
57770
|
-
this.held = false;
|
|
57771
|
-
HELD.delete(this);
|
|
57772
|
-
}
|
|
57773
|
-
});
|
|
57774
|
-
}
|
|
57775
|
-
releaseSync() {
|
|
57776
|
-
if (!this.held) return;
|
|
57777
|
-
this.stopHeartbeat();
|
|
57778
|
-
try {
|
|
57779
|
-
const parsed = JSON.parse(fsSync.readFileSync(this.lockPath, "utf8"));
|
|
57780
|
-
if (isPayload(parsed) && parsed.token === this.token) fsSync.unlinkSync(this.lockPath);
|
|
57781
|
-
} catch {}
|
|
57782
|
-
if (this.watchPath !== void 0) {
|
|
57783
|
-
try {
|
|
57784
|
-
fsSync.unlinkSync(this.watchPath);
|
|
57785
|
-
} catch {}
|
|
57786
|
-
this.watchPath = void 0;
|
|
57787
|
-
}
|
|
57788
|
-
this.held = false;
|
|
57789
|
-
HELD.delete(this);
|
|
57790
|
-
}
|
|
57791
|
-
async inspectOwner() {
|
|
57792
|
-
return (await this.inspect())?.payload;
|
|
57793
|
-
}
|
|
57794
|
-
async isActive() {
|
|
57795
|
-
const current = await this.inspect();
|
|
57796
|
-
if (current === null) return false;
|
|
57797
|
-
if (current.payload !== void 0) return current.active;
|
|
57798
|
-
return this.hasLiveForeignWatch();
|
|
57799
|
-
}
|
|
57800
|
-
async reapIfDead() {
|
|
57801
|
-
const seen = await this.inspect();
|
|
57802
|
-
if (seen === null || seen.active) return false;
|
|
57803
|
-
this.workerBeacon = await ensureLocalWorkerBeacon();
|
|
57804
|
-
this.token = `${process.pid}:${randomUUID()}`;
|
|
57805
|
-
this.acquiredAt = Date.now();
|
|
57806
|
-
await this.publishWatch(true);
|
|
57807
|
-
try {
|
|
57808
|
-
if (await this.hasLiveForeignWatch()) return false;
|
|
57809
|
-
const current = await this.inspect();
|
|
57810
|
-
if (current?.active !== false || current.payload?.token !== seen.payload?.token || current.malformedText !== seen.malformedText) return false;
|
|
57811
|
-
try {
|
|
57812
|
-
await unlink(this.lockPath);
|
|
57813
|
-
return true;
|
|
57814
|
-
} catch (error) {
|
|
57815
|
-
if (error.code === "ENOENT") return false;
|
|
57816
|
-
throw error;
|
|
57817
|
-
}
|
|
57818
|
-
} finally {
|
|
57819
|
-
await this.removeWatch();
|
|
57820
|
-
}
|
|
57821
|
-
}
|
|
57822
|
-
async acquireOnce() {
|
|
57823
|
-
for (let attempt = 0;; attempt += 1) try {
|
|
57824
|
-
return await this.acquireAttempt();
|
|
57825
|
-
} catch (error) {
|
|
57826
|
-
if (attempt >= TRANSIENT_DENIAL_RETRIES || !isTransientAccessDenial(error)) throw error;
|
|
57827
|
-
await setTimeout$1(TRANSIENT_DENIAL_DELAY_MS * (attempt + 1), void 0, { signal: this.signal });
|
|
57828
|
-
}
|
|
57829
|
-
}
|
|
57830
|
-
async acquireAttempt() {
|
|
57831
|
-
this.signal?.throwIfAborted();
|
|
57832
|
-
if (this.held) return true;
|
|
57833
|
-
hookExit();
|
|
57834
|
-
this.workerBeacon = await ensureLocalWorkerBeacon();
|
|
57835
|
-
this.token = `${process.pid}:${threadId}:${randomUUID()}`;
|
|
57836
|
-
this.acquiredAt = Date.now();
|
|
57837
|
-
await mkdir(dirname$2(this.lockPath), {
|
|
57838
|
-
recursive: true,
|
|
57839
|
-
mode: this.dirMode
|
|
57840
|
-
});
|
|
57841
|
-
await this.publishWatch();
|
|
57842
|
-
try {
|
|
57843
|
-
for (let attempt = 0; attempt < 3; attempt += 1) {
|
|
57844
|
-
this.signal?.throwIfAborted();
|
|
57845
|
-
if (await this.tryCreate()) return true;
|
|
57846
|
-
if (attempt === 0) await this.reapDeadWatches();
|
|
57847
|
-
const seen = await this.inspect(this.signal);
|
|
57848
|
-
if (seen === null) continue;
|
|
57849
|
-
if (seen.active) return false;
|
|
57850
|
-
if (await this.takeOver()) return true;
|
|
57851
|
-
}
|
|
57852
|
-
return false;
|
|
57853
|
-
} finally {
|
|
57854
|
-
if (!this.held) await this.removeWatch();
|
|
57855
|
-
}
|
|
57856
|
-
}
|
|
57857
|
-
async publishWatch(reaping = false) {
|
|
57858
|
-
const watchPath = `${this.lockPath}.watch-${process.pid}-${randomUUID()}${reaping ? ".reap" : ""}`;
|
|
57859
|
-
const tempPath = `${this.lockPath}.tmp-${process.pid}-${nextSidecarSequence()}`;
|
|
57860
|
-
try {
|
|
57861
|
-
await writeFile(tempPath, this.payloadText(), { mode: this.fileMode });
|
|
57862
|
-
if (preferDirectExclusiveCreate()) await rename(tempPath, watchPath);
|
|
57863
|
-
else try {
|
|
57864
|
-
await link(tempPath, watchPath);
|
|
57865
|
-
} catch (error) {
|
|
57866
|
-
if (!isHardLinkUnsupported(error)) throw error;
|
|
57867
|
-
await rename(tempPath, watchPath);
|
|
57868
|
-
}
|
|
57869
|
-
this.watchPath = watchPath;
|
|
57870
|
-
} finally {
|
|
57871
|
-
await unlink(tempPath).catch(() => void 0);
|
|
57872
|
-
}
|
|
57873
|
-
}
|
|
57874
|
-
async removeWatch() {
|
|
57875
|
-
if (this.watchPath === void 0) return;
|
|
57876
|
-
await unlink(this.watchPath).catch(() => void 0);
|
|
57877
|
-
this.watchPath = void 0;
|
|
57878
|
-
}
|
|
57879
|
-
async tryCreate() {
|
|
57880
|
-
if (preferDirectExclusiveCreate()) return this.tryCreateDirect();
|
|
57881
|
-
const tempPath = `${this.lockPath}.tmp-${process.pid}-${nextSidecarSequence()}`;
|
|
57882
|
-
try {
|
|
57883
|
-
await writeFile(tempPath, this.payloadText(), { mode: this.fileMode });
|
|
57884
|
-
await link(tempPath, this.lockPath);
|
|
57885
|
-
this.markHeld();
|
|
57886
|
-
return true;
|
|
57887
|
-
} catch (error) {
|
|
57888
|
-
if (error.code === "EEXIST") return false;
|
|
57889
|
-
if (isHardLinkUnsupported(error)) return this.tryCreateDirect();
|
|
57890
|
-
throw error;
|
|
57891
|
-
} finally {
|
|
57892
|
-
await unlink(tempPath).catch(() => void 0);
|
|
57893
|
-
}
|
|
57894
|
-
}
|
|
57895
|
-
async tryCreateDirect() {
|
|
57896
|
-
let handle;
|
|
57897
|
-
try {
|
|
57898
|
-
handle = await open(this.lockPath, "wx", this.fileMode);
|
|
57899
|
-
} catch (error) {
|
|
57900
|
-
if (error.code === "EEXIST") return false;
|
|
57901
|
-
throw error;
|
|
57902
|
-
}
|
|
57903
|
-
try {
|
|
57904
|
-
await handle.writeFile(this.payloadText());
|
|
57905
|
-
} catch (writeError) {
|
|
57906
|
-
await handle.close().catch(() => void 0);
|
|
57907
|
-
await unlink(this.lockPath).catch(() => void 0);
|
|
57908
|
-
throw writeError;
|
|
57909
|
-
}
|
|
57910
|
-
await handle.close();
|
|
57911
|
-
this.markHeld();
|
|
57912
|
-
return true;
|
|
57913
|
-
}
|
|
57914
|
-
async takeOver() {
|
|
57915
|
-
const bidPath = `${this.lockPath}.bid-${process.pid}-${nextSidecarSequence()}`;
|
|
57916
|
-
const startedAt = Date.now();
|
|
57917
|
-
let renamed = false;
|
|
57918
|
-
try {
|
|
57919
|
-
await writeFile(bidPath, this.payloadText(), { mode: this.fileMode });
|
|
57920
|
-
for (let attempt = 0;; attempt += 1) {
|
|
57921
|
-
this.signal?.throwIfAborted();
|
|
57922
|
-
const gate = await this.inspect(this.signal);
|
|
57923
|
-
if (gate === null || gate.active || gate.mine) return false;
|
|
57924
|
-
if (await this.hasLiveForeignWatch(gate.payload?.token)) return false;
|
|
57925
|
-
this.signal?.throwIfAborted();
|
|
57926
|
-
try {
|
|
57927
|
-
await rename(bidPath, this.lockPath);
|
|
57928
|
-
renamed = true;
|
|
57929
|
-
break;
|
|
57930
|
-
} catch (error) {
|
|
57931
|
-
const code = error.code;
|
|
57932
|
-
if (code === "EPERM" && process.platform === "win32" && attempt < 50) {
|
|
57933
|
-
await setTimeout$1(20 + Math.floor(Math.random() * 30), void 0, { signal: this.signal });
|
|
57934
|
-
continue;
|
|
57935
|
-
}
|
|
57936
|
-
if (code === "EEXIST" || code === "EPERM") return false;
|
|
57937
|
-
throw error;
|
|
57938
|
-
}
|
|
57939
|
-
}
|
|
57940
|
-
let settleMs = Math.min(TAKEOVER_SETTLE_MAX_MS, Math.max(TAKEOVER_SETTLE_BASE_MS, (Date.now() - startedAt) * 4));
|
|
57941
|
-
for (;;) {
|
|
57942
|
-
await setTimeout$1(settleMs, void 0, { signal: this.signal });
|
|
57943
|
-
if ((await this.inspect(this.signal))?.mine !== true) return false;
|
|
57944
|
-
if (!await this.hasLiveForeignWatch()) break;
|
|
57945
|
-
settleMs = Math.min(TAKEOVER_SETTLE_MAX_MS, settleMs * 2);
|
|
57946
|
-
}
|
|
57947
|
-
this.signal?.throwIfAborted();
|
|
57948
|
-
this.markHeld();
|
|
57949
|
-
return true;
|
|
57950
|
-
} finally {
|
|
57951
|
-
if (renamed && !this.held && (await this.readPayload(this.lockPath))?.token === this.token) await unlink(this.lockPath).catch((error) => {
|
|
57952
|
-
if (error.code !== "ENOENT") throw error;
|
|
57953
|
-
});
|
|
57954
|
-
await unlink(bidPath).catch(() => void 0);
|
|
57955
|
-
}
|
|
57956
|
-
}
|
|
57957
|
-
async inspect(signal) {
|
|
57958
|
-
let raw;
|
|
57959
|
-
try {
|
|
57960
|
-
const handle = await open(this.lockPath, "r");
|
|
57961
|
-
try {
|
|
57962
|
-
raw = await handle.readFile("utf8");
|
|
57963
|
-
} finally {
|
|
57964
|
-
await handle.close();
|
|
57965
|
-
}
|
|
57966
|
-
} catch (error) {
|
|
57967
|
-
if (error.code === "ENOENT") return null;
|
|
57968
|
-
throw error;
|
|
57969
|
-
}
|
|
57970
|
-
let payload;
|
|
57971
|
-
try {
|
|
57972
|
-
const parsed = JSON.parse(raw);
|
|
57973
|
-
if (isPayload(parsed)) payload = parsed;
|
|
57974
|
-
} catch {}
|
|
57975
|
-
if (payload === void 0) return {
|
|
57976
|
-
malformedText: raw,
|
|
57977
|
-
active: false,
|
|
57978
|
-
mine: false
|
|
57979
|
-
};
|
|
57980
|
-
return {
|
|
57981
|
-
payload,
|
|
57982
|
-
active: await ownerProcessAlive(payload, signal, this.provedAt),
|
|
57983
|
-
mine: payload.token === this.token
|
|
57984
|
-
};
|
|
57985
|
-
}
|
|
57986
|
-
async reapDeadWatches() {
|
|
57987
|
-
const directory = dirname$2(this.lockPath);
|
|
57988
|
-
const prefix = `${basename$2(this.lockPath)}.watch-`;
|
|
57989
|
-
for (const entry of await readdir(directory)) {
|
|
57990
|
-
if (!entry.startsWith(prefix)) continue;
|
|
57991
|
-
const watchPath = join$2(directory, entry);
|
|
57992
|
-
if (!await this.watchIsActive(watchPath)) await unlink(watchPath).catch(() => void 0);
|
|
57993
|
-
}
|
|
57994
|
-
}
|
|
57995
|
-
async hasLiveForeignWatch(ownerToken) {
|
|
57996
|
-
const directory = dirname$2(this.lockPath);
|
|
57997
|
-
const prefix = `${basename$2(this.lockPath)}.watch-`;
|
|
57998
|
-
for (const entry of await readdir(directory)) {
|
|
57999
|
-
if (!entry.startsWith(prefix)) continue;
|
|
58000
|
-
const watchPath = join$2(directory, entry);
|
|
58001
|
-
const payload = await this.readPayload(watchPath);
|
|
58002
|
-
if (payload?.token === this.token) continue;
|
|
58003
|
-
if (ownerToken !== void 0 && payload?.token !== ownerToken && !entry.endsWith(".reap")) continue;
|
|
58004
|
-
if (await this.watchIsActive(watchPath, payload)) return true;
|
|
58005
|
-
await unlink(watchPath).catch(() => void 0);
|
|
58006
|
-
}
|
|
58007
|
-
return false;
|
|
58008
|
-
}
|
|
58009
|
-
async watchIsActive(watchPath, knownPayload) {
|
|
58010
|
-
try {
|
|
58011
|
-
const payload = knownPayload ?? await this.readPayload(watchPath);
|
|
58012
|
-
await stat$1(watchPath);
|
|
58013
|
-
if (payload !== void 0) return await ownerProcessAlive(payload, this.signal, this.provedAt);
|
|
58014
|
-
const entry = basename$2(watchPath);
|
|
58015
|
-
const prefix = `${basename$2(this.lockPath)}.watch-`;
|
|
58016
|
-
const namedPid = Number(entry.slice(prefix.length).split("-")[0]);
|
|
58017
|
-
return !Number.isSafeInteger(namedPid) || namedPid <= 0 || pidAlive(namedPid);
|
|
58018
|
-
} catch (error) {
|
|
58019
|
-
if (error.code === "ENOENT") return false;
|
|
58020
|
-
throw error;
|
|
58021
|
-
}
|
|
58022
|
-
}
|
|
58023
|
-
async readPayload(path) {
|
|
58024
|
-
try {
|
|
58025
|
-
const parsed = JSON.parse(await readFile(path, "utf8"));
|
|
58026
|
-
return isPayload(parsed) ? parsed : void 0;
|
|
58027
|
-
} catch (error) {
|
|
58028
|
-
if (error.code === "ENOENT") return void 0;
|
|
58029
|
-
return;
|
|
58030
|
-
}
|
|
58031
|
-
}
|
|
58032
|
-
markHeld() {
|
|
58033
|
-
this.held = true;
|
|
58034
|
-
HELD.add(this);
|
|
58035
|
-
hookExit();
|
|
58036
|
-
this.renewTimer = setInterval(() => {
|
|
58037
|
-
this.renew().catch(() => void 0);
|
|
58038
|
-
}, this.renewIntervalMs);
|
|
58039
|
-
this.renewTimer.unref?.();
|
|
58040
|
-
}
|
|
58041
|
-
renew() {
|
|
58042
|
-
return this.runExclusive(async () => {
|
|
58043
|
-
if (!this.held) return;
|
|
58044
|
-
if ((await this.inspect())?.mine !== true) {
|
|
58045
|
-
this.stopHeartbeat();
|
|
58046
|
-
await this.removeWatch();
|
|
58047
|
-
this.held = false;
|
|
58048
|
-
HELD.delete(this);
|
|
58049
|
-
return;
|
|
58050
|
-
}
|
|
58051
|
-
const now = /* @__PURE__ */ new Date();
|
|
58052
|
-
await utimes(this.lockPath, now, now);
|
|
58053
|
-
});
|
|
58054
|
-
}
|
|
58055
|
-
stopHeartbeat() {
|
|
58056
|
-
if (this.renewTimer === void 0) return;
|
|
58057
|
-
clearInterval(this.renewTimer);
|
|
58058
|
-
this.renewTimer = void 0;
|
|
58059
|
-
}
|
|
58060
|
-
payloadText() {
|
|
58061
|
-
const payload = {
|
|
58062
|
-
version: 1,
|
|
58063
|
-
pid: process.pid,
|
|
58064
|
-
threadId,
|
|
58065
|
-
workerBeacon: this.workerBeacon,
|
|
58066
|
-
processStartedAt: PROCESS_STARTED_AT,
|
|
58067
|
-
token: this.token,
|
|
58068
|
-
acquiredAt: this.acquiredAt,
|
|
58069
|
-
leaseMs: this.leaseMs,
|
|
58070
|
-
owner: this.owner
|
|
58071
|
-
};
|
|
58072
|
-
return JSON.stringify(payload);
|
|
58073
|
-
}
|
|
58074
|
-
runExclusive(operation) {
|
|
58075
|
-
const result = this.serialized.then(operation, operation);
|
|
58076
|
-
this.serialized = result.then(() => void 0, () => void 0);
|
|
58077
|
-
return result;
|
|
58078
|
-
}
|
|
58079
|
-
};
|
|
58080
|
-
|
|
58081
|
-
//#endregion
|
|
58082
|
-
//#region ../../packages/agent-core-v2/src/persistence/backends/node-fs/fileStorageService.ts
|
|
58083
|
-
const storagePath = process.platform === "win32" ? dist_exports : posix;
|
|
58084
|
-
const basename$1 = (value) => storagePath.basename(value);
|
|
58085
|
-
const dirname$1 = (value) => storagePath.dirname(value);
|
|
58086
|
-
const join$1 = (...parts) => storagePath.join(...parts);
|
|
58087
|
-
const normalize = (value) => storagePath.normalize(value);
|
|
58088
|
-
const WATCH_DEBOUNCE_MS = 150;
|
|
58089
|
-
const TORN_READ_RETRIES = 3;
|
|
58090
|
-
const TORN_READ_RETRY_DELAY_MS = 15;
|
|
58091
|
-
const TRANSIENT_OPEN_ATTEMPTS = 4;
|
|
58092
|
-
const TRANSIENT_OPEN_DELAY_MS = 10;
|
|
58093
|
-
const TRANSIENT_OPEN_CODES = new Set([
|
|
58094
|
-
"EBUSY",
|
|
58095
|
-
"EPERM",
|
|
58096
|
-
"EACCES"
|
|
58097
|
-
]);
|
|
58098
|
-
function delay(ms) {
|
|
58099
|
-
return new Promise((resolve) => {
|
|
58100
|
-
setTimeout(resolve, ms).unref?.();
|
|
58101
|
-
});
|
|
58102
|
-
}
|
|
58103
|
-
/** Retries only the open itself. A later write, sync, or close is not repeated. */
|
|
58104
|
-
async function openAppendAfterTransientDenial(openFile, attempts = TRANSIENT_OPEN_ATTEMPTS, delayMs = TRANSIENT_OPEN_DELAY_MS) {
|
|
58105
|
-
let last;
|
|
58106
|
-
for (let attempt = 0; attempt < attempts; attempt += 1) try {
|
|
58107
|
-
return await openFile();
|
|
58108
|
-
} catch (error) {
|
|
58109
|
-
last = error;
|
|
58110
|
-
const code = error.code;
|
|
58111
|
-
if (code === void 0 || !TRANSIENT_OPEN_CODES.has(code) || attempt === attempts - 1) throw error;
|
|
58112
|
-
if (delayMs > 0) await delay(delayMs);
|
|
58113
|
-
}
|
|
58114
|
-
throw last;
|
|
58115
|
-
}
|
|
58116
|
-
function isEnoent(error) {
|
|
58117
|
-
return error.code === "ENOENT";
|
|
58118
|
-
}
|
|
58119
|
-
const TEMP_SUFFIX_PATTERN = /^(\d+)\.[0-9a-f]+(\.ready)?$/;
|
|
58120
|
-
async function scanOrphanedTempFiles(filePath) {
|
|
58121
|
-
const dir = dirname$1(filePath);
|
|
58122
|
-
const prefix = `${basename$1(filePath)}.tmp.`;
|
|
58123
|
-
const ready = [];
|
|
58124
|
-
const incomplete = [];
|
|
58125
|
-
let entries;
|
|
58126
|
-
try {
|
|
58127
|
-
entries = await readdir(dir);
|
|
58128
|
-
} catch (error) {
|
|
58129
|
-
if (isEnoent(error)) return {
|
|
58130
|
-
writerAlive: false,
|
|
58131
|
-
ready,
|
|
58132
|
-
incomplete
|
|
58133
|
-
};
|
|
58134
|
-
throw error;
|
|
58135
|
-
}
|
|
58136
|
-
let writerAlive = false;
|
|
58137
|
-
for (const entry of entries) {
|
|
58138
|
-
if (!entry.startsWith(prefix)) continue;
|
|
58139
|
-
const match = TEMP_SUFFIX_PATTERN.exec(entry.slice(prefix.length));
|
|
58140
|
-
if (match === null) continue;
|
|
58141
|
-
if (isPidAlive(Number(match[1]))) {
|
|
58142
|
-
writerAlive = true;
|
|
58143
|
-
continue;
|
|
58144
|
-
}
|
|
58145
|
-
const path = join$1(dir, entry);
|
|
58146
|
-
if (match[2] === ".ready") ready.push(path);
|
|
58147
|
-
else incomplete.push(path);
|
|
58148
|
-
}
|
|
58149
|
-
return {
|
|
58150
|
-
writerAlive,
|
|
58151
|
-
ready,
|
|
58152
|
-
incomplete
|
|
58153
|
-
};
|
|
58154
|
-
}
|
|
58155
|
-
async function unlinkIfPresent(path) {
|
|
58156
|
-
try {
|
|
58157
|
-
await unlink(path);
|
|
58158
|
-
} catch (error) {
|
|
58159
|
-
if (!isEnoent(error)) throw error;
|
|
58160
|
-
}
|
|
58161
|
-
}
|
|
58162
|
-
async function recoverOrphanedTempFile(filePath) {
|
|
58163
|
-
let orphans;
|
|
58164
|
-
try {
|
|
58165
|
-
orphans = await scanOrphanedTempFiles(filePath);
|
|
58166
|
-
} catch {
|
|
58167
|
-
return false;
|
|
58168
|
-
}
|
|
58169
|
-
if (orphans.writerAlive) return false;
|
|
58170
|
-
for (const path of orphans.incomplete) await unlinkIfPresent(path).catch(() => void 0);
|
|
58171
|
-
let newestReady;
|
|
58172
|
-
let newestReadyMtimeMs = -Infinity;
|
|
58173
|
-
for (const path of orphans.ready) {
|
|
58174
|
-
let mtimeMs;
|
|
58175
|
-
try {
|
|
58176
|
-
mtimeMs = (await stat$1(path)).mtimeMs;
|
|
58177
|
-
} catch {
|
|
58178
|
-
continue;
|
|
58179
|
-
}
|
|
58180
|
-
if (mtimeMs > newestReadyMtimeMs) {
|
|
58181
|
-
newestReady = path;
|
|
58182
|
-
newestReadyMtimeMs = mtimeMs;
|
|
58183
|
-
}
|
|
58184
|
-
}
|
|
58185
|
-
if (newestReady === void 0) return false;
|
|
58186
|
-
try {
|
|
58187
|
-
await rename(newestReady, filePath);
|
|
58188
|
-
return true;
|
|
58189
|
-
} catch {
|
|
58190
|
-
return false;
|
|
58191
|
-
}
|
|
58192
|
-
}
|
|
58193
|
-
async function removeOrphanedTempFiles(filePath) {
|
|
58194
|
-
const orphans = await scanOrphanedTempFiles(filePath);
|
|
58195
|
-
for (const path of [...orphans.ready, ...orphans.incomplete]) await unlinkIfPresent(path);
|
|
58196
|
-
}
|
|
58197
|
-
function isPidAlive(pid) {
|
|
58198
|
-
if (pid === process.pid) return true;
|
|
58199
|
-
try {
|
|
58200
|
-
process.kill(pid, 0);
|
|
58201
|
-
return true;
|
|
58202
|
-
} catch (error) {
|
|
58203
|
-
return error.code === "EPERM";
|
|
58204
|
-
}
|
|
58205
|
-
}
|
|
58206
|
-
function isSimpleRelativeSegment(segment) {
|
|
58207
|
-
if (segment.length === 0 || segment === ".") return false;
|
|
58208
|
-
if (segment.charCodeAt(0) === 47 || segment.charCodeAt(0) === 92) return false;
|
|
58209
|
-
if (segment.includes("\\") || segment.includes("..") || segment.includes("//") || segment.startsWith("./") || segment.includes("/.")) return false;
|
|
58210
|
-
if (segment.endsWith("/")) return false;
|
|
58211
|
-
return true;
|
|
58212
|
-
}
|
|
58213
|
-
var FileStorageService = class {
|
|
58214
|
-
baseDir;
|
|
58215
|
-
dirMode;
|
|
58216
|
-
fileMode;
|
|
58217
|
-
recoverMissingDocuments;
|
|
58218
|
-
openAppend;
|
|
58219
|
-
syncedDirs = /* @__PURE__ */ new Set();
|
|
58220
|
-
normalizedBaseDir;
|
|
58221
|
-
constructor(baseDir, dirMode, fileMode, recoverMissingDocuments = true, openAppend) {
|
|
58222
|
-
this.baseDir = baseDir;
|
|
58223
|
-
this.dirMode = dirMode;
|
|
58224
|
-
this.fileMode = fileMode;
|
|
58225
|
-
this.recoverMissingDocuments = recoverMissingDocuments;
|
|
58226
|
-
this.openAppend = openAppend;
|
|
58227
|
-
this.normalizedBaseDir = join$1(baseDir);
|
|
58228
|
-
}
|
|
58229
|
-
async read(scope, key, options = {}) {
|
|
58230
|
-
const filePath = this.pathFor(scope, key);
|
|
58231
|
-
for (let attempt = 0;; attempt += 1) {
|
|
58232
|
-
let bytes;
|
|
58233
|
-
try {
|
|
58234
|
-
bytes = await readFile(filePath);
|
|
58235
|
-
} catch (error) {
|
|
58236
|
-
if (!isEnoent(error)) throw toStorageIoError(error, {
|
|
58237
|
-
path: filePath,
|
|
58238
|
-
op: "read"
|
|
58239
|
-
});
|
|
58240
|
-
if (!this.recoverMissingDocuments || options.recoverMissing === false) return void 0;
|
|
58241
|
-
if (!await recoverOrphanedTempFile(filePath)) return void 0;
|
|
58242
|
-
continue;
|
|
58243
|
-
}
|
|
58244
|
-
if (attempt >= TORN_READ_RETRIES) return bytes;
|
|
58245
|
-
let size;
|
|
58246
|
-
try {
|
|
58247
|
-
size = (await stat$1(filePath)).size;
|
|
58248
|
-
} catch {
|
|
58249
|
-
size = void 0;
|
|
58250
|
-
}
|
|
58251
|
-
if (size === void 0 || size === bytes.length) return bytes;
|
|
58252
|
-
await new Promise((resolve) => setTimeout(resolve, TORN_READ_RETRY_DELAY_MS));
|
|
58253
|
-
}
|
|
58254
|
-
}
|
|
58255
|
-
async *readStream(scope, key, range, options = {}) {
|
|
58256
|
-
const filePath = this.pathFor(scope, key);
|
|
58257
|
-
const stream = createReadStream(filePath, {
|
|
58258
|
-
start: range?.start,
|
|
58259
|
-
end: range?.end,
|
|
58260
|
-
signal: options.signal,
|
|
58261
|
-
highWaterMark: options.chunkBytes ?? 1024 * 1024
|
|
58262
|
-
});
|
|
58263
|
-
try {
|
|
58264
|
-
for await (const chunk of stream) yield chunk;
|
|
58265
|
-
} catch (error) {
|
|
58266
|
-
options.signal?.throwIfAborted();
|
|
58267
|
-
if (isEnoent(error)) return;
|
|
58268
|
-
throw toStorageIoError(error, {
|
|
58269
|
-
path: filePath,
|
|
58270
|
-
op: "read"
|
|
58271
|
-
});
|
|
58272
|
-
}
|
|
58273
|
-
}
|
|
58274
|
-
async write(scope, key, data, options = {}) {
|
|
58275
|
-
const filePath = this.pathFor(scope, key);
|
|
58276
|
-
const dir = dirname$1(filePath);
|
|
58277
|
-
try {
|
|
58278
|
-
if (!this.syncedDirs.has(dir)) await mkdir(dir, {
|
|
58279
|
-
recursive: true,
|
|
58280
|
-
mode: this.dirMode
|
|
58281
|
-
});
|
|
58282
|
-
try {
|
|
58283
|
-
await atomicWrite(filePath, data, void 0, this.fileMode, options.signal, options.preserveDestinationOnError === true);
|
|
58284
|
-
} catch (error) {
|
|
58285
|
-
if (!isEnoent(error)) throw error;
|
|
58286
|
-
this.syncedDirs.delete(dir);
|
|
58287
|
-
await mkdir(dir, {
|
|
58288
|
-
recursive: true,
|
|
58289
|
-
mode: this.dirMode
|
|
58290
|
-
});
|
|
58291
|
-
await atomicWrite(filePath, data, void 0, this.fileMode, options.signal, options.preserveDestinationOnError === true);
|
|
58292
|
-
}
|
|
58293
|
-
await this.syncDirOnce(dir);
|
|
58294
|
-
} catch (error) {
|
|
58295
|
-
options.signal?.throwIfAborted();
|
|
58296
|
-
throw toStorageIoError(error, {
|
|
58297
|
-
path: filePath,
|
|
58298
|
-
op: "write"
|
|
58299
|
-
});
|
|
58300
|
-
}
|
|
58301
|
-
}
|
|
58302
|
-
async writeStream(scope, key, source, options = {}) {
|
|
58303
|
-
const filePath = this.pathFor(scope, key);
|
|
58304
|
-
const dir = dirname$1(filePath);
|
|
58305
|
-
try {
|
|
58306
|
-
if (!this.syncedDirs.has(dir)) await mkdir(dir, {
|
|
58307
|
-
recursive: true,
|
|
58308
|
-
mode: this.dirMode
|
|
58309
|
-
});
|
|
58310
|
-
await atomicWriteStream(filePath, source, this.fileMode, options.signal, options.preserveDestinationOnError === true);
|
|
58311
|
-
await this.syncDirOnce(dir);
|
|
58312
|
-
} catch (error) {
|
|
58313
|
-
options.signal?.throwIfAborted();
|
|
58314
|
-
throw toStorageIoError(error, {
|
|
58315
|
-
path: filePath,
|
|
58316
|
-
op: "write"
|
|
58317
|
-
});
|
|
58318
|
-
}
|
|
58319
|
-
}
|
|
58320
|
-
async append(scope, key, data, options = {}) {
|
|
58321
|
-
const filePath = this.pathFor(scope, key);
|
|
58322
|
-
const dir = dirname$1(filePath);
|
|
58323
|
-
let committed = false;
|
|
58324
|
-
try {
|
|
58325
|
-
if (!this.syncedDirs.has(dir)) await mkdir(dir, {
|
|
58326
|
-
recursive: true,
|
|
58327
|
-
mode: this.dirMode
|
|
58328
|
-
});
|
|
58329
|
-
const openTarget = () => this.openAppend === void 0 ? open(filePath, "a", this.fileMode) : this.openAppend(filePath);
|
|
58330
|
-
let fh;
|
|
58331
|
-
try {
|
|
58332
|
-
fh = await openAppendAfterTransientDenial(openTarget);
|
|
58333
|
-
} catch (error) {
|
|
58334
|
-
if (!isEnoent(error)) throw error;
|
|
58335
|
-
this.syncedDirs.delete(dir);
|
|
58336
|
-
await mkdir(dir, {
|
|
58337
|
-
recursive: true,
|
|
58338
|
-
mode: this.dirMode
|
|
58339
|
-
});
|
|
58340
|
-
fh = await openAppendAfterTransientDenial(openTarget);
|
|
58341
|
-
}
|
|
58342
|
-
try {
|
|
58343
|
-
if (data.byteLength > 0) {
|
|
58344
|
-
committed = true;
|
|
58345
|
-
await fh.writeFile(data);
|
|
58346
|
-
}
|
|
58347
|
-
if (options.durable !== false) await fh.sync();
|
|
58348
|
-
} finally {
|
|
58349
|
-
await fh.close();
|
|
58350
|
-
}
|
|
58351
|
-
await this.syncDirOnce(dir);
|
|
58352
|
-
} catch (error) {
|
|
58353
|
-
throw toStorageIoError(error, {
|
|
58354
|
-
path: filePath,
|
|
58355
|
-
op: "append",
|
|
58356
|
-
committed
|
|
58357
|
-
});
|
|
58358
|
-
}
|
|
58359
|
-
}
|
|
58360
|
-
acquireLock(scope, key, options = {}) {
|
|
58361
|
-
return acquireFileLock(this.pathFor(scope, key), options, {
|
|
58362
|
-
dirMode: this.dirMode,
|
|
58363
|
-
fileMode: this.fileMode
|
|
58364
|
-
});
|
|
58365
|
-
}
|
|
58366
|
-
async list(scope, prefix) {
|
|
58367
|
-
let entries;
|
|
58368
|
-
try {
|
|
58369
|
-
entries = await readdir(this.scopePath(scope));
|
|
58370
|
-
} catch (error) {
|
|
58371
|
-
if (isEnoent(error)) return [];
|
|
58372
|
-
throw toStorageIoError(error, {
|
|
58373
|
-
path: this.scopePath(scope),
|
|
58374
|
-
op: "list"
|
|
58375
|
-
});
|
|
58376
|
-
}
|
|
58377
|
-
return prefix === void 0 ? entries : entries.filter((entry) => entry.startsWith(prefix));
|
|
58378
|
-
}
|
|
58379
|
-
async delete(scope, key) {
|
|
58380
|
-
const filePath = this.pathFor(scope, key);
|
|
58381
|
-
try {
|
|
58382
|
-
if (this.recoverMissingDocuments) await removeOrphanedTempFiles(filePath);
|
|
58383
|
-
await unlink(filePath);
|
|
58384
|
-
} catch (error) {
|
|
58385
|
-
if (isEnoent(error)) return;
|
|
58386
|
-
throw toStorageIoError(error, {
|
|
58387
|
-
path: filePath,
|
|
58388
|
-
op: "delete"
|
|
58389
|
-
});
|
|
58390
|
-
}
|
|
58391
|
-
}
|
|
58392
|
-
async moveDirectory(sourceScope, targetScope) {
|
|
58393
|
-
const source = this.scopePath(sourceScope);
|
|
58394
|
-
const target = this.scopePath(targetScope);
|
|
58395
|
-
try {
|
|
58396
|
-
await mkdir(dirname$1(target), {
|
|
58397
|
-
recursive: true,
|
|
58398
|
-
mode: this.dirMode
|
|
58399
|
-
});
|
|
58400
|
-
try {
|
|
58401
|
-
await stat$1(target);
|
|
58402
|
-
throw new Error("target session directory already exists");
|
|
58403
|
-
} catch (error) {
|
|
58404
|
-
if (!isEnoent(error)) throw error;
|
|
58405
|
-
}
|
|
58406
|
-
await rename(source, target);
|
|
58407
|
-
} catch (error) {
|
|
58408
|
-
throw toStorageIoError(error, {
|
|
58409
|
-
path: source,
|
|
58410
|
-
op: "moveDirectory"
|
|
58411
|
-
});
|
|
58412
|
-
}
|
|
58413
|
-
}
|
|
58414
|
-
async size(scope, key) {
|
|
58415
|
-
const filePath = this.pathFor(scope, key);
|
|
58416
|
-
try {
|
|
58417
|
-
return (await stat$1(filePath)).size;
|
|
58418
|
-
} catch (error) {
|
|
58419
|
-
if (isEnoent(error)) return void 0;
|
|
58420
|
-
throw toStorageIoError(error, {
|
|
58421
|
-
path: filePath,
|
|
58422
|
-
op: "stat"
|
|
58423
|
-
});
|
|
58424
|
-
}
|
|
58425
|
-
}
|
|
58426
|
-
async mtime(scope, key) {
|
|
58427
|
-
const filePath = this.pathFor(scope, key);
|
|
58428
|
-
try {
|
|
58429
|
-
return (await stat$1(filePath)).mtimeMs;
|
|
58430
|
-
} catch (error) {
|
|
58431
|
-
if (isEnoent(error)) return void 0;
|
|
58432
|
-
throw toStorageIoError(error, {
|
|
58433
|
-
path: filePath,
|
|
58434
|
-
op: "stat"
|
|
58435
|
-
});
|
|
58436
|
-
}
|
|
58437
|
-
}
|
|
58438
|
-
async statMeta(scope, key) {
|
|
58439
|
-
const filePath = this.pathFor(scope, key);
|
|
58440
|
-
try {
|
|
58441
|
-
const info = await stat$1(filePath);
|
|
58442
|
-
return {
|
|
58443
|
-
size: info.size,
|
|
58444
|
-
mtimeMs: info.mtimeMs
|
|
58445
|
-
};
|
|
58446
|
-
} catch (error) {
|
|
58447
|
-
if (isEnoent(error)) return void 0;
|
|
58448
|
-
throw toStorageIoError(error, {
|
|
58449
|
-
path: filePath,
|
|
58450
|
-
op: "stat"
|
|
58451
|
-
});
|
|
58452
|
-
}
|
|
58453
|
-
}
|
|
58454
|
-
async stat(scope, key) {
|
|
58455
|
-
const filePath = this.pathFor(scope, key);
|
|
58456
|
-
try {
|
|
58457
|
-
const info = await stat$1(filePath, { bigint: true });
|
|
58458
|
-
return {
|
|
58459
|
-
size: Number(info.size),
|
|
58460
|
-
identity: info.ino > 0n ? `${info.dev}:${info.ino}:${info.birthtimeNs}` : void 0,
|
|
58461
|
-
revision: `${info.mtimeNs}:${info.ctimeNs}`
|
|
58462
|
-
};
|
|
58463
|
-
} catch (error) {
|
|
58464
|
-
if (isEnoent(error)) return void 0;
|
|
58465
|
-
throw toStorageIoError(error, {
|
|
58466
|
-
path: filePath,
|
|
58467
|
-
op: "stat"
|
|
58468
|
-
});
|
|
58469
|
-
}
|
|
58470
|
-
}
|
|
58471
|
-
watch(scope, key) {
|
|
58472
|
-
const target = this.pathFor(scope, key);
|
|
58473
|
-
const dir = dirname$1(target);
|
|
58474
|
-
const normalizedTarget = normalize(target);
|
|
58475
|
-
const normalizedDir = normalize(dir);
|
|
58476
|
-
const emitter = new Emitter();
|
|
58477
|
-
let watcher;
|
|
58478
|
-
let timer;
|
|
58479
|
-
let refCount = 0;
|
|
58480
|
-
const schedule = () => {
|
|
58481
|
-
if (timer !== void 0) clearTimeout(timer);
|
|
58482
|
-
timer = setTimeout(() => emitter.fire(), WATCH_DEBOUNCE_MS);
|
|
58483
|
-
};
|
|
58484
|
-
const fingerprint = () => {
|
|
58485
|
-
try {
|
|
58486
|
-
const info = statSync(target, { bigint: true });
|
|
58487
|
-
return `${info.dev}:${info.ino}:${info.size}:${info.mtimeNs}:${info.ctimeNs}`;
|
|
58488
|
-
} catch (error) {
|
|
58489
|
-
if (isEnoent(error)) return void 0;
|
|
58490
|
-
onUnexpectedError(error);
|
|
58491
|
-
return null;
|
|
58492
|
-
}
|
|
58493
|
-
};
|
|
58494
|
-
const arm = () => {
|
|
58495
|
-
try {
|
|
58496
|
-
mkdirSync(dir, {
|
|
58497
|
-
recursive: true,
|
|
58498
|
-
mode: this.dirMode
|
|
58499
|
-
});
|
|
58500
|
-
const initial = fingerprint();
|
|
58501
|
-
const current = new FSWatcher({
|
|
58502
|
-
ignoreInitial: true,
|
|
58503
|
-
awaitWriteFinish: false,
|
|
58504
|
-
depth: 0,
|
|
58505
|
-
ignored: (changedPath) => {
|
|
58506
|
-
const normalized = normalize(changedPath);
|
|
58507
|
-
return normalized !== normalizedDir && normalized !== normalizedTarget;
|
|
58508
|
-
}
|
|
58509
|
-
});
|
|
58510
|
-
guardChokidarDeletedWatchSpin(current);
|
|
58511
|
-
watcher = current;
|
|
58512
|
-
current.on("all", (_event, changedPath) => {
|
|
58513
|
-
if (watcher === current && normalize(changedPath) === normalizedTarget) schedule();
|
|
58514
|
-
});
|
|
58515
|
-
current.once("ready", () => {
|
|
58516
|
-
if (watcher !== current) return;
|
|
58517
|
-
const latest = fingerprint();
|
|
58518
|
-
if (initial === null || latest === null || latest !== initial) schedule();
|
|
58519
|
-
});
|
|
58520
|
-
current.on("error", (error) => onUnexpectedError(error));
|
|
58521
|
-
current.add(dir);
|
|
58522
|
-
} catch (error) {
|
|
58523
|
-
onUnexpectedError(error);
|
|
58524
|
-
}
|
|
58525
|
-
};
|
|
58526
|
-
const disarm = () => {
|
|
58527
|
-
if (timer !== void 0) {
|
|
58528
|
-
clearTimeout(timer);
|
|
58529
|
-
timer = void 0;
|
|
58530
|
-
}
|
|
58531
|
-
const current = watcher;
|
|
58532
|
-
watcher = void 0;
|
|
58533
|
-
const closeResult = current?.close();
|
|
58534
|
-
if (closeResult !== void 0) closeResult.catch(() => void 0);
|
|
58535
|
-
};
|
|
58536
|
-
return (listener, thisArg, disposables) => {
|
|
58537
|
-
if (refCount === 0) arm();
|
|
58538
|
-
refCount++;
|
|
58539
|
-
const subscription = emitter.event(listener, thisArg);
|
|
58540
|
-
let tornDown = false;
|
|
58541
|
-
const combined = combinedDisposable(subscription, toDisposable(() => {
|
|
58542
|
-
if (tornDown) return;
|
|
58543
|
-
tornDown = true;
|
|
58544
|
-
refCount--;
|
|
58545
|
-
if (refCount === 0) disarm();
|
|
58546
|
-
}));
|
|
58547
|
-
if (disposables instanceof DisposableStore) disposables.add(combined);
|
|
58548
|
-
else if (disposables !== void 0) disposables.push(combined);
|
|
58549
|
-
return combined;
|
|
58550
|
-
};
|
|
58551
|
-
}
|
|
58552
|
-
async flush() {}
|
|
58553
|
-
async close() {}
|
|
58554
|
-
pathFor(scope, key) {
|
|
58555
|
-
if (isSimpleRelativeSegment(key) && (scope === "" || isSimpleRelativeSegment(scope))) {
|
|
58556
|
-
const base = this.normalizedBaseDir.endsWith("/") ? this.normalizedBaseDir.slice(0, -1) : this.normalizedBaseDir;
|
|
58557
|
-
return scope === "" ? `${base}/${key}` : `${base}/${scope}/${key}`;
|
|
58558
|
-
}
|
|
58559
|
-
return join$1(this.baseDir, scope, key);
|
|
58560
|
-
}
|
|
58561
|
-
scopePath(scope) {
|
|
58562
|
-
return join$1(this.baseDir, scope);
|
|
58563
|
-
}
|
|
58564
|
-
async syncDirOnce(dir) {
|
|
58565
|
-
if (this.syncedDirs.has(dir)) return;
|
|
58566
|
-
try {
|
|
58567
|
-
await syncDir(dir);
|
|
58568
|
-
this.syncedDirs.add(dir);
|
|
58569
|
-
} catch (error) {
|
|
58570
|
-
if (!isEnoent(error)) throw error;
|
|
58571
|
-
}
|
|
58572
|
-
}
|
|
58573
|
-
};
|
|
58574
54855
|
|
|
58575
54856
|
//#endregion
|
|
58576
54857
|
//#region ../../packages/agent-core-v2/src/state/replayCheckpointCodec.ts
|
|
@@ -58656,6 +54937,101 @@ function findObjectEntry(entries, targetKey) {
|
|
|
58656
54937
|
for (const [key, value] of entries) if (key === targetKey) return value;
|
|
58657
54938
|
}
|
|
58658
54939
|
|
|
54940
|
+
//#endregion
|
|
54941
|
+
//#region ../../packages/agent-core-v2/src/session/replayCheckpointArchive.ts
|
|
54942
|
+
/** Versioned read-only cold projection filename for slimmed leaf checkpoints. */
|
|
54943
|
+
const COLD_CHECKPOINT_PROJECTION_KEY = "cold-projection-v1.json";
|
|
54944
|
+
/** Lossless zstd-compressed full replay checkpoint archive filename. */
|
|
54945
|
+
const COLD_CHECKPOINT_ARCHIVE_ZST_KEY = "engine-v1.archive.zst";
|
|
54946
|
+
/** Lossless gzip-compressed fallback replay checkpoint archive filename. */
|
|
54947
|
+
const COLD_CHECKPOINT_ARCHIVE_GZ_KEY = "engine-v1.archive.gz";
|
|
54948
|
+
const textEncoder = new TextEncoder();
|
|
54949
|
+
const textDecoder = new TextDecoder();
|
|
54950
|
+
function isColdCheckpointProjection(value) {
|
|
54951
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
|
|
54952
|
+
const candidate = value;
|
|
54953
|
+
return candidate.format === 1 && candidate.kind === "cold-projection" && typeof candidate.replayAbi === "number" && candidate.wire !== void 0 && typeof candidate.wire === "object" && Array.isArray(candidate.stateNames) && Array.isArray(candidate.projectedStateNames) && candidate.projectedGraph !== void 0 && typeof candidate.projectedGraph === "object" && (candidate.archiveKey === "engine-v1.archive.zst" || candidate.archiveKey === "engine-v1.archive.gz") && typeof candidate.archiveSha256 === "string" && /^[0-9a-f]{64}$/u.test(candidate.archiveSha256) && typeof candidate.originalBytes === "number" && Number.isSafeInteger(candidate.originalBytes) && candidate.originalBytes > 0;
|
|
54954
|
+
}
|
|
54955
|
+
function decompressArchiveBytes(compressed, archiveKey) {
|
|
54956
|
+
if (archiveKey === "engine-v1.archive.zst") return zstdDecompressSync(compressed);
|
|
54957
|
+
return gunzipSync(compressed);
|
|
54958
|
+
}
|
|
54959
|
+
function parseFullEnvelope(raw, expectedAbi) {
|
|
54960
|
+
let parsed;
|
|
54961
|
+
try {
|
|
54962
|
+
parsed = JSON.parse(textDecoder.decode(raw));
|
|
54963
|
+
} catch {
|
|
54964
|
+
return;
|
|
54965
|
+
}
|
|
54966
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return void 0;
|
|
54967
|
+
const envelope = parsed;
|
|
54968
|
+
if (envelope.format !== 1 || envelope.replayAbi !== expectedAbi || envelope.wire === void 0 || envelope.graph === void 0 || envelope.stateNames !== void 0 && !Array.isArray(envelope.stateNames)) return;
|
|
54969
|
+
return envelope;
|
|
54970
|
+
}
|
|
54971
|
+
/** Reads requested checkpoint states from a direct filesystem path (`.../replay-checkpoints/engine-v1`), supporting slimmed cold projections and archives. */
|
|
54972
|
+
async function readCheckpointStatesFromPath(primaryFilePath, names, expectedAbi, signal) {
|
|
54973
|
+
signal?.throwIfAborted();
|
|
54974
|
+
const dir = dirname$1(primaryFilePath);
|
|
54975
|
+
const primary = await readFile(primaryFilePath).catch(() => void 0);
|
|
54976
|
+
signal?.throwIfAborted();
|
|
54977
|
+
if (primary !== void 0) {
|
|
54978
|
+
const envelope = parseFullEnvelope(primary, expectedAbi);
|
|
54979
|
+
if (envelope !== void 0) try {
|
|
54980
|
+
return {
|
|
54981
|
+
wire: envelope.wire,
|
|
54982
|
+
states: decodeReplayCheckpointStates(envelope.graph, names)
|
|
54983
|
+
};
|
|
54984
|
+
} catch {
|
|
54985
|
+
return;
|
|
54986
|
+
}
|
|
54987
|
+
}
|
|
54988
|
+
const projectionRaw = await readFile(join$1(dir, COLD_CHECKPOINT_PROJECTION_KEY)).catch(() => void 0);
|
|
54989
|
+
signal?.throwIfAborted();
|
|
54990
|
+
let projection;
|
|
54991
|
+
if (projectionRaw !== void 0) try {
|
|
54992
|
+
const parsed = JSON.parse(textDecoder.decode(projectionRaw));
|
|
54993
|
+
if (isColdCheckpointProjection(parsed) && parsed.replayAbi === expectedAbi) projection = parsed;
|
|
54994
|
+
} catch {
|
|
54995
|
+
projection = void 0;
|
|
54996
|
+
}
|
|
54997
|
+
if (projection !== void 0) {
|
|
54998
|
+
const availableInProjection = new Set(projection.projectedStateNames);
|
|
54999
|
+
const presentInFull = new Set(projection.stateNames);
|
|
55000
|
+
if (![...names].some((name) => presentInFull.has(name) && !availableInProjection.has(name))) try {
|
|
55001
|
+
return {
|
|
55002
|
+
wire: projection.wire,
|
|
55003
|
+
states: decodeReplayCheckpointStates(projection.projectedGraph, names)
|
|
55004
|
+
};
|
|
55005
|
+
} catch {}
|
|
55006
|
+
}
|
|
55007
|
+
const archiveKeys = projection !== void 0 ? [projection.archiveKey] : [COLD_CHECKPOINT_ARCHIVE_ZST_KEY, COLD_CHECKPOINT_ARCHIVE_GZ_KEY];
|
|
55008
|
+
for (const key of archiveKeys) {
|
|
55009
|
+
const compressed = await readFile(join$1(dir, key)).catch(() => void 0);
|
|
55010
|
+
signal?.throwIfAborted();
|
|
55011
|
+
if (compressed === void 0) continue;
|
|
55012
|
+
let raw;
|
|
55013
|
+
try {
|
|
55014
|
+
raw = decompressArchiveBytes(compressed, key);
|
|
55015
|
+
} catch {
|
|
55016
|
+
continue;
|
|
55017
|
+
}
|
|
55018
|
+
if (projection !== void 0) {
|
|
55019
|
+
if (raw.byteLength !== projection.originalBytes) continue;
|
|
55020
|
+
if (createHash("sha256").update(raw).digest("hex") !== projection.archiveSha256) continue;
|
|
55021
|
+
}
|
|
55022
|
+
const envelope = parseFullEnvelope(raw, expectedAbi);
|
|
55023
|
+
if (envelope === void 0) continue;
|
|
55024
|
+
try {
|
|
55025
|
+
return {
|
|
55026
|
+
wire: envelope.wire,
|
|
55027
|
+
states: decodeReplayCheckpointStates(envelope.graph, names)
|
|
55028
|
+
};
|
|
55029
|
+
} catch {
|
|
55030
|
+
return;
|
|
55031
|
+
}
|
|
55032
|
+
}
|
|
55033
|
+
}
|
|
55034
|
+
|
|
58659
55035
|
//#endregion
|
|
58660
55036
|
//#region ../../packages/agent-core-v2/src/agent/media/mediaRef.ts
|
|
58661
55037
|
function invertMimeBySuffix(table) {
|
|
@@ -58663,7 +55039,7 @@ function invertMimeBySuffix(table) {
|
|
|
58663
55039
|
for (const [suffix, mime] of Object.entries(table)) out[mime] ??= suffix;
|
|
58664
55040
|
return Object.freeze(out);
|
|
58665
55041
|
}
|
|
58666
|
-
var IMAGE_MIME_BY_SUFFIX, VIDEO_MIME_BY_SUFFIX, AUDIO_MIME_BY_SUFFIX, IMAGE_EXT_BY_MIME, VIDEO_EXT_BY_MIME, AUDIO_EXT_BY_MIME;
|
|
55042
|
+
var IMAGE_MIME_BY_SUFFIX, VIDEO_MIME_BY_SUFFIX, AUDIO_MIME_BY_SUFFIX, MODEL_3D_MIME_BY_SUFFIX, IMAGE_EXT_BY_MIME, VIDEO_EXT_BY_MIME, AUDIO_EXT_BY_MIME, MODEL_3D_EXT_BY_MIME;
|
|
58667
55043
|
var init_mediaRef = __esmMin((() => {
|
|
58668
55044
|
IMAGE_MIME_BY_SUFFIX = Object.freeze({
|
|
58669
55045
|
".png": "image/png",
|
|
@@ -58707,9 +55083,17 @@ var init_mediaRef = __esmMin((() => {
|
|
|
58707
55083
|
".weba": "audio/webm",
|
|
58708
55084
|
".wma": "audio/x-ms-wma"
|
|
58709
55085
|
});
|
|
55086
|
+
MODEL_3D_MIME_BY_SUFFIX = Object.freeze({
|
|
55087
|
+
".glb": "model/gltf-binary",
|
|
55088
|
+
".gltf": "model/gltf+json",
|
|
55089
|
+
".usdz": "model/vnd.usdz+zip",
|
|
55090
|
+
".obj": "model/obj",
|
|
55091
|
+
".stl": "model/stl"
|
|
55092
|
+
});
|
|
58710
55093
|
IMAGE_EXT_BY_MIME = invertMimeBySuffix(IMAGE_MIME_BY_SUFFIX);
|
|
58711
55094
|
VIDEO_EXT_BY_MIME = invertMimeBySuffix(VIDEO_MIME_BY_SUFFIX);
|
|
58712
55095
|
AUDIO_EXT_BY_MIME = invertMimeBySuffix(AUDIO_MIME_BY_SUFFIX);
|
|
55096
|
+
MODEL_3D_EXT_BY_MIME = invertMimeBySuffix(MODEL_3D_MIME_BY_SUFFIX);
|
|
58713
55097
|
}));
|
|
58714
55098
|
|
|
58715
55099
|
//#endregion
|
|
@@ -59305,6 +55689,7 @@ var init_host = __esmMin((() => {
|
|
|
59305
55689
|
CpuWorkerPool = class {
|
|
59306
55690
|
entry;
|
|
59307
55691
|
size;
|
|
55692
|
+
maxLowConcurrency;
|
|
59308
55693
|
slots = [];
|
|
59309
55694
|
detachedDraining = [];
|
|
59310
55695
|
retiringExits = /* @__PURE__ */ new Set();
|
|
@@ -59326,6 +55711,7 @@ var init_host = __esmMin((() => {
|
|
|
59326
55711
|
this.entry = entry;
|
|
59327
55712
|
const cap = positiveInteger(options.maxWorkers ?? RESOURCE_DEFAULTS.cpuWorkers, "maxWorkers");
|
|
59328
55713
|
this.size = Math.max(1, Math.min(availableParallelism() - 1, cap));
|
|
55714
|
+
this.maxLowConcurrency = this.size > 1 ? Math.max(1, Math.floor(this.size / 2)) : 1;
|
|
59329
55715
|
this.maxQueue = positiveInteger(options.maxQueue ?? RESOURCE_DEFAULTS.cpuQueue, "maxQueue");
|
|
59330
55716
|
this.maxQueuedBytes = positiveInteger(options.maxQueuedBytes ?? RESOURCE_DEFAULTS.cpuQueuedBytes, "maxQueuedBytes");
|
|
59331
55717
|
this.maxDetachedDraining = Math.max(2, this.size * 2);
|
|
@@ -59396,10 +55782,19 @@ var init_host = __esmMin((() => {
|
|
|
59396
55782
|
for (const slot of this.slots) if (slot.active !== void 0 || slot.drainingCancel !== void 0) count += 1;
|
|
59397
55783
|
return count;
|
|
59398
55784
|
}
|
|
59399
|
-
|
|
55785
|
+
activeLowSlotCount() {
|
|
55786
|
+
let count = 0;
|
|
55787
|
+
for (const slot of this.slots) if (slot.active?.options.priority === "low" || slot.drainingCancel?.priority === "low") count += 1;
|
|
55788
|
+
return count;
|
|
55789
|
+
}
|
|
55790
|
+
canRunLow(activeCount, activeLowCount) {
|
|
55791
|
+
if (this.size <= 1) return activeCount === 0;
|
|
55792
|
+
return activeLowCount < this.maxLowConcurrency && activeCount < this.size - 1;
|
|
55793
|
+
}
|
|
55794
|
+
hasRunnableWaiting(activeCount, activeLowCount) {
|
|
59400
55795
|
if (this.highWaiting.length > 0 || this.waiting.length > 0) return true;
|
|
59401
55796
|
if (this.lowWaiting.length === 0) return false;
|
|
59402
|
-
return this.
|
|
55797
|
+
return this.canRunLow(activeCount, activeLowCount);
|
|
59403
55798
|
}
|
|
59404
55799
|
dequeueNext(allowLow) {
|
|
59405
55800
|
if (this.highWaiting.length > 0 && (this.waiting.length === 0 || this.consecutiveHigh < 4)) {
|
|
@@ -59422,7 +55817,8 @@ var init_host = __esmMin((() => {
|
|
|
59422
55817
|
pump() {
|
|
59423
55818
|
if (this.closing !== void 0) return;
|
|
59424
55819
|
let activeCount = this.activeSlotCount();
|
|
59425
|
-
|
|
55820
|
+
let activeLowCount = this.activeLowSlotCount();
|
|
55821
|
+
while (this.hasRunnableWaiting(activeCount, activeLowCount)) {
|
|
59426
55822
|
const onlyLowWaiting = this.highWaiting.length === 0 && this.waiting.length === 0 && this.lowWaiting.length > 0;
|
|
59427
55823
|
const hasReadyWorker = this.slots.some((candidate) => candidate.worker !== void 0 && candidate.ready === true && candidate.retiring === void 0);
|
|
59428
55824
|
let readyIdleCount = 0;
|
|
@@ -59457,11 +55853,12 @@ var init_host = __esmMin((() => {
|
|
|
59457
55853
|
this.slots.push(slot);
|
|
59458
55854
|
}
|
|
59459
55855
|
this.clearIdleTimer(slot);
|
|
59460
|
-
const pending = this.dequeueNext(this.
|
|
55856
|
+
const pending = this.dequeueNext(this.canRunLow(activeCount, activeLowCount));
|
|
59461
55857
|
if (pending === void 0) break;
|
|
59462
55858
|
this.queuedBytes -= pending.bytes;
|
|
59463
55859
|
slot.active = pending;
|
|
59464
55860
|
activeCount += 1;
|
|
55861
|
+
if (pending.options.priority === "low") activeLowCount += 1;
|
|
59465
55862
|
try {
|
|
59466
55863
|
const worker = slot.worker ?? this.spawn(slot);
|
|
59467
55864
|
worker.ref();
|
|
@@ -59474,6 +55871,7 @@ var init_host = __esmMin((() => {
|
|
|
59474
55871
|
this.settle(pending, new CpuWorkerError("CPU_WORKER_EXIT", "CPU worker dispatch failed", { cause: error }));
|
|
59475
55872
|
slot.active = void 0;
|
|
59476
55873
|
activeCount -= 1;
|
|
55874
|
+
if (pending.options.priority === "low") activeLowCount -= 1;
|
|
59477
55875
|
this.retire(slot);
|
|
59478
55876
|
}
|
|
59479
55877
|
}
|
|
@@ -59504,7 +55902,7 @@ var init_host = __esmMin((() => {
|
|
|
59504
55902
|
this.retiringExits.delete(exited);
|
|
59505
55903
|
});
|
|
59506
55904
|
}
|
|
59507
|
-
beginDrainingCancel(slot, id, hardTimeout) {
|
|
55905
|
+
beginDrainingCancel(slot, id, hardTimeout, priority) {
|
|
59508
55906
|
this.clearIdleTimer(slot);
|
|
59509
55907
|
this.clearDrainingCancel(slot);
|
|
59510
55908
|
if (slot.worker === void 0 || slot.retiring !== void 0) return;
|
|
@@ -59524,6 +55922,7 @@ var init_host = __esmMin((() => {
|
|
|
59524
55922
|
id,
|
|
59525
55923
|
timer,
|
|
59526
55924
|
hardTimeout,
|
|
55925
|
+
priority,
|
|
59527
55926
|
waitingForDetachSlot: false
|
|
59528
55927
|
};
|
|
59529
55928
|
}
|
|
@@ -59563,7 +55962,7 @@ var init_host = __esmMin((() => {
|
|
|
59563
55962
|
detached.retiring.catch(() => {});
|
|
59564
55963
|
}
|
|
59565
55964
|
reconcileIdleTimers() {
|
|
59566
|
-
if (this.closing !== void 0 || this.
|
|
55965
|
+
if (this.closing !== void 0 || this.hasRunnableWaiting(this.activeSlotCount(), this.activeLowSlotCount())) {
|
|
59567
55966
|
for (const slot of this.slots) this.clearIdleTimer(slot);
|
|
59568
55967
|
return;
|
|
59569
55968
|
}
|
|
@@ -59593,7 +55992,7 @@ var init_host = __esmMin((() => {
|
|
|
59593
55992
|
}
|
|
59594
55993
|
onIdleTimeout(slot) {
|
|
59595
55994
|
slot.idleTimer = void 0;
|
|
59596
|
-
if (this.closing !== void 0 || slot.active !== void 0 || slot.drainingCancel !== void 0 || slot.worker === void 0 || slot.retiring !== void 0 || this.
|
|
55995
|
+
if (this.closing !== void 0 || slot.active !== void 0 || slot.drainingCancel !== void 0 || slot.worker === void 0 || slot.retiring !== void 0 || this.hasRunnableWaiting(this.activeSlotCount(), this.activeLowSlotCount()) || this.liveWorkerCount <= this.warmWorkerFloor) {
|
|
59597
55996
|
this.reconcileIdleTimers();
|
|
59598
55997
|
return;
|
|
59599
55998
|
}
|
|
@@ -59720,7 +56119,7 @@ var init_host = __esmMin((() => {
|
|
|
59720
56119
|
if (slot === void 0) return;
|
|
59721
56120
|
slot.active = void 0;
|
|
59722
56121
|
this.settle(pending, error);
|
|
59723
|
-
this.beginDrainingCancel(slot, pending.id, hardTimeout);
|
|
56122
|
+
this.beginDrainingCancel(slot, pending.id, hardTimeout, pending.options.priority);
|
|
59724
56123
|
this.reconcileIdleTimers();
|
|
59725
56124
|
}
|
|
59726
56125
|
retire(slot) {
|
|
@@ -59773,9 +56172,9 @@ var init_host = __esmMin((() => {
|
|
|
59773
56172
|
slot.active = void 0;
|
|
59774
56173
|
Atomics.store(pending.cancelFlag, 0, 1);
|
|
59775
56174
|
this.settle(pending, error);
|
|
59776
|
-
this.beginDrainingCancel(slot, pending.id, true);
|
|
56175
|
+
this.beginDrainingCancel(slot, pending.id, true, pending.options.priority);
|
|
59777
56176
|
} else if (slot.drainingCancel === void 0) this.retire(slot);
|
|
59778
|
-
else if (slot.drainingCancel.timer === void 0) this.beginDrainingCancel(slot, slot.drainingCancel.id, true);
|
|
56177
|
+
else if (slot.drainingCancel.timer === void 0) this.beginDrainingCancel(slot, slot.drainingCancel.id, true, slot.drainingCancel.priority);
|
|
59779
56178
|
}
|
|
59780
56179
|
this.closing = Promise.all(exits).then(() => {});
|
|
59781
56180
|
return this.closing;
|
|
@@ -61082,30 +57481,8 @@ var init_image_compress = __esmMin((() => {
|
|
|
61082
57481
|
//#region ../../packages/agent-core-v2/src/app/cpuWorker/tasks.ts
|
|
61083
57482
|
init_imageDecode();
|
|
61084
57483
|
const lineReader = new LocalLineReader();
|
|
61085
|
-
const utf8Decoder = new TextDecoder();
|
|
61086
57484
|
async function readCheckpointStatesFromFile(filePath, names, signal) {
|
|
61087
|
-
|
|
61088
|
-
const bytes = await new FileStorageService(dirname(filePath)).read("", basename(filePath));
|
|
61089
|
-
signal?.throwIfAborted();
|
|
61090
|
-
if (bytes === void 0) return void 0;
|
|
61091
|
-
let parsed;
|
|
61092
|
-
try {
|
|
61093
|
-
parsed = JSON.parse(utf8Decoder.decode(bytes));
|
|
61094
|
-
} catch {
|
|
61095
|
-
return;
|
|
61096
|
-
}
|
|
61097
|
-
signal?.throwIfAborted();
|
|
61098
|
-
if (parsed === null || typeof parsed !== "object") return void 0;
|
|
61099
|
-
const checkpoint = parsed;
|
|
61100
|
-
if (checkpoint.format !== 1 || checkpoint.replayAbi !== 2 || checkpoint.wire === void 0 || checkpoint.graph === void 0) return;
|
|
61101
|
-
try {
|
|
61102
|
-
return {
|
|
61103
|
-
wire: checkpoint.wire,
|
|
61104
|
-
states: new Map(decodeReplayCheckpointStates(checkpoint.graph, new Set(names)))
|
|
61105
|
-
};
|
|
61106
|
-
} catch {
|
|
61107
|
-
return;
|
|
61108
|
-
}
|
|
57485
|
+
return readCheckpointStatesFromPath(filePath, new Set(names), 2, signal);
|
|
61109
57486
|
}
|
|
61110
57487
|
async function executeCpuOperation(operation, signal) {
|
|
61111
57488
|
signal?.throwIfAborted();
|