usesprocket 0.0.0 → 0.4.3-dev.efb29f1a00a6702afbc7d21c6e442e2d4635cec9
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/LICENSE +112 -0
- package/README.md +57 -2
- package/THIRD_PARTY_NOTICES.md +80 -0
- package/bin/sprocket.js +5 -0
- package/lib/launcher.js +179 -0
- package/lib/native.js +57 -0
- package/lib/update-api.js +7 -0
- package/lib/update.js +1316 -0
- package/package.json +32 -3
- package/targets.json +39 -0
- package/web/_app/immutable/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/web/_app/immutable/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/web/_app/immutable/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/web/_app/immutable/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/web/_app/immutable/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/web/_app/immutable/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/web/_app/immutable/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/web/_app/immutable/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/web/_app/immutable/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/web/_app/immutable/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/web/_app/immutable/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/web/_app/immutable/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/web/_app/immutable/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/web/_app/immutable/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/web/_app/immutable/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/web/_app/immutable/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/web/_app/immutable/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/web/_app/immutable/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/web/_app/immutable/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/web/_app/immutable/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/web/_app/immutable/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/web/_app/immutable/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/web/_app/immutable/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/web/_app/immutable/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/web/_app/immutable/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/web/_app/immutable/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/web/_app/immutable/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/web/_app/immutable/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/web/_app/immutable/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/web/_app/immutable/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/web/_app/immutable/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/web/_app/immutable/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/web/_app/immutable/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/web/_app/immutable/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/web/_app/immutable/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/web/_app/immutable/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/web/_app/immutable/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/web/_app/immutable/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/web/_app/immutable/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/web/_app/immutable/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/web/_app/immutable/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/web/_app/immutable/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/web/_app/immutable/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/web/_app/immutable/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/web/_app/immutable/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/web/_app/immutable/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/web/_app/immutable/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/web/_app/immutable/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/web/_app/immutable/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/web/_app/immutable/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/web/_app/immutable/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/web/_app/immutable/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/web/_app/immutable/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/web/_app/immutable/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/web/_app/immutable/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/web/_app/immutable/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/web/_app/immutable/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/web/_app/immutable/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/web/_app/immutable/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/web/_app/immutable/abap-CLvhMVsD.js +1 -0
- package/web/_app/immutable/abap-CLvhMVsD.js.map +1 -0
- package/web/_app/immutable/abnfDiagram-WEYOIA3C-BNTFgny4.js +3 -0
- package/web/_app/immutable/actionscript-3-Cs6JJXT5.js +1 -0
- package/web/_app/immutable/actionscript-3-Cs6JJXT5.js.map +1 -0
- package/web/_app/immutable/ada-X3Y2mlq2.js +1 -0
- package/web/_app/immutable/ada-X3Y2mlq2.js.map +1 -0
- package/web/_app/immutable/ahk-DwADkxyd.js +1 -0
- package/web/_app/immutable/ahk-DwADkxyd.js.map +1 -0
- package/web/_app/immutable/ahk2-_6rzW9BS.js +1 -0
- package/web/_app/immutable/ahk2-_6rzW9BS.js.map +1 -0
- package/web/_app/immutable/angular-html-BwuKK3Kr.js +1 -0
- package/web/_app/immutable/angular-html-BwuKK3Kr.js.map +1 -0
- package/web/_app/immutable/angular-ts-CfAcKjAN.js +1 -0
- package/web/_app/immutable/angular-ts-CfAcKjAN.js.map +1 -0
- package/web/_app/immutable/apache-U0d_L8uA.js +1 -0
- package/web/_app/immutable/apache-U0d_L8uA.js.map +1 -0
- package/web/_app/immutable/apex-KFGFyKwG.js +1 -0
- package/web/_app/immutable/apex-KFGFyKwG.js.map +1 -0
- package/web/_app/immutable/apl-BC7JtB8J.js +3 -0
- package/web/_app/immutable/apl-DUepervh.js +1 -0
- package/web/_app/immutable/apl-DUepervh.js.map +1 -0
- package/web/_app/immutable/applescript-CCn79oCD.js +1 -0
- package/web/_app/immutable/applescript-CCn79oCD.js.map +1 -0
- package/web/_app/immutable/ara-4CJ0cIlV.js +1 -0
- package/web/_app/immutable/ara-4CJ0cIlV.js.map +1 -0
- package/web/_app/immutable/arc-Dvau1xfW.js +3 -0
- package/web/_app/immutable/architecture-WOLXFQ4H-6G6ymiJB.js +3 -0
- package/web/_app/immutable/architectureDiagram-ZHVYKT53-B4NxCgmz.js +38 -0
- package/web/_app/immutable/array-DIC0CaFf.js +3 -0
- package/web/_app/immutable/asciiarmor-Bq6hhHiF.js +3 -0
- package/web/_app/immutable/asciidoc-SCjQUq34.js +1 -0
- package/web/_app/immutable/asciidoc-SCjQUq34.js.map +1 -0
- package/web/_app/immutable/asm-Cmm7eHzH.js +1 -0
- package/web/_app/immutable/asm-Cmm7eHzH.js.map +1 -0
- package/web/_app/immutable/asn1-DVEX_zSe.js +3 -0
- package/web/_app/immutable/asterisk-BxOrhxTp.js +3 -0
- package/web/_app/immutable/astro-C_iIudyQ.js +1 -0
- package/web/_app/immutable/astro-C_iIudyQ.js.map +1 -0
- package/web/_app/immutable/awk-BWXHIvNe.js +1 -0
- package/web/_app/immutable/awk-BWXHIvNe.js.map +1 -0
- package/web/_app/immutable/ballerina-B7ZEbQpA.js +1 -0
- package/web/_app/immutable/ballerina-B7ZEbQpA.js.map +1 -0
- package/web/_app/immutable/bat-qdxAdBWQ.js +1 -0
- package/web/_app/immutable/bat-qdxAdBWQ.js.map +1 -0
- package/web/_app/immutable/beancount-C2IN4Vk8.js +1 -0
- package/web/_app/immutable/beancount-C2IN4Vk8.js.map +1 -0
- package/web/_app/immutable/berry-DKpUyyne.js +1 -0
- package/web/_app/immutable/berry-DKpUyyne.js.map +1 -0
- package/web/_app/immutable/bibtex-Ci_nEsc7.js +1 -0
- package/web/_app/immutable/bibtex-Ci_nEsc7.js.map +1 -0
- package/web/_app/immutable/bicep-CUHmPFLl.js +1 -0
- package/web/_app/immutable/bicep-CUHmPFLl.js.map +1 -0
- package/web/_app/immutable/bird2-CYIUgYqB.js +1 -0
- package/web/_app/immutable/bird2-CYIUgYqB.js.map +1 -0
- package/web/_app/immutable/blade-Dzurq6ty.js +1 -0
- package/web/_app/immutable/blade-Dzurq6ty.js.map +1 -0
- package/web/_app/immutable/blockDiagram-RJAE7QA3-DTBwk3TO.js +142 -0
- package/web/_app/immutable/board-3d-scene-l8WUGkIh.js +4222 -0
- package/web/_app/immutable/brainfuck-BlZy3G2D.js +3 -0
- package/web/_app/immutable/bsl-CVED6lJ1.js +1 -0
- package/web/_app/immutable/bsl-CVED6lJ1.js.map +1 -0
- package/web/_app/immutable/c-qzQo776N.js +1 -0
- package/web/_app/immutable/c-qzQo776N.js.map +1 -0
- package/web/_app/immutable/c3-D0apG41V.js +1 -0
- package/web/_app/immutable/c3-D0apG41V.js.map +1 -0
- package/web/_app/immutable/c4Diagram-XDPPPE54-BHB3YL2-.js +40 -0
- package/web/_app/immutable/cadence-CQ2zXKGN.js +1 -0
- package/web/_app/immutable/cadence-CQ2zXKGN.js.map +1 -0
- package/web/_app/immutable/cairo-DRAZz75c.js +1 -0
- package/web/_app/immutable/cairo-DRAZz75c.js.map +1 -0
- package/web/_app/immutable/channel-CFUAoWNH.js +3 -0
- package/web/_app/immutable/chapel-Dhk4TCm8.js +1 -0
- package/web/_app/immutable/chapel-Dhk4TCm8.js.map +1 -0
- package/web/_app/immutable/chunk-2E7WHVMD-Cjw54BFv.js +90 -0
- package/web/_app/immutable/chunk-2Q5K7J3B-DQDRz1yr.js +3 -0
- package/web/_app/immutable/chunk-4EMNKR2T-BL5Fe9Ds.js +3 -0
- package/web/_app/immutable/chunk-55XCU76K-BlYP-i7b.js +3 -0
- package/web/_app/immutable/chunk-5VM5RSS4-DtuY2whi.js +17 -0
- package/web/_app/immutable/chunk-7S6XSTFO-CEgzt_i6.js +4 -0
- package/web/_app/immutable/chunk-AQDTSKZB-D_2IXzWX.js +74 -0
- package/web/_app/immutable/chunk-DSNLSHJZ-A8ajWrVK.js +129 -0
- package/web/_app/immutable/chunk-DUW6YSOI-gdK4Q5ku.js +3 -0
- package/web/_app/immutable/chunk-HAGFOTED-BX7DTdiB.js +64 -0
- package/web/_app/immutable/chunk-HNE4Q36P-BvM7kwGq.js +3 -0
- package/web/_app/immutable/chunk-J5ZVWO5B-2xiFb4TJ.js +3 -0
- package/web/_app/immutable/chunk-JWPE2WC7-DS6GdJLH.js +3 -0
- package/web/_app/immutable/chunk-NGNAAXSQ-O_D_uiCW.js +138 -0
- package/web/_app/immutable/chunk-NQOKRVIF-tDcp9wSS.js +215 -0
- package/web/_app/immutable/chunk-UHW7PFBP-RVHKoiRm.js +3 -0
- package/web/_app/immutable/chunk-VQ5W62QI-BLloabPj.js +3 -0
- package/web/_app/immutable/chunk-WQQL4CDK-Nnkslbir.js +12 -0
- package/web/_app/immutable/chunk-XXDRQBXY-MPD3j8uB.js +3 -0
- package/web/_app/immutable/chunk-Y2CYZVJY-BQV3OsBC.js +3 -0
- package/web/_app/immutable/chunk-YZO67HFG-xbO2iZsN.js +3 -0
- package/web/_app/immutable/chunk-ZAUX2LTX-DD3ZlAaz.js +3 -0
- package/web/_app/immutable/chunk-ZCHMQSOR-oQzs_-4z.js +4 -0
- package/web/_app/immutable/clarity-CtfBBspg.js +1 -0
- package/web/_app/immutable/clarity-CtfBBspg.js.map +1 -0
- package/web/_app/immutable/classDiagram-v2-4MYWR3UA-8JVwlPI5.js +219 -0
- package/web/_app/immutable/clike-xUD9GjHN.js +3 -0
- package/web/_app/immutable/clojure--0qVPUN4.js +3 -0
- package/web/_app/immutable/clojure-DqKBuwfJ.js +1 -0
- package/web/_app/immutable/clojure-DqKBuwfJ.js.map +1 -0
- package/web/_app/immutable/cmake-BQP8SdTV.js +3 -0
- package/web/_app/immutable/cmake-Bj61d0ZC.js +1 -0
- package/web/_app/immutable/cmake-Bj61d0ZC.js.map +1 -0
- package/web/_app/immutable/cobol-D56X4Q7a.js +1 -0
- package/web/_app/immutable/cobol-D56X4Q7a.js.map +1 -0
- package/web/_app/immutable/cobol-DrgBtAvD.js +3 -0
- package/web/_app/immutable/code-highlighting-client-CpSKrvDS.js +3 -0
- package/web/_app/immutable/code-highlighting-worker-C2xr5VV-.js +152 -0
- package/web/_app/immutable/code-highlighting-worker-C2xr5VV-.js.map +1 -0
- package/web/_app/immutable/codeowners-C8r90Shi.js +1 -0
- package/web/_app/immutable/codeowners-C8r90Shi.js.map +1 -0
- package/web/_app/immutable/codeql-oeQT6MSM.js +1 -0
- package/web/_app/immutable/codeql-oeQT6MSM.js.map +1 -0
- package/web/_app/immutable/coffee-Iu4kCEg_.js +1 -0
- package/web/_app/immutable/coffee-Iu4kCEg_.js.map +1 -0
- package/web/_app/immutable/coffeescript-CcaIHuiC.js +3 -0
- package/web/_app/immutable/common-lisp-Cv5bFMCO.js +1 -0
- package/web/_app/immutable/common-lisp-Cv5bFMCO.js.map +1 -0
- package/web/_app/immutable/commonlisp-Dm91Ur1u.js +3 -0
- package/web/_app/immutable/coq-CGaSfhwR.js +1 -0
- package/web/_app/immutable/coq-CGaSfhwR.js.map +1 -0
- package/web/_app/immutable/cose-bilkent-JH36ORCC-WO_t-_iv.js +3 -0
- package/web/_app/immutable/cpp-AWpbCT5R.js +1 -0
- package/web/_app/immutable/cpp-AWpbCT5R.js.map +1 -0
- package/web/_app/immutable/crystal-B70pbNaY.js +3 -0
- package/web/_app/immutable/crystal-BZj43DrY.js +1 -0
- package/web/_app/immutable/crystal-BZj43DrY.js.map +1 -0
- package/web/_app/immutable/csharp-dmMxLVLW.js +1 -0
- package/web/_app/immutable/csharp-dmMxLVLW.js.map +1 -0
- package/web/_app/immutable/css-B6ztlHGG.js +1 -0
- package/web/_app/immutable/css-B6ztlHGG.js.map +1 -0
- package/web/_app/immutable/css-CcN8eljG.js +3 -0
- package/web/_app/immutable/csv-Dx-8-gkx.js +1 -0
- package/web/_app/immutable/csv-Dx-8-gkx.js.map +1 -0
- package/web/_app/immutable/cue-CE9AQfxI.js +1 -0
- package/web/_app/immutable/cue-CE9AQfxI.js.map +1 -0
- package/web/_app/immutable/cynefin-EF2NZ3EQ-DWyJvJQD.js +3 -0
- package/web/_app/immutable/cynefinDiagram-WF24UDRP-KYYNYWQL.js +64 -0
- package/web/_app/immutable/cypher-CBjaG0HH.js +3 -0
- package/web/_app/immutable/cypher-ClKdZ_lG.js +1 -0
- package/web/_app/immutable/cypher-ClKdZ_lG.js.map +1 -0
- package/web/_app/immutable/cytoscape.esm-ptbhUelO.js +323 -0
- package/web/_app/immutable/d-Dw7y9EWw.js +3 -0
- package/web/_app/immutable/d-qD-0Kul2.js +1 -0
- package/web/_app/immutable/d-qD-0Kul2.js.map +1 -0
- package/web/_app/immutable/dagre-NK4GIZVX-D5kPdGFq.js +6 -0
- package/web/_app/immutable/dart-CHZY9Xhz.js +1 -0
- package/web/_app/immutable/dart-CHZY9Xhz.js.map +1 -0
- package/web/_app/immutable/dax-BkyTk9wS.js +1 -0
- package/web/_app/immutable/dax-BkyTk9wS.js.map +1 -0
- package/web/_app/immutable/defaultLocale-Csc4zPC6.js +3 -0
- package/web/_app/immutable/desktop-Dlh5hvp9.js +1 -0
- package/web/_app/immutable/desktop-Dlh5hvp9.js.map +1 -0
- package/web/_app/immutable/diagram-CBK3MWTC-DvdIKwdy.js +26 -0
- package/web/_app/immutable/diagram-I5XIIV2D-w91_KfR5.js +26 -0
- package/web/_app/immutable/diagram-ODIL2UCW-DES_cGit.js +32 -0
- package/web/_app/immutable/diagram-PFBEJUXE-Df_53H5s.js +5 -0
- package/web/_app/immutable/diagram-RJA3I4VV-DgZ-DHjO.js +43 -0
- package/web/_app/immutable/diagram-TYUNFSNR-D4yOak-o.js +202 -0
- package/web/_app/immutable/diff-Demkr5Hx.js +3 -0
- package/web/_app/immutable/diff-woXpYk--.js +1 -0
- package/web/_app/immutable/diff-woXpYk--.js.map +1 -0
- package/web/_app/immutable/dist-3v1Ypm0I.js +3 -0
- package/web/_app/immutable/dist-B2ItTIu5.js +3 -0
- package/web/_app/immutable/dist-B5se-6-v.js +3 -0
- package/web/_app/immutable/dist-B9xn2lip.js +3 -0
- package/web/_app/immutable/dist-BHMP1w4w.js +3 -0
- package/web/_app/immutable/dist-BMtHsnVZ.js +3 -0
- package/web/_app/immutable/dist-BRgnEG0I.js +3 -0
- package/web/_app/immutable/dist-BkiHXnNE.js +3 -0
- package/web/_app/immutable/dist-C479dQNR.js +3 -0
- package/web/_app/immutable/dist-CCoFJsZk.js +3 -0
- package/web/_app/immutable/dist-CQzZX5_H.js +3 -0
- package/web/_app/immutable/dist-CUpmsj7B.js +3 -0
- package/web/_app/immutable/dist-C_Gz3bwk.js +3 -0
- package/web/_app/immutable/dist-CfHKIQPY.js +3 -0
- package/web/_app/immutable/dist-Cj-euAWN.js +8 -0
- package/web/_app/immutable/dist-DcDa8Daf.js +3 -0
- package/web/_app/immutable/dist-DnV37WfS.js +3 -0
- package/web/_app/immutable/dist-DyDZxSMN.js +13 -0
- package/web/_app/immutable/dist-dxdAgRJM.js +3 -0
- package/web/_app/immutable/dist-qByTyv84.js +3 -0
- package/web/_app/immutable/dist-r3UcB7uW.js +4 -0
- package/web/_app/immutable/dist-rPH-Ke63.js +25 -0
- package/web/_app/immutable/dist-vavkOTOl.js +11 -0
- package/web/_app/immutable/dm-sans-latin-400-normal-BwCSEQnW.woff +0 -0
- package/web/_app/immutable/dm-sans-latin-400-normal-CW0RaeGs.woff2 +0 -0
- package/web/_app/immutable/dm-sans-latin-ext-400-normal-BjWJ59Pq.woff +0 -0
- package/web/_app/immutable/dm-sans-latin-ext-400-normal-BtiwyxMk.woff2 +0 -0
- package/web/_app/immutable/docker-IyjqRm3v.js +1 -0
- package/web/_app/immutable/docker-IyjqRm3v.js.map +1 -0
- package/web/_app/immutable/dockerfile-V2EliGN3.js +3 -0
- package/web/_app/immutable/dotenv-CuH5my32.js +1 -0
- package/web/_app/immutable/dotenv-CuH5my32.js.map +1 -0
- package/web/_app/immutable/dream-maker-DW3nJb8Q.js +1 -0
- package/web/_app/immutable/dream-maker-DW3nJb8Q.js.map +1 -0
- package/web/_app/immutable/dtd-gVHd8cIs.js +3 -0
- package/web/_app/immutable/dylan-tTtETchL.js +3 -0
- package/web/_app/immutable/ebnf-BV-_vwba.js +3 -0
- package/web/_app/immutable/ebnfDiagram-V4P3TTPT-BRwptW2c.js +3 -0
- package/web/_app/immutable/ecl-BDDJJMLK.js +3 -0
- package/web/_app/immutable/edge-jLfySIzz.js +1 -0
- package/web/_app/immutable/edge-jLfySIzz.js.map +1 -0
- package/web/_app/immutable/eiffel-DZkKh-QD.js +3 -0
- package/web/_app/immutable/elixir-CwxVj8r6.js +1 -0
- package/web/_app/immutable/elixir-CwxVj8r6.js.map +1 -0
- package/web/_app/immutable/elk-QONTBCTQ-CcBrj4OQ.js +29 -0
- package/web/_app/immutable/elm-B3qm-kqb.js +3 -0
- package/web/_app/immutable/elm-DKKFGA1n.js +1 -0
- package/web/_app/immutable/elm-DKKFGA1n.js.map +1 -0
- package/web/_app/immutable/emacs-lisp-DR2vtWaj.js +1 -0
- package/web/_app/immutable/emacs-lisp-DR2vtWaj.js.map +1 -0
- package/web/_app/immutable/erDiagram-KYQIGQAA-DJAzVLHu.js +101 -0
- package/web/_app/immutable/erb-CR1GqdqQ.js +1 -0
- package/web/_app/immutable/erb-CR1GqdqQ.js.map +1 -0
- package/web/_app/immutable/erlang-BXdgHVfi.js +1 -0
- package/web/_app/immutable/erlang-BXdgHVfi.js.map +1 -0
- package/web/_app/immutable/erlang-Boq3uEyA.js +3 -0
- package/web/_app/immutable/eventmodeling-K75KTNOO-Da79qIbL.js +3 -0
- package/web/_app/immutable/factor-DxD5CHyd.js +3 -0
- package/web/_app/immutable/fcl-IpL9H4xi.js +3 -0
- package/web/_app/immutable/fennel-DQxkIbk2.js +1 -0
- package/web/_app/immutable/fennel-DQxkIbk2.js.map +1 -0
- package/web/_app/immutable/fish-BJitypiv.js +1 -0
- package/web/_app/immutable/fish-BJitypiv.js.map +1 -0
- package/web/_app/immutable/flowDiagram-IUGLLWBU-B-hw-06e.js +3 -0
- package/web/_app/immutable/fluent-C03EYrpw.js +1 -0
- package/web/_app/immutable/fluent-C03EYrpw.js.map +1 -0
- package/web/_app/immutable/forth-DmVZ3cPQ.js +3 -0
- package/web/_app/immutable/fortran-D50w5gpG.js +3 -0
- package/web/_app/immutable/fortran-fixed-form-D6mN0kjy.js +1 -0
- package/web/_app/immutable/fortran-fixed-form-D6mN0kjy.js.map +1 -0
- package/web/_app/immutable/fortran-free-form-CYNrtFtB.js +1 -0
- package/web/_app/immutable/fortran-free-form-CYNrtFtB.js.map +1 -0
- package/web/_app/immutable/fsharp-CwoEF39o.js +1 -0
- package/web/_app/immutable/fsharp-CwoEF39o.js.map +1 -0
- package/web/_app/immutable/ganttDiagram-R7GPNTJY-BXLyZPCM.js +294 -0
- package/web/_app/immutable/gas-DYm-AlIx.js +3 -0
- package/web/_app/immutable/gdresource-CZkFGo3B.js +1 -0
- package/web/_app/immutable/gdresource-CZkFGo3B.js.map +1 -0
- package/web/_app/immutable/gdscript-DYvRD3hg.js +1 -0
- package/web/_app/immutable/gdscript-DYvRD3hg.js.map +1 -0
- package/web/_app/immutable/gdshader-CBce3t8t.js +1 -0
- package/web/_app/immutable/gdshader-CBce3t8t.js.map +1 -0
- package/web/_app/immutable/genie-CV2tkWYe.js +1 -0
- package/web/_app/immutable/genie-CV2tkWYe.js.map +1 -0
- package/web/_app/immutable/gherkin-D1sAa387.js +3 -0
- package/web/_app/immutable/gherkin-DExj1W_8.js +1 -0
- package/web/_app/immutable/gherkin-DExj1W_8.js.map +1 -0
- package/web/_app/immutable/git-commit-dUGrvm6Q.js +1 -0
- package/web/_app/immutable/git-commit-dUGrvm6Q.js.map +1 -0
- package/web/_app/immutable/git-rebase-CyUqXR3S.js +1 -0
- package/web/_app/immutable/git-rebase-CyUqXR3S.js.map +1 -0
- package/web/_app/immutable/gitGraph-VSP46ZUC-DoylukoB.js +3 -0
- package/web/_app/immutable/gitGraphDiagram-PDYL7XHY-jqVl8TYA.js +108 -0
- package/web/_app/immutable/github-dark-C-LZuMrd.js +1 -0
- package/web/_app/immutable/github-dark-C-LZuMrd.js.map +1 -0
- package/web/_app/immutable/github-light-EUqPIrTm.js +1 -0
- package/web/_app/immutable/github-light-EUqPIrTm.js.map +1 -0
- package/web/_app/immutable/gleam-CSRkHgEL.js +1 -0
- package/web/_app/immutable/gleam-CSRkHgEL.js.map +1 -0
- package/web/_app/immutable/glimmer-js-Ds9D3Sy-.js +1 -0
- package/web/_app/immutable/glimmer-js-Ds9D3Sy-.js.map +1 -0
- package/web/_app/immutable/glimmer-ts-CyVYNkki.js +1 -0
- package/web/_app/immutable/glimmer-ts-CyVYNkki.js.map +1 -0
- package/web/_app/immutable/glsl-BIQpJM9l.js +1 -0
- package/web/_app/immutable/glsl-BIQpJM9l.js.map +1 -0
- package/web/_app/immutable/gn-CAXYAgV-.js +1 -0
- package/web/_app/immutable/gn-CAXYAgV-.js.map +1 -0
- package/web/_app/immutable/gnuplot-7GGW24-e.js +1 -0
- package/web/_app/immutable/gnuplot-7GGW24-e.js.map +1 -0
- package/web/_app/immutable/go-rLFTqkRN.js +1 -0
- package/web/_app/immutable/go-rLFTqkRN.js.map +1 -0
- package/web/_app/immutable/graphlib-CYVDeIHB.js +3 -0
- package/web/_app/immutable/graphql-repcqYbr.js +1 -0
- package/web/_app/immutable/graphql-repcqYbr.js.map +1 -0
- package/web/_app/immutable/groovy-CacY0gHj.js +1 -0
- package/web/_app/immutable/groovy-CacY0gHj.js.map +1 -0
- package/web/_app/immutable/groovy-DMDx1Eku.js +3 -0
- package/web/_app/immutable/hack-DHzccZ7f.js +1 -0
- package/web/_app/immutable/hack-DHzccZ7f.js.map +1 -0
- package/web/_app/immutable/haml-f2f64wHY.js +1 -0
- package/web/_app/immutable/haml-f2f64wHY.js.map +1 -0
- package/web/_app/immutable/handlebars-DSyc6f1Q.js +1 -0
- package/web/_app/immutable/handlebars-DSyc6f1Q.js.map +1 -0
- package/web/_app/immutable/haskell-BOaEFoOu.js +3 -0
- package/web/_app/immutable/haskell-D8IpX4py.js +1 -0
- package/web/_app/immutable/haskell-D8IpX4py.js.map +1 -0
- package/web/_app/immutable/haxe-C8oCnwJJ.js +1 -0
- package/web/_app/immutable/haxe-C8oCnwJJ.js.map +1 -0
- package/web/_app/immutable/haxe-DPeLmIsa.js +3 -0
- package/web/_app/immutable/hcl-Dh228itO.js +1 -0
- package/web/_app/immutable/hcl-Dh228itO.js.map +1 -0
- package/web/_app/immutable/hjson-CxZEssPk.js +1 -0
- package/web/_app/immutable/hjson-CxZEssPk.js.map +1 -0
- package/web/_app/immutable/hlsl-Cvrh5tZx.js +1 -0
- package/web/_app/immutable/hlsl-Cvrh5tZx.js.map +1 -0
- package/web/_app/immutable/html-BB1lbnI4.js +1 -0
- package/web/_app/immutable/html-BB1lbnI4.js.map +1 -0
- package/web/_app/immutable/html-derivative-0_Wyfj4S.js +1 -0
- package/web/_app/immutable/html-derivative-0_Wyfj4S.js.map +1 -0
- package/web/_app/immutable/http-CBMwiuhf.js +3 -0
- package/web/_app/immutable/http-DszTk-XN.js +1 -0
- package/web/_app/immutable/http-DszTk-XN.js.map +1 -0
- package/web/_app/immutable/hurl-h4a81_LP.js +1 -0
- package/web/_app/immutable/hurl-h4a81_LP.js.map +1 -0
- package/web/_app/immutable/hxml-D7Y24wKF.js +1 -0
- package/web/_app/immutable/hxml-D7Y24wKF.js.map +1 -0
- package/web/_app/immutable/hy-CZbG8q4J.js +1 -0
- package/web/_app/immutable/hy-CZbG8q4J.js.map +1 -0
- package/web/_app/immutable/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- package/web/_app/immutable/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- package/web/_app/immutable/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
- package/web/_app/immutable/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
- package/web/_app/immutable/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- package/web/_app/immutable/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- package/web/_app/immutable/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
- package/web/_app/immutable/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
- package/web/_app/immutable/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/web/_app/immutable/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/web/_app/immutable/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- package/web/_app/immutable/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- package/web/_app/immutable/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- package/web/_app/immutable/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- package/web/_app/immutable/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
- package/web/_app/immutable/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
- package/web/_app/immutable/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- package/web/_app/immutable/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- package/web/_app/immutable/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
- package/web/_app/immutable/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
- package/web/_app/immutable/ibm-plex-sans-cyrillic-ext-wght-normal-d45eAU9y.woff2 +0 -0
- package/web/_app/immutable/ibm-plex-sans-cyrillic-wght-normal-BAAhND-U.woff2 +0 -0
- package/web/_app/immutable/ibm-plex-sans-greek-wght-normal-CmyJS8uq.woff2 +0 -0
- package/web/_app/immutable/ibm-plex-sans-latin-ext-wght-normal-CIII54If.woff2 +0 -0
- package/web/_app/immutable/ibm-plex-sans-latin-wght-normal-IvpUvPa2.woff2 +0 -0
- package/web/_app/immutable/ibm-plex-sans-vietnamese-wght-normal-Dg1JeJN0.woff2 +0 -0
- package/web/_app/immutable/idl-Ds8uwkJ9.js +3 -0
- package/web/_app/immutable/imba-DsUTQ-LC.js +1 -0
- package/web/_app/immutable/imba-DsUTQ-LC.js.map +1 -0
- package/web/_app/immutable/index-2FCuvNG5.js +1951 -0
- package/web/_app/immutable/index-Cep4a51Y.css +1 -0
- package/web/_app/immutable/info-OHQRW6UA-DnnAi1P-.js +3 -0
- package/web/_app/immutable/infoDiagram-MVDRKAX5-Bj32MhoY.js +4 -0
- package/web/_app/immutable/ini-B5eOa1yu.js +1 -0
- package/web/_app/immutable/ini-B5eOa1yu.js.map +1 -0
- package/web/_app/immutable/init-Cb641zZY.js +3 -0
- package/web/_app/immutable/ishikawaDiagram-HPEHV2GE-sjGg5mp3.js +72 -0
- package/web/_app/immutable/java-DbaoXhEt.js +1 -0
- package/web/_app/immutable/java-DbaoXhEt.js.map +1 -0
- package/web/_app/immutable/javascript-CIkjH0dG.js +1 -0
- package/web/_app/immutable/javascript-CIkjH0dG.js.map +1 -0
- package/web/_app/immutable/javascript-HWMQvMTq.js +3 -0
- package/web/_app/immutable/jinja-CmL2f_Zf.js +1 -0
- package/web/_app/immutable/jinja-CmL2f_Zf.js.map +1 -0
- package/web/_app/immutable/jison-9Zdr2rbL.js +1 -0
- package/web/_app/immutable/jison-9Zdr2rbL.js.map +1 -0
- package/web/_app/immutable/journeyDiagram-BOSHW7O7-C7ULToAD.js +141 -0
- package/web/_app/immutable/json-DNUTwoQs.js +1 -0
- package/web/_app/immutable/json-DNUTwoQs.js.map +1 -0
- package/web/_app/immutable/json-render-view-CBY8vgF3.js +114 -0
- package/web/_app/immutable/json5-BR5RXkoi.js +1 -0
- package/web/_app/immutable/json5-BR5RXkoi.js.map +1 -0
- package/web/_app/immutable/jsonc-CYpm1nAK.js +1 -0
- package/web/_app/immutable/jsonc-CYpm1nAK.js.map +1 -0
- package/web/_app/immutable/jsonl-CmCQp5Yx.js +1 -0
- package/web/_app/immutable/jsonl-CmCQp5Yx.js.map +1 -0
- package/web/_app/immutable/jsonnet-CJTPZ8u_.js +1 -0
- package/web/_app/immutable/jsonnet-CJTPZ8u_.js.map +1 -0
- package/web/_app/immutable/jssm-DXw9l8Rf.js +1 -0
- package/web/_app/immutable/jssm-DXw9l8Rf.js.map +1 -0
- package/web/_app/immutable/jsx-BKwocWQ4.js +1 -0
- package/web/_app/immutable/jsx-BKwocWQ4.js.map +1 -0
- package/web/_app/immutable/julia--_16wk8_.js +1 -0
- package/web/_app/immutable/julia--_16wk8_.js.map +1 -0
- package/web/_app/immutable/julia-DeocpXqm.js +3 -0
- package/web/_app/immutable/just-Du4advy4.js +1 -0
- package/web/_app/immutable/just-Du4advy4.js.map +1 -0
- package/web/_app/immutable/kanban-definition-FNSA4HC5-ICSlA-Ny.js +91 -0
- package/web/_app/immutable/katex-DjN7IO1j.js +259 -0
- package/web/_app/immutable/kdl-CsD5j6eV.js +1 -0
- package/web/_app/immutable/kdl-CsD5j6eV.js.map +1 -0
- package/web/_app/immutable/kotlin-DhhofPvG.js +1 -0
- package/web/_app/immutable/kotlin-DhhofPvG.js.map +1 -0
- package/web/_app/immutable/kusto-C7mF5XQf.js +1 -0
- package/web/_app/immutable/kusto-C7mF5XQf.js.map +1 -0
- package/web/_app/immutable/latex-Bqqpf0F3.js +1 -0
- package/web/_app/immutable/latex-Bqqpf0F3.js.map +1 -0
- package/web/_app/immutable/lean-CewbzKMR.js +1 -0
- package/web/_app/immutable/lean-CewbzKMR.js.map +1 -0
- package/web/_app/immutable/less-DVTAwKKz.js +1 -0
- package/web/_app/immutable/less-DVTAwKKz.js.map +1 -0
- package/web/_app/immutable/line-C-5YfWYW.js +3 -0
- package/web/_app/immutable/linear-PRuH-iLp.js +3 -0
- package/web/_app/immutable/liquid-COqmh83j.js +1 -0
- package/web/_app/immutable/liquid-COqmh83j.js.map +1 -0
- package/web/_app/immutable/livescript-DjjwJfEd.js +3 -0
- package/web/_app/immutable/llvm-DqHOMS-s.js +1 -0
- package/web/_app/immutable/llvm-DqHOMS-s.js.map +1 -0
- package/web/_app/immutable/log-BNLmms1o.js +1 -0
- package/web/_app/immutable/log-BNLmms1o.js.map +1 -0
- package/web/_app/immutable/logo-Cluzi2Zq.js +1 -0
- package/web/_app/immutable/logo-Cluzi2Zq.js.map +1 -0
- package/web/_app/immutable/lua-LgkVCISu.js +1 -0
- package/web/_app/immutable/lua-LgkVCISu.js.map +1 -0
- package/web/_app/immutable/lua-tXpzuGpF.js +3 -0
- package/web/_app/immutable/luau-VGWVLoqX.js +1 -0
- package/web/_app/immutable/luau-VGWVLoqX.js.map +1 -0
- package/web/_app/immutable/make-Dixweg8N.js +1 -0
- package/web/_app/immutable/make-Dixweg8N.js.map +1 -0
- package/web/_app/immutable/markdown-BYOwaDjH.js +1 -0
- package/web/_app/immutable/markdown-BYOwaDjH.js.map +1 -0
- package/web/_app/immutable/marko-DAbx-HWa.js +1 -0
- package/web/_app/immutable/marko-DAbx-HWa.js.map +1 -0
- package/web/_app/immutable/mathematica-BqWRMc57.js +3 -0
- package/web/_app/immutable/matlab-D7qyCx1q.js +1 -0
- package/web/_app/immutable/matlab-D7qyCx1q.js.map +1 -0
- package/web/_app/immutable/mbox-QYOLq9Rb.js +3 -0
- package/web/_app/immutable/mdc-uE8iY_zJ.js +1 -0
- package/web/_app/immutable/mdc-uE8iY_zJ.js.map +1 -0
- package/web/_app/immutable/mdx-DQZ5AkYe.js +1 -0
- package/web/_app/immutable/mdx-DQZ5AkYe.js.map +1 -0
- package/web/_app/immutable/mermaid-BxpfTIzt.js +1 -0
- package/web/_app/immutable/mermaid-BxpfTIzt.js.map +1 -0
- package/web/_app/immutable/mermaid-parser.core-BpDRRA60.js +9 -0
- package/web/_app/immutable/mermaid.core-DTs4O5u1.js +46 -0
- package/web/_app/immutable/mindmap-definition-6OY57UG3-D4KcHjDM.js +100 -0
- package/web/_app/immutable/mipsasm-BMqwQI7S.js +1 -0
- package/web/_app/immutable/mipsasm-BMqwQI7S.js.map +1 -0
- package/web/_app/immutable/mirc-CgnoBP-m.js +3 -0
- package/web/_app/immutable/mllike-jp1TaVOT.js +3 -0
- package/web/_app/immutable/modelica-fQqBvKqY.js +3 -0
- package/web/_app/immutable/mojo-fg40_ntQ.js +1 -0
- package/web/_app/immutable/mojo-fg40_ntQ.js.map +1 -0
- package/web/_app/immutable/moonbit-D9W784E_.js +1 -0
- package/web/_app/immutable/moonbit-D9W784E_.js.map +1 -0
- package/web/_app/immutable/move-BYnGhZoM.js +1 -0
- package/web/_app/immutable/move-BYnGhZoM.js.map +1 -0
- package/web/_app/immutable/mscgen-RdZXVFwu.js +3 -0
- package/web/_app/immutable/mumps-nPGFdgWd.js +3 -0
- package/web/_app/immutable/narrat-_X_XdTYD.js +1 -0
- package/web/_app/immutable/narrat-_X_XdTYD.js.map +1 -0
- package/web/_app/immutable/nextflow-BoTnSBQ_.js +1 -0
- package/web/_app/immutable/nextflow-BoTnSBQ_.js.map +1 -0
- package/web/_app/immutable/nextflow-groovy-D7IRt6Pp.js +1 -0
- package/web/_app/immutable/nextflow-groovy-D7IRt6Pp.js.map +1 -0
- package/web/_app/immutable/nginx-BAHnN1QV.js +1 -0
- package/web/_app/immutable/nginx-BAHnN1QV.js.map +1 -0
- package/web/_app/immutable/nginx-eU9yiHla.js +3 -0
- package/web/_app/immutable/nim-CdIov1RA.js +1 -0
- package/web/_app/immutable/nim-CdIov1RA.js.map +1 -0
- package/web/_app/immutable/nix-Cl_7024t.js +1 -0
- package/web/_app/immutable/nix-Cl_7024t.js.map +1 -0
- package/web/_app/immutable/nsis-CTkFTnFy.js +3 -0
- package/web/_app/immutable/nsis-CjNLYCLg.js +1 -0
- package/web/_app/immutable/nsis-CjNLYCLg.js.map +1 -0
- package/web/_app/immutable/ntriples-BGXgH9Uv.js +3 -0
- package/web/_app/immutable/nushell--0fT3PI1.js +1 -0
- package/web/_app/immutable/nushell--0fT3PI1.js.map +1 -0
- package/web/_app/immutable/objective-c-D1A_Heim.js +1 -0
- package/web/_app/immutable/objective-c-D1A_Heim.js.map +1 -0
- package/web/_app/immutable/objective-cpp-BsSzOQcm.js +1 -0
- package/web/_app/immutable/objective-cpp-BsSzOQcm.js.map +1 -0
- package/web/_app/immutable/ocaml-O90oeIOV.js +1 -0
- package/web/_app/immutable/ocaml-O90oeIOV.js.map +1 -0
- package/web/_app/immutable/octave-BObBZZt0.js +3 -0
- package/web/_app/immutable/odin-B1RWQWA5.js +1 -0
- package/web/_app/immutable/odin-B1RWQWA5.js.map +1 -0
- package/web/_app/immutable/openscad-BUDT5pXO.js +1 -0
- package/web/_app/immutable/openscad-BUDT5pXO.js.map +1 -0
- package/web/_app/immutable/ordinal-C-XTTTOD.js +3 -0
- package/web/_app/immutable/org-BK_gCQCd.js +1 -0
- package/web/_app/immutable/org-BK_gCQCd.js.map +1 -0
- package/web/_app/immutable/oz-CD_9UVj2.js +3 -0
- package/web/_app/immutable/packet-JDAUHWVQ-C16K0ZVw.js +3 -0
- package/web/_app/immutable/pascal-4ZHwLPI5.js +1 -0
- package/web/_app/immutable/pascal-4ZHwLPI5.js.map +1 -0
- package/web/_app/immutable/pascal-Bf2SahTF.js +3 -0
- package/web/_app/immutable/path-bw50nIUn.js +3 -0
- package/web/_app/immutable/pegDiagram-ECIUJNBX-D9sfI-Pm.js +3 -0
- package/web/_app/immutable/perl-BD1K8f9E.js +1 -0
- package/web/_app/immutable/perl-BD1K8f9E.js.map +1 -0
- package/web/_app/immutable/perl-jlaXnnL2.js +3 -0
- package/web/_app/immutable/php-C7Bk57eq.js +1 -0
- package/web/_app/immutable/php-C7Bk57eq.js.map +1 -0
- package/web/_app/immutable/pie-XZMESJXO-BoljSdPy.js +3 -0
- package/web/_app/immutable/pieDiagram-GNMPY74T-DvdZnX-0.js +41 -0
- package/web/_app/immutable/pig-B7J9kDNd.js +3 -0
- package/web/_app/immutable/pkl-ot-7Btpt.js +1 -0
- package/web/_app/immutable/pkl-ot-7Btpt.js.map +1 -0
- package/web/_app/immutable/plsql-DGHpHOYJ.js +1 -0
- package/web/_app/immutable/plsql-DGHpHOYJ.js.map +1 -0
- package/web/_app/immutable/po-BiJDBrnU.js +1 -0
- package/web/_app/immutable/po-BiJDBrnU.js.map +1 -0
- package/web/_app/immutable/polar-C7UOKdEL.js +1 -0
- package/web/_app/immutable/polar-C7UOKdEL.js.map +1 -0
- package/web/_app/immutable/postcss-BXeXVLqQ.js +1 -0
- package/web/_app/immutable/postcss-BXeXVLqQ.js.map +1 -0
- package/web/_app/immutable/powerquery-DNMTfnFr.js +1 -0
- package/web/_app/immutable/powerquery-DNMTfnFr.js.map +1 -0
- package/web/_app/immutable/powershell-P_EDxnLM.js +3 -0
- package/web/_app/immutable/powershell-QtSnmXcu.js +1 -0
- package/web/_app/immutable/powershell-QtSnmXcu.js.map +1 -0
- package/web/_app/immutable/prisma-DMgNhnYS.js +1 -0
- package/web/_app/immutable/prisma-DMgNhnYS.js.map +1 -0
- package/web/_app/immutable/prolog-iXnhIJG7.js +1 -0
- package/web/_app/immutable/prolog-iXnhIJG7.js.map +1 -0
- package/web/_app/immutable/properties-BU6oMZgR.js +3 -0
- package/web/_app/immutable/proto-DB4EqR-F.js +1 -0
- package/web/_app/immutable/proto-DB4EqR-F.js.map +1 -0
- package/web/_app/immutable/protobuf-YtYabU99.js +3 -0
- package/web/_app/immutable/pug-B82BAu2D.js +1 -0
- package/web/_app/immutable/pug-B82BAu2D.js.map +1 -0
- package/web/_app/immutable/pug-CSoRkTgd.js +3 -0
- package/web/_app/immutable/puppet-CDv2pdJW.js +1 -0
- package/web/_app/immutable/puppet-CDv2pdJW.js.map +1 -0
- package/web/_app/immutable/puppet-CSoz6ZYf.js +3 -0
- package/web/_app/immutable/purescript-9MfHhQsQ.js +1 -0
- package/web/_app/immutable/purescript-9MfHhQsQ.js.map +1 -0
- package/web/_app/immutable/python-CKVHtkJn.js +3 -0
- package/web/_app/immutable/python-gzcpVVnB.js +1 -0
- package/web/_app/immutable/python-gzcpVVnB.js.map +1 -0
- package/web/_app/immutable/q-BXiRCsfC.js +3 -0
- package/web/_app/immutable/qml-BgDjLBZA.js +1 -0
- package/web/_app/immutable/qml-BgDjLBZA.js.map +1 -0
- package/web/_app/immutable/qmldir-DCQb3MpD.js +1 -0
- package/web/_app/immutable/qmldir-DCQb3MpD.js.map +1 -0
- package/web/_app/immutable/qss-Fe1Jh2GI.js +1 -0
- package/web/_app/immutable/qss-Fe1Jh2GI.js.map +1 -0
- package/web/_app/immutable/quadrantDiagram-D57K4MC3-DJRbaw3o.js +9 -0
- package/web/_app/immutable/r-CfKPBGJC.js +3 -0
- package/web/_app/immutable/r-o-ak98ML.js +1 -0
- package/web/_app/immutable/r-o-ak98ML.js.map +1 -0
- package/web/_app/immutable/racket-DcIDlBhZ.js +1 -0
- package/web/_app/immutable/racket-DcIDlBhZ.js.map +1 -0
- package/web/_app/immutable/radar-ABXABTNO-Dm7GM2G8.js +3 -0
- package/web/_app/immutable/railroad-I3PHUGI6-CCz1EImJ.js +3 -0
- package/web/_app/immutable/railroad-abnf-LNEFI6M7-C5vWy38p.js +3 -0
- package/web/_app/immutable/railroad-ebnf-DWYD2UWJ-B2sDa9eK.js +3 -0
- package/web/_app/immutable/railroad-peg-JR7BVNR7-CnXwBdoA.js +3 -0
- package/web/_app/immutable/railroadDiagram-Y72NRBL7-CnQW4u-p.js +3 -0
- package/web/_app/immutable/raku-B3gFvitq.js +1 -0
- package/web/_app/immutable/raku-B3gFvitq.js.map +1 -0
- package/web/_app/immutable/razor-DM3dJ4yc.js +1 -0
- package/web/_app/immutable/razor-DM3dJ4yc.js.map +1 -0
- package/web/_app/immutable/rbs-C0MpOrj4.js +1 -0
- package/web/_app/immutable/rbs-C0MpOrj4.js.map +1 -0
- package/web/_app/immutable/reg-CRGYupPL.js +1 -0
- package/web/_app/immutable/reg-CRGYupPL.js.map +1 -0
- package/web/_app/immutable/regexp-CdHOKcD8.js +1 -0
- package/web/_app/immutable/regexp-CdHOKcD8.js.map +1 -0
- package/web/_app/immutable/rel-BtDbiS_P.js +1 -0
- package/web/_app/immutable/rel-BtDbiS_P.js.map +1 -0
- package/web/_app/immutable/requirementDiagram-EQYSW5RA-Dp-CQjZq.js +86 -0
- package/web/_app/immutable/riscv-Ckw8ddFX.js +1 -0
- package/web/_app/immutable/riscv-Ckw8ddFX.js.map +1 -0
- package/web/_app/immutable/rolldown-runtime-C_fW_k0B.js +3 -0
- package/web/_app/immutable/ron-VUp2lXgN.js +1 -0
- package/web/_app/immutable/ron-VUp2lXgN.js.map +1 -0
- package/web/_app/immutable/rosmsg-CAekHB0j.js +1 -0
- package/web/_app/immutable/rosmsg-CAekHB0j.js.map +1 -0
- package/web/_app/immutable/rough.esm-BA52Di4H.js +3 -0
- package/web/_app/immutable/rpm-CDctpJTV.js +3 -0
- package/web/_app/immutable/rst-BB33gCuX.js +1 -0
- package/web/_app/immutable/rst-BB33gCuX.js.map +1 -0
- package/web/_app/immutable/ruby-C773dvp8.js +3 -0
- package/web/_app/immutable/ruby-CqDcvLtN.js +1 -0
- package/web/_app/immutable/ruby-CqDcvLtN.js.map +1 -0
- package/web/_app/immutable/rust-DpiIf5JO.js +1 -0
- package/web/_app/immutable/rust-DpiIf5JO.js.map +1 -0
- package/web/_app/immutable/sankeyDiagram-SY24JHO5-Cmb8PAXA.js +42 -0
- package/web/_app/immutable/sas-BZo7Mta_.js +3 -0
- package/web/_app/immutable/sas-CvgWo3eP.js +1 -0
- package/web/_app/immutable/sas-CvgWo3eP.js.map +1 -0
- package/web/_app/immutable/sass-DXrisJhu.js +1 -0
- package/web/_app/immutable/sass-DXrisJhu.js.map +1 -0
- package/web/_app/immutable/scala-BiFt_7mu.js +1 -0
- package/web/_app/immutable/scala-BiFt_7mu.js.map +1 -0
- package/web/_app/immutable/scheme-DQCgrYNe.js +1 -0
- package/web/_app/immutable/scheme-DQCgrYNe.js.map +1 -0
- package/web/_app/immutable/scheme-MEcmqcxy.js +3 -0
- package/web/_app/immutable/scss-CJIeNX1M.js +1 -0
- package/web/_app/immutable/scss-CJIeNX1M.js.map +1 -0
- package/web/_app/immutable/sdbl-bTVj8UrX.js +1 -0
- package/web/_app/immutable/sdbl-bTVj8UrX.js.map +1 -0
- package/web/_app/immutable/sequenceDiagram-BLEHNHQU-DkpB_1Np.js +171 -0
- package/web/_app/immutable/shaderlab-C4rnI7x0.js +1 -0
- package/web/_app/immutable/shaderlab-C4rnI7x0.js.map +1 -0
- package/web/_app/immutable/shell-hzrmymeH.js +3 -0
- package/web/_app/immutable/shellscript-4nLoH7OW.js +1 -0
- package/web/_app/immutable/shellscript-4nLoH7OW.js.map +1 -0
- package/web/_app/immutable/shellsession-Dm1R7cno.js +1 -0
- package/web/_app/immutable/shellsession-Dm1R7cno.js.map +1 -0
- package/web/_app/immutable/sieve-Cg_7ixZH.js +3 -0
- package/web/_app/immutable/simple-mode-CJKJiop-.js +3 -0
- package/web/_app/immutable/sizeCapture-INFHLROL-BcqOdubd.js +3 -0
- package/web/_app/immutable/smalltalk-BHpQb5nM.js +1 -0
- package/web/_app/immutable/smalltalk-BHpQb5nM.js.map +1 -0
- package/web/_app/immutable/smalltalk-GD-HUDv6.js +3 -0
- package/web/_app/immutable/smithy-Dgaz7aur.js +1 -0
- package/web/_app/immutable/smithy-Dgaz7aur.js.map +1 -0
- package/web/_app/immutable/solidity-Bj7E1mRn.js +1 -0
- package/web/_app/immutable/solidity-Bj7E1mRn.js.map +1 -0
- package/web/_app/immutable/solr-BhMrrIPf.js +3 -0
- package/web/_app/immutable/soy-DQbb2Quu.js +1 -0
- package/web/_app/immutable/soy-DQbb2Quu.js.map +1 -0
- package/web/_app/immutable/sparql-C0ia5K60.js +1 -0
- package/web/_app/immutable/sparql-C0ia5K60.js.map +1 -0
- package/web/_app/immutable/sparql-HWBjABJn.js +3 -0
- package/web/_app/immutable/splunk-BC2Px7Mm.js +1 -0
- package/web/_app/immutable/splunk-BC2Px7Mm.js.map +1 -0
- package/web/_app/immutable/spreadsheet-C1UGaDhD.js +3 -0
- package/web/_app/immutable/sql-CfwuKlF7.js +1 -0
- package/web/_app/immutable/sql-CfwuKlF7.js.map +1 -0
- package/web/_app/immutable/sql-LtfO1BuY.js +3 -0
- package/web/_app/immutable/src-BtUnLQSI.js +3 -0
- package/web/_app/immutable/ssh-config-BgfXC-Er.js +1 -0
- package/web/_app/immutable/ssh-config-BgfXC-Er.js.map +1 -0
- package/web/_app/immutable/stata-DskkaWpm.js +1 -0
- package/web/_app/immutable/stata-DskkaWpm.js.map +1 -0
- package/web/_app/immutable/stateDiagram-v2-A6IESKWZ-CSIqqrvn.js +293 -0
- package/web/_app/immutable/stex-BMLLWLpr.js +3 -0
- package/web/_app/immutable/stylus-B6D30XZt.js +1 -0
- package/web/_app/immutable/stylus-B6D30XZt.js.map +1 -0
- package/web/_app/immutable/stylus-CZ1pgMUJ.js +3 -0
- package/web/_app/immutable/surrealql-Cws8jYOZ.js +1 -0
- package/web/_app/immutable/surrealql-Cws8jYOZ.js.map +1 -0
- package/web/_app/immutable/svelte-DApMCx7L.js +1 -0
- package/web/_app/immutable/svelte-DApMCx7L.js.map +1 -0
- package/web/_app/immutable/swift-BRpvhHWl.js +3 -0
- package/web/_app/immutable/swift-CyEgAFGc.js +1 -0
- package/web/_app/immutable/swift-CyEgAFGc.js.map +1 -0
- package/web/_app/immutable/swimlanes-B3ENRKFQ-DX8ViZOh.js +3 -0
- package/web/_app/immutable/swimlanesDiagram-AYQRV4AK-CzMjyEGi.js +10 -0
- package/web/_app/immutable/system-verilog-Dh5ihWbf.js +1 -0
- package/web/_app/immutable/system-verilog-Dh5ihWbf.js.map +1 -0
- package/web/_app/immutable/systemd-BxMlprV5.js +1 -0
- package/web/_app/immutable/systemd-BxMlprV5.js.map +1 -0
- package/web/_app/immutable/talonscript-CohzipZa.js +1 -0
- package/web/_app/immutable/talonscript-CohzipZa.js.map +1 -0
- package/web/_app/immutable/tasl-DMoTqEGO.js +1 -0
- package/web/_app/immutable/tasl-DMoTqEGO.js.map +1 -0
- package/web/_app/immutable/tcl-9ZVXDr36.js +3 -0
- package/web/_app/immutable/tcl-CZd0xW_V.js +1 -0
- package/web/_app/immutable/tcl-CZd0xW_V.js.map +1 -0
- package/web/_app/immutable/templ-BJEVrOB6.js +1 -0
- package/web/_app/immutable/templ-BJEVrOB6.js.map +1 -0
- package/web/_app/immutable/terraform-DswuEJGm.js +1 -0
- package/web/_app/immutable/terraform-DswuEJGm.js.map +1 -0
- package/web/_app/immutable/tex-44TTskZ4.js +1 -0
- package/web/_app/immutable/tex-44TTskZ4.js.map +1 -0
- package/web/_app/immutable/textile-BtSmcwKm.js +3 -0
- package/web/_app/immutable/tiddlywiki-f0ieYQ50.js +3 -0
- package/web/_app/immutable/tiki-B_KaNjX4.js +3 -0
- package/web/_app/immutable/timeline-definition-JXYKGLGB-Dx6AuAzN.js +122 -0
- package/web/_app/immutable/toml-CcmNWLt0.js +1 -0
- package/web/_app/immutable/toml-CcmNWLt0.js.map +1 -0
- package/web/_app/immutable/toml-DYolAXzF.js +3 -0
- package/web/_app/immutable/treeView-D4JQ5SDB-C2gxW24u.js +3 -0
- package/web/_app/immutable/treemap-SAJKECNS-DO4VMWw6.js +3 -0
- package/web/_app/immutable/troff-ClUfk8Iv.js +3 -0
- package/web/_app/immutable/ts-tags-BLcTboWr.js +1 -0
- package/web/_app/immutable/ts-tags-BLcTboWr.js.map +1 -0
- package/web/_app/immutable/tsv-sltzmVWM.js +1 -0
- package/web/_app/immutable/tsv-sltzmVWM.js.map +1 -0
- package/web/_app/immutable/tsx-BmzqRn8I.js +1 -0
- package/web/_app/immutable/tsx-BmzqRn8I.js.map +1 -0
- package/web/_app/immutable/ttcn-DLXj6o61.js +3 -0
- package/web/_app/immutable/ttcn-cfg-DVKZi8bQ.js +3 -0
- package/web/_app/immutable/turtle-ByJddavk.js +1 -0
- package/web/_app/immutable/turtle-ByJddavk.js.map +1 -0
- package/web/_app/immutable/turtle-Ct6A0bdo.js +3 -0
- package/web/_app/immutable/twig-zklns4qc.js +1 -0
- package/web/_app/immutable/twig-zklns4qc.js.map +1 -0
- package/web/_app/immutable/typescript-BtV15tg4.js +1 -0
- package/web/_app/immutable/typescript-BtV15tg4.js.map +1 -0
- package/web/_app/immutable/typespec-BGhR2SqG.js +1 -0
- package/web/_app/immutable/typespec-BGhR2SqG.js.map +1 -0
- package/web/_app/immutable/typst-hGcnvufD.js +1 -0
- package/web/_app/immutable/typst-hGcnvufD.js.map +1 -0
- package/web/_app/immutable/usecaseDiagram-WPOLBNNX-CLFFGcss.js +330 -0
- package/web/_app/immutable/v-DBj4K9d_.js +1 -0
- package/web/_app/immutable/v-DBj4K9d_.js.map +1 -0
- package/web/_app/immutable/vala-zf12oZj6.js +1 -0
- package/web/_app/immutable/vala-zf12oZj6.js.map +1 -0
- package/web/_app/immutable/vb-Ci34WHBH.js +3 -0
- package/web/_app/immutable/vb-DOwzaHZ0.js +1 -0
- package/web/_app/immutable/vb-DOwzaHZ0.js.map +1 -0
- package/web/_app/immutable/vbscript-CEtpQYBE.js +3 -0
- package/web/_app/immutable/velocity-DdqX78Ib.js +3 -0
- package/web/_app/immutable/vennDiagram-Q3Y3IDCW-DbSAvSUd.js +36 -0
- package/web/_app/immutable/verilog-B2gwz-sJ.js +1 -0
- package/web/_app/immutable/verilog-B2gwz-sJ.js.map +1 -0
- package/web/_app/immutable/verilog-BCEqhcCV.js +3 -0
- package/web/_app/immutable/vhdl-BroJfC0k.js +1 -0
- package/web/_app/immutable/vhdl-BroJfC0k.js.map +1 -0
- package/web/_app/immutable/vhdl-Dl5xinTF.js +3 -0
- package/web/_app/immutable/viml-DvXPmvsu.js +1 -0
- package/web/_app/immutable/viml-DvXPmvsu.js.map +1 -0
- package/web/_app/immutable/vue-CgkKRImo.js +1 -0
- package/web/_app/immutable/vue-CgkKRImo.js.map +1 -0
- package/web/_app/immutable/vue-html-CbFw0MD5.js +1 -0
- package/web/_app/immutable/vue-html-CbFw0MD5.js.map +1 -0
- package/web/_app/immutable/vue-vine-oVViTwTK.js +1 -0
- package/web/_app/immutable/vue-vine-oVViTwTK.js.map +1 -0
- package/web/_app/immutable/vyper-CgoNMtux.js +1 -0
- package/web/_app/immutable/vyper-CgoNMtux.js.map +1 -0
- package/web/_app/immutable/wardley-7MLQ67FV-BTFCykfi.js +3 -0
- package/web/_app/immutable/wardleyDiagram-IVAIDKWA-jgZvtUh9.js +80 -0
- package/web/_app/immutable/wasm-ByWQv1Qj.js +1 -0
- package/web/_app/immutable/wasm-ByWQv1Qj.js.map +1 -0
- package/web/_app/immutable/webidl-7hMhIJ13.js +3 -0
- package/web/_app/immutable/wenyan-C8pVoKbM.js +1 -0
- package/web/_app/immutable/wenyan-C8pVoKbM.js.map +1 -0
- package/web/_app/immutable/wgsl-BsKzXJz4.js +1 -0
- package/web/_app/immutable/wgsl-BsKzXJz4.js.map +1 -0
- package/web/_app/immutable/wikitext-ClFFjSW2.js +1 -0
- package/web/_app/immutable/wikitext-ClFFjSW2.js.map +1 -0
- package/web/_app/immutable/wit-DdvCle-K.js +1 -0
- package/web/_app/immutable/wit-DdvCle-K.js.map +1 -0
- package/web/_app/immutable/wolfram-DLL8P-h_.js +1 -0
- package/web/_app/immutable/wolfram-DLL8P-h_.js.map +1 -0
- package/web/_app/immutable/xml-Dd84lC4x.js +1 -0
- package/web/_app/immutable/xml-Dd84lC4x.js.map +1 -0
- package/web/_app/immutable/xquery-A5RmxE7d.js +3 -0
- package/web/_app/immutable/xsl-DpVRuNau.js +1 -0
- package/web/_app/immutable/xsl-DpVRuNau.js.map +1 -0
- package/web/_app/immutable/xychartDiagram-4URNHDU4-CBIZ9An-.js +9 -0
- package/web/_app/immutable/yacas-DFu8eSdx.js +3 -0
- package/web/_app/immutable/yaml-BbX0PHMi.js +1 -0
- package/web/_app/immutable/yaml-BbX0PHMi.js.map +1 -0
- package/web/_app/immutable/z80-CnfcGk1c.js +3 -0
- package/web/_app/immutable/zenscript-BnlCZFoB.js +1 -0
- package/web/_app/immutable/zenscript-BnlCZFoB.js.map +1 -0
- package/web/_app/immutable/zig-CMLA9XwU.js +1 -0
- package/web/_app/immutable/zig-CMLA9XwU.js.map +1 -0
- package/web/apple-touch-icon.png +0 -0
- package/web/icon-512.png +0 -0
- package/web/index.html +18 -0
- package/web/kicad.svg +15 -0
- package/web/kicanvas/LICENSE.md +37 -0
- package/web/kicanvas/kicanvas.js +1915 -0
- package/web/kicanvas-viewer.html +130 -0
- package/web/logo.svg +1 -0
- package/web/manifest.webmanifest +12 -0
package/lib/update.js
ADDED
|
@@ -0,0 +1,1316 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { createHash } from 'node:crypto';
|
|
3
|
+
import { promises as fsPromises, readFileSync, realpathSync, statSync } from 'node:fs';
|
|
4
|
+
import os from 'node:os';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
|
|
7
|
+
import { installedNativeVersion } from './native.js';
|
|
8
|
+
|
|
9
|
+
export const PACKAGE_NAME = 'usesprocket';
|
|
10
|
+
|
|
11
|
+
// Global installs of the pre-rename package switch to PACKAGE_NAME on their next update.
|
|
12
|
+
export const LEGACY_PACKAGE_NAME = '@spikonado/sprocket';
|
|
13
|
+
|
|
14
|
+
export const UPDATE_API_FILENAME = 'update-api.js';
|
|
15
|
+
|
|
16
|
+
export const DEFAULT_REGISTRY = 'https://registry.npmjs.org';
|
|
17
|
+
|
|
18
|
+
export const RELAUNCH_MESSAGE = 'Update installed. Restart Sprocket to use it.';
|
|
19
|
+
|
|
20
|
+
export const RENAMED_MESSAGE = `Sprocket's npm package is now ${PACKAGE_NAME}. Updating switches to it.`;
|
|
21
|
+
|
|
22
|
+
export const UNSUPPORTED_MESSAGE =
|
|
23
|
+
'This copy of Sprocket was not installed globally with npm, bun, pnpm, or yarn, so it cannot be updated in place.';
|
|
24
|
+
|
|
25
|
+
const STABLE_VERSION = /^[0-9]+\.[0-9]+\.[0-9]+$/;
|
|
26
|
+
|
|
27
|
+
const CANARY_VERSION = /^[0-9]+\.[0-9]+\.[0-9]+-canary\.[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*$/;
|
|
28
|
+
|
|
29
|
+
const DEV_VERSION = /^[0-9]+\.[0-9]+\.[0-9]+-dev\.[0-9a-f]{40}$/;
|
|
30
|
+
|
|
31
|
+
const NUMERIC_IDENTIFIER = /^[0-9]+$/;
|
|
32
|
+
|
|
33
|
+
const QUERY_TIMEOUT_MS = 10_000;
|
|
34
|
+
|
|
35
|
+
const INSTALL_TIMEOUT_MS = 5 * 60 * 1000;
|
|
36
|
+
|
|
37
|
+
const FETCH_TIMEOUT_MS = 15_000;
|
|
38
|
+
|
|
39
|
+
const KILL_WAIT_MS = 5_000;
|
|
40
|
+
|
|
41
|
+
const OUTPUT_LIMIT = 1_000_000;
|
|
42
|
+
|
|
43
|
+
export const PACKAGE_ROOT = path.resolve(import.meta.dirname, '..');
|
|
44
|
+
|
|
45
|
+
const MANAGERS = [
|
|
46
|
+
{
|
|
47
|
+
name: 'bun',
|
|
48
|
+
queryArgs: ['pm', 'bin', '--global'],
|
|
49
|
+
installArgs: (spec) => ['add', '--global', spec],
|
|
50
|
+
removeArgs: (name) => ['remove', '--global', name],
|
|
51
|
+
globalRoot(queryStdout) {
|
|
52
|
+
const binDir = firstAbsolutePath(queryStdout);
|
|
53
|
+
|
|
54
|
+
return binDir ? path.resolve(binDir, '..', 'install', 'global', 'node_modules') : '';
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'pnpm',
|
|
59
|
+
queryArgs: ['root', '-g'],
|
|
60
|
+
installArgs: (spec) => ['add', '--global', spec],
|
|
61
|
+
removeArgs: (name) => ['remove', '--global', name],
|
|
62
|
+
globalRoot(queryStdout) {
|
|
63
|
+
return firstAbsolutePath(queryStdout);
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'yarn',
|
|
68
|
+
queryArgs: ['global', 'dir'],
|
|
69
|
+
installArgs: (spec) => ['global', 'add', spec],
|
|
70
|
+
removeArgs: (name) => ['global', 'remove', name],
|
|
71
|
+
globalRoot(queryStdout) {
|
|
72
|
+
const dir = firstAbsolutePath(queryStdout);
|
|
73
|
+
|
|
74
|
+
return dir ? path.join(dir, 'node_modules') : '';
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'npm',
|
|
79
|
+
queryArgs: ['root', '-g'],
|
|
80
|
+
installArgs: (spec) => ['install', '--global', spec],
|
|
81
|
+
removeArgs: (name) => ['uninstall', '--global', name],
|
|
82
|
+
globalRoot(queryStdout) {
|
|
83
|
+
return firstAbsolutePath(queryStdout);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
];
|
|
87
|
+
|
|
88
|
+
export function packageSpec(version, name = PACKAGE_NAME) {
|
|
89
|
+
return `${name}@${version}`;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function asText(value) {
|
|
93
|
+
if (value == null) {
|
|
94
|
+
return '';
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return `${value}`;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function parseVersionField(value) {
|
|
101
|
+
const text = asText(value).trim();
|
|
102
|
+
|
|
103
|
+
if (!text || text.length > 128) {
|
|
104
|
+
return '';
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return text;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function releaseChannel(version) {
|
|
111
|
+
const text = asText(version);
|
|
112
|
+
|
|
113
|
+
if (text.includes('-canary.')) {
|
|
114
|
+
return 'canary';
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (text.includes('-dev.')) {
|
|
118
|
+
return 'dev';
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return 'latest';
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function isAllowedVersion(version, channel) {
|
|
125
|
+
const text = parseVersionField(version);
|
|
126
|
+
|
|
127
|
+
if (!text) {
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
if (channel === 'canary') {
|
|
132
|
+
return CANARY_VERSION.test(text);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (channel === 'dev') {
|
|
136
|
+
return DEV_VERSION.test(text);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return STABLE_VERSION.test(text);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function compareReleaseVersions(left, right) {
|
|
143
|
+
const parsedLeft = parseComparable(left);
|
|
144
|
+
const parsedRight = parseComparable(right);
|
|
145
|
+
|
|
146
|
+
if (!parsedLeft || !parsedRight) {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
for (let index = 0; index < 3; index += 1) {
|
|
151
|
+
if (parsedLeft.core[index] < parsedRight.core[index]) {
|
|
152
|
+
return -1;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (parsedLeft.core[index] > parsedRight.core[index]) {
|
|
156
|
+
return 1;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return comparePrerelease(parsedLeft.pre, parsedRight.pre);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function channelUpdate(currentVersion, registryVersion) {
|
|
164
|
+
if (currentVersion === registryVersion) {
|
|
165
|
+
return { status: 'idle' };
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (releaseChannel(currentVersion) === 'dev') {
|
|
169
|
+
return { status: 'available', version: registryVersion };
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const comparison = compareReleaseVersions(registryVersion, currentVersion);
|
|
173
|
+
|
|
174
|
+
if (comparison == null) {
|
|
175
|
+
throw new Error('Could not compare the installed version with the registry version.');
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (comparison <= 0) {
|
|
179
|
+
return { status: 'idle' };
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return { status: 'available', version: registryVersion };
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export function makePayload(fields) {
|
|
186
|
+
return {
|
|
187
|
+
status: fields.status,
|
|
188
|
+
currentVersion: fields.currentVersion,
|
|
189
|
+
version: fields.version ?? null,
|
|
190
|
+
error: fields.error ?? null,
|
|
191
|
+
method: 'package',
|
|
192
|
+
message: fields.message ?? null
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function parseUpdateArgs(args) {
|
|
197
|
+
const command = args[0];
|
|
198
|
+
|
|
199
|
+
if (command !== 'update' && command !== 'upgrade') {
|
|
200
|
+
return { kind: 'none' };
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
let check = false;
|
|
204
|
+
|
|
205
|
+
for (const arg of args.slice(1)) {
|
|
206
|
+
if (arg === '--help' || arg === '-h') {
|
|
207
|
+
return { kind: 'native' };
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (arg === '--check') {
|
|
211
|
+
check = true;
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
return { kind: 'invalid', error: `Unknown option '${arg}'.` };
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
return { kind: 'run', check };
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export function globalPackageDir(globalRoot, name = PACKAGE_NAME) {
|
|
222
|
+
return path.join(globalRoot, ...name.split('/'));
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export function isManagedUpdate(env = {}) {
|
|
226
|
+
return asText(env.SPROCKET_UPDATE_MANAGED) === '1';
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export function taskkillPath(env = {}) {
|
|
230
|
+
const root = asText(env.SystemRoot || env.SYSTEMROOT);
|
|
231
|
+
|
|
232
|
+
if (!path.win32.isAbsolute(root))
|
|
233
|
+
throw new Error('SystemRoot is unavailable; cannot stop the update process tree.');
|
|
234
|
+
|
|
235
|
+
return path.win32.join(root, 'System32', 'taskkill.exe');
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export function timeoutRecoveryMessage(lockPath) {
|
|
239
|
+
return `Timed out while installing the update. Confirm no package manager is still running, delete ${lockPath}, then retry.`;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export function updateLockPath(host, globalRoot) {
|
|
243
|
+
const resolved = path.resolve(globalPackageDir(globalRoot));
|
|
244
|
+
const identity = host.platform === 'win32' ? resolved.toLowerCase() : resolved;
|
|
245
|
+
const id = createHash('sha256').update(identity).digest('hex').slice(0, 16);
|
|
246
|
+
|
|
247
|
+
return path.join(host.tmpdir(), `sprocket-update-${id}.lock`);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export function waitForClose(child, deadlineMs) {
|
|
251
|
+
return new Promise((resolve, reject) => {
|
|
252
|
+
if (child.exitCode != null || child.signalCode != null) {
|
|
253
|
+
resolve();
|
|
254
|
+
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
const finish = () => {
|
|
259
|
+
clearTimeout(timer);
|
|
260
|
+
child.off?.('error', fail);
|
|
261
|
+
resolve();
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
const fail = (error) => {
|
|
265
|
+
clearTimeout(timer);
|
|
266
|
+
child.off?.('close', finish);
|
|
267
|
+
reject(error);
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
const timer = setTimeout(() => {
|
|
271
|
+
child.off?.('close', finish);
|
|
272
|
+
child.off?.('error', fail);
|
|
273
|
+
reject(new Error('process did not exit'));
|
|
274
|
+
}, deadlineMs);
|
|
275
|
+
|
|
276
|
+
if (child.once) {
|
|
277
|
+
child.once('close', finish);
|
|
278
|
+
child.once('error', fail);
|
|
279
|
+
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
if (child.on) {
|
|
284
|
+
child.on('close', finish);
|
|
285
|
+
child.on('error', fail);
|
|
286
|
+
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
clearTimeout(timer);
|
|
291
|
+
resolve();
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export async function killProcessTree(child, platform = process.platform, extras = {}) {
|
|
296
|
+
const pid = child?.pid;
|
|
297
|
+
|
|
298
|
+
if (pid == null || pid <= 0) {
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const deadlineMs = extras.deadlineMs ?? KILL_WAIT_MS;
|
|
303
|
+
|
|
304
|
+
if (platform === 'win32') {
|
|
305
|
+
const spawnImpl = extras.spawn ?? spawn;
|
|
306
|
+
|
|
307
|
+
const killer = spawnImpl(
|
|
308
|
+
extras.taskkillPath ?? taskkillPath(extras.env),
|
|
309
|
+
['/PID', String(pid), '/T', '/F'],
|
|
310
|
+
{
|
|
311
|
+
shell: false,
|
|
312
|
+
windowsHide: true,
|
|
313
|
+
stdio: 'ignore',
|
|
314
|
+
timeout: deadlineMs,
|
|
315
|
+
killSignal: 'SIGKILL'
|
|
316
|
+
}
|
|
317
|
+
);
|
|
318
|
+
|
|
319
|
+
await Promise.all([waitForClose(killer, deadlineMs), waitForClose(child, deadlineMs)]);
|
|
320
|
+
|
|
321
|
+
if (killer.exitCode !== 0) throw new Error('taskkill could not stop the update process tree.');
|
|
322
|
+
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
try {
|
|
327
|
+
process.kill(-pid, 'SIGKILL');
|
|
328
|
+
} catch {
|
|
329
|
+
try {
|
|
330
|
+
child.kill('SIGKILL');
|
|
331
|
+
} catch {
|
|
332
|
+
try {
|
|
333
|
+
process.kill(pid, 'SIGKILL');
|
|
334
|
+
} catch {
|
|
335
|
+
// The process already exited.
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export function createRunCommand(spawnImpl, treeKiller = killProcessTree, selfKill) {
|
|
342
|
+
const killHelperGroup = selfKill ?? ((groupPid) => process.kill(groupPid, 'SIGKILL'));
|
|
343
|
+
|
|
344
|
+
return function runCommand(command, args, options = {}) {
|
|
345
|
+
return new Promise((resolve) => {
|
|
346
|
+
let settled = false;
|
|
347
|
+
let timingOut = false;
|
|
348
|
+
let timer;
|
|
349
|
+
let stdout = '';
|
|
350
|
+
let stderr = '';
|
|
351
|
+
const platform = options.platform ?? process.platform;
|
|
352
|
+
const managed = isManagedUpdate(options.env);
|
|
353
|
+
const killWaitMs = options.killWaitMs ?? KILL_WAIT_MS;
|
|
354
|
+
|
|
355
|
+
const done = (result) => {
|
|
356
|
+
if (settled) {
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
settled = true;
|
|
361
|
+
clearTimeout(timer);
|
|
362
|
+
resolve(result);
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
let child;
|
|
366
|
+
|
|
367
|
+
try {
|
|
368
|
+
child = spawnImpl(command, args, {
|
|
369
|
+
cwd: options.cwd,
|
|
370
|
+
env: options.env,
|
|
371
|
+
shell: false,
|
|
372
|
+
windowsHide: true,
|
|
373
|
+
detached: platform !== 'win32' && !managed,
|
|
374
|
+
stdio: ['ignore', 'pipe', 'pipe']
|
|
375
|
+
});
|
|
376
|
+
} catch (error) {
|
|
377
|
+
done({
|
|
378
|
+
status: 1,
|
|
379
|
+
stdout: '',
|
|
380
|
+
stderr: publicError(error),
|
|
381
|
+
error,
|
|
382
|
+
timedOut: false
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
child.stdout?.setEncoding('utf8');
|
|
389
|
+
child.stderr?.setEncoding('utf8');
|
|
390
|
+
child.stdout?.on('data', (chunk) => {
|
|
391
|
+
stdout = appendBounded(stdout, chunk);
|
|
392
|
+
});
|
|
393
|
+
child.stderr?.on('data', (chunk) => {
|
|
394
|
+
stderr = appendBounded(stderr, chunk);
|
|
395
|
+
});
|
|
396
|
+
child.on('error', (error) => {
|
|
397
|
+
if (timingOut) return;
|
|
398
|
+
done({
|
|
399
|
+
status: 1,
|
|
400
|
+
stdout,
|
|
401
|
+
stderr: appendBounded(stderr, publicError(error)),
|
|
402
|
+
error,
|
|
403
|
+
timedOut: false
|
|
404
|
+
});
|
|
405
|
+
});
|
|
406
|
+
child.on('close', (status) => {
|
|
407
|
+
if (!timingOut) done({ status: status ?? 1, stdout, stderr, timedOut: false });
|
|
408
|
+
});
|
|
409
|
+
|
|
410
|
+
if (options.timeout) {
|
|
411
|
+
timer = setTimeout(() => {
|
|
412
|
+
void finishTimeout();
|
|
413
|
+
}, options.timeout);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
async function finishTimeout() {
|
|
417
|
+
if (settled) {
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
timingOut = true;
|
|
422
|
+
|
|
423
|
+
if (managed && platform !== 'win32') {
|
|
424
|
+
try {
|
|
425
|
+
killHelperGroup(-process.pid);
|
|
426
|
+
} catch {
|
|
427
|
+
// Tests inject a no-op killer; production SIGKILL does not return.
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
done({
|
|
431
|
+
status: 1,
|
|
432
|
+
stdout,
|
|
433
|
+
stderr: appendBounded(stderr, 'Timed out.'),
|
|
434
|
+
timedOut: true,
|
|
435
|
+
uncertain: true
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
let uncertain = false;
|
|
442
|
+
|
|
443
|
+
try {
|
|
444
|
+
await treeKiller(child, platform, {
|
|
445
|
+
spawn: spawnImpl,
|
|
446
|
+
env: options.env,
|
|
447
|
+
deadlineMs: killWaitMs
|
|
448
|
+
});
|
|
449
|
+
} catch {
|
|
450
|
+
uncertain = true;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
child.stdout?.destroy();
|
|
454
|
+
child.stderr?.destroy();
|
|
455
|
+
|
|
456
|
+
try {
|
|
457
|
+
await waitForClose(child, killWaitMs);
|
|
458
|
+
} catch {
|
|
459
|
+
uncertain = true;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
done({
|
|
463
|
+
status: 1,
|
|
464
|
+
stdout,
|
|
465
|
+
stderr: appendBounded(stderr, 'Timed out.'),
|
|
466
|
+
timedOut: true,
|
|
467
|
+
uncertain
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
export function createHost(overrides = {}) {
|
|
475
|
+
const env = overrides.env ?? process.env;
|
|
476
|
+
const platform = overrides.platform ?? process.platform;
|
|
477
|
+
const execPath = overrides.execPath ?? process.execPath;
|
|
478
|
+
const packageRoot = overrides.packageRoot ?? PACKAGE_ROOT;
|
|
479
|
+
const readFile = overrides.readFile ?? ((file, encoding) => readFileSync(file, encoding));
|
|
480
|
+
const isFile = overrides.isFile ?? defaultIsFile;
|
|
481
|
+
|
|
482
|
+
const host = {
|
|
483
|
+
env,
|
|
484
|
+
platform,
|
|
485
|
+
execPath,
|
|
486
|
+
pid: overrides.pid ?? process.pid,
|
|
487
|
+
packageRoot,
|
|
488
|
+
currentVersion: overrides.currentVersion,
|
|
489
|
+
packageName: overrides.packageName,
|
|
490
|
+
nativeVersion: overrides.nativeVersion ?? installedNativeVersion,
|
|
491
|
+
tmpdir: overrides.tmpdir ?? (() => os.tmpdir()),
|
|
492
|
+
homedir: overrides.homedir ?? (() => os.homedir()),
|
|
493
|
+
fetch: overrides.fetch ?? globalThis.fetch.bind(globalThis),
|
|
494
|
+
runCommand: overrides.runCommand ?? createRunCommand(overrides.spawn ?? spawn),
|
|
495
|
+
isFile,
|
|
496
|
+
readFile,
|
|
497
|
+
realpath: overrides.realpath ?? defaultRealpath,
|
|
498
|
+
findExecutable:
|
|
499
|
+
overrides.findExecutable ?? ((name) => findExecutable(name, env, platform, isFile)),
|
|
500
|
+
open: overrides.open ?? ((file, flags) => fsPromises.open(file, flags)),
|
|
501
|
+
unlink: overrides.unlink ?? ((file) => fsPromises.unlink(file)),
|
|
502
|
+
writeStdout: overrides.writeStdout ?? ((text) => process.stdout.write(text)),
|
|
503
|
+
writeStderr: overrides.writeStderr ?? ((text) => process.stderr.write(text))
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
if (host.currentVersion === undefined) {
|
|
507
|
+
host.currentVersion = readCurrentVersion(host);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
if (host.packageName === undefined) {
|
|
511
|
+
host.packageName = readManifest(host)?.name ?? PACKAGE_NAME;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
return host;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
function readManifest(host) {
|
|
518
|
+
try {
|
|
519
|
+
return JSON.parse(host.readFile(path.join(host.packageRoot, 'package.json'), 'utf8'));
|
|
520
|
+
} catch {
|
|
521
|
+
return null;
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export function readCurrentVersion(host) {
|
|
526
|
+
const configured = parseVersionField(host.currentVersion);
|
|
527
|
+
|
|
528
|
+
if (configured) {
|
|
529
|
+
return configured;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
return parseVersionField(readManifest(host)?.version);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
export async function detectInstall(host) {
|
|
536
|
+
const packageRoot = path.resolve(host.packageRoot);
|
|
537
|
+
|
|
538
|
+
for (const manager of MANAGERS) {
|
|
539
|
+
const invocation = resolveManagerInvocation(manager.name, host);
|
|
540
|
+
|
|
541
|
+
if (!invocation) {
|
|
542
|
+
continue;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
const globalRoot = await queryGlobalRoot(manager, invocation, host);
|
|
546
|
+
|
|
547
|
+
if (!globalRoot) {
|
|
548
|
+
continue;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
if (isExactGlobalPackage(packageRoot, globalPackageDir(globalRoot, host.packageName), host)) {
|
|
552
|
+
return {
|
|
553
|
+
supported: true,
|
|
554
|
+
manager: manager.name,
|
|
555
|
+
command: invocation.command,
|
|
556
|
+
argsPrefix: invocation.argsPrefix,
|
|
557
|
+
globalRoot,
|
|
558
|
+
installArgs: manager.installArgs,
|
|
559
|
+
removeArgs: manager.removeArgs
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
return { supported: false };
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
export async function checkForUpdate(host) {
|
|
568
|
+
const currentVersion = readCurrentVersion(host);
|
|
569
|
+
const install = await detectInstall(host);
|
|
570
|
+
|
|
571
|
+
if (!install.supported) {
|
|
572
|
+
return makePayload({
|
|
573
|
+
status: 'unavailable',
|
|
574
|
+
currentVersion,
|
|
575
|
+
message: UNSUPPORTED_MESSAGE
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
const channel = releaseChannel(currentVersion);
|
|
580
|
+
const registryVersion = await fetchChannelVersion(host, channel, currentVersion);
|
|
581
|
+
|
|
582
|
+
if (host.packageName === LEGACY_PACKAGE_NAME) {
|
|
583
|
+
return makePayload({
|
|
584
|
+
status: 'available',
|
|
585
|
+
currentVersion,
|
|
586
|
+
version: registryVersion,
|
|
587
|
+
message: RENAMED_MESSAGE
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
const decision = channelUpdate(currentVersion, registryVersion);
|
|
592
|
+
|
|
593
|
+
if (decision.status === 'available') {
|
|
594
|
+
return makePayload({ status: 'available', currentVersion, version: decision.version });
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
if (host.nativeVersion() !== currentVersion) {
|
|
598
|
+
return makePayload({ status: 'available', currentVersion, version: currentVersion });
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
return makePayload({ status: 'idle', currentVersion });
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
export async function installUpdate(host) {
|
|
605
|
+
const currentVersion = readCurrentVersion(host);
|
|
606
|
+
const detected = await detectInstall(host);
|
|
607
|
+
|
|
608
|
+
if (!detected.supported) {
|
|
609
|
+
return makePayload({
|
|
610
|
+
status: 'unavailable',
|
|
611
|
+
currentVersion,
|
|
612
|
+
message: UNSUPPORTED_MESSAGE
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
const lockPath = updateLockPath(host, detected.globalRoot);
|
|
617
|
+
|
|
618
|
+
try {
|
|
619
|
+
return await withUpdateLock(host, lockPath, async () => {
|
|
620
|
+
const checked = await checkForUpdate(host);
|
|
621
|
+
|
|
622
|
+
if (checked.status !== 'available') {
|
|
623
|
+
return { payload: checked };
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
const install = await detectInstall(host);
|
|
627
|
+
|
|
628
|
+
if (!install.supported) {
|
|
629
|
+
return {
|
|
630
|
+
payload: makePayload({
|
|
631
|
+
status: 'unavailable',
|
|
632
|
+
currentVersion,
|
|
633
|
+
message: UNSUPPORTED_MESSAGE
|
|
634
|
+
})
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
if (!isAllowedVersion(checked.version, releaseChannel(currentVersion))) {
|
|
639
|
+
return {
|
|
640
|
+
payload: makePayload({
|
|
641
|
+
status: 'error',
|
|
642
|
+
currentVersion,
|
|
643
|
+
version: checked.version,
|
|
644
|
+
error: 'Refusing to install a version that failed validation.'
|
|
645
|
+
})
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
if (updateLockPath(host, install.globalRoot) !== lockPath) {
|
|
650
|
+
throw new Error('The installation location changed during the update check. Try again.');
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
const restartLauncher = path.resolve(globalPackageDir(install.globalRoot), 'bin/sprocket.js');
|
|
654
|
+
|
|
655
|
+
const runManager = (args) =>
|
|
656
|
+
host.runCommand(install.command, [...install.argsPrefix, ...args], {
|
|
657
|
+
cwd: host.homedir(),
|
|
658
|
+
env: host.env,
|
|
659
|
+
platform: host.platform,
|
|
660
|
+
timeout: INSTALL_TIMEOUT_MS
|
|
661
|
+
});
|
|
662
|
+
|
|
663
|
+
const failure = (result, suffix = '') => {
|
|
664
|
+
if (result.timedOut || result.uncertain) {
|
|
665
|
+
return {
|
|
666
|
+
retainLock: true,
|
|
667
|
+
payload: makePayload({
|
|
668
|
+
status: 'error',
|
|
669
|
+
currentVersion,
|
|
670
|
+
version: checked.version,
|
|
671
|
+
error: timeoutRecoveryMessage(lockPath)
|
|
672
|
+
})
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
return {
|
|
677
|
+
payload: makePayload({
|
|
678
|
+
status: 'error',
|
|
679
|
+
currentVersion,
|
|
680
|
+
version: checked.version,
|
|
681
|
+
error:
|
|
682
|
+
installFailureMessage(
|
|
683
|
+
`${result.stderr ?? ''}\n${result.stdout ?? ''}`,
|
|
684
|
+
host.platform
|
|
685
|
+
) + suffix
|
|
686
|
+
})
|
|
687
|
+
};
|
|
688
|
+
};
|
|
689
|
+
|
|
690
|
+
const succeeded = (result) =>
|
|
691
|
+
!result.timedOut && !result.uncertain && (result.status ?? 1) === 0;
|
|
692
|
+
|
|
693
|
+
const legacy = host.packageName === LEGACY_PACKAGE_NAME;
|
|
694
|
+
|
|
695
|
+
// Both packages own the `sprocket` bin, and npm refuses to overwrite another package's bin.
|
|
696
|
+
if (legacy) {
|
|
697
|
+
const removed = await runManager(install.removeArgs(LEGACY_PACKAGE_NAME));
|
|
698
|
+
|
|
699
|
+
if (!succeeded(removed)) {
|
|
700
|
+
return failure(removed);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
const result = await runManager(install.installArgs(packageSpec(checked.version)));
|
|
705
|
+
|
|
706
|
+
if (legacy && !result.timedOut && !result.uncertain && (result.status ?? 1) !== 0) {
|
|
707
|
+
const restored = await runManager(
|
|
708
|
+
install.installArgs(packageSpec(currentVersion, LEGACY_PACKAGE_NAME))
|
|
709
|
+
);
|
|
710
|
+
|
|
711
|
+
if (restored.timedOut || restored.uncertain) {
|
|
712
|
+
return failure(restored);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
return failure(
|
|
716
|
+
result,
|
|
717
|
+
succeeded(restored)
|
|
718
|
+
? ''
|
|
719
|
+
: ` Sprocket is no longer installed; run \`${install.manager} ${install.installArgs(PACKAGE_NAME).join(' ')}\`.`
|
|
720
|
+
);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
if (!succeeded(result)) {
|
|
724
|
+
return failure(result);
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
const launcherCheck = await host.runCommand(host.execPath, [restartLauncher, '--version'], {
|
|
728
|
+
cwd: host.homedir(),
|
|
729
|
+
env: host.env,
|
|
730
|
+
platform: host.platform,
|
|
731
|
+
timeout: QUERY_TIMEOUT_MS
|
|
732
|
+
});
|
|
733
|
+
|
|
734
|
+
if (launcherCheck.timedOut || (launcherCheck.status ?? 1) !== 0) {
|
|
735
|
+
return {
|
|
736
|
+
payload: makePayload({
|
|
737
|
+
status: 'error',
|
|
738
|
+
currentVersion,
|
|
739
|
+
version: checked.version,
|
|
740
|
+
error: `Sprocket ${checked.version} was installed but cannot start: ${sanitize(launcherCheck.stderr) || 'the launcher check failed'}`
|
|
741
|
+
})
|
|
742
|
+
};
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
return {
|
|
746
|
+
payload: {
|
|
747
|
+
...makePayload({
|
|
748
|
+
status: 'installed',
|
|
749
|
+
currentVersion,
|
|
750
|
+
version: checked.version,
|
|
751
|
+
message: RELAUNCH_MESSAGE
|
|
752
|
+
}),
|
|
753
|
+
restartLauncher
|
|
754
|
+
}
|
|
755
|
+
};
|
|
756
|
+
});
|
|
757
|
+
} catch (error) {
|
|
758
|
+
return makePayload({
|
|
759
|
+
status: 'error',
|
|
760
|
+
currentVersion,
|
|
761
|
+
error: publicError(error)
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
export async function runUpdateApi(command, host = createHost()) {
|
|
767
|
+
const currentVersion = readCurrentVersion(host);
|
|
768
|
+
|
|
769
|
+
try {
|
|
770
|
+
if (command !== 'check' && command !== 'install') {
|
|
771
|
+
return {
|
|
772
|
+
exitCode: 1,
|
|
773
|
+
payload: makePayload({
|
|
774
|
+
status: 'error',
|
|
775
|
+
currentVersion,
|
|
776
|
+
error: 'Usage: check or install.'
|
|
777
|
+
})
|
|
778
|
+
};
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
const payload = command === 'check' ? await checkForUpdate(host) : await installUpdate(host);
|
|
782
|
+
|
|
783
|
+
return {
|
|
784
|
+
exitCode: payload.status === 'error' ? 1 : 0,
|
|
785
|
+
payload
|
|
786
|
+
};
|
|
787
|
+
} catch (error) {
|
|
788
|
+
return {
|
|
789
|
+
exitCode: 1,
|
|
790
|
+
payload: makePayload({
|
|
791
|
+
status: 'error',
|
|
792
|
+
currentVersion,
|
|
793
|
+
error: publicError(error)
|
|
794
|
+
})
|
|
795
|
+
};
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
export async function runUpdateCli(parsed, host = createHost()) {
|
|
800
|
+
if (parsed.kind === 'invalid') {
|
|
801
|
+
host.writeStderr(`sprocket: ${parsed.error}\nTry \`sprocket update --help\`.\n`);
|
|
802
|
+
|
|
803
|
+
return 1;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
try {
|
|
807
|
+
const payload = parsed.check ? await checkForUpdate(host) : await installUpdate(host);
|
|
808
|
+
|
|
809
|
+
if (payload.status === 'error') {
|
|
810
|
+
host.writeStderr(`sprocket: ${payload.error}\n`);
|
|
811
|
+
|
|
812
|
+
return 1;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
host.writeStdout(formatCli(payload, parsed.check));
|
|
816
|
+
|
|
817
|
+
return payload.status === 'unavailable' ? 1 : 0;
|
|
818
|
+
} catch (error) {
|
|
819
|
+
host.writeStderr(`sprocket: ${publicError(error)}\n`);
|
|
820
|
+
|
|
821
|
+
return 1;
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
export function registryUrl(env = {}) {
|
|
826
|
+
const values = [env.npm_config_registry, env.NPM_CONFIG_REGISTRY].flatMap((value) => {
|
|
827
|
+
const text = asText(value).trim();
|
|
828
|
+
|
|
829
|
+
return text ? [text] : [];
|
|
830
|
+
});
|
|
831
|
+
|
|
832
|
+
for (const value of values) {
|
|
833
|
+
let url;
|
|
834
|
+
|
|
835
|
+
try {
|
|
836
|
+
url = new URL(value);
|
|
837
|
+
} catch {
|
|
838
|
+
throw new Error('Package updates require a valid HTTPS npm registry URL.');
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
if (url.protocol !== 'https:' || /\s/.test(value) || url.search || url.hash) {
|
|
842
|
+
throw new Error('Package updates require a valid HTTPS npm registry URL.');
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
return values[0]?.replace(/\/$/, '') ?? DEFAULT_REGISTRY;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
export function channelManifestUrl(registry, channel, name = PACKAGE_NAME) {
|
|
850
|
+
const base = registry.replace(/\/$/, '');
|
|
851
|
+
const encodedName = encodeURIComponent(name);
|
|
852
|
+
|
|
853
|
+
return `${base}/${encodedName}/${encodeURIComponent(channel)}`;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
export async function withUpdateLock(host, lockPath, operation) {
|
|
857
|
+
let handle;
|
|
858
|
+
|
|
859
|
+
try {
|
|
860
|
+
handle = await host.open(lockPath, 'wx');
|
|
861
|
+
} catch (error) {
|
|
862
|
+
if (error?.code === 'EEXIST') {
|
|
863
|
+
throw new Error(
|
|
864
|
+
`Another Sprocket update is already running. If it is not, delete ${lockPath} and retry.`,
|
|
865
|
+
{ cause: error }
|
|
866
|
+
);
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
if (error?.code === 'EACCES' || error?.code === 'EPERM') {
|
|
870
|
+
throw new Error(`Cannot write the update lock at ${lockPath}. Check permissions and retry.`, {
|
|
871
|
+
cause: error
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
throw error;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
let retainLock = false;
|
|
879
|
+
|
|
880
|
+
try {
|
|
881
|
+
await handle.writeFile(String(host.pid));
|
|
882
|
+
const outcome = await operation();
|
|
883
|
+
retainLock = outcome?.retainLock === true;
|
|
884
|
+
|
|
885
|
+
return outcome?.payload ?? outcome;
|
|
886
|
+
} finally {
|
|
887
|
+
await handle.close().catch(() => {});
|
|
888
|
+
|
|
889
|
+
if (!retainLock) {
|
|
890
|
+
await host.unlink(lockPath).catch(() => {});
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
function formatCli(payload, check) {
|
|
896
|
+
if (payload.status === 'unavailable') {
|
|
897
|
+
return `${payload.message ?? UNSUPPORTED_MESSAGE}\n`;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
if (payload.status === 'idle') {
|
|
901
|
+
return `Sprocket ${payload.currentVersion} is up to date (${releaseChannel(payload.currentVersion)} channel).\n`;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
if (payload.status === 'available') {
|
|
905
|
+
const lines = [
|
|
906
|
+
`Sprocket ${payload.version} is available (currently ${payload.currentVersion}).`
|
|
907
|
+
];
|
|
908
|
+
|
|
909
|
+
if (payload.message) {
|
|
910
|
+
lines.push(payload.message);
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
if (check) {
|
|
914
|
+
lines.push('Run `sprocket update` to install it.');
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
return `${lines.join('\n')}\n`;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
if (payload.status === 'installed') {
|
|
921
|
+
return `Updated Sprocket to ${payload.version}.\n${payload.message ?? RELAUNCH_MESSAGE}\n`;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
return '';
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
async function fetchChannelVersion(host, channel, currentVersion) {
|
|
928
|
+
const url = channelManifestUrl(registryUrl(host.env), channel);
|
|
929
|
+
let response;
|
|
930
|
+
|
|
931
|
+
try {
|
|
932
|
+
response = await host.fetch(url, {
|
|
933
|
+
redirect: 'error',
|
|
934
|
+
headers: {
|
|
935
|
+
accept: 'application/json',
|
|
936
|
+
'user-agent': `sprocket/${currentVersion || '0'}`
|
|
937
|
+
},
|
|
938
|
+
signal: AbortSignal.timeout(FETCH_TIMEOUT_MS)
|
|
939
|
+
});
|
|
940
|
+
} catch {
|
|
941
|
+
throw new Error('Could not reach the npm registry. Try again.');
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
if (!response.ok) {
|
|
945
|
+
throw new Error(`npm registry returned HTTP ${response.status}.`);
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
let body;
|
|
949
|
+
|
|
950
|
+
try {
|
|
951
|
+
body = await response.json();
|
|
952
|
+
} catch {
|
|
953
|
+
throw new Error('npm registry returned an invalid package document.');
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
const version = parseVersionField(body?.version);
|
|
957
|
+
|
|
958
|
+
if (!isAllowedVersion(version, channel)) {
|
|
959
|
+
throw new Error(`npm dist-tag '${channel}' does not point at a valid ${channel} release.`);
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
return version;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
function isExactGlobalPackage(packageRoot, expected, host) {
|
|
966
|
+
const actual = pathIdentities(host, packageRoot);
|
|
967
|
+
|
|
968
|
+
for (const candidate of pathIdentities(host, expected)) {
|
|
969
|
+
if (actual.has(candidate)) {
|
|
970
|
+
return true;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
return false;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
function pathIdentities(host, file) {
|
|
978
|
+
const identities = new Set([normalizePath(file, host.platform)]);
|
|
979
|
+
identities.add(normalizePath(tryRealpath(host, file), host.platform));
|
|
980
|
+
|
|
981
|
+
return identities;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
function normalizePath(file, platform) {
|
|
985
|
+
const resolved = path.resolve(file);
|
|
986
|
+
|
|
987
|
+
return platform === 'win32' ? resolved.toLowerCase() : resolved;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
function resolveManagerInvocation(manager, host) {
|
|
991
|
+
const execDir = path.dirname(host.execPath);
|
|
992
|
+
const execBase = path.basename(host.execPath, '.exe').toLowerCase();
|
|
993
|
+
|
|
994
|
+
if (manager === 'bun' && execBase === 'bun') {
|
|
995
|
+
return { command: host.execPath, argsPrefix: [] };
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
if (manager === 'npm') {
|
|
999
|
+
const npmCli = path.join(execDir, 'node_modules', 'npm', 'bin', 'npm-cli.js');
|
|
1000
|
+
|
|
1001
|
+
if (host.isFile(npmCli)) {
|
|
1002
|
+
return { command: host.execPath, argsPrefix: [npmCli] };
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
const npmExecPath = asText(host.env.npm_execpath);
|
|
1006
|
+
|
|
1007
|
+
if (
|
|
1008
|
+
npmExecPath &&
|
|
1009
|
+
isAbsolutePath(npmExecPath, host.platform) &&
|
|
1010
|
+
host.isFile(npmExecPath) &&
|
|
1011
|
+
/npm-cli\.js$/i.test(npmExecPath)
|
|
1012
|
+
) {
|
|
1013
|
+
return { command: host.execPath, argsPrefix: [npmExecPath] };
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
const found = host.findExecutable(manager);
|
|
1018
|
+
|
|
1019
|
+
if (!found) {
|
|
1020
|
+
return null;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
return spawnPlan(found, manager, host);
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
function spawnPlan(binary, manager, host) {
|
|
1027
|
+
if (/\.(cjs|js|mjs)$/i.test(binary)) {
|
|
1028
|
+
return { command: host.execPath, argsPrefix: [binary] };
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
if (host.platform === 'win32' && /\.(cmd|bat)$/i.test(binary)) {
|
|
1032
|
+
const jsCli = jsCliBesideShim(binary, manager, host);
|
|
1033
|
+
|
|
1034
|
+
if (jsCli) {
|
|
1035
|
+
return { command: host.execPath, argsPrefix: [jsCli] };
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
return null;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
return { command: binary, argsPrefix: [] };
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
function jsCliBesideShim(binary, manager, host) {
|
|
1045
|
+
const dir = path.dirname(binary);
|
|
1046
|
+
|
|
1047
|
+
const candidates =
|
|
1048
|
+
manager === 'npm'
|
|
1049
|
+
? [path.join(dir, 'node_modules', 'npm', 'bin', 'npm-cli.js'), path.join(dir, 'npm-cli.js')]
|
|
1050
|
+
: manager === 'pnpm'
|
|
1051
|
+
? [path.join(dir, 'pnpm.cjs'), path.join(dir, 'node_modules', 'pnpm', 'bin', 'pnpm.cjs')]
|
|
1052
|
+
: manager === 'yarn'
|
|
1053
|
+
? [path.join(dir, 'yarn.js'), path.join(dir, 'node_modules', 'yarn', 'bin', 'yarn.js')]
|
|
1054
|
+
: [];
|
|
1055
|
+
|
|
1056
|
+
return candidates.find((candidate) => host.isFile(candidate));
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
async function queryGlobalRoot(manager, invocation, host) {
|
|
1060
|
+
const result = await host.runCommand(
|
|
1061
|
+
invocation.command,
|
|
1062
|
+
[...invocation.argsPrefix, ...manager.queryArgs],
|
|
1063
|
+
{
|
|
1064
|
+
cwd: host.homedir(),
|
|
1065
|
+
env: {
|
|
1066
|
+
...host.env,
|
|
1067
|
+
COREPACK_ENABLE_NETWORK: '0',
|
|
1068
|
+
COREPACK_ENABLE_DOWNLOAD_PROMPT: '0'
|
|
1069
|
+
},
|
|
1070
|
+
platform: host.platform,
|
|
1071
|
+
timeout: QUERY_TIMEOUT_MS
|
|
1072
|
+
}
|
|
1073
|
+
);
|
|
1074
|
+
|
|
1075
|
+
if ((result.status ?? 1) !== 0) {
|
|
1076
|
+
return '';
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
const globalRoot = manager.globalRoot(result.stdout ?? '');
|
|
1080
|
+
|
|
1081
|
+
if (!globalRoot || globalRoot.includes('\0')) {
|
|
1082
|
+
return '';
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
return path.resolve(globalRoot);
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
function parseComparable(version) {
|
|
1089
|
+
const text = asText(version);
|
|
1090
|
+
|
|
1091
|
+
if (STABLE_VERSION.test(text)) {
|
|
1092
|
+
const [major, minor, patch] = text.split('.');
|
|
1093
|
+
|
|
1094
|
+
return { core: [Number(major), Number(minor), Number(patch)], pre: [] };
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
if (!CANARY_VERSION.test(text)) {
|
|
1098
|
+
return null;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
const marker = '-canary.';
|
|
1102
|
+
const index = text.indexOf(marker);
|
|
1103
|
+
const [major, minor, patch] = text.slice(0, index).split('.');
|
|
1104
|
+
|
|
1105
|
+
return {
|
|
1106
|
+
core: [Number(major), Number(minor), Number(patch)],
|
|
1107
|
+
pre: ['canary', ...text.slice(index + marker.length).split('.')]
|
|
1108
|
+
};
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
function comparePrerelease(left, right) {
|
|
1112
|
+
if (left.length === 0 && right.length === 0) {
|
|
1113
|
+
return 0;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
if (left.length === 0) {
|
|
1117
|
+
return 1;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
if (right.length === 0) {
|
|
1121
|
+
return -1;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
const length = Math.max(left.length, right.length);
|
|
1125
|
+
|
|
1126
|
+
for (let index = 0; index < length; index += 1) {
|
|
1127
|
+
if (index >= left.length) {
|
|
1128
|
+
return -1;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
if (index >= right.length) {
|
|
1132
|
+
return 1;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
const comparison = compareIdentifier(left[index], right[index]);
|
|
1136
|
+
|
|
1137
|
+
if (comparison !== 0) {
|
|
1138
|
+
return comparison;
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
return 0;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
function compareIdentifier(left, right) {
|
|
1146
|
+
const leftNumeric = NUMERIC_IDENTIFIER.test(left);
|
|
1147
|
+
const rightNumeric = NUMERIC_IDENTIFIER.test(right);
|
|
1148
|
+
|
|
1149
|
+
if (leftNumeric && rightNumeric) {
|
|
1150
|
+
const delta = Number(left) - Number(right);
|
|
1151
|
+
|
|
1152
|
+
if (delta < 0) {
|
|
1153
|
+
return -1;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
if (delta > 0) {
|
|
1157
|
+
return 1;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
return 0;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
if (leftNumeric) {
|
|
1164
|
+
return -1;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
if (rightNumeric) {
|
|
1168
|
+
return 1;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
if (left < right) {
|
|
1172
|
+
return -1;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
if (left > right) {
|
|
1176
|
+
return 1;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
return 0;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
function installFailureMessage(output, platform) {
|
|
1183
|
+
if (isWindowsBusyExecutable(output, platform)) {
|
|
1184
|
+
return 'Windows cannot replace Sprocket while it is running. Stop Sprocket, then run `sprocket update` again.';
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
const lines = output
|
|
1188
|
+
.split(/\r?\n/)
|
|
1189
|
+
.map((line) => line.trim())
|
|
1190
|
+
.filter(Boolean);
|
|
1191
|
+
|
|
1192
|
+
const useful = lines
|
|
1193
|
+
.filter((line) => /npm ERR!|error|ERR!|EACCES|EPERM|EBUSY|denied|ELIFECYCLE/i.test(line))
|
|
1194
|
+
.slice(-5);
|
|
1195
|
+
|
|
1196
|
+
const detail = useful.join(' ') || 'the package manager failed';
|
|
1197
|
+
|
|
1198
|
+
return `Failed to install the update: ${sanitize(detail)}`;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
export function isWindowsBusyExecutable(output, platform) {
|
|
1202
|
+
if (platform !== 'win32') {
|
|
1203
|
+
return false;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
return (
|
|
1207
|
+
/sprocket\.exe/i.test(output) &&
|
|
1208
|
+
/(?:EBUSY|EPERM|EACCES|being used by another process|resource busy|locked)/i.test(output)
|
|
1209
|
+
);
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
function publicError(error) {
|
|
1213
|
+
if (error instanceof Error) {
|
|
1214
|
+
return sanitize(error.message);
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
return sanitize(asText(error));
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
function sanitize(text) {
|
|
1221
|
+
return asText(text).replace(/\s+/g, ' ').trim().slice(0, 500);
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
function isAbsolutePath(file, platform) {
|
|
1225
|
+
if (platform === 'win32') {
|
|
1226
|
+
return path.win32.isAbsolute(file) || /^[a-zA-Z]:[\\/]/.test(file) || file.startsWith('\\\\');
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
return path.isAbsolute(file);
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
function findExecutable(name, env, platform, isFile) {
|
|
1233
|
+
const pathValue = asText(env.PATH || env.Path || env.path);
|
|
1234
|
+
const directories = pathValue.split(path.delimiter);
|
|
1235
|
+
|
|
1236
|
+
const extensions =
|
|
1237
|
+
platform === 'win32'
|
|
1238
|
+
? asText(env.PATHEXT || '.EXE;.CMD;.BAT;.COM')
|
|
1239
|
+
.split(';')
|
|
1240
|
+
.filter(Boolean)
|
|
1241
|
+
: [''];
|
|
1242
|
+
|
|
1243
|
+
for (const directory of directories) {
|
|
1244
|
+
if (!directory || !isAbsolutePath(directory, platform)) {
|
|
1245
|
+
continue;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
if (platform === 'win32') {
|
|
1249
|
+
const exact = path.join(directory, name);
|
|
1250
|
+
|
|
1251
|
+
if (isFile(exact)) {
|
|
1252
|
+
return exact;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
for (const extension of extensions) {
|
|
1256
|
+
const candidate = path.join(directory, name + extension);
|
|
1257
|
+
|
|
1258
|
+
if (isFile(candidate)) {
|
|
1259
|
+
return candidate;
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
continue;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
const candidate = path.join(directory, name);
|
|
1267
|
+
|
|
1268
|
+
if (isFile(candidate)) {
|
|
1269
|
+
return candidate;
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
return undefined;
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
function defaultIsFile(file) {
|
|
1277
|
+
try {
|
|
1278
|
+
return statSync(file).isFile();
|
|
1279
|
+
} catch {
|
|
1280
|
+
return false;
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
function defaultRealpath(file) {
|
|
1285
|
+
return realpathSync(file);
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
function tryRealpath(host, file) {
|
|
1289
|
+
try {
|
|
1290
|
+
return host.realpath(file);
|
|
1291
|
+
} catch {
|
|
1292
|
+
return file;
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
function firstAbsolutePath(text) {
|
|
1297
|
+
for (const line of asText(text).split(/\r?\n/)) {
|
|
1298
|
+
const trimmed = line.trim();
|
|
1299
|
+
|
|
1300
|
+
if (!trimmed || trimmed.includes('\0')) {
|
|
1301
|
+
continue;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
if (path.isAbsolute(trimmed) || /^[a-zA-Z]:[\\/]/.test(trimmed) || trimmed.startsWith('\\\\')) {
|
|
1305
|
+
return trimmed;
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
return '';
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
function appendBounded(previous, chunk) {
|
|
1313
|
+
const next = previous + chunk;
|
|
1314
|
+
|
|
1315
|
+
return next.length > OUTPUT_LIMIT ? next.slice(next.length - OUTPUT_LIMIT) : next;
|
|
1316
|
+
}
|