@aussieljk/forkbook 0.0.1-1 → 0.0.1-11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +35 -53
- package/assets/addon-vitest/templates/vitest.config.4.template.ts +2 -2
- package/assets/browser/favicon-wrapper.svg +4 -4
- package/assets/browser/favicon.svg +1 -1
- package/assets/browser/inter-LICENSE.txt +92 -0
- package/assets/browser/inter-variable-italic.woff2 +0 -0
- package/assets/browser/inter-variable.woff2 +0 -0
- package/assets/browser/mirror-ball.png +0 -0
- package/assets/builder-vite/iframe.html +8 -24
- package/assets/create/rendererAssets/common/Configure.mdx +100 -100
- package/assets/create/rendererAssets/common/button.css +1 -1
- package/assets/create/rendererAssets/common/header.css +1 -1
- package/assets/create/rendererAssets/common/page.css +2 -2
- package/assets/create/templates/react-native/index.expo.js +4 -4
- package/assets/create/templates/react-native/index.js +5 -5
- package/assets/server/base-preview-body.html +32 -32
- package/assets/server/base-preview-head.html +86 -86
- package/assets/server/template.ejs +27 -26
- package/dist/_browser-chunks/{Color-OEKZ7XSW.js → Color-QLZNXLSV.js} +8 -8
- package/dist/_browser-chunks/WithTooltip-GNLRTZDF.js +198 -0
- package/dist/_browser-chunks/{chunk-66OCZ54D.js → chunk-3HM3VWJS.js} +1 -1
- package/dist/_browser-chunks/{chunk-CFAOWGL7.js → chunk-3M5T7BW4.js} +1 -1
- package/dist/_browser-chunks/{chunk-2MEPHP35.js → chunk-4KIQBRD2.js} +1 -1
- package/dist/_browser-chunks/{chunk-OQWFVDIN.js → chunk-5H4KFI44.js} +1 -1
- package/dist/_browser-chunks/chunk-6AKCRYVX.js +6 -0
- package/dist/_browser-chunks/{chunk-PFRNG3UC.js → chunk-6ELMKWKX.js} +5 -5
- package/dist/_browser-chunks/{chunk-6SXYJQST.js → chunk-76222HQR.js} +1 -1
- package/dist/_browser-chunks/{chunk-JSBKXXXF.js → chunk-7DQREF4S.js} +1 -1
- package/dist/_browser-chunks/{chunk-RSPAQWVJ.js → chunk-BNP234B4.js} +1 -1
- package/dist/_browser-chunks/chunk-C5TKXHTM.js +82 -0
- package/dist/_browser-chunks/chunk-DNJ3OSLB.js +6021 -0
- package/dist/_browser-chunks/{chunk-PP4R7USA.js → chunk-DS2WQZGO.js} +222 -433
- package/dist/_browser-chunks/{chunk-FJGWSWL5.js → chunk-DYNTDJ3O.js} +3 -3
- package/dist/_browser-chunks/{chunk-CFWWCCZV.js → chunk-EQKMUQF3.js} +5 -4
- package/dist/_browser-chunks/{chunk-LV5PIKV4.js → chunk-FRAOQJDI.js} +5 -3
- package/dist/_browser-chunks/{chunk-ODVJ3XZJ.js → chunk-GRO2ZYEJ.js} +2 -2
- package/dist/_browser-chunks/{chunk-MFMDGWP6.js → chunk-I4ATZPNZ.js} +1 -1
- package/dist/_browser-chunks/chunk-IFADVEQE.js +669 -0
- package/dist/_browser-chunks/{chunk-YTIT5NA5.js → chunk-KYSD26D6.js} +3 -3
- package/dist/_browser-chunks/{chunk-RNTIV5CE.js → chunk-LYYXDWR2.js} +9 -9
- package/dist/_browser-chunks/{chunk-V5M7Q4HT.js → chunk-MJIDTL3X.js} +4 -14
- package/dist/_browser-chunks/{chunk-OD6IBQCC.js → chunk-N3NRW5XX.js} +2 -2
- package/dist/_browser-chunks/{chunk-V2G23FV7.js → chunk-N5WQGLI7.js} +1 -1
- package/dist/_browser-chunks/{chunk-EIYAKDGP.js → chunk-NA4ITZTK.js} +127 -105
- package/dist/_browser-chunks/chunk-NGMQJMCY.js +53 -0
- package/dist/_browser-chunks/chunk-NPNIBOPF.js +18 -0
- package/dist/_browser-chunks/{chunk-52CW7FF7.js → chunk-NTUHL5NS.js} +8 -3
- package/dist/_browser-chunks/{chunk-MDOL7KML.js → chunk-O24AZJZ7.js} +1 -1
- package/dist/_browser-chunks/{chunk-YEKO6BHJ.js → chunk-ONTSNQON.js} +1 -1
- package/dist/_browser-chunks/chunk-OOETBSA7.js +502 -0
- package/dist/_browser-chunks/chunk-PZQRXPVR.js +21 -0
- package/dist/_browser-chunks/{chunk-VVWPND3J.js → chunk-QU4RB2WU.js} +12 -12
- package/dist/_browser-chunks/{chunk-C3D4HEFY.js → chunk-TTBPZQ24.js} +282 -127
- package/dist/_browser-chunks/{chunk-ZTQ5MEJ5.js → chunk-UMGDO2ZM.js} +3 -37
- package/dist/_browser-chunks/{chunk-2SCZVUKW.js → chunk-V5U45XXZ.js} +1 -1
- package/dist/_browser-chunks/{chunk-73OX2G56.js → chunk-WBLVFDJT.js} +100 -108
- package/dist/_browser-chunks/chunk-XKTORVEQ.js +255 -0
- package/dist/_browser-chunks/{chunk-FVSEPWWX.js → chunk-XTQCLWVH.js} +325 -1635
- package/dist/_browser-chunks/{chunk-W5M6NPS3.js → chunk-ZHKZKFY4.js} +7 -6
- package/dist/_node-chunks/{attached-runtime-O4YTVUKE.js → attached-runtime-J2AKT5WI.js} +30 -30
- package/dist/_node-chunks/builder-manager-Z4RWF4ZH.js +1139 -0
- package/dist/_node-chunks/{chunk-XURIZ7IC.js → chunk-2U5J7YTA.js} +8 -8
- package/dist/_node-chunks/{chunk-PBMWZVLD.js → chunk-2WVLC5M2.js} +6 -6
- package/dist/_node-chunks/{chunk-SVZ6Q3CS.js → chunk-2YNXKY72.js} +6 -6
- package/dist/_node-chunks/{chunk-CYPPELO4.js → chunk-32FLWHUC.js} +22 -32
- package/dist/_node-chunks/{chunk-XTTAS346.js → chunk-36LPBTLF.js} +6 -6
- package/dist/_node-chunks/{chunk-ILWHW4HU.js → chunk-3EBGFRAH.js} +15 -15
- package/dist/_node-chunks/{chunk-I2ANCID7.js → chunk-3IIQSDCO.js} +66 -145
- package/dist/_node-chunks/{chunk-G6PUNHCI.js → chunk-3NST2GUZ.js} +6 -6
- package/dist/_node-chunks/{chunk-YWMICX2T.js → chunk-46Y5H6X5.js} +12 -12
- package/dist/_node-chunks/{chunk-5WHA37KG.js → chunk-4D325SMT.js} +102 -40
- package/dist/_node-chunks/{chunk-2XDUXZGI.js → chunk-54EHKXV7.js} +8 -8
- package/dist/_node-chunks/{chunk-AWJOXJAZ.js → chunk-55S3GGGC.js} +8 -8
- package/dist/_node-chunks/{chunk-QMU5ODXZ.js → chunk-5GOXN5M4.js} +7 -7
- package/dist/_node-chunks/{chunk-AWXGCPW6.js → chunk-5JLVSH44.js} +6 -6
- package/dist/_node-chunks/{chunk-BENYUF74.js → chunk-5P4N734V.js} +77 -78
- package/dist/_node-chunks/{chunk-PEIAGMSR.js → chunk-6E34W4UX.js} +6 -6
- package/dist/_node-chunks/chunk-6UAJLEIO.js +28 -0
- package/dist/_node-chunks/chunk-6UASHVMR.js +620 -0
- package/dist/_node-chunks/{chunk-R5FYRP6X.js → chunk-76KKKLEE.js} +7 -7
- package/dist/_node-chunks/{chunk-DWE36J35.js → chunk-7IOSIYW2.js} +7 -7
- package/dist/_node-chunks/chunk-7YQTID2W.js +25 -0
- package/dist/_node-chunks/{chunk-A724RK5H.js → chunk-A7GEBS3Q.js} +9 -6
- package/dist/_node-chunks/{chunk-6EJ5NPEM.js → chunk-AKMPPLT5.js} +7 -7
- package/dist/_node-chunks/{chunk-2BJIHWOK.js → chunk-ALGQMFMN.js} +6 -6
- package/dist/_node-chunks/{chunk-JEC2OK5B.js → chunk-APPFF22V.js} +7 -7
- package/dist/_node-chunks/chunk-APXRPW7A.js +11 -0
- package/dist/_node-chunks/{chunk-IZISFDKM.js → chunk-AVL7GUOZ.js} +161 -145
- package/dist/_node-chunks/chunk-BBU2FUPC.js +495 -0
- package/dist/_node-chunks/{chunk-Y2GH4XO7.js → chunk-BKND5XP2.js} +650 -9
- package/dist/_node-chunks/{chunk-2UG3IYCC.js → chunk-BSQB5B57.js} +6 -6
- package/dist/_node-chunks/{chunk-ULW4SLMN.js → chunk-C5OFHB3N.js} +34 -949
- package/dist/_node-chunks/{chunk-5RNOGGO6.js → chunk-CEYSYQLV.js} +6 -6
- package/dist/_node-chunks/{chunk-NIHZECYO.js → chunk-D5ADPGA4.js} +6 -6
- package/dist/_node-chunks/{chunk-3CLITGI2.js → chunk-DGWKJQ6G.js} +6 -6
- package/dist/_node-chunks/{chunk-EWXASIWR.js → chunk-ER3X3AQ7.js} +7 -7
- package/dist/_node-chunks/{chunk-JBCKN6P4.js → chunk-FB2BOL6I.js} +6 -6
- package/dist/_node-chunks/{chunk-4PK3LUHM.js → chunk-FEC5PGJO.js} +7 -7
- package/dist/_node-chunks/{chunk-NZ3GOT7V.js → chunk-FTYDKQCO.js} +6 -6
- package/dist/_node-chunks/chunk-FUG5LYKS.js +532 -0
- package/dist/_node-chunks/{chunk-ASJFOW6O.js → chunk-GGCOG7OV.js} +8 -8
- package/dist/_node-chunks/{chunk-GVSFRNWZ.js → chunk-GMKLTDKN.js} +6 -6
- package/dist/_node-chunks/{chunk-JE6JEGXA.js → chunk-GO3YSBPE.js} +9 -9
- package/dist/_node-chunks/chunk-GTXZNA2L.js +347 -0
- package/dist/_node-chunks/{chunk-XJSYJTBD.js → chunk-GYFR2JLS.js} +7 -7
- package/dist/_node-chunks/{chunk-HKUNJELN.js → chunk-IFAV3CER.js} +8 -8
- package/dist/_node-chunks/{chunk-IJL5JOLL.js → chunk-IRPQQARO.js} +7 -7
- package/dist/_node-chunks/{chunk-M2BRIUUP.js → chunk-IVAOJWPF.js} +7 -7
- package/dist/_node-chunks/{chunk-RHG33T7C.js → chunk-J3SM62J3.js} +10 -10
- package/dist/_node-chunks/{chunk-7TSL7D5D.js → chunk-LAIED5XU.js} +6 -6
- package/dist/_node-chunks/{chunk-RJUHZH32.js → chunk-LHNHFYK3.js} +6 -6
- package/dist/_node-chunks/{chunk-B6SKX4JF.js → chunk-LKITAODU.js} +7 -7
- package/dist/_node-chunks/{chunk-7LLQDMVS.js → chunk-MBIVTOJK.js} +6 -6
- package/dist/_node-chunks/{chunk-X6OWHTYE.js → chunk-MI7WBXWX.js} +6 -6
- package/dist/_node-chunks/{chunk-CDRLLNRQ.js → chunk-MW4OAPPD.js} +11 -11
- package/dist/_node-chunks/{chunk-ZMEGPR47.js → chunk-MXLHIEXC.js} +6 -6
- package/dist/_node-chunks/{chunk-RJXEPYEN.js → chunk-NFDQT7UW.js} +64 -21
- package/dist/_node-chunks/{chunk-CWD5A6NI.js → chunk-NIQSBBT2.js} +7 -7
- package/dist/_node-chunks/{chunk-MJ2UD7FU.js → chunk-NLLM4MDK.js} +7 -7
- package/dist/_node-chunks/{chunk-US7L4S72.js → chunk-NLNAIU4I.js} +9 -9
- package/dist/_node-chunks/{chunk-AANHLH5M.js → chunk-OJWUUSA4.js} +6 -6
- package/dist/_node-chunks/{chunk-CXLL2F6O.js → chunk-OPT5A55S.js} +25 -8
- package/dist/_node-chunks/{chunk-RQVK2TOI.js → chunk-OXT6T4AS.js} +14 -13
- package/dist/_node-chunks/{chunk-7DCDBICW.js → chunk-PQTEFQIJ.js} +13 -13
- package/dist/_node-chunks/{chunk-5GN5N22E.js → chunk-PXOD36TR.js} +131 -148
- package/dist/_node-chunks/{chunk-5J3O7EDY.js → chunk-PYVGF5F2.js} +6 -6
- package/dist/_node-chunks/{chunk-ICADUNQM.js → chunk-QHBQRPDP.js} +6 -6
- package/dist/_node-chunks/{chunk-VXDWOVWD.js → chunk-R7VDUSKY.js} +29843 -51588
- package/dist/_node-chunks/chunk-REIDJUVJ.js +2609 -0
- package/dist/_node-chunks/{chunk-KGOAOPKR.js → chunk-RNRGXAFV.js} +6 -6
- package/dist/_node-chunks/{chunk-6APBQVEX.js → chunk-S3NDLFYL.js} +7 -7
- package/dist/_node-chunks/chunk-SJXLINHV.js +57 -0
- package/dist/_node-chunks/chunk-SMBAR4G6.js +18 -0
- package/dist/_node-chunks/{chunk-R7CY5LX6.js → chunk-SRDKK3SG.js} +6 -6
- package/dist/_node-chunks/{chunk-G5OYQQDY.js → chunk-T6P2EJD2.js} +6 -6
- package/dist/_node-chunks/{chunk-7BVUZZIY.js → chunk-TAMTPVYZ.js} +7 -7
- package/dist/_node-chunks/{chunk-ILVD64RB.js → chunk-TKMXEHM4.js} +8 -8
- package/dist/_node-chunks/{chunk-XCGMRAV5.js → chunk-V5IMPC3J.js} +7 -7
- package/dist/_node-chunks/{chunk-2QTI45JU.js → chunk-VKRGTLQJ.js} +35 -35
- package/dist/_node-chunks/{chunk-QVMUIU7S.js → chunk-VZG3OKFO.js} +6 -6
- package/dist/_node-chunks/{chunk-2JSABFAM.js → chunk-W3KFVTWV.js} +10 -10
- package/dist/_node-chunks/{chunk-U4GKV7GZ.js → chunk-W7HY3ELZ.js} +10 -10
- package/dist/_node-chunks/{chunk-NKAUZU4C.js → chunk-WBCKO5LP.js} +6 -6
- package/dist/_node-chunks/{chunk-JVQYQTTM.js → chunk-WO4UEQI6.js} +42 -87
- package/dist/_node-chunks/{chunk-SRXCCL2O.js → chunk-XCJ2ZIQ4.js} +7 -7
- package/dist/_node-chunks/{chunk-MDKFZRYG.js → chunk-XH5CXH53.js} +8 -8
- package/dist/_node-chunks/{chunk-4TV3Z3S3.js → chunk-XICRXTTE.js} +6 -6
- package/dist/_node-chunks/{chunk-GSWBRZLU.js → chunk-XO54HM4P.js} +9 -17
- package/dist/_node-chunks/{chunk-URRTQ2QM.js → chunk-XSVOMORJ.js} +8 -8
- package/dist/_node-chunks/{chunk-WQ7PSP6H.js → chunk-XVOIYGTJ.js} +6 -6
- package/dist/_node-chunks/chunk-Y4W4B3E7.js +20 -0
- package/dist/_node-chunks/{chunk-HKQEE62W.js → chunk-YBG7HVP7.js} +8 -8
- package/dist/_node-chunks/chunk-YIAUHGY2.js +69 -0
- package/dist/_node-chunks/{chunk-GP5YLBNS.js → chunk-Z2ZTDQDY.js} +8 -8
- package/dist/_node-chunks/{chunk-GT5EHMNM.js → chunk-ZEYODVQT.js} +7 -7
- package/dist/_node-chunks/dist-C5QIQD3G.js +27 -0
- package/dist/_node-chunks/dist-NBRPZCHX.js +16 -0
- package/dist/_node-chunks/{local-runtime-4UNT5EZJ.js → local-runtime-YDAW5RJV.js} +20 -20
- package/dist/_node-chunks/{mdx-plugin-ZY6XLLA4.js → mdx-plugin-XLDET5LV.js} +2263 -130
- package/dist/_node-chunks/{monorepo-B65J4UFS.js → monorepo-NWMAHGOM.js} +12 -12
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-45ZTNWJS.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-4B6IZ7JD.js} +12 -12
- package/dist/_node-chunks/optimized-tests-EIPJR7HA.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-LOHSM7ID.js → pattern-copy-play-PJC4PO6A.js} +12 -12
- package/dist/_node-chunks/postinstallAddon-EOAAURMG.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-22ZBI6K4.js → rehype-external-links-4CWXZ35U.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-ROZVEEFZ.js → rehype-slug-QZ2PWSJH.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-EDE2B34G.js → relaxed-limits-ZQR4ER7L.js} +12 -12
- package/dist/_node-chunks/{run-IR3BRDJV.js → run-BMXB2BW2.js} +17 -17
- package/dist/_node-chunks/{run-372BSBV5.js → run-U63AXEKZ.js} +273 -13
- package/dist/_node-chunks/session-id-HEW5JUNB.js +23 -0
- package/dist/_node-chunks/{setup-6TMCKUTA.js → setup-NCUTUBNN.js} +9 -9
- package/dist/_node-chunks/{vitest.config.4.template-QJBEVCKG.js → vitest.config.4.template-4XHF7XPS.js} +9 -9
- package/dist/actions/decorator.js +3 -2
- package/dist/actions/index.d.ts +1 -1
- package/dist/actions/index.js +3 -2
- package/dist/addon-a11y/index.d.ts +3 -3
- package/dist/addon-a11y/index.js +2 -1
- package/dist/addon-a11y/manager.js +40 -37
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-a11y/preview.js +2 -1
- package/dist/addon-docs/blocks.d.ts +20 -1
- package/dist/addon-docs/blocks.js +150 -74
- package/dist/addon-docs/index.d.ts +19 -19
- package/dist/addon-docs/manager.js +6 -6
- package/dist/addon-docs/preset.js +10 -10
- package/dist/addon-links/index.js +5 -2
- package/dist/addon-links/preview.d.ts +1 -1
- package/dist/addon-links/preview.js +5 -2
- package/dist/addon-links/react/index.js +4 -1
- package/dist/addon-mcp/preset.js +29 -21
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +37 -82
- package/dist/addon-ondevice-actions/index.js +5 -1
- package/dist/addon-ondevice-actions/register.js +5 -1
- package/dist/addon-ondevice-controls/index.js +1 -1
- package/dist/addon-ondevice-controls/register.js +1 -1
- package/dist/addon-pseudo-states/index.d.ts +1 -1
- package/dist/addon-pseudo-states/manager.js +2 -2
- package/dist/addon-pseudo-states/preview.d.ts +1 -1
- package/dist/addon-themes/index.d.ts +1 -1
- package/dist/addon-themes/index.js +2 -2
- package/dist/addon-themes/manager.js +4 -4
- package/dist/addon-themes/postinstall.js +7 -7
- package/dist/addon-themes/preview.js +2 -2
- package/dist/addon-vitest/constants.js +8 -8
- package/dist/addon-vitest/manager.js +21 -21
- package/dist/addon-vitest/node/coverage-reporter.js +8 -8
- package/dist/addon-vitest/node/vitest.js +17 -17
- 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 +8 -8
- package/dist/addon-vitest/vitest-plugin/index.js +23 -23
- package/dist/addon-vitest/vitest-plugin/setup-file-with-project-annotations.js +3 -3
- package/dist/addon-vitest/vitest-plugin/setup-file.js +1 -1
- package/dist/babel/index.d.ts +91 -842
- package/dist/babel/index.js +13 -19
- package/dist/backgrounds/index.d.ts +1 -1
- package/dist/bin/core.js +65 -64
- package/dist/bin/dispatcher.js +18 -16
- package/dist/bin/loader.js +17 -16
- package/dist/builder-vite/index.js +17 -17
- package/dist/builder-vite/preset.js +13 -13
- package/dist/channels/index.js +6 -6
- package/dist/{chunk-BTVrWliM.d.ts → chunk-BGhyFTJO.d.ts} +2 -2
- package/dist/{chunk-DtHByo32.d.ts → chunk-CFk6djyM.d.ts} +5 -5
- package/dist/{chunk-CwQKNaYL.d.ts → chunk-CNqjcOmK.d.ts} +1 -1
- package/dist/{chunk-CMeX4WRe.d.ts → chunk-CT2iXaHz.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-DEVFdzxR.d.ts → chunk-D0NUmzXp.d.ts} +1 -1
- package/dist/{chunk-DzuY9DXg.d.ts → chunk-DDd8BhTY.d.ts} +2 -2
- package/dist/{chunk-Dw1z1Pki.d.ts → chunk-DROZ9oel.d.ts} +50 -314
- package/dist/{chunk-gCX81nOr.d.ts → chunk-DgzPaTw9.d.ts} +3 -3
- package/dist/{chunk-Kt1tW-D1.d.ts → chunk-Dm-iHJ-s.d.ts} +3 -3
- package/dist/{chunk-C-bavsOH.d.ts → chunk-Dw_4ad2Y.d.ts} +6 -6
- package/dist/{chunk-C2p5r3Vt.d.ts → chunk-Fg1Fm__9.d.ts} +119 -29
- package/dist/chunk-Susgfkap.d.ts +20 -0
- package/dist/cli/index.d.ts +13 -866
- package/dist/cli/index.js +44 -4954
- package/dist/cli/skills/content/index.d.ts +1 -1
- package/dist/cli/skills/content/index.js +2 -2
- 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 +17 -29
- package/dist/common/index.js +36 -42
- package/dist/components/index.d.ts +41 -238
- package/dist/components/index.js +2738 -8515
- package/dist/core-events/index.d.ts +4 -3
- package/dist/core-events/index.js +3 -1
- package/dist/core-server/index.d.ts +7 -6
- package/dist/core-server/index.js +665 -250
- package/dist/core-server/presets/common-manager.js +603 -1027
- package/dist/core-server/presets/common-override-preset.js +12 -10
- package/dist/core-server/presets/common-preset.js +55 -48
- package/dist/create/bin/index.js +7 -7
- package/dist/create/index.js +15 -15
- package/dist/csf/index.d.ts +5 -5
- package/dist/csf/index.js +55 -120
- package/dist/csf-tools/index.d.ts +17 -13
- package/dist/csf-tools/index.js +17 -15
- package/dist/docs-tools/index.js +2 -2
- package/dist/highlight/index.d.ts +1 -1
- package/dist/instrumenter/index.js +8 -6
- package/dist/manager/_manager-chunks/{globals-runtime-B0I9dSVs.js → globals-runtime-BSj0mCjE.js} +824 -727
- package/dist/manager/_manager-chunks/globals-runtime-BY3epqww.js +1807 -0
- package/dist/manager/_manager-chunks/globals-runtime-Bj5KDUJi.js +8935 -0
- package/dist/manager/_manager-chunks/{globals-runtime-ZHrQFa3-.js → globals-runtime-Bs75QQ_I.js} +77 -553
- package/dist/manager/_manager-chunks/{globals-runtime-f5oIrim0.js → globals-runtime-Bu9eGDTe.js} +394 -189
- package/dist/manager/_manager-chunks/{globals-runtime-FC201B7s.js → globals-runtime-BweHuXkK.js} +2 -1
- package/dist/manager/_manager-chunks/{globals-runtime-BQCkfH1B.js → globals-runtime-C5gK7HhH.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-BmphMP6z.js → globals-runtime-C92M_Vnq.js} +10 -10
- package/dist/manager/_manager-chunks/{globals-runtime-eLPTIfX-.js → globals-runtime-CA8AuIRT.js} +3 -145
- package/dist/manager/_manager-chunks/globals-runtime-CBviMKtt.js +446 -0
- package/dist/manager/_manager-chunks/{globals-runtime-C02fvgcd.js → globals-runtime-CCTA-XPa.js} +410 -379
- package/dist/manager/_manager-chunks/{globals-runtime-CXoVXiJA.js → globals-runtime-CHjExYMv.js} +324 -118
- package/dist/manager/_manager-chunks/{globals-runtime-BvM-NY2g.js → globals-runtime-DvV_TF3-.js} +638 -1731
- package/dist/manager/_manager-chunks/{globals-runtime-8HkdnU2F.js → globals-runtime-WZKaeKm9.js} +93 -2146
- package/dist/manager/_manager-chunks/globals-runtime-wjkxyMn0.js +5283 -0
- package/dist/manager/_manager-chunks/{runtime-DtyerpFe.js → runtime--hR2NZFd.js} +124 -80
- package/dist/manager/_manager-chunks/{runtime-DMig8mT7.js → runtime-5o_11Jae.js} +4 -3
- package/dist/manager/_manager-chunks/{runtime-D94Vq3oR.js → runtime-B6NL14pz.js} +5 -531
- package/dist/manager/_manager-chunks/{runtime-eDVAYF7N.js → runtime-BAsOe1C_.js} +10 -29
- package/dist/manager/_manager-chunks/{runtime-EITvVbkG.js → runtime-BdGkqNEt.js} +1 -2
- package/dist/manager/_manager-chunks/{runtime-DcJBhKG9.js → runtime-CJQZFUUj.js} +200 -376
- package/dist/manager/_manager-chunks/{runtime-Bry1Biu7.js → runtime-CgRqs_SK.js} +989 -915
- package/dist/manager/_manager-chunks/{runtime-i-PDAHLR.js → runtime-Dem2xJbS.js} +5 -147
- package/dist/manager/_manager-chunks/runtime-Dtbhxq5m.js +1158 -0
- package/dist/manager/_manager-chunks/runtime-DvB1axgp.js +197 -0
- package/dist/manager/_manager-chunks/runtime-EPerAEAs.js +294 -0
- package/dist/manager/_manager-chunks/runtime-P663lpsR.js +528 -0
- package/dist/manager/globals-runtime.js +1 -1
- package/dist/manager/globals.d.ts +12 -12
- package/dist/manager/globals.js +12 -12
- package/dist/manager/runtime.js +1 -1
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +72 -82
- package/dist/manager-errors.d.ts +1 -1
- package/dist/manager-errors.js +2 -2
- package/dist/mcp/index.js +8 -8
- package/dist/mocking-utils/index.d.ts +2 -2
- package/dist/mocking-utils/index.js +22 -17
- package/dist/mocking-utils/mocker-runtime.js +2 -2
- package/dist/nextjs-vite/index.d.ts +2 -2
- package/dist/nextjs-vite/index.js +4 -3
- package/dist/nextjs-vite/node/index.d.ts +2 -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/preview.js +1 -1
- package/dist/nextjs-vite/vite-plugin/index.js +7 -7
- package/dist/nextjs-vite-plugin/index.d.ts +2 -3
- package/dist/nextjs-vite-plugin/index.js +15 -30
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-image.js +2 -2
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-legacy-image.js +2 -2
- 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-DrTjJkPY.js → runtime-BJwGQok8.js} +77 -76
- 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-CxZK_Ln3.js → runtime-BZ4pNS3g.js} +2 -2
- package/dist/preview/_chunks/runtime-Bcv1hJky.js +6305 -0
- package/dist/preview/_chunks/{runtime-iXdo8CR8.js → runtime-BgPhfM5P.js} +54 -8
- package/dist/preview/_chunks/{runtime-CsV4HZPV.js → runtime-BhSZ1Mwt.js} +335 -137
- package/dist/preview/_chunks/{runtime-BwSxqk3t.js → runtime-BsMjBzuq.js} +6 -16
- package/dist/preview/_chunks/{runtime-CqHxptiK.js → runtime-C1jgT6tJ.js} +93 -2145
- package/dist/preview/_chunks/{runtime-DuHdxMFA.js → runtime-CkOhMcXf.js} +8 -8
- package/dist/preview/_chunks/{runtime-BZSnICCg.js → runtime-WapFVPAh.js} +29 -29
- package/dist/preview/globals.d.ts +10 -10
- package/dist/preview/globals.js +10 -10
- package/dist/preview/runtime.js +1 -1
- package/dist/preview-api/index.d.ts +1 -1
- package/dist/preview-api/index.js +11 -9
- package/dist/preview-errors.d.ts +1 -1
- package/dist/preview-errors.js +2 -2
- package/dist/react/docgen/docgen-worker.js +11 -12
- package/dist/react/entry-preview.js +2 -1
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +6 -4
- package/dist/react/preset.js +13 -14
- package/dist/react/preview.d.ts +1 -1
- package/dist/react/preview.js +3 -2
- package/dist/react-native/bin/get-stories.js +12 -12
- package/dist/react-native/index.d.ts +11 -11
- package/dist/react-native/index.js +46 -231
- package/dist/react-native/metro/node.d.ts +2 -2
- package/dist/react-native/metro/node.js +10 -9
- package/dist/react-native/metro/{withStorybook.d.ts → withForkbook.d.ts} +11 -11
- package/dist/react-native/metro/{withStorybook.js → withForkbook.js} +22 -21
- package/dist/react-native/scripts/generate.d.ts +1 -1
- package/dist/react-native/scripts/generate.js +8 -8
- package/dist/react-native/stub.js +1 -1
- package/dist/react-native-theming/index.d.ts +2 -58
- package/dist/react-native-theming/index.js +63 -2338
- package/dist/react-native-ui/index.d.ts +6 -7
- package/dist/react-native-ui/index.js +207 -624
- package/dist/react-native-ui-common/index.d.ts +2 -3
- package/dist/react-vite/index.d.ts +2 -2
- package/dist/react-vite/node/index.d.ts +3 -3
- package/dist/react-vite/node/index.js +7 -7
- package/dist/react-vite/preset.js +7 -7
- package/dist/router/index.d.ts +69 -1
- package/dist/router/index.js +52 -10
- 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/index.js +2 -2
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
- package/dist/shared/open-service/toolsets/docs/public.d.ts +21 -21
- package/dist/telemetry/index.d.ts +3 -3
- package/dist/telemetry/index.js +43 -45
- package/dist/test/index.js +810 -575
- package/dist/theming/create.js +2 -1
- package/dist/theming/index.d.ts +5 -5
- package/dist/theming/index.js +41 -16
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +5 -5
- package/dist/viewport/index.d.ts +1 -1
- package/package.json +36 -81
- package/template/nextjs-vite/cli/js/Button.stories.js +6 -6
- package/template/nextjs-vite/cli/js/Configure.mdx +100 -100
- package/template/nextjs-vite/cli/js/Header.stories.js +2 -2
- package/template/nextjs-vite/cli/js/Page.jsx +2 -2
- package/template/nextjs-vite/cli/js/Page.stories.js +2 -2
- package/template/nextjs-vite/cli/ts/Button.stories.ts +6 -6
- package/template/nextjs-vite/cli/ts/Configure.mdx +84 -84
- package/template/nextjs-vite/cli/ts/Header.stories.ts +2 -2
- package/template/nextjs-vite/cli/ts/Page.stories.ts +2 -2
- package/template/nextjs-vite/cli/ts/Page.tsx +2 -2
- package/template/react/cli/js/Button.stories.js +6 -6
- package/template/react/cli/js/Header.stories.js +2 -2
- package/template/react/cli/js/Page.jsx +2 -2
- package/template/react/cli/js/Page.stories.js +2 -2
- package/template/react/cli/ts/Button.stories.ts +6 -6
- package/template/react/cli/ts/Header.stories.ts +2 -2
- package/template/react/cli/ts/Page.stories.ts +2 -2
- package/template/react/cli/ts/Page.tsx +2 -2
- package/template/react-vite/cli/js/Button.stories.js +6 -6
- package/template/react-vite/cli/js/Header.stories.js +2 -2
- package/template/react-vite/cli/js/Page.jsx +2 -2
- package/template/react-vite/cli/js/Page.stories.js +2 -2
- package/template/react-vite/cli/ts/Button.stories.ts +6 -6
- package/template/react-vite/cli/ts/Header.stories.ts +2 -2
- package/template/react-vite/cli/ts/Page.stories.ts +2 -2
- package/template/react-vite/cli/ts/Page.tsx +2 -2
- package/assets/browser/nunito-sans-bold-italic.woff2 +0 -0
- package/assets/browser/nunito-sans-bold.woff2 +0 -0
- package/assets/browser/nunito-sans-italic.woff2 +0 -0
- package/assets/browser/nunito-sans-regular.woff2 +0 -0
- package/dist/_browser-chunks/WithTooltip-GZSSFOG3.js +0 -1619
- package/dist/_browser-chunks/chunk-5P4QA6MY.js +0 -20
- package/dist/_browser-chunks/chunk-JMC7AIKT.js +0 -108
- package/dist/_node-chunks/builder-manager-FPV2L36T.js +0 -1661
- package/dist/_node-chunks/chunk-356LV3NX.js +0 -36
- package/dist/_node-chunks/chunk-5BTU7UZ5.js +0 -1877
- package/dist/_node-chunks/chunk-5J3BMBMY.js +0 -51
- package/dist/_node-chunks/chunk-BCRWDMAU.js +0 -11
- package/dist/_node-chunks/chunk-BE6ULVPN.js +0 -662
- package/dist/_node-chunks/chunk-CSXS6LVI.js +0 -29
- package/dist/_node-chunks/chunk-DUOXRUVQ.js +0 -18
- package/dist/_node-chunks/chunk-FUYZNTIS.js +0 -23
- package/dist/_node-chunks/chunk-TB6Y6NSL.js +0 -3837
- package/dist/_node-chunks/chunk-VQEQ7ZLS.js +0 -4731
- package/dist/_node-chunks/chunk-WVCU34IS.js +0 -23
- package/dist/_node-chunks/chunk-Y2DEKWVE.js +0 -3008
- package/dist/_node-chunks/chunk-ZBAIFZNB.js +0 -5414
- package/dist/_node-chunks/dist-ZGSN23B7.js +0 -16
- package/dist/_node-chunks/globby-HWZL7XSQ.js +0 -2884
- package/dist/_node-chunks/jiti-GNDCTFYU.js +0 -3848
- package/dist/_node-chunks/lib-DI662U2R.js +0 -366
- package/dist/_node-chunks/optimized-tests-ZMNICF4R.js +0 -22
- package/dist/_node-chunks/postinstallAddon-NT5XE7IT.js +0 -20
- package/dist/_node-chunks/session-id-OO2WQF5N.js +0 -23
- package/dist/chunk-BfBzpgct.d.ts +0 -916
- package/dist/chunk-BxWufQms.d.ts +0 -142
- package/dist/core-server/presets/common-manager.css +0 -170
- package/dist/manager/_manager-chunks/globals-runtime-BIKBO23x.js +0 -3389
- package/dist/manager/_manager-chunks/globals-runtime-DkAPXCvc.js +0 -9766
- package/dist/manager/_manager-chunks/globals-runtime-DtcOnYHR.js +0 -5357
- package/dist/manager/_manager-chunks/runtime-B1L9TH89.js +0 -452
- package/dist/manager/_manager-chunks/runtime-Bly6WJLN.js +0 -998
- package/dist/manager/_manager-chunks/runtime-DpgBAFGf.js +0 -22
- package/dist/preview/_chunks/runtime-BTPtVY1p.js +0 -1102
- package/dist/preview/_chunks/runtime-DZToXfvO.js +0 -9767
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_i135z88drol from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_i135z88drol from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_i135z88drol from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_i135z88drol.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_i135z88drol.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_i135z88drol.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
nodePathsToArray
|
|
14
|
+
} from "./chunk-GTXZNA2L.js";
|
|
15
|
+
import {
|
|
16
|
+
Tag
|
|
17
|
+
} from "./chunk-RNRGXAFV.js";
|
|
18
|
+
|
|
19
|
+
// src/common/utils/envs.ts
|
|
20
|
+
var isWebContainer = () => process.versions.webcontainer != null;
|
|
21
|
+
async function loadEnvs(options = {}) {
|
|
22
|
+
let { loadEnv } = await import("vite"), defaultNodeEnv = options.production ? "production" : "development", baseEnv = {
|
|
23
|
+
NODE_ENV: process.env.NODE_ENV || defaultNodeEnv,
|
|
24
|
+
NODE_PATH: process.env.NODE_PATH || "",
|
|
25
|
+
STORYBOOK: process.env.STORYBOOK || "true",
|
|
26
|
+
// This is to support CRA's public folder feature.
|
|
27
|
+
// In production we set this to dot(.) to allow the browser to access these assets
|
|
28
|
+
// even when deployed inside a subpath. (like in GitHub pages)
|
|
29
|
+
// In development this is just empty as we always serves from the root.
|
|
30
|
+
PUBLIC_URL: options.production ? "." : ""
|
|
31
|
+
}, envEntries = loadEnv(baseEnv.NODE_ENV, process.cwd(), "FORKBOOK_"), raw = { ...baseEnv, ...envEntries };
|
|
32
|
+
raw.NODE_PATH = nodePathsToArray(raw.NODE_PATH || "");
|
|
33
|
+
let stringified = Object.fromEntries(
|
|
34
|
+
Object.entries(raw).map(([key, value]) => [key, JSON.stringify(value)])
|
|
35
|
+
);
|
|
36
|
+
return { raw, stringified };
|
|
37
|
+
}
|
|
38
|
+
var stringifyEnvs = (raw) => Object.entries(raw).reduce((acc, [key, value]) => (acc[key] = JSON.stringify(value), acc), {}), stringifyProcessEnvs = (raw) => Object.entries(raw).reduce((acc, [key, value]) => (acc[`process.env.${key}`] = JSON.stringify(value), acc), {}), optionalEnvToBoolean = (input) => {
|
|
39
|
+
if (input !== void 0)
|
|
40
|
+
return input.toUpperCase() === "FALSE" || input === "0" ? !1 : input.toUpperCase() === "TRUE" || input === "1" ? !0 : !!input;
|
|
41
|
+
};
|
|
42
|
+
function isCI() {
|
|
43
|
+
return optionalEnvToBoolean(process.env.CI);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// src/common/utils/component-id.ts
|
|
47
|
+
function getComponentIdFromEntry(entry) {
|
|
48
|
+
return entry.id.split("--")[0];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// src/common/utils/select-component-entry.ts
|
|
52
|
+
import { dedent } from "ts-dedent";
|
|
53
|
+
import { once } from "@aussieljk/forkbook/internal/node-logger";
|
|
54
|
+
var STORY_FILE_TEST_REGEXP = /(stories|story)\.(m?js|ts)x?$/;
|
|
55
|
+
function isAttachedDocsEntry(entry) {
|
|
56
|
+
return entry.type === "docs" && entry.tags?.includes(Tag.ATTACHED_MDX) === !0 && entry.storiesImports.length > 0;
|
|
57
|
+
}
|
|
58
|
+
function isEligibleStoryEntry(entry) {
|
|
59
|
+
return entry.type === "story" && entry.subtype === "story";
|
|
60
|
+
}
|
|
61
|
+
function getStoryImportPathFromEntry(entry) {
|
|
62
|
+
if (entry.type === "story")
|
|
63
|
+
return entry.importPath;
|
|
64
|
+
if (isAttachedDocsEntry(entry))
|
|
65
|
+
return entry.storiesImports[0];
|
|
66
|
+
}
|
|
67
|
+
function buildCollisionWarning(componentId, importPaths, winner) {
|
|
68
|
+
let sortedPaths = Array.from(importPaths).sort();
|
|
69
|
+
return dedent`
|
|
70
|
+
Multiple story files share the component id '${componentId}':
|
|
71
|
+
${sortedPaths.map((path) => ` - ${path}`).join(`
|
|
72
|
+
`)}
|
|
73
|
+
The props table and description for this id are generated from '${winner.importPath}' only. If these files document different components, give each file a unique title so every component keeps its docs.
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
76
|
+
function selectComponentEntriesByComponentId(indexEntries) {
|
|
77
|
+
let entriesByComponentId = /* @__PURE__ */ new Map(), storyImportPathsByComponentId = /* @__PURE__ */ new Map();
|
|
78
|
+
for (let entry of indexEntries) {
|
|
79
|
+
if (!isEligibleStoryEntry(entry))
|
|
80
|
+
continue;
|
|
81
|
+
let componentId = getComponentIdFromEntry(entry);
|
|
82
|
+
entriesByComponentId.set(componentId, entry);
|
|
83
|
+
let importPaths = storyImportPathsByComponentId.get(componentId) ?? /* @__PURE__ */ new Set();
|
|
84
|
+
importPaths.add(entry.importPath), storyImportPathsByComponentId.set(componentId, importPaths);
|
|
85
|
+
}
|
|
86
|
+
for (let [componentId, importPaths] of storyImportPathsByComponentId) {
|
|
87
|
+
let winner = entriesByComponentId.get(componentId);
|
|
88
|
+
importPaths.size > 1 && winner && once.warn(buildCollisionWarning(componentId, importPaths, winner));
|
|
89
|
+
}
|
|
90
|
+
for (let entry of indexEntries) {
|
|
91
|
+
if (!isAttachedDocsEntry(entry))
|
|
92
|
+
continue;
|
|
93
|
+
let componentId = getComponentIdFromEntry(entry);
|
|
94
|
+
entriesByComponentId.has(componentId) || entriesByComponentId.set(componentId, entry);
|
|
95
|
+
}
|
|
96
|
+
return entriesByComponentId;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// src/common/utils/exec.ts
|
|
100
|
+
import { fork } from "node:child_process";
|
|
101
|
+
|
|
102
|
+
// ../../node_modules/tinyexec/dist/main.mjs
|
|
103
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
104
|
+
import { cwd } from "node:process";
|
|
105
|
+
import { basename, delimiter, dirname, normalize, resolve } from "node:path";
|
|
106
|
+
import { fileURLToPath } from "node:url";
|
|
107
|
+
import { pipeline } from "node:stream/promises";
|
|
108
|
+
import { PassThrough } from "node:stream";
|
|
109
|
+
import readline from "node:readline";
|
|
110
|
+
import { closeSync, openSync, readSync, statSync } from "node:fs";
|
|
111
|
+
var isPathLikePattern = /^path$/i, defaultEnvPathInfo = {
|
|
112
|
+
key: "PATH",
|
|
113
|
+
value: ""
|
|
114
|
+
};
|
|
115
|
+
function getPathFromEnv(env) {
|
|
116
|
+
for (let key in env) {
|
|
117
|
+
if (!Object.prototype.hasOwnProperty.call(env, key) || !isPathLikePattern.test(key)) continue;
|
|
118
|
+
let value = env[key];
|
|
119
|
+
return value ? {
|
|
120
|
+
key,
|
|
121
|
+
value
|
|
122
|
+
} : defaultEnvPathInfo;
|
|
123
|
+
}
|
|
124
|
+
return defaultEnvPathInfo;
|
|
125
|
+
}
|
|
126
|
+
function addNodeBinToPath(cwd2, path) {
|
|
127
|
+
let parts = path.value.split(delimiter), nodeBinPaths = [], currentPath = typeof cwd2 == "string" ? cwd2 : fileURLToPath(cwd2, { windows: !1 }), lastPath;
|
|
128
|
+
do
|
|
129
|
+
nodeBinPaths.push(resolve(currentPath, "node_modules", ".bin")), lastPath = currentPath, currentPath = dirname(currentPath);
|
|
130
|
+
while (currentPath !== lastPath);
|
|
131
|
+
nodeBinPaths.push(dirname(process.execPath));
|
|
132
|
+
let newPath = nodeBinPaths.concat(parts).join(delimiter);
|
|
133
|
+
return {
|
|
134
|
+
key: path.key,
|
|
135
|
+
value: newPath
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
function computeEnv(cwd2, env, nodePath = !0) {
|
|
139
|
+
let envWithDefault = {
|
|
140
|
+
...process.env,
|
|
141
|
+
...env
|
|
142
|
+
};
|
|
143
|
+
if (!nodePath) return envWithDefault;
|
|
144
|
+
let envPathInfo = addNodeBinToPath(cwd2, getPathFromEnv(envWithDefault));
|
|
145
|
+
return envWithDefault[envPathInfo.key] = envPathInfo.value, envWithDefault;
|
|
146
|
+
}
|
|
147
|
+
var combineStreams = (streams) => {
|
|
148
|
+
let streamCount = streams.length, combined = new PassThrough(), maybeEmitEnd = () => {
|
|
149
|
+
--streamCount === 0 && combined.end();
|
|
150
|
+
};
|
|
151
|
+
for (let stream of streams) pipeline(stream, combined, { end: !1 }).then(maybeEmitEnd).catch(maybeEmitEnd);
|
|
152
|
+
return combined;
|
|
153
|
+
}, metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g, shebangRegExp = /^#!\s*(.+)/, isWindowsExecutableRegExp = /\.(?:com|exe)$/i, isNodeModulesCmdRegExp = /node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i, isWindows = process.platform === "win32", defaultPathExt = [
|
|
154
|
+
".EXE",
|
|
155
|
+
".CMD",
|
|
156
|
+
".BAT",
|
|
157
|
+
".COM"
|
|
158
|
+
], noPathExt = [""];
|
|
159
|
+
function normalizeSpawnCommand(command, args = [], options = {}) {
|
|
160
|
+
if (options.shell === !0 || !isWindows) return {
|
|
161
|
+
command,
|
|
162
|
+
args,
|
|
163
|
+
options
|
|
164
|
+
};
|
|
165
|
+
let file = resolveCommand(command, options), shebang = null;
|
|
166
|
+
if (file !== null) {
|
|
167
|
+
let buffer = Buffer.alloc(150), fd = null;
|
|
168
|
+
try {
|
|
169
|
+
fd = openSync(file, "r"), readSync(fd, buffer, 0, 150, 0);
|
|
170
|
+
} catch {
|
|
171
|
+
} finally {
|
|
172
|
+
fd !== null && closeSync(fd);
|
|
173
|
+
}
|
|
174
|
+
let match = buffer.toString().match(shebangRegExp);
|
|
175
|
+
if (match !== null) {
|
|
176
|
+
let line = match[1].trim(), separatorIndex = line.indexOf(" "), path = separatorIndex !== -1 ? line.slice(0, separatorIndex) : line, argument = separatorIndex !== -1 ? line.slice(separatorIndex + 1) : "", binary = basename(path);
|
|
177
|
+
shebang = binary === "env" ? argument || null : binary;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
if (shebang !== null && file !== null && (args = [file, ...args], command = shebang, file = resolveCommand(command, options)), file === null || !isWindowsExecutableRegExp.test(file)) {
|
|
181
|
+
let needsDoubleEscapeMetaChars = file !== null && isNodeModulesCmdRegExp.test(file);
|
|
182
|
+
command = normalize(command), command = command.replace(metaCharsRegExp, "^$1"), args = args.map((arg) => (arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"'), arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1"), arg = `"${arg}"`, arg = arg.replace(metaCharsRegExp, "^$1"), needsDoubleEscapeMetaChars && (arg = arg.replace(metaCharsRegExp, "^$1")), arg)), args = [
|
|
183
|
+
"/d",
|
|
184
|
+
"/s",
|
|
185
|
+
"/c",
|
|
186
|
+
`"${[command, ...args].join(" ")}"`
|
|
187
|
+
], command = options.env?.comspec ?? "cmd.exe", options = {
|
|
188
|
+
...options,
|
|
189
|
+
windowsVerbatimArguments: !0
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
return {
|
|
193
|
+
command,
|
|
194
|
+
args,
|
|
195
|
+
options
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function resolveCommand(command, options) {
|
|
199
|
+
let cwd$3 = (options.cwd ?? cwd()).toString(), env = options.env ?? process.env, PATH = getPathFromEnv(env).value, pathEnv = command.includes("/") || command.includes("\\") ? [""] : [cwd$3, ...PATH.split(delimiter)], pathExt = env.PATHEXT ? env.PATHEXT.split(delimiter) : defaultPathExt;
|
|
200
|
+
command.includes(".") && pathExt[0] !== "" && (pathExt = ["", ...pathExt]);
|
|
201
|
+
for (let extensions of [pathExt, noPathExt]) for (let path of pathEnv) {
|
|
202
|
+
let unquoted = path.startsWith('"') && path.endsWith('"') && path.length > 1 ? path.slice(1, -1) : path, dest = resolve(cwd$3, unquoted, command);
|
|
203
|
+
for (let ext of extensions) {
|
|
204
|
+
let destWithExt = dest + ext;
|
|
205
|
+
try {
|
|
206
|
+
if (statSync(destWithExt).isFile()) return destWithExt;
|
|
207
|
+
} catch {
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return null;
|
|
212
|
+
}
|
|
213
|
+
var NonZeroExitError = class extends Error {
|
|
214
|
+
result;
|
|
215
|
+
output;
|
|
216
|
+
exitCode;
|
|
217
|
+
get signalCode() {
|
|
218
|
+
return this.result.signalCode;
|
|
219
|
+
}
|
|
220
|
+
constructor(result, output, command, args) {
|
|
221
|
+
let target = "The process";
|
|
222
|
+
command && (target = `The command \`${args?.length ? `${command} ${args.map((a) => /[ "'`()]/.test(a) ? JSON.stringify(a) : a).join(" ")}` : command}\``);
|
|
223
|
+
let exitCode = result.exitCode ?? 1;
|
|
224
|
+
super(result.signalCode !== null ? `${target} was killed by the signal ${result.signalCode}` : `${target} exited with a non-zero status (${exitCode})`), this.result = result, this.output = output, this.exitCode = exitCode, Object.defineProperty(this, "result", {
|
|
225
|
+
enumerable: !1,
|
|
226
|
+
writable: !1,
|
|
227
|
+
configurable: !1
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
}, LINE_SEPARATOR_REGEX = /\r?\n/, defaultOptions = {
|
|
231
|
+
timeout: void 0,
|
|
232
|
+
persist: !1
|
|
233
|
+
}, defaultSyncOptions = { timeout: void 0 }, defaultNodeOptions = { windowsHide: !0 };
|
|
234
|
+
function combineSignals(signals) {
|
|
235
|
+
let controller = new AbortController();
|
|
236
|
+
for (let signal of signals) {
|
|
237
|
+
if (signal.aborted)
|
|
238
|
+
return controller.abort(), signal;
|
|
239
|
+
let onAbort = () => {
|
|
240
|
+
controller.abort(signal.reason);
|
|
241
|
+
};
|
|
242
|
+
signal.addEventListener("abort", onAbort, { signal: controller.signal });
|
|
243
|
+
}
|
|
244
|
+
return controller.signal;
|
|
245
|
+
}
|
|
246
|
+
async function readStream(stream) {
|
|
247
|
+
let output = "";
|
|
248
|
+
try {
|
|
249
|
+
for await (let chunk of stream) output += chunk.toString();
|
|
250
|
+
} catch {
|
|
251
|
+
}
|
|
252
|
+
return output;
|
|
253
|
+
}
|
|
254
|
+
var ExecProcess = class {
|
|
255
|
+
_process;
|
|
256
|
+
_aborted = !1;
|
|
257
|
+
_options;
|
|
258
|
+
_command;
|
|
259
|
+
_args;
|
|
260
|
+
_resolveClose;
|
|
261
|
+
_processClosed;
|
|
262
|
+
_thrownError;
|
|
263
|
+
get process() {
|
|
264
|
+
return this._process;
|
|
265
|
+
}
|
|
266
|
+
get pid() {
|
|
267
|
+
return this._process?.pid;
|
|
268
|
+
}
|
|
269
|
+
get exitCode() {
|
|
270
|
+
if (this._process && this._process.exitCode !== null) return this._process.exitCode;
|
|
271
|
+
}
|
|
272
|
+
get signalCode() {
|
|
273
|
+
return this._process?.signalCode ?? null;
|
|
274
|
+
}
|
|
275
|
+
constructor(command, args, options) {
|
|
276
|
+
this._options = {
|
|
277
|
+
...defaultOptions,
|
|
278
|
+
...options
|
|
279
|
+
}, this._command = command, this._args = args ?? [], this._processClosed = new Promise((resolve2) => {
|
|
280
|
+
this._resolveClose = resolve2;
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
kill(signal) {
|
|
284
|
+
return this._process?.kill(signal) === !0;
|
|
285
|
+
}
|
|
286
|
+
get aborted() {
|
|
287
|
+
return this._aborted;
|
|
288
|
+
}
|
|
289
|
+
get killed() {
|
|
290
|
+
return this._process?.killed === !0;
|
|
291
|
+
}
|
|
292
|
+
pipe(command, args, options) {
|
|
293
|
+
return exec(command, args, {
|
|
294
|
+
...options,
|
|
295
|
+
stdin: this
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
async *[Symbol.asyncIterator]() {
|
|
299
|
+
let proc = this._process;
|
|
300
|
+
if (!proc) return;
|
|
301
|
+
let streams = [];
|
|
302
|
+
this._streamErr && streams.push(this._streamErr), this._streamOut && streams.push(this._streamOut);
|
|
303
|
+
let streamCombined = combineStreams(streams), rl = readline.createInterface({ input: streamCombined });
|
|
304
|
+
for await (let chunk of rl) yield chunk.toString();
|
|
305
|
+
if (await this._processClosed, proc.removeAllListeners(), this._thrownError) throw this._thrownError;
|
|
306
|
+
if (this._options?.throwOnError && (this.exitCode !== 0 && this.exitCode !== void 0 || this.signalCode !== null)) throw new NonZeroExitError(this, void 0, this._command, this._args);
|
|
307
|
+
}
|
|
308
|
+
async _waitForOutput() {
|
|
309
|
+
let proc = this._process;
|
|
310
|
+
if (!proc) throw new Error("No process was started");
|
|
311
|
+
let [stdout, stderr] = await Promise.all([this._streamOut ? readStream(this._streamOut) : "", this._streamErr ? readStream(this._streamErr) : ""]);
|
|
312
|
+
await this._processClosed;
|
|
313
|
+
let { stdin } = this._options;
|
|
314
|
+
if (stdin && typeof stdin != "string" && await stdin, proc.removeAllListeners(), this._thrownError) throw this._thrownError;
|
|
315
|
+
let result = {
|
|
316
|
+
stderr,
|
|
317
|
+
stdout,
|
|
318
|
+
exitCode: this.exitCode
|
|
319
|
+
};
|
|
320
|
+
if (this._options.throwOnError && (this.exitCode !== 0 && this.exitCode !== void 0 || this.signalCode !== null)) throw new NonZeroExitError(this, result, this._command, this._args);
|
|
321
|
+
return result;
|
|
322
|
+
}
|
|
323
|
+
then(onfulfilled, onrejected) {
|
|
324
|
+
return this._waitForOutput().then(onfulfilled, onrejected);
|
|
325
|
+
}
|
|
326
|
+
_streamOut;
|
|
327
|
+
_streamErr;
|
|
328
|
+
spawn() {
|
|
329
|
+
let options = this._options, nodeOptions = {
|
|
330
|
+
...defaultNodeOptions,
|
|
331
|
+
...options.nodeOptions
|
|
332
|
+
}, cwd$1 = nodeOptions?.cwd ?? cwd(), signals = [];
|
|
333
|
+
this._resetState(), options.timeout !== void 0 && signals.push(AbortSignal.timeout(options.timeout)), options.signal !== void 0 && signals.push(options.signal), options.persist === !0 && (nodeOptions.detached = !0), signals.length > 0 && (nodeOptions.signal = combineSignals(signals)), nodeOptions.env = computeEnv(cwd$1, nodeOptions.env, options.nodePath);
|
|
334
|
+
let crossResult = normalizeSpawnCommand(this._command, this._args, nodeOptions), handle = spawn(crossResult.command, crossResult.args, crossResult.options);
|
|
335
|
+
if (handle.stderr && (this._streamErr = handle.stderr), handle.stdout && (this._streamOut = handle.stdout), this._process = handle, handle.once("error", this._onError), handle.once("close", this._onClose), handle.stdin) {
|
|
336
|
+
let { stdin } = options;
|
|
337
|
+
typeof stdin == "string" ? handle.stdin.end(stdin) : stdin?.process?.stdout?.pipe(handle.stdin);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
_resetState() {
|
|
341
|
+
this._aborted = !1, this._processClosed = new Promise((resolve2) => {
|
|
342
|
+
this._resolveClose = resolve2;
|
|
343
|
+
}), this._thrownError = void 0;
|
|
344
|
+
}
|
|
345
|
+
_onError = (err) => {
|
|
346
|
+
if (err.name === "AbortError" && (!(err.cause instanceof Error) || err.cause.name !== "TimeoutError")) {
|
|
347
|
+
this._aborted = !0;
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
this._thrownError = err;
|
|
351
|
+
};
|
|
352
|
+
_onClose = () => {
|
|
353
|
+
this._resolveClose && this._resolveClose();
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
function xSync(command, args, options) {
|
|
357
|
+
let opts = {
|
|
358
|
+
...defaultSyncOptions,
|
|
359
|
+
...options
|
|
360
|
+
}, nodeOptions = {
|
|
361
|
+
...defaultNodeOptions,
|
|
362
|
+
...opts.nodeOptions
|
|
363
|
+
}, cwd$2 = nodeOptions?.cwd ?? cwd();
|
|
364
|
+
opts.timeout !== void 0 && (nodeOptions.timeout = opts.timeout), nodeOptions.env = computeEnv(cwd$2, nodeOptions.env, opts.nodePath);
|
|
365
|
+
let crossResult = normalizeSpawnCommand(command, args ?? [], nodeOptions), spawnResult = spawnSync(crossResult.command, crossResult.args, crossResult.options);
|
|
366
|
+
if (spawnResult.error) throw spawnResult.error;
|
|
367
|
+
let stdout = spawnResult.stdout?.toString() ?? "", stderr = spawnResult.stderr?.toString() ?? "", exitCode = spawnResult.status ?? void 0, signalCode = spawnResult.signal ?? null, killed = signalCode !== null, result = {
|
|
368
|
+
stdout,
|
|
369
|
+
stderr,
|
|
370
|
+
get exitCode() {
|
|
371
|
+
return exitCode;
|
|
372
|
+
},
|
|
373
|
+
get signalCode() {
|
|
374
|
+
return signalCode;
|
|
375
|
+
},
|
|
376
|
+
get pid() {
|
|
377
|
+
return spawnResult.pid;
|
|
378
|
+
},
|
|
379
|
+
get killed() {
|
|
380
|
+
return killed;
|
|
381
|
+
},
|
|
382
|
+
*[Symbol.iterator]() {
|
|
383
|
+
for (let text of [stdout, stderr]) {
|
|
384
|
+
if (!text) continue;
|
|
385
|
+
let lines = text.split(LINE_SEPARATOR_REGEX);
|
|
386
|
+
lines[lines.length - 1] === "" && lines.pop(), yield* lines;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
if (opts.throwOnError && (exitCode !== 0 && exitCode !== void 0 || signalCode !== null)) throw new NonZeroExitError(result, {
|
|
391
|
+
stdout: result.stdout,
|
|
392
|
+
stderr: result.stderr,
|
|
393
|
+
exitCode: result.exitCode
|
|
394
|
+
}, command, args);
|
|
395
|
+
return result;
|
|
396
|
+
}
|
|
397
|
+
var x = (command, args, userOptions) => {
|
|
398
|
+
let proc = new ExecProcess(command, args, userOptions);
|
|
399
|
+
return proc.spawn(), proc;
|
|
400
|
+
}, exec = x;
|
|
401
|
+
|
|
402
|
+
// src/common/utils/exec.ts
|
|
403
|
+
var ExecError = class extends Error {
|
|
404
|
+
constructor(command, {
|
|
405
|
+
exitCode,
|
|
406
|
+
signal,
|
|
407
|
+
code,
|
|
408
|
+
stdout = "",
|
|
409
|
+
stderr = "",
|
|
410
|
+
cause
|
|
411
|
+
}) {
|
|
412
|
+
let shortMessage = `Command ${signal ? `was killed with ${signal}` : code ? `failed with ${code}` : `failed with exit code ${exitCode}`}: ${command}`;
|
|
413
|
+
super([shortMessage, stderr, stdout].filter(Boolean).join(`
|
|
414
|
+
|
|
415
|
+
`), { cause }), this.name = "ExecError", this.command = command, this.shortMessage = shortMessage, this.exitCode = exitCode, this.signal = signal, this.code = code, this.stdout = stdout, this.stderr = stderr;
|
|
416
|
+
}
|
|
417
|
+
}, withProcessEnv = (env) => ({ ...process.env, ...env });
|
|
418
|
+
function exec2(command, args = [], options = {}) {
|
|
419
|
+
let commandLine = [command, ...args].join(" "), result = x(command, args, {
|
|
420
|
+
throwOnError: !1,
|
|
421
|
+
timeout: options.timeout,
|
|
422
|
+
nodeOptions: {
|
|
423
|
+
cwd: options.cwd,
|
|
424
|
+
env: withProcessEnv(options.env),
|
|
425
|
+
stdio: options.stdio ?? "pipe",
|
|
426
|
+
signal: options.signal,
|
|
427
|
+
shell: options.shell
|
|
428
|
+
}
|
|
429
|
+
}), promise = Promise.resolve(result).then(
|
|
430
|
+
(output) => {
|
|
431
|
+
let signal = result.signalCode ?? void 0;
|
|
432
|
+
if (output.exitCode !== 0 || signal)
|
|
433
|
+
throw new ExecError(commandLine, { ...output, signal });
|
|
434
|
+
return output;
|
|
435
|
+
},
|
|
436
|
+
(error) => {
|
|
437
|
+
throw error?.name === "AbortError" ? error : new ExecError(commandLine, { code: error?.code, cause: error });
|
|
438
|
+
}
|
|
439
|
+
);
|
|
440
|
+
return Object.assign(promise, {
|
|
441
|
+
stdout: result.process?.stdout ?? null,
|
|
442
|
+
stderr: result.process?.stderr ?? null,
|
|
443
|
+
kill: () => result.kill()
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
function execSync(command, args = [], options = {}) {
|
|
447
|
+
let commandLine = [command, ...args].join(" "), output;
|
|
448
|
+
try {
|
|
449
|
+
output = xSync(command, args, {
|
|
450
|
+
throwOnError: !1,
|
|
451
|
+
timeout: options.timeout,
|
|
452
|
+
nodeOptions: {
|
|
453
|
+
cwd: options.cwd,
|
|
454
|
+
env: withProcessEnv(options.env),
|
|
455
|
+
stdio: options.stdio ?? "pipe",
|
|
456
|
+
encoding: "utf8",
|
|
457
|
+
shell: options.shell
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
} catch (error) {
|
|
461
|
+
throw new ExecError(commandLine, {
|
|
462
|
+
code: error?.code,
|
|
463
|
+
cause: error
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
let signal = output.signalCode ?? void 0;
|
|
467
|
+
if (output.exitCode !== 0 || signal)
|
|
468
|
+
throw new ExecError(commandLine, { ...output, signal });
|
|
469
|
+
return output;
|
|
470
|
+
}
|
|
471
|
+
function execNode(scriptPath, args = [], options = {}) {
|
|
472
|
+
return fork(scriptPath, args, {
|
|
473
|
+
cwd: options.cwd,
|
|
474
|
+
env: withProcessEnv(options.env),
|
|
475
|
+
signal: options.signal,
|
|
476
|
+
stdio: ["pipe", "pipe", "pipe", "ipc"]
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
export {
|
|
481
|
+
exec2 as exec,
|
|
482
|
+
execSync,
|
|
483
|
+
execNode,
|
|
484
|
+
isWebContainer,
|
|
485
|
+
loadEnvs,
|
|
486
|
+
stringifyEnvs,
|
|
487
|
+
stringifyProcessEnvs,
|
|
488
|
+
optionalEnvToBoolean,
|
|
489
|
+
isCI,
|
|
490
|
+
getComponentIdFromEntry,
|
|
491
|
+
STORY_FILE_TEST_REGEXP,
|
|
492
|
+
isEligibleStoryEntry,
|
|
493
|
+
getStoryImportPathFromEntry,
|
|
494
|
+
selectComponentEntriesByComponentId
|
|
495
|
+
};
|