@keystrokehq/platform 0.0.0-staging-20260714181321
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 +13 -0
- package/README.md +63 -0
- package/dist/alias-RTYYYW3D-CGfkaHCa.mjs +97 -0
- package/dist/alias-RTYYYW3D-CGfkaHCa.mjs.map +1 -0
- package/dist/alias-RTYYYW3D-eAP6l98p.cjs +98 -0
- package/dist/alias-RTYYYW3D-eAP6l98p.cjs.map +1 -0
- package/dist/awk2-LA3USKJP-pKmGobcZ.cjs +2732 -0
- package/dist/awk2-LA3USKJP-pKmGobcZ.cjs.map +1 -0
- package/dist/awk2-LA3USKJP-pnoNftT8.mjs +2732 -0
- package/dist/awk2-LA3USKJP-pnoNftT8.mjs.map +1 -0
- package/dist/base64-C2AIWVNC-CrtpD1na.cjs +122 -0
- package/dist/base64-C2AIWVNC-CrtpD1na.cjs.map +1 -0
- package/dist/base64-C2AIWVNC-CyAyrmOE.mjs +122 -0
- package/dist/base64-C2AIWVNC-CyAyrmOE.mjs.map +1 -0
- package/dist/basename-UB3CIYNI--0bze3Ml.cjs +52 -0
- package/dist/basename-UB3CIYNI--0bze3Ml.cjs.map +1 -0
- package/dist/basename-UB3CIYNI-DUyGGC_4.mjs +52 -0
- package/dist/basename-UB3CIYNI-DUyGGC_4.mjs.map +1 -0
- package/dist/bash-YZ33HQZQ-Bft3qmnm.mjs +116 -0
- package/dist/bash-YZ33HQZQ-Bft3qmnm.mjs.map +1 -0
- package/dist/bash-YZ33HQZQ-DLA5dK37.cjs +117 -0
- package/dist/bash-YZ33HQZQ-DLA5dK37.cjs.map +1 -0
- package/dist/cat-TSFMZVYS-BaKHr4U0.cjs +61 -0
- package/dist/cat-TSFMZVYS-BaKHr4U0.cjs.map +1 -0
- package/dist/cat-TSFMZVYS-CblTQ5QR.mjs +61 -0
- package/dist/cat-TSFMZVYS-CblTQ5QR.mjs.map +1 -0
- package/dist/chmod-TFEPA42X-Cmt6YbbQ.cjs +124 -0
- package/dist/chmod-TFEPA42X-Cmt6YbbQ.cjs.map +1 -0
- package/dist/chmod-TFEPA42X-DKe_HF9R.mjs +124 -0
- package/dist/chmod-TFEPA42X-DKe_HF9R.mjs.map +1 -0
- package/dist/chunk-27JIFWUR-C_jDOm1q.mjs +99 -0
- package/dist/chunk-27JIFWUR-C_jDOm1q.mjs.map +1 -0
- package/dist/chunk-27JIFWUR-CyXQ6J5p.cjs +115 -0
- package/dist/chunk-27JIFWUR-CyXQ6J5p.cjs.map +1 -0
- package/dist/chunk-4I3HOE5Z-BYotzP2w.mjs +718 -0
- package/dist/chunk-4I3HOE5Z-BYotzP2w.mjs.map +1 -0
- package/dist/chunk-4I3HOE5Z-CGJlGU0s.cjs +722 -0
- package/dist/chunk-4I3HOE5Z-CGJlGU0s.cjs.map +1 -0
- package/dist/chunk-4WKZNNJK-CuElmTiB.cjs +114 -0
- package/dist/chunk-4WKZNNJK-CuElmTiB.cjs.map +1 -0
- package/dist/chunk-4WKZNNJK-x25SBHbd.mjs +68 -0
- package/dist/chunk-4WKZNNJK-x25SBHbd.mjs.map +1 -0
- package/dist/chunk-5H5SCKJM-J5-RMqlK.cjs +611 -0
- package/dist/chunk-5H5SCKJM-J5-RMqlK.cjs.map +1 -0
- package/dist/chunk-5H5SCKJM-gg7VwICJ.mjs +601 -0
- package/dist/chunk-5H5SCKJM-gg7VwICJ.mjs.map +1 -0
- package/dist/chunk-AQ6FYS2X-BTQ2ZWeh.cjs +40 -0
- package/dist/chunk-AQ6FYS2X-BTQ2ZWeh.cjs.map +1 -0
- package/dist/chunk-AQ6FYS2X-CrZWHyzD.mjs +36 -0
- package/dist/chunk-AQ6FYS2X-CrZWHyzD.mjs.map +1 -0
- package/dist/chunk-BZUGFHVS-7RRM7Jpb.cjs +67 -0
- package/dist/chunk-BZUGFHVS-7RRM7Jpb.cjs.map +1 -0
- package/dist/chunk-BZUGFHVS-B2NchobP.mjs +33 -0
- package/dist/chunk-BZUGFHVS-B2NchobP.mjs.map +1 -0
- package/dist/chunk-CHFEPBH4-CINsrE8W.mjs +593 -0
- package/dist/chunk-CHFEPBH4-CINsrE8W.mjs.map +1 -0
- package/dist/chunk-CHFEPBH4-CPiu5G3a.cjs +609 -0
- package/dist/chunk-CHFEPBH4-CPiu5G3a.cjs.map +1 -0
- package/dist/chunk-EBAPSGAO-C93v3qzT.mjs +246 -0
- package/dist/chunk-EBAPSGAO-C93v3qzT.mjs.map +1 -0
- package/dist/chunk-EBAPSGAO-DZoiCbGH.cjs +250 -0
- package/dist/chunk-EBAPSGAO-DZoiCbGH.cjs.map +1 -0
- package/dist/chunk-LEKBROJD-BuX8Z517.mjs +3109 -0
- package/dist/chunk-LEKBROJD-BuX8Z517.mjs.map +1 -0
- package/dist/chunk-LEKBROJD-hm07oWvp.cjs +3119 -0
- package/dist/chunk-LEKBROJD-hm07oWvp.cjs.map +1 -0
- package/dist/chunk-QAYAQNCG-B1r1SmqS.mjs +62 -0
- package/dist/chunk-QAYAQNCG-B1r1SmqS.mjs.map +1 -0
- package/dist/chunk-QAYAQNCG-ROQh1hrZ.cjs +78 -0
- package/dist/chunk-QAYAQNCG-ROQh1hrZ.cjs.map +1 -0
- package/dist/chunk-QIQMJJZ4-Cm4e9-4O.cjs +96 -0
- package/dist/chunk-QIQMJJZ4-Cm4e9-4O.cjs.map +1 -0
- package/dist/chunk-QIQMJJZ4-Dn8UfvJ9.mjs +92 -0
- package/dist/chunk-QIQMJJZ4-Dn8UfvJ9.mjs.map +1 -0
- package/dist/chunk-SO6R3ZKN-DIoHJ9o1.mjs +139 -0
- package/dist/chunk-SO6R3ZKN-DIoHJ9o1.mjs.map +1 -0
- package/dist/chunk-SO6R3ZKN-DYeOBPNJ.cjs +161 -0
- package/dist/chunk-SO6R3ZKN-DYeOBPNJ.cjs.map +1 -0
- package/dist/chunk-SX2HC7SO-BrE3qB0x.mjs +19 -0
- package/dist/chunk-SX2HC7SO-BrE3qB0x.mjs.map +1 -0
- package/dist/chunk-SX2HC7SO-CN1P7tXw.cjs +23 -0
- package/dist/chunk-SX2HC7SO-CN1P7tXw.cjs.map +1 -0
- package/dist/chunk-TDD4NFYE-CyVGcZCt.cjs +24 -0
- package/dist/chunk-TDD4NFYE-CyVGcZCt.cjs.map +1 -0
- package/dist/chunk-TDD4NFYE-Djy1ztDY.mjs +20 -0
- package/dist/chunk-TDD4NFYE-Djy1ztDY.mjs.map +1 -0
- package/dist/chunk-TN7HHBQW-B8PYcKz5.mjs +1136 -0
- package/dist/chunk-TN7HHBQW-B8PYcKz5.mjs.map +1 -0
- package/dist/chunk-TN7HHBQW-D_SK6w5n.cjs +1146 -0
- package/dist/chunk-TN7HHBQW-D_SK6w5n.cjs.map +1 -0
- package/dist/chunk-VPADYNBD-BwKY-5Xk.mjs +121 -0
- package/dist/chunk-VPADYNBD-BwKY-5Xk.mjs.map +1 -0
- package/dist/chunk-VPADYNBD-ZJpUxqq9.cjs +167 -0
- package/dist/chunk-VPADYNBD-ZJpUxqq9.cjs.map +1 -0
- package/dist/chunk-YCLFEX4T-BmQTDw1Y.cjs +86 -0
- package/dist/chunk-YCLFEX4T-BmQTDw1Y.cjs.map +1 -0
- package/dist/chunk-YCLFEX4T-DvGVdefs.mjs +76 -0
- package/dist/chunk-YCLFEX4T-DvGVdefs.mjs.map +1 -0
- package/dist/clear-HKGFEOF6-B9FqQA-D.cjs +27 -0
- package/dist/clear-HKGFEOF6-B9FqQA-D.cjs.map +1 -0
- package/dist/clear-HKGFEOF6-CVmdHYje.mjs +27 -0
- package/dist/clear-HKGFEOF6-CVmdHYje.mjs.map +1 -0
- package/dist/column-XT6UFXNQ-CEthufNl.mjs +142 -0
- package/dist/column-XT6UFXNQ-CEthufNl.mjs.map +1 -0
- package/dist/column-XT6UFXNQ-tddqJ9Kg.cjs +142 -0
- package/dist/column-XT6UFXNQ-tddqJ9Kg.cjs.map +1 -0
- package/dist/comm-VV2LDX2J-BpdAYzr_.mjs +86 -0
- package/dist/comm-VV2LDX2J-BpdAYzr_.mjs.map +1 -0
- package/dist/comm-VV2LDX2J-D8M6JDGH.cjs +86 -0
- package/dist/comm-VV2LDX2J-D8M6JDGH.cjs.map +1 -0
- package/dist/config-BO2sTtYA.d.mts +324 -0
- package/dist/config-DahIeWeM.d.cts +322 -0
- package/dist/config.cjs +16 -0
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +2 -0
- package/dist/config.d.mts +2 -0
- package/dist/config.mjs +15 -0
- package/dist/config.mjs.map +1 -0
- package/dist/cp-BISAAS7A-BO2reDJf.cjs +105 -0
- package/dist/cp-BISAAS7A-BO2reDJf.cjs.map +1 -0
- package/dist/cp-BISAAS7A-Bgk2QUcq.mjs +105 -0
- package/dist/cp-BISAAS7A-Bgk2QUcq.mjs.map +1 -0
- package/dist/cut-OKARJCCV-DPm1czVO.mjs +117 -0
- package/dist/cut-OKARJCCV-DPm1czVO.mjs.map +1 -0
- package/dist/cut-OKARJCCV-DaBpPPf8.cjs +117 -0
- package/dist/cut-OKARJCCV-DaBpPPf8.cjs.map +1 -0
- package/dist/date-UUUPW43J-DPhwuguC.cjs +187 -0
- package/dist/date-UUUPW43J-DPhwuguC.cjs.map +1 -0
- package/dist/date-UUUPW43J-_wNZ6va_.mjs +187 -0
- package/dist/date-UUUPW43J-_wNZ6va_.mjs.map +1 -0
- package/dist/diff-MWJFIG7X-DZWE4by5.mjs +754 -0
- package/dist/diff-MWJFIG7X-DZWE4by5.mjs.map +1 -0
- package/dist/diff-MWJFIG7X-sW58v-In.cjs +754 -0
- package/dist/diff-MWJFIG7X-sW58v-In.cjs.map +1 -0
- package/dist/dirname-MPHRFUTI-B9pAFfgt.cjs +42 -0
- package/dist/dirname-MPHRFUTI-B9pAFfgt.cjs.map +1 -0
- package/dist/dirname-MPHRFUTI-BH9xdo7B.mjs +42 -0
- package/dist/dirname-MPHRFUTI-BH9xdo7B.mjs.map +1 -0
- package/dist/dist-B_VrBT_r.mjs +37377 -0
- package/dist/dist-B_VrBT_r.mjs.map +1 -0
- package/dist/dist-BdxWQmKK.mjs +8067 -0
- package/dist/dist-BdxWQmKK.mjs.map +1 -0
- package/dist/dist-DCAFVLts.cjs +38596 -0
- package/dist/dist-DCAFVLts.cjs.map +1 -0
- package/dist/dist-QIg3f1DP.cjs +8132 -0
- package/dist/dist-QIg3f1DP.cjs.map +1 -0
- package/dist/du-572XNP42-CRWdTyWl.mjs +175 -0
- package/dist/du-572XNP42-CRWdTyWl.mjs.map +1 -0
- package/dist/du-572XNP42-CqHbkS7A.cjs +175 -0
- package/dist/du-572XNP42-CqHbkS7A.cjs.map +1 -0
- package/dist/echo-NDWZZHPO-BUogPcJ_.mjs +136 -0
- package/dist/echo-NDWZZHPO-BUogPcJ_.mjs.map +1 -0
- package/dist/echo-NDWZZHPO-Cv_eCCli.cjs +136 -0
- package/dist/echo-NDWZZHPO-Cv_eCCli.cjs.map +1 -0
- package/dist/env-36M5BO7M-B3hY6c1d.mjs +117 -0
- package/dist/env-36M5BO7M-B3hY6c1d.mjs.map +1 -0
- package/dist/env-36M5BO7M-BJX6pRHi.cjs +118 -0
- package/dist/env-36M5BO7M-BJX6pRHi.cjs.map +1 -0
- package/dist/expand-JSPG6VOP-C4ZcygSl.mjs +144 -0
- package/dist/expand-JSPG6VOP-C4ZcygSl.mjs.map +1 -0
- package/dist/expand-JSPG6VOP-Dd-2L8yn.cjs +144 -0
- package/dist/expand-JSPG6VOP-Dd-2L8yn.cjs.map +1 -0
- package/dist/expr-5JAACS4X-Cxs0wDb3.mjs +151 -0
- package/dist/expr-5JAACS4X-Cxs0wDb3.mjs.map +1 -0
- package/dist/expr-5JAACS4X-DmKCLgI8.cjs +151 -0
- package/dist/expr-5JAACS4X-DmKCLgI8.cjs.map +1 -0
- package/dist/file-IPZJC3FQ-DeyikL2y.mjs +4200 -0
- package/dist/file-IPZJC3FQ-DeyikL2y.mjs.map +1 -0
- package/dist/file-IPZJC3FQ-M9Q0fqTe.cjs +4200 -0
- package/dist/file-IPZJC3FQ-M9Q0fqTe.cjs.map +1 -0
- package/dist/find-INTH3OLC-BR7ZZKkF.mjs +1330 -0
- package/dist/find-INTH3OLC-BR7ZZKkF.mjs.map +1 -0
- package/dist/find-INTH3OLC-C2Uc7scj.cjs +1330 -0
- package/dist/find-INTH3OLC-C2Uc7scj.cjs.map +1 -0
- package/dist/fold-4TQNYMSW-BQ9ukqex.cjs +137 -0
- package/dist/fold-4TQNYMSW-BQ9ukqex.cjs.map +1 -0
- package/dist/fold-4TQNYMSW-DsDovqTl.mjs +137 -0
- package/dist/fold-4TQNYMSW-DsDovqTl.mjs.map +1 -0
- package/dist/grep-V3LQVMRQ-BsgT3xzo.mjs +333 -0
- package/dist/grep-V3LQVMRQ-BsgT3xzo.mjs.map +1 -0
- package/dist/grep-V3LQVMRQ-ChT5D1RX.cjs +335 -0
- package/dist/grep-V3LQVMRQ-ChT5D1RX.cjs.map +1 -0
- package/dist/gzip-O5ASJAFY-ClxvbIo6.mjs +591 -0
- package/dist/gzip-O5ASJAFY-ClxvbIo6.mjs.map +1 -0
- package/dist/gzip-O5ASJAFY-DJOwjcpB.cjs +593 -0
- package/dist/gzip-O5ASJAFY-DJOwjcpB.cjs.map +1 -0
- package/dist/head-442HYESI-B1LlP95a.mjs +35 -0
- package/dist/head-442HYESI-B1LlP95a.mjs.map +1 -0
- package/dist/head-442HYESI-CL9VIqkb.cjs +35 -0
- package/dist/head-442HYESI-CL9VIqkb.cjs.map +1 -0
- package/dist/help-HZ6M2CKN-BjVXFW-f.mjs +122 -0
- package/dist/help-HZ6M2CKN-BjVXFW-f.mjs.map +1 -0
- package/dist/help-HZ6M2CKN-CzUrqQB7.cjs +122 -0
- package/dist/help-HZ6M2CKN-CzUrqQB7.cjs.map +1 -0
- package/dist/history-WYYKSLSZ-6NEj5e3f.mjs +47 -0
- package/dist/history-WYYKSLSZ-6NEj5e3f.mjs.map +1 -0
- package/dist/history-WYYKSLSZ-DfPcvaAY.cjs +47 -0
- package/dist/history-WYYKSLSZ-DfPcvaAY.cjs.map +1 -0
- package/dist/hostname-C4HQXXUP-B86my_ii.mjs +23 -0
- package/dist/hostname-C4HQXXUP-B86my_ii.mjs.map +1 -0
- package/dist/hostname-C4HQXXUP-CC1LpY9-.cjs +23 -0
- package/dist/hostname-C4HQXXUP-CC1LpY9-.cjs.map +1 -0
- package/dist/html-to-markdown-JW4MSQZO-BKOSSsyy.mjs +15889 -0
- package/dist/html-to-markdown-JW4MSQZO-BKOSSsyy.mjs.map +1 -0
- package/dist/html-to-markdown-JW4MSQZO-TyAsgBnO.cjs +15892 -0
- package/dist/html-to-markdown-JW4MSQZO-TyAsgBnO.cjs.map +1 -0
- package/dist/internal.cjs +5 -0
- package/dist/internal.d.cts +22 -0
- package/dist/internal.d.mts +22 -0
- package/dist/internal.mjs +2 -0
- package/dist/join-TBRGI3LQ-CwgUaVoR.mjs +197 -0
- package/dist/join-TBRGI3LQ-CwgUaVoR.mjs.map +1 -0
- package/dist/join-TBRGI3LQ-JKyApOii.cjs +197 -0
- package/dist/join-TBRGI3LQ-JKyApOii.cjs.map +1 -0
- package/dist/jq-4XLYLOS5-D6TJiRje.cjs +250 -0
- package/dist/jq-4XLYLOS5-D6TJiRje.cjs.map +1 -0
- package/dist/jq-4XLYLOS5-ZisFFv1P.mjs +250 -0
- package/dist/jq-4XLYLOS5-ZisFFv1P.mjs.map +1 -0
- package/dist/js-exec-N5KEZBH7-BDEPJLK5.cjs +326 -0
- package/dist/js-exec-N5KEZBH7-BDEPJLK5.cjs.map +1 -0
- package/dist/js-exec-N5KEZBH7-Dp6FRM8y.mjs +325 -0
- package/dist/js-exec-N5KEZBH7-Dp6FRM8y.mjs.map +1 -0
- package/dist/lib-Cecx0Mdv.cjs +47 -0
- package/dist/lib-Cecx0Mdv.cjs.map +1 -0
- package/dist/lib-Dsemc_Ik.mjs +44 -0
- package/dist/lib-Dsemc_Ik.mjs.map +1 -0
- package/dist/llm-proxy.cjs +32 -0
- package/dist/llm-proxy.d.cts +2 -0
- package/dist/llm-proxy.d.mts +2 -0
- package/dist/llm-proxy.mjs +2 -0
- package/dist/ln-4LGSXXGD-DCt-08KM.cjs +100 -0
- package/dist/ln-4LGSXXGD-DCt-08KM.cjs.map +1 -0
- package/dist/ln-4LGSXXGD-DbVtAqnH.mjs +100 -0
- package/dist/ln-4LGSXXGD-DbVtAqnH.mjs.map +1 -0
- package/dist/ls-ZJGQER7M-BQuAedIy.cjs +1890 -0
- package/dist/ls-ZJGQER7M-BQuAedIy.cjs.map +1 -0
- package/dist/ls-ZJGQER7M-PRXSwGZZ.mjs +1890 -0
- package/dist/ls-ZJGQER7M-PRXSwGZZ.mjs.map +1 -0
- package/dist/lzma-BE4gwH-8.cjs +1204 -0
- package/dist/lzma-BE4gwH-8.cjs.map +1 -0
- package/dist/lzma-CmLEdvxC.mjs +1134 -0
- package/dist/lzma-CmLEdvxC.mjs.map +1 -0
- package/dist/md5sum-SPU24VSG-CmmvMGPa.mjs +15 -0
- package/dist/md5sum-SPU24VSG-CmmvMGPa.mjs.map +1 -0
- package/dist/md5sum-SPU24VSG-xbLQd_LU.cjs +15 -0
- package/dist/md5sum-SPU24VSG-xbLQd_LU.cjs.map +1 -0
- package/dist/mkdir-MEPGZOB6-DB938M04.mjs +56 -0
- package/dist/mkdir-MEPGZOB6-DB938M04.mjs.map +1 -0
- package/dist/mkdir-MEPGZOB6-IHvBvQTL.cjs +56 -0
- package/dist/mkdir-MEPGZOB6-IHvBvQTL.cjs.map +1 -0
- package/dist/mv-W5BIQ646-B2XVmdN4.mjs +92 -0
- package/dist/mv-W5BIQ646-B2XVmdN4.mjs.map +1 -0
- package/dist/mv-W5BIQ646-CFwaJ3Xx.cjs +92 -0
- package/dist/mv-W5BIQ646-CFwaJ3Xx.cjs.map +1 -0
- package/dist/nl-WSDW7I4O-CRYsCXB7.mjs +207 -0
- package/dist/nl-WSDW7I4O-CRYsCXB7.mjs.map +1 -0
- package/dist/nl-WSDW7I4O-FzZXRAwD.cjs +207 -0
- package/dist/nl-WSDW7I4O-FzZXRAwD.cjs.map +1 -0
- package/dist/od-WOKFDJTP-DVBJw76D.mjs +72 -0
- package/dist/od-WOKFDJTP-DVBJw76D.mjs.map +1 -0
- package/dist/od-WOKFDJTP-M80nAztL.cjs +72 -0
- package/dist/od-WOKFDJTP-M80nAztL.cjs.map +1 -0
- package/dist/paste-7JC6S4DX-DOPeey0W.cjs +112 -0
- package/dist/paste-7JC6S4DX-DOPeey0W.cjs.map +1 -0
- package/dist/paste-7JC6S4DX-q6d7adhi.mjs +112 -0
- package/dist/paste-7JC6S4DX-q6d7adhi.mjs.map +1 -0
- package/dist/platform-database.cjs +98 -0
- package/dist/platform-database.d.cts +2 -0
- package/dist/platform-database.d.mts +2 -0
- package/dist/platform-database.mjs +2 -0
- package/dist/printf-TWGXF445-BOz88v_H.mjs +878 -0
- package/dist/printf-TWGXF445-BOz88v_H.mjs.map +1 -0
- package/dist/printf-TWGXF445-BXve-Eiv.cjs +878 -0
- package/dist/printf-TWGXF445-BXve-Eiv.cjs.map +1 -0
- package/dist/pwd-WE6EN5AV-CbA4e7ec.mjs +33 -0
- package/dist/pwd-WE6EN5AV-CbA4e7ec.mjs.map +1 -0
- package/dist/pwd-WE6EN5AV-DfqwHtSS.cjs +33 -0
- package/dist/pwd-WE6EN5AV-DfqwHtSS.cjs.map +1 -0
- package/dist/python3-POMOR4OA-DRta50Gp.mjs +290 -0
- package/dist/python3-POMOR4OA-DRta50Gp.mjs.map +1 -0
- package/dist/python3-POMOR4OA-__fmhnV2.cjs +291 -0
- package/dist/python3-POMOR4OA-__fmhnV2.cjs.map +1 -0
- package/dist/readlink-OPJF4DL5-C7a7cTci.cjs +75 -0
- package/dist/readlink-OPJF4DL5-C7a7cTci.cjs.map +1 -0
- package/dist/readlink-OPJF4DL5-Zf7h1M1z.mjs +75 -0
- package/dist/readlink-OPJF4DL5-Zf7h1M1z.mjs.map +1 -0
- package/dist/rev-5EHFX4EJ-CFFAX-eL.cjs +65 -0
- package/dist/rev-5EHFX4EJ-CFFAX-eL.cjs.map +1 -0
- package/dist/rev-5EHFX4EJ-DP28Z2tI.mjs +65 -0
- package/dist/rev-5EHFX4EJ-DP28Z2tI.mjs.map +1 -0
- package/dist/rg-S4FXYXWB-Bawo1fot.mjs +1536 -0
- package/dist/rg-S4FXYXWB-Bawo1fot.mjs.map +1 -0
- package/dist/rg-S4FXYXWB-DrdwsBhO.cjs +1536 -0
- package/dist/rg-S4FXYXWB-DrdwsBhO.cjs.map +1 -0
- package/dist/rm-SSGETQVQ-BaWdfV2i.cjs +79 -0
- package/dist/rm-SSGETQVQ-BaWdfV2i.cjs.map +1 -0
- package/dist/rm-SSGETQVQ-C6EQ5XnR.mjs +79 -0
- package/dist/rm-SSGETQVQ-C6EQ5XnR.mjs.map +1 -0
- package/dist/rmdir-OC4ZLPYA-COg4QKnN.mjs +131 -0
- package/dist/rmdir-OC4ZLPYA-COg4QKnN.mjs.map +1 -0
- package/dist/rmdir-OC4ZLPYA-DK3A8POR.cjs +131 -0
- package/dist/rmdir-OC4ZLPYA-DK3A8POR.cjs.map +1 -0
- package/dist/run.cjs +13 -0
- package/dist/run.cjs.map +1 -0
- package/dist/run.d.cts +1 -0
- package/dist/run.d.mts +1 -0
- package/dist/run.mjs +14 -0
- package/dist/run.mjs.map +1 -0
- package/dist/sed-S5UIK574-CQ1AnR3r.cjs +1717 -0
- package/dist/sed-S5UIK574-CQ1AnR3r.cjs.map +1 -0
- package/dist/sed-S5UIK574-P4wu0pe1.mjs +1717 -0
- package/dist/sed-S5UIK574-P4wu0pe1.mjs.map +1 -0
- package/dist/seq-M5EC7Q57-BlpnRLkX.mjs +84 -0
- package/dist/seq-M5EC7Q57-BlpnRLkX.mjs.map +1 -0
- package/dist/seq-M5EC7Q57-CObcFJ6w.cjs +84 -0
- package/dist/seq-M5EC7Q57-CObcFJ6w.cjs.map +1 -0
- package/dist/sha1sum-2PTOAFR6-BPLIR6an.cjs +15 -0
- package/dist/sha1sum-2PTOAFR6-BPLIR6an.cjs.map +1 -0
- package/dist/sha1sum-2PTOAFR6-jNQ-uyUw.mjs +15 -0
- package/dist/sha1sum-2PTOAFR6-jNQ-uyUw.mjs.map +1 -0
- package/dist/sha256sum-NS7D3IXX-Bvq-KnSV.cjs +15 -0
- package/dist/sha256sum-NS7D3IXX-Bvq-KnSV.cjs.map +1 -0
- package/dist/sha256sum-NS7D3IXX-DebIy64D.mjs +15 -0
- package/dist/sha256sum-NS7D3IXX-DebIy64D.mjs.map +1 -0
- package/dist/sleep-X22JJINO-BZNoBeaB.mjs +66 -0
- package/dist/sleep-X22JJINO-BZNoBeaB.mjs.map +1 -0
- package/dist/sleep-X22JJINO-DP1z72-Q.cjs +66 -0
- package/dist/sleep-X22JJINO-DP1z72-Q.cjs.map +1 -0
- package/dist/sort-SW2YEO5B-BWZaGhuw.cjs +318 -0
- package/dist/sort-SW2YEO5B-BWZaGhuw.cjs.map +1 -0
- package/dist/sort-SW2YEO5B-DewIJ9_h.mjs +318 -0
- package/dist/sort-SW2YEO5B-DewIJ9_h.mjs.map +1 -0
- package/dist/split-4KKZZXXE-Bhr_rhRz.cjs +247 -0
- package/dist/split-4KKZZXXE-Bhr_rhRz.cjs.map +1 -0
- package/dist/split-4KKZZXXE-ciJXyT15.mjs +247 -0
- package/dist/split-4KKZZXXE-ciJXyT15.mjs.map +1 -0
- package/dist/sqlite3-CGOEFJAO-CdyK5NF3.cjs +2877 -0
- package/dist/sqlite3-CGOEFJAO-CdyK5NF3.cjs.map +1 -0
- package/dist/sqlite3-CGOEFJAO-K8u_Ru5X.mjs +2875 -0
- package/dist/sqlite3-CGOEFJAO-K8u_Ru5X.mjs.map +1 -0
- package/dist/start-DCnxLHI5.mjs +30918 -0
- package/dist/start-DCnxLHI5.mjs.map +1 -0
- package/dist/start-y3y8zgSv.cjs +31051 -0
- package/dist/start-y3y8zgSv.cjs.map +1 -0
- package/dist/start.cjs +3 -0
- package/dist/start.d.cts +28 -0
- package/dist/start.d.mts +28 -0
- package/dist/start.mjs +2 -0
- package/dist/stat-CD34IZ4P-BL8u_Aqm.mjs +64 -0
- package/dist/stat-CD34IZ4P-BL8u_Aqm.mjs.map +1 -0
- package/dist/stat-CD34IZ4P-BSu3fjXb.cjs +64 -0
- package/dist/stat-CD34IZ4P-BSu3fjXb.cjs.map +1 -0
- package/dist/strings-6WDHLGMX-Xt8Gbe8-.cjs +178 -0
- package/dist/strings-6WDHLGMX-Xt8Gbe8-.cjs.map +1 -0
- package/dist/strings-6WDHLGMX-lZect78u.mjs +178 -0
- package/dist/strings-6WDHLGMX-lZect78u.mjs.map +1 -0
- package/dist/tac-2STMMJYW-6DSfXKEM.cjs +52 -0
- package/dist/tac-2STMMJYW-6DSfXKEM.cjs.map +1 -0
- package/dist/tac-2STMMJYW-CYopDu0z.mjs +52 -0
- package/dist/tac-2STMMJYW-CYopDu0z.mjs.map +1 -0
- package/dist/tail-R4PCA2C4-05tRE3pO.mjs +36 -0
- package/dist/tail-R4PCA2C4-05tRE3pO.mjs.map +1 -0
- package/dist/tail-R4PCA2C4-B8zVnbJv.cjs +36 -0
- package/dist/tail-R4PCA2C4-B8zVnbJv.cjs.map +1 -0
- package/dist/tar-STHHZTZ6-BF9uOAeY.cjs +2839 -0
- package/dist/tar-STHHZTZ6-BF9uOAeY.cjs.map +1 -0
- package/dist/tar-STHHZTZ6-BGc4fGMj.mjs +2836 -0
- package/dist/tar-STHHZTZ6-BGc4fGMj.mjs.map +1 -0
- package/dist/tee-YUZ2FKCJ-CZGSWOLF.mjs +45 -0
- package/dist/tee-YUZ2FKCJ-CZGSWOLF.mjs.map +1 -0
- package/dist/tee-YUZ2FKCJ-DXc_xwaw.cjs +45 -0
- package/dist/tee-YUZ2FKCJ-DXc_xwaw.cjs.map +1 -0
- package/dist/time-D4LNBSWX-C5yYBJS0.mjs +107 -0
- package/dist/time-D4LNBSWX-C5yYBJS0.mjs.map +1 -0
- package/dist/time-D4LNBSWX-CQI3pEaI.cjs +107 -0
- package/dist/time-D4LNBSWX-CQI3pEaI.cjs.map +1 -0
- package/dist/timeout-YDCRSLPQ-C57Y8ySP.cjs +110 -0
- package/dist/timeout-YDCRSLPQ-C57Y8ySP.cjs.map +1 -0
- package/dist/timeout-YDCRSLPQ-CsT6X_C0.mjs +110 -0
- package/dist/timeout-YDCRSLPQ-CsT6X_C0.mjs.map +1 -0
- package/dist/touch-UA33VN3N-Cyx5v5-2.cjs +103 -0
- package/dist/touch-UA33VN3N-Cyx5v5-2.cjs.map +1 -0
- package/dist/touch-UA33VN3N-DYslBCYn.mjs +103 -0
- package/dist/touch-UA33VN3N-DYslBCYn.mjs.map +1 -0
- package/dist/tr-36LHWFRQ-C57tK13M.mjs +165 -0
- package/dist/tr-36LHWFRQ-C57tK13M.mjs.map +1 -0
- package/dist/tr-36LHWFRQ-CJ7ZK1Cv.cjs +165 -0
- package/dist/tr-36LHWFRQ-CJ7ZK1Cv.cjs.map +1 -0
- package/dist/tree-YLD52CNT-C01jI2xZ.mjs +185 -0
- package/dist/tree-YLD52CNT-C01jI2xZ.mjs.map +1 -0
- package/dist/tree-YLD52CNT-C0new1hw.cjs +185 -0
- package/dist/tree-YLD52CNT-C0new1hw.cjs.map +1 -0
- package/dist/true-FHQXJXBE-CIHy9LuF.mjs +30 -0
- package/dist/true-FHQXJXBE-CIHy9LuF.mjs.map +1 -0
- package/dist/true-FHQXJXBE-CROnM_dr.cjs +31 -0
- package/dist/true-FHQXJXBE-CROnM_dr.cjs.map +1 -0
- package/dist/unexpand-CADSA4VO-DgiJnv3D.mjs +154 -0
- package/dist/unexpand-CADSA4VO-DgiJnv3D.mjs.map +1 -0
- package/dist/unexpand-CADSA4VO-KAVxaOsW.cjs +154 -0
- package/dist/unexpand-CADSA4VO-KAVxaOsW.cjs.map +1 -0
- package/dist/uniq-XSIZR6PB-C05c3Clm.mjs +90 -0
- package/dist/uniq-XSIZR6PB-C05c3Clm.mjs.map +1 -0
- package/dist/uniq-XSIZR6PB-a2hQnbkY.cjs +90 -0
- package/dist/uniq-XSIZR6PB-a2hQnbkY.cjs.map +1 -0
- package/dist/wc-LF7NU4LA-D_LGPXUP.mjs +109 -0
- package/dist/wc-LF7NU4LA-D_LGPXUP.mjs.map +1 -0
- package/dist/wc-LF7NU4LA-UNORxUJr.cjs +109 -0
- package/dist/wc-LF7NU4LA-UNORxUJr.cjs.map +1 -0
- package/dist/which-XEM24D5D-4seJsWKQ.cjs +61 -0
- package/dist/which-XEM24D5D-4seJsWKQ.cjs.map +1 -0
- package/dist/which-XEM24D5D-BmDHO2AT.mjs +61 -0
- package/dist/which-XEM24D5D-BmDHO2AT.mjs.map +1 -0
- package/dist/whoami-XMTX52VE-CA-yJTvn.cjs +23 -0
- package/dist/whoami-XMTX52VE-CA-yJTvn.cjs.map +1 -0
- package/dist/whoami-XMTX52VE-DW_4VMpE.mjs +23 -0
- package/dist/whoami-XMTX52VE-DW_4VMpE.mjs.map +1 -0
- package/dist/with-project-scope-7t3SHNwz.mjs +56 -0
- package/dist/with-project-scope-7t3SHNwz.mjs.map +1 -0
- package/dist/with-project-scope-Drmz2h2Z.cjs +79 -0
- package/dist/with-project-scope-Drmz2h2Z.cjs.map +1 -0
- package/dist/xan-Y6WF3IRG-B_ysBBaD.mjs +2826 -0
- package/dist/xan-Y6WF3IRG-B_ysBBaD.mjs.map +1 -0
- package/dist/xan-Y6WF3IRG-DvYlOlaJ.cjs +2826 -0
- package/dist/xan-Y6WF3IRG-DvYlOlaJ.cjs.map +1 -0
- package/dist/xan-view-HDVKHFC2-Bv8_W4eE.mjs +11 -0
- package/dist/xan-view-HDVKHFC2-Bv8_W4eE.mjs.map +1 -0
- package/dist/xan-view-HDVKHFC2-ClhOnUAS.cjs +10 -0
- package/dist/xan-view-HDVKHFC2-ClhOnUAS.cjs.map +1 -0
- package/dist/xargs-MGZPH7AX-BvvOKhXS.cjs +110 -0
- package/dist/xargs-MGZPH7AX-BvvOKhXS.cjs.map +1 -0
- package/dist/xargs-MGZPH7AX-la_JFVst.mjs +110 -0
- package/dist/xargs-MGZPH7AX-la_JFVst.mjs.map +1 -0
- package/dist/yq-4QJW3EQG-Bq2dt3bL.mjs +8604 -0
- package/dist/yq-4QJW3EQG-Bq2dt3bL.mjs.map +1 -0
- package/dist/yq-4QJW3EQG-WlQHm2uv.cjs +8604 -0
- package/dist/yq-4QJW3EQG-WlQHm2uv.cjs.map +1 -0
- package/package.json +78 -0
|
@@ -0,0 +1,754 @@
|
|
|
1
|
+
const require_start = require("./start-y3y8zgSv.cjs");
|
|
2
|
+
require("./chunk-BZUGFHVS-7RRM7Jpb.cjs");
|
|
3
|
+
const require_chunk_QAYAQNCG = require("./chunk-QAYAQNCG-ROQh1hrZ.cjs");
|
|
4
|
+
const require_chunk_QIQMJJZ4 = require("./chunk-QIQMJJZ4-Cm4e9-4O.cjs");
|
|
5
|
+
let node_module = require("node:module");
|
|
6
|
+
//#region ../../node_modules/.pnpm/diff@8.0.4/node_modules/diff/libesm/diff/base.js
|
|
7
|
+
var Diff = class {
|
|
8
|
+
diff(oldStr, newStr, options = {}) {
|
|
9
|
+
let callback;
|
|
10
|
+
if (typeof options === "function") {
|
|
11
|
+
callback = options;
|
|
12
|
+
options = {};
|
|
13
|
+
} else if ("callback" in options) callback = options.callback;
|
|
14
|
+
const oldString = this.castInput(oldStr, options);
|
|
15
|
+
const newString = this.castInput(newStr, options);
|
|
16
|
+
const oldTokens = this.removeEmpty(this.tokenize(oldString, options));
|
|
17
|
+
const newTokens = this.removeEmpty(this.tokenize(newString, options));
|
|
18
|
+
return this.diffWithOptionsObj(oldTokens, newTokens, options, callback);
|
|
19
|
+
}
|
|
20
|
+
diffWithOptionsObj(oldTokens, newTokens, options, callback) {
|
|
21
|
+
var _a;
|
|
22
|
+
const done = (value) => {
|
|
23
|
+
value = this.postProcess(value, options);
|
|
24
|
+
if (callback) {
|
|
25
|
+
setTimeout(function() {
|
|
26
|
+
callback(value);
|
|
27
|
+
}, 0);
|
|
28
|
+
return;
|
|
29
|
+
} else return value;
|
|
30
|
+
};
|
|
31
|
+
const newLen = newTokens.length, oldLen = oldTokens.length;
|
|
32
|
+
let editLength = 1;
|
|
33
|
+
let maxEditLength = newLen + oldLen;
|
|
34
|
+
if (options.maxEditLength != null) maxEditLength = Math.min(maxEditLength, options.maxEditLength);
|
|
35
|
+
const maxExecutionTime = (_a = options.timeout) !== null && _a !== void 0 ? _a : Infinity;
|
|
36
|
+
const abortAfterTimestamp = Date.now() + maxExecutionTime;
|
|
37
|
+
const bestPath = [{
|
|
38
|
+
oldPos: -1,
|
|
39
|
+
lastComponent: void 0
|
|
40
|
+
}];
|
|
41
|
+
let newPos = this.extractCommon(bestPath[0], newTokens, oldTokens, 0, options);
|
|
42
|
+
if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) return done(this.buildValues(bestPath[0].lastComponent, newTokens, oldTokens));
|
|
43
|
+
let minDiagonalToConsider = -Infinity, maxDiagonalToConsider = Infinity;
|
|
44
|
+
const execEditLength = () => {
|
|
45
|
+
for (let diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) {
|
|
46
|
+
let basePath;
|
|
47
|
+
const removePath = bestPath[diagonalPath - 1], addPath = bestPath[diagonalPath + 1];
|
|
48
|
+
if (removePath) bestPath[diagonalPath - 1] = void 0;
|
|
49
|
+
let canAdd = false;
|
|
50
|
+
if (addPath) {
|
|
51
|
+
const addPathNewPos = addPath.oldPos - diagonalPath;
|
|
52
|
+
canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen;
|
|
53
|
+
}
|
|
54
|
+
const canRemove = removePath && removePath.oldPos + 1 < oldLen;
|
|
55
|
+
if (!canAdd && !canRemove) {
|
|
56
|
+
bestPath[diagonalPath] = void 0;
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
if (!canRemove || canAdd && removePath.oldPos < addPath.oldPos) basePath = this.addToPath(addPath, true, false, 0, options);
|
|
60
|
+
else basePath = this.addToPath(removePath, false, true, 1, options);
|
|
61
|
+
newPos = this.extractCommon(basePath, newTokens, oldTokens, diagonalPath, options);
|
|
62
|
+
if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) return done(this.buildValues(basePath.lastComponent, newTokens, oldTokens)) || true;
|
|
63
|
+
else {
|
|
64
|
+
bestPath[diagonalPath] = basePath;
|
|
65
|
+
if (basePath.oldPos + 1 >= oldLen) maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1);
|
|
66
|
+
if (newPos + 1 >= newLen) minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
editLength++;
|
|
70
|
+
};
|
|
71
|
+
if (callback) (function exec() {
|
|
72
|
+
setTimeout(function() {
|
|
73
|
+
if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) return callback(void 0);
|
|
74
|
+
if (!execEditLength()) exec();
|
|
75
|
+
}, 0);
|
|
76
|
+
})();
|
|
77
|
+
else while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) {
|
|
78
|
+
const ret = execEditLength();
|
|
79
|
+
if (ret) return ret;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
addToPath(path, added, removed, oldPosInc, options) {
|
|
83
|
+
const last = path.lastComponent;
|
|
84
|
+
if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) return {
|
|
85
|
+
oldPos: path.oldPos + oldPosInc,
|
|
86
|
+
lastComponent: {
|
|
87
|
+
count: last.count + 1,
|
|
88
|
+
added,
|
|
89
|
+
removed,
|
|
90
|
+
previousComponent: last.previousComponent
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
else return {
|
|
94
|
+
oldPos: path.oldPos + oldPosInc,
|
|
95
|
+
lastComponent: {
|
|
96
|
+
count: 1,
|
|
97
|
+
added,
|
|
98
|
+
removed,
|
|
99
|
+
previousComponent: last
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
extractCommon(basePath, newTokens, oldTokens, diagonalPath, options) {
|
|
104
|
+
const newLen = newTokens.length, oldLen = oldTokens.length;
|
|
105
|
+
let oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0;
|
|
106
|
+
while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldTokens[oldPos + 1], newTokens[newPos + 1], options)) {
|
|
107
|
+
newPos++;
|
|
108
|
+
oldPos++;
|
|
109
|
+
commonCount++;
|
|
110
|
+
if (options.oneChangePerToken) basePath.lastComponent = {
|
|
111
|
+
count: 1,
|
|
112
|
+
previousComponent: basePath.lastComponent,
|
|
113
|
+
added: false,
|
|
114
|
+
removed: false
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
if (commonCount && !options.oneChangePerToken) basePath.lastComponent = {
|
|
118
|
+
count: commonCount,
|
|
119
|
+
previousComponent: basePath.lastComponent,
|
|
120
|
+
added: false,
|
|
121
|
+
removed: false
|
|
122
|
+
};
|
|
123
|
+
basePath.oldPos = oldPos;
|
|
124
|
+
return newPos;
|
|
125
|
+
}
|
|
126
|
+
equals(left, right, options) {
|
|
127
|
+
if (options.comparator) return options.comparator(left, right);
|
|
128
|
+
else return left === right || !!options.ignoreCase && left.toLowerCase() === right.toLowerCase();
|
|
129
|
+
}
|
|
130
|
+
removeEmpty(array) {
|
|
131
|
+
const ret = [];
|
|
132
|
+
for (let i = 0; i < array.length; i++) if (array[i]) ret.push(array[i]);
|
|
133
|
+
return ret;
|
|
134
|
+
}
|
|
135
|
+
castInput(value, options) {
|
|
136
|
+
return value;
|
|
137
|
+
}
|
|
138
|
+
tokenize(value, options) {
|
|
139
|
+
return Array.from(value);
|
|
140
|
+
}
|
|
141
|
+
join(chars) {
|
|
142
|
+
return chars.join("");
|
|
143
|
+
}
|
|
144
|
+
postProcess(changeObjects, options) {
|
|
145
|
+
return changeObjects;
|
|
146
|
+
}
|
|
147
|
+
get useLongestToken() {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
buildValues(lastComponent, newTokens, oldTokens) {
|
|
151
|
+
const components = [];
|
|
152
|
+
let nextComponent;
|
|
153
|
+
while (lastComponent) {
|
|
154
|
+
components.push(lastComponent);
|
|
155
|
+
nextComponent = lastComponent.previousComponent;
|
|
156
|
+
delete lastComponent.previousComponent;
|
|
157
|
+
lastComponent = nextComponent;
|
|
158
|
+
}
|
|
159
|
+
components.reverse();
|
|
160
|
+
const componentLen = components.length;
|
|
161
|
+
let componentPos = 0, newPos = 0, oldPos = 0;
|
|
162
|
+
for (; componentPos < componentLen; componentPos++) {
|
|
163
|
+
const component = components[componentPos];
|
|
164
|
+
if (!component.removed) {
|
|
165
|
+
if (!component.added && this.useLongestToken) {
|
|
166
|
+
let value = newTokens.slice(newPos, newPos + component.count);
|
|
167
|
+
value = value.map(function(value, i) {
|
|
168
|
+
const oldValue = oldTokens[oldPos + i];
|
|
169
|
+
return oldValue.length > value.length ? oldValue : value;
|
|
170
|
+
});
|
|
171
|
+
component.value = this.join(value);
|
|
172
|
+
} else component.value = this.join(newTokens.slice(newPos, newPos + component.count));
|
|
173
|
+
newPos += component.count;
|
|
174
|
+
if (!component.added) oldPos += component.count;
|
|
175
|
+
} else {
|
|
176
|
+
component.value = this.join(oldTokens.slice(oldPos, oldPos + component.count));
|
|
177
|
+
oldPos += component.count;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return components;
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region ../../node_modules/.pnpm/diff@8.0.4/node_modules/diff/libesm/diff/character.js
|
|
185
|
+
var CharacterDiff = class extends Diff {};
|
|
186
|
+
new CharacterDiff();
|
|
187
|
+
//#endregion
|
|
188
|
+
//#region ../../node_modules/.pnpm/diff@8.0.4/node_modules/diff/libesm/util/string.js
|
|
189
|
+
function longestCommonPrefix(str1, str2) {
|
|
190
|
+
let i;
|
|
191
|
+
for (i = 0; i < str1.length && i < str2.length; i++) if (str1[i] != str2[i]) return str1.slice(0, i);
|
|
192
|
+
return str1.slice(0, i);
|
|
193
|
+
}
|
|
194
|
+
function longestCommonSuffix(str1, str2) {
|
|
195
|
+
let i;
|
|
196
|
+
if (!str1 || !str2 || str1[str1.length - 1] != str2[str2.length - 1]) return "";
|
|
197
|
+
for (i = 0; i < str1.length && i < str2.length; i++) if (str1[str1.length - (i + 1)] != str2[str2.length - (i + 1)]) return str1.slice(-i);
|
|
198
|
+
return str1.slice(-i);
|
|
199
|
+
}
|
|
200
|
+
function replacePrefix(string, oldPrefix, newPrefix) {
|
|
201
|
+
if (string.slice(0, oldPrefix.length) != oldPrefix) throw Error(`string ${JSON.stringify(string)} doesn't start with prefix ${JSON.stringify(oldPrefix)}; this is a bug`);
|
|
202
|
+
return newPrefix + string.slice(oldPrefix.length);
|
|
203
|
+
}
|
|
204
|
+
function replaceSuffix(string, oldSuffix, newSuffix) {
|
|
205
|
+
if (!oldSuffix) return string + newSuffix;
|
|
206
|
+
if (string.slice(-oldSuffix.length) != oldSuffix) throw Error(`string ${JSON.stringify(string)} doesn't end with suffix ${JSON.stringify(oldSuffix)}; this is a bug`);
|
|
207
|
+
return string.slice(0, -oldSuffix.length) + newSuffix;
|
|
208
|
+
}
|
|
209
|
+
function removePrefix(string, oldPrefix) {
|
|
210
|
+
return replacePrefix(string, oldPrefix, "");
|
|
211
|
+
}
|
|
212
|
+
function removeSuffix(string, oldSuffix) {
|
|
213
|
+
return replaceSuffix(string, oldSuffix, "");
|
|
214
|
+
}
|
|
215
|
+
function maximumOverlap(string1, string2) {
|
|
216
|
+
return string2.slice(0, overlapCount(string1, string2));
|
|
217
|
+
}
|
|
218
|
+
function overlapCount(a, b) {
|
|
219
|
+
let startA = 0;
|
|
220
|
+
if (a.length > b.length) startA = a.length - b.length;
|
|
221
|
+
let endB = b.length;
|
|
222
|
+
if (a.length < b.length) endB = a.length;
|
|
223
|
+
const map = Array(endB);
|
|
224
|
+
let k = 0;
|
|
225
|
+
map[0] = 0;
|
|
226
|
+
for (let j = 1; j < endB; j++) {
|
|
227
|
+
if (b[j] == b[k]) map[j] = map[k];
|
|
228
|
+
else map[j] = k;
|
|
229
|
+
while (k > 0 && b[j] != b[k]) k = map[k];
|
|
230
|
+
if (b[j] == b[k]) k++;
|
|
231
|
+
}
|
|
232
|
+
k = 0;
|
|
233
|
+
for (let i = startA; i < a.length; i++) {
|
|
234
|
+
while (k > 0 && a[i] != b[k]) k = map[k];
|
|
235
|
+
if (a[i] == b[k]) k++;
|
|
236
|
+
}
|
|
237
|
+
return k;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Split a string into segments using a word segmenter, merging consecutive
|
|
241
|
+
* segments if they are both whitespace segments. Whitespace segments can
|
|
242
|
+
* appear adjacent to one another for two reasons:
|
|
243
|
+
* - newlines always get their own segment
|
|
244
|
+
* - where a diacritic is attached to a whitespace character in the text, the
|
|
245
|
+
* segment ends after the diacritic, so e.g. " \u0300 " becomes two segments.
|
|
246
|
+
* This function therefore runs the segmenter's .segment() method and then
|
|
247
|
+
* merges consecutive segments of whitespace into a single part.
|
|
248
|
+
*/
|
|
249
|
+
function segment(string, segmenter) {
|
|
250
|
+
const parts = [];
|
|
251
|
+
for (const segmentObj of Array.from(segmenter.segment(string))) {
|
|
252
|
+
const segment = segmentObj.segment;
|
|
253
|
+
if (parts.length && /\s/.test(parts[parts.length - 1]) && /\s/.test(segment)) parts[parts.length - 1] += segment;
|
|
254
|
+
else parts.push(segment);
|
|
255
|
+
}
|
|
256
|
+
return parts;
|
|
257
|
+
}
|
|
258
|
+
function trailingWs(string, segmenter) {
|
|
259
|
+
if (segmenter) return leadingAndTrailingWs(string, segmenter)[1];
|
|
260
|
+
let i;
|
|
261
|
+
for (i = string.length - 1; i >= 0; i--) if (!string[i].match(/\s/)) break;
|
|
262
|
+
return string.substring(i + 1);
|
|
263
|
+
}
|
|
264
|
+
function leadingWs(string, segmenter) {
|
|
265
|
+
if (segmenter) return leadingAndTrailingWs(string, segmenter)[0];
|
|
266
|
+
const match = string.match(/^\s*/);
|
|
267
|
+
return match ? match[0] : "";
|
|
268
|
+
}
|
|
269
|
+
function leadingAndTrailingWs(string, segmenter) {
|
|
270
|
+
if (!segmenter) return [leadingWs(string), trailingWs(string)];
|
|
271
|
+
if (segmenter.resolvedOptions().granularity != "word") throw new Error("The segmenter passed must have a granularity of \"word\"");
|
|
272
|
+
const segments = segment(string, segmenter);
|
|
273
|
+
const firstSeg = segments[0];
|
|
274
|
+
const lastSeg = segments[segments.length - 1];
|
|
275
|
+
return [/\s/.test(firstSeg) ? firstSeg : "", /\s/.test(lastSeg) ? lastSeg : ""];
|
|
276
|
+
}
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region ../../node_modules/.pnpm/diff@8.0.4/node_modules/diff/libesm/diff/word.js
|
|
279
|
+
const extendedWordChars = "a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";
|
|
280
|
+
const tokenizeIncludingWhitespace = new RegExp(`[${extendedWordChars}]+|\\s+|[^${extendedWordChars}]`, "ug");
|
|
281
|
+
var WordDiff = class extends Diff {
|
|
282
|
+
equals(left, right, options) {
|
|
283
|
+
if (options.ignoreCase) {
|
|
284
|
+
left = left.toLowerCase();
|
|
285
|
+
right = right.toLowerCase();
|
|
286
|
+
}
|
|
287
|
+
return left.trim() === right.trim();
|
|
288
|
+
}
|
|
289
|
+
tokenize(value, options = {}) {
|
|
290
|
+
let parts;
|
|
291
|
+
if (options.intlSegmenter) {
|
|
292
|
+
const segmenter = options.intlSegmenter;
|
|
293
|
+
if (segmenter.resolvedOptions().granularity != "word") throw new Error("The segmenter passed must have a granularity of \"word\"");
|
|
294
|
+
parts = segment(value, segmenter);
|
|
295
|
+
} else parts = value.match(tokenizeIncludingWhitespace) || [];
|
|
296
|
+
const tokens = [];
|
|
297
|
+
let prevPart = null;
|
|
298
|
+
parts.forEach((part) => {
|
|
299
|
+
if (/\s/.test(part)) if (prevPart == null) tokens.push(part);
|
|
300
|
+
else tokens.push(tokens.pop() + part);
|
|
301
|
+
else if (prevPart != null && /\s/.test(prevPart)) if (tokens[tokens.length - 1] == prevPart) tokens.push(tokens.pop() + part);
|
|
302
|
+
else tokens.push(prevPart + part);
|
|
303
|
+
else tokens.push(part);
|
|
304
|
+
prevPart = part;
|
|
305
|
+
});
|
|
306
|
+
return tokens;
|
|
307
|
+
}
|
|
308
|
+
join(tokens) {
|
|
309
|
+
return tokens.map((token, i) => {
|
|
310
|
+
if (i == 0) return token;
|
|
311
|
+
else return token.replace(/^\s+/, "");
|
|
312
|
+
}).join("");
|
|
313
|
+
}
|
|
314
|
+
postProcess(changes, options) {
|
|
315
|
+
if (!changes || options.oneChangePerToken) return changes;
|
|
316
|
+
let lastKeep = null;
|
|
317
|
+
let insertion = null;
|
|
318
|
+
let deletion = null;
|
|
319
|
+
changes.forEach((change) => {
|
|
320
|
+
if (change.added) insertion = change;
|
|
321
|
+
else if (change.removed) deletion = change;
|
|
322
|
+
else {
|
|
323
|
+
if (insertion || deletion) dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, change, options.intlSegmenter);
|
|
324
|
+
lastKeep = change;
|
|
325
|
+
insertion = null;
|
|
326
|
+
deletion = null;
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
if (insertion || deletion) dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, null, options.intlSegmenter);
|
|
330
|
+
return changes;
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
new WordDiff();
|
|
334
|
+
function dedupeWhitespaceInChangeObjects(startKeep, deletion, insertion, endKeep, segmenter) {
|
|
335
|
+
if (deletion && insertion) {
|
|
336
|
+
const [oldWsPrefix, oldWsSuffix] = leadingAndTrailingWs(deletion.value, segmenter);
|
|
337
|
+
const [newWsPrefix, newWsSuffix] = leadingAndTrailingWs(insertion.value, segmenter);
|
|
338
|
+
if (startKeep) {
|
|
339
|
+
const commonWsPrefix = longestCommonPrefix(oldWsPrefix, newWsPrefix);
|
|
340
|
+
startKeep.value = replaceSuffix(startKeep.value, newWsPrefix, commonWsPrefix);
|
|
341
|
+
deletion.value = removePrefix(deletion.value, commonWsPrefix);
|
|
342
|
+
insertion.value = removePrefix(insertion.value, commonWsPrefix);
|
|
343
|
+
}
|
|
344
|
+
if (endKeep) {
|
|
345
|
+
const commonWsSuffix = longestCommonSuffix(oldWsSuffix, newWsSuffix);
|
|
346
|
+
endKeep.value = replacePrefix(endKeep.value, newWsSuffix, commonWsSuffix);
|
|
347
|
+
deletion.value = removeSuffix(deletion.value, commonWsSuffix);
|
|
348
|
+
insertion.value = removeSuffix(insertion.value, commonWsSuffix);
|
|
349
|
+
}
|
|
350
|
+
} else if (insertion) {
|
|
351
|
+
if (startKeep) {
|
|
352
|
+
const ws = leadingWs(insertion.value, segmenter);
|
|
353
|
+
insertion.value = insertion.value.substring(ws.length);
|
|
354
|
+
}
|
|
355
|
+
if (endKeep) {
|
|
356
|
+
const ws = leadingWs(endKeep.value, segmenter);
|
|
357
|
+
endKeep.value = endKeep.value.substring(ws.length);
|
|
358
|
+
}
|
|
359
|
+
} else if (startKeep && endKeep) {
|
|
360
|
+
const newWsFull = leadingWs(endKeep.value, segmenter), [delWsStart, delWsEnd] = leadingAndTrailingWs(deletion.value, segmenter);
|
|
361
|
+
const newWsStart = longestCommonPrefix(newWsFull, delWsStart);
|
|
362
|
+
deletion.value = removePrefix(deletion.value, newWsStart);
|
|
363
|
+
const newWsEnd = longestCommonSuffix(removePrefix(newWsFull, newWsStart), delWsEnd);
|
|
364
|
+
deletion.value = removeSuffix(deletion.value, newWsEnd);
|
|
365
|
+
endKeep.value = replacePrefix(endKeep.value, newWsFull, newWsEnd);
|
|
366
|
+
startKeep.value = replaceSuffix(startKeep.value, newWsFull, newWsFull.slice(0, newWsFull.length - newWsEnd.length));
|
|
367
|
+
} else if (endKeep) {
|
|
368
|
+
const endKeepWsPrefix = leadingWs(endKeep.value, segmenter);
|
|
369
|
+
const overlap = maximumOverlap(trailingWs(deletion.value, segmenter), endKeepWsPrefix);
|
|
370
|
+
deletion.value = removeSuffix(deletion.value, overlap);
|
|
371
|
+
} else if (startKeep) {
|
|
372
|
+
const overlap = maximumOverlap(trailingWs(startKeep.value, segmenter), leadingWs(deletion.value, segmenter));
|
|
373
|
+
deletion.value = removePrefix(deletion.value, overlap);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
var WordsWithSpaceDiff = class extends Diff {
|
|
377
|
+
tokenize(value) {
|
|
378
|
+
const regex = new RegExp(`(\\r?\\n)|[${extendedWordChars}]+|[^\\S\\n\\r]+|[^${extendedWordChars}]`, "ug");
|
|
379
|
+
return value.match(regex) || [];
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
new WordsWithSpaceDiff();
|
|
383
|
+
//#endregion
|
|
384
|
+
//#region ../../node_modules/.pnpm/diff@8.0.4/node_modules/diff/libesm/diff/line.js
|
|
385
|
+
var LineDiff = class extends Diff {
|
|
386
|
+
constructor() {
|
|
387
|
+
super(...arguments);
|
|
388
|
+
this.tokenize = tokenize;
|
|
389
|
+
}
|
|
390
|
+
equals(left, right, options) {
|
|
391
|
+
if (options.ignoreWhitespace) {
|
|
392
|
+
if (!options.newlineIsToken || !left.includes("\n")) left = left.trim();
|
|
393
|
+
if (!options.newlineIsToken || !right.includes("\n")) right = right.trim();
|
|
394
|
+
} else if (options.ignoreNewlineAtEof && !options.newlineIsToken) {
|
|
395
|
+
if (left.endsWith("\n")) left = left.slice(0, -1);
|
|
396
|
+
if (right.endsWith("\n")) right = right.slice(0, -1);
|
|
397
|
+
}
|
|
398
|
+
return super.equals(left, right, options);
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
const lineDiff = new LineDiff();
|
|
402
|
+
function diffLines(oldStr, newStr, options) {
|
|
403
|
+
return lineDiff.diff(oldStr, newStr, options);
|
|
404
|
+
}
|
|
405
|
+
function tokenize(value, options) {
|
|
406
|
+
if (options.stripTrailingCr) value = value.replace(/\r\n/g, "\n");
|
|
407
|
+
const retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/);
|
|
408
|
+
if (!linesAndNewlines[linesAndNewlines.length - 1]) linesAndNewlines.pop();
|
|
409
|
+
for (let i = 0; i < linesAndNewlines.length; i++) {
|
|
410
|
+
const line = linesAndNewlines[i];
|
|
411
|
+
if (i % 2 && !options.newlineIsToken) retLines[retLines.length - 1] += line;
|
|
412
|
+
else retLines.push(line);
|
|
413
|
+
}
|
|
414
|
+
return retLines;
|
|
415
|
+
}
|
|
416
|
+
//#endregion
|
|
417
|
+
//#region ../../node_modules/.pnpm/diff@8.0.4/node_modules/diff/libesm/diff/sentence.js
|
|
418
|
+
function isSentenceEndPunct(char) {
|
|
419
|
+
return char == "." || char == "!" || char == "?";
|
|
420
|
+
}
|
|
421
|
+
var SentenceDiff = class extends Diff {
|
|
422
|
+
tokenize(value) {
|
|
423
|
+
var _a;
|
|
424
|
+
const result = [];
|
|
425
|
+
let tokenStartI = 0;
|
|
426
|
+
for (let i = 0; i < value.length; i++) {
|
|
427
|
+
if (i == value.length - 1) {
|
|
428
|
+
result.push(value.slice(tokenStartI));
|
|
429
|
+
break;
|
|
430
|
+
}
|
|
431
|
+
if (isSentenceEndPunct(value[i]) && value[i + 1].match(/\s/)) {
|
|
432
|
+
result.push(value.slice(tokenStartI, i + 1));
|
|
433
|
+
i = tokenStartI = i + 1;
|
|
434
|
+
while ((_a = value[i + 1]) === null || _a === void 0 ? void 0 : _a.match(/\s/)) i++;
|
|
435
|
+
result.push(value.slice(tokenStartI, i + 1));
|
|
436
|
+
tokenStartI = i + 1;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
return result;
|
|
440
|
+
}
|
|
441
|
+
};
|
|
442
|
+
new SentenceDiff();
|
|
443
|
+
//#endregion
|
|
444
|
+
//#region ../../node_modules/.pnpm/diff@8.0.4/node_modules/diff/libesm/diff/css.js
|
|
445
|
+
var CssDiff = class extends Diff {
|
|
446
|
+
tokenize(value) {
|
|
447
|
+
return value.split(/([{}:;,]|\s+)/);
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
new CssDiff();
|
|
451
|
+
//#endregion
|
|
452
|
+
//#region ../../node_modules/.pnpm/diff@8.0.4/node_modules/diff/libesm/diff/json.js
|
|
453
|
+
var JsonDiff = class extends Diff {
|
|
454
|
+
constructor() {
|
|
455
|
+
super(...arguments);
|
|
456
|
+
this.tokenize = tokenize;
|
|
457
|
+
}
|
|
458
|
+
get useLongestToken() {
|
|
459
|
+
return true;
|
|
460
|
+
}
|
|
461
|
+
castInput(value, options) {
|
|
462
|
+
const { undefinedReplacement, stringifyReplacer = (k, v) => typeof v === "undefined" ? undefinedReplacement : v } = options;
|
|
463
|
+
return typeof value === "string" ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), null, " ");
|
|
464
|
+
}
|
|
465
|
+
equals(left, right, options) {
|
|
466
|
+
return super.equals(left.replace(/,([\r\n])/g, "$1"), right.replace(/,([\r\n])/g, "$1"), options);
|
|
467
|
+
}
|
|
468
|
+
};
|
|
469
|
+
new JsonDiff();
|
|
470
|
+
function canonicalize(obj, stack, replacementStack, replacer, key) {
|
|
471
|
+
stack = stack || [];
|
|
472
|
+
replacementStack = replacementStack || [];
|
|
473
|
+
if (replacer) obj = replacer(key === void 0 ? "" : key, obj);
|
|
474
|
+
let i;
|
|
475
|
+
for (i = 0; i < stack.length; i += 1) if (stack[i] === obj) return replacementStack[i];
|
|
476
|
+
let canonicalizedObj;
|
|
477
|
+
if ("[object Array]" === Object.prototype.toString.call(obj)) {
|
|
478
|
+
stack.push(obj);
|
|
479
|
+
canonicalizedObj = new Array(obj.length);
|
|
480
|
+
replacementStack.push(canonicalizedObj);
|
|
481
|
+
for (i = 0; i < obj.length; i += 1) canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, String(i));
|
|
482
|
+
stack.pop();
|
|
483
|
+
replacementStack.pop();
|
|
484
|
+
return canonicalizedObj;
|
|
485
|
+
}
|
|
486
|
+
if (obj && obj.toJSON) obj = obj.toJSON();
|
|
487
|
+
if (typeof obj === "object" && obj !== null) {
|
|
488
|
+
stack.push(obj);
|
|
489
|
+
canonicalizedObj = {};
|
|
490
|
+
replacementStack.push(canonicalizedObj);
|
|
491
|
+
const sortedKeys = [];
|
|
492
|
+
let key;
|
|
493
|
+
for (key in obj)
|
|
494
|
+
/* istanbul ignore else */
|
|
495
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) sortedKeys.push(key);
|
|
496
|
+
sortedKeys.sort();
|
|
497
|
+
for (i = 0; i < sortedKeys.length; i += 1) {
|
|
498
|
+
key = sortedKeys[i];
|
|
499
|
+
canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack, replacer, key);
|
|
500
|
+
}
|
|
501
|
+
stack.pop();
|
|
502
|
+
replacementStack.pop();
|
|
503
|
+
} else canonicalizedObj = obj;
|
|
504
|
+
return canonicalizedObj;
|
|
505
|
+
}
|
|
506
|
+
//#endregion
|
|
507
|
+
//#region ../../node_modules/.pnpm/diff@8.0.4/node_modules/diff/libesm/diff/array.js
|
|
508
|
+
var ArrayDiff = class extends Diff {
|
|
509
|
+
tokenize(value) {
|
|
510
|
+
return value.slice();
|
|
511
|
+
}
|
|
512
|
+
join(value) {
|
|
513
|
+
return value;
|
|
514
|
+
}
|
|
515
|
+
removeEmpty(value) {
|
|
516
|
+
return value;
|
|
517
|
+
}
|
|
518
|
+
};
|
|
519
|
+
new ArrayDiff();
|
|
520
|
+
//#endregion
|
|
521
|
+
//#region ../../node_modules/.pnpm/diff@8.0.4/node_modules/diff/libesm/patch/create.js
|
|
522
|
+
const INCLUDE_HEADERS = {
|
|
523
|
+
includeIndex: true,
|
|
524
|
+
includeUnderline: true,
|
|
525
|
+
includeFileHeaders: true
|
|
526
|
+
};
|
|
527
|
+
function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
528
|
+
let optionsObj;
|
|
529
|
+
if (!options) optionsObj = {};
|
|
530
|
+
else if (typeof options === "function") optionsObj = { callback: options };
|
|
531
|
+
else optionsObj = options;
|
|
532
|
+
if (typeof optionsObj.context === "undefined") optionsObj.context = 4;
|
|
533
|
+
const context = optionsObj.context;
|
|
534
|
+
if (optionsObj.newlineIsToken) throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");
|
|
535
|
+
if (!optionsObj.callback) return diffLinesResultToPatch(diffLines(oldStr, newStr, optionsObj));
|
|
536
|
+
else {
|
|
537
|
+
const { callback } = optionsObj;
|
|
538
|
+
diffLines(oldStr, newStr, Object.assign(Object.assign({}, optionsObj), { callback: (diff) => {
|
|
539
|
+
callback(diffLinesResultToPatch(diff));
|
|
540
|
+
} }));
|
|
541
|
+
}
|
|
542
|
+
function diffLinesResultToPatch(diff) {
|
|
543
|
+
if (!diff) return;
|
|
544
|
+
diff.push({
|
|
545
|
+
value: "",
|
|
546
|
+
lines: []
|
|
547
|
+
});
|
|
548
|
+
function contextLines(lines) {
|
|
549
|
+
return lines.map(function(entry) {
|
|
550
|
+
return " " + entry;
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
const hunks = [];
|
|
554
|
+
let oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1;
|
|
555
|
+
for (let i = 0; i < diff.length; i++) {
|
|
556
|
+
const current = diff[i], lines = current.lines || splitLines(current.value);
|
|
557
|
+
current.lines = lines;
|
|
558
|
+
if (current.added || current.removed) {
|
|
559
|
+
if (!oldRangeStart) {
|
|
560
|
+
const prev = diff[i - 1];
|
|
561
|
+
oldRangeStart = oldLine;
|
|
562
|
+
newRangeStart = newLine;
|
|
563
|
+
if (prev) {
|
|
564
|
+
curRange = context > 0 ? contextLines(prev.lines.slice(-context)) : [];
|
|
565
|
+
oldRangeStart -= curRange.length;
|
|
566
|
+
newRangeStart -= curRange.length;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
for (const line of lines) curRange.push((current.added ? "+" : "-") + line);
|
|
570
|
+
if (current.added) newLine += lines.length;
|
|
571
|
+
else oldLine += lines.length;
|
|
572
|
+
} else {
|
|
573
|
+
if (oldRangeStart) if (lines.length <= context * 2 && i < diff.length - 2) for (const line of contextLines(lines)) curRange.push(line);
|
|
574
|
+
else {
|
|
575
|
+
const contextSize = Math.min(lines.length, context);
|
|
576
|
+
for (const line of contextLines(lines.slice(0, contextSize))) curRange.push(line);
|
|
577
|
+
const hunk = {
|
|
578
|
+
oldStart: oldRangeStart,
|
|
579
|
+
oldLines: oldLine - oldRangeStart + contextSize,
|
|
580
|
+
newStart: newRangeStart,
|
|
581
|
+
newLines: newLine - newRangeStart + contextSize,
|
|
582
|
+
lines: curRange
|
|
583
|
+
};
|
|
584
|
+
hunks.push(hunk);
|
|
585
|
+
oldRangeStart = 0;
|
|
586
|
+
newRangeStart = 0;
|
|
587
|
+
curRange = [];
|
|
588
|
+
}
|
|
589
|
+
oldLine += lines.length;
|
|
590
|
+
newLine += lines.length;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
for (const hunk of hunks) for (let i = 0; i < hunk.lines.length; i++) if (hunk.lines[i].endsWith("\n")) hunk.lines[i] = hunk.lines[i].slice(0, -1);
|
|
594
|
+
else {
|
|
595
|
+
hunk.lines.splice(i + 1, 0, "\");
|
|
596
|
+
i++;
|
|
597
|
+
}
|
|
598
|
+
return {
|
|
599
|
+
oldFileName,
|
|
600
|
+
newFileName,
|
|
601
|
+
oldHeader,
|
|
602
|
+
newHeader,
|
|
603
|
+
hunks
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* creates a unified diff patch.
|
|
609
|
+
* @param patch either a single structured patch object (as returned by `structuredPatch`) or an array of them (as returned by `parsePatch`)
|
|
610
|
+
*/
|
|
611
|
+
function formatPatch(patch, headerOptions) {
|
|
612
|
+
if (!headerOptions) headerOptions = INCLUDE_HEADERS;
|
|
613
|
+
if (Array.isArray(patch)) {
|
|
614
|
+
if (patch.length > 1 && !headerOptions.includeFileHeaders) throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");
|
|
615
|
+
return patch.map((p) => formatPatch(p, headerOptions)).join("\n");
|
|
616
|
+
}
|
|
617
|
+
const ret = [];
|
|
618
|
+
if (headerOptions.includeIndex && patch.oldFileName == patch.newFileName) ret.push("Index: " + patch.oldFileName);
|
|
619
|
+
if (headerOptions.includeUnderline) ret.push("===================================================================");
|
|
620
|
+
if (headerOptions.includeFileHeaders) {
|
|
621
|
+
ret.push("--- " + patch.oldFileName + (typeof patch.oldHeader === "undefined" ? "" : " " + patch.oldHeader));
|
|
622
|
+
ret.push("+++ " + patch.newFileName + (typeof patch.newHeader === "undefined" ? "" : " " + patch.newHeader));
|
|
623
|
+
}
|
|
624
|
+
for (let i = 0; i < patch.hunks.length; i++) {
|
|
625
|
+
const hunk = patch.hunks[i];
|
|
626
|
+
if (hunk.oldLines === 0) hunk.oldStart -= 1;
|
|
627
|
+
if (hunk.newLines === 0) hunk.newStart -= 1;
|
|
628
|
+
ret.push("@@ -" + hunk.oldStart + "," + hunk.oldLines + " +" + hunk.newStart + "," + hunk.newLines + " @@");
|
|
629
|
+
for (const line of hunk.lines) ret.push(line);
|
|
630
|
+
}
|
|
631
|
+
return ret.join("\n") + "\n";
|
|
632
|
+
}
|
|
633
|
+
function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
634
|
+
if (typeof options === "function") options = { callback: options };
|
|
635
|
+
if (!(options === null || options === void 0 ? void 0 : options.callback)) {
|
|
636
|
+
const patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);
|
|
637
|
+
if (!patchObj) return;
|
|
638
|
+
return formatPatch(patchObj, options === null || options === void 0 ? void 0 : options.headerOptions);
|
|
639
|
+
} else {
|
|
640
|
+
const { callback } = options;
|
|
641
|
+
structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, Object.assign(Object.assign({}, options), { callback: (patchObj) => {
|
|
642
|
+
if (!patchObj) callback(void 0);
|
|
643
|
+
else callback(formatPatch(patchObj, options.headerOptions));
|
|
644
|
+
} }));
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Split `text` into an array of lines, including the trailing newline character (where present)
|
|
649
|
+
*/
|
|
650
|
+
function splitLines(text) {
|
|
651
|
+
const hasTrailingNl = text.endsWith("\n");
|
|
652
|
+
const result = text.split("\n").map((line) => line + "\n");
|
|
653
|
+
if (hasTrailingNl) result.pop();
|
|
654
|
+
else result.push(result.pop().slice(0, -1));
|
|
655
|
+
return result;
|
|
656
|
+
}
|
|
657
|
+
//#endregion
|
|
658
|
+
//#region ../../node_modules/.pnpm/just-bash@3.0.1/node_modules/just-bash/dist/bundle/chunks/chunk-CBJVD2XA.js
|
|
659
|
+
(0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
660
|
+
var b = {
|
|
661
|
+
name: "diff",
|
|
662
|
+
summary: "compare files line by line",
|
|
663
|
+
usage: "diff [OPTION]... FILE1 FILE2",
|
|
664
|
+
options: [
|
|
665
|
+
"-u, --unified output unified diff format (default)",
|
|
666
|
+
"-q, --brief report only whether files differ",
|
|
667
|
+
"-s, --report-identical-files report when files are the same",
|
|
668
|
+
"-i, --ignore-case ignore case differences",
|
|
669
|
+
" --help display this help and exit"
|
|
670
|
+
]
|
|
671
|
+
}, C = {
|
|
672
|
+
unified: {
|
|
673
|
+
short: "u",
|
|
674
|
+
long: "unified",
|
|
675
|
+
type: "boolean"
|
|
676
|
+
},
|
|
677
|
+
brief: {
|
|
678
|
+
short: "q",
|
|
679
|
+
long: "brief",
|
|
680
|
+
type: "boolean"
|
|
681
|
+
},
|
|
682
|
+
reportSame: {
|
|
683
|
+
short: "s",
|
|
684
|
+
long: "report-identical-files",
|
|
685
|
+
type: "boolean"
|
|
686
|
+
},
|
|
687
|
+
ignoreCase: {
|
|
688
|
+
short: "i",
|
|
689
|
+
long: "ignore-case",
|
|
690
|
+
type: "boolean"
|
|
691
|
+
}
|
|
692
|
+
}, L = {
|
|
693
|
+
name: "diff",
|
|
694
|
+
async execute(d, e) {
|
|
695
|
+
if (require_chunk_QAYAQNCG.o(d)) return require_chunk_QAYAQNCG.s(b);
|
|
696
|
+
let t = require_chunk_QIQMJJZ4.x("diff", d, C);
|
|
697
|
+
if (!t.ok) return t.error;
|
|
698
|
+
let m = t.result.flags.brief, h = t.result.flags.reportSame, y = t.result.flags.ignoreCase, l = t.result.positional;
|
|
699
|
+
if (t.result.flags.unified, l.length < 2) return {
|
|
700
|
+
stdout: "",
|
|
701
|
+
stderr: `diff: missing operand
|
|
702
|
+
`,
|
|
703
|
+
exitCode: 2
|
|
704
|
+
};
|
|
705
|
+
let i, s$1, [r, o$1] = l;
|
|
706
|
+
try {
|
|
707
|
+
i = r === "-" ? require_start.x(e.stdin) : await e.fs.readFile(e.fs.resolvePath(e.cwd, r));
|
|
708
|
+
} catch {
|
|
709
|
+
return {
|
|
710
|
+
stdout: "",
|
|
711
|
+
stderr: `diff: ${r}: No such file or directory
|
|
712
|
+
`,
|
|
713
|
+
exitCode: 2
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
try {
|
|
717
|
+
s$1 = o$1 === "-" ? require_start.x(e.stdin) : await e.fs.readFile(e.fs.resolvePath(e.cwd, o$1));
|
|
718
|
+
} catch {
|
|
719
|
+
return {
|
|
720
|
+
stdout: "",
|
|
721
|
+
stderr: `diff: ${o$1}: No such file or directory
|
|
722
|
+
`,
|
|
723
|
+
exitCode: 2
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
let f = i, n = s$1;
|
|
727
|
+
return y && (f = f.toLowerCase(), n = n.toLowerCase()), f === n ? h ? {
|
|
728
|
+
stdout: `Files ${r} and ${o$1} are identical
|
|
729
|
+
`,
|
|
730
|
+
stderr: "",
|
|
731
|
+
exitCode: 0
|
|
732
|
+
} : {
|
|
733
|
+
stdout: "",
|
|
734
|
+
stderr: "",
|
|
735
|
+
exitCode: 0
|
|
736
|
+
} : m ? {
|
|
737
|
+
stdout: `Files ${r} and ${o$1} differ
|
|
738
|
+
`,
|
|
739
|
+
stderr: "",
|
|
740
|
+
exitCode: 1
|
|
741
|
+
} : {
|
|
742
|
+
stdout: createTwoFilesPatch(r, o$1, i, s$1, "", "", { context: 3 }),
|
|
743
|
+
stderr: "",
|
|
744
|
+
exitCode: 1
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
//#endregion
|
|
749
|
+
//#region ../../node_modules/.pnpm/just-bash@3.0.1/node_modules/just-bash/dist/bundle/chunks/diff-MWJFIG7X.js
|
|
750
|
+
(0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
751
|
+
//#endregion
|
|
752
|
+
exports.diffCommand = L;
|
|
753
|
+
|
|
754
|
+
//# sourceMappingURL=diff-MWJFIG7X-sW58v-In.cjs.map
|