@aussieljk/forkbook 0.0.1-5 → 0.0.1-7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_browser-chunks/{Color-GTF4GM7L.js → Color-2YRIFQLC.js} +1 -1
- package/dist/_browser-chunks/WithTooltip-4R5JMWZ7.js +196 -0
- package/dist/_browser-chunks/{chunk-MJY6ITYT.js → chunk-4EFKUJG2.js} +10 -10
- package/dist/_browser-chunks/chunk-6AKCRYVX.js +6 -0
- package/dist/_browser-chunks/{chunk-FVSEPWWX.js → chunk-DAUHYZUB.js} +550 -1621
- package/dist/_browser-chunks/chunk-E47B5255.js +1149 -0
- package/dist/_browser-chunks/{chunk-K6GRZSXS.js → chunk-EQKMUQF3.js} +4 -3
- package/dist/_browser-chunks/{chunk-GU3X2J4S.js → chunk-FRAOQJDI.js} +3 -1
- package/dist/_browser-chunks/{chunk-2SCZVUKW.js → chunk-H4ZHAXN3.js} +1 -1
- package/dist/_browser-chunks/{chunk-HOSBMS2F.js → chunk-HTL5ODCB.js} +1 -1
- package/dist/_browser-chunks/{chunk-ZLWA5RIE.js → chunk-I4ATZPNZ.js} +1 -1
- package/dist/_browser-chunks/{chunk-6SHRDXGF.js → chunk-IJYLSHY7.js} +173 -87
- package/dist/_browser-chunks/{chunk-SZCSXISG.js → chunk-NA4ITZTK.js} +7 -5
- package/dist/_browser-chunks/chunk-NGMQJMCY.js +53 -0
- package/dist/_browser-chunks/{chunk-K2B36HKM.js → chunk-O24AZJZ7.js} +1 -1
- package/dist/_browser-chunks/{chunk-NMRSYACM.js → chunk-SFMQDIN2.js} +4 -3
- package/dist/_browser-chunks/{chunk-ZTQ5MEJ5.js → chunk-UMGDO2ZM.js} +3 -37
- package/dist/_browser-chunks/chunk-WVF42CP2.js +6027 -0
- package/dist/_browser-chunks/{chunk-52CW7FF7.js → chunk-YYWKZ7O3.js} +3 -1
- package/dist/_node-chunks/{attached-runtime-IOE3BXIY.js → attached-runtime-WFZCCGUB.js} +29 -29
- package/dist/_node-chunks/{builder-manager-GDFEGD72.js → builder-manager-DHKHRZK4.js} +155 -148
- package/dist/_node-chunks/{chunk-M2QB5ALN.js → chunk-3ZCGT6VF.js} +6 -6
- package/dist/_node-chunks/{chunk-SUJXQU74.js → chunk-4HGC3G6B.js} +46 -15
- package/dist/_node-chunks/{chunk-WMQ2VCTF.js → chunk-5PYQ573S.js} +7 -7
- package/dist/_node-chunks/{chunk-TYCDPVIH.js → chunk-64JPAW3T.js} +6 -6
- package/dist/_node-chunks/chunk-6CB3XSQ2.js +495 -0
- package/dist/_node-chunks/{chunk-MHDKWHOA.js → chunk-6K3ZE4HN.js} +6 -6
- package/dist/_node-chunks/{chunk-3DCJB2D4.js → chunk-6QZ3PX5R.js} +6 -6
- package/dist/_node-chunks/{chunk-6DOJKR3V.js → chunk-7HVDL6M3.js} +29843 -51588
- package/dist/_node-chunks/chunk-7PMQPS5E.js +347 -0
- package/dist/_node-chunks/{chunk-L5CY6HKG.js → chunk-7V5AOV2J.js} +7 -7
- package/dist/_node-chunks/{chunk-AXJJB2K6.js → chunk-7VHCAGBJ.js} +8 -8
- package/dist/_node-chunks/{chunk-3DX6THMV.js → chunk-ATX7SHS7.js} +8 -8
- package/dist/_node-chunks/{chunk-SDXU22OH.js → chunk-BQC6WCUS.js} +6 -6
- package/dist/_node-chunks/{chunk-D6B2DRQZ.js → chunk-BR4WDRY6.js} +8 -8
- package/dist/_node-chunks/{chunk-SJZQ44OR.js → chunk-BRHJ4P3A.js} +6 -6
- package/dist/_node-chunks/{chunk-N4FLP7AO.js → chunk-CBBFNVFZ.js} +7 -7
- package/dist/_node-chunks/{chunk-PHXCOTMO.js → chunk-CDFQORVD.js} +34 -949
- package/dist/_node-chunks/{chunk-SR3BCYEH.js → chunk-CENNLCU7.js} +6 -6
- package/dist/_node-chunks/{chunk-OTFIQXHR.js → chunk-CNMMDQC3.js} +27 -50
- package/dist/_node-chunks/{chunk-E4C2H45J.js → chunk-DMDZPUHM.js} +6 -6
- package/dist/_node-chunks/{chunk-45LRLOYO.js → chunk-DT45EUDD.js} +60 -134
- package/dist/_node-chunks/{chunk-KQFHT7SW.js → chunk-EAL4RVEF.js} +6 -6
- package/dist/_node-chunks/chunk-EFFWFE6W.js +11 -0
- package/dist/_node-chunks/{chunk-MDGNN3FJ.js → chunk-ESCZ2NSB.js} +6 -6
- package/dist/_node-chunks/{chunk-T2I453AJ.js → chunk-ESZIQTUH.js} +7 -7
- package/dist/_node-chunks/{chunk-HWY2CAUH.js → chunk-F3SAYS4R.js} +6 -6
- package/dist/_node-chunks/{chunk-LSP54OYM.js → chunk-FTUQ7T3V.js} +25 -8
- package/dist/_node-chunks/{chunk-AAAUVDWT.js → chunk-FVFSSIGA.js} +10 -10
- package/dist/_node-chunks/{chunk-GS4VNNSS.js → chunk-G2AANC4A.js} +6 -6
- package/dist/_node-chunks/{chunk-SAAQFJL4.js → chunk-HUMAXGH2.js} +6 -6
- package/dist/_node-chunks/{chunk-A4XRNDN4.js → chunk-I535GEPH.js} +7 -7
- package/dist/_node-chunks/{chunk-CK4EHW3K.js → chunk-J3Q56GX3.js} +25 -25
- package/dist/_node-chunks/{chunk-U47PBQZ3.js → chunk-JDKYP7FW.js} +10 -10
- package/dist/_node-chunks/{chunk-7TUSIVWS.js → chunk-JED5F3H2.js} +6 -6
- package/dist/_node-chunks/{chunk-UM5G27IC.js → chunk-JMS4H7QB.js} +7 -7
- package/dist/_node-chunks/{chunk-GR65OLAH.js → chunk-JOSJ64KD.js} +7 -7
- package/dist/_node-chunks/{chunk-XUHEL63G.js → chunk-JPHSU5OI.js} +6 -6
- package/dist/_node-chunks/{chunk-NYWD5LYM.js → chunk-JQICISDD.js} +6 -6
- package/dist/_node-chunks/{chunk-I3DKGHVD.js → chunk-JTLOSDYL.js} +9 -9
- package/dist/_node-chunks/{chunk-5KAJVK4E.js → chunk-K5RUOW42.js} +7 -7
- package/dist/_node-chunks/{chunk-UKEJISQU.js → chunk-KHWCZDIW.js} +650 -9
- package/dist/_node-chunks/chunk-KWER36VB.js +20 -0
- package/dist/_node-chunks/{chunk-YTBTCM22.js → chunk-LJTP5PAJ.js} +6 -6
- package/dist/_node-chunks/chunk-LZYYZ62Y.js +19 -0
- package/dist/_node-chunks/{chunk-CGXW2HFE.js → chunk-M7ZVSBNU.js} +6 -6
- package/dist/_node-chunks/{chunk-BTFSFATC.js → chunk-MBIIJTGQ.js} +11 -10
- package/dist/_node-chunks/{chunk-VBSVLIXU.js → chunk-MF3AT3JQ.js} +6 -6
- package/dist/_node-chunks/{chunk-AX2ALHBK.js → chunk-MF5BYASO.js} +9 -6
- package/dist/_node-chunks/{chunk-JJNO3SFI.js → chunk-MJFMB4WD.js} +9 -9
- package/dist/_node-chunks/{chunk-E4TBS4MV.js → chunk-MRWBN46D.js} +8 -8
- package/dist/_node-chunks/{chunk-QQXFB4YA.js → chunk-MZQXEAI6.js} +9 -9
- package/dist/_node-chunks/{chunk-TZ2TZW2K.js → chunk-NLPC2DDQ.js} +6 -6
- package/dist/_node-chunks/{chunk-HCX5R46Q.js → chunk-NQAFLS5U.js} +8 -8
- package/dist/_node-chunks/{chunk-5LE7GXEC.js → chunk-NSZGBFPR.js} +6 -6
- package/dist/_node-chunks/{chunk-WHDCECIV.js → chunk-NUYBFTOU.js} +7 -7
- package/dist/_node-chunks/{chunk-RCPKLP3X.js → chunk-O7VJA7SM.js} +7 -7
- package/dist/_node-chunks/{chunk-2GY2FKLH.js → chunk-OGJ7LDX3.js} +7 -7
- package/dist/_node-chunks/{chunk-F4Q7OCCN.js → chunk-OWT6AVWK.js} +8 -8
- package/dist/_node-chunks/{chunk-LCXIUTOU.js → chunk-P3GOMPP3.js} +7 -7
- package/dist/_node-chunks/{chunk-KCAPE7OJ.js → chunk-PQLXHVWK.js} +6 -6
- package/dist/_node-chunks/{chunk-V45RRBTK.js → chunk-Q6QRFKHB.js} +8 -8
- package/dist/_node-chunks/{chunk-VJSOHPVD.js → chunk-QSP42ZBM.js} +6 -6
- package/dist/_node-chunks/{chunk-7XUQM6SR.js → chunk-QWDR5OWQ.js} +14 -14
- package/dist/_node-chunks/{chunk-YLKS7U3M.js → chunk-QWRQXG2V.js} +8 -8
- package/dist/_node-chunks/{chunk-4WO3GNZQ.js → chunk-R6AKCXPH.js} +6 -6
- package/dist/_node-chunks/{chunk-AXQ6LLSE.js → chunk-RCY7TLET.js} +8 -8
- package/dist/_node-chunks/chunk-RKKMQA6N.js +620 -0
- package/dist/_node-chunks/{chunk-BV3QRFE6.js → chunk-RZ7UEP4N.js} +6 -6
- package/dist/_node-chunks/{chunk-OSJFTZ5N.js → chunk-S3HB4EWT.js} +6 -6
- package/dist/_node-chunks/{chunk-QZVFIEOM.js → chunk-SHH7JROR.js} +6 -6
- package/dist/_node-chunks/{chunk-Q33BYVLY.js → chunk-SWHTDOB4.js} +7 -7
- package/dist/_node-chunks/{chunk-ZPPVG262.js → chunk-SZYMLCHF.js} +6 -6
- package/dist/_node-chunks/{chunk-ES5QZBSB.js → chunk-TOGDRW2W.js} +6 -6
- package/dist/_node-chunks/{chunk-J64XMUPF.js → chunk-U3E7E4Q2.js} +10 -10
- package/dist/_node-chunks/{chunk-RECGEABN.js → chunk-U6DHF3RM.js} +7 -7
- package/dist/_node-chunks/{chunk-OB2XHL53.js → chunk-UAG3XK32.js} +31 -30
- package/dist/_node-chunks/{chunk-BBD2KUV4.js → chunk-UF6Q6L5C.js} +22 -20
- package/dist/_node-chunks/chunk-UGXN7JTT.js +18 -0
- package/dist/_node-chunks/{chunk-EWAGCBER.js → chunk-UNCBLHIP.js} +8 -8
- package/dist/_node-chunks/chunk-UPJMGWMZ.js +25 -0
- package/dist/_node-chunks/chunk-UVV24PG4.js +69 -0
- package/dist/_node-chunks/{chunk-E6KXSYWR.js → chunk-WBB4NQ6H.js} +6 -6
- package/dist/_node-chunks/{chunk-B2IOB2V3.js → chunk-WHOF2BJB.js} +7 -7
- package/dist/_node-chunks/{chunk-FA36CEN4.js → chunk-WME5NEJA.js} +6 -6
- package/dist/_node-chunks/{chunk-BFZG4UTW.js → chunk-X63YMAHP.js} +7 -7
- package/dist/_node-chunks/chunk-Y2GHAOKI.js +25 -0
- package/dist/_node-chunks/{chunk-AXG3EMKS.js → chunk-Y6G64J5S.js} +7 -15
- package/dist/_node-chunks/chunk-YVIPYJ53.js +2609 -0
- package/dist/_node-chunks/{chunk-NDGTNFUN.js → chunk-YZWUD7I5.js} +16 -13
- package/dist/_node-chunks/{chunk-VN3A5CEH.js → chunk-ZIDIYSJQ.js} +7 -7
- package/dist/_node-chunks/chunk-ZSGOW4WQ.js +20 -0
- package/dist/_node-chunks/dist-5EG56KTF.js +16 -0
- package/dist/_node-chunks/dist-UEXSNGGQ.js +27 -0
- package/dist/_node-chunks/{local-runtime-RW6AAWSX.js → local-runtime-UN5QK2SE.js} +20 -20
- package/dist/_node-chunks/{mdx-plugin-BKWCT6CB.js → mdx-plugin-6M6CMNL3.js} +2263 -130
- package/dist/_node-chunks/{monorepo-ZFJ6HM34.js → monorepo-253VKW4B.js} +11 -11
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-C3EW4VJW.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-3ZOE54OQ.js} +11 -11
- package/dist/_node-chunks/optimized-tests-JSWLRMEI.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-2ZMJNCBS.js → pattern-copy-play-CCCJRMSL.js} +9 -9
- package/dist/_node-chunks/postinstallAddon-VMANBHPR.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-RT5Z62RV.js → rehype-external-links-LJTPLCGD.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-H5TWHJ6G.js → rehype-slug-KQI7ULEZ.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-DYLWZGE4.js → relaxed-limits-MUE2NI7S.js} +11 -11
- package/dist/_node-chunks/{run-65LLGSVR.js → run-PGZMPNMS.js} +246 -13
- package/dist/_node-chunks/{run-BQQLK454.js → run-SYLR25HA.js} +17 -17
- package/dist/_node-chunks/session-id-J4A25UQ6.js +23 -0
- package/dist/_node-chunks/{setup-NEO7XX66.js → setup-XZWSUYPG.js} +8 -8
- package/dist/_node-chunks/{vitest.config.4.template-6P3FZQTY.js → vitest.config.4.template-T25YYRGV.js} +7 -7
- package/dist/actions/decorator.js +2 -1
- package/dist/actions/index.js +2 -1
- package/dist/addon-a11y/index.js +2 -1
- package/dist/addon-a11y/manager.js +6 -5
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-a11y/preview.js +2 -1
- package/dist/addon-docs/blocks.js +28 -14
- package/dist/addon-docs/manager.js +2 -2
- package/dist/addon-docs/preset.js +10 -10
- package/dist/addon-links/index.js +3 -2
- package/dist/addon-links/preview.d.ts +1 -1
- package/dist/addon-links/preview.js +3 -2
- package/dist/addon-links/react/index.js +2 -1
- package/dist/addon-mcp/preset.js +8 -8
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +21 -44
- package/dist/addon-ondevice-actions/index.js +5 -1
- package/dist/addon-ondevice-actions/register.js +5 -1
- package/dist/addon-themes/postinstall.js +7 -7
- package/dist/addon-vitest/constants.js +8 -8
- package/dist/addon-vitest/manager.js +2 -2
- package/dist/addon-vitest/node/coverage-reporter.js +8 -8
- package/dist/addon-vitest/node/vitest.js +16 -16
- package/dist/addon-vitest/postinstall.js +10 -10
- package/dist/addon-vitest/preset.js +15 -16
- package/dist/addon-vitest/vitest-plugin/global-setup.js +7 -7
- package/dist/addon-vitest/vitest-plugin/index.js +17 -17
- package/dist/babel/index.d.ts +91 -842
- package/dist/babel/index.js +13 -19
- package/dist/bin/core.js +61 -60
- package/dist/bin/dispatcher.js +16 -11
- package/dist/bin/loader.js +16 -15
- package/dist/builder-vite/index.js +15 -15
- package/dist/builder-vite/preset.js +13 -13
- package/dist/{chunk-Jf7j2Ot0.d.ts → chunk-BGhyFTJO.d.ts} +1 -1
- package/dist/{chunk-Ce6uhJuR.d.ts → chunk-B_ZhEPlo.d.ts} +1 -1
- package/dist/{chunk-CZHsX9Zo.d.ts → chunk-CMaYrou5.d.ts} +1 -1
- package/dist/chunk-CV4-Z2pn.d.ts +30 -0
- package/dist/{chunk-B2t1tGRh.d.ts → chunk-CYuvV2sR.d.ts} +11 -13
- package/dist/{chunk-DpljNJTz.d.ts → chunk-LrH1y9J2.d.ts} +39 -0
- package/dist/cli/index.d.ts +13 -866
- package/dist/cli/index.js +42 -4952
- package/dist/cli/tools/sdk/child-host.d.ts +1 -1
- package/dist/cli/tools/sdk/child-host.js +17 -17
- package/dist/cli/tools/sdk/index.d.ts +1 -1
- package/dist/cli/tools/sdk/index.js +18 -18
- package/dist/cli-commands/bin/index.js +7 -7
- package/dist/client-logger/index.js +3 -1
- package/dist/common/index.d.ts +5 -4
- package/dist/common/index.js +35 -37
- package/dist/components/index.d.ts +14 -231
- package/dist/components/index.js +2512 -8359
- package/dist/core-events/index.d.ts +3 -2
- package/dist/core-events/index.js +3 -1
- package/dist/core-server/index.d.ts +2 -2
- package/dist/core-server/index.js +450 -147
- package/dist/core-server/presets/common-manager.js +62 -866
- package/dist/core-server/presets/common-override-preset.js +12 -10
- package/dist/core-server/presets/common-preset.js +39 -40
- package/dist/create/bin/index.js +7 -7
- package/dist/create/index.js +15 -15
- package/dist/csf/index.d.ts +1 -1
- package/dist/csf/index.js +27 -93
- package/dist/csf-tools/index.d.ts +14 -12
- package/dist/csf-tools/index.js +14 -14
- package/dist/instrumenter/index.js +3 -1
- package/dist/manager/_manager-chunks/{globals-runtime-BgVwdR45.js → globals-runtime-4fCHtNC6.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-DW1HVuLt.js → globals-runtime-BKPOYSwp.js} +410 -379
- package/dist/manager/_manager-chunks/{globals-runtime-zVfMhZAt.js → globals-runtime-BMIT8BJb.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-CUBVmgcG.js → globals-runtime-BO0pfoqL.js} +4 -4
- package/dist/manager/_manager-chunks/{globals-runtime-Bke4A4DG.js → globals-runtime-BZKYJxYC.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-D_YKR9nf.js → globals-runtime-Bpc_ftuT.js} +1252 -539
- package/dist/manager/_manager-chunks/{globals-runtime-DCOX9nD5.js → globals-runtime-CBviMKtt.js} +1 -17
- package/dist/manager/_manager-chunks/{globals-runtime-CTB3rhS1.js → globals-runtime-CI-C7ncS.js} +10 -10
- package/dist/manager/_manager-chunks/{globals-runtime-Cr3nYYcT.js → globals-runtime-CI_p54Ha.js} +59 -60
- package/dist/manager/_manager-chunks/{globals-runtime-CiLcg4q9.js → globals-runtime-CTyYXvUm.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-DqNrRmOM.js → globals-runtime-CoCzM1V_.js} +93 -2146
- package/dist/manager/_manager-chunks/{globals-runtime-CXKb33hg.js → globals-runtime-CzEhVGVp.js} +141 -54
- package/dist/manager/_manager-chunks/{globals-runtime-CF4o9_wT.js → globals-runtime-D82vqOGq.js} +2 -1
- package/dist/manager/_manager-chunks/{globals-runtime-ALpzCL93.js → globals-runtime-DB8fVA5g.js} +2 -145
- package/dist/manager/_manager-chunks/{globals-runtime-DMvB3-IM.js → globals-runtime-DMq1Phbl.js} +153 -141
- package/dist/manager/_manager-chunks/globals-runtime-DOPUchia.js +5282 -0
- package/dist/manager/_manager-chunks/{globals-runtime-BcNHymiF.js → globals-runtime-Dbt08xWQ.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-m07udJ_K.js → globals-runtime-kmPSyf3j.js} +637 -1730
- package/dist/manager/_manager-chunks/{runtime-DMig8mT7.js → runtime-5o_11Jae.js} +4 -3
- package/dist/manager/_manager-chunks/{runtime-DrjpEyLM.js → runtime-B4U0u9p4.js} +5 -147
- package/dist/manager/_manager-chunks/{runtime-B-eSQdxk.js → runtime-BM30BmeT.js} +503 -44
- package/dist/manager/_manager-chunks/{runtime-EITvVbkG.js → runtime-BdGkqNEt.js} +1 -2
- package/dist/manager/_manager-chunks/{runtime-a5zd7km2.js → runtime-Cf0p9DUx.js} +5 -531
- package/dist/manager/_manager-chunks/{runtime-Cdz2BHhM.js → runtime-D-nYLsdk.js} +57 -34
- package/dist/manager/_manager-chunks/runtime-D09XMY6V.js +294 -0
- package/dist/manager/_manager-chunks/{runtime-Bldwclun.js → runtime-DvrwKw7z.js} +92 -303
- package/dist/manager/_manager-chunks/{runtime-DGHNKNQl.js → runtime-DzxaTqVN.js} +10 -29
- package/dist/manager/_manager-chunks/runtime-P663lpsR.js +528 -0
- package/dist/manager/_manager-chunks/{runtime-Cmu7D8A0.js → runtime-ecY5qnmo.js} +193 -184
- package/dist/manager/globals-runtime.js +1 -1
- package/dist/manager/runtime.js +1 -1
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +22 -28
- package/dist/manager-errors.d.ts +1 -1
- package/dist/mcp/index.js +8 -8
- package/dist/mocking-utils/index.js +16 -11
- package/dist/nextjs-vite/index.js +3 -2
- package/dist/nextjs-vite/node/index.js +7 -7
- package/dist/nextjs-vite/node-stand-ins/index.d.ts +68 -0
- package/dist/nextjs-vite/node-stand-ins/index.js +145 -0
- package/dist/nextjs-vite/preset.js +93 -14
- package/dist/nextjs-vite/vite-plugin/index.js +7 -7
- package/dist/nextjs-vite-plugin/index.d.ts +1 -2
- package/dist/nextjs-vite-plugin/index.js +12 -27
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
- package/dist/node-logger/index.d.ts +65 -72
- package/dist/node-logger/index.js +11 -12
- package/dist/oxc-parser/index.js +11 -13
- package/dist/oxc-parser/worker.js +10 -10
- package/dist/preview/_chunks/{runtime-DVM_AHbR.js → runtime-6P-h06Te.js} +51 -50
- package/dist/preview/_chunks/{runtime-BoxmlDdB.js → runtime-B9KKIDGa.js} +202 -81
- package/dist/preview/_chunks/{runtime-BIzIdDbb.js → runtime-BPwAnlRx.js} +482 -334
- package/dist/preview/_chunks/{runtime-q3wt0e_N.js → runtime-BUnOhg9h.js} +2 -2
- package/dist/preview/_chunks/runtime-Bcv1hJky.js +6305 -0
- package/dist/preview/_chunks/{runtime-CqHxptiK.js → runtime-C1jgT6tJ.js} +93 -2145
- package/dist/preview/_chunks/{runtime-D7B4bVe_.js → runtime-C8QFpkFV.js} +6 -6
- package/dist/preview/_chunks/{runtime-CijtAN7R.js → runtime-DdqR8Fd0.js} +15 -6
- package/dist/preview/_chunks/{runtime-B3y8ocOg.js → runtime-DvBfMhis.js} +2 -2
- package/dist/preview/_chunks/{runtime-BZSnICCg.js → runtime-WapFVPAh.js} +29 -29
- package/dist/preview/runtime.js +1 -1
- package/dist/preview-api/index.d.ts +1 -1
- package/dist/preview-api/index.js +2 -1
- package/dist/preview-errors.d.ts +1 -1
- package/dist/react/docgen/docgen-worker.js +11 -12
- package/dist/react/entry-preview.js +2 -1
- package/dist/react/index.js +6 -4
- package/dist/react/preset.js +13 -14
- package/dist/react/preview.js +3 -2
- package/dist/react-native/bin/get-stories.js +8 -8
- package/dist/react-native/index.js +25 -211
- package/dist/react-native/metro/node.js +10 -9
- package/dist/react-native/metro/withStorybook.js +11 -10
- package/dist/react-native/scripts/generate.js +8 -8
- package/dist/react-vite/node/index.js +7 -7
- package/dist/react-vite/preset.js +7 -7
- package/dist/router/index.js +3 -1
- package/dist/server-errors.d.ts +1 -1
- package/dist/server-errors.js +9 -9
- package/dist/shared/open-service/index.d.ts +1 -1
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
- package/dist/telemetry/index.js +43 -45
- package/dist/test/index.js +808 -573
- package/dist/theming/create.js +2 -1
- package/dist/theming/index.js +22 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +21 -44
- package/dist/_browser-chunks/WithTooltip-V55S6YCY.js +0 -1619
- package/dist/_browser-chunks/chunk-5P4QA6MY.js +0 -20
- package/dist/_browser-chunks/chunk-UDQ3XQFC.js +0 -108
- package/dist/_node-chunks/chunk-6QQTZT3Z.js +0 -19
- package/dist/_node-chunks/chunk-BRD332PB.js +0 -3008
- package/dist/_node-chunks/chunk-E2XKJLXK.js +0 -4731
- package/dist/_node-chunks/chunk-F2LQJXAB.js +0 -29
- package/dist/_node-chunks/chunk-MCZZMBPA.js +0 -20
- package/dist/_node-chunks/chunk-MMFUHYSU.js +0 -23
- package/dist/_node-chunks/chunk-UGFY5LEG.js +0 -18
- package/dist/_node-chunks/chunk-UO5ZOCSQ.js +0 -662
- package/dist/_node-chunks/chunk-UW35FCXF.js +0 -20
- package/dist/_node-chunks/chunk-VMUXW2E2.js +0 -5414
- package/dist/_node-chunks/chunk-VNXE7UJL.js +0 -51
- package/dist/_node-chunks/chunk-VRJJ43P2.js +0 -11
- package/dist/_node-chunks/chunk-WCJUS7OC.js +0 -1877
- package/dist/_node-chunks/chunk-WMBMSNB7.js +0 -36
- package/dist/_node-chunks/chunk-YV2QBXU6.js +0 -3823
- package/dist/_node-chunks/chunk-ZZNBVMBU.js +0 -25
- package/dist/_node-chunks/dist-VFUGPNLK.js +0 -16
- package/dist/_node-chunks/globby-N7LO32D3.js +0 -2884
- package/dist/_node-chunks/jiti-SJDZ7LQB.js +0 -3848
- package/dist/_node-chunks/lib-4HD6QL5R.js +0 -366
- package/dist/_node-chunks/optimized-tests-LVKXZ3HQ.js +0 -22
- package/dist/_node-chunks/postinstallAddon-I6MAL6PW.js +0 -20
- package/dist/_node-chunks/session-id-6Z2RXBTG.js +0 -23
- package/dist/chunk-BfBzpgct.d.ts +0 -916
- package/dist/core-server/presets/common-manager.css +0 -170
- package/dist/manager/_manager-chunks/globals-runtime-Bon7UvQk.js +0 -9766
- package/dist/manager/_manager-chunks/globals-runtime-DDOIxI_l.js +0 -1584
- package/dist/manager/_manager-chunks/runtime-CuJiHYCp.js +0 -22
- package/dist/manager/_manager-chunks/runtime-DFhLVh8q.js +0 -456
- package/dist/preview/_chunks/runtime-BTPtVY1p.js +0 -1102
- package/dist/preview/_chunks/runtime-DZToXfvO.js +0 -9767
|
@@ -1,3823 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_1qqypd7gt14 from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_1qqypd7gt14 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_1qqypd7gt14 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_1qqypd7gt14.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_1qqypd7gt14.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_1qqypd7gt14.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
require_picocolors
|
|
14
|
-
} from "./chunk-5KAJVK4E.js";
|
|
15
|
-
import {
|
|
16
|
-
__commonJS,
|
|
17
|
-
__export,
|
|
18
|
-
__require,
|
|
19
|
-
__toESM
|
|
20
|
-
} from "./chunk-TZ2TZW2K.js";
|
|
21
|
-
|
|
22
|
-
// ../../node_modules/are-we-there-yet/lib/tracker-base.js
|
|
23
|
-
var require_tracker_base = __commonJS({
|
|
24
|
-
"../../node_modules/are-we-there-yet/lib/tracker-base.js"(exports, module) {
|
|
25
|
-
"use strict";
|
|
26
|
-
var EventEmitter = __require("events"), trackerId = 0, TrackerBase = class extends EventEmitter {
|
|
27
|
-
constructor(name) {
|
|
28
|
-
super(), this.id = ++trackerId, this.name = name;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
module.exports = TrackerBase;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
// ../../node_modules/are-we-there-yet/lib/tracker.js
|
|
36
|
-
var require_tracker = __commonJS({
|
|
37
|
-
"../../node_modules/are-we-there-yet/lib/tracker.js"(exports, module) {
|
|
38
|
-
"use strict";
|
|
39
|
-
var TrackerBase = require_tracker_base(), Tracker = class extends TrackerBase {
|
|
40
|
-
constructor(name, todo) {
|
|
41
|
-
super(name), this.workDone = 0, this.workTodo = todo || 0;
|
|
42
|
-
}
|
|
43
|
-
completed() {
|
|
44
|
-
return this.workTodo === 0 ? 0 : this.workDone / this.workTodo;
|
|
45
|
-
}
|
|
46
|
-
addWork(work) {
|
|
47
|
-
this.workTodo += work, this.emit("change", this.name, this.completed(), this);
|
|
48
|
-
}
|
|
49
|
-
completeWork(work) {
|
|
50
|
-
this.workDone += work, this.workDone > this.workTodo && (this.workDone = this.workTodo), this.emit("change", this.name, this.completed(), this);
|
|
51
|
-
}
|
|
52
|
-
finish() {
|
|
53
|
-
this.workTodo = this.workDone = 1, this.emit("change", this.name, 1, this);
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
module.exports = Tracker;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
// ../../node_modules/are-we-there-yet/lib/tracker-stream.js
|
|
61
|
-
var require_tracker_stream = __commonJS({
|
|
62
|
-
"../../node_modules/are-we-there-yet/lib/tracker-stream.js"(exports, module) {
|
|
63
|
-
"use strict";
|
|
64
|
-
var stream = __require("stream"), Tracker = require_tracker(), TrackerStream = class extends stream.Transform {
|
|
65
|
-
constructor(name, size, options) {
|
|
66
|
-
super(options), this.tracker = new Tracker(name, size), this.name = name, this.id = this.tracker.id, this.tracker.on("change", this.trackerChange.bind(this));
|
|
67
|
-
}
|
|
68
|
-
trackerChange(name, completion) {
|
|
69
|
-
this.emit("change", name, completion, this);
|
|
70
|
-
}
|
|
71
|
-
_transform(data, encoding, cb) {
|
|
72
|
-
this.tracker.completeWork(data.length ? data.length : 1), this.push(data), cb();
|
|
73
|
-
}
|
|
74
|
-
_flush(cb) {
|
|
75
|
-
this.tracker.finish(), cb();
|
|
76
|
-
}
|
|
77
|
-
completed() {
|
|
78
|
-
return this.tracker.completed();
|
|
79
|
-
}
|
|
80
|
-
addWork(work) {
|
|
81
|
-
return this.tracker.addWork(work);
|
|
82
|
-
}
|
|
83
|
-
finish() {
|
|
84
|
-
return this.tracker.finish();
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
module.exports = TrackerStream;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
// ../../node_modules/are-we-there-yet/lib/tracker-group.js
|
|
92
|
-
var require_tracker_group = __commonJS({
|
|
93
|
-
"../../node_modules/are-we-there-yet/lib/tracker-group.js"(exports, module) {
|
|
94
|
-
"use strict";
|
|
95
|
-
var TrackerBase = require_tracker_base(), Tracker = require_tracker(), TrackerStream = require_tracker_stream(), TrackerGroup = class _TrackerGroup extends TrackerBase {
|
|
96
|
-
parentGroup = null;
|
|
97
|
-
trackers = [];
|
|
98
|
-
completion = {};
|
|
99
|
-
weight = {};
|
|
100
|
-
totalWeight = 0;
|
|
101
|
-
finished = !1;
|
|
102
|
-
bubbleChange = bubbleChange(this);
|
|
103
|
-
nameInTree() {
|
|
104
|
-
for (var names = [], from = this; from; )
|
|
105
|
-
names.unshift(from.name), from = from.parentGroup;
|
|
106
|
-
return names.join("/");
|
|
107
|
-
}
|
|
108
|
-
addUnit(unit, weight) {
|
|
109
|
-
if (unit.addUnit) {
|
|
110
|
-
for (var toTest = this; toTest; ) {
|
|
111
|
-
if (unit === toTest)
|
|
112
|
-
throw new Error(
|
|
113
|
-
"Attempted to add tracker group " + unit.name + " to tree that already includes it " + this.nameInTree(this)
|
|
114
|
-
);
|
|
115
|
-
toTest = toTest.parentGroup;
|
|
116
|
-
}
|
|
117
|
-
unit.parentGroup = this;
|
|
118
|
-
}
|
|
119
|
-
return this.weight[unit.id] = weight || 1, this.totalWeight += this.weight[unit.id], this.trackers.push(unit), this.completion[unit.id] = unit.completed(), unit.on("change", this.bubbleChange), this.finished || this.emit("change", unit.name, this.completion[unit.id], unit), unit;
|
|
120
|
-
}
|
|
121
|
-
completed() {
|
|
122
|
-
if (this.trackers.length === 0)
|
|
123
|
-
return 0;
|
|
124
|
-
for (var valPerWeight = 1 / this.totalWeight, completed = 0, ii = 0; ii < this.trackers.length; ii++) {
|
|
125
|
-
var trackerId = this.trackers[ii].id;
|
|
126
|
-
completed += valPerWeight * this.weight[trackerId] * this.completion[trackerId];
|
|
127
|
-
}
|
|
128
|
-
return completed;
|
|
129
|
-
}
|
|
130
|
-
newGroup(name, weight) {
|
|
131
|
-
return this.addUnit(new _TrackerGroup(name), weight);
|
|
132
|
-
}
|
|
133
|
-
newItem(name, todo, weight) {
|
|
134
|
-
return this.addUnit(new Tracker(name, todo), weight);
|
|
135
|
-
}
|
|
136
|
-
newStream(name, todo, weight) {
|
|
137
|
-
return this.addUnit(new TrackerStream(name, todo), weight);
|
|
138
|
-
}
|
|
139
|
-
finish() {
|
|
140
|
-
this.finished = !0, this.trackers.length || this.addUnit(new Tracker(), 1, !0);
|
|
141
|
-
for (var ii = 0; ii < this.trackers.length; ii++) {
|
|
142
|
-
var tracker = this.trackers[ii];
|
|
143
|
-
tracker.finish(), tracker.removeListener("change", this.bubbleChange);
|
|
144
|
-
}
|
|
145
|
-
this.emit("change", this.name, 1, this);
|
|
146
|
-
}
|
|
147
|
-
debug(depth = 0) {
|
|
148
|
-
let indent = " ".repeat(depth), output = `${indent}${this.name || "top"}: ${this.completed()}
|
|
149
|
-
`;
|
|
150
|
-
return this.trackers.forEach(function(tracker) {
|
|
151
|
-
output += tracker instanceof _TrackerGroup ? tracker.debug(depth + 1) : `${indent} ${tracker.name}: ${tracker.completed()}
|
|
152
|
-
`;
|
|
153
|
-
}), output;
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
function bubbleChange(trackerGroup) {
|
|
157
|
-
return function(name, completed, tracker) {
|
|
158
|
-
trackerGroup.completion[tracker.id] = completed, !trackerGroup.finished && trackerGroup.emit("change", name || trackerGroup.name, trackerGroup.completed(), trackerGroup);
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
module.exports = TrackerGroup;
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
// ../../node_modules/are-we-there-yet/lib/index.js
|
|
166
|
-
var require_lib = __commonJS({
|
|
167
|
-
"../../node_modules/are-we-there-yet/lib/index.js"(exports) {
|
|
168
|
-
"use strict";
|
|
169
|
-
exports.TrackerGroup = require_tracker_group();
|
|
170
|
-
exports.Tracker = require_tracker();
|
|
171
|
-
exports.TrackerStream = require_tracker_stream();
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
// ../../node_modules/console-control-strings/index.js
|
|
176
|
-
var require_console_control_strings = __commonJS({
|
|
177
|
-
"../../node_modules/console-control-strings/index.js"(exports) {
|
|
178
|
-
"use strict";
|
|
179
|
-
var prefix = "\x1B[";
|
|
180
|
-
exports.up = function(num) {
|
|
181
|
-
return prefix + (num || "") + "A";
|
|
182
|
-
};
|
|
183
|
-
exports.down = function(num) {
|
|
184
|
-
return prefix + (num || "") + "B";
|
|
185
|
-
};
|
|
186
|
-
exports.forward = function(num) {
|
|
187
|
-
return prefix + (num || "") + "C";
|
|
188
|
-
};
|
|
189
|
-
exports.back = function(num) {
|
|
190
|
-
return prefix + (num || "") + "D";
|
|
191
|
-
};
|
|
192
|
-
exports.nextLine = function(num) {
|
|
193
|
-
return prefix + (num || "") + "E";
|
|
194
|
-
};
|
|
195
|
-
exports.previousLine = function(num) {
|
|
196
|
-
return prefix + (num || "") + "F";
|
|
197
|
-
};
|
|
198
|
-
exports.horizontalAbsolute = function(num) {
|
|
199
|
-
if (num == null) throw new Error("horizontalAboslute requires a column to position to");
|
|
200
|
-
return prefix + num + "G";
|
|
201
|
-
};
|
|
202
|
-
exports.eraseData = function() {
|
|
203
|
-
return prefix + "J";
|
|
204
|
-
};
|
|
205
|
-
exports.eraseLine = function() {
|
|
206
|
-
return prefix + "K";
|
|
207
|
-
};
|
|
208
|
-
exports.goto = function(x3, y2) {
|
|
209
|
-
return prefix + y2 + ";" + x3 + "H";
|
|
210
|
-
};
|
|
211
|
-
exports.gotoSOL = function() {
|
|
212
|
-
return "\r";
|
|
213
|
-
};
|
|
214
|
-
exports.beep = function() {
|
|
215
|
-
return "\x07";
|
|
216
|
-
};
|
|
217
|
-
exports.hideCursor = function() {
|
|
218
|
-
return prefix + "?25l";
|
|
219
|
-
};
|
|
220
|
-
exports.showCursor = function() {
|
|
221
|
-
return prefix + "?25h";
|
|
222
|
-
};
|
|
223
|
-
var colors2 = {
|
|
224
|
-
reset: 0,
|
|
225
|
-
// styles
|
|
226
|
-
bold: 1,
|
|
227
|
-
italic: 3,
|
|
228
|
-
underline: 4,
|
|
229
|
-
inverse: 7,
|
|
230
|
-
// resets
|
|
231
|
-
stopBold: 22,
|
|
232
|
-
stopItalic: 23,
|
|
233
|
-
stopUnderline: 24,
|
|
234
|
-
stopInverse: 27,
|
|
235
|
-
// colors
|
|
236
|
-
white: 37,
|
|
237
|
-
black: 30,
|
|
238
|
-
blue: 34,
|
|
239
|
-
cyan: 36,
|
|
240
|
-
green: 32,
|
|
241
|
-
magenta: 35,
|
|
242
|
-
red: 31,
|
|
243
|
-
yellow: 33,
|
|
244
|
-
bgWhite: 47,
|
|
245
|
-
bgBlack: 40,
|
|
246
|
-
bgBlue: 44,
|
|
247
|
-
bgCyan: 46,
|
|
248
|
-
bgGreen: 42,
|
|
249
|
-
bgMagenta: 45,
|
|
250
|
-
bgRed: 41,
|
|
251
|
-
bgYellow: 43,
|
|
252
|
-
grey: 90,
|
|
253
|
-
brightBlack: 90,
|
|
254
|
-
brightRed: 91,
|
|
255
|
-
brightGreen: 92,
|
|
256
|
-
brightYellow: 93,
|
|
257
|
-
brightBlue: 94,
|
|
258
|
-
brightMagenta: 95,
|
|
259
|
-
brightCyan: 96,
|
|
260
|
-
brightWhite: 97,
|
|
261
|
-
bgGrey: 100,
|
|
262
|
-
bgBrightBlack: 100,
|
|
263
|
-
bgBrightRed: 101,
|
|
264
|
-
bgBrightGreen: 102,
|
|
265
|
-
bgBrightYellow: 103,
|
|
266
|
-
bgBrightBlue: 104,
|
|
267
|
-
bgBrightMagenta: 105,
|
|
268
|
-
bgBrightCyan: 106,
|
|
269
|
-
bgBrightWhite: 107
|
|
270
|
-
};
|
|
271
|
-
exports.color = function(colorWith) {
|
|
272
|
-
return (arguments.length !== 1 || !Array.isArray(colorWith)) && (colorWith = Array.prototype.slice.call(arguments)), prefix + colorWith.map(colorNameToCode).join(";") + "m";
|
|
273
|
-
};
|
|
274
|
-
function colorNameToCode(color) {
|
|
275
|
-
if (colors2[color] != null) return colors2[color];
|
|
276
|
-
throw new Error("Unknown color or style name: " + color);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
|
|
281
|
-
// ../../node_modules/ansi-regex/index.js
|
|
282
|
-
var require_ansi_regex = __commonJS({
|
|
283
|
-
"../../node_modules/ansi-regex/index.js"(exports, module) {
|
|
284
|
-
"use strict";
|
|
285
|
-
module.exports = ({ onlyFirst = !1 } = {}) => {
|
|
286
|
-
let pattern = [
|
|
287
|
-
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
288
|
-
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
289
|
-
].join("|");
|
|
290
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
});
|
|
294
|
-
|
|
295
|
-
// ../../node_modules/wide-align/node_modules/string-width/node_modules/strip-ansi/index.js
|
|
296
|
-
var require_strip_ansi = __commonJS({
|
|
297
|
-
"../../node_modules/wide-align/node_modules/string-width/node_modules/strip-ansi/index.js"(exports, module) {
|
|
298
|
-
"use strict";
|
|
299
|
-
var ansiRegex2 = require_ansi_regex();
|
|
300
|
-
module.exports = (string) => typeof string == "string" ? string.replace(ansiRegex2(), "") : string;
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
|
|
304
|
-
// ../../node_modules/is-fullwidth-code-point/index.js
|
|
305
|
-
var require_is_fullwidth_code_point = __commonJS({
|
|
306
|
-
"../../node_modules/is-fullwidth-code-point/index.js"(exports, module) {
|
|
307
|
-
"use strict";
|
|
308
|
-
var isFullwidthCodePoint = (codePoint) => Number.isNaN(codePoint) ? !1 : codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
|
|
309
|
-
codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
|
|
310
|
-
codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
|
|
311
|
-
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
312
|
-
11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
313
|
-
12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
|
|
314
|
-
19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
|
|
315
|
-
43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
|
|
316
|
-
44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
|
|
317
|
-
63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
|
|
318
|
-
65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
|
|
319
|
-
65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
|
|
320
|
-
65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
|
|
321
|
-
110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
|
|
322
|
-
127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
323
|
-
131072 <= codePoint && codePoint <= 262141);
|
|
324
|
-
module.exports = isFullwidthCodePoint;
|
|
325
|
-
module.exports.default = isFullwidthCodePoint;
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
// ../../node_modules/wide-align/node_modules/string-width/node_modules/emoji-regex/index.js
|
|
330
|
-
var require_emoji_regex = __commonJS({
|
|
331
|
-
"../../node_modules/wide-align/node_modules/string-width/node_modules/emoji-regex/index.js"(exports, module) {
|
|
332
|
-
"use strict";
|
|
333
|
-
module.exports = function() {
|
|
334
|
-
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
// ../../node_modules/wide-align/node_modules/string-width/index.js
|
|
340
|
-
var require_string_width = __commonJS({
|
|
341
|
-
"../../node_modules/wide-align/node_modules/string-width/index.js"(exports, module) {
|
|
342
|
-
"use strict";
|
|
343
|
-
var stripAnsi2 = require_strip_ansi(), isFullwidthCodePoint = require_is_fullwidth_code_point(), emojiRegex2 = require_emoji_regex(), stringWidth2 = (string) => {
|
|
344
|
-
if (typeof string != "string" || string.length === 0 || (string = stripAnsi2(string), string.length === 0))
|
|
345
|
-
return 0;
|
|
346
|
-
string = string.replace(emojiRegex2(), " ");
|
|
347
|
-
let width = 0;
|
|
348
|
-
for (let i = 0; i < string.length; i++) {
|
|
349
|
-
let code = string.codePointAt(i);
|
|
350
|
-
code <= 31 || code >= 127 && code <= 159 || code >= 768 && code <= 879 || (code > 65535 && i++, width += isFullwidthCodePoint(code) ? 2 : 1);
|
|
351
|
-
}
|
|
352
|
-
return width;
|
|
353
|
-
};
|
|
354
|
-
module.exports = stringWidth2;
|
|
355
|
-
module.exports.default = stringWidth2;
|
|
356
|
-
}
|
|
357
|
-
});
|
|
358
|
-
|
|
359
|
-
// ../../node_modules/wide-align/align.js
|
|
360
|
-
var require_align = __commonJS({
|
|
361
|
-
"../../node_modules/wide-align/align.js"(exports) {
|
|
362
|
-
"use strict";
|
|
363
|
-
var stringWidth2 = require_string_width();
|
|
364
|
-
exports.center = alignCenter;
|
|
365
|
-
exports.left = alignLeft;
|
|
366
|
-
exports.right = alignRight;
|
|
367
|
-
function createPadding(width) {
|
|
368
|
-
var result = "", string = " ", n = width;
|
|
369
|
-
do
|
|
370
|
-
n % 2 && (result += string), n = Math.floor(n / 2), string += string;
|
|
371
|
-
while (n);
|
|
372
|
-
return result;
|
|
373
|
-
}
|
|
374
|
-
function alignLeft(str, width) {
|
|
375
|
-
var trimmed = str.trimRight();
|
|
376
|
-
if (trimmed.length === 0 && str.length >= width) return str;
|
|
377
|
-
var padding = "", strWidth = stringWidth2(trimmed);
|
|
378
|
-
return strWidth < width && (padding = createPadding(width - strWidth)), trimmed + padding;
|
|
379
|
-
}
|
|
380
|
-
function alignRight(str, width) {
|
|
381
|
-
var trimmed = str.trimLeft();
|
|
382
|
-
if (trimmed.length === 0 && str.length >= width) return str;
|
|
383
|
-
var padding = "", strWidth = stringWidth2(trimmed);
|
|
384
|
-
return strWidth < width && (padding = createPadding(width - strWidth)), padding + trimmed;
|
|
385
|
-
}
|
|
386
|
-
function alignCenter(str, width) {
|
|
387
|
-
var trimmed = str.trim();
|
|
388
|
-
if (trimmed.length === 0 && str.length >= width) return str;
|
|
389
|
-
var padLeft = "", padRight = "", strWidth = stringWidth2(trimmed);
|
|
390
|
-
if (strWidth < width) {
|
|
391
|
-
var padLeftBy = parseInt((width - strWidth) / 2, 10);
|
|
392
|
-
padLeft = createPadding(padLeftBy), padRight = createPadding(width - (strWidth + padLeftBy));
|
|
393
|
-
}
|
|
394
|
-
return padLeft + trimmed + padRight;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
});
|
|
398
|
-
|
|
399
|
-
// ../../node_modules/aproba/index.js
|
|
400
|
-
var require_aproba = __commonJS({
|
|
401
|
-
"../../node_modules/aproba/index.js"(exports, module) {
|
|
402
|
-
"use strict";
|
|
403
|
-
module.exports = validate2;
|
|
404
|
-
function isArguments(thingy) {
|
|
405
|
-
return thingy != null && typeof thingy == "object" && thingy.hasOwnProperty("callee");
|
|
406
|
-
}
|
|
407
|
-
var types = {
|
|
408
|
-
"*": { label: "any", check: () => !0 },
|
|
409
|
-
A: { label: "array", check: (_2) => Array.isArray(_2) || isArguments(_2) },
|
|
410
|
-
S: { label: "string", check: (_2) => typeof _2 == "string" },
|
|
411
|
-
N: { label: "number", check: (_2) => typeof _2 == "number" },
|
|
412
|
-
F: { label: "function", check: (_2) => typeof _2 == "function" },
|
|
413
|
-
O: { label: "object", check: (_2) => typeof _2 == "object" && _2 != null && !types.A.check(_2) && !types.E.check(_2) },
|
|
414
|
-
B: { label: "boolean", check: (_2) => typeof _2 == "boolean" },
|
|
415
|
-
E: { label: "error", check: (_2) => _2 instanceof Error },
|
|
416
|
-
Z: { label: "null", check: (_2) => _2 == null }
|
|
417
|
-
};
|
|
418
|
-
function addSchema(schema, arity) {
|
|
419
|
-
let group = arity[schema.length] = arity[schema.length] || [];
|
|
420
|
-
group.indexOf(schema) === -1 && group.push(schema);
|
|
421
|
-
}
|
|
422
|
-
function validate2(rawSchemas, args) {
|
|
423
|
-
if (arguments.length !== 2) throw wrongNumberOfArgs(["SA"], arguments.length);
|
|
424
|
-
if (!rawSchemas) throw missingRequiredArg(0, "rawSchemas");
|
|
425
|
-
if (!args) throw missingRequiredArg(1, "args");
|
|
426
|
-
if (!types.S.check(rawSchemas)) throw invalidType(0, ["string"], rawSchemas);
|
|
427
|
-
if (!types.A.check(args)) throw invalidType(1, ["array"], args);
|
|
428
|
-
let schemas = rawSchemas.split("|"), arity = {};
|
|
429
|
-
schemas.forEach((schema) => {
|
|
430
|
-
for (let ii = 0; ii < schema.length; ++ii) {
|
|
431
|
-
let type = schema[ii];
|
|
432
|
-
if (!types[type]) throw unknownType(ii, type);
|
|
433
|
-
}
|
|
434
|
-
if (/E.*E/.test(schema)) throw moreThanOneError(schema);
|
|
435
|
-
addSchema(schema, arity), /E/.test(schema) && (addSchema(schema.replace(/E.*$/, "E"), arity), addSchema(schema.replace(/E/, "Z"), arity), schema.length === 1 && addSchema("", arity));
|
|
436
|
-
});
|
|
437
|
-
let matching = arity[args.length];
|
|
438
|
-
if (!matching)
|
|
439
|
-
throw wrongNumberOfArgs(Object.keys(arity), args.length);
|
|
440
|
-
for (let ii = 0; ii < args.length; ++ii) {
|
|
441
|
-
let newMatching = matching.filter((schema) => {
|
|
442
|
-
let type = schema[ii], typeCheck = types[type].check;
|
|
443
|
-
return typeCheck(args[ii]);
|
|
444
|
-
});
|
|
445
|
-
if (!newMatching.length) {
|
|
446
|
-
let labels = matching.map((_2) => types[_2[ii]].label).filter((_2) => _2 != null);
|
|
447
|
-
throw invalidType(ii, labels, args[ii]);
|
|
448
|
-
}
|
|
449
|
-
matching = newMatching;
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
function missingRequiredArg(num) {
|
|
453
|
-
return newException("EMISSINGARG", "Missing required argument #" + (num + 1));
|
|
454
|
-
}
|
|
455
|
-
function unknownType(num, type) {
|
|
456
|
-
return newException("EUNKNOWNTYPE", "Unknown type " + type + " in argument #" + (num + 1));
|
|
457
|
-
}
|
|
458
|
-
function invalidType(num, expectedTypes, value) {
|
|
459
|
-
let valueType;
|
|
460
|
-
return Object.keys(types).forEach((typeCode) => {
|
|
461
|
-
types[typeCode].check(value) && (valueType = types[typeCode].label);
|
|
462
|
-
}), newException("EINVALIDTYPE", "Argument #" + (num + 1) + ": Expected " + englishList(expectedTypes) + " but got " + valueType);
|
|
463
|
-
}
|
|
464
|
-
function englishList(list) {
|
|
465
|
-
return list.join(", ").replace(/, ([^,]+)$/, " or $1");
|
|
466
|
-
}
|
|
467
|
-
function wrongNumberOfArgs(expected, got) {
|
|
468
|
-
let english = englishList(expected), args = expected.every((ex) => ex.length === 1) ? "argument" : "arguments";
|
|
469
|
-
return newException("EWRONGARGCOUNT", "Expected " + english + " " + args + " but got " + got);
|
|
470
|
-
}
|
|
471
|
-
function moreThanOneError(schema) {
|
|
472
|
-
return newException(
|
|
473
|
-
"ETOOMANYERRORTYPES",
|
|
474
|
-
'Only one error type per argument signature is allowed, more than one found in "' + schema + '"'
|
|
475
|
-
);
|
|
476
|
-
}
|
|
477
|
-
function newException(code, msg) {
|
|
478
|
-
let err = new TypeError(msg);
|
|
479
|
-
return err.code = code, Error.captureStackTrace && Error.captureStackTrace(err, validate2), err;
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
});
|
|
483
|
-
|
|
484
|
-
// ../../node_modules/gauge/node_modules/strip-ansi/index.js
|
|
485
|
-
var require_strip_ansi2 = __commonJS({
|
|
486
|
-
"../../node_modules/gauge/node_modules/strip-ansi/index.js"(exports, module) {
|
|
487
|
-
"use strict";
|
|
488
|
-
var ansiRegex2 = require_ansi_regex();
|
|
489
|
-
module.exports = (string) => typeof string == "string" ? string.replace(ansiRegex2(), "") : string;
|
|
490
|
-
}
|
|
491
|
-
});
|
|
492
|
-
|
|
493
|
-
// ../../node_modules/gauge/node_modules/string-width/node_modules/emoji-regex/index.js
|
|
494
|
-
var require_emoji_regex2 = __commonJS({
|
|
495
|
-
"../../node_modules/gauge/node_modules/string-width/node_modules/emoji-regex/index.js"(exports, module) {
|
|
496
|
-
"use strict";
|
|
497
|
-
module.exports = function() {
|
|
498
|
-
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
499
|
-
};
|
|
500
|
-
}
|
|
501
|
-
});
|
|
502
|
-
|
|
503
|
-
// ../../node_modules/gauge/node_modules/string-width/index.js
|
|
504
|
-
var require_string_width2 = __commonJS({
|
|
505
|
-
"../../node_modules/gauge/node_modules/string-width/index.js"(exports, module) {
|
|
506
|
-
"use strict";
|
|
507
|
-
var stripAnsi2 = require_strip_ansi2(), isFullwidthCodePoint = require_is_fullwidth_code_point(), emojiRegex2 = require_emoji_regex2(), stringWidth2 = (string) => {
|
|
508
|
-
if (typeof string != "string" || string.length === 0 || (string = stripAnsi2(string), string.length === 0))
|
|
509
|
-
return 0;
|
|
510
|
-
string = string.replace(emojiRegex2(), " ");
|
|
511
|
-
let width = 0;
|
|
512
|
-
for (let i = 0; i < string.length; i++) {
|
|
513
|
-
let code = string.codePointAt(i);
|
|
514
|
-
code <= 31 || code >= 127 && code <= 159 || code >= 768 && code <= 879 || (code > 65535 && i++, width += isFullwidthCodePoint(code) ? 2 : 1);
|
|
515
|
-
}
|
|
516
|
-
return width;
|
|
517
|
-
};
|
|
518
|
-
module.exports = stringWidth2;
|
|
519
|
-
module.exports.default = stringWidth2;
|
|
520
|
-
}
|
|
521
|
-
});
|
|
522
|
-
|
|
523
|
-
// ../../node_modules/gauge/lib/wide-truncate.js
|
|
524
|
-
var require_wide_truncate = __commonJS({
|
|
525
|
-
"../../node_modules/gauge/lib/wide-truncate.js"(exports, module) {
|
|
526
|
-
"use strict";
|
|
527
|
-
var stringWidth2 = require_string_width2(), stripAnsi2 = require_strip_ansi2();
|
|
528
|
-
module.exports = wideTruncate;
|
|
529
|
-
function wideTruncate(str, target) {
|
|
530
|
-
if (stringWidth2(str) === 0)
|
|
531
|
-
return str;
|
|
532
|
-
if (target <= 0)
|
|
533
|
-
return "";
|
|
534
|
-
if (stringWidth2(str) <= target)
|
|
535
|
-
return str;
|
|
536
|
-
for (var noAnsi = stripAnsi2(str), ansiSize = str.length + noAnsi.length, truncated = str.slice(0, target + ansiSize); stringWidth2(truncated) > target; )
|
|
537
|
-
truncated = truncated.slice(0, -1);
|
|
538
|
-
return truncated;
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
});
|
|
542
|
-
|
|
543
|
-
// ../../node_modules/gauge/lib/error.js
|
|
544
|
-
var require_error = __commonJS({
|
|
545
|
-
"../../node_modules/gauge/lib/error.js"(exports) {
|
|
546
|
-
"use strict";
|
|
547
|
-
var util = __require("util"), User = exports.User = function User2(msg) {
|
|
548
|
-
var err = new Error(msg);
|
|
549
|
-
return Error.captureStackTrace(err, User2), err.code = "EGAUGE", err;
|
|
550
|
-
};
|
|
551
|
-
exports.MissingTemplateValue = function MissingTemplateValue(item, values) {
|
|
552
|
-
var err = new User(util.format('Missing template value "%s"', item.type));
|
|
553
|
-
return Error.captureStackTrace(err, MissingTemplateValue), err.template = item, err.values = values, err;
|
|
554
|
-
};
|
|
555
|
-
exports.Internal = function Internal(msg) {
|
|
556
|
-
var err = new Error(msg);
|
|
557
|
-
return Error.captureStackTrace(err, Internal), err.code = "EGAUGEINTERNAL", err;
|
|
558
|
-
};
|
|
559
|
-
}
|
|
560
|
-
});
|
|
561
|
-
|
|
562
|
-
// ../../node_modules/gauge/lib/template-item.js
|
|
563
|
-
var require_template_item = __commonJS({
|
|
564
|
-
"../../node_modules/gauge/lib/template-item.js"(exports, module) {
|
|
565
|
-
"use strict";
|
|
566
|
-
var stringWidth2 = require_string_width2();
|
|
567
|
-
module.exports = TemplateItem;
|
|
568
|
-
function isPercent(num) {
|
|
569
|
-
return typeof num != "string" ? !1 : num.slice(-1) === "%";
|
|
570
|
-
}
|
|
571
|
-
function percent(num) {
|
|
572
|
-
return Number(num.slice(0, -1)) / 100;
|
|
573
|
-
}
|
|
574
|
-
function TemplateItem(values, outputLength) {
|
|
575
|
-
if (this.overallOutputLength = outputLength, this.finished = !1, this.type = null, this.value = null, this.length = null, this.maxLength = null, this.minLength = null, this.kerning = null, this.align = "left", this.padLeft = 0, this.padRight = 0, this.index = null, this.first = null, this.last = null, typeof values == "string")
|
|
576
|
-
this.value = values;
|
|
577
|
-
else
|
|
578
|
-
for (var prop in values)
|
|
579
|
-
this[prop] = values[prop];
|
|
580
|
-
return isPercent(this.length) && (this.length = Math.round(this.overallOutputLength * percent(this.length))), isPercent(this.minLength) && (this.minLength = Math.round(this.overallOutputLength * percent(this.minLength))), isPercent(this.maxLength) && (this.maxLength = Math.round(this.overallOutputLength * percent(this.maxLength))), this;
|
|
581
|
-
}
|
|
582
|
-
TemplateItem.prototype = {};
|
|
583
|
-
TemplateItem.prototype.getBaseLength = function() {
|
|
584
|
-
var length = this.length;
|
|
585
|
-
return length == null && typeof this.value == "string" && this.maxLength == null && this.minLength == null && (length = stringWidth2(this.value)), length;
|
|
586
|
-
};
|
|
587
|
-
TemplateItem.prototype.getLength = function() {
|
|
588
|
-
var length = this.getBaseLength();
|
|
589
|
-
return length == null ? null : length + this.padLeft + this.padRight;
|
|
590
|
-
};
|
|
591
|
-
TemplateItem.prototype.getMaxLength = function() {
|
|
592
|
-
return this.maxLength == null ? null : this.maxLength + this.padLeft + this.padRight;
|
|
593
|
-
};
|
|
594
|
-
TemplateItem.prototype.getMinLength = function() {
|
|
595
|
-
return this.minLength == null ? null : this.minLength + this.padLeft + this.padRight;
|
|
596
|
-
};
|
|
597
|
-
}
|
|
598
|
-
});
|
|
599
|
-
|
|
600
|
-
// ../../node_modules/gauge/lib/render-template.js
|
|
601
|
-
var require_render_template = __commonJS({
|
|
602
|
-
"../../node_modules/gauge/lib/render-template.js"(exports, module) {
|
|
603
|
-
"use strict";
|
|
604
|
-
var align = require_align(), validate2 = require_aproba(), wideTruncate = require_wide_truncate(), error2 = require_error(), TemplateItem = require_template_item();
|
|
605
|
-
function renderValueWithValues(values) {
|
|
606
|
-
return function(item) {
|
|
607
|
-
return renderValue(item, values);
|
|
608
|
-
};
|
|
609
|
-
}
|
|
610
|
-
var renderTemplate = module.exports = function(width, template, values) {
|
|
611
|
-
var items = prepareItems(width, template, values), rendered = items.map(renderValueWithValues(values)).join("");
|
|
612
|
-
return align.left(wideTruncate(rendered, width), width);
|
|
613
|
-
};
|
|
614
|
-
function preType(item) {
|
|
615
|
-
var cappedTypeName = item.type[0].toUpperCase() + item.type.slice(1);
|
|
616
|
-
return "pre" + cappedTypeName;
|
|
617
|
-
}
|
|
618
|
-
function postType(item) {
|
|
619
|
-
var cappedTypeName = item.type[0].toUpperCase() + item.type.slice(1);
|
|
620
|
-
return "post" + cappedTypeName;
|
|
621
|
-
}
|
|
622
|
-
function hasPreOrPost(item, values) {
|
|
623
|
-
if (item.type)
|
|
624
|
-
return values[preType(item)] || values[postType(item)];
|
|
625
|
-
}
|
|
626
|
-
function generatePreAndPost(baseItem, parentValues) {
|
|
627
|
-
var item = Object.assign({}, baseItem), values = Object.create(parentValues), template = [], pre = preType(item), post = postType(item);
|
|
628
|
-
return values[pre] && (template.push({ value: values[pre] }), values[pre] = null), item.minLength = null, item.length = null, item.maxLength = null, template.push(item), values[item.type] = values[item.type], values[post] && (template.push({ value: values[post] }), values[post] = null), function($1, $2, length) {
|
|
629
|
-
return renderTemplate(length, template, values);
|
|
630
|
-
};
|
|
631
|
-
}
|
|
632
|
-
function prepareItems(width, template, values) {
|
|
633
|
-
function cloneAndObjectify(item, index, arr) {
|
|
634
|
-
var cloned = new TemplateItem(item, width), type = cloned.type;
|
|
635
|
-
if (cloned.value == null)
|
|
636
|
-
if (type in values)
|
|
637
|
-
cloned.value = values[type];
|
|
638
|
-
else {
|
|
639
|
-
if (cloned.default == null)
|
|
640
|
-
throw new error2.MissingTemplateValue(cloned, values);
|
|
641
|
-
cloned.value = cloned.default;
|
|
642
|
-
}
|
|
643
|
-
return cloned.value == null || cloned.value === "" ? null : (cloned.index = index, cloned.first = index === 0, cloned.last = index === arr.length - 1, hasPreOrPost(cloned, values) && (cloned.value = generatePreAndPost(cloned, values)), cloned);
|
|
644
|
-
}
|
|
645
|
-
var output = template.map(cloneAndObjectify).filter(function(item) {
|
|
646
|
-
return item != null;
|
|
647
|
-
}), remainingSpace = width, variableCount = output.length;
|
|
648
|
-
function consumeSpace(length) {
|
|
649
|
-
length > remainingSpace && (length = remainingSpace), remainingSpace -= length;
|
|
650
|
-
}
|
|
651
|
-
function finishSizing(item, length) {
|
|
652
|
-
if (item.finished)
|
|
653
|
-
throw new error2.Internal("Tried to finish template item that was already finished");
|
|
654
|
-
if (length === 1 / 0)
|
|
655
|
-
throw new error2.Internal("Length of template item cannot be infinity");
|
|
656
|
-
if (length != null && (item.length = length), item.minLength = null, item.maxLength = null, --variableCount, item.finished = !0, item.length == null && (item.length = item.getBaseLength()), item.length == null)
|
|
657
|
-
throw new error2.Internal("Finished template items must have a length");
|
|
658
|
-
consumeSpace(item.getLength());
|
|
659
|
-
}
|
|
660
|
-
output.forEach(function(item) {
|
|
661
|
-
if (item.kerning) {
|
|
662
|
-
var prevPadRight = item.first ? 0 : output[item.index - 1].padRight;
|
|
663
|
-
!item.first && prevPadRight < item.kerning && (item.padLeft = item.kerning - prevPadRight), item.last || (item.padRight = item.kerning);
|
|
664
|
-
}
|
|
665
|
-
}), output.forEach(function(item) {
|
|
666
|
-
item.getBaseLength() != null && finishSizing(item);
|
|
667
|
-
});
|
|
668
|
-
var resized = 0, resizing, hunkSize;
|
|
669
|
-
do
|
|
670
|
-
resizing = !1, hunkSize = Math.round(remainingSpace / variableCount), output.forEach(function(item) {
|
|
671
|
-
item.finished || item.maxLength && item.getMaxLength() < hunkSize && (finishSizing(item, item.maxLength), resizing = !0);
|
|
672
|
-
});
|
|
673
|
-
while (resizing && resized++ < output.length);
|
|
674
|
-
if (resizing)
|
|
675
|
-
throw new error2.Internal("Resize loop iterated too many times while determining maxLength");
|
|
676
|
-
resized = 0;
|
|
677
|
-
do
|
|
678
|
-
resizing = !1, hunkSize = Math.round(remainingSpace / variableCount), output.forEach(function(item) {
|
|
679
|
-
item.finished || item.minLength && item.getMinLength() >= hunkSize && (finishSizing(item, item.minLength), resizing = !0);
|
|
680
|
-
});
|
|
681
|
-
while (resizing && resized++ < output.length);
|
|
682
|
-
if (resizing)
|
|
683
|
-
throw new error2.Internal("Resize loop iterated too many times while determining minLength");
|
|
684
|
-
return hunkSize = Math.round(remainingSpace / variableCount), output.forEach(function(item) {
|
|
685
|
-
item.finished || finishSizing(item, hunkSize);
|
|
686
|
-
}), output;
|
|
687
|
-
}
|
|
688
|
-
function renderFunction(item, values, length) {
|
|
689
|
-
return validate2("OON", arguments), item.type ? item.value(values, values[item.type + "Theme"] || {}, length) : item.value(values, {}, length);
|
|
690
|
-
}
|
|
691
|
-
function renderValue(item, values) {
|
|
692
|
-
var length = item.getBaseLength(), value = typeof item.value == "function" ? renderFunction(item, values, length) : item.value;
|
|
693
|
-
if (value == null || value === "")
|
|
694
|
-
return "";
|
|
695
|
-
var alignWith = align[item.align] || align.left, leftPadding = item.padLeft ? align.left("", item.padLeft) : "", rightPadding = item.padRight ? align.right("", item.padRight) : "", truncated = wideTruncate(String(value), length), aligned = alignWith(truncated, length);
|
|
696
|
-
return leftPadding + aligned + rightPadding;
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
});
|
|
700
|
-
|
|
701
|
-
// ../../node_modules/gauge/lib/plumbing.js
|
|
702
|
-
var require_plumbing = __commonJS({
|
|
703
|
-
"../../node_modules/gauge/lib/plumbing.js"(exports, module) {
|
|
704
|
-
"use strict";
|
|
705
|
-
var consoleControl = require_console_control_strings(), renderTemplate = require_render_template(), validate2 = require_aproba(), Plumbing = module.exports = function(theme, template, width) {
|
|
706
|
-
width || (width = 80), validate2("OAN", [theme, template, width]), this.showing = !1, this.theme = theme, this.width = width, this.template = template;
|
|
707
|
-
};
|
|
708
|
-
Plumbing.prototype = {};
|
|
709
|
-
Plumbing.prototype.setTheme = function(theme) {
|
|
710
|
-
validate2("O", [theme]), this.theme = theme;
|
|
711
|
-
};
|
|
712
|
-
Plumbing.prototype.setTemplate = function(template) {
|
|
713
|
-
validate2("A", [template]), this.template = template;
|
|
714
|
-
};
|
|
715
|
-
Plumbing.prototype.setWidth = function(width) {
|
|
716
|
-
validate2("N", [width]), this.width = width;
|
|
717
|
-
};
|
|
718
|
-
Plumbing.prototype.hide = function() {
|
|
719
|
-
return consoleControl.gotoSOL() + consoleControl.eraseLine();
|
|
720
|
-
};
|
|
721
|
-
Plumbing.prototype.hideCursor = consoleControl.hideCursor;
|
|
722
|
-
Plumbing.prototype.showCursor = consoleControl.showCursor;
|
|
723
|
-
Plumbing.prototype.show = function(status) {
|
|
724
|
-
var values = Object.create(this.theme);
|
|
725
|
-
for (var key in status)
|
|
726
|
-
values[key] = status[key];
|
|
727
|
-
return renderTemplate(this.width, this.template, values).trim() + consoleControl.color("reset") + consoleControl.eraseLine() + consoleControl.gotoSOL();
|
|
728
|
-
};
|
|
729
|
-
}
|
|
730
|
-
});
|
|
731
|
-
|
|
732
|
-
// ../../node_modules/has-unicode/index.js
|
|
733
|
-
var require_has_unicode = __commonJS({
|
|
734
|
-
"../../node_modules/has-unicode/index.js"(exports, module) {
|
|
735
|
-
"use strict";
|
|
736
|
-
var os = __require("os"), hasUnicode = module.exports = function() {
|
|
737
|
-
if (os.type() == "Windows_NT")
|
|
738
|
-
return !1;
|
|
739
|
-
var isUTF8 = /UTF-?8$/i, ctype = process.env.LC_ALL || process.env.LC_CTYPE || process.env.LANG;
|
|
740
|
-
return isUTF8.test(ctype);
|
|
741
|
-
};
|
|
742
|
-
}
|
|
743
|
-
});
|
|
744
|
-
|
|
745
|
-
// ../../node_modules/color-support/index.js
|
|
746
|
-
var require_color_support = __commonJS({
|
|
747
|
-
"../../node_modules/color-support/index.js"(exports, module) {
|
|
748
|
-
module.exports = colorSupport({ alwaysReturn: !0 }, colorSupport);
|
|
749
|
-
function hasNone(obj, options) {
|
|
750
|
-
return obj.level = 0, obj.hasBasic = !1, obj.has256 = !1, obj.has16m = !1, options.alwaysReturn ? obj : !1;
|
|
751
|
-
}
|
|
752
|
-
function hasBasic(obj) {
|
|
753
|
-
return obj.hasBasic = !0, obj.has256 = !1, obj.has16m = !1, obj.level = 1, obj;
|
|
754
|
-
}
|
|
755
|
-
function has256(obj) {
|
|
756
|
-
return obj.hasBasic = !0, obj.has256 = !0, obj.has16m = !1, obj.level = 2, obj;
|
|
757
|
-
}
|
|
758
|
-
function has16m(obj) {
|
|
759
|
-
return obj.hasBasic = !0, obj.has256 = !0, obj.has16m = !0, obj.level = 3, obj;
|
|
760
|
-
}
|
|
761
|
-
function colorSupport(options, obj) {
|
|
762
|
-
if (options = options || {}, obj = obj || {}, typeof options.level == "number")
|
|
763
|
-
switch (options.level) {
|
|
764
|
-
case 0:
|
|
765
|
-
return hasNone(obj, options);
|
|
766
|
-
case 1:
|
|
767
|
-
return hasBasic(obj);
|
|
768
|
-
case 2:
|
|
769
|
-
return has256(obj);
|
|
770
|
-
case 3:
|
|
771
|
-
return has16m(obj);
|
|
772
|
-
}
|
|
773
|
-
if (obj.level = 0, obj.hasBasic = !1, obj.has256 = !1, obj.has16m = !1, typeof process > "u" || !process || !process.stdout || !process.env || !process.platform)
|
|
774
|
-
return hasNone(obj, options);
|
|
775
|
-
var env = options.env || process.env, stream = options.stream || process.stdout, term = options.term || env.TERM || "", platform = options.platform || process.platform;
|
|
776
|
-
if (!options.ignoreTTY && !stream.isTTY || !options.ignoreDumb && term === "dumb" && !env.COLORTERM)
|
|
777
|
-
return hasNone(obj, options);
|
|
778
|
-
if (platform === "win32")
|
|
779
|
-
return hasBasic(obj);
|
|
780
|
-
if (env.TMUX)
|
|
781
|
-
return has256(obj);
|
|
782
|
-
if (!options.ignoreCI && (env.CI || env.TEAMCITY_VERSION))
|
|
783
|
-
return env.TRAVIS ? has256(obj) : hasNone(obj, options);
|
|
784
|
-
switch (env.TERM_PROGRAM) {
|
|
785
|
-
case "iTerm.app":
|
|
786
|
-
var ver = env.TERM_PROGRAM_VERSION || "0.";
|
|
787
|
-
return /^[0-2]\./.test(ver) ? has256(obj) : has16m(obj);
|
|
788
|
-
case "HyperTerm":
|
|
789
|
-
case "Hyper":
|
|
790
|
-
return has16m(obj);
|
|
791
|
-
case "MacTerm":
|
|
792
|
-
return has16m(obj);
|
|
793
|
-
case "Apple_Terminal":
|
|
794
|
-
return has256(obj);
|
|
795
|
-
}
|
|
796
|
-
return /^xterm-256/.test(term) ? has256(obj) : /^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(term) || env.COLORTERM ? hasBasic(obj) : hasNone(obj, options);
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
});
|
|
800
|
-
|
|
801
|
-
// ../../node_modules/gauge/lib/has-color.js
|
|
802
|
-
var require_has_color = __commonJS({
|
|
803
|
-
"../../node_modules/gauge/lib/has-color.js"(exports, module) {
|
|
804
|
-
"use strict";
|
|
805
|
-
var colorSupport = require_color_support();
|
|
806
|
-
module.exports = colorSupport().hasBasic;
|
|
807
|
-
}
|
|
808
|
-
});
|
|
809
|
-
|
|
810
|
-
// ../../node_modules/signal-exit/dist/cjs/signals.js
|
|
811
|
-
var require_signals = __commonJS({
|
|
812
|
-
"../../node_modules/signal-exit/dist/cjs/signals.js"(exports) {
|
|
813
|
-
"use strict";
|
|
814
|
-
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
815
|
-
exports.signals = void 0;
|
|
816
|
-
exports.signals = [];
|
|
817
|
-
exports.signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
818
|
-
process.platform !== "win32" && exports.signals.push(
|
|
819
|
-
"SIGALRM",
|
|
820
|
-
"SIGABRT",
|
|
821
|
-
"SIGVTALRM",
|
|
822
|
-
"SIGXCPU",
|
|
823
|
-
"SIGXFSZ",
|
|
824
|
-
"SIGUSR2",
|
|
825
|
-
"SIGTRAP",
|
|
826
|
-
"SIGSYS",
|
|
827
|
-
"SIGQUIT",
|
|
828
|
-
"SIGIOT"
|
|
829
|
-
// should detect profiler and enable/disable accordingly.
|
|
830
|
-
// see #21
|
|
831
|
-
// 'SIGPROF'
|
|
832
|
-
);
|
|
833
|
-
process.platform === "linux" && exports.signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
834
|
-
}
|
|
835
|
-
});
|
|
836
|
-
|
|
837
|
-
// ../../node_modules/signal-exit/dist/cjs/index.js
|
|
838
|
-
var require_cjs = __commonJS({
|
|
839
|
-
"../../node_modules/signal-exit/dist/cjs/index.js"(exports) {
|
|
840
|
-
"use strict";
|
|
841
|
-
var _a;
|
|
842
|
-
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
843
|
-
exports.unload = exports.load = exports.onExit = exports.signals = void 0;
|
|
844
|
-
var signals_js_1 = require_signals();
|
|
845
|
-
Object.defineProperty(exports, "signals", { enumerable: !0, get: function() {
|
|
846
|
-
return signals_js_1.signals;
|
|
847
|
-
} });
|
|
848
|
-
var processOk = (process3) => !!process3 && typeof process3 == "object" && typeof process3.removeListener == "function" && typeof process3.emit == "function" && typeof process3.reallyExit == "function" && typeof process3.listeners == "function" && typeof process3.kill == "function" && typeof process3.pid == "number" && typeof process3.on == "function", kExitEmitter = /* @__PURE__ */ Symbol.for("signal-exit emitter"), global = globalThis, ObjectDefineProperty = Object.defineProperty.bind(Object), Emitter = class {
|
|
849
|
-
emitted = {
|
|
850
|
-
afterExit: !1,
|
|
851
|
-
exit: !1
|
|
852
|
-
};
|
|
853
|
-
listeners = {
|
|
854
|
-
afterExit: [],
|
|
855
|
-
exit: []
|
|
856
|
-
};
|
|
857
|
-
count = 0;
|
|
858
|
-
id = Math.random();
|
|
859
|
-
constructor() {
|
|
860
|
-
if (global[kExitEmitter])
|
|
861
|
-
return global[kExitEmitter];
|
|
862
|
-
ObjectDefineProperty(global, kExitEmitter, {
|
|
863
|
-
value: this,
|
|
864
|
-
writable: !1,
|
|
865
|
-
enumerable: !1,
|
|
866
|
-
configurable: !1
|
|
867
|
-
});
|
|
868
|
-
}
|
|
869
|
-
on(ev, fn) {
|
|
870
|
-
this.listeners[ev].push(fn);
|
|
871
|
-
}
|
|
872
|
-
removeListener(ev, fn) {
|
|
873
|
-
let list = this.listeners[ev], i = list.indexOf(fn);
|
|
874
|
-
i !== -1 && (i === 0 && list.length === 1 ? list.length = 0 : list.splice(i, 1));
|
|
875
|
-
}
|
|
876
|
-
emit(ev, code, signal) {
|
|
877
|
-
if (this.emitted[ev])
|
|
878
|
-
return !1;
|
|
879
|
-
this.emitted[ev] = !0;
|
|
880
|
-
let ret = !1;
|
|
881
|
-
for (let fn of this.listeners[ev])
|
|
882
|
-
ret = fn(code, signal) === !0 || ret;
|
|
883
|
-
return ev === "exit" && (ret = this.emit("afterExit", code, signal) || ret), ret;
|
|
884
|
-
}
|
|
885
|
-
}, SignalExitBase = class {
|
|
886
|
-
}, signalExitWrap = (handler) => ({
|
|
887
|
-
onExit(cb, opts) {
|
|
888
|
-
return handler.onExit(cb, opts);
|
|
889
|
-
},
|
|
890
|
-
load() {
|
|
891
|
-
return handler.load();
|
|
892
|
-
},
|
|
893
|
-
unload() {
|
|
894
|
-
return handler.unload();
|
|
895
|
-
}
|
|
896
|
-
}), SignalExitFallback = class extends SignalExitBase {
|
|
897
|
-
onExit() {
|
|
898
|
-
return () => {
|
|
899
|
-
};
|
|
900
|
-
}
|
|
901
|
-
load() {
|
|
902
|
-
}
|
|
903
|
-
unload() {
|
|
904
|
-
}
|
|
905
|
-
}, SignalExit = class extends SignalExitBase {
|
|
906
|
-
// "SIGHUP" throws an `ENOSYS` error on Windows,
|
|
907
|
-
// so use a supported signal instead
|
|
908
|
-
/* c8 ignore start */
|
|
909
|
-
#hupSig = process2.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
910
|
-
/* c8 ignore stop */
|
|
911
|
-
#emitter = new Emitter();
|
|
912
|
-
#process;
|
|
913
|
-
#originalProcessEmit;
|
|
914
|
-
#originalProcessReallyExit;
|
|
915
|
-
#sigListeners = {};
|
|
916
|
-
#loaded = !1;
|
|
917
|
-
constructor(process3) {
|
|
918
|
-
super(), this.#process = process3, this.#sigListeners = {};
|
|
919
|
-
for (let sig of signals_js_1.signals)
|
|
920
|
-
this.#sigListeners[sig] = () => {
|
|
921
|
-
let listeners = this.#process.listeners(sig), { count } = this.#emitter, p = process3;
|
|
922
|
-
if (typeof p.__signal_exit_emitter__ == "object" && typeof p.__signal_exit_emitter__.count == "number" && (count += p.__signal_exit_emitter__.count), listeners.length === count) {
|
|
923
|
-
this.unload();
|
|
924
|
-
let ret = this.#emitter.emit("exit", null, sig), s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
925
|
-
ret || process3.kill(process3.pid, s);
|
|
926
|
-
}
|
|
927
|
-
};
|
|
928
|
-
this.#originalProcessReallyExit = process3.reallyExit, this.#originalProcessEmit = process3.emit;
|
|
929
|
-
}
|
|
930
|
-
onExit(cb, opts) {
|
|
931
|
-
if (!processOk(this.#process))
|
|
932
|
-
return () => {
|
|
933
|
-
};
|
|
934
|
-
this.#loaded === !1 && this.load();
|
|
935
|
-
let ev = opts?.alwaysLast ? "afterExit" : "exit";
|
|
936
|
-
return this.#emitter.on(ev, cb), () => {
|
|
937
|
-
this.#emitter.removeListener(ev, cb), this.#emitter.listeners.exit.length === 0 && this.#emitter.listeners.afterExit.length === 0 && this.unload();
|
|
938
|
-
};
|
|
939
|
-
}
|
|
940
|
-
load() {
|
|
941
|
-
if (!this.#loaded) {
|
|
942
|
-
this.#loaded = !0, this.#emitter.count += 1;
|
|
943
|
-
for (let sig of signals_js_1.signals)
|
|
944
|
-
try {
|
|
945
|
-
let fn = this.#sigListeners[sig];
|
|
946
|
-
fn && this.#process.on(sig, fn);
|
|
947
|
-
} catch {
|
|
948
|
-
}
|
|
949
|
-
this.#process.emit = (ev, ...a) => this.#processEmit(ev, ...a), this.#process.reallyExit = (code) => this.#processReallyExit(code);
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
unload() {
|
|
953
|
-
this.#loaded && (this.#loaded = !1, signals_js_1.signals.forEach((sig) => {
|
|
954
|
-
let listener = this.#sigListeners[sig];
|
|
955
|
-
if (!listener)
|
|
956
|
-
throw new Error("Listener not defined for signal: " + sig);
|
|
957
|
-
try {
|
|
958
|
-
this.#process.removeListener(sig, listener);
|
|
959
|
-
} catch {
|
|
960
|
-
}
|
|
961
|
-
}), this.#process.emit = this.#originalProcessEmit, this.#process.reallyExit = this.#originalProcessReallyExit, this.#emitter.count -= 1);
|
|
962
|
-
}
|
|
963
|
-
#processReallyExit(code) {
|
|
964
|
-
return processOk(this.#process) ? (this.#process.exitCode = code || 0, this.#emitter.emit("exit", this.#process.exitCode, null), this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode)) : 0;
|
|
965
|
-
}
|
|
966
|
-
#processEmit(ev, ...args) {
|
|
967
|
-
let og = this.#originalProcessEmit;
|
|
968
|
-
if (ev === "exit" && processOk(this.#process)) {
|
|
969
|
-
typeof args[0] == "number" && (this.#process.exitCode = args[0]);
|
|
970
|
-
let ret = og.call(this.#process, ev, ...args);
|
|
971
|
-
return this.#emitter.emit("exit", this.#process.exitCode, null), ret;
|
|
972
|
-
} else
|
|
973
|
-
return og.call(this.#process, ev, ...args);
|
|
974
|
-
}
|
|
975
|
-
}, process2 = globalThis.process;
|
|
976
|
-
_a = signalExitWrap(processOk(process2) ? new SignalExit(process2) : new SignalExitFallback()), /**
|
|
977
|
-
* Called when the process is exiting, whether via signal, explicit
|
|
978
|
-
* exit, or running out of stuff to do.
|
|
979
|
-
*
|
|
980
|
-
* If the global process object is not suitable for instrumentation,
|
|
981
|
-
* then this will be a no-op.
|
|
982
|
-
*
|
|
983
|
-
* Returns a function that may be used to unload signal-exit.
|
|
984
|
-
*/
|
|
985
|
-
exports.onExit = _a.onExit, /**
|
|
986
|
-
* Load the listeners. Likely you never need to call this, unless
|
|
987
|
-
* doing a rather deep integration with signal-exit functionality.
|
|
988
|
-
* Mostly exposed for the benefit of testing.
|
|
989
|
-
*
|
|
990
|
-
* @internal
|
|
991
|
-
*/
|
|
992
|
-
exports.load = _a.load, /**
|
|
993
|
-
* Unload the listeners. Likely you never need to call this, unless
|
|
994
|
-
* doing a rather deep integration with signal-exit functionality.
|
|
995
|
-
* Mostly exposed for the benefit of testing.
|
|
996
|
-
*
|
|
997
|
-
* @internal
|
|
998
|
-
*/
|
|
999
|
-
exports.unload = _a.unload;
|
|
1000
|
-
}
|
|
1001
|
-
});
|
|
1002
|
-
|
|
1003
|
-
// ../../node_modules/gauge/lib/spin.js
|
|
1004
|
-
var require_spin = __commonJS({
|
|
1005
|
-
"../../node_modules/gauge/lib/spin.js"(exports, module) {
|
|
1006
|
-
"use strict";
|
|
1007
|
-
module.exports = function(spinstr, spun) {
|
|
1008
|
-
return spinstr[spun % spinstr.length];
|
|
1009
|
-
};
|
|
1010
|
-
}
|
|
1011
|
-
});
|
|
1012
|
-
|
|
1013
|
-
// ../../node_modules/gauge/lib/progress-bar.js
|
|
1014
|
-
var require_progress_bar = __commonJS({
|
|
1015
|
-
"../../node_modules/gauge/lib/progress-bar.js"(exports, module) {
|
|
1016
|
-
"use strict";
|
|
1017
|
-
var validate2 = require_aproba(), renderTemplate = require_render_template(), wideTruncate = require_wide_truncate(), stringWidth2 = require_string_width2();
|
|
1018
|
-
module.exports = function(theme, width, completed) {
|
|
1019
|
-
if (validate2("ONN", [theme, width, completed]), completed < 0 && (completed = 0), completed > 1 && (completed = 1), width <= 0)
|
|
1020
|
-
return "";
|
|
1021
|
-
var sofar = Math.round(width * completed), rest = width - sofar, template = [
|
|
1022
|
-
{ type: "complete", value: repeat(theme.complete, sofar), length: sofar },
|
|
1023
|
-
{ type: "remaining", value: repeat(theme.remaining, rest), length: rest }
|
|
1024
|
-
];
|
|
1025
|
-
return renderTemplate(width, template, theme);
|
|
1026
|
-
};
|
|
1027
|
-
function repeat(string, width) {
|
|
1028
|
-
var result = "", n = width;
|
|
1029
|
-
do
|
|
1030
|
-
n % 2 && (result += string), n = Math.floor(n / 2), string += string;
|
|
1031
|
-
while (n && stringWidth2(result) < width);
|
|
1032
|
-
return wideTruncate(result, width);
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
});
|
|
1036
|
-
|
|
1037
|
-
// ../../node_modules/gauge/lib/base-theme.js
|
|
1038
|
-
var require_base_theme = __commonJS({
|
|
1039
|
-
"../../node_modules/gauge/lib/base-theme.js"(exports, module) {
|
|
1040
|
-
"use strict";
|
|
1041
|
-
var spin = require_spin(), progressBar = require_progress_bar();
|
|
1042
|
-
module.exports = {
|
|
1043
|
-
activityIndicator: function(values, theme) {
|
|
1044
|
-
if (values.spun != null)
|
|
1045
|
-
return spin(theme, values.spun);
|
|
1046
|
-
},
|
|
1047
|
-
progressbar: function(values, theme, width) {
|
|
1048
|
-
if (values.completed != null)
|
|
1049
|
-
return progressBar(theme, width, values.completed);
|
|
1050
|
-
}
|
|
1051
|
-
};
|
|
1052
|
-
}
|
|
1053
|
-
});
|
|
1054
|
-
|
|
1055
|
-
// ../../node_modules/gauge/lib/theme-set.js
|
|
1056
|
-
var require_theme_set = __commonJS({
|
|
1057
|
-
"../../node_modules/gauge/lib/theme-set.js"(exports, module) {
|
|
1058
|
-
"use strict";
|
|
1059
|
-
module.exports = function() {
|
|
1060
|
-
return ThemeSetProto.newThemeSet();
|
|
1061
|
-
};
|
|
1062
|
-
var ThemeSetProto = {};
|
|
1063
|
-
ThemeSetProto.baseTheme = require_base_theme();
|
|
1064
|
-
ThemeSetProto.newTheme = function(parent, theme) {
|
|
1065
|
-
return theme || (theme = parent, parent = this.baseTheme), Object.assign({}, parent, theme);
|
|
1066
|
-
};
|
|
1067
|
-
ThemeSetProto.getThemeNames = function() {
|
|
1068
|
-
return Object.keys(this.themes);
|
|
1069
|
-
};
|
|
1070
|
-
ThemeSetProto.addTheme = function(name, parent, theme) {
|
|
1071
|
-
this.themes[name] = this.newTheme(parent, theme);
|
|
1072
|
-
};
|
|
1073
|
-
ThemeSetProto.addToAllThemes = function(theme) {
|
|
1074
|
-
var themes = this.themes;
|
|
1075
|
-
Object.keys(themes).forEach(function(name) {
|
|
1076
|
-
Object.assign(themes[name], theme);
|
|
1077
|
-
}), Object.assign(this.baseTheme, theme);
|
|
1078
|
-
};
|
|
1079
|
-
ThemeSetProto.getTheme = function(name) {
|
|
1080
|
-
if (!this.themes[name])
|
|
1081
|
-
throw this.newMissingThemeError(name);
|
|
1082
|
-
return this.themes[name];
|
|
1083
|
-
};
|
|
1084
|
-
ThemeSetProto.setDefault = function(opts, name) {
|
|
1085
|
-
name == null && (name = opts, opts = {});
|
|
1086
|
-
var platform = opts.platform == null ? "fallback" : opts.platform, hasUnicode = !!opts.hasUnicode, hasColor = !!opts.hasColor;
|
|
1087
|
-
this.defaults[platform] || (this.defaults[platform] = { true: {}, false: {} }), this.defaults[platform][hasUnicode][hasColor] = name;
|
|
1088
|
-
};
|
|
1089
|
-
ThemeSetProto.getDefault = function(opts) {
|
|
1090
|
-
opts || (opts = {});
|
|
1091
|
-
var platformName = opts.platform || process.platform, platform = this.defaults[platformName] || this.defaults.fallback, hasUnicode = !!opts.hasUnicode, hasColor = !!opts.hasColor;
|
|
1092
|
-
if (!platform)
|
|
1093
|
-
throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor);
|
|
1094
|
-
if (!platform[hasUnicode][hasColor]) {
|
|
1095
|
-
if (hasUnicode && hasColor && platform[!hasUnicode][hasColor])
|
|
1096
|
-
hasUnicode = !1;
|
|
1097
|
-
else if (hasUnicode && hasColor && platform[hasUnicode][!hasColor])
|
|
1098
|
-
hasColor = !1;
|
|
1099
|
-
else if (hasUnicode && hasColor && platform[!hasUnicode][!hasColor])
|
|
1100
|
-
hasUnicode = !1, hasColor = !1;
|
|
1101
|
-
else if (hasUnicode && !hasColor && platform[!hasUnicode][hasColor])
|
|
1102
|
-
hasUnicode = !1;
|
|
1103
|
-
else if (!hasUnicode && hasColor && platform[hasUnicode][!hasColor])
|
|
1104
|
-
hasColor = !1;
|
|
1105
|
-
else if (platform === this.defaults.fallback)
|
|
1106
|
-
throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor);
|
|
1107
|
-
}
|
|
1108
|
-
return platform[hasUnicode][hasColor] ? this.getTheme(platform[hasUnicode][hasColor]) : this.getDefault(Object.assign({}, opts, { platform: "fallback" }));
|
|
1109
|
-
};
|
|
1110
|
-
ThemeSetProto.newMissingThemeError = function newMissingThemeError(name) {
|
|
1111
|
-
var err = new Error('Could not find a gauge theme named "' + name + '"');
|
|
1112
|
-
return Error.captureStackTrace.call(err, newMissingThemeError), err.theme = name, err.code = "EMISSINGTHEME", err;
|
|
1113
|
-
};
|
|
1114
|
-
ThemeSetProto.newMissingDefaultThemeError = function newMissingDefaultThemeError(platformName, hasUnicode, hasColor) {
|
|
1115
|
-
var err = new Error(
|
|
1116
|
-
`Could not find a gauge theme for your platform/unicode/color use combo:
|
|
1117
|
-
platform = ` + platformName + `
|
|
1118
|
-
hasUnicode = ` + hasUnicode + `
|
|
1119
|
-
hasColor = ` + hasColor
|
|
1120
|
-
);
|
|
1121
|
-
return Error.captureStackTrace.call(err, newMissingDefaultThemeError), err.platform = platformName, err.hasUnicode = hasUnicode, err.hasColor = hasColor, err.code = "EMISSINGTHEME", err;
|
|
1122
|
-
};
|
|
1123
|
-
ThemeSetProto.newThemeSet = function() {
|
|
1124
|
-
var themeset = function(opts) {
|
|
1125
|
-
return themeset.getDefault(opts);
|
|
1126
|
-
};
|
|
1127
|
-
return Object.assign(themeset, ThemeSetProto, {
|
|
1128
|
-
themes: Object.assign({}, this.themes),
|
|
1129
|
-
baseTheme: Object.assign({}, this.baseTheme),
|
|
1130
|
-
defaults: JSON.parse(JSON.stringify(this.defaults || {}))
|
|
1131
|
-
});
|
|
1132
|
-
};
|
|
1133
|
-
}
|
|
1134
|
-
});
|
|
1135
|
-
|
|
1136
|
-
// ../../node_modules/gauge/lib/themes.js
|
|
1137
|
-
var require_themes = __commonJS({
|
|
1138
|
-
"../../node_modules/gauge/lib/themes.js"(exports, module) {
|
|
1139
|
-
"use strict";
|
|
1140
|
-
var color = require_console_control_strings().color, ThemeSet = require_theme_set(), themes = module.exports = new ThemeSet();
|
|
1141
|
-
themes.addTheme("ASCII", {
|
|
1142
|
-
preProgressbar: "[",
|
|
1143
|
-
postProgressbar: "]",
|
|
1144
|
-
progressbarTheme: {
|
|
1145
|
-
complete: "#",
|
|
1146
|
-
remaining: "."
|
|
1147
|
-
},
|
|
1148
|
-
activityIndicatorTheme: "-\\|/",
|
|
1149
|
-
preSubsection: ">"
|
|
1150
|
-
});
|
|
1151
|
-
themes.addTheme("colorASCII", themes.getTheme("ASCII"), {
|
|
1152
|
-
progressbarTheme: {
|
|
1153
|
-
preComplete: color("bgBrightWhite", "brightWhite"),
|
|
1154
|
-
complete: "#",
|
|
1155
|
-
postComplete: color("reset"),
|
|
1156
|
-
preRemaining: color("bgBrightBlack", "brightBlack"),
|
|
1157
|
-
remaining: ".",
|
|
1158
|
-
postRemaining: color("reset")
|
|
1159
|
-
}
|
|
1160
|
-
});
|
|
1161
|
-
themes.addTheme("brailleSpinner", {
|
|
1162
|
-
preProgressbar: "(",
|
|
1163
|
-
postProgressbar: ")",
|
|
1164
|
-
progressbarTheme: {
|
|
1165
|
-
complete: "#",
|
|
1166
|
-
remaining: "\u2802"
|
|
1167
|
-
},
|
|
1168
|
-
activityIndicatorTheme: "\u280B\u2819\u2839\u2838\u283C\u2834\u2826\u2827\u2807\u280F",
|
|
1169
|
-
preSubsection: ">"
|
|
1170
|
-
});
|
|
1171
|
-
themes.addTheme("colorBrailleSpinner", themes.getTheme("brailleSpinner"), {
|
|
1172
|
-
progressbarTheme: {
|
|
1173
|
-
preComplete: color("bgBrightWhite", "brightWhite"),
|
|
1174
|
-
complete: "#",
|
|
1175
|
-
postComplete: color("reset"),
|
|
1176
|
-
preRemaining: color("bgBrightBlack", "brightBlack"),
|
|
1177
|
-
remaining: "\u2802",
|
|
1178
|
-
postRemaining: color("reset")
|
|
1179
|
-
}
|
|
1180
|
-
});
|
|
1181
|
-
themes.setDefault({}, "ASCII");
|
|
1182
|
-
themes.setDefault({ hasColor: !0 }, "colorASCII");
|
|
1183
|
-
themes.setDefault({ platform: "darwin", hasUnicode: !0 }, "brailleSpinner");
|
|
1184
|
-
themes.setDefault({ platform: "darwin", hasUnicode: !0, hasColor: !0 }, "colorBrailleSpinner");
|
|
1185
|
-
themes.setDefault({ platform: "linux", hasUnicode: !0 }, "brailleSpinner");
|
|
1186
|
-
themes.setDefault({ platform: "linux", hasUnicode: !0, hasColor: !0 }, "colorBrailleSpinner");
|
|
1187
|
-
}
|
|
1188
|
-
});
|
|
1189
|
-
|
|
1190
|
-
// ../../node_modules/gauge/lib/set-interval.js
|
|
1191
|
-
var require_set_interval = __commonJS({
|
|
1192
|
-
"../../node_modules/gauge/lib/set-interval.js"(exports, module) {
|
|
1193
|
-
"use strict";
|
|
1194
|
-
module.exports = setInterval;
|
|
1195
|
-
}
|
|
1196
|
-
});
|
|
1197
|
-
|
|
1198
|
-
// ../../node_modules/gauge/lib/process.js
|
|
1199
|
-
var require_process = __commonJS({
|
|
1200
|
-
"../../node_modules/gauge/lib/process.js"(exports, module) {
|
|
1201
|
-
"use strict";
|
|
1202
|
-
module.exports = process;
|
|
1203
|
-
}
|
|
1204
|
-
});
|
|
1205
|
-
|
|
1206
|
-
// ../../node_modules/gauge/lib/set-immediate.js
|
|
1207
|
-
var require_set_immediate = __commonJS({
|
|
1208
|
-
"../../node_modules/gauge/lib/set-immediate.js"(exports, module) {
|
|
1209
|
-
"use strict";
|
|
1210
|
-
var process2 = require_process();
|
|
1211
|
-
try {
|
|
1212
|
-
module.exports = setImmediate;
|
|
1213
|
-
} catch {
|
|
1214
|
-
module.exports = process2.nextTick;
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
1217
|
-
});
|
|
1218
|
-
|
|
1219
|
-
// ../../node_modules/gauge/lib/index.js
|
|
1220
|
-
var require_lib2 = __commonJS({
|
|
1221
|
-
"../../node_modules/gauge/lib/index.js"(exports, module) {
|
|
1222
|
-
"use strict";
|
|
1223
|
-
var Plumbing = require_plumbing(), hasUnicode = require_has_unicode(), hasColor = require_has_color(), onExit = require_cjs().onExit, defaultThemes = require_themes(), setInterval2 = require_set_interval(), process2 = require_process(), setImmediate2 = require_set_immediate();
|
|
1224
|
-
module.exports = Gauge;
|
|
1225
|
-
function callWith(obj, method) {
|
|
1226
|
-
return function() {
|
|
1227
|
-
return method.call(obj);
|
|
1228
|
-
};
|
|
1229
|
-
}
|
|
1230
|
-
function Gauge(arg1, arg2) {
|
|
1231
|
-
var options, writeTo;
|
|
1232
|
-
arg1 && arg1.write ? (writeTo = arg1, options = arg2 || {}) : arg2 && arg2.write ? (writeTo = arg2, options = arg1 || {}) : (writeTo = process2.stderr, options = arg1 || arg2 || {}), this._status = {
|
|
1233
|
-
spun: 0,
|
|
1234
|
-
section: "",
|
|
1235
|
-
subsection: ""
|
|
1236
|
-
}, this._paused = !1, this._disabled = !0, this._showing = !1, this._onScreen = !1, this._needsRedraw = !1, this._hideCursor = options.hideCursor == null ? !0 : options.hideCursor, this._fixedFramerate = options.fixedFramerate == null ? !/^v0\.8\./.test(process2.version) : options.fixedFramerate, this._lastUpdateAt = null, this._updateInterval = options.updateInterval == null ? 50 : options.updateInterval, this._themes = options.themes || defaultThemes, this._theme = options.theme;
|
|
1237
|
-
var theme = this._computeTheme(options.theme), template = options.template || [
|
|
1238
|
-
{ type: "progressbar", length: 20 },
|
|
1239
|
-
{ type: "activityIndicator", kerning: 1, length: 1 },
|
|
1240
|
-
{ type: "section", kerning: 1, default: "" },
|
|
1241
|
-
{ type: "subsection", kerning: 1, default: "" }
|
|
1242
|
-
];
|
|
1243
|
-
this.setWriteTo(writeTo, options.tty);
|
|
1244
|
-
var PlumbingClass = options.Plumbing || Plumbing;
|
|
1245
|
-
this._gauge = new PlumbingClass(theme, template, this.getWidth()), this._$$doRedraw = callWith(this, this._doRedraw), this._$$handleSizeChange = callWith(this, this._handleSizeChange), this._cleanupOnExit = options.cleanupOnExit == null || options.cleanupOnExit, this._removeOnExit = null, options.enabled || options.enabled == null && this._tty && this._tty.isTTY ? this.enable() : this.disable();
|
|
1246
|
-
}
|
|
1247
|
-
Gauge.prototype = {};
|
|
1248
|
-
Gauge.prototype.isEnabled = function() {
|
|
1249
|
-
return !this._disabled;
|
|
1250
|
-
};
|
|
1251
|
-
Gauge.prototype.setTemplate = function(template) {
|
|
1252
|
-
this._gauge.setTemplate(template), this._showing && this._requestRedraw();
|
|
1253
|
-
};
|
|
1254
|
-
Gauge.prototype._computeTheme = function(theme) {
|
|
1255
|
-
if (theme || (theme = {}), typeof theme == "string")
|
|
1256
|
-
theme = this._themes.getTheme(theme);
|
|
1257
|
-
else if (Object.keys(theme).length === 0 || theme.hasUnicode != null || theme.hasColor != null) {
|
|
1258
|
-
var useUnicode = theme.hasUnicode == null ? hasUnicode() : theme.hasUnicode, useColor = theme.hasColor == null ? hasColor : theme.hasColor;
|
|
1259
|
-
theme = this._themes.getDefault({
|
|
1260
|
-
hasUnicode: useUnicode,
|
|
1261
|
-
hasColor: useColor,
|
|
1262
|
-
platform: theme.platform
|
|
1263
|
-
});
|
|
1264
|
-
}
|
|
1265
|
-
return theme;
|
|
1266
|
-
};
|
|
1267
|
-
Gauge.prototype.setThemeset = function(themes) {
|
|
1268
|
-
this._themes = themes, this.setTheme(this._theme);
|
|
1269
|
-
};
|
|
1270
|
-
Gauge.prototype.setTheme = function(theme) {
|
|
1271
|
-
this._gauge.setTheme(this._computeTheme(theme)), this._showing && this._requestRedraw(), this._theme = theme;
|
|
1272
|
-
};
|
|
1273
|
-
Gauge.prototype._requestRedraw = function() {
|
|
1274
|
-
this._needsRedraw = !0, this._fixedFramerate || this._doRedraw();
|
|
1275
|
-
};
|
|
1276
|
-
Gauge.prototype.getWidth = function() {
|
|
1277
|
-
return (this._tty && this._tty.columns || 80) - 1;
|
|
1278
|
-
};
|
|
1279
|
-
Gauge.prototype.setWriteTo = function(writeTo, tty) {
|
|
1280
|
-
var enabled = !this._disabled;
|
|
1281
|
-
enabled && this.disable(), this._writeTo = writeTo, this._tty = tty || writeTo === process2.stderr && process2.stdout.isTTY && process2.stdout || writeTo.isTTY && writeTo || this._tty, this._gauge && this._gauge.setWidth(this.getWidth()), enabled && this.enable();
|
|
1282
|
-
};
|
|
1283
|
-
Gauge.prototype.enable = function() {
|
|
1284
|
-
this._disabled && (this._disabled = !1, this._tty && this._enableEvents(), this._showing && this.show());
|
|
1285
|
-
};
|
|
1286
|
-
Gauge.prototype.disable = function() {
|
|
1287
|
-
this._disabled || (this._showing && (this._lastUpdateAt = null, this._showing = !1, this._doRedraw(), this._showing = !0), this._disabled = !0, this._tty && this._disableEvents());
|
|
1288
|
-
};
|
|
1289
|
-
Gauge.prototype._enableEvents = function() {
|
|
1290
|
-
this._cleanupOnExit && (this._removeOnExit = onExit(callWith(this, this.disable))), this._tty.on("resize", this._$$handleSizeChange), this._fixedFramerate && (this.redrawTracker = setInterval2(this._$$doRedraw, this._updateInterval), this.redrawTracker.unref && this.redrawTracker.unref());
|
|
1291
|
-
};
|
|
1292
|
-
Gauge.prototype._disableEvents = function() {
|
|
1293
|
-
this._tty.removeListener("resize", this._$$handleSizeChange), this._fixedFramerate && clearInterval(this.redrawTracker), this._removeOnExit && this._removeOnExit();
|
|
1294
|
-
};
|
|
1295
|
-
Gauge.prototype.hide = function(cb) {
|
|
1296
|
-
if (this._disabled || !this._showing)
|
|
1297
|
-
return cb && process2.nextTick(cb);
|
|
1298
|
-
this._showing = !1, this._doRedraw(), cb && setImmediate2(cb);
|
|
1299
|
-
};
|
|
1300
|
-
Gauge.prototype.show = function(section, completed) {
|
|
1301
|
-
if (this._showing = !0, typeof section == "string")
|
|
1302
|
-
this._status.section = section;
|
|
1303
|
-
else if (typeof section == "object")
|
|
1304
|
-
for (var sectionKeys = Object.keys(section), ii = 0; ii < sectionKeys.length; ++ii) {
|
|
1305
|
-
var key = sectionKeys[ii];
|
|
1306
|
-
this._status[key] = section[key];
|
|
1307
|
-
}
|
|
1308
|
-
completed != null && (this._status.completed = completed), !this._disabled && this._requestRedraw();
|
|
1309
|
-
};
|
|
1310
|
-
Gauge.prototype.pulse = function(subsection) {
|
|
1311
|
-
this._status.subsection = subsection || "", this._status.spun++, !this._disabled && this._showing && this._requestRedraw();
|
|
1312
|
-
};
|
|
1313
|
-
Gauge.prototype._handleSizeChange = function() {
|
|
1314
|
-
this._gauge.setWidth(this._tty.columns - 1), this._requestRedraw();
|
|
1315
|
-
};
|
|
1316
|
-
Gauge.prototype._doRedraw = function() {
|
|
1317
|
-
if (!(this._disabled || this._paused)) {
|
|
1318
|
-
if (!this._fixedFramerate) {
|
|
1319
|
-
var now = Date.now();
|
|
1320
|
-
if (this._lastUpdateAt && now - this._lastUpdateAt < this._updateInterval)
|
|
1321
|
-
return;
|
|
1322
|
-
this._lastUpdateAt = now;
|
|
1323
|
-
}
|
|
1324
|
-
if (!this._showing && this._onScreen) {
|
|
1325
|
-
this._onScreen = !1;
|
|
1326
|
-
var result = this._gauge.hide();
|
|
1327
|
-
return this._hideCursor && (result += this._gauge.showCursor()), this._writeTo.write(result);
|
|
1328
|
-
}
|
|
1329
|
-
!this._showing && !this._onScreen || (this._showing && !this._onScreen && (this._onScreen = !0, this._needsRedraw = !0, this._hideCursor && this._writeTo.write(this._gauge.hideCursor())), this._needsRedraw && (this._writeTo.write(this._gauge.show(this._status)) || (this._paused = !0, this._writeTo.on("drain", callWith(this, function() {
|
|
1330
|
-
this._paused = !1, this._doRedraw();
|
|
1331
|
-
})))));
|
|
1332
|
-
}
|
|
1333
|
-
};
|
|
1334
|
-
}
|
|
1335
|
-
});
|
|
1336
|
-
|
|
1337
|
-
// ../../node_modules/set-blocking/index.js
|
|
1338
|
-
var require_set_blocking = __commonJS({
|
|
1339
|
-
"../../node_modules/set-blocking/index.js"(exports, module) {
|
|
1340
|
-
module.exports = function(blocking) {
|
|
1341
|
-
[process.stdout, process.stderr].forEach(function(stream) {
|
|
1342
|
-
stream._handle && stream.isTTY && typeof stream._handle.setBlocking == "function" && stream._handle.setBlocking(blocking);
|
|
1343
|
-
});
|
|
1344
|
-
};
|
|
1345
|
-
}
|
|
1346
|
-
});
|
|
1347
|
-
|
|
1348
|
-
// ../../node_modules/npmlog/lib/log.js
|
|
1349
|
-
var require_log = __commonJS({
|
|
1350
|
-
"../../node_modules/npmlog/lib/log.js"(exports, module) {
|
|
1351
|
-
"use strict";
|
|
1352
|
-
var Progress = require_lib(), Gauge = require_lib2(), EE = __require("events").EventEmitter, log2 = exports = module.exports = new EE(), util = __require("util"), setBlocking = require_set_blocking(), consoleControl = require_console_control_strings();
|
|
1353
|
-
setBlocking(!0);
|
|
1354
|
-
var stream = process.stderr;
|
|
1355
|
-
Object.defineProperty(log2, "stream", {
|
|
1356
|
-
set: function(newStream) {
|
|
1357
|
-
stream = newStream, this.gauge && this.gauge.setWriteTo(stream, stream);
|
|
1358
|
-
},
|
|
1359
|
-
get: function() {
|
|
1360
|
-
return stream;
|
|
1361
|
-
}
|
|
1362
|
-
});
|
|
1363
|
-
var colorEnabled;
|
|
1364
|
-
log2.useColor = function() {
|
|
1365
|
-
return colorEnabled ?? stream.isTTY;
|
|
1366
|
-
};
|
|
1367
|
-
log2.enableColor = function() {
|
|
1368
|
-
colorEnabled = !0, this.gauge.setTheme({ hasColor: colorEnabled, hasUnicode: unicodeEnabled });
|
|
1369
|
-
};
|
|
1370
|
-
log2.disableColor = function() {
|
|
1371
|
-
colorEnabled = !1, this.gauge.setTheme({ hasColor: colorEnabled, hasUnicode: unicodeEnabled });
|
|
1372
|
-
};
|
|
1373
|
-
log2.level = "info";
|
|
1374
|
-
log2.gauge = new Gauge(stream, {
|
|
1375
|
-
enabled: !1,
|
|
1376
|
-
// no progress bars unless asked
|
|
1377
|
-
theme: { hasColor: log2.useColor() },
|
|
1378
|
-
template: [
|
|
1379
|
-
{ type: "progressbar", length: 20 },
|
|
1380
|
-
{ type: "activityIndicator", kerning: 1, length: 1 },
|
|
1381
|
-
{ type: "section", default: "" },
|
|
1382
|
-
":",
|
|
1383
|
-
{ type: "logline", kerning: 1, default: "" }
|
|
1384
|
-
]
|
|
1385
|
-
});
|
|
1386
|
-
log2.tracker = new Progress.TrackerGroup();
|
|
1387
|
-
log2.progressEnabled = log2.gauge.isEnabled();
|
|
1388
|
-
var unicodeEnabled;
|
|
1389
|
-
log2.enableUnicode = function() {
|
|
1390
|
-
unicodeEnabled = !0, this.gauge.setTheme({ hasColor: this.useColor(), hasUnicode: unicodeEnabled });
|
|
1391
|
-
};
|
|
1392
|
-
log2.disableUnicode = function() {
|
|
1393
|
-
unicodeEnabled = !1, this.gauge.setTheme({ hasColor: this.useColor(), hasUnicode: unicodeEnabled });
|
|
1394
|
-
};
|
|
1395
|
-
log2.setGaugeThemeset = function(themes) {
|
|
1396
|
-
this.gauge.setThemeset(themes);
|
|
1397
|
-
};
|
|
1398
|
-
log2.setGaugeTemplate = function(template) {
|
|
1399
|
-
this.gauge.setTemplate(template);
|
|
1400
|
-
};
|
|
1401
|
-
log2.enableProgress = function() {
|
|
1402
|
-
this.progressEnabled || this._paused || (this.progressEnabled = !0, this.tracker.on("change", this.showProgress), this.gauge.enable());
|
|
1403
|
-
};
|
|
1404
|
-
log2.disableProgress = function() {
|
|
1405
|
-
this.progressEnabled && (this.progressEnabled = !1, this.tracker.removeListener("change", this.showProgress), this.gauge.disable());
|
|
1406
|
-
};
|
|
1407
|
-
var trackerConstructors = ["newGroup", "newItem", "newStream"], mixinLog = function(tracker) {
|
|
1408
|
-
return Object.keys(log2).forEach(function(P2) {
|
|
1409
|
-
if (P2[0] !== "_" && !trackerConstructors.filter(function(C) {
|
|
1410
|
-
return C === P2;
|
|
1411
|
-
}).length && !tracker[P2] && typeof log2[P2] == "function") {
|
|
1412
|
-
var func = log2[P2];
|
|
1413
|
-
tracker[P2] = function() {
|
|
1414
|
-
return func.apply(log2, arguments);
|
|
1415
|
-
};
|
|
1416
|
-
}
|
|
1417
|
-
}), tracker instanceof Progress.TrackerGroup && trackerConstructors.forEach(function(C) {
|
|
1418
|
-
var func = tracker[C];
|
|
1419
|
-
tracker[C] = function() {
|
|
1420
|
-
return mixinLog(func.apply(tracker, arguments));
|
|
1421
|
-
};
|
|
1422
|
-
}), tracker;
|
|
1423
|
-
};
|
|
1424
|
-
trackerConstructors.forEach(function(C) {
|
|
1425
|
-
log2[C] = function() {
|
|
1426
|
-
return mixinLog(this.tracker[C].apply(this.tracker, arguments));
|
|
1427
|
-
};
|
|
1428
|
-
});
|
|
1429
|
-
log2.clearProgress = function(cb) {
|
|
1430
|
-
if (!this.progressEnabled)
|
|
1431
|
-
return cb && process.nextTick(cb);
|
|
1432
|
-
this.gauge.hide(cb);
|
|
1433
|
-
};
|
|
1434
|
-
log2.showProgress = function(name, completed) {
|
|
1435
|
-
if (this.progressEnabled) {
|
|
1436
|
-
var values = {};
|
|
1437
|
-
name && (values.section = name);
|
|
1438
|
-
var last = log2.record[log2.record.length - 1];
|
|
1439
|
-
if (last) {
|
|
1440
|
-
values.subsection = last.prefix;
|
|
1441
|
-
var disp = log2.disp[last.level] || last.level, logline = this._format(disp, log2.style[last.level]);
|
|
1442
|
-
last.prefix && (logline += " " + this._format(last.prefix, this.prefixStyle)), logline += " " + last.message.split(/\r?\n/)[0], values.logline = logline;
|
|
1443
|
-
}
|
|
1444
|
-
values.completed = completed || this.tracker.completed(), this.gauge.show(values);
|
|
1445
|
-
}
|
|
1446
|
-
}.bind(log2);
|
|
1447
|
-
log2.pause = function() {
|
|
1448
|
-
this._paused = !0, this.progressEnabled && this.gauge.disable();
|
|
1449
|
-
};
|
|
1450
|
-
log2.resume = function() {
|
|
1451
|
-
if (this._paused) {
|
|
1452
|
-
this._paused = !1;
|
|
1453
|
-
var b = this._buffer;
|
|
1454
|
-
this._buffer = [], b.forEach(function(m) {
|
|
1455
|
-
this.emitLog(m);
|
|
1456
|
-
}, this), this.progressEnabled && this.gauge.enable();
|
|
1457
|
-
}
|
|
1458
|
-
};
|
|
1459
|
-
log2._buffer = [];
|
|
1460
|
-
var id = 0;
|
|
1461
|
-
log2.record = [];
|
|
1462
|
-
log2.maxRecordSize = 1e4;
|
|
1463
|
-
log2.log = function(lvl, prefix, message) {
|
|
1464
|
-
var l = this.levels[lvl];
|
|
1465
|
-
if (l === void 0)
|
|
1466
|
-
return this.emit("error", new Error(util.format(
|
|
1467
|
-
"Undefined log level: %j",
|
|
1468
|
-
lvl
|
|
1469
|
-
)));
|
|
1470
|
-
for (var a = new Array(arguments.length - 2), stack = null, i = 2; i < arguments.length; i++) {
|
|
1471
|
-
var arg = a[i - 2] = arguments[i];
|
|
1472
|
-
typeof arg == "object" && arg instanceof Error && arg.stack && Object.defineProperty(arg, "stack", {
|
|
1473
|
-
value: stack = arg.stack + "",
|
|
1474
|
-
enumerable: !0,
|
|
1475
|
-
writable: !0
|
|
1476
|
-
});
|
|
1477
|
-
}
|
|
1478
|
-
stack && a.unshift(stack + `
|
|
1479
|
-
`), message = util.format.apply(util, a);
|
|
1480
|
-
var m = {
|
|
1481
|
-
id: id++,
|
|
1482
|
-
level: lvl,
|
|
1483
|
-
prefix: String(prefix || ""),
|
|
1484
|
-
message,
|
|
1485
|
-
messageRaw: a
|
|
1486
|
-
};
|
|
1487
|
-
this.emit("log", m), this.emit("log." + lvl, m), m.prefix && this.emit(m.prefix, m), this.record.push(m);
|
|
1488
|
-
var mrs = this.maxRecordSize, n = this.record.length - mrs;
|
|
1489
|
-
if (n > mrs / 10) {
|
|
1490
|
-
var newSize = Math.floor(mrs * 0.9);
|
|
1491
|
-
this.record = this.record.slice(-1 * newSize);
|
|
1492
|
-
}
|
|
1493
|
-
this.emitLog(m);
|
|
1494
|
-
}.bind(log2);
|
|
1495
|
-
log2.emitLog = function(m) {
|
|
1496
|
-
if (this._paused) {
|
|
1497
|
-
this._buffer.push(m);
|
|
1498
|
-
return;
|
|
1499
|
-
}
|
|
1500
|
-
this.progressEnabled && this.gauge.pulse(m.prefix);
|
|
1501
|
-
var l = this.levels[m.level];
|
|
1502
|
-
if (l !== void 0 && !(l < this.levels[this.level]) && !(l > 0 && !isFinite(l))) {
|
|
1503
|
-
var disp = log2.disp[m.level] != null ? log2.disp[m.level] : m.level;
|
|
1504
|
-
this.clearProgress(), m.message.split(/\r?\n/).forEach(function(line) {
|
|
1505
|
-
var heading = this.heading;
|
|
1506
|
-
heading && (this.write(heading, this.headingStyle), this.write(" ")), this.write(disp, log2.style[m.level]);
|
|
1507
|
-
var p = m.prefix || "";
|
|
1508
|
-
p && this.write(" "), this.write(p, this.prefixStyle), this.write(" " + line + `
|
|
1509
|
-
`);
|
|
1510
|
-
}, this), this.showProgress();
|
|
1511
|
-
}
|
|
1512
|
-
};
|
|
1513
|
-
log2._format = function(msg, style) {
|
|
1514
|
-
if (stream) {
|
|
1515
|
-
var output = "";
|
|
1516
|
-
if (this.useColor()) {
|
|
1517
|
-
style = style || {};
|
|
1518
|
-
var settings = [];
|
|
1519
|
-
style.fg && settings.push(style.fg), style.bg && settings.push("bg" + style.bg[0].toUpperCase() + style.bg.slice(1)), style.bold && settings.push("bold"), style.underline && settings.push("underline"), style.inverse && settings.push("inverse"), settings.length && (output += consoleControl.color(settings)), style.beep && (output += consoleControl.beep());
|
|
1520
|
-
}
|
|
1521
|
-
return output += msg, this.useColor() && (output += consoleControl.color("reset")), output;
|
|
1522
|
-
}
|
|
1523
|
-
};
|
|
1524
|
-
log2.write = function(msg, style) {
|
|
1525
|
-
stream && stream.write(this._format(msg, style));
|
|
1526
|
-
};
|
|
1527
|
-
log2.addLevel = function(lvl, n, style, disp) {
|
|
1528
|
-
disp == null && (disp = lvl), this.levels[lvl] = n, this.style[lvl] = style, this[lvl] || (this[lvl] = function() {
|
|
1529
|
-
var a = new Array(arguments.length + 1);
|
|
1530
|
-
a[0] = lvl;
|
|
1531
|
-
for (var i = 0; i < arguments.length; i++)
|
|
1532
|
-
a[i + 1] = arguments[i];
|
|
1533
|
-
return this.log.apply(this, a);
|
|
1534
|
-
}.bind(this)), this.disp[lvl] = disp;
|
|
1535
|
-
};
|
|
1536
|
-
log2.prefixStyle = { fg: "magenta" };
|
|
1537
|
-
log2.headingStyle = { fg: "white", bg: "black" };
|
|
1538
|
-
log2.style = {};
|
|
1539
|
-
log2.levels = {};
|
|
1540
|
-
log2.disp = {};
|
|
1541
|
-
log2.addLevel("silly", -1 / 0, { inverse: !0 }, "sill");
|
|
1542
|
-
log2.addLevel("verbose", 1e3, { fg: "cyan", bg: "black" }, "verb");
|
|
1543
|
-
log2.addLevel("info", 2e3, { fg: "green" });
|
|
1544
|
-
log2.addLevel("timing", 2500, { fg: "green", bg: "black" });
|
|
1545
|
-
log2.addLevel("http", 3e3, { fg: "green", bg: "black" });
|
|
1546
|
-
log2.addLevel("notice", 3500, { fg: "cyan", bg: "black" });
|
|
1547
|
-
log2.addLevel("warn", 4e3, { fg: "black", bg: "yellow" }, "WARN");
|
|
1548
|
-
log2.addLevel("error", 5e3, { fg: "red", bg: "black" }, "ERR!");
|
|
1549
|
-
log2.addLevel("silent", 1 / 0);
|
|
1550
|
-
log2.on("error", function() {
|
|
1551
|
-
});
|
|
1552
|
-
}
|
|
1553
|
-
});
|
|
1554
|
-
|
|
1555
|
-
// ../../node_modules/pretty-hrtime/index.js
|
|
1556
|
-
var require_pretty_hrtime = __commonJS({
|
|
1557
|
-
"../../node_modules/pretty-hrtime/index.js"(exports, module) {
|
|
1558
|
-
"use strict";
|
|
1559
|
-
var minimalDesc = ["h", "min", "s", "ms", "\u03BCs", "ns"], verboseDesc = ["hour", "minute", "second", "millisecond", "microsecond", "nanosecond"], convert = [3600, 60, 1, 1e6, 1e3, 1];
|
|
1560
|
-
module.exports = function(source, opts) {
|
|
1561
|
-
var verbose, precise, i, spot, sourceAtStep, valAtStep, decimals, strAtStep, results, totalSeconds;
|
|
1562
|
-
if (verbose = !1, precise = !1, opts && (verbose = opts.verbose || !1, precise = opts.precise || !1), !Array.isArray(source) || source.length !== 2 || typeof source[0] != "number" || typeof source[1] != "number")
|
|
1563
|
-
return "";
|
|
1564
|
-
for (source[1] < 0 && (totalSeconds = source[0] + source[1] / 1e9, source[0] = parseInt(totalSeconds), source[1] = parseFloat((totalSeconds % 1).toPrecision(9)) * 1e9), results = "", i = 0; i < 6 && (spot = i < 3 ? 0 : 1, sourceAtStep = source[spot], i !== 3 && i !== 0 && (sourceAtStep = sourceAtStep % convert[i - 1]), i === 2 && (sourceAtStep += source[1] / 1e9), valAtStep = sourceAtStep / convert[i], !(valAtStep >= 1 && (verbose && (valAtStep = Math.floor(valAtStep)), precise ? strAtStep = valAtStep.toString() : (decimals = valAtStep >= 10 ? 0 : 2, strAtStep = valAtStep.toFixed(decimals)), strAtStep.indexOf(".") > -1 && strAtStep[strAtStep.length - 1] === "0" && (strAtStep = strAtStep.replace(/\.?0+$/, "")), results && (results += " "), results += strAtStep, verbose ? (results += " " + verboseDesc[i], strAtStep !== "1" && (results += "s")) : results += " " + minimalDesc[i], !verbose))); i++)
|
|
1565
|
-
;
|
|
1566
|
-
return results;
|
|
1567
|
-
};
|
|
1568
|
-
}
|
|
1569
|
-
});
|
|
1570
|
-
|
|
1571
|
-
// ../../node_modules/sisteransi/src/index.js
|
|
1572
|
-
var require_src = __commonJS({
|
|
1573
|
-
"../../node_modules/sisteransi/src/index.js"(exports, module) {
|
|
1574
|
-
"use strict";
|
|
1575
|
-
var cursor = {
|
|
1576
|
-
to(x3, y2) {
|
|
1577
|
-
return y2 ? `\x1B[${y2 + 1};${x3 + 1}H` : `\x1B[${x3 + 1}G`;
|
|
1578
|
-
},
|
|
1579
|
-
move(x3, y2) {
|
|
1580
|
-
let ret = "";
|
|
1581
|
-
return x3 < 0 ? ret += `\x1B[${-x3}D` : x3 > 0 && (ret += `\x1B[${x3}C`), y2 < 0 ? ret += `\x1B[${-y2}A` : y2 > 0 && (ret += `\x1B[${y2}B`), ret;
|
|
1582
|
-
},
|
|
1583
|
-
up: (count = 1) => `\x1B[${count}A`,
|
|
1584
|
-
down: (count = 1) => `\x1B[${count}B`,
|
|
1585
|
-
forward: (count = 1) => `\x1B[${count}C`,
|
|
1586
|
-
backward: (count = 1) => `\x1B[${count}D`,
|
|
1587
|
-
nextLine: (count = 1) => "\x1B[E".repeat(count),
|
|
1588
|
-
prevLine: (count = 1) => "\x1B[F".repeat(count),
|
|
1589
|
-
left: "\x1B[G",
|
|
1590
|
-
hide: "\x1B[?25l",
|
|
1591
|
-
show: "\x1B[?25h",
|
|
1592
|
-
save: "\x1B7",
|
|
1593
|
-
restore: "\x1B8"
|
|
1594
|
-
}, scroll = {
|
|
1595
|
-
up: (count = 1) => "\x1B[S".repeat(count),
|
|
1596
|
-
down: (count = 1) => "\x1B[T".repeat(count)
|
|
1597
|
-
}, erase = {
|
|
1598
|
-
screen: "\x1B[2J",
|
|
1599
|
-
up: (count = 1) => "\x1B[1J".repeat(count),
|
|
1600
|
-
down: (count = 1) => "\x1B[J".repeat(count),
|
|
1601
|
-
line: "\x1B[2K",
|
|
1602
|
-
lineEnd: "\x1B[K",
|
|
1603
|
-
lineStart: "\x1B[1K",
|
|
1604
|
-
lines(count) {
|
|
1605
|
-
let clear = "";
|
|
1606
|
-
for (let i = 0; i < count; i++)
|
|
1607
|
-
clear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
1608
|
-
return count && (clear += cursor.left), clear;
|
|
1609
|
-
}
|
|
1610
|
-
};
|
|
1611
|
-
module.exports = { cursor, scroll, erase, beep: "\x07" };
|
|
1612
|
-
}
|
|
1613
|
-
});
|
|
1614
|
-
|
|
1615
|
-
// ../../node_modules/emoji-regex/index.js
|
|
1616
|
-
var require_emoji_regex3 = __commonJS({
|
|
1617
|
-
"../../node_modules/emoji-regex/index.js"(exports, module) {
|
|
1618
|
-
module.exports = () => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
1619
|
-
}
|
|
1620
|
-
});
|
|
1621
|
-
|
|
1622
|
-
// src/node-logger/index.ts
|
|
1623
|
-
var import_npmlog = __toESM(require_log(), 1), import_pretty_hrtime = __toESM(require_pretty_hrtime(), 1);
|
|
1624
|
-
|
|
1625
|
-
// src/node-logger/logger/logger.ts
|
|
1626
|
-
var logger_exports = {};
|
|
1627
|
-
__export(logger_exports, {
|
|
1628
|
-
SYMBOLS: () => SYMBOLS,
|
|
1629
|
-
debug: () => debug,
|
|
1630
|
-
error: () => error,
|
|
1631
|
-
getLogLevel: () => getLogLevel,
|
|
1632
|
-
info: () => info,
|
|
1633
|
-
intro: () => intro,
|
|
1634
|
-
log: () => log,
|
|
1635
|
-
logBox: () => logBox,
|
|
1636
|
-
outro: () => outro,
|
|
1637
|
-
setLogLevel: () => setLogLevel,
|
|
1638
|
-
shouldLog: () => shouldLog,
|
|
1639
|
-
step: () => step,
|
|
1640
|
-
warn: () => warn,
|
|
1641
|
-
wrapTextForClack: () => wrapTextForClack
|
|
1642
|
-
});
|
|
1643
|
-
|
|
1644
|
-
// ../../node_modules/@clack/core/dist/index.mjs
|
|
1645
|
-
var import_picocolors = __toESM(require_picocolors(), 1), import_sisteransi = __toESM(require_src(), 1);
|
|
1646
|
-
import { stdout as R, stdin as q } from "node:process";
|
|
1647
|
-
import * as k from "node:readline";
|
|
1648
|
-
import ot from "node:readline";
|
|
1649
|
-
import { ReadStream as J } from "node:tty";
|
|
1650
|
-
var at = (t2) => t2 === 161 || t2 === 164 || t2 === 167 || t2 === 168 || t2 === 170 || t2 === 173 || t2 === 174 || t2 >= 176 && t2 <= 180 || t2 >= 182 && t2 <= 186 || t2 >= 188 && t2 <= 191 || t2 === 198 || t2 === 208 || t2 === 215 || t2 === 216 || t2 >= 222 && t2 <= 225 || t2 === 230 || t2 >= 232 && t2 <= 234 || t2 === 236 || t2 === 237 || t2 === 240 || t2 === 242 || t2 === 243 || t2 >= 247 && t2 <= 250 || t2 === 252 || t2 === 254 || t2 === 257 || t2 === 273 || t2 === 275 || t2 === 283 || t2 === 294 || t2 === 295 || t2 === 299 || t2 >= 305 && t2 <= 307 || t2 === 312 || t2 >= 319 && t2 <= 322 || t2 === 324 || t2 >= 328 && t2 <= 331 || t2 === 333 || t2 === 338 || t2 === 339 || t2 === 358 || t2 === 359 || t2 === 363 || t2 === 462 || t2 === 464 || t2 === 466 || t2 === 468 || t2 === 470 || t2 === 472 || t2 === 474 || t2 === 476 || t2 === 593 || t2 === 609 || t2 === 708 || t2 === 711 || t2 >= 713 && t2 <= 715 || t2 === 717 || t2 === 720 || t2 >= 728 && t2 <= 731 || t2 === 733 || t2 === 735 || t2 >= 768 && t2 <= 879 || t2 >= 913 && t2 <= 929 || t2 >= 931 && t2 <= 937 || t2 >= 945 && t2 <= 961 || t2 >= 963 && t2 <= 969 || t2 === 1025 || t2 >= 1040 && t2 <= 1103 || t2 === 1105 || t2 === 8208 || t2 >= 8211 && t2 <= 8214 || t2 === 8216 || t2 === 8217 || t2 === 8220 || t2 === 8221 || t2 >= 8224 && t2 <= 8226 || t2 >= 8228 && t2 <= 8231 || t2 === 8240 || t2 === 8242 || t2 === 8243 || t2 === 8245 || t2 === 8251 || t2 === 8254 || t2 === 8308 || t2 === 8319 || t2 >= 8321 && t2 <= 8324 || t2 === 8364 || t2 === 8451 || t2 === 8453 || t2 === 8457 || t2 === 8467 || t2 === 8470 || t2 === 8481 || t2 === 8482 || t2 === 8486 || t2 === 8491 || t2 === 8531 || t2 === 8532 || t2 >= 8539 && t2 <= 8542 || t2 >= 8544 && t2 <= 8555 || t2 >= 8560 && t2 <= 8569 || t2 === 8585 || t2 >= 8592 && t2 <= 8601 || t2 === 8632 || t2 === 8633 || t2 === 8658 || t2 === 8660 || t2 === 8679 || t2 === 8704 || t2 === 8706 || t2 === 8707 || t2 === 8711 || t2 === 8712 || t2 === 8715 || t2 === 8719 || t2 === 8721 || t2 === 8725 || t2 === 8730 || t2 >= 8733 && t2 <= 8736 || t2 === 8739 || t2 === 8741 || t2 >= 8743 && t2 <= 8748 || t2 === 8750 || t2 >= 8756 && t2 <= 8759 || t2 === 8764 || t2 === 8765 || t2 === 8776 || t2 === 8780 || t2 === 8786 || t2 === 8800 || t2 === 8801 || t2 >= 8804 && t2 <= 8807 || t2 === 8810 || t2 === 8811 || t2 === 8814 || t2 === 8815 || t2 === 8834 || t2 === 8835 || t2 === 8838 || t2 === 8839 || t2 === 8853 || t2 === 8857 || t2 === 8869 || t2 === 8895 || t2 === 8978 || t2 >= 9312 && t2 <= 9449 || t2 >= 9451 && t2 <= 9547 || t2 >= 9552 && t2 <= 9587 || t2 >= 9600 && t2 <= 9615 || t2 >= 9618 && t2 <= 9621 || t2 === 9632 || t2 === 9633 || t2 >= 9635 && t2 <= 9641 || t2 === 9650 || t2 === 9651 || t2 === 9654 || t2 === 9655 || t2 === 9660 || t2 === 9661 || t2 === 9664 || t2 === 9665 || t2 >= 9670 && t2 <= 9672 || t2 === 9675 || t2 >= 9678 && t2 <= 9681 || t2 >= 9698 && t2 <= 9701 || t2 === 9711 || t2 === 9733 || t2 === 9734 || t2 === 9737 || t2 === 9742 || t2 === 9743 || t2 === 9756 || t2 === 9758 || t2 === 9792 || t2 === 9794 || t2 === 9824 || t2 === 9825 || t2 >= 9827 && t2 <= 9829 || t2 >= 9831 && t2 <= 9834 || t2 === 9836 || t2 === 9837 || t2 === 9839 || t2 === 9886 || t2 === 9887 || t2 === 9919 || t2 >= 9926 && t2 <= 9933 || t2 >= 9935 && t2 <= 9939 || t2 >= 9941 && t2 <= 9953 || t2 === 9955 || t2 === 9960 || t2 === 9961 || t2 >= 9963 && t2 <= 9969 || t2 === 9972 || t2 >= 9974 && t2 <= 9977 || t2 === 9979 || t2 === 9980 || t2 === 9982 || t2 === 9983 || t2 === 10045 || t2 >= 10102 && t2 <= 10111 || t2 >= 11094 && t2 <= 11097 || t2 >= 12872 && t2 <= 12879 || t2 >= 57344 && t2 <= 63743 || t2 >= 65024 && t2 <= 65039 || t2 === 65533 || t2 >= 127232 && t2 <= 127242 || t2 >= 127248 && t2 <= 127277 || t2 >= 127280 && t2 <= 127337 || t2 >= 127344 && t2 <= 127373 || t2 === 127375 || t2 === 127376 || t2 >= 127387 && t2 <= 127404 || t2 >= 917760 && t2 <= 917999 || t2 >= 983040 && t2 <= 1048573 || t2 >= 1048576 && t2 <= 1114109, lt = (t2) => t2 === 12288 || t2 >= 65281 && t2 <= 65376 || t2 >= 65504 && t2 <= 65510, ht = (t2) => t2 >= 4352 && t2 <= 4447 || t2 === 8986 || t2 === 8987 || t2 === 9001 || t2 === 9002 || t2 >= 9193 && t2 <= 9196 || t2 === 9200 || t2 === 9203 || t2 === 9725 || t2 === 9726 || t2 === 9748 || t2 === 9749 || t2 >= 9800 && t2 <= 9811 || t2 === 9855 || t2 === 9875 || t2 === 9889 || t2 === 9898 || t2 === 9899 || t2 === 9917 || t2 === 9918 || t2 === 9924 || t2 === 9925 || t2 === 9934 || t2 === 9940 || t2 === 9962 || t2 === 9970 || t2 === 9971 || t2 === 9973 || t2 === 9978 || t2 === 9981 || t2 === 9989 || t2 === 9994 || t2 === 9995 || t2 === 10024 || t2 === 10060 || t2 === 10062 || t2 >= 10067 && t2 <= 10069 || t2 === 10071 || t2 >= 10133 && t2 <= 10135 || t2 === 10160 || t2 === 10175 || t2 === 11035 || t2 === 11036 || t2 === 11088 || t2 === 11093 || t2 >= 11904 && t2 <= 11929 || t2 >= 11931 && t2 <= 12019 || t2 >= 12032 && t2 <= 12245 || t2 >= 12272 && t2 <= 12287 || t2 >= 12289 && t2 <= 12350 || t2 >= 12353 && t2 <= 12438 || t2 >= 12441 && t2 <= 12543 || t2 >= 12549 && t2 <= 12591 || t2 >= 12593 && t2 <= 12686 || t2 >= 12688 && t2 <= 12771 || t2 >= 12783 && t2 <= 12830 || t2 >= 12832 && t2 <= 12871 || t2 >= 12880 && t2 <= 19903 || t2 >= 19968 && t2 <= 42124 || t2 >= 42128 && t2 <= 42182 || t2 >= 43360 && t2 <= 43388 || t2 >= 44032 && t2 <= 55203 || t2 >= 63744 && t2 <= 64255 || t2 >= 65040 && t2 <= 65049 || t2 >= 65072 && t2 <= 65106 || t2 >= 65108 && t2 <= 65126 || t2 >= 65128 && t2 <= 65131 || t2 >= 94176 && t2 <= 94180 || t2 === 94192 || t2 === 94193 || t2 >= 94208 && t2 <= 100343 || t2 >= 100352 && t2 <= 101589 || t2 >= 101632 && t2 <= 101640 || t2 >= 110576 && t2 <= 110579 || t2 >= 110581 && t2 <= 110587 || t2 === 110589 || t2 === 110590 || t2 >= 110592 && t2 <= 110882 || t2 === 110898 || t2 >= 110928 && t2 <= 110930 || t2 === 110933 || t2 >= 110948 && t2 <= 110951 || t2 >= 110960 && t2 <= 111355 || t2 === 126980 || t2 === 127183 || t2 === 127374 || t2 >= 127377 && t2 <= 127386 || t2 >= 127488 && t2 <= 127490 || t2 >= 127504 && t2 <= 127547 || t2 >= 127552 && t2 <= 127560 || t2 === 127568 || t2 === 127569 || t2 >= 127584 && t2 <= 127589 || t2 >= 127744 && t2 <= 127776 || t2 >= 127789 && t2 <= 127797 || t2 >= 127799 && t2 <= 127868 || t2 >= 127870 && t2 <= 127891 || t2 >= 127904 && t2 <= 127946 || t2 >= 127951 && t2 <= 127955 || t2 >= 127968 && t2 <= 127984 || t2 === 127988 || t2 >= 127992 && t2 <= 128062 || t2 === 128064 || t2 >= 128066 && t2 <= 128252 || t2 >= 128255 && t2 <= 128317 || t2 >= 128331 && t2 <= 128334 || t2 >= 128336 && t2 <= 128359 || t2 === 128378 || t2 === 128405 || t2 === 128406 || t2 === 128420 || t2 >= 128507 && t2 <= 128591 || t2 >= 128640 && t2 <= 128709 || t2 === 128716 || t2 >= 128720 && t2 <= 128722 || t2 >= 128725 && t2 <= 128727 || t2 >= 128732 && t2 <= 128735 || t2 === 128747 || t2 === 128748 || t2 >= 128756 && t2 <= 128764 || t2 >= 128992 && t2 <= 129003 || t2 === 129008 || t2 >= 129292 && t2 <= 129338 || t2 >= 129340 && t2 <= 129349 || t2 >= 129351 && t2 <= 129535 || t2 >= 129648 && t2 <= 129660 || t2 >= 129664 && t2 <= 129672 || t2 >= 129680 && t2 <= 129725 || t2 >= 129727 && t2 <= 129733 || t2 >= 129742 && t2 <= 129755 || t2 >= 129760 && t2 <= 129768 || t2 >= 129776 && t2 <= 129784 || t2 >= 131072 && t2 <= 196605 || t2 >= 196608 && t2 <= 262141, O = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, y = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, M = /\t{1,1000}/y, P = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu"), L = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, ct = new RegExp("\\p{M}+", "gu"), Ft = { limit: 1 / 0, ellipsis: "" }, X = (t2, e = {}, s = {}) => {
|
|
1651
|
-
let i = e.limit ?? 1 / 0, r = e.ellipsis ?? "", n = e?.ellipsisWidth ?? (r ? X(r, Ft, s).width : 0), o = s.ansiWidth ?? 0, a = s.controlWidth ?? 0, l = s.tabWidth ?? 8, E = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, m = s.fullWidthWidth ?? 2, A = s.regularWidth ?? 1, V2 = s.wideWidth ?? 2, h = 0, u = 0, f = t2.length, v = 0, p = !1, d2 = f, b = Math.max(0, i - n), C = 0, B = 0, c = 0, F = 0;
|
|
1652
|
-
t: for (; ; ) {
|
|
1653
|
-
if (B > C || u >= f && u > h) {
|
|
1654
|
-
let ut = t2.slice(C, B) || t2.slice(h, u);
|
|
1655
|
-
v = 0;
|
|
1656
|
-
for (let Y2 of ut.replaceAll(ct, "")) {
|
|
1657
|
-
let $ = Y2.codePointAt(0) || 0;
|
|
1658
|
-
if (lt($) ? F = m : ht($) ? F = V2 : E !== A && at($) ? F = E : F = A, c + F > b && (d2 = Math.min(d2, Math.max(C, h) + v)), c + F > i) {
|
|
1659
|
-
p = !0;
|
|
1660
|
-
break t;
|
|
1661
|
-
}
|
|
1662
|
-
v += Y2.length, c += F;
|
|
1663
|
-
}
|
|
1664
|
-
C = B = 0;
|
|
1665
|
-
}
|
|
1666
|
-
if (u >= f) break;
|
|
1667
|
-
if (L.lastIndex = u, L.test(t2)) {
|
|
1668
|
-
if (v = L.lastIndex - u, F = v * A, c + F > b && (d2 = Math.min(d2, u + Math.floor((b - c) / A))), c + F > i) {
|
|
1669
|
-
p = !0;
|
|
1670
|
-
break;
|
|
1671
|
-
}
|
|
1672
|
-
c += F, C = h, B = u, u = h = L.lastIndex;
|
|
1673
|
-
continue;
|
|
1674
|
-
}
|
|
1675
|
-
if (O.lastIndex = u, O.test(t2)) {
|
|
1676
|
-
if (c + o > b && (d2 = Math.min(d2, u)), c + o > i) {
|
|
1677
|
-
p = !0;
|
|
1678
|
-
break;
|
|
1679
|
-
}
|
|
1680
|
-
c += o, C = h, B = u, u = h = O.lastIndex;
|
|
1681
|
-
continue;
|
|
1682
|
-
}
|
|
1683
|
-
if (y.lastIndex = u, y.test(t2)) {
|
|
1684
|
-
if (v = y.lastIndex - u, F = v * a, c + F > b && (d2 = Math.min(d2, u + Math.floor((b - c) / a))), c + F > i) {
|
|
1685
|
-
p = !0;
|
|
1686
|
-
break;
|
|
1687
|
-
}
|
|
1688
|
-
c += F, C = h, B = u, u = h = y.lastIndex;
|
|
1689
|
-
continue;
|
|
1690
|
-
}
|
|
1691
|
-
if (M.lastIndex = u, M.test(t2)) {
|
|
1692
|
-
if (v = M.lastIndex - u, F = v * l, c + F > b && (d2 = Math.min(d2, u + Math.floor((b - c) / l))), c + F > i) {
|
|
1693
|
-
p = !0;
|
|
1694
|
-
break;
|
|
1695
|
-
}
|
|
1696
|
-
c += F, C = h, B = u, u = h = M.lastIndex;
|
|
1697
|
-
continue;
|
|
1698
|
-
}
|
|
1699
|
-
if (P.lastIndex = u, P.test(t2)) {
|
|
1700
|
-
if (c + g > b && (d2 = Math.min(d2, u)), c + g > i) {
|
|
1701
|
-
p = !0;
|
|
1702
|
-
break;
|
|
1703
|
-
}
|
|
1704
|
-
c += g, C = h, B = u, u = h = P.lastIndex;
|
|
1705
|
-
continue;
|
|
1706
|
-
}
|
|
1707
|
-
u += 1;
|
|
1708
|
-
}
|
|
1709
|
-
return { width: p ? b : c, index: p ? d2 : f, truncated: p, ellipsed: p && i >= n };
|
|
1710
|
-
}, ft = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 }, S = (t2, e = {}) => X(t2, ft, e).width, W = "\x1B", Z = "\x9B", pt = 39, j = "\x07", Q = "[", dt = "]", tt = "m", U = `${dt}8;;`, et = new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${U}(?<uri>.*)${j})`, "y"), mt = (t2) => {
|
|
1711
|
-
if (t2 >= 30 && t2 <= 37 || t2 >= 90 && t2 <= 97) return 39;
|
|
1712
|
-
if (t2 >= 40 && t2 <= 47 || t2 >= 100 && t2 <= 107) return 49;
|
|
1713
|
-
if (t2 === 1 || t2 === 2) return 22;
|
|
1714
|
-
if (t2 === 3) return 23;
|
|
1715
|
-
if (t2 === 4) return 24;
|
|
1716
|
-
if (t2 === 7) return 27;
|
|
1717
|
-
if (t2 === 8) return 28;
|
|
1718
|
-
if (t2 === 9) return 29;
|
|
1719
|
-
if (t2 === 0) return 0;
|
|
1720
|
-
}, st = (t2) => `${W}${Q}${t2}${tt}`, it = (t2) => `${W}${U}${t2}${j}`, gt = (t2) => t2.map((e) => S(e)), G = (t2, e, s) => {
|
|
1721
|
-
let i = e[Symbol.iterator](), r = !1, n = !1, o = t2.at(-1), a = o === void 0 ? 0 : S(o), l = i.next(), E = i.next(), g = 0;
|
|
1722
|
-
for (; !l.done; ) {
|
|
1723
|
-
let m = l.value, A = S(m);
|
|
1724
|
-
a + A <= s ? t2[t2.length - 1] += m : (t2.push(m), a = 0), (m === W || m === Z) && (r = !0, n = e.startsWith(U, g + 1)), r ? n ? m === j && (r = !1, n = !1) : m === tt && (r = !1) : (a += A, a === s && !E.done && (t2.push(""), a = 0)), l = E, E = i.next(), g += m.length;
|
|
1725
|
-
}
|
|
1726
|
-
o = t2.at(-1), !a && o !== void 0 && o.length > 0 && t2.length > 1 && (t2[t2.length - 2] += t2.pop());
|
|
1727
|
-
}, vt = (t2) => {
|
|
1728
|
-
let e = t2.split(" "), s = e.length;
|
|
1729
|
-
for (; s > 0 && !(S(e[s - 1]) > 0); ) s--;
|
|
1730
|
-
return s === e.length ? t2 : e.slice(0, s).join(" ") + e.slice(s).join("");
|
|
1731
|
-
}, Et = (t2, e, s = {}) => {
|
|
1732
|
-
if (s.trim !== !1 && t2.trim() === "") return "";
|
|
1733
|
-
let i = "", r, n, o = t2.split(" "), a = gt(o), l = [""];
|
|
1734
|
-
for (let [h, u] of o.entries()) {
|
|
1735
|
-
s.trim !== !1 && (l[l.length - 1] = (l.at(-1) ?? "").trimStart());
|
|
1736
|
-
let f = S(l.at(-1) ?? "");
|
|
1737
|
-
if (h !== 0 && (f >= e && (s.wordWrap === !1 || s.trim === !1) && (l.push(""), f = 0), (f > 0 || s.trim === !1) && (l[l.length - 1] += " ", f++)), s.hard && a[h] > e) {
|
|
1738
|
-
let v = e - f, p = 1 + Math.floor((a[h] - v - 1) / e);
|
|
1739
|
-
Math.floor((a[h] - 1) / e) < p && l.push(""), G(l, u, e);
|
|
1740
|
-
continue;
|
|
1741
|
-
}
|
|
1742
|
-
if (f + a[h] > e && f > 0 && a[h] > 0) {
|
|
1743
|
-
if (s.wordWrap === !1 && f < e) {
|
|
1744
|
-
G(l, u, e);
|
|
1745
|
-
continue;
|
|
1746
|
-
}
|
|
1747
|
-
l.push("");
|
|
1748
|
-
}
|
|
1749
|
-
if (f + a[h] > e && s.wordWrap === !1) {
|
|
1750
|
-
G(l, u, e);
|
|
1751
|
-
continue;
|
|
1752
|
-
}
|
|
1753
|
-
l[l.length - 1] += u;
|
|
1754
|
-
}
|
|
1755
|
-
s.trim !== !1 && (l = l.map((h) => vt(h)));
|
|
1756
|
-
let E = l.join(`
|
|
1757
|
-
`), g = E[Symbol.iterator](), m = g.next(), A = g.next(), V2 = 0;
|
|
1758
|
-
for (; !m.done; ) {
|
|
1759
|
-
let h = m.value, u = A.value;
|
|
1760
|
-
if (i += h, h === W || h === Z) {
|
|
1761
|
-
et.lastIndex = V2 + 1;
|
|
1762
|
-
let p = et.exec(E)?.groups;
|
|
1763
|
-
if (p?.code !== void 0) {
|
|
1764
|
-
let d2 = Number.parseFloat(p.code);
|
|
1765
|
-
r = d2 === pt ? void 0 : d2;
|
|
1766
|
-
} else p?.uri !== void 0 && (n = p.uri.length === 0 ? void 0 : p.uri);
|
|
1767
|
-
}
|
|
1768
|
-
let f = r ? mt(r) : void 0;
|
|
1769
|
-
u === `
|
|
1770
|
-
` ? (n && (i += it("")), r && f && (i += st(f))) : h === `
|
|
1771
|
-
` && (r && f && (i += st(r)), n && (i += it(n))), V2 += h.length, m = A, A = g.next();
|
|
1772
|
-
}
|
|
1773
|
-
return i;
|
|
1774
|
-
};
|
|
1775
|
-
function K(t2, e, s) {
|
|
1776
|
-
return String(t2).normalize().replaceAll(`\r
|
|
1777
|
-
`, `
|
|
1778
|
-
`).split(`
|
|
1779
|
-
`).map((i) => Et(i, e, s)).join(`
|
|
1780
|
-
`);
|
|
1781
|
-
}
|
|
1782
|
-
var At = ["up", "down", "left", "right", "space", "enter", "cancel"], _ = { actions: new Set(At), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: !0 };
|
|
1783
|
-
function H(t2, e) {
|
|
1784
|
-
if (typeof t2 == "string") return _.aliases.get(t2) === e;
|
|
1785
|
-
for (let s of t2) if (s !== void 0 && H(s, e)) return !0;
|
|
1786
|
-
return !1;
|
|
1787
|
-
}
|
|
1788
|
-
function _t(t2, e) {
|
|
1789
|
-
if (t2 === e) return;
|
|
1790
|
-
let s = t2.split(`
|
|
1791
|
-
`), i = e.split(`
|
|
1792
|
-
`), r = Math.max(s.length, i.length), n = [];
|
|
1793
|
-
for (let o = 0; o < r; o++) s[o] !== i[o] && n.push(o);
|
|
1794
|
-
return { lines: n, numLinesBefore: s.length, numLinesAfter: i.length, numLines: r };
|
|
1795
|
-
}
|
|
1796
|
-
var bt = globalThis.process.platform.startsWith("win"), z = /* @__PURE__ */ Symbol("clack:cancel");
|
|
1797
|
-
function Ct(t2) {
|
|
1798
|
-
return t2 === z;
|
|
1799
|
-
}
|
|
1800
|
-
function T(t2, e) {
|
|
1801
|
-
let s = t2;
|
|
1802
|
-
s.isTTY && s.setRawMode(e);
|
|
1803
|
-
}
|
|
1804
|
-
function xt({ input: t2 = q, output: e = R, overwrite: s = !0, hideCursor: i = !0 } = {}) {
|
|
1805
|
-
let r = k.createInterface({ input: t2, output: e, prompt: "", tabSize: 1 });
|
|
1806
|
-
k.emitKeypressEvents(t2, r), t2 instanceof J && t2.isTTY && t2.setRawMode(!0);
|
|
1807
|
-
let n = (o, { name: a, sequence: l }) => {
|
|
1808
|
-
let E = String(o);
|
|
1809
|
-
if (H([E, a, l], "cancel")) {
|
|
1810
|
-
i && e.write(import_sisteransi.cursor.show), process.exit(0);
|
|
1811
|
-
return;
|
|
1812
|
-
}
|
|
1813
|
-
if (!s) return;
|
|
1814
|
-
k.moveCursor(e, a === "return" ? 0 : -1, a === "return" ? -1 : 0, () => {
|
|
1815
|
-
k.clearLine(e, 1, () => {
|
|
1816
|
-
t2.once("keypress", n);
|
|
1817
|
-
});
|
|
1818
|
-
});
|
|
1819
|
-
};
|
|
1820
|
-
return i && e.write(import_sisteransi.cursor.hide), t2.once("keypress", n), () => {
|
|
1821
|
-
t2.off("keypress", n), i && e.write(import_sisteransi.cursor.show), t2 instanceof J && t2.isTTY && !bt && t2.setRawMode(!1), r.terminal = !1, r.close();
|
|
1822
|
-
};
|
|
1823
|
-
}
|
|
1824
|
-
var rt = (t2) => "columns" in t2 && typeof t2.columns == "number" ? t2.columns : 80, nt = (t2) => "rows" in t2 && typeof t2.rows == "number" ? t2.rows : 20;
|
|
1825
|
-
function Bt(t2, e, s, i = s) {
|
|
1826
|
-
let r = rt(t2 ?? R);
|
|
1827
|
-
return K(e, r - s.length, { hard: !0, trim: !1 }).split(`
|
|
1828
|
-
`).map((n, o) => `${o === 0 ? i : s}${n}`).join(`
|
|
1829
|
-
`);
|
|
1830
|
-
}
|
|
1831
|
-
var x = class {
|
|
1832
|
-
input;
|
|
1833
|
-
output;
|
|
1834
|
-
_abortSignal;
|
|
1835
|
-
rl;
|
|
1836
|
-
opts;
|
|
1837
|
-
_render;
|
|
1838
|
-
_track = !1;
|
|
1839
|
-
_prevFrame = "";
|
|
1840
|
-
_subscribers = /* @__PURE__ */ new Map();
|
|
1841
|
-
_cursor = 0;
|
|
1842
|
-
state = "initial";
|
|
1843
|
-
error = "";
|
|
1844
|
-
value;
|
|
1845
|
-
userInput = "";
|
|
1846
|
-
constructor(e, s = !0) {
|
|
1847
|
-
let { input: i = q, output: r = R, render: n, signal: o, ...a } = e;
|
|
1848
|
-
this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = s, this._abortSignal = o, this.input = i, this.output = r;
|
|
1849
|
-
}
|
|
1850
|
-
unsubscribe() {
|
|
1851
|
-
this._subscribers.clear();
|
|
1852
|
-
}
|
|
1853
|
-
setSubscriber(e, s) {
|
|
1854
|
-
let i = this._subscribers.get(e) ?? [];
|
|
1855
|
-
i.push(s), this._subscribers.set(e, i);
|
|
1856
|
-
}
|
|
1857
|
-
on(e, s) {
|
|
1858
|
-
this.setSubscriber(e, { cb: s });
|
|
1859
|
-
}
|
|
1860
|
-
once(e, s) {
|
|
1861
|
-
this.setSubscriber(e, { cb: s, once: !0 });
|
|
1862
|
-
}
|
|
1863
|
-
emit(e, ...s) {
|
|
1864
|
-
let i = this._subscribers.get(e) ?? [], r = [];
|
|
1865
|
-
for (let n of i) n.cb(...s), n.once && r.push(() => i.splice(i.indexOf(n), 1));
|
|
1866
|
-
for (let n of r) n();
|
|
1867
|
-
}
|
|
1868
|
-
prompt() {
|
|
1869
|
-
return new Promise((e) => {
|
|
1870
|
-
if (this._abortSignal) {
|
|
1871
|
-
if (this._abortSignal.aborted) return this.state = "cancel", this.close(), e(z);
|
|
1872
|
-
this._abortSignal.addEventListener("abort", () => {
|
|
1873
|
-
this.state = "cancel", this.close();
|
|
1874
|
-
}, { once: !0 });
|
|
1875
|
-
}
|
|
1876
|
-
this.rl = ot.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: !0 }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, !0), this.input.on("keypress", this.onKeypress), T(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
1877
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), T(this.input, !1), e(this.value);
|
|
1878
|
-
}), this.once("cancel", () => {
|
|
1879
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), T(this.input, !1), e(z);
|
|
1880
|
-
});
|
|
1881
|
-
});
|
|
1882
|
-
}
|
|
1883
|
-
_isActionKey(e, s) {
|
|
1884
|
-
return e === " ";
|
|
1885
|
-
}
|
|
1886
|
-
_setValue(e) {
|
|
1887
|
-
this.value = e, this.emit("value", this.value);
|
|
1888
|
-
}
|
|
1889
|
-
_setUserInput(e, s) {
|
|
1890
|
-
this.userInput = e ?? "", this.emit("userInput", this.userInput), s && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
|
|
1891
|
-
}
|
|
1892
|
-
_clearUserInput() {
|
|
1893
|
-
this.rl?.write(null, { ctrl: !0, name: "u" }), this._setUserInput("");
|
|
1894
|
-
}
|
|
1895
|
-
onKeypress(e, s) {
|
|
1896
|
-
if (this._track && s.name !== "return" && (s.name && this._isActionKey(e, s) && this.rl?.write(null, { ctrl: !0, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), s?.name && (!this._track && _.aliases.has(s.name) && this.emit("cursor", _.aliases.get(s.name)), _.actions.has(s.name) && this.emit("cursor", s.name)), e && (e.toLowerCase() === "y" || e.toLowerCase() === "n") && this.emit("confirm", e.toLowerCase() === "y"), this.emit("key", e?.toLowerCase(), s), s?.name === "return") {
|
|
1897
|
-
if (this.opts.validate) {
|
|
1898
|
-
let i = this.opts.validate(this.value);
|
|
1899
|
-
i && (this.error = i instanceof Error ? i.message : i, this.state = "error", this.rl?.write(this.userInput));
|
|
1900
|
-
}
|
|
1901
|
-
this.state !== "error" && (this.state = "submit");
|
|
1902
|
-
}
|
|
1903
|
-
H([e, s?.name, s?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
1904
|
-
}
|
|
1905
|
-
close() {
|
|
1906
|
-
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
1907
|
-
`), T(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
1908
|
-
}
|
|
1909
|
-
restoreCursor() {
|
|
1910
|
-
let e = K(this._prevFrame, process.stdout.columns, { hard: !0, trim: !1 }).split(`
|
|
1911
|
-
`).length - 1;
|
|
1912
|
-
this.output.write(import_sisteransi.cursor.move(-999, e * -1));
|
|
1913
|
-
}
|
|
1914
|
-
render() {
|
|
1915
|
-
let e = K(this._render(this) ?? "", process.stdout.columns, { hard: !0, trim: !1 });
|
|
1916
|
-
if (e !== this._prevFrame) {
|
|
1917
|
-
if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
|
|
1918
|
-
else {
|
|
1919
|
-
let s = _t(this._prevFrame, e), i = nt(this.output);
|
|
1920
|
-
if (this.restoreCursor(), s) {
|
|
1921
|
-
let r = Math.max(0, s.numLinesAfter - i), n = Math.max(0, s.numLinesBefore - i), o = s.lines.find((a) => a >= r);
|
|
1922
|
-
if (o === void 0) {
|
|
1923
|
-
this._prevFrame = e;
|
|
1924
|
-
return;
|
|
1925
|
-
}
|
|
1926
|
-
if (s.lines.length === 1) {
|
|
1927
|
-
this.output.write(import_sisteransi.cursor.move(0, o - n)), this.output.write(import_sisteransi.erase.lines(1));
|
|
1928
|
-
let a = e.split(`
|
|
1929
|
-
`);
|
|
1930
|
-
this.output.write(a[o]), this._prevFrame = e, this.output.write(import_sisteransi.cursor.move(0, a.length - o - 1));
|
|
1931
|
-
return;
|
|
1932
|
-
} else if (s.lines.length > 1) {
|
|
1933
|
-
if (r < n) o = r;
|
|
1934
|
-
else {
|
|
1935
|
-
let l = o - n;
|
|
1936
|
-
l > 0 && this.output.write(import_sisteransi.cursor.move(0, l));
|
|
1937
|
-
}
|
|
1938
|
-
this.output.write(import_sisteransi.erase.down());
|
|
1939
|
-
let a = e.split(`
|
|
1940
|
-
`).slice(o);
|
|
1941
|
-
this.output.write(a.join(`
|
|
1942
|
-
`)), this._prevFrame = e;
|
|
1943
|
-
return;
|
|
1944
|
-
}
|
|
1945
|
-
}
|
|
1946
|
-
this.output.write(import_sisteransi.erase.down());
|
|
1947
|
-
}
|
|
1948
|
-
this.output.write(e), this.state === "initial" && (this.state = "active"), this._prevFrame = e;
|
|
1949
|
-
}
|
|
1950
|
-
}
|
|
1951
|
-
};
|
|
1952
|
-
var kt = class extends x {
|
|
1953
|
-
get cursor() {
|
|
1954
|
-
return this.value ? 0 : 1;
|
|
1955
|
-
}
|
|
1956
|
-
get _value() {
|
|
1957
|
-
return this.cursor === 0;
|
|
1958
|
-
}
|
|
1959
|
-
constructor(e) {
|
|
1960
|
-
super(e, !1), this.value = !!e.initialValue, this.on("userInput", () => {
|
|
1961
|
-
this.value = this._value;
|
|
1962
|
-
}), this.on("confirm", (s) => {
|
|
1963
|
-
this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = s, this.state = "submit", this.close();
|
|
1964
|
-
}), this.on("cursor", () => {
|
|
1965
|
-
this.value = !this.value;
|
|
1966
|
-
});
|
|
1967
|
-
}
|
|
1968
|
-
};
|
|
1969
|
-
function D(t2, e, s) {
|
|
1970
|
-
let i = t2 + e, r = Math.max(s.length - 1, 0), n = i < 0 ? r : i > r ? 0 : i;
|
|
1971
|
-
return s[n].disabled ? D(n, e < 0 ? -1 : 1, s) : n;
|
|
1972
|
-
}
|
|
1973
|
-
var Mt = class extends x {
|
|
1974
|
-
options;
|
|
1975
|
-
cursor = 0;
|
|
1976
|
-
get _value() {
|
|
1977
|
-
return this.options[this.cursor].value;
|
|
1978
|
-
}
|
|
1979
|
-
get _enabledOptions() {
|
|
1980
|
-
return this.options.filter((e) => e.disabled !== !0);
|
|
1981
|
-
}
|
|
1982
|
-
toggleAll() {
|
|
1983
|
-
let e = this._enabledOptions, s = this.value !== void 0 && this.value.length === e.length;
|
|
1984
|
-
this.value = s ? [] : e.map((i) => i.value);
|
|
1985
|
-
}
|
|
1986
|
-
toggleInvert() {
|
|
1987
|
-
let e = this.value;
|
|
1988
|
-
if (!e) return;
|
|
1989
|
-
let s = this._enabledOptions.filter((i) => !e.includes(i.value));
|
|
1990
|
-
this.value = s.map((i) => i.value);
|
|
1991
|
-
}
|
|
1992
|
-
toggleValue() {
|
|
1993
|
-
this.value === void 0 && (this.value = []);
|
|
1994
|
-
let e = this.value.includes(this._value);
|
|
1995
|
-
this.value = e ? this.value.filter((s) => s !== this._value) : [...this.value, this._value];
|
|
1996
|
-
}
|
|
1997
|
-
constructor(e) {
|
|
1998
|
-
super(e, !1), this.options = e.options, this.value = [...e.initialValues ?? []];
|
|
1999
|
-
let s = Math.max(this.options.findIndex(({ value: i }) => i === e.cursorAt), 0);
|
|
2000
|
-
this.cursor = this.options[s].disabled ? D(s, 1, this.options) : s, this.on("key", (i) => {
|
|
2001
|
-
i === "a" && this.toggleAll(), i === "i" && this.toggleInvert();
|
|
2002
|
-
}), this.on("cursor", (i) => {
|
|
2003
|
-
switch (i) {
|
|
2004
|
-
case "left":
|
|
2005
|
-
case "up":
|
|
2006
|
-
this.cursor = D(this.cursor, -1, this.options);
|
|
2007
|
-
break;
|
|
2008
|
-
case "down":
|
|
2009
|
-
case "right":
|
|
2010
|
-
this.cursor = D(this.cursor, 1, this.options);
|
|
2011
|
-
break;
|
|
2012
|
-
case "space":
|
|
2013
|
-
this.toggleValue();
|
|
2014
|
-
break;
|
|
2015
|
-
}
|
|
2016
|
-
});
|
|
2017
|
-
}
|
|
2018
|
-
};
|
|
2019
|
-
var Wt = class extends x {
|
|
2020
|
-
options;
|
|
2021
|
-
cursor = 0;
|
|
2022
|
-
get _selectedValue() {
|
|
2023
|
-
return this.options[this.cursor];
|
|
2024
|
-
}
|
|
2025
|
-
changeValue() {
|
|
2026
|
-
this.value = this._selectedValue.value;
|
|
2027
|
-
}
|
|
2028
|
-
constructor(e) {
|
|
2029
|
-
super(e, !1), this.options = e.options;
|
|
2030
|
-
let s = this.options.findIndex(({ value: r }) => r === e.initialValue), i = s === -1 ? 0 : s;
|
|
2031
|
-
this.cursor = this.options[i].disabled ? D(i, 1, this.options) : i, this.changeValue(), this.on("cursor", (r) => {
|
|
2032
|
-
switch (r) {
|
|
2033
|
-
case "left":
|
|
2034
|
-
case "up":
|
|
2035
|
-
this.cursor = D(this.cursor, -1, this.options);
|
|
2036
|
-
break;
|
|
2037
|
-
case "down":
|
|
2038
|
-
case "right":
|
|
2039
|
-
this.cursor = D(this.cursor, 1, this.options);
|
|
2040
|
-
break;
|
|
2041
|
-
}
|
|
2042
|
-
this.changeValue();
|
|
2043
|
-
});
|
|
2044
|
-
}
|
|
2045
|
-
};
|
|
2046
|
-
var $t = class extends x {
|
|
2047
|
-
get userInputWithCursor() {
|
|
2048
|
-
if (this.state === "submit") return this.userInput;
|
|
2049
|
-
let e = this.userInput;
|
|
2050
|
-
if (this.cursor >= e.length) return `${this.userInput}\u2588`;
|
|
2051
|
-
let s = e.slice(0, this.cursor), [i, ...r] = e.slice(this.cursor);
|
|
2052
|
-
return `${s}${import_picocolors.default.inverse(i)}${r.join("")}`;
|
|
2053
|
-
}
|
|
2054
|
-
get cursor() {
|
|
2055
|
-
return this._cursor;
|
|
2056
|
-
}
|
|
2057
|
-
constructor(e) {
|
|
2058
|
-
super({ ...e, initialUserInput: e.initialUserInput ?? e.initialValue }), this.on("userInput", (s) => {
|
|
2059
|
-
this._setValue(s);
|
|
2060
|
-
}), this.on("finalize", () => {
|
|
2061
|
-
this.value || (this.value = e.defaultValue), this.value === void 0 && (this.value = "");
|
|
2062
|
-
});
|
|
2063
|
-
}
|
|
2064
|
-
};
|
|
2065
|
-
|
|
2066
|
-
// ../../node_modules/@clack/prompts/dist/index.mjs
|
|
2067
|
-
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
2068
|
-
import N2 from "node:process";
|
|
2069
|
-
var import_sisteransi2 = __toESM(require_src(), 1);
|
|
2070
|
-
function ht2() {
|
|
2071
|
-
return N2.platform !== "win32" ? N2.env.TERM !== "linux" : !!N2.env.CI || !!N2.env.WT_SESSION || !!N2.env.TERMINUS_SUBLIME || N2.env.ConEmuTask === "{cmd::Cmder}" || N2.env.TERM_PROGRAM === "Terminus-Sublime" || N2.env.TERM_PROGRAM === "vscode" || N2.env.TERM === "xterm-256color" || N2.env.TERM === "alacritty" || N2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
2072
|
-
}
|
|
2073
|
-
var ee = ht2(), ue = () => process.env.CI === "true", Te = (e) => e.isTTY === !0, I2 = (e, r) => ee ? e : r, Me = I2("\u25C6", "*"), ce = I2("\u25A0", "x"), de = I2("\u25B2", "x"), j2 = I2("\u25C7", "o"), $e = I2("\u250C", "T"), d = I2("\u2502", "|"), x2 = I2("\u2514", "\u2014"), Re = I2("\u2510", "T"), Oe = I2("\u2518", "\u2014"), Y = I2("\u25CF", ">"), K2 = I2("\u25CB", " "), te = I2("\u25FB", "[\u2022]"), V = I2("\u25FC", "[+]"), z2 = I2("\u25FB", "[ ]"), Ne = I2("\u25AA", "\u2022"), se = I2("\u2500", "-"), he = I2("\u256E", "+"), Pe = I2("\u251C", "+"), me = I2("\u256F", "+"), pe = I2("\u2570", "+"), We = I2("\u256D", "+"), ge = I2("\u25CF", "\u2022"), fe = I2("\u25C6", "*"), Fe = I2("\u25B2", "!"), ye = I2("\u25A0", "x"), W2 = (e) => {
|
|
2074
|
-
switch (e) {
|
|
2075
|
-
case "initial":
|
|
2076
|
-
case "active":
|
|
2077
|
-
return import_picocolors2.default.cyan(Me);
|
|
2078
|
-
case "cancel":
|
|
2079
|
-
return import_picocolors2.default.red(ce);
|
|
2080
|
-
case "error":
|
|
2081
|
-
return import_picocolors2.default.yellow(de);
|
|
2082
|
-
case "submit":
|
|
2083
|
-
return import_picocolors2.default.green(j2);
|
|
2084
|
-
}
|
|
2085
|
-
}, Ee = (e) => {
|
|
2086
|
-
switch (e) {
|
|
2087
|
-
case "initial":
|
|
2088
|
-
case "active":
|
|
2089
|
-
return import_picocolors2.default.cyan(d);
|
|
2090
|
-
case "cancel":
|
|
2091
|
-
return import_picocolors2.default.red(d);
|
|
2092
|
-
case "error":
|
|
2093
|
-
return import_picocolors2.default.yellow(d);
|
|
2094
|
-
case "submit":
|
|
2095
|
-
return import_picocolors2.default.green(d);
|
|
2096
|
-
}
|
|
2097
|
-
}, mt2 = (e) => e === 161 || e === 164 || e === 167 || e === 168 || e === 170 || e === 173 || e === 174 || e >= 176 && e <= 180 || e >= 182 && e <= 186 || e >= 188 && e <= 191 || e === 198 || e === 208 || e === 215 || e === 216 || e >= 222 && e <= 225 || e === 230 || e >= 232 && e <= 234 || e === 236 || e === 237 || e === 240 || e === 242 || e === 243 || e >= 247 && e <= 250 || e === 252 || e === 254 || e === 257 || e === 273 || e === 275 || e === 283 || e === 294 || e === 295 || e === 299 || e >= 305 && e <= 307 || e === 312 || e >= 319 && e <= 322 || e === 324 || e >= 328 && e <= 331 || e === 333 || e === 338 || e === 339 || e === 358 || e === 359 || e === 363 || e === 462 || e === 464 || e === 466 || e === 468 || e === 470 || e === 472 || e === 474 || e === 476 || e === 593 || e === 609 || e === 708 || e === 711 || e >= 713 && e <= 715 || e === 717 || e === 720 || e >= 728 && e <= 731 || e === 733 || e === 735 || e >= 768 && e <= 879 || e >= 913 && e <= 929 || e >= 931 && e <= 937 || e >= 945 && e <= 961 || e >= 963 && e <= 969 || e === 1025 || e >= 1040 && e <= 1103 || e === 1105 || e === 8208 || e >= 8211 && e <= 8214 || e === 8216 || e === 8217 || e === 8220 || e === 8221 || e >= 8224 && e <= 8226 || e >= 8228 && e <= 8231 || e === 8240 || e === 8242 || e === 8243 || e === 8245 || e === 8251 || e === 8254 || e === 8308 || e === 8319 || e >= 8321 && e <= 8324 || e === 8364 || e === 8451 || e === 8453 || e === 8457 || e === 8467 || e === 8470 || e === 8481 || e === 8482 || e === 8486 || e === 8491 || e === 8531 || e === 8532 || e >= 8539 && e <= 8542 || e >= 8544 && e <= 8555 || e >= 8560 && e <= 8569 || e === 8585 || e >= 8592 && e <= 8601 || e === 8632 || e === 8633 || e === 8658 || e === 8660 || e === 8679 || e === 8704 || e === 8706 || e === 8707 || e === 8711 || e === 8712 || e === 8715 || e === 8719 || e === 8721 || e === 8725 || e === 8730 || e >= 8733 && e <= 8736 || e === 8739 || e === 8741 || e >= 8743 && e <= 8748 || e === 8750 || e >= 8756 && e <= 8759 || e === 8764 || e === 8765 || e === 8776 || e === 8780 || e === 8786 || e === 8800 || e === 8801 || e >= 8804 && e <= 8807 || e === 8810 || e === 8811 || e === 8814 || e === 8815 || e === 8834 || e === 8835 || e === 8838 || e === 8839 || e === 8853 || e === 8857 || e === 8869 || e === 8895 || e === 8978 || e >= 9312 && e <= 9449 || e >= 9451 && e <= 9547 || e >= 9552 && e <= 9587 || e >= 9600 && e <= 9615 || e >= 9618 && e <= 9621 || e === 9632 || e === 9633 || e >= 9635 && e <= 9641 || e === 9650 || e === 9651 || e === 9654 || e === 9655 || e === 9660 || e === 9661 || e === 9664 || e === 9665 || e >= 9670 && e <= 9672 || e === 9675 || e >= 9678 && e <= 9681 || e >= 9698 && e <= 9701 || e === 9711 || e === 9733 || e === 9734 || e === 9737 || e === 9742 || e === 9743 || e === 9756 || e === 9758 || e === 9792 || e === 9794 || e === 9824 || e === 9825 || e >= 9827 && e <= 9829 || e >= 9831 && e <= 9834 || e === 9836 || e === 9837 || e === 9839 || e === 9886 || e === 9887 || e === 9919 || e >= 9926 && e <= 9933 || e >= 9935 && e <= 9939 || e >= 9941 && e <= 9953 || e === 9955 || e === 9960 || e === 9961 || e >= 9963 && e <= 9969 || e === 9972 || e >= 9974 && e <= 9977 || e === 9979 || e === 9980 || e === 9982 || e === 9983 || e === 10045 || e >= 10102 && e <= 10111 || e >= 11094 && e <= 11097 || e >= 12872 && e <= 12879 || e >= 57344 && e <= 63743 || e >= 65024 && e <= 65039 || e === 65533 || e >= 127232 && e <= 127242 || e >= 127248 && e <= 127277 || e >= 127280 && e <= 127337 || e >= 127344 && e <= 127373 || e === 127375 || e === 127376 || e >= 127387 && e <= 127404 || e >= 917760 && e <= 917999 || e >= 983040 && e <= 1048573 || e >= 1048576 && e <= 1114109, pt2 = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510, gt2 = (e) => e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9800 && e <= 9811 || e === 9855 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e === 94192 || e === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101632 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141, ve = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, re = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, ie = /\t{1,1000}/y, Ae = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu"), ne = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, ft2 = new RegExp("\\p{M}+", "gu"), Ft2 = { limit: 1 / 0, ellipsis: "" }, Le = (e, r = {}, s = {}) => {
|
|
2098
|
-
let i = r.limit ?? 1 / 0, n = r.ellipsis ?? "", l = r?.ellipsisWidth ?? (n ? Le(n, Ft2, s).width : 0), u = s.ansiWidth ?? 0, a = s.controlWidth ?? 0, o = s.tabWidth ?? 8, $ = s.ambiguousWidth ?? 1, y2 = s.emojiWidth ?? 2, E = s.fullWidthWidth ?? 2, p = s.regularWidth ?? 1, f = s.wideWidth ?? 2, c = 0, m = 0, h = e.length, g = 0, F = !1, v = h, S2 = Math.max(0, i - l), B = 0, b = 0, A = 0, C = 0;
|
|
2099
|
-
e: for (; ; ) {
|
|
2100
|
-
if (b > B || m >= h && m > c) {
|
|
2101
|
-
let _2 = e.slice(B, b) || e.slice(c, m);
|
|
2102
|
-
g = 0;
|
|
2103
|
-
for (let D2 of _2.replaceAll(ft2, "")) {
|
|
2104
|
-
let T2 = D2.codePointAt(0) || 0;
|
|
2105
|
-
if (pt2(T2) ? C = E : gt2(T2) ? C = f : $ !== p && mt2(T2) ? C = $ : C = p, A + C > S2 && (v = Math.min(v, Math.max(B, c) + g)), A + C > i) {
|
|
2106
|
-
F = !0;
|
|
2107
|
-
break e;
|
|
2108
|
-
}
|
|
2109
|
-
g += D2.length, A += C;
|
|
2110
|
-
}
|
|
2111
|
-
B = b = 0;
|
|
2112
|
-
}
|
|
2113
|
-
if (m >= h) break;
|
|
2114
|
-
if (ne.lastIndex = m, ne.test(e)) {
|
|
2115
|
-
if (g = ne.lastIndex - m, C = g * p, A + C > S2 && (v = Math.min(v, m + Math.floor((S2 - A) / p))), A + C > i) {
|
|
2116
|
-
F = !0;
|
|
2117
|
-
break;
|
|
2118
|
-
}
|
|
2119
|
-
A += C, B = c, b = m, m = c = ne.lastIndex;
|
|
2120
|
-
continue;
|
|
2121
|
-
}
|
|
2122
|
-
if (ve.lastIndex = m, ve.test(e)) {
|
|
2123
|
-
if (A + u > S2 && (v = Math.min(v, m)), A + u > i) {
|
|
2124
|
-
F = !0;
|
|
2125
|
-
break;
|
|
2126
|
-
}
|
|
2127
|
-
A += u, B = c, b = m, m = c = ve.lastIndex;
|
|
2128
|
-
continue;
|
|
2129
|
-
}
|
|
2130
|
-
if (re.lastIndex = m, re.test(e)) {
|
|
2131
|
-
if (g = re.lastIndex - m, C = g * a, A + C > S2 && (v = Math.min(v, m + Math.floor((S2 - A) / a))), A + C > i) {
|
|
2132
|
-
F = !0;
|
|
2133
|
-
break;
|
|
2134
|
-
}
|
|
2135
|
-
A += C, B = c, b = m, m = c = re.lastIndex;
|
|
2136
|
-
continue;
|
|
2137
|
-
}
|
|
2138
|
-
if (ie.lastIndex = m, ie.test(e)) {
|
|
2139
|
-
if (g = ie.lastIndex - m, C = g * o, A + C > S2 && (v = Math.min(v, m + Math.floor((S2 - A) / o))), A + C > i) {
|
|
2140
|
-
F = !0;
|
|
2141
|
-
break;
|
|
2142
|
-
}
|
|
2143
|
-
A += C, B = c, b = m, m = c = ie.lastIndex;
|
|
2144
|
-
continue;
|
|
2145
|
-
}
|
|
2146
|
-
if (Ae.lastIndex = m, Ae.test(e)) {
|
|
2147
|
-
if (A + y2 > S2 && (v = Math.min(v, m)), A + y2 > i) {
|
|
2148
|
-
F = !0;
|
|
2149
|
-
break;
|
|
2150
|
-
}
|
|
2151
|
-
A += y2, B = c, b = m, m = c = Ae.lastIndex;
|
|
2152
|
-
continue;
|
|
2153
|
-
}
|
|
2154
|
-
m += 1;
|
|
2155
|
-
}
|
|
2156
|
-
return { width: F ? S2 : A, index: F ? v : h, truncated: F, ellipsed: F && i >= l };
|
|
2157
|
-
}, yt2 = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 }, M2 = (e, r = {}) => Le(e, yt2, r).width, ae = "\x1B", je = "\x9B", Et2 = 39, Ce = "\x07", Ve = "[", vt2 = "]", ke = "m", Ie = `${vt2}8;;`, Ge = new RegExp(`(?:\\${Ve}(?<code>\\d+)m|\\${Ie}(?<uri>.*)${Ce})`, "y"), At2 = (e) => {
|
|
2158
|
-
if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
|
|
2159
|
-
if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
|
|
2160
|
-
if (e === 1 || e === 2) return 22;
|
|
2161
|
-
if (e === 3) return 23;
|
|
2162
|
-
if (e === 4) return 24;
|
|
2163
|
-
if (e === 7) return 27;
|
|
2164
|
-
if (e === 8) return 28;
|
|
2165
|
-
if (e === 9) return 29;
|
|
2166
|
-
if (e === 0) return 0;
|
|
2167
|
-
}, He = (e) => `${ae}${Ve}${e}${ke}`, Ue = (e) => `${ae}${Ie}${e}${Ce}`, Ct2 = (e) => e.map((r) => M2(r)), Se = (e, r, s) => {
|
|
2168
|
-
let i = r[Symbol.iterator](), n = !1, l = !1, u = e.at(-1), a = u === void 0 ? 0 : M2(u), o = i.next(), $ = i.next(), y2 = 0;
|
|
2169
|
-
for (; !o.done; ) {
|
|
2170
|
-
let E = o.value, p = M2(E);
|
|
2171
|
-
a + p <= s ? e[e.length - 1] += E : (e.push(E), a = 0), (E === ae || E === je) && (n = !0, l = r.startsWith(Ie, y2 + 1)), n ? l ? E === Ce && (n = !1, l = !1) : E === ke && (n = !1) : (a += p, a === s && !$.done && (e.push(""), a = 0)), o = $, $ = i.next(), y2 += E.length;
|
|
2172
|
-
}
|
|
2173
|
-
u = e.at(-1), !a && u !== void 0 && u.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
|
|
2174
|
-
}, It2 = (e) => {
|
|
2175
|
-
let r = e.split(" "), s = r.length;
|
|
2176
|
-
for (; s > 0 && !(M2(r[s - 1]) > 0); ) s--;
|
|
2177
|
-
return s === r.length ? e : r.slice(0, s).join(" ") + r.slice(s).join("");
|
|
2178
|
-
}, St = (e, r, s = {}) => {
|
|
2179
|
-
if (s.trim !== !1 && e.trim() === "") return "";
|
|
2180
|
-
let i = "", n, l, u = e.split(" "), a = Ct2(u), o = [""];
|
|
2181
|
-
for (let [c, m] of u.entries()) {
|
|
2182
|
-
s.trim !== !1 && (o[o.length - 1] = (o.at(-1) ?? "").trimStart());
|
|
2183
|
-
let h = M2(o.at(-1) ?? "");
|
|
2184
|
-
if (c !== 0 && (h >= r && (s.wordWrap === !1 || s.trim === !1) && (o.push(""), h = 0), (h > 0 || s.trim === !1) && (o[o.length - 1] += " ", h++)), s.hard && a[c] > r) {
|
|
2185
|
-
let g = r - h, F = 1 + Math.floor((a[c] - g - 1) / r);
|
|
2186
|
-
Math.floor((a[c] - 1) / r) < F && o.push(""), Se(o, m, r);
|
|
2187
|
-
continue;
|
|
2188
|
-
}
|
|
2189
|
-
if (h + a[c] > r && h > 0 && a[c] > 0) {
|
|
2190
|
-
if (s.wordWrap === !1 && h < r) {
|
|
2191
|
-
Se(o, m, r);
|
|
2192
|
-
continue;
|
|
2193
|
-
}
|
|
2194
|
-
o.push("");
|
|
2195
|
-
}
|
|
2196
|
-
if (h + a[c] > r && s.wordWrap === !1) {
|
|
2197
|
-
Se(o, m, r);
|
|
2198
|
-
continue;
|
|
2199
|
-
}
|
|
2200
|
-
o[o.length - 1] += m;
|
|
2201
|
-
}
|
|
2202
|
-
s.trim !== !1 && (o = o.map((c) => It2(c)));
|
|
2203
|
-
let $ = o.join(`
|
|
2204
|
-
`), y2 = $[Symbol.iterator](), E = y2.next(), p = y2.next(), f = 0;
|
|
2205
|
-
for (; !E.done; ) {
|
|
2206
|
-
let c = E.value, m = p.value;
|
|
2207
|
-
if (i += c, c === ae || c === je) {
|
|
2208
|
-
Ge.lastIndex = f + 1;
|
|
2209
|
-
let F = Ge.exec($)?.groups;
|
|
2210
|
-
if (F?.code !== void 0) {
|
|
2211
|
-
let v = Number.parseFloat(F.code);
|
|
2212
|
-
n = v === Et2 ? void 0 : v;
|
|
2213
|
-
} else F?.uri !== void 0 && (l = F.uri.length === 0 ? void 0 : F.uri);
|
|
2214
|
-
}
|
|
2215
|
-
let h = n ? At2(n) : void 0;
|
|
2216
|
-
m === `
|
|
2217
|
-
` ? (l && (i += Ue("")), n && h && (i += He(h))) : c === `
|
|
2218
|
-
` && (n && h && (i += He(n)), l && (i += Ue(l))), f += c.length, E = p, p = y2.next();
|
|
2219
|
-
}
|
|
2220
|
-
return i;
|
|
2221
|
-
};
|
|
2222
|
-
function q2(e, r, s) {
|
|
2223
|
-
return String(e).normalize().replaceAll(`\r
|
|
2224
|
-
`, `
|
|
2225
|
-
`).split(`
|
|
2226
|
-
`).map((i) => St(i, r, s)).join(`
|
|
2227
|
-
`);
|
|
2228
|
-
}
|
|
2229
|
-
var wt = (e, r, s, i, n) => {
|
|
2230
|
-
let l = r, u = 0;
|
|
2231
|
-
for (let a = s; a < i; a++) {
|
|
2232
|
-
let o = e[a];
|
|
2233
|
-
if (l = l - o.length, u++, l <= n) break;
|
|
2234
|
-
}
|
|
2235
|
-
return { lineCount: l, removals: u };
|
|
2236
|
-
}, J2 = (e) => {
|
|
2237
|
-
let { cursor: r, options: s, style: i } = e, n = e.output ?? process.stdout, l = rt(n), u = e.columnPadding ?? 0, a = e.rowPadding ?? 4, o = l - u, $ = nt(n), y2 = import_picocolors2.default.dim("..."), E = e.maxItems ?? Number.POSITIVE_INFINITY, p = Math.max($ - a, 0), f = Math.max(Math.min(E, p), 5), c = 0;
|
|
2238
|
-
r >= f - 3 && (c = Math.max(Math.min(r - f + 3, s.length - f), 0));
|
|
2239
|
-
let m = f < s.length && c > 0, h = f < s.length && c + f < s.length, g = Math.min(c + f, s.length), F = [], v = 0;
|
|
2240
|
-
m && v++, h && v++;
|
|
2241
|
-
let S2 = c + (m ? 1 : 0), B = g - (h ? 1 : 0);
|
|
2242
|
-
for (let A = S2; A < B; A++) {
|
|
2243
|
-
let C = q2(i(s[A], A === r), o, { hard: !0, trim: !1 }).split(`
|
|
2244
|
-
`);
|
|
2245
|
-
F.push(C), v += C.length;
|
|
2246
|
-
}
|
|
2247
|
-
if (v > p) {
|
|
2248
|
-
let A = 0, C = 0, _2 = v, D2 = r - S2, T2 = (L2, w2) => wt(F, _2, L2, w2, p);
|
|
2249
|
-
m ? ({ lineCount: _2, removals: A } = T2(0, D2), _2 > p && ({ lineCount: _2, removals: C } = T2(D2 + 1, F.length))) : ({ lineCount: _2, removals: C } = T2(D2 + 1, F.length), _2 > p && ({ lineCount: _2, removals: A } = T2(0, D2))), A > 0 && (m = !0, F.splice(0, A)), C > 0 && (h = !0, F.splice(F.length - C, C));
|
|
2250
|
-
}
|
|
2251
|
-
let b = [];
|
|
2252
|
-
m && b.push(y2);
|
|
2253
|
-
for (let A of F) for (let C of A) b.push(C);
|
|
2254
|
-
return h && b.push(y2), b;
|
|
2255
|
-
};
|
|
2256
|
-
var xt2 = [We, he, pe, me], _t2 = [$e, Re, x2, Oe];
|
|
2257
|
-
function Xe(e, r, s, i) {
|
|
2258
|
-
let n = s, l = s;
|
|
2259
|
-
return i === "center" ? n = Math.floor((r - e) / 2) : i === "right" && (n = r - e - s), l = r - n - e, [n, l];
|
|
2260
|
-
}
|
|
2261
|
-
var Dt = (e) => e, Tt2 = (e = "", r = "", s) => {
|
|
2262
|
-
let i = s?.output ?? process.stdout, n = rt(i), l = 2, u = s?.titlePadding ?? 1, a = s?.contentPadding ?? 2, o = s?.width === void 0 || s.width === "auto" ? 1 : Math.min(1, s.width), $ = (s?.withGuide ?? _.withGuide) !== !1 ? `${d} ` : "", y2 = s?.formatBorder ?? Dt, E = (s?.rounded ? xt2 : _t2).map(y2), p = y2(se), f = y2(d), c = M2($), m = M2(r), h = n - c, g = Math.floor(n * o) - c;
|
|
2263
|
-
if (s?.width === "auto") {
|
|
2264
|
-
let _2 = e.split(`
|
|
2265
|
-
`), D2 = m + u * 2;
|
|
2266
|
-
for (let L2 of _2) {
|
|
2267
|
-
let w2 = M2(L2) + a * 2;
|
|
2268
|
-
w2 > D2 && (D2 = w2);
|
|
2269
|
-
}
|
|
2270
|
-
let T2 = D2 + l;
|
|
2271
|
-
T2 < g && (g = T2);
|
|
2272
|
-
}
|
|
2273
|
-
g % 2 !== 0 && (g < h ? g++ : g--);
|
|
2274
|
-
let F = g - l, v = F - u * 2, S2 = m > v ? `${r.slice(0, v - 3)}...` : r, [B, b] = Xe(M2(S2), F, u, s?.titleAlign), A = q2(e, F - a * 2, { hard: !0, trim: !1 });
|
|
2275
|
-
i.write(`${$}${E[0]}${p.repeat(B)}${S2}${p.repeat(b)}${E[1]}
|
|
2276
|
-
`);
|
|
2277
|
-
let C = A.split(`
|
|
2278
|
-
`);
|
|
2279
|
-
for (let _2 of C) {
|
|
2280
|
-
let [D2, T2] = Xe(M2(_2), F, a, s?.contentAlign);
|
|
2281
|
-
i.write(`${$}${f}${" ".repeat(D2)}${_2}${" ".repeat(T2)}${f}
|
|
2282
|
-
`);
|
|
2283
|
-
}
|
|
2284
|
-
i.write(`${$}${E[2]}${p.repeat(F)}${E[3]}
|
|
2285
|
-
`);
|
|
2286
|
-
}, Mt2 = (e) => {
|
|
2287
|
-
let r = e.active ?? "Yes", s = e.inactive ?? "No";
|
|
2288
|
-
return new kt({ active: r, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? !0, render() {
|
|
2289
|
-
let i = `${import_picocolors2.default.gray(d)}
|
|
2290
|
-
${W2(this.state)} ${e.message}
|
|
2291
|
-
`, n = this.value ? r : s;
|
|
2292
|
-
switch (this.state) {
|
|
2293
|
-
case "submit":
|
|
2294
|
-
return `${i}${import_picocolors2.default.gray(d)} ${import_picocolors2.default.dim(n)}`;
|
|
2295
|
-
case "cancel":
|
|
2296
|
-
return `${i}${import_picocolors2.default.gray(d)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(n))}
|
|
2297
|
-
${import_picocolors2.default.gray(d)}`;
|
|
2298
|
-
default:
|
|
2299
|
-
return `${i}${import_picocolors2.default.cyan(d)} ${this.value ? `${import_picocolors2.default.green(Y)} ${r}` : `${import_picocolors2.default.dim(K2)} ${import_picocolors2.default.dim(r)}`} ${import_picocolors2.default.dim("/")} ${this.value ? `${import_picocolors2.default.dim(K2)} ${import_picocolors2.default.dim(s)}` : `${import_picocolors2.default.green(Y)} ${s}`}
|
|
2300
|
-
${import_picocolors2.default.cyan(x2)}
|
|
2301
|
-
`;
|
|
2302
|
-
}
|
|
2303
|
-
} }).prompt();
|
|
2304
|
-
};
|
|
2305
|
-
var R2 = { message: (e = [], { symbol: r = import_picocolors2.default.gray(d), secondarySymbol: s = import_picocolors2.default.gray(d), output: i = process.stdout, spacing: n = 1, withGuide: l } = {}) => {
|
|
2306
|
-
let u = [], a = (l ?? _.withGuide) !== !1, o = a ? s : "", $ = a ? `${r} ` : "", y2 = a ? `${s} ` : "";
|
|
2307
|
-
for (let p = 0; p < n; p++) u.push(o);
|
|
2308
|
-
let E = Array.isArray(e) ? e : e.split(`
|
|
2309
|
-
`);
|
|
2310
|
-
if (E.length > 0) {
|
|
2311
|
-
let [p, ...f] = E;
|
|
2312
|
-
p.length > 0 ? u.push(`${$}${p}`) : u.push(a ? "" : r);
|
|
2313
|
-
for (let c of f) c.length > 0 ? u.push(`${y2}${c}`) : u.push(a ? "" : s);
|
|
2314
|
-
}
|
|
2315
|
-
i.write(`${u.join(`
|
|
2316
|
-
`)}
|
|
2317
|
-
`);
|
|
2318
|
-
}, info: (e, r) => {
|
|
2319
|
-
R2.message(e, { ...r, symbol: import_picocolors2.default.blue(ge) });
|
|
2320
|
-
}, success: (e, r) => {
|
|
2321
|
-
R2.message(e, { ...r, symbol: import_picocolors2.default.green(fe) });
|
|
2322
|
-
}, step: (e, r) => {
|
|
2323
|
-
R2.message(e, { ...r, symbol: import_picocolors2.default.green(j2) });
|
|
2324
|
-
}, warn: (e, r) => {
|
|
2325
|
-
R2.message(e, { ...r, symbol: import_picocolors2.default.yellow(Fe) });
|
|
2326
|
-
}, warning: (e, r) => {
|
|
2327
|
-
R2.warn(e, r);
|
|
2328
|
-
}, error: (e, r) => {
|
|
2329
|
-
R2.message(e, { ...r, symbol: import_picocolors2.default.red(ye) });
|
|
2330
|
-
} }, Nt = (e = "", r) => {
|
|
2331
|
-
(r?.output ?? process.stdout).write(`${import_picocolors2.default.gray(x2)} ${import_picocolors2.default.red(e)}
|
|
2332
|
-
|
|
2333
|
-
`);
|
|
2334
|
-
}, Pt = (e = "", r) => {
|
|
2335
|
-
(r?.output ?? process.stdout).write(`${import_picocolors2.default.gray($e)} ${e}
|
|
2336
|
-
`);
|
|
2337
|
-
}, Wt2 = (e = "", r) => {
|
|
2338
|
-
(r?.output ?? process.stdout).write(`${import_picocolors2.default.gray(d)}
|
|
2339
|
-
${import_picocolors2.default.gray(x2)} ${e}
|
|
2340
|
-
|
|
2341
|
-
`);
|
|
2342
|
-
}, Q2 = (e, r) => e.split(`
|
|
2343
|
-
`).map((s) => r(s)).join(`
|
|
2344
|
-
`), Lt2 = (e) => {
|
|
2345
|
-
let r = (i, n) => {
|
|
2346
|
-
let l = i.label ?? String(i.value);
|
|
2347
|
-
return n === "disabled" ? `${import_picocolors2.default.gray(z2)} ${Q2(l, import_picocolors2.default.gray)}${i.hint ? ` ${import_picocolors2.default.dim(`(${i.hint ?? "disabled"})`)}` : ""}` : n === "active" ? `${import_picocolors2.default.cyan(te)} ${l}${i.hint ? ` ${import_picocolors2.default.dim(`(${i.hint})`)}` : ""}` : n === "selected" ? `${import_picocolors2.default.green(V)} ${Q2(l, import_picocolors2.default.dim)}${i.hint ? ` ${import_picocolors2.default.dim(`(${i.hint})`)}` : ""}` : n === "cancelled" ? `${Q2(l, (u) => import_picocolors2.default.strikethrough(import_picocolors2.default.dim(u)))}` : n === "active-selected" ? `${import_picocolors2.default.green(V)} ${l}${i.hint ? ` ${import_picocolors2.default.dim(`(${i.hint})`)}` : ""}` : n === "submitted" ? `${Q2(l, import_picocolors2.default.dim)}` : `${import_picocolors2.default.dim(z2)} ${Q2(l, import_picocolors2.default.dim)}`;
|
|
2348
|
-
}, s = e.required ?? !0;
|
|
2349
|
-
return new Mt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValues: e.initialValues, required: s, cursorAt: e.cursorAt, validate(i) {
|
|
2350
|
-
if (s && (i === void 0 || i.length === 0)) return `Please select at least one option.
|
|
2351
|
-
${import_picocolors2.default.reset(import_picocolors2.default.dim(`Press ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" space ")))} to select, ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" enter ")))} to submit`))}`;
|
|
2352
|
-
}, render() {
|
|
2353
|
-
let i = Bt(e.output, e.message, `${Ee(this.state)} `, `${W2(this.state)} `), n = `${import_picocolors2.default.gray(d)}
|
|
2354
|
-
${i}
|
|
2355
|
-
`, l = this.value ?? [], u = (a, o) => {
|
|
2356
|
-
if (a.disabled) return r(a, "disabled");
|
|
2357
|
-
let $ = l.includes(a.value);
|
|
2358
|
-
return o && $ ? r(a, "active-selected") : $ ? r(a, "selected") : r(a, o ? "active" : "inactive");
|
|
2359
|
-
};
|
|
2360
|
-
switch (this.state) {
|
|
2361
|
-
case "submit": {
|
|
2362
|
-
let a = this.options.filter(({ value: $ }) => l.includes($)).map(($) => r($, "submitted")).join(import_picocolors2.default.dim(", ")) || import_picocolors2.default.dim("none"), o = Bt(e.output, a, `${import_picocolors2.default.gray(d)} `);
|
|
2363
|
-
return `${n}${o}`;
|
|
2364
|
-
}
|
|
2365
|
-
case "cancel": {
|
|
2366
|
-
let a = this.options.filter(({ value: $ }) => l.includes($)).map(($) => r($, "cancelled")).join(import_picocolors2.default.dim(", "));
|
|
2367
|
-
if (a.trim() === "") return `${n}${import_picocolors2.default.gray(d)}`;
|
|
2368
|
-
let o = Bt(e.output, a, `${import_picocolors2.default.gray(d)} `);
|
|
2369
|
-
return `${n}${o}
|
|
2370
|
-
${import_picocolors2.default.gray(d)}`;
|
|
2371
|
-
}
|
|
2372
|
-
case "error": {
|
|
2373
|
-
let a = `${import_picocolors2.default.yellow(d)} `, o = this.error.split(`
|
|
2374
|
-
`).map(($, y2) => y2 === 0 ? `${import_picocolors2.default.yellow(x2)} ${import_picocolors2.default.yellow($)}` : ` ${$}`).join(`
|
|
2375
|
-
`);
|
|
2376
|
-
return `${n}${a}${J2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: a.length, style: u }).join(`
|
|
2377
|
-
${a}`)}
|
|
2378
|
-
${o}
|
|
2379
|
-
`;
|
|
2380
|
-
}
|
|
2381
|
-
default: {
|
|
2382
|
-
let a = `${import_picocolors2.default.cyan(d)} `;
|
|
2383
|
-
return `${n}${a}${J2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: a.length, style: u }).join(`
|
|
2384
|
-
${a}`)}
|
|
2385
|
-
${import_picocolors2.default.cyan(x2)}
|
|
2386
|
-
`;
|
|
2387
|
-
}
|
|
2388
|
-
}
|
|
2389
|
-
} }).prompt();
|
|
2390
|
-
};
|
|
2391
|
-
var Ut = import_picocolors2.default.magenta, we = ({ indicator: e = "dots", onCancel: r, output: s = process.stdout, cancelMessage: i, errorMessage: n, frames: l = ee ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: u = ee ? 80 : 120, signal: a, ...o } = {}) => {
|
|
2392
|
-
let $ = ue(), y2, E, p = !1, f = !1, c = "", m, h = performance.now(), g = rt(s), F = o?.styleFrame ?? Ut, v = (w2) => {
|
|
2393
|
-
let O2 = w2 > 1 ? n ?? _.messages.error : i ?? _.messages.cancel;
|
|
2394
|
-
f = w2 === 1, p && (L2(O2, w2), f && typeof r == "function" && r());
|
|
2395
|
-
}, S2 = () => v(2), B = () => v(1), b = () => {
|
|
2396
|
-
process.on("uncaughtExceptionMonitor", S2), process.on("unhandledRejection", S2), process.on("SIGINT", B), process.on("SIGTERM", B), process.on("exit", v), a && a.addEventListener("abort", B);
|
|
2397
|
-
}, A = () => {
|
|
2398
|
-
process.removeListener("uncaughtExceptionMonitor", S2), process.removeListener("unhandledRejection", S2), process.removeListener("SIGINT", B), process.removeListener("SIGTERM", B), process.removeListener("exit", v), a && a.removeEventListener("abort", B);
|
|
2399
|
-
}, C = () => {
|
|
2400
|
-
if (m === void 0) return;
|
|
2401
|
-
$ && s.write(`
|
|
2402
|
-
`);
|
|
2403
|
-
let w2 = q2(m, g, { hard: !0, trim: !1 }).split(`
|
|
2404
|
-
`);
|
|
2405
|
-
w2.length > 1 && s.write(import_sisteransi2.cursor.up(w2.length - 1)), s.write(import_sisteransi2.cursor.to(0)), s.write(import_sisteransi2.erase.down());
|
|
2406
|
-
}, _2 = (w2) => w2.replace(/\.+$/, ""), D2 = (w2) => {
|
|
2407
|
-
let O2 = (performance.now() - w2) / 1e3, P2 = Math.floor(O2 / 60), G2 = Math.floor(O2 % 60);
|
|
2408
|
-
return P2 > 0 ? `[${P2}m ${G2}s]` : `[${G2}s]`;
|
|
2409
|
-
}, T2 = (w2 = "") => {
|
|
2410
|
-
p = !0, y2 = xt({ output: s }), c = _2(w2), h = performance.now(), s.write(`${import_picocolors2.default.gray(d)}
|
|
2411
|
-
`);
|
|
2412
|
-
let O2 = 0, P2 = 0;
|
|
2413
|
-
b(), E = setInterval(() => {
|
|
2414
|
-
if ($ && c === m) return;
|
|
2415
|
-
C(), m = c;
|
|
2416
|
-
let G2 = F(l[O2]), Z2;
|
|
2417
|
-
if ($) Z2 = `${G2} ${c}...`;
|
|
2418
|
-
else if (e === "timer") Z2 = `${G2} ${c} ${D2(h)}`;
|
|
2419
|
-
else {
|
|
2420
|
-
let Ze = ".".repeat(Math.floor(P2)).slice(0, 3);
|
|
2421
|
-
Z2 = `${G2} ${c}${Ze}`;
|
|
2422
|
-
}
|
|
2423
|
-
let Qe = q2(Z2, g, { hard: !0, trim: !1 });
|
|
2424
|
-
s.write(Qe), O2 = O2 + 1 < l.length ? O2 + 1 : 0, P2 = P2 < 4 ? P2 + 0.125 : 0;
|
|
2425
|
-
}, u);
|
|
2426
|
-
}, L2 = (w2 = "", O2 = 0) => {
|
|
2427
|
-
if (!p) return;
|
|
2428
|
-
p = !1, clearInterval(E), C();
|
|
2429
|
-
let P2 = O2 === 0 ? import_picocolors2.default.green(j2) : O2 === 1 ? import_picocolors2.default.red(ce) : import_picocolors2.default.red(de);
|
|
2430
|
-
c = w2 ?? c, e === "timer" ? s.write(`${P2} ${c} ${D2(h)}
|
|
2431
|
-
`) : s.write(`${P2} ${c}
|
|
2432
|
-
`), A(), y2();
|
|
2433
|
-
};
|
|
2434
|
-
return { start: T2, stop: (w2 = "") => L2(w2, 0), message: (w2 = "") => {
|
|
2435
|
-
c = _2(w2 ?? c);
|
|
2436
|
-
}, cancel: (w2 = "") => L2(w2, 1), error: (w2 = "") => L2(w2, 2), get isCancelled() {
|
|
2437
|
-
return f;
|
|
2438
|
-
} };
|
|
2439
|
-
}, Ye = { light: I2("\u2500", "-"), heavy: I2("\u2501", "="), block: I2("\u2588", "#") };
|
|
2440
|
-
var oe = (e, r) => e.includes(`
|
|
2441
|
-
`) ? e.split(`
|
|
2442
|
-
`).map((s) => r(s)).join(`
|
|
2443
|
-
`) : r(e), qt = (e) => {
|
|
2444
|
-
let r = (s, i) => {
|
|
2445
|
-
let n = s.label ?? String(s.value);
|
|
2446
|
-
switch (i) {
|
|
2447
|
-
case "disabled":
|
|
2448
|
-
return `${import_picocolors2.default.gray(K2)} ${oe(n, import_picocolors2.default.gray)}${s.hint ? ` ${import_picocolors2.default.dim(`(${s.hint ?? "disabled"})`)}` : ""}`;
|
|
2449
|
-
case "selected":
|
|
2450
|
-
return `${oe(n, import_picocolors2.default.dim)}`;
|
|
2451
|
-
case "active":
|
|
2452
|
-
return `${import_picocolors2.default.green(Y)} ${n}${s.hint ? ` ${import_picocolors2.default.dim(`(${s.hint})`)}` : ""}`;
|
|
2453
|
-
case "cancelled":
|
|
2454
|
-
return `${oe(n, (l) => import_picocolors2.default.strikethrough(import_picocolors2.default.dim(l)))}`;
|
|
2455
|
-
default:
|
|
2456
|
-
return `${import_picocolors2.default.dim(K2)} ${oe(n, import_picocolors2.default.dim)}`;
|
|
2457
|
-
}
|
|
2458
|
-
};
|
|
2459
|
-
return new Wt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
|
|
2460
|
-
let s = `${W2(this.state)} `, i = `${Ee(this.state)} `, n = Bt(e.output, e.message, i, s), l = `${import_picocolors2.default.gray(d)}
|
|
2461
|
-
${n}
|
|
2462
|
-
`;
|
|
2463
|
-
switch (this.state) {
|
|
2464
|
-
case "submit": {
|
|
2465
|
-
let u = `${import_picocolors2.default.gray(d)} `, a = Bt(e.output, r(this.options[this.cursor], "selected"), u);
|
|
2466
|
-
return `${l}${a}`;
|
|
2467
|
-
}
|
|
2468
|
-
case "cancel": {
|
|
2469
|
-
let u = `${import_picocolors2.default.gray(d)} `, a = Bt(e.output, r(this.options[this.cursor], "cancelled"), u);
|
|
2470
|
-
return `${l}${a}
|
|
2471
|
-
${import_picocolors2.default.gray(d)}`;
|
|
2472
|
-
}
|
|
2473
|
-
default: {
|
|
2474
|
-
let u = `${import_picocolors2.default.cyan(d)} `;
|
|
2475
|
-
return `${l}${u}${J2({ output: e.output, cursor: this.cursor, options: this.options, maxItems: e.maxItems, columnPadding: u.length, style: (a, o) => r(a, a.disabled ? "disabled" : o ? "active" : "inactive") }).join(`
|
|
2476
|
-
${u}`)}
|
|
2477
|
-
${import_picocolors2.default.cyan(x2)}
|
|
2478
|
-
`;
|
|
2479
|
-
}
|
|
2480
|
-
}
|
|
2481
|
-
} }).prompt();
|
|
2482
|
-
};
|
|
2483
|
-
var ze = `${import_picocolors2.default.gray(d)} `;
|
|
2484
|
-
var Yt = (e) => e.replace(/\x1b\[(?:\d+;)*\d*[ABCDEFGHfJKSTsu]|\x1b\[(s|u)/g, ""), zt = (e) => {
|
|
2485
|
-
let r = e.output ?? process.stdout, s = rt(r), i = import_picocolors2.default.gray(d), n = e.spacing ?? 1, l = 3, u = e.retainLog === !0, a = !ue() && Te(r);
|
|
2486
|
-
r.write(`${i}
|
|
2487
|
-
`), r.write(`${import_picocolors2.default.green(j2)} ${e.title}
|
|
2488
|
-
`);
|
|
2489
|
-
for (let h = 0; h < n; h++) r.write(`${i}
|
|
2490
|
-
`);
|
|
2491
|
-
let o = [{ value: "", full: "" }], $ = !1, y2 = (h) => {
|
|
2492
|
-
if (o.length === 0) return;
|
|
2493
|
-
let g = 0;
|
|
2494
|
-
h && (g += n + 2);
|
|
2495
|
-
for (let F of o) {
|
|
2496
|
-
let { value: v, result: S2 } = F, B = S2?.message ?? v;
|
|
2497
|
-
if (B.length === 0) continue;
|
|
2498
|
-
S2 === void 0 && F.header !== void 0 && F.header !== "" && (B += `
|
|
2499
|
-
${F.header}`);
|
|
2500
|
-
let b = B.split(`
|
|
2501
|
-
`).reduce((A, C) => C === "" ? A + 1 : A + Math.ceil((C.length + l) / s), 0);
|
|
2502
|
-
g += b;
|
|
2503
|
-
}
|
|
2504
|
-
g > 0 && (g += 1, r.write(import_sisteransi2.erase.lines(g)));
|
|
2505
|
-
}, E = (h, g, F) => {
|
|
2506
|
-
let v = F ? `${h.full}
|
|
2507
|
-
${h.value}` : h.value;
|
|
2508
|
-
h.header !== void 0 && h.header !== "" && R2.message(h.header.split(`
|
|
2509
|
-
`).map(import_picocolors2.default.bold), { output: r, secondarySymbol: i, symbol: i, spacing: 0 }), R2.message(v.split(`
|
|
2510
|
-
`).map(import_picocolors2.default.dim), { output: r, secondarySymbol: i, symbol: i, spacing: g ?? n });
|
|
2511
|
-
}, p = () => {
|
|
2512
|
-
for (let h of o) {
|
|
2513
|
-
let { header: g, value: F, full: v } = h;
|
|
2514
|
-
(g === void 0 || g.length === 0) && F.length === 0 || E(h, void 0, u === !0 && v.length > 0);
|
|
2515
|
-
}
|
|
2516
|
-
}, f = (h, g, F) => {
|
|
2517
|
-
if (y2(!1), (F?.raw !== !0 || !$) && h.value !== "" && (h.value += `
|
|
2518
|
-
`), h.value += Yt(g), $ = F?.raw === !0, e.limit !== void 0) {
|
|
2519
|
-
let v = h.value.split(`
|
|
2520
|
-
`), S2 = v.length - e.limit;
|
|
2521
|
-
if (S2 > 0) {
|
|
2522
|
-
let B = v.splice(0, S2);
|
|
2523
|
-
u && (h.full += (h.full === "" ? "" : `
|
|
2524
|
-
`) + B.join(`
|
|
2525
|
-
`));
|
|
2526
|
-
}
|
|
2527
|
-
h.value = v.join(`
|
|
2528
|
-
`);
|
|
2529
|
-
}
|
|
2530
|
-
a && c();
|
|
2531
|
-
}, c = () => {
|
|
2532
|
-
for (let h of o) h.result ? h.result.status === "error" ? R2.error(h.result.message, { output: r, secondarySymbol: i, spacing: 0 }) : R2.success(h.result.message, { output: r, secondarySymbol: i, spacing: 0 }) : h.value !== "" && E(h, 0);
|
|
2533
|
-
}, m = (h, g) => {
|
|
2534
|
-
y2(!1), h.result = g, a && c();
|
|
2535
|
-
};
|
|
2536
|
-
return { message(h, g) {
|
|
2537
|
-
f(o[0], h, g);
|
|
2538
|
-
}, group(h) {
|
|
2539
|
-
let g = { header: h, value: "", full: "" };
|
|
2540
|
-
return o.push(g), { message(F, v) {
|
|
2541
|
-
f(g, F, v);
|
|
2542
|
-
}, error(F) {
|
|
2543
|
-
m(g, { status: "error", message: F });
|
|
2544
|
-
}, success(F) {
|
|
2545
|
-
m(g, { status: "success", message: F });
|
|
2546
|
-
} };
|
|
2547
|
-
}, error(h, g) {
|
|
2548
|
-
y2(!0), R2.error(h, { output: r, secondarySymbol: i, spacing: 1 }), g?.showLog !== !1 && p(), o.splice(1, o.length - 1), o[0].value = "", o[0].full = "";
|
|
2549
|
-
}, success(h, g) {
|
|
2550
|
-
y2(!0), R2.success(h, { output: r, secondarySymbol: i, spacing: 1 }), g?.showLog === !0 && p(), o.splice(1, o.length - 1), o[0].value = "", o[0].full = "";
|
|
2551
|
-
} };
|
|
2552
|
-
}, Qt = (e) => new $t({ validate: e.validate, placeholder: e.placeholder, defaultValue: e.defaultValue, initialValue: e.initialValue, output: e.output, signal: e.signal, input: e.input, render() {
|
|
2553
|
-
let r = (e?.withGuide ?? _.withGuide) !== !1, s = `${`${r ? `${import_picocolors2.default.gray(d)}
|
|
2554
|
-
` : ""}${W2(this.state)} `}${e.message}
|
|
2555
|
-
`, i = e.placeholder ? import_picocolors2.default.inverse(e.placeholder[0]) + import_picocolors2.default.dim(e.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), n = this.userInput ? this.userInputWithCursor : i, l = this.value ?? "";
|
|
2556
|
-
switch (this.state) {
|
|
2557
|
-
case "error": {
|
|
2558
|
-
let u = this.error ? ` ${import_picocolors2.default.yellow(this.error)}` : "", a = r ? `${import_picocolors2.default.yellow(d)} ` : "", o = r ? import_picocolors2.default.yellow(x2) : "";
|
|
2559
|
-
return `${s.trim()}
|
|
2560
|
-
${a}${n}
|
|
2561
|
-
${o}${u}
|
|
2562
|
-
`;
|
|
2563
|
-
}
|
|
2564
|
-
case "submit": {
|
|
2565
|
-
let u = l ? ` ${import_picocolors2.default.dim(l)}` : "", a = r ? import_picocolors2.default.gray(d) : "";
|
|
2566
|
-
return `${s}${a}${u}`;
|
|
2567
|
-
}
|
|
2568
|
-
case "cancel": {
|
|
2569
|
-
let u = l ? ` ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(l))}` : "", a = r ? import_picocolors2.default.gray(d) : "";
|
|
2570
|
-
return `${s}${a}${u}${l.trim() ? `
|
|
2571
|
-
${a}` : ""}`;
|
|
2572
|
-
}
|
|
2573
|
-
default: {
|
|
2574
|
-
let u = r ? `${import_picocolors2.default.cyan(d)} ` : "", a = r ? import_picocolors2.default.cyan(x2) : "";
|
|
2575
|
-
return `${s}${u}${n}
|
|
2576
|
-
${a}
|
|
2577
|
-
`;
|
|
2578
|
-
}
|
|
2579
|
-
}
|
|
2580
|
-
} }).prompt();
|
|
2581
|
-
|
|
2582
|
-
// src/node-logger/prompts/prompt-config.ts
|
|
2583
|
-
var prompt_config_exports = {};
|
|
2584
|
-
__export(prompt_config_exports, {
|
|
2585
|
-
getPreferredStdio: () => getPreferredStdio,
|
|
2586
|
-
getPromptLibrary: () => getPromptLibrary,
|
|
2587
|
-
getPromptProvider: () => getPromptProvider,
|
|
2588
|
-
isClackEnabled: () => isClackEnabled,
|
|
2589
|
-
setPromptLibrary: () => setPromptLibrary
|
|
2590
|
-
});
|
|
2591
|
-
|
|
2592
|
-
// src/node-logger/prompts/prompt-provider-clack.ts
|
|
2593
|
-
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
|
2594
|
-
|
|
2595
|
-
// src/node-logger/logger/log-tracker.ts
|
|
2596
|
-
import { promises as fs } from "node:fs";
|
|
2597
|
-
import { join } from "node:path";
|
|
2598
|
-
import { stripVTControlCharacters } from "node:util";
|
|
2599
|
-
var DEBUG_LOG_FILE_NAME = "debug-storybook.log", DEFAULT_LOG_FILE_PATH = join(process.cwd(), DEBUG_LOG_FILE_NAME), LogTracker = class {
|
|
2600
|
-
/** Array to store log entries */
|
|
2601
|
-
#logs = [];
|
|
2602
|
-
/**
|
|
2603
|
-
* Flag indicating if logs should be written to file. It is enabled when users provide the
|
|
2604
|
-
* `--logfile` flag to a CLI command.
|
|
2605
|
-
*/
|
|
2606
|
-
#shouldWriteLogsToFile = !1;
|
|
2607
|
-
/** Enables writing logs to file. */
|
|
2608
|
-
enableLogWriting() {
|
|
2609
|
-
this.#shouldWriteLogsToFile = !0;
|
|
2610
|
-
}
|
|
2611
|
-
/** Returns whether logs should be written to file. */
|
|
2612
|
-
get shouldWriteLogsToFile() {
|
|
2613
|
-
return this.#shouldWriteLogsToFile;
|
|
2614
|
-
}
|
|
2615
|
-
/** Returns a copy of all stored logs. */
|
|
2616
|
-
get logs() {
|
|
2617
|
-
return [...this.#logs];
|
|
2618
|
-
}
|
|
2619
|
-
/**
|
|
2620
|
-
* Adds a new log entry.
|
|
2621
|
-
*
|
|
2622
|
-
* @param level - The log level
|
|
2623
|
-
* @param message - The log message
|
|
2624
|
-
* @param metadata - Optional metadata to attach to the log, can be any JSON serializable value
|
|
2625
|
-
*/
|
|
2626
|
-
addLog(level, message, metadata) {
|
|
2627
|
-
this.#logs.push({
|
|
2628
|
-
timestamp: /* @__PURE__ */ new Date(),
|
|
2629
|
-
level,
|
|
2630
|
-
message: stripVTControlCharacters(message),
|
|
2631
|
-
metadata
|
|
2632
|
-
});
|
|
2633
|
-
}
|
|
2634
|
-
/** Clears all stored logs. */
|
|
2635
|
-
clear() {
|
|
2636
|
-
this.#logs = [];
|
|
2637
|
-
}
|
|
2638
|
-
/**
|
|
2639
|
-
* Writes all stored logs to a file and clears the log store.
|
|
2640
|
-
*
|
|
2641
|
-
* @param filePath - Optional custom file path to write logs to
|
|
2642
|
-
* @returns The path where logs were written, by default is debug-storybook.log in current working
|
|
2643
|
-
* directory
|
|
2644
|
-
*/
|
|
2645
|
-
async writeToFile(filePath) {
|
|
2646
|
-
let logFilePath = typeof filePath == "string" ? filePath : DEFAULT_LOG_FILE_PATH, logContent = this.#logs.map((log2) => {
|
|
2647
|
-
let timestamp = log2.timestamp.toLocaleTimeString("en-US", { hour12: !1 }) + `.${log2.timestamp.getMilliseconds().toString().padStart(3, "0")}`, metadata = log2.metadata ? ` ${JSON.stringify(log2.metadata)}` : "";
|
|
2648
|
-
return `[${timestamp}] [${log2.level.toUpperCase()}] ${log2.message}${metadata}`;
|
|
2649
|
-
}).join(`
|
|
2650
|
-
`);
|
|
2651
|
-
return await fs.writeFile(logFilePath, logContent, "utf-8"), this.#logs = [], logFilePath;
|
|
2652
|
-
}
|
|
2653
|
-
}, logTracker = new LogTracker();
|
|
2654
|
-
|
|
2655
|
-
// src/node-logger/wrap-utils.ts
|
|
2656
|
-
import { stripVTControlCharacters as stripVTControlCharacters2 } from "node:util";
|
|
2657
|
-
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
2658
|
-
|
|
2659
|
-
// ../../node_modules/strip-ansi/node_modules/ansi-regex/index.js
|
|
2660
|
-
function ansiRegex({ onlyFirst = !1 } = {}) {
|
|
2661
|
-
let pattern = "(?:(?:\\u001B\\]|\\u009D)[^\\u0007\\u001B\\u009C\\u009D]*(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
2662
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
2663
|
-
}
|
|
2664
|
-
|
|
2665
|
-
// ../../node_modules/strip-ansi/index.js
|
|
2666
|
-
var regex = ansiRegex();
|
|
2667
|
-
function stripAnsi(string) {
|
|
2668
|
-
if (typeof string != "string")
|
|
2669
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
2670
|
-
return !string.includes("\x1B") && !string.includes("\x9B") ? string : string.replace(regex, "");
|
|
2671
|
-
}
|
|
2672
|
-
|
|
2673
|
-
// ../../node_modules/get-east-asian-width/lookup-data.js
|
|
2674
|
-
var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109], fullwidthMinimalCodePoint = 12288, fullwidthMaximumCodePoint = 65510, fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
|
|
2675
|
-
var wideMinimalCodePoint = 4352, wideMaximumCodePoint = 262141, wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101594, 101631, 101664, 101760, 101874, 101888, 102801, 102816, 102866, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110888, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110952, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127406, 127406, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128729, 128732, 128735, 128747, 128748, 128756, 128764, 128986, 128986, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129734, 129736, 129736, 129740, 129757, 129759, 129771, 129775, 129786, 131072, 196605, 196608, 262141];
|
|
2676
|
-
|
|
2677
|
-
// ../../node_modules/get-east-asian-width/utilities.js
|
|
2678
|
-
var isInRange = (ranges, codePoint) => {
|
|
2679
|
-
let low = 0, high = Math.floor(ranges.length / 2) - 1;
|
|
2680
|
-
for (; low <= high; ) {
|
|
2681
|
-
let mid = Math.floor((low + high) / 2), i = mid * 2;
|
|
2682
|
-
if (codePoint < ranges[i])
|
|
2683
|
-
high = mid - 1;
|
|
2684
|
-
else if (codePoint > ranges[i + 1])
|
|
2685
|
-
low = mid + 1;
|
|
2686
|
-
else
|
|
2687
|
-
return !0;
|
|
2688
|
-
}
|
|
2689
|
-
return !1;
|
|
2690
|
-
};
|
|
2691
|
-
|
|
2692
|
-
// ../../node_modules/get-east-asian-width/lookup.js
|
|
2693
|
-
var commonCjkCodePoint = 19968, [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
|
|
2694
|
-
function findWideFastPathRange(ranges) {
|
|
2695
|
-
let fastPathStart = ranges[0], fastPathEnd = ranges[1];
|
|
2696
|
-
for (let index = 0; index < ranges.length; index += 2) {
|
|
2697
|
-
let start = ranges[index], end = ranges[index + 1];
|
|
2698
|
-
if (commonCjkCodePoint >= start && commonCjkCodePoint <= end)
|
|
2699
|
-
return [start, end];
|
|
2700
|
-
end - start > fastPathEnd - fastPathStart && (fastPathStart = start, fastPathEnd = end);
|
|
2701
|
-
}
|
|
2702
|
-
return [fastPathStart, fastPathEnd];
|
|
2703
|
-
}
|
|
2704
|
-
var isAmbiguous = (codePoint) => codePoint < 161 || codePoint > 1114109 ? !1 : isInRange(ambiguousRanges, codePoint), isFullwidth = (codePoint) => codePoint < fullwidthMinimalCodePoint || codePoint > fullwidthMaximumCodePoint ? !1 : isInRange(fullwidthRanges, codePoint);
|
|
2705
|
-
var isWide = (codePoint) => codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd ? !0 : codePoint < wideMinimalCodePoint || codePoint > wideMaximumCodePoint ? !1 : isInRange(wideRanges, codePoint);
|
|
2706
|
-
|
|
2707
|
-
// ../../node_modules/get-east-asian-width/index.js
|
|
2708
|
-
function validate(codePoint) {
|
|
2709
|
-
if (!Number.isSafeInteger(codePoint))
|
|
2710
|
-
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
2711
|
-
}
|
|
2712
|
-
function eastAsianWidth(codePoint, { ambiguousAsWide = !1 } = {}) {
|
|
2713
|
-
return validate(codePoint), isFullwidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint) ? 2 : 1;
|
|
2714
|
-
}
|
|
2715
|
-
|
|
2716
|
-
// ../../node_modules/string-width/index.js
|
|
2717
|
-
var import_emoji_regex = __toESM(require_emoji_regex3(), 1), segmenter = new Intl.Segmenter(), defaultIgnorableCodePointRegex = new RegExp("^\\p{Default_Ignorable_Code_Point}$", "u");
|
|
2718
|
-
function stringWidth(string, options = {}) {
|
|
2719
|
-
if (typeof string != "string" || string.length === 0)
|
|
2720
|
-
return 0;
|
|
2721
|
-
let {
|
|
2722
|
-
ambiguousIsNarrow = !0,
|
|
2723
|
-
countAnsiEscapeCodes = !1
|
|
2724
|
-
} = options;
|
|
2725
|
-
if (countAnsiEscapeCodes || (string = stripAnsi(string)), string.length === 0)
|
|
2726
|
-
return 0;
|
|
2727
|
-
let width = 0, eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
2728
|
-
for (let { segment: character } of segmenter.segment(string)) {
|
|
2729
|
-
let codePoint = character.codePointAt(0);
|
|
2730
|
-
if (!(codePoint <= 31 || codePoint >= 127 && codePoint <= 159) && !(codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) && !(codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) && !(codePoint >= 55296 && codePoint <= 57343) && !(codePoint >= 65024 && codePoint <= 65039) && !defaultIgnorableCodePointRegex.test(character)) {
|
|
2731
|
-
if ((0, import_emoji_regex.default)().test(character)) {
|
|
2732
|
-
width += 2;
|
|
2733
|
-
continue;
|
|
2734
|
-
}
|
|
2735
|
-
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
2736
|
-
}
|
|
2737
|
-
}
|
|
2738
|
-
return width;
|
|
2739
|
-
}
|
|
2740
|
-
|
|
2741
|
-
// ../../node_modules/ansi-styles/index.js
|
|
2742
|
-
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`, wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`, styles = {
|
|
2743
|
-
modifier: {
|
|
2744
|
-
reset: [0, 0],
|
|
2745
|
-
// 21 isn't widely supported and 22 does the same thing
|
|
2746
|
-
bold: [1, 22],
|
|
2747
|
-
dim: [2, 22],
|
|
2748
|
-
italic: [3, 23],
|
|
2749
|
-
underline: [4, 24],
|
|
2750
|
-
overline: [53, 55],
|
|
2751
|
-
inverse: [7, 27],
|
|
2752
|
-
hidden: [8, 28],
|
|
2753
|
-
strikethrough: [9, 29]
|
|
2754
|
-
},
|
|
2755
|
-
color: {
|
|
2756
|
-
black: [30, 39],
|
|
2757
|
-
red: [31, 39],
|
|
2758
|
-
green: [32, 39],
|
|
2759
|
-
yellow: [33, 39],
|
|
2760
|
-
blue: [34, 39],
|
|
2761
|
-
magenta: [35, 39],
|
|
2762
|
-
cyan: [36, 39],
|
|
2763
|
-
white: [37, 39],
|
|
2764
|
-
// Bright color
|
|
2765
|
-
blackBright: [90, 39],
|
|
2766
|
-
gray: [90, 39],
|
|
2767
|
-
// Alias of `blackBright`
|
|
2768
|
-
grey: [90, 39],
|
|
2769
|
-
// Alias of `blackBright`
|
|
2770
|
-
redBright: [91, 39],
|
|
2771
|
-
greenBright: [92, 39],
|
|
2772
|
-
yellowBright: [93, 39],
|
|
2773
|
-
blueBright: [94, 39],
|
|
2774
|
-
magentaBright: [95, 39],
|
|
2775
|
-
cyanBright: [96, 39],
|
|
2776
|
-
whiteBright: [97, 39]
|
|
2777
|
-
},
|
|
2778
|
-
bgColor: {
|
|
2779
|
-
bgBlack: [40, 49],
|
|
2780
|
-
bgRed: [41, 49],
|
|
2781
|
-
bgGreen: [42, 49],
|
|
2782
|
-
bgYellow: [43, 49],
|
|
2783
|
-
bgBlue: [44, 49],
|
|
2784
|
-
bgMagenta: [45, 49],
|
|
2785
|
-
bgCyan: [46, 49],
|
|
2786
|
-
bgWhite: [47, 49],
|
|
2787
|
-
// Bright color
|
|
2788
|
-
bgBlackBright: [100, 49],
|
|
2789
|
-
bgGray: [100, 49],
|
|
2790
|
-
// Alias of `bgBlackBright`
|
|
2791
|
-
bgGrey: [100, 49],
|
|
2792
|
-
// Alias of `bgBlackBright`
|
|
2793
|
-
bgRedBright: [101, 49],
|
|
2794
|
-
bgGreenBright: [102, 49],
|
|
2795
|
-
bgYellowBright: [103, 49],
|
|
2796
|
-
bgBlueBright: [104, 49],
|
|
2797
|
-
bgMagentaBright: [105, 49],
|
|
2798
|
-
bgCyanBright: [106, 49],
|
|
2799
|
-
bgWhiteBright: [107, 49]
|
|
2800
|
-
}
|
|
2801
|
-
}, modifierNames = Object.keys(styles.modifier), foregroundColorNames = Object.keys(styles.color), backgroundColorNames = Object.keys(styles.bgColor), colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
2802
|
-
function assembleStyles() {
|
|
2803
|
-
let codes = /* @__PURE__ */ new Map();
|
|
2804
|
-
for (let [groupName, group] of Object.entries(styles)) {
|
|
2805
|
-
for (let [styleName, style] of Object.entries(group))
|
|
2806
|
-
styles[styleName] = {
|
|
2807
|
-
open: `\x1B[${style[0]}m`,
|
|
2808
|
-
close: `\x1B[${style[1]}m`
|
|
2809
|
-
}, group[styleName] = styles[styleName], codes.set(style[0], style[1]);
|
|
2810
|
-
Object.defineProperty(styles, groupName, {
|
|
2811
|
-
value: group,
|
|
2812
|
-
enumerable: !1
|
|
2813
|
-
});
|
|
2814
|
-
}
|
|
2815
|
-
return Object.defineProperty(styles, "codes", {
|
|
2816
|
-
value: codes,
|
|
2817
|
-
enumerable: !1
|
|
2818
|
-
}), styles.color.close = "\x1B[39m", styles.bgColor.close = "\x1B[49m", styles.color.ansi = wrapAnsi16(), styles.color.ansi256 = wrapAnsi256(), styles.color.ansi16m = wrapAnsi16m(), styles.bgColor.ansi = wrapAnsi16(10), styles.bgColor.ansi256 = wrapAnsi256(10), styles.bgColor.ansi16m = wrapAnsi16m(10), Object.defineProperties(styles, {
|
|
2819
|
-
rgbToAnsi256: {
|
|
2820
|
-
value(red, green, blue) {
|
|
2821
|
-
return red === green && green === blue ? red < 8 ? 16 : red > 248 ? 231 : Math.round((red - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
2822
|
-
},
|
|
2823
|
-
enumerable: !1
|
|
2824
|
-
},
|
|
2825
|
-
hexToRgb: {
|
|
2826
|
-
value(hex2) {
|
|
2827
|
-
let matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex2.toString(16));
|
|
2828
|
-
if (!matches)
|
|
2829
|
-
return [0, 0, 0];
|
|
2830
|
-
let [colorString] = matches;
|
|
2831
|
-
colorString.length === 3 && (colorString = [...colorString].map((character) => character + character).join(""));
|
|
2832
|
-
let integer = Number.parseInt(colorString, 16);
|
|
2833
|
-
return [
|
|
2834
|
-
/* eslint-disable no-bitwise */
|
|
2835
|
-
integer >> 16 & 255,
|
|
2836
|
-
integer >> 8 & 255,
|
|
2837
|
-
integer & 255
|
|
2838
|
-
/* eslint-enable no-bitwise */
|
|
2839
|
-
];
|
|
2840
|
-
},
|
|
2841
|
-
enumerable: !1
|
|
2842
|
-
},
|
|
2843
|
-
hexToAnsi256: {
|
|
2844
|
-
value: (hex2) => styles.rgbToAnsi256(...styles.hexToRgb(hex2)),
|
|
2845
|
-
enumerable: !1
|
|
2846
|
-
},
|
|
2847
|
-
ansi256ToAnsi: {
|
|
2848
|
-
value(code) {
|
|
2849
|
-
if (code < 8)
|
|
2850
|
-
return 30 + code;
|
|
2851
|
-
if (code < 16)
|
|
2852
|
-
return 90 + (code - 8);
|
|
2853
|
-
let red, green, blue;
|
|
2854
|
-
if (code >= 232)
|
|
2855
|
-
red = ((code - 232) * 10 + 8) / 255, green = red, blue = red;
|
|
2856
|
-
else {
|
|
2857
|
-
code -= 16;
|
|
2858
|
-
let remainder = code % 36;
|
|
2859
|
-
red = Math.floor(code / 36) / 5, green = Math.floor(remainder / 6) / 5, blue = remainder % 6 / 5;
|
|
2860
|
-
}
|
|
2861
|
-
let value = Math.max(red, green, blue) * 2;
|
|
2862
|
-
if (value === 0)
|
|
2863
|
-
return 30;
|
|
2864
|
-
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
2865
|
-
return value === 2 && (result += 60), result;
|
|
2866
|
-
},
|
|
2867
|
-
enumerable: !1
|
|
2868
|
-
},
|
|
2869
|
-
rgbToAnsi: {
|
|
2870
|
-
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
2871
|
-
enumerable: !1
|
|
2872
|
-
},
|
|
2873
|
-
hexToAnsi: {
|
|
2874
|
-
value: (hex2) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex2)),
|
|
2875
|
-
enumerable: !1
|
|
2876
|
-
}
|
|
2877
|
-
}), styles;
|
|
2878
|
-
}
|
|
2879
|
-
var ansiStyles = assembleStyles(), ansi_styles_default = ansiStyles;
|
|
2880
|
-
|
|
2881
|
-
// ../../node_modules/wrap-ansi/index.js
|
|
2882
|
-
var ESCAPES = /* @__PURE__ */ new Set([
|
|
2883
|
-
"\x1B",
|
|
2884
|
-
"\x9B"
|
|
2885
|
-
]), END_CODE = 39, ANSI_ESCAPE_BELL = "\x07", ANSI_CSI = "[", ANSI_OSC = "]", ANSI_SGR_TERMINATOR = "m", ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`, wrapAnsiCode = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`, wrapAnsiHyperlink = (url) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`, wordLengths = (string) => string.split(" ").map((character) => stringWidth(character)), wrapWord = (rows, word, columns) => {
|
|
2886
|
-
let characters = [...word], isInsideEscape = !1, isInsideLinkEscape = !1, visible = stringWidth(stripAnsi(rows.at(-1)));
|
|
2887
|
-
for (let [index, character] of characters.entries()) {
|
|
2888
|
-
let characterLength = stringWidth(character);
|
|
2889
|
-
if (visible + characterLength <= columns ? rows[rows.length - 1] += character : (rows.push(character), visible = 0), ESCAPES.has(character) && (isInsideEscape = !0, isInsideLinkEscape = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("") === ANSI_ESCAPE_LINK), isInsideEscape) {
|
|
2890
|
-
isInsideLinkEscape ? character === ANSI_ESCAPE_BELL && (isInsideEscape = !1, isInsideLinkEscape = !1) : character === ANSI_SGR_TERMINATOR && (isInsideEscape = !1);
|
|
2891
|
-
continue;
|
|
2892
|
-
}
|
|
2893
|
-
visible += characterLength, visible === columns && index < characters.length - 1 && (rows.push(""), visible = 0);
|
|
2894
|
-
}
|
|
2895
|
-
!visible && rows.at(-1).length > 0 && rows.length > 1 && (rows[rows.length - 2] += rows.pop());
|
|
2896
|
-
}, stringVisibleTrimSpacesRight = (string) => {
|
|
2897
|
-
let words = string.split(" "), last = words.length;
|
|
2898
|
-
for (; last > 0 && !(stringWidth(words[last - 1]) > 0); )
|
|
2899
|
-
last--;
|
|
2900
|
-
return last === words.length ? string : words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
2901
|
-
}, exec = (string, columns, options = {}) => {
|
|
2902
|
-
if (options.trim !== !1 && string.trim() === "")
|
|
2903
|
-
return "";
|
|
2904
|
-
let returnValue = "", escapeCode, escapeUrl, lengths = wordLengths(string), rows = [""];
|
|
2905
|
-
for (let [index, word] of string.split(" ").entries()) {
|
|
2906
|
-
options.trim !== !1 && (rows[rows.length - 1] = rows.at(-1).trimStart());
|
|
2907
|
-
let rowLength = stringWidth(rows.at(-1));
|
|
2908
|
-
if (index !== 0 && (rowLength >= columns && (options.wordWrap === !1 || options.trim === !1) && (rows.push(""), rowLength = 0), (rowLength > 0 || options.trim === !1) && (rows[rows.length - 1] += " ", rowLength++)), options.hard && lengths[index] > columns) {
|
|
2909
|
-
let remainingColumns = columns - rowLength, breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
2910
|
-
Math.floor((lengths[index] - 1) / columns) < breaksStartingThisLine && rows.push(""), wrapWord(rows, word, columns);
|
|
2911
|
-
continue;
|
|
2912
|
-
}
|
|
2913
|
-
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
2914
|
-
if (options.wordWrap === !1 && rowLength < columns) {
|
|
2915
|
-
wrapWord(rows, word, columns);
|
|
2916
|
-
continue;
|
|
2917
|
-
}
|
|
2918
|
-
rows.push("");
|
|
2919
|
-
}
|
|
2920
|
-
if (rowLength + lengths[index] > columns && options.wordWrap === !1) {
|
|
2921
|
-
wrapWord(rows, word, columns);
|
|
2922
|
-
continue;
|
|
2923
|
-
}
|
|
2924
|
-
rows[rows.length - 1] += word;
|
|
2925
|
-
}
|
|
2926
|
-
options.trim !== !1 && (rows = rows.map((row) => stringVisibleTrimSpacesRight(row)));
|
|
2927
|
-
let preString = rows.join(`
|
|
2928
|
-
`), pre = [...preString], preStringIndex = 0;
|
|
2929
|
-
for (let [index, character] of pre.entries()) {
|
|
2930
|
-
if (returnValue += character, ESCAPES.has(character)) {
|
|
2931
|
-
let { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || { groups: {} };
|
|
2932
|
-
if (groups.code !== void 0) {
|
|
2933
|
-
let code2 = Number.parseFloat(groups.code);
|
|
2934
|
-
escapeCode = code2 === END_CODE ? void 0 : code2;
|
|
2935
|
-
} else groups.uri !== void 0 && (escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri);
|
|
2936
|
-
}
|
|
2937
|
-
let code = ansi_styles_default.codes.get(Number(escapeCode));
|
|
2938
|
-
pre[index + 1] === `
|
|
2939
|
-
` ? (escapeUrl && (returnValue += wrapAnsiHyperlink("")), escapeCode && code && (returnValue += wrapAnsiCode(code))) : character === `
|
|
2940
|
-
` && (escapeCode && code && (returnValue += wrapAnsiCode(escapeCode)), escapeUrl && (returnValue += wrapAnsiHyperlink(escapeUrl))), preStringIndex += character.length;
|
|
2941
|
-
}
|
|
2942
|
-
return returnValue;
|
|
2943
|
-
};
|
|
2944
|
-
function wrapAnsi(string, columns, options) {
|
|
2945
|
-
return String(string).normalize().replaceAll(`\r
|
|
2946
|
-
`, `
|
|
2947
|
-
`).split(`
|
|
2948
|
-
`).map((line) => exec(line, columns, options)).join(`
|
|
2949
|
-
`);
|
|
2950
|
-
}
|
|
2951
|
-
|
|
2952
|
-
// src/node-logger/wrap-utils.ts
|
|
2953
|
-
function getTerminalWidth() {
|
|
2954
|
-
try {
|
|
2955
|
-
return process.stdout.columns > 0 ? process.stdout.columns : 80;
|
|
2956
|
-
} catch {
|
|
2957
|
-
return 80;
|
|
2958
|
-
}
|
|
2959
|
-
}
|
|
2960
|
-
var URL_REGEX = /(https?:\/\/[^\s\u0000-\u001F\u007F]+)/g;
|
|
2961
|
-
function getVisibleLength(str) {
|
|
2962
|
-
return stripVTControlCharacters2(str).length;
|
|
2963
|
-
}
|
|
2964
|
-
function getEnvFromTerminal(key) {
|
|
2965
|
-
return (process.env[key] || "").trim();
|
|
2966
|
-
}
|
|
2967
|
-
function supportsHyperlinks() {
|
|
2968
|
-
try {
|
|
2969
|
-
let termProgram = getEnvFromTerminal("TERM_PROGRAM"), termProgramVersion = getEnvFromTerminal("TERM_PROGRAM_VERSION");
|
|
2970
|
-
switch (termProgram) {
|
|
2971
|
-
case "iTerm.app":
|
|
2972
|
-
if (termProgramVersion.trim()) {
|
|
2973
|
-
let version = termProgramVersion.trim().split(".").map(Number);
|
|
2974
|
-
return version[0] > 3 || version[0] === 3 && version[1] >= 1;
|
|
2975
|
-
}
|
|
2976
|
-
return !0;
|
|
2977
|
-
// Assume recent version
|
|
2978
|
-
case "Apple_Terminal":
|
|
2979
|
-
return !1;
|
|
2980
|
-
default:
|
|
2981
|
-
return !0;
|
|
2982
|
-
}
|
|
2983
|
-
} catch {
|
|
2984
|
-
return !1;
|
|
2985
|
-
}
|
|
2986
|
-
}
|
|
2987
|
-
function protectUrls(text2, options) {
|
|
2988
|
-
let defaultMaxUrlLength = Math.floor(getTerminalWidth() * 0.8), maxLineWidth = options?.maxLineWidth ?? getTerminalWidth(), useHyperlinks = supportsHyperlinks();
|
|
2989
|
-
return text2.replace(URL_REGEX, (match, capturedUrl, offset) => {
|
|
2990
|
-
if (!useHyperlinks)
|
|
2991
|
-
return match;
|
|
2992
|
-
let searchPos = 0;
|
|
2993
|
-
for (; ; ) {
|
|
2994
|
-
let hyperlinkStart = text2.indexOf("\x1B]8;;", searchPos);
|
|
2995
|
-
if (hyperlinkStart === -1)
|
|
2996
|
-
break;
|
|
2997
|
-
let hyperlinkEnd = text2.indexOf("\x1B]8;;\x07", hyperlinkStart);
|
|
2998
|
-
if (hyperlinkEnd === -1) {
|
|
2999
|
-
searchPos = hyperlinkStart + 1;
|
|
3000
|
-
continue;
|
|
3001
|
-
}
|
|
3002
|
-
if (offset >= hyperlinkStart && offset < hyperlinkEnd + 7)
|
|
3003
|
-
return match;
|
|
3004
|
-
searchPos = hyperlinkEnd + 1;
|
|
3005
|
-
}
|
|
3006
|
-
let textBeforeUrl = text2.substring(0, offset), lastNewlineIndex = textBeforeUrl.lastIndexOf(`
|
|
3007
|
-
`), currentLinePrefix = lastNewlineIndex === -1 ? textBeforeUrl : textBeforeUrl.substring(lastNewlineIndex + 1), prefixLength = getVisibleLength(currentLinePrefix), availableSpace = maxLineWidth - prefixLength, minUrlLength = 20, configuredMax = options?.maxUrlLength ?? defaultMaxUrlLength, effectiveMaxLength = Math.min(configuredMax, defaultMaxUrlLength, availableSpace);
|
|
3008
|
-
if ((capturedUrl.length <= minUrlLength || effectiveMaxLength < minUrlLength) && (effectiveMaxLength = capturedUrl.length), capturedUrl.length > effectiveMaxLength) {
|
|
3009
|
-
let truncatedText = capturedUrl.substring(0, effectiveMaxLength - 3) + "...";
|
|
3010
|
-
return `\x1B]8;;${capturedUrl}\x07${truncatedText}\x1B]8;;\x07`;
|
|
3011
|
-
}
|
|
3012
|
-
return `\x1B]8;;${capturedUrl}\x07${capturedUrl}\x1B]8;;\x07`;
|
|
3013
|
-
});
|
|
3014
|
-
}
|
|
3015
|
-
function createHyperlink(title, url) {
|
|
3016
|
-
return supportsHyperlinks() ? `\x1B]8;;${url}\x07${title}\x1B]8;;\x07` : `${title}: ${url}`;
|
|
3017
|
-
}
|
|
3018
|
-
function splitTextPreservingUrls(text2) {
|
|
3019
|
-
let parts = [], lastIndex = 0, match;
|
|
3020
|
-
for (URL_REGEX.lastIndex = 0; (match = URL_REGEX.exec(text2)) !== null; ) {
|
|
3021
|
-
if (match.index > lastIndex) {
|
|
3022
|
-
let beforeUrl = text2.slice(lastIndex, match.index);
|
|
3023
|
-
parts.push(...beforeUrl.split(" ").filter((part) => part.length > 0));
|
|
3024
|
-
}
|
|
3025
|
-
parts.push(match[0]), lastIndex = match.index + match[0].length;
|
|
3026
|
-
}
|
|
3027
|
-
if (lastIndex < text2.length) {
|
|
3028
|
-
let remaining = text2.slice(lastIndex);
|
|
3029
|
-
parts.push(...remaining.split(" ").filter((part) => part.length > 0));
|
|
3030
|
-
}
|
|
3031
|
-
return parts;
|
|
3032
|
-
}
|
|
3033
|
-
var MAX_OPTIMAL_WIDTH = 80;
|
|
3034
|
-
function getOptimalWidth(width) {
|
|
3035
|
-
return Math.min(width, MAX_OPTIMAL_WIDTH);
|
|
3036
|
-
}
|
|
3037
|
-
function wrapTextForClack(text2, width) {
|
|
3038
|
-
let terminalWidth = width || getTerminalWidth(), contentWidth = Math.max(terminalWidth - 10, 40), maxOptimalWidth = getOptimalWidth(contentWidth), protectedText = protectUrls(text2, { maxLineWidth: maxOptimalWidth });
|
|
3039
|
-
return wrapAnsi(protectedText, maxOptimalWidth);
|
|
3040
|
-
}
|
|
3041
|
-
function wrapTextForClackHint(text2, width, label, _indentSpaces = 4) {
|
|
3042
|
-
let terminalWidth = width || getTerminalWidth(), reservedSpaceFirstLine = 8 + (label ? getVisibleLength(label) : 0), firstLineWidth = Math.min(
|
|
3043
|
-
MAX_OPTIMAL_WIDTH - reservedSpaceFirstLine,
|
|
3044
|
-
Math.max(terminalWidth - reservedSpaceFirstLine, 30)
|
|
3045
|
-
), indentSpaces = _indentSpaces, continuationLineWidth = getOptimalWidth(Math.max(terminalWidth - indentSpaces, 30)), protectedText = protectUrls(text2, { maxLineWidth: continuationLineWidth }), initialWrap = wrapAnsi(protectedText, continuationLineWidth), lines = initialWrap.split(`
|
|
3046
|
-
`);
|
|
3047
|
-
if (lines.length > 0 && getVisibleLength(lines[0]) > firstLineWidth) {
|
|
3048
|
-
let words = splitTextPreservingUrls(text2), firstLinePart = "", remainingPart = "";
|
|
3049
|
-
for (let i = 0; i < words.length; i++) {
|
|
3050
|
-
let testLine = i === 0 ? words[i] : firstLinePart + " " + words[i];
|
|
3051
|
-
if (getVisibleLength(testLine) <= firstLineWidth)
|
|
3052
|
-
firstLinePart = testLine;
|
|
3053
|
-
else {
|
|
3054
|
-
remainingPart = words.slice(i).join(" ");
|
|
3055
|
-
break;
|
|
3056
|
-
}
|
|
3057
|
-
}
|
|
3058
|
-
!firstLinePart && words.length > 0 && (firstLinePart = words[0], remainingPart = words.slice(1).join(" "));
|
|
3059
|
-
let finalLines = [firstLinePart];
|
|
3060
|
-
if (remainingPart.trim()) {
|
|
3061
|
-
let protectedRemainder = protectUrls(remainingPart.trim(), {
|
|
3062
|
-
maxLineWidth: continuationLineWidth
|
|
3063
|
-
}), wrappedRemainder = wrapAnsi(protectedRemainder, continuationLineWidth);
|
|
3064
|
-
finalLines = finalLines.concat(wrappedRemainder.split(`
|
|
3065
|
-
`));
|
|
3066
|
-
}
|
|
3067
|
-
if (finalLines.length <= 1)
|
|
3068
|
-
return finalLines[0] || "";
|
|
3069
|
-
let indentation2 = indentSpaces > 0 ? (0, import_picocolors3.reset)((0, import_picocolors3.cyan)(d)) + " ".repeat(indentSpaces) : "";
|
|
3070
|
-
return finalLines.map((line, index) => index === 0 ? line : `${indentation2}${(0, import_picocolors3.dim)(line)}`).join(`
|
|
3071
|
-
`);
|
|
3072
|
-
}
|
|
3073
|
-
if (lines.length <= 1)
|
|
3074
|
-
return initialWrap;
|
|
3075
|
-
let indentation = (0, import_picocolors3.reset)((0, import_picocolors3.cyan)(d)) + " ".repeat(indentSpaces);
|
|
3076
|
-
return lines.map((line, index) => index === 0 ? line : `${indentation}${(0, import_picocolors3.dim)(line)}`).join(`
|
|
3077
|
-
`);
|
|
3078
|
-
}
|
|
3079
|
-
|
|
3080
|
-
// src/node-logger/prompts/prompt-provider-base.ts
|
|
3081
|
-
var PromptProvider = class {
|
|
3082
|
-
};
|
|
3083
|
-
|
|
3084
|
-
// src/node-logger/prompts/prompt-provider-clack.ts
|
|
3085
|
-
var getCurrentTaskLog = () => globalThis.FORKBOOK_CURRENT_TASK_LOG ? globalThis.FORKBOOK_CURRENT_TASK_LOG[globalThis.FORKBOOK_CURRENT_TASK_LOG.length - 1] : null, setCurrentTaskLog = (taskLog2) => {
|
|
3086
|
-
globalThis.FORKBOOK_CURRENT_TASK_LOG = [...globalThis.FORKBOOK_CURRENT_TASK_LOG || [], taskLog2];
|
|
3087
|
-
}, clearCurrentTaskLog = () => {
|
|
3088
|
-
globalThis.FORKBOOK_CURRENT_TASK_LOG && globalThis.FORKBOOK_CURRENT_TASK_LOG.pop();
|
|
3089
|
-
}, formatTaskLogMessage = (message) => {
|
|
3090
|
-
let columns = process.stdout.columns || 80, rows = (length) => Math.ceil((length + 3) / columns);
|
|
3091
|
-
return message.split(`
|
|
3092
|
-
`).map((line) => {
|
|
3093
|
-
let plain = stripVTControlCharacters3(line);
|
|
3094
|
-
return rows(line.length) === rows(plain.length) ? line : plain;
|
|
3095
|
-
}).join(`
|
|
3096
|
-
`);
|
|
3097
|
-
}, ClackPromptProvider = class extends PromptProvider {
|
|
3098
|
-
async handleCancel(result, promptOptions) {
|
|
3099
|
-
Ct(result) && (promptOptions?.onCancel ? await promptOptions.onCancel() : (Nt("Operation canceled."), process.exit(0)));
|
|
3100
|
-
}
|
|
3101
|
-
async text(options, promptOptions) {
|
|
3102
|
-
let result = await Qt(options);
|
|
3103
|
-
return await this.handleCancel(result, promptOptions), logTracker.addLog("prompt", options.message, { choice: result }), result.toString();
|
|
3104
|
-
}
|
|
3105
|
-
async confirm(options, promptOptions) {
|
|
3106
|
-
let result = await Mt2({
|
|
3107
|
-
...options,
|
|
3108
|
-
message: wrapTextForClackHint(options.message, void 0, void 0, 2)
|
|
3109
|
-
});
|
|
3110
|
-
return await this.handleCancel(result, promptOptions), logTracker.addLog("prompt", options.message, { choice: result }), !!result;
|
|
3111
|
-
}
|
|
3112
|
-
async select(options, promptOptions) {
|
|
3113
|
-
let result = await qt({
|
|
3114
|
-
...options,
|
|
3115
|
-
message: wrapTextForClackHint(options.message, void 0, void 0, 2)
|
|
3116
|
-
});
|
|
3117
|
-
return await this.handleCancel(result, promptOptions), logTracker.addLog("prompt", options.message, { choice: result }), result;
|
|
3118
|
-
}
|
|
3119
|
-
async multiselect(options, promptOptions) {
|
|
3120
|
-
let result = await Lt2({
|
|
3121
|
-
...options,
|
|
3122
|
-
required: options.required
|
|
3123
|
-
});
|
|
3124
|
-
return await this.handleCancel(result, promptOptions), logTracker.addLog("prompt", options.message, { choice: result }), result;
|
|
3125
|
-
}
|
|
3126
|
-
spinner(options) {
|
|
3127
|
-
let task = we(), spinnerId = `${options.id}-spinner`;
|
|
3128
|
-
return {
|
|
3129
|
-
start: (message) => {
|
|
3130
|
-
logTracker.addLog("info", `${spinnerId}-start: ${message}`), task.start(message);
|
|
3131
|
-
},
|
|
3132
|
-
message: (message) => {
|
|
3133
|
-
logTracker.addLog("info", `${spinnerId}: ${message}`), task.message(message);
|
|
3134
|
-
},
|
|
3135
|
-
stop: (message) => {
|
|
3136
|
-
logTracker.addLog("info", `${spinnerId}-stop: ${message}`), task.stop(message);
|
|
3137
|
-
},
|
|
3138
|
-
cancel: (message) => {
|
|
3139
|
-
logTracker.addLog("info", `${spinnerId}-cancel: ${message}`), task.cancel(message);
|
|
3140
|
-
},
|
|
3141
|
-
error: (message) => {
|
|
3142
|
-
logTracker.addLog("error", `${spinnerId}-error: ${message}`), task.error(message);
|
|
3143
|
-
}
|
|
3144
|
-
};
|
|
3145
|
-
}
|
|
3146
|
-
taskLog(options) {
|
|
3147
|
-
let isCurrentTaskActive = !!getCurrentTaskLog(), task = getCurrentTaskLog() || zt({ limit: 10, retainLog: !0, ...options }), taskId = `${options.id}-task`;
|
|
3148
|
-
return logTracker.addLog("info", `${taskId}-start: ${options.title}`), isCurrentTaskActive || setCurrentTaskLog(task), {
|
|
3149
|
-
message: (message) => {
|
|
3150
|
-
logTracker.addLog("info", `${taskId}: ${message}`), task.message(formatTaskLogMessage(message));
|
|
3151
|
-
},
|
|
3152
|
-
error: (message) => {
|
|
3153
|
-
logTracker.addLog("error", `${taskId}-error: ${message}`), task.error(message, { showLog: !0 }), clearCurrentTaskLog();
|
|
3154
|
-
},
|
|
3155
|
-
success: (message, options2) => {
|
|
3156
|
-
logTracker.addLog("info", `${taskId}-success: ${message}`), isCurrentTaskActive || task.success(message, options2), clearCurrentTaskLog();
|
|
3157
|
-
},
|
|
3158
|
-
group(title) {
|
|
3159
|
-
logTracker.addLog("info", `${taskId}-group: ${title}`);
|
|
3160
|
-
let group = task.group(title);
|
|
3161
|
-
return setCurrentTaskLog(group), {
|
|
3162
|
-
message: (message) => {
|
|
3163
|
-
group.message(message);
|
|
3164
|
-
},
|
|
3165
|
-
success: (message) => {
|
|
3166
|
-
group.success(message), clearCurrentTaskLog();
|
|
3167
|
-
},
|
|
3168
|
-
error: (message) => {
|
|
3169
|
-
group.error(message), clearCurrentTaskLog();
|
|
3170
|
-
}
|
|
3171
|
-
};
|
|
3172
|
-
}
|
|
3173
|
-
};
|
|
3174
|
-
}
|
|
3175
|
-
};
|
|
3176
|
-
|
|
3177
|
-
// src/node-logger/prompts/prompt-config.ts
|
|
3178
|
-
var PROVIDERS = {
|
|
3179
|
-
clack: new ClackPromptProvider()
|
|
3180
|
-
}, currentPromptLibrary = "clack", setPromptLibrary = (library) => {
|
|
3181
|
-
currentPromptLibrary = library;
|
|
3182
|
-
}, getPromptLibrary = () => currentPromptLibrary, getPromptProvider = () => PROVIDERS[currentPromptLibrary], isClackEnabled = () => currentPromptLibrary === "clack", getPreferredStdio = () => isClackEnabled() ? "pipe" : "inherit";
|
|
3183
|
-
|
|
3184
|
-
// src/node-logger/logger/colors.ts
|
|
3185
|
-
var import_picocolors4 = __toESM(require_picocolors(), 1), CLI_COLORS = {
|
|
3186
|
-
success: import_picocolors4.default.green,
|
|
3187
|
-
error: import_picocolors4.default.red,
|
|
3188
|
-
warning: import_picocolors4.default.yellow,
|
|
3189
|
-
// Improve contrast on dark terminals by using cyan for info on all platforms
|
|
3190
|
-
info: import_picocolors4.default.cyan,
|
|
3191
|
-
debug: import_picocolors4.default.gray,
|
|
3192
|
-
// Only color a link if it is the primary call to action, otherwise links shouldn't be colored
|
|
3193
|
-
cta: import_picocolors4.default.cyan,
|
|
3194
|
-
muted: import_picocolors4.default.dim,
|
|
3195
|
-
storybook: (text2) => `\x1B[38;2;255;71;133m${text2}\x1B[39m`
|
|
3196
|
-
};
|
|
3197
|
-
|
|
3198
|
-
// src/node-logger/logger/logger.ts
|
|
3199
|
-
var createLogFunction = (clackFn, consoleFn, cliColors) => () => isClackEnabled() ? (...args) => {
|
|
3200
|
-
let [message, ...rest] = args, currentTaskLog = getCurrentTaskLog();
|
|
3201
|
-
currentTaskLog ? currentTaskLog.message(
|
|
3202
|
-
cliColors && typeof message == "string" ? cliColors(message) : message
|
|
3203
|
-
) : typeof message == "string" ? clackFn(wrapTextForClack(message), ...rest) : clackFn(message, ...rest);
|
|
3204
|
-
} : consoleFn, LOG_FUNCTIONS = {
|
|
3205
|
-
log: createLogFunction(R2.message, console.log),
|
|
3206
|
-
info: createLogFunction(R2.info, console.log),
|
|
3207
|
-
warn: createLogFunction(R2.warn, console.warn, CLI_COLORS.warning),
|
|
3208
|
-
error: createLogFunction(R2.error, console.error, CLI_COLORS.error),
|
|
3209
|
-
intro: createLogFunction(Pt, console.log),
|
|
3210
|
-
outro: createLogFunction(Wt2, console.log),
|
|
3211
|
-
step: createLogFunction(R2.step, console.log)
|
|
3212
|
-
}, LOG_LEVELS = {
|
|
3213
|
-
trace: 1,
|
|
3214
|
-
debug: 2,
|
|
3215
|
-
info: 3,
|
|
3216
|
-
warn: 4,
|
|
3217
|
-
error: 5,
|
|
3218
|
-
silent: 10
|
|
3219
|
-
}, currentLogLevel = "info", setLogLevel = (level) => {
|
|
3220
|
-
currentLogLevel = level;
|
|
3221
|
-
}, getLogLevel = () => currentLogLevel, shouldLog = (level) => LOG_LEVELS[currentLogLevel] <= LOG_LEVELS[level];
|
|
3222
|
-
function getMinimalTrace() {
|
|
3223
|
-
let stack = new Error().stack;
|
|
3224
|
-
if (!stack)
|
|
3225
|
-
return;
|
|
3226
|
-
let userStackLines = stack.split(`
|
|
3227
|
-
`).slice(1).filter(
|
|
3228
|
-
(line) => !["getMinimalTrace", "createLogger", "logFunction"].some((fn) => line.includes(fn))
|
|
3229
|
-
);
|
|
3230
|
-
return userStackLines.length === 0 ? void 0 : `
|
|
3231
|
-
` + userStackLines.slice(0, 4).join(`
|
|
3232
|
-
`);
|
|
3233
|
-
}
|
|
3234
|
-
var formatLogMessage = (args) => args.map((arg) => typeof arg == "string" ? arg : typeof arg == "object" ? JSON.stringify(arg, null, 2) : String(arg)).join(" ");
|
|
3235
|
-
function createLogger(level, logFn, prefix) {
|
|
3236
|
-
return function(...args) {
|
|
3237
|
-
let [message, ...rest] = args, msg = formatLogMessage([message]);
|
|
3238
|
-
if (logTracker.addLog(level, msg), level === "prompt" && (level = "info"), shouldLog(level)) {
|
|
3239
|
-
let formattedMessage = prefix ? `${prefix} ${msg}` : message;
|
|
3240
|
-
logFn(formattedMessage, ...rest);
|
|
3241
|
-
}
|
|
3242
|
-
};
|
|
3243
|
-
}
|
|
3244
|
-
var debug = createLogger(
|
|
3245
|
-
"debug",
|
|
3246
|
-
function(message) {
|
|
3247
|
-
shouldLog("trace") && (message += getMinimalTrace()), LOG_FUNCTIONS.log()(message);
|
|
3248
|
-
},
|
|
3249
|
-
"[DEBUG]"
|
|
3250
|
-
), log = createLogger(
|
|
3251
|
-
"info",
|
|
3252
|
-
(...args) => LOG_FUNCTIONS.log()(...args)
|
|
3253
|
-
), info = createLogger(
|
|
3254
|
-
"info",
|
|
3255
|
-
(...args) => LOG_FUNCTIONS.info()(...args)
|
|
3256
|
-
), warn = createLogger(
|
|
3257
|
-
"warn",
|
|
3258
|
-
(...args) => LOG_FUNCTIONS.warn()(...args)
|
|
3259
|
-
), error = createLogger(
|
|
3260
|
-
"error",
|
|
3261
|
-
(...args) => LOG_FUNCTIONS.error()(...args)
|
|
3262
|
-
), logBox = (message, { title, ...options } = {}) => {
|
|
3263
|
-
try {
|
|
3264
|
-
shouldLog("info") && (logTracker.addLog("info", message), isClackEnabled() ? Tt2(message, title, {
|
|
3265
|
-
...options,
|
|
3266
|
-
width: options.width ?? "auto"
|
|
3267
|
-
}) : console.log(message));
|
|
3268
|
-
} catch {
|
|
3269
|
-
R2.message(message);
|
|
3270
|
-
}
|
|
3271
|
-
}, intro = (message) => {
|
|
3272
|
-
logTracker.addLog("info", message), shouldLog("info") && (console.log(""), LOG_FUNCTIONS.intro()(message));
|
|
3273
|
-
}, outro = (message) => {
|
|
3274
|
-
logTracker.addLog("info", message), shouldLog("info") && LOG_FUNCTIONS.outro()(message);
|
|
3275
|
-
}, step = (message) => {
|
|
3276
|
-
logTracker.addLog("info", message), shouldLog("info") && LOG_FUNCTIONS.step()(message);
|
|
3277
|
-
}, SYMBOLS = {
|
|
3278
|
-
success: CLI_COLORS.success("\u2714"),
|
|
3279
|
-
error: CLI_COLORS.error("\u2715")
|
|
3280
|
-
};
|
|
3281
|
-
|
|
3282
|
-
// src/node-logger/logger/console.ts
|
|
3283
|
-
var import_picocolors5 = __toESM(require_picocolors(), 1);
|
|
3284
|
-
var ConsoleLogger = class _ConsoleLogger {
|
|
3285
|
-
constructor() {
|
|
3286
|
-
this.Console = _ConsoleLogger;
|
|
3287
|
-
this.timers = /* @__PURE__ */ new Map();
|
|
3288
|
-
this.counters = /* @__PURE__ */ new Map();
|
|
3289
|
-
this.lastStatusLine = null;
|
|
3290
|
-
this.statusLineCount = 0;
|
|
3291
|
-
}
|
|
3292
|
-
// These will be overridden by child classes
|
|
3293
|
-
get prefix() {
|
|
3294
|
-
return "";
|
|
3295
|
-
}
|
|
3296
|
-
get color() {
|
|
3297
|
-
return (text2) => text2;
|
|
3298
|
-
}
|
|
3299
|
-
formatMessage(...data) {
|
|
3300
|
-
let message = data.join(" ");
|
|
3301
|
-
return this.prefix ? `${this.color(this.prefix)} ${message}` : message;
|
|
3302
|
-
}
|
|
3303
|
-
assert(condition, ...data) {
|
|
3304
|
-
condition || error(this.formatMessage("Assertion failed:", ...data));
|
|
3305
|
-
}
|
|
3306
|
-
// Needs some proper implementation
|
|
3307
|
-
// Take a look at https://github.com/webpack/webpack/blob/5f898719ae47b89bee3c126bf5d2e0081ea8c91f/lib/node/nodeConsole.js#L4
|
|
3308
|
-
// for some inspiration
|
|
3309
|
-
// status(...data: any[]): void {
|
|
3310
|
-
// const message = this.formatMessage(...data);
|
|
3311
|
-
// // If we have a previous status line, we need to clear it
|
|
3312
|
-
// if (this.lastStatusLine !== null) {
|
|
3313
|
-
// this.clearStatus();
|
|
3314
|
-
// }
|
|
3315
|
-
// // Write the status message directly to stdout without adding newlines
|
|
3316
|
-
// process.stdout.write(message);
|
|
3317
|
-
// // Update tracking variables
|
|
3318
|
-
// this.lastStatusLine = message;
|
|
3319
|
-
// this.statusLineCount = 1; // For now, assume single line status messages
|
|
3320
|
-
// // If the message contains newlines, count them
|
|
3321
|
-
// const newlineCount = (message.match(/\n/g) || []).length;
|
|
3322
|
-
// this.statusLineCount = newlineCount + 1;
|
|
3323
|
-
// }
|
|
3324
|
-
// /** Clears the current status line if one exists */
|
|
3325
|
-
// clearStatus(): void {
|
|
3326
|
-
// if (this.lastStatusLine !== null) {
|
|
3327
|
-
// // Move cursor to the beginning of the current line
|
|
3328
|
-
// process.stdout.write('\r');
|
|
3329
|
-
// // Clear the current line
|
|
3330
|
-
// process.stdout.clearLine(1);
|
|
3331
|
-
// // Reset tracking variables
|
|
3332
|
-
// this.lastStatusLine = null;
|
|
3333
|
-
// this.statusLineCount = 0;
|
|
3334
|
-
// }
|
|
3335
|
-
// }
|
|
3336
|
-
/**
|
|
3337
|
-
* The **`console.clear()`** static method clears the console if possible.
|
|
3338
|
-
*
|
|
3339
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static)
|
|
3340
|
-
*/
|
|
3341
|
-
clear() {
|
|
3342
|
-
console.clear();
|
|
3343
|
-
}
|
|
3344
|
-
/**
|
|
3345
|
-
* The **`console.count()`** static method logs the number of times that this particular call to
|
|
3346
|
-
* `count()` has been called.
|
|
3347
|
-
*
|
|
3348
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static)
|
|
3349
|
-
*/
|
|
3350
|
-
count(label) {
|
|
3351
|
-
let key = label || "default", currentCount = (this.counters.get(key) || 0) + 1;
|
|
3352
|
-
this.counters.set(key, currentCount), log(this.formatMessage(`${key}: ${currentCount}`));
|
|
3353
|
-
}
|
|
3354
|
-
/**
|
|
3355
|
-
* The **`console.countReset()`** static method resets counter used with console/count_static.
|
|
3356
|
-
*
|
|
3357
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static)
|
|
3358
|
-
*/
|
|
3359
|
-
countReset(label) {
|
|
3360
|
-
let key = label || "default";
|
|
3361
|
-
this.counters.delete(key);
|
|
3362
|
-
}
|
|
3363
|
-
/**
|
|
3364
|
-
* The **`console.debug()`** static method outputs a message to the console at the 'debug' log
|
|
3365
|
-
* level.
|
|
3366
|
-
*
|
|
3367
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static)
|
|
3368
|
-
*/
|
|
3369
|
-
debug(...data) {
|
|
3370
|
-
process.stdout.write(`
|
|
3371
|
-
`), debug(this.formatMessage(...data));
|
|
3372
|
-
}
|
|
3373
|
-
/**
|
|
3374
|
-
* The **`console.dir()`** static method displays a list of the properties of the specified
|
|
3375
|
-
* JavaScript object.
|
|
3376
|
-
*
|
|
3377
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static)
|
|
3378
|
-
*/
|
|
3379
|
-
dir(item, options) {
|
|
3380
|
-
console.dir(item, options);
|
|
3381
|
-
}
|
|
3382
|
-
/**
|
|
3383
|
-
* The **`console.dirxml()`** static method displays an interactive tree of the descendant
|
|
3384
|
-
* elements of the specified XML/HTML element.
|
|
3385
|
-
*
|
|
3386
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static)
|
|
3387
|
-
*/
|
|
3388
|
-
dirxml(...data) {
|
|
3389
|
-
console.dirxml(...data);
|
|
3390
|
-
}
|
|
3391
|
-
/**
|
|
3392
|
-
* The **`console.error()`** static method outputs a message to the console at the 'error' log
|
|
3393
|
-
* level.
|
|
3394
|
-
*
|
|
3395
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static)
|
|
3396
|
-
*/
|
|
3397
|
-
error(...data) {
|
|
3398
|
-
process.stdout.write(`
|
|
3399
|
-
`), error(this.formatMessage(...data));
|
|
3400
|
-
}
|
|
3401
|
-
/**
|
|
3402
|
-
* The **`console.group()`** static method creates a new inline group in the Web console log,
|
|
3403
|
-
* causing any subsequent console messages to be indented by an additional level, until
|
|
3404
|
-
* console/groupEnd_static is called.
|
|
3405
|
-
*
|
|
3406
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static)
|
|
3407
|
-
*/
|
|
3408
|
-
group(...data) {
|
|
3409
|
-
console.group(...data);
|
|
3410
|
-
}
|
|
3411
|
-
/**
|
|
3412
|
-
* The **`console.groupCollapsed()`** static method creates a new inline group in the console.
|
|
3413
|
-
*
|
|
3414
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static)
|
|
3415
|
-
*/
|
|
3416
|
-
groupCollapsed(...data) {
|
|
3417
|
-
console.groupCollapsed(...data);
|
|
3418
|
-
}
|
|
3419
|
-
/**
|
|
3420
|
-
* The **`console.groupEnd()`** static method exits the current inline group in the console.
|
|
3421
|
-
*
|
|
3422
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static)
|
|
3423
|
-
*/
|
|
3424
|
-
groupEnd() {
|
|
3425
|
-
console.groupEnd();
|
|
3426
|
-
}
|
|
3427
|
-
/**
|
|
3428
|
-
* The **`console.info()`** static method outputs a message to the console at the 'info' log
|
|
3429
|
-
* level.
|
|
3430
|
-
*
|
|
3431
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static)
|
|
3432
|
-
*/
|
|
3433
|
-
info(...data) {
|
|
3434
|
-
process.stdout.write(`
|
|
3435
|
-
`), log(this.formatMessage(...data));
|
|
3436
|
-
}
|
|
3437
|
-
/**
|
|
3438
|
-
* The **`console.log()`** static method outputs a message to the console.
|
|
3439
|
-
*
|
|
3440
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)
|
|
3441
|
-
*/
|
|
3442
|
-
log(...data) {
|
|
3443
|
-
process.stdout.write(`
|
|
3444
|
-
`), log(this.formatMessage(...data));
|
|
3445
|
-
}
|
|
3446
|
-
/**
|
|
3447
|
-
* The **`console.table()`** static method displays tabular data as a table.
|
|
3448
|
-
*
|
|
3449
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static)
|
|
3450
|
-
*/
|
|
3451
|
-
table(tabularData, properties) {
|
|
3452
|
-
console.table(tabularData, properties);
|
|
3453
|
-
}
|
|
3454
|
-
/**
|
|
3455
|
-
* The **`console.time()`** static method starts a timer you can use to track how long an
|
|
3456
|
-
* operation takes.
|
|
3457
|
-
*
|
|
3458
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static)
|
|
3459
|
-
*/
|
|
3460
|
-
time(label) {
|
|
3461
|
-
let key = label || "default";
|
|
3462
|
-
this.timers.set(key, Date.now());
|
|
3463
|
-
}
|
|
3464
|
-
/**
|
|
3465
|
-
* The **`console.timeEnd()`** static method stops a timer that was previously started by calling
|
|
3466
|
-
* console/time_static.
|
|
3467
|
-
*
|
|
3468
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static)
|
|
3469
|
-
*/
|
|
3470
|
-
timeEnd(label) {
|
|
3471
|
-
let key = label || "default", startTime = this.timers.get(key);
|
|
3472
|
-
if (startTime) {
|
|
3473
|
-
let duration = Date.now() - startTime;
|
|
3474
|
-
log(this.formatMessage(`${key}: ${duration}ms`)), this.timers.delete(key);
|
|
3475
|
-
} else
|
|
3476
|
-
warn(this.formatMessage(`Timer '${key}' does not exist`));
|
|
3477
|
-
}
|
|
3478
|
-
/**
|
|
3479
|
-
* The **`console.timeLog()`** static method logs the current value of a timer that was previously
|
|
3480
|
-
* started by calling console/time_static.
|
|
3481
|
-
*
|
|
3482
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static)
|
|
3483
|
-
*/
|
|
3484
|
-
timeLog(label, ...data) {
|
|
3485
|
-
let key = label || "default", startTime = this.timers.get(key);
|
|
3486
|
-
if (startTime) {
|
|
3487
|
-
let duration = Date.now() - startTime;
|
|
3488
|
-
log(this.formatMessage(`${key}: ${duration}ms`, ...data));
|
|
3489
|
-
} else
|
|
3490
|
-
warn(this.formatMessage(`Timer '${key}' does not exist`));
|
|
3491
|
-
}
|
|
3492
|
-
timeStamp(label) {
|
|
3493
|
-
let timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
3494
|
-
log(this.formatMessage(`[${timestamp}]${label ? ` ${label}` : ""}`));
|
|
3495
|
-
}
|
|
3496
|
-
/**
|
|
3497
|
-
* The **`console.trace()`** static method outputs a stack trace to the console.
|
|
3498
|
-
*
|
|
3499
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static)
|
|
3500
|
-
*/
|
|
3501
|
-
trace(...data) {
|
|
3502
|
-
console.trace(...data);
|
|
3503
|
-
}
|
|
3504
|
-
/**
|
|
3505
|
-
* The **`console.warn()`** static method outputs a warning message to the console at the
|
|
3506
|
-
* 'warning' log level.
|
|
3507
|
-
*
|
|
3508
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static)
|
|
3509
|
-
*/
|
|
3510
|
-
warn(...data) {
|
|
3511
|
-
process.stdout.write(`
|
|
3512
|
-
`), warn(this.formatMessage(...data));
|
|
3513
|
-
}
|
|
3514
|
-
profile(label) {
|
|
3515
|
-
console.profile(label), log(this.formatMessage(`Profile started: ${label}`));
|
|
3516
|
-
}
|
|
3517
|
-
profileEnd(label) {
|
|
3518
|
-
console.profileEnd(label), log(this.formatMessage(`Profile ended: ${label}`));
|
|
3519
|
-
}
|
|
3520
|
-
}, StyledConsoleLogger = class extends ConsoleLogger {
|
|
3521
|
-
constructor(options) {
|
|
3522
|
-
super(), this._prefix = options.prefix || "", this._color = options.color;
|
|
3523
|
-
}
|
|
3524
|
-
// Override the getter methods from parent class
|
|
3525
|
-
get prefix() {
|
|
3526
|
-
return this._prefix;
|
|
3527
|
-
}
|
|
3528
|
-
get color() {
|
|
3529
|
-
return import_picocolors5.default[this._color];
|
|
3530
|
-
}
|
|
3531
|
-
};
|
|
3532
|
-
|
|
3533
|
-
// src/node-logger/prompts/prompt-functions.ts
|
|
3534
|
-
var prompt_functions_exports = {};
|
|
3535
|
-
__export(prompt_functions_exports, {
|
|
3536
|
-
confirm: () => confirm,
|
|
3537
|
-
multiselect: () => multiselect,
|
|
3538
|
-
select: () => select,
|
|
3539
|
-
spinner: () => spinner,
|
|
3540
|
-
taskLog: () => taskLog,
|
|
3541
|
-
text: () => text
|
|
3542
|
-
});
|
|
3543
|
-
var activeSpinner = null, activeTaskLog = null, originalConsoleLog = null;
|
|
3544
|
-
if (typeof process.stdout.columns == "number" && !(process.stdout.columns > 0))
|
|
3545
|
-
try {
|
|
3546
|
-
process.stdout.columns = getTerminalWidth();
|
|
3547
|
-
} catch {
|
|
3548
|
-
}
|
|
3549
|
-
var isInteractiveTerminal = () => process.stdout.isTTY && process.stdin.isTTY && !process.env.CI, patchConsoleLog = () => {
|
|
3550
|
-
originalConsoleLog || (originalConsoleLog = console.log, console.log = (...args) => {
|
|
3551
|
-
let message = args.map((arg) => typeof arg == "string" ? arg : JSON.stringify(arg)).join(" ");
|
|
3552
|
-
activeTaskLog ? shouldLog("info") && activeTaskLog.message(message) : activeSpinner ? shouldLog("info") && activeSpinner.message(message) : originalConsoleLog(...args);
|
|
3553
|
-
});
|
|
3554
|
-
}, restoreConsoleLog = () => {
|
|
3555
|
-
originalConsoleLog && !activeSpinner && !activeTaskLog && (console.log = originalConsoleLog, originalConsoleLog = null);
|
|
3556
|
-
}, text = async (options, promptOptions) => getPromptProvider().text(options, promptOptions), confirm = async (options, promptOptions) => getPromptProvider().confirm(options, promptOptions), select = async (options, promptOptions) => getPromptProvider().select(options, promptOptions), multiselect = async (options, promptOptions) => getPromptProvider().multiselect(
|
|
3557
|
-
{
|
|
3558
|
-
...options,
|
|
3559
|
-
options: options.options.map((opt) => ({
|
|
3560
|
-
...opt,
|
|
3561
|
-
hint: opt.hint ? wrapTextForClackHint(opt.hint, void 0, opt.label || String(opt.value), 0) : void 0
|
|
3562
|
-
}))
|
|
3563
|
-
},
|
|
3564
|
-
promptOptions
|
|
3565
|
-
), spinner = (options) => {
|
|
3566
|
-
if (isInteractiveTerminal()) {
|
|
3567
|
-
let spinnerInstance = getPromptProvider().spinner(options), wrappedSpinner = {
|
|
3568
|
-
start: (message) => {
|
|
3569
|
-
activeSpinner = wrappedSpinner, patchConsoleLog(), shouldLog("info") && spinnerInstance.start(message);
|
|
3570
|
-
},
|
|
3571
|
-
stop: (message) => {
|
|
3572
|
-
activeSpinner = null, restoreConsoleLog(), shouldLog("info") && spinnerInstance.stop(message);
|
|
3573
|
-
},
|
|
3574
|
-
cancel: (message) => {
|
|
3575
|
-
activeSpinner = null, restoreConsoleLog(), shouldLog("info") && spinnerInstance.cancel(message);
|
|
3576
|
-
},
|
|
3577
|
-
error: (message) => {
|
|
3578
|
-
activeSpinner = null, restoreConsoleLog(), shouldLog("error") && spinnerInstance.error(message);
|
|
3579
|
-
},
|
|
3580
|
-
message: (text2) => {
|
|
3581
|
-
shouldLog("info") && spinnerInstance.message(text2);
|
|
3582
|
-
}
|
|
3583
|
-
};
|
|
3584
|
-
return wrappedSpinner;
|
|
3585
|
-
} else {
|
|
3586
|
-
let maybeLog = shouldLog("info") ? log : (_2) => {
|
|
3587
|
-
};
|
|
3588
|
-
return {
|
|
3589
|
-
start: (message) => {
|
|
3590
|
-
message && maybeLog(message);
|
|
3591
|
-
},
|
|
3592
|
-
stop: (message) => {
|
|
3593
|
-
message && maybeLog(message);
|
|
3594
|
-
},
|
|
3595
|
-
cancel: (message) => {
|
|
3596
|
-
message && maybeLog(message);
|
|
3597
|
-
},
|
|
3598
|
-
error: (message) => {
|
|
3599
|
-
message && shouldLog("error") && error(message);
|
|
3600
|
-
},
|
|
3601
|
-
message: (message) => {
|
|
3602
|
-
maybeLog(message);
|
|
3603
|
-
}
|
|
3604
|
-
};
|
|
3605
|
-
}
|
|
3606
|
-
}, taskLog = (options) => {
|
|
3607
|
-
if (isInteractiveTerminal() && shouldLog("info")) {
|
|
3608
|
-
let task = getPromptProvider().taskLog(options), wrappedTaskLog = {
|
|
3609
|
-
message: (message) => {
|
|
3610
|
-
task.message(wrapTextForClack(message));
|
|
3611
|
-
},
|
|
3612
|
-
success: (message, options2) => {
|
|
3613
|
-
activeTaskLog = null, restoreConsoleLog(), task.success(message, options2);
|
|
3614
|
-
},
|
|
3615
|
-
error: (message) => {
|
|
3616
|
-
activeTaskLog = null, restoreConsoleLog(), task.error(message);
|
|
3617
|
-
},
|
|
3618
|
-
group: function(title) {
|
|
3619
|
-
return this.message(`
|
|
3620
|
-
${title}
|
|
3621
|
-
`), {
|
|
3622
|
-
message: (message) => {
|
|
3623
|
-
task.message(wrapTextForClack(message));
|
|
3624
|
-
},
|
|
3625
|
-
success: (message) => {
|
|
3626
|
-
task.success(message);
|
|
3627
|
-
},
|
|
3628
|
-
error: (message) => {
|
|
3629
|
-
task.error(message);
|
|
3630
|
-
}
|
|
3631
|
-
};
|
|
3632
|
-
}
|
|
3633
|
-
};
|
|
3634
|
-
return activeTaskLog = wrappedTaskLog, patchConsoleLog(), wrappedTaskLog;
|
|
3635
|
-
} else {
|
|
3636
|
-
let maybeLog = shouldLog("info") ? log : (_2) => {
|
|
3637
|
-
};
|
|
3638
|
-
return {
|
|
3639
|
-
message: (message) => {
|
|
3640
|
-
maybeLog(message);
|
|
3641
|
-
},
|
|
3642
|
-
success: (message) => {
|
|
3643
|
-
maybeLog(message);
|
|
3644
|
-
},
|
|
3645
|
-
error: (message) => {
|
|
3646
|
-
maybeLog(message);
|
|
3647
|
-
},
|
|
3648
|
-
group: (title) => (maybeLog(`
|
|
3649
|
-
${title}
|
|
3650
|
-
`), {
|
|
3651
|
-
message: (message) => {
|
|
3652
|
-
maybeLog(message);
|
|
3653
|
-
},
|
|
3654
|
-
success: (message) => {
|
|
3655
|
-
maybeLog(message);
|
|
3656
|
-
},
|
|
3657
|
-
error: (message) => {
|
|
3658
|
-
maybeLog(message);
|
|
3659
|
-
}
|
|
3660
|
-
})
|
|
3661
|
-
};
|
|
3662
|
-
}
|
|
3663
|
-
};
|
|
3664
|
-
|
|
3665
|
-
// src/node-logger/tasks.ts
|
|
3666
|
-
function setupAbortController() {
|
|
3667
|
-
let abortController = new AbortController(), isRawMode = !1, wasRawMode = process.stdin.isRaw, onKeyPress = (chunk) => {
|
|
3668
|
-
let key = chunk.toString();
|
|
3669
|
-
(key === "c" || key === "C") && abortController.abort();
|
|
3670
|
-
}, cleanup = () => {
|
|
3671
|
-
isRawMode && (process.stdin.setRawMode(wasRawMode ?? !1), process.stdin.removeListener("data", onKeyPress), wasRawMode || process.stdin.pause());
|
|
3672
|
-
};
|
|
3673
|
-
if (process.stdin.isTTY)
|
|
3674
|
-
try {
|
|
3675
|
-
isRawMode = !0, process.stdin.setRawMode(!0), process.stdin.resume(), process.stdin.on("data", onKeyPress);
|
|
3676
|
-
} catch {
|
|
3677
|
-
isRawMode = !1;
|
|
3678
|
-
}
|
|
3679
|
-
return { abortController, cleanup };
|
|
3680
|
-
}
|
|
3681
|
-
var executeTask = async (childProcessFactories, {
|
|
3682
|
-
intro: intro2,
|
|
3683
|
-
error: error2,
|
|
3684
|
-
success,
|
|
3685
|
-
abortable = !1
|
|
3686
|
-
}) => {
|
|
3687
|
-
logTracker.addLog("info", intro2), log(intro2);
|
|
3688
|
-
let abortController, cleanup;
|
|
3689
|
-
if (abortable) {
|
|
3690
|
-
let result = setupAbortController();
|
|
3691
|
-
abortController = result.abortController, cleanup = result.cleanup;
|
|
3692
|
-
}
|
|
3693
|
-
let factories = Array.isArray(childProcessFactories) ? childProcessFactories : [childProcessFactories];
|
|
3694
|
-
try {
|
|
3695
|
-
for (let factory of factories) {
|
|
3696
|
-
let childProcess = factory(abortController?.signal);
|
|
3697
|
-
childProcess.stdout?.on("data", (data) => {
|
|
3698
|
-
let message = data.toString().trim();
|
|
3699
|
-
logTracker.addLog("info", message), log(message);
|
|
3700
|
-
}), await childProcess;
|
|
3701
|
-
}
|
|
3702
|
-
logTracker.addLog("info", success), log(CLI_COLORS.success(success));
|
|
3703
|
-
} catch (err) {
|
|
3704
|
-
if (abortController?.signal.aborted || err.message?.includes("Command was killed with SIGINT") || err.message?.includes("The operation was aborted"))
|
|
3705
|
-
return logTracker.addLog("info", `${intro2} aborted`), log(CLI_COLORS.error(`${intro2} aborted`)), "aborted";
|
|
3706
|
-
let errorMessage = err instanceof Error ? err.stack ?? err.message : String(err);
|
|
3707
|
-
throw logTracker.addLog("error", error2, { error: errorMessage }), log(CLI_COLORS.error(String(err.message ?? err))), err;
|
|
3708
|
-
} finally {
|
|
3709
|
-
cleanup?.();
|
|
3710
|
-
}
|
|
3711
|
-
}, executeTaskWithSpinner = async (childProcessFactories, {
|
|
3712
|
-
id,
|
|
3713
|
-
intro: intro2,
|
|
3714
|
-
error: error2,
|
|
3715
|
-
success,
|
|
3716
|
-
abortable = !1
|
|
3717
|
-
}) => {
|
|
3718
|
-
logTracker.addLog("info", intro2);
|
|
3719
|
-
let abortController, cleanup;
|
|
3720
|
-
if (abortable) {
|
|
3721
|
-
let result = setupAbortController();
|
|
3722
|
-
abortController = result.abortController, cleanup = result.cleanup;
|
|
3723
|
-
}
|
|
3724
|
-
let task = spinner({ id });
|
|
3725
|
-
task.start(intro2);
|
|
3726
|
-
let factories = Array.isArray(childProcessFactories) ? childProcessFactories : [childProcessFactories];
|
|
3727
|
-
try {
|
|
3728
|
-
for (let factory of factories) {
|
|
3729
|
-
let childProcess = factory(abortController?.signal);
|
|
3730
|
-
childProcess.stdout?.on("data", (data) => {
|
|
3731
|
-
let message = data.toString().trim().slice(0, 25);
|
|
3732
|
-
logTracker.addLog("info", `${intro2}: ${data.toString()}`), task.message(`${intro2}: ${message}`);
|
|
3733
|
-
}), await childProcess;
|
|
3734
|
-
}
|
|
3735
|
-
logTracker.addLog("info", success), task.stop(success);
|
|
3736
|
-
} catch (err) {
|
|
3737
|
-
if (abortController?.signal.aborted || err.message?.includes("Command was killed with SIGINT") || err.message?.includes("The operation was aborted"))
|
|
3738
|
-
return logTracker.addLog("info", `${intro2} aborted`), task.cancel(CLI_COLORS.warning(`${intro2} aborted`)), "aborted";
|
|
3739
|
-
let errorMessage = err instanceof Error ? err.stack ?? err.message : String(err);
|
|
3740
|
-
throw logTracker.addLog("error", error2, { error: errorMessage }), task.error(CLI_COLORS.error(error2)), err;
|
|
3741
|
-
} finally {
|
|
3742
|
-
cleanup?.();
|
|
3743
|
-
}
|
|
3744
|
-
};
|
|
3745
|
-
|
|
3746
|
-
// src/node-logger/prompts/index.ts
|
|
3747
|
-
var prompt = {
|
|
3748
|
-
...prompt_functions_exports,
|
|
3749
|
-
...prompt_config_exports,
|
|
3750
|
-
executeTask,
|
|
3751
|
-
executeTaskWithSpinner
|
|
3752
|
-
};
|
|
3753
|
-
|
|
3754
|
-
// src/node-logger/index.ts
|
|
3755
|
-
import_npmlog.default.stream = process.stdout;
|
|
3756
|
-
var toNpmLogLevel = (level) => {
|
|
3757
|
-
switch (level) {
|
|
3758
|
-
case "trace":
|
|
3759
|
-
return "silly";
|
|
3760
|
-
case "debug":
|
|
3761
|
-
return "verbose";
|
|
3762
|
-
default:
|
|
3763
|
-
return level;
|
|
3764
|
-
}
|
|
3765
|
-
}, setLoggerLevel = (level = "info") => {
|
|
3766
|
-
import_npmlog.default.level = toNpmLogLevel(level), setLogLevel(level);
|
|
3767
|
-
};
|
|
3768
|
-
function hex(hexColor) {
|
|
3769
|
-
if (!/^#?[0-9A-Fa-f]{6}$/.test(hexColor))
|
|
3770
|
-
throw new Error("Invalid hex color. It must be a 6-character hex code.");
|
|
3771
|
-
hexColor.startsWith("#") && (hexColor = hexColor.slice(1));
|
|
3772
|
-
let r = parseInt(hexColor.slice(0, 2), 16), g = parseInt(hexColor.slice(2, 4), 16), b = parseInt(hexColor.slice(4, 6), 16);
|
|
3773
|
-
return (text2) => `\x1B[38;2;${r};${g};${b}m${text2}\x1B[39m`;
|
|
3774
|
-
}
|
|
3775
|
-
var colors = {
|
|
3776
|
-
pink: hex("#F1618C"),
|
|
3777
|
-
purple: hex("#B57EE5"),
|
|
3778
|
-
orange: hex("#F3AD38"),
|
|
3779
|
-
green: hex("#A2E05E"),
|
|
3780
|
-
blue: hex("#6DABF5"),
|
|
3781
|
-
red: hex("#F16161"),
|
|
3782
|
-
gray: hex("#B8C2CC")
|
|
3783
|
-
}, logger = {
|
|
3784
|
-
...logger_exports,
|
|
3785
|
-
verbose: (message) => debug(message),
|
|
3786
|
-
line: (count = 1) => log(`${Array(count - 1).fill(`
|
|
3787
|
-
`)}`),
|
|
3788
|
-
/** For non-critical issues or warnings */
|
|
3789
|
-
warn: (message) => warn(message),
|
|
3790
|
-
trace: ({ message, time }) => debug(`${message} (${colors.purple((0, import_pretty_hrtime.default)(time))})`),
|
|
3791
|
-
setLevel: setLoggerLevel,
|
|
3792
|
-
setLogLevel: setLoggerLevel,
|
|
3793
|
-
error: (message) => {
|
|
3794
|
-
let msg;
|
|
3795
|
-
message instanceof Error && message.stack ? msg = message.stack.toString().replace(message.toString(), colors.red(message.toString())) : typeof message == "string" ? msg = message.toString() : msg = String(message), error(msg.replaceAll(process.cwd(), "."));
|
|
3796
|
-
}
|
|
3797
|
-
};
|
|
3798
|
-
var logged = /* @__PURE__ */ new Set(), once = (type) => (message) => {
|
|
3799
|
-
if (!logged.has(message))
|
|
3800
|
-
return logged.add(message), logger[type](message);
|
|
3801
|
-
};
|
|
3802
|
-
once.clear = () => logged.clear();
|
|
3803
|
-
once.verbose = once("verbose");
|
|
3804
|
-
once.info = once("info");
|
|
3805
|
-
once.warn = once("warn");
|
|
3806
|
-
once.error = once("error");
|
|
3807
|
-
var deprecate = once("warn");
|
|
3808
|
-
|
|
3809
|
-
export {
|
|
3810
|
-
require_pretty_hrtime,
|
|
3811
|
-
logTracker,
|
|
3812
|
-
protectUrls,
|
|
3813
|
-
createHyperlink,
|
|
3814
|
-
CLI_COLORS,
|
|
3815
|
-
ConsoleLogger,
|
|
3816
|
-
StyledConsoleLogger,
|
|
3817
|
-
prompt,
|
|
3818
|
-
import_npmlog,
|
|
3819
|
-
colors,
|
|
3820
|
-
logger,
|
|
3821
|
-
once,
|
|
3822
|
-
deprecate
|
|
3823
|
-
};
|