@aussieljk/forkbook 0.0.1-1 → 0.0.1-10
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 +24 -26
- package/dist/_browser-chunks/{Color-OEKZ7XSW.js → Color-X63I7FHI.js} +8 -8
- package/dist/_browser-chunks/WithTooltip-5S6F2P7L.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-VVWPND3J.js → chunk-5Z65SURM.js} +12 -12
- 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-73OX2G56.js → chunk-LTCXWKZO.js} +100 -108
- 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-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-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-PDBJ2EGV.js} +30 -30
- package/dist/_node-chunks/builder-manager-VLL26RPG.js +1139 -0
- package/dist/_node-chunks/{chunk-GP5YLBNS.js → chunk-3CSGIJKG.js} +8 -8
- package/dist/_node-chunks/chunk-3W4KR5GX.js +2609 -0
- package/dist/_node-chunks/{chunk-SRXCCL2O.js → chunk-5NRWU7S2.js} +7 -7
- package/dist/_node-chunks/{chunk-GSWBRZLU.js → chunk-5SMIGUYF.js} +9 -17
- package/dist/_node-chunks/{chunk-JVQYQTTM.js → chunk-63LPGIV4.js} +42 -87
- package/dist/_node-chunks/{chunk-5RNOGGO6.js → chunk-6DHTL5G2.js} +6 -6
- package/dist/_node-chunks/{chunk-RQVK2TOI.js → chunk-6DRVJCYP.js} +14 -13
- package/dist/_node-chunks/chunk-7CV4VEA2.js +620 -0
- package/dist/_node-chunks/{chunk-ZMEGPR47.js → chunk-7KD5DKGZ.js} +6 -6
- package/dist/_node-chunks/{chunk-4PK3LUHM.js → chunk-7O2UIVID.js} +7 -7
- package/dist/_node-chunks/{chunk-GT5EHMNM.js → chunk-7OY4VMAT.js} +7 -7
- package/dist/_node-chunks/{chunk-YWMICX2T.js → chunk-AAL6X7YG.js} +12 -12
- package/dist/_node-chunks/{chunk-XURIZ7IC.js → chunk-ACSO4HQP.js} +8 -8
- package/dist/_node-chunks/{chunk-6EJ5NPEM.js → chunk-BDU3ZUMK.js} +7 -7
- package/dist/_node-chunks/chunk-BMJPOQ2S.js +11 -0
- package/dist/_node-chunks/chunk-BNEC3EBC.js +28 -0
- package/dist/_node-chunks/chunk-BPL3ERBH.js +347 -0
- package/dist/_node-chunks/{chunk-VXDWOVWD.js → chunk-BXDMSX3D.js} +29843 -51588
- package/dist/_node-chunks/chunk-C3PLG47Q.js +25 -0
- package/dist/_node-chunks/{chunk-R5FYRP6X.js → chunk-CEDR5CNM.js} +7 -7
- package/dist/_node-chunks/{chunk-7TSL7D5D.js → chunk-CKE4R4NL.js} +6 -6
- package/dist/_node-chunks/{chunk-5J3O7EDY.js → chunk-CSFNS7HA.js} +6 -6
- package/dist/_node-chunks/{chunk-7LLQDMVS.js → chunk-CZ3V3HHK.js} +6 -6
- package/dist/_node-chunks/{chunk-G6PUNHCI.js → chunk-DNV3LPV3.js} +6 -6
- package/dist/_node-chunks/{chunk-XCGMRAV5.js → chunk-DPILYJH4.js} +7 -7
- package/dist/_node-chunks/{chunk-2BJIHWOK.js → chunk-DQ44ZAEM.js} +6 -6
- package/dist/_node-chunks/{chunk-URRTQ2QM.js → chunk-DR7NW2MI.js} +8 -8
- package/dist/_node-chunks/{chunk-CDRLLNRQ.js → chunk-DRCP3DQF.js} +11 -11
- package/dist/_node-chunks/{chunk-5WHA37KG.js → chunk-EBWZKN2I.js} +39 -39
- package/dist/_node-chunks/{chunk-AWXGCPW6.js → chunk-ECOW63CV.js} +6 -6
- package/dist/_node-chunks/chunk-ENBDAHOV.js +18 -0
- package/dist/_node-chunks/{chunk-SVZ6Q3CS.js → chunk-FAEOR2AW.js} +6 -6
- package/dist/_node-chunks/{chunk-MDKFZRYG.js → chunk-FERXOKZY.js} +8 -8
- package/dist/_node-chunks/chunk-FJFB7TWU.js +495 -0
- package/dist/_node-chunks/{chunk-NKAUZU4C.js → chunk-FQGQ5KHN.js} +6 -6
- package/dist/_node-chunks/{chunk-CWD5A6NI.js → chunk-FR2ZDWKJ.js} +7 -7
- package/dist/_node-chunks/{chunk-JBCKN6P4.js → chunk-FRBE7ES4.js} +6 -6
- package/dist/_node-chunks/chunk-FWAF5NBL.js +20 -0
- package/dist/_node-chunks/{chunk-IZISFDKM.js → chunk-FXBZWUW3.js} +54 -42
- package/dist/_node-chunks/chunk-FZ453CHY.js +25 -0
- package/dist/_node-chunks/{chunk-NZ3GOT7V.js → chunk-G2ZUFOHU.js} +6 -6
- package/dist/_node-chunks/{chunk-PEIAGMSR.js → chunk-GBVWRZHP.js} +6 -6
- package/dist/_node-chunks/{chunk-3CLITGI2.js → chunk-GGE7TBVX.js} +6 -6
- package/dist/_node-chunks/{chunk-QMU5ODXZ.js → chunk-GJSYGBI5.js} +7 -7
- package/dist/_node-chunks/{chunk-U4GKV7GZ.js → chunk-GKHLTHYM.js} +10 -10
- package/dist/_node-chunks/{chunk-I2ANCID7.js → chunk-GQYATLH6.js} +66 -145
- package/dist/_node-chunks/{chunk-RJXEPYEN.js → chunk-HCP5DG52.js} +64 -21
- package/dist/_node-chunks/chunk-HVOSLI2K.js +20 -0
- package/dist/_node-chunks/{chunk-A724RK5H.js → chunk-ID3WA6WR.js} +9 -6
- package/dist/_node-chunks/{chunk-IJL5JOLL.js → chunk-IGOX6TUG.js} +7 -7
- package/dist/_node-chunks/{chunk-2JSABFAM.js → chunk-IL7YA7QJ.js} +10 -10
- package/dist/_node-chunks/{chunk-RHG33T7C.js → chunk-IUPE4SU2.js} +10 -10
- package/dist/_node-chunks/{chunk-CXLL2F6O.js → chunk-JVWXCB3L.js} +25 -8
- package/dist/_node-chunks/chunk-K4O2ZAMU.js +57 -0
- package/dist/_node-chunks/{chunk-XTTAS346.js → chunk-KRWR44KT.js} +6 -6
- package/dist/_node-chunks/{chunk-HKUNJELN.js → chunk-KWNBN3DV.js} +8 -8
- package/dist/_node-chunks/{chunk-4TV3Z3S3.js → chunk-LG3NMXCM.js} +6 -6
- package/dist/_node-chunks/{chunk-CYPPELO4.js → chunk-LH5QBX2U.js} +22 -32
- package/dist/_node-chunks/{chunk-XJSYJTBD.js → chunk-LX2XSPPL.js} +7 -7
- package/dist/_node-chunks/{chunk-G5OYQQDY.js → chunk-M4QNXI37.js} +6 -6
- package/dist/_node-chunks/{chunk-ILWHW4HU.js → chunk-MBPHOLXB.js} +15 -15
- package/dist/_node-chunks/{chunk-2UG3IYCC.js → chunk-MIWBXEUH.js} +6 -6
- package/dist/_node-chunks/{chunk-HKQEE62W.js → chunk-MKUA4ZCG.js} +8 -8
- package/dist/_node-chunks/{chunk-JEC2OK5B.js → chunk-MQC7ZY6L.js} +7 -7
- package/dist/_node-chunks/{chunk-NIHZECYO.js → chunk-MRCPS4S3.js} +6 -6
- package/dist/_node-chunks/{chunk-2XDUXZGI.js → chunk-MY7UVHPL.js} +8 -8
- package/dist/_node-chunks/{chunk-R7CY5LX6.js → chunk-ND323XCC.js} +6 -6
- package/dist/_node-chunks/{chunk-5GN5N22E.js → chunk-NGFFEW2B.js} +131 -148
- package/dist/_node-chunks/{chunk-ULW4SLMN.js → chunk-OPG46TLN.js} +34 -949
- package/dist/_node-chunks/chunk-PEL4YXU6.js +19 -0
- package/dist/_node-chunks/{chunk-JE6JEGXA.js → chunk-QFXAGOIO.js} +9 -9
- package/dist/_node-chunks/{chunk-GVSFRNWZ.js → chunk-QGC3UWR5.js} +6 -6
- package/dist/_node-chunks/{chunk-B6SKX4JF.js → chunk-QGVU7IFS.js} +7 -7
- package/dist/_node-chunks/{chunk-Y2GH4XO7.js → chunk-QOFBJXPH.js} +650 -9
- package/dist/_node-chunks/chunk-QVLHVO4X.js +532 -0
- package/dist/_node-chunks/{chunk-EWXASIWR.js → chunk-R2ZCFA7I.js} +7 -7
- package/dist/_node-chunks/{chunk-MJ2UD7FU.js → chunk-RC4HPD5Q.js} +7 -7
- package/dist/_node-chunks/{chunk-7DCDBICW.js → chunk-RJXAXHDJ.js} +13 -13
- package/dist/_node-chunks/{chunk-2QTI45JU.js → chunk-SGEPJMTU.js} +35 -35
- package/dist/_node-chunks/{chunk-KGOAOPKR.js → chunk-SYUOBOB5.js} +6 -6
- package/dist/_node-chunks/{chunk-QVMUIU7S.js → chunk-T5VZYRL2.js} +6 -6
- package/dist/_node-chunks/chunk-T6IU66AM.js +69 -0
- package/dist/_node-chunks/{chunk-6APBQVEX.js → chunk-THDTJJMO.js} +7 -7
- package/dist/_node-chunks/{chunk-ASJFOW6O.js → chunk-TNFH4Y4G.js} +8 -8
- package/dist/_node-chunks/{chunk-ICADUNQM.js → chunk-TY2ZY7AO.js} +6 -6
- package/dist/_node-chunks/{chunk-PBMWZVLD.js → chunk-TZIT6SZP.js} +6 -6
- package/dist/_node-chunks/{chunk-US7L4S72.js → chunk-VG2KFIOW.js} +9 -9
- package/dist/_node-chunks/{chunk-7BVUZZIY.js → chunk-VSHYJR23.js} +7 -7
- package/dist/_node-chunks/{chunk-ILVD64RB.js → chunk-VUMGWJ6Y.js} +8 -8
- package/dist/_node-chunks/{chunk-DWE36J35.js → chunk-WVRM6DQU.js} +7 -7
- package/dist/_node-chunks/{chunk-AANHLH5M.js → chunk-YU5TVYPS.js} +6 -6
- package/dist/_node-chunks/{chunk-BENYUF74.js → chunk-ZBWAA2EY.js} +77 -78
- package/dist/_node-chunks/chunk-ZD5TUA6I.js +20 -0
- package/dist/_node-chunks/{chunk-AWJOXJAZ.js → chunk-ZFLK7MY5.js} +8 -8
- package/dist/_node-chunks/dist-7OJKTBKL.js +27 -0
- package/dist/_node-chunks/dist-MWP6WLW4.js +16 -0
- package/dist/_node-chunks/{local-runtime-4UNT5EZJ.js → local-runtime-V5YTRN24.js} +20 -20
- package/dist/_node-chunks/{mdx-plugin-ZY6XLLA4.js → mdx-plugin-CBOD52VP.js} +2263 -130
- package/dist/_node-chunks/{monorepo-B65J4UFS.js → monorepo-GF6H53U4.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-K4TTV2DQ.js} +12 -12
- package/dist/_node-chunks/optimized-tests-KOTSVWTN.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-LOHSM7ID.js → pattern-copy-play-M2QNC4IZ.js} +12 -12
- package/dist/_node-chunks/postinstallAddon-WXKJL6DP.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-22ZBI6K4.js → rehype-external-links-3IDE4CYH.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-ROZVEEFZ.js → rehype-slug-GKB3WS3U.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-EDE2B34G.js → relaxed-limits-C6QU365N.js} +12 -12
- package/dist/_node-chunks/{run-372BSBV5.js → run-TMVS3KKA.js} +273 -13
- package/dist/_node-chunks/{run-IR3BRDJV.js → run-XWBUPXLN.js} +17 -17
- package/dist/_node-chunks/session-id-VMH57SKN.js +23 -0
- package/dist/_node-chunks/{setup-6TMCKUTA.js → setup-KEEJK4WI.js} +9 -9
- package/dist/_node-chunks/{vitest.config.4.template-QJBEVCKG.js → vitest.config.4.template-74HEE4WJ.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 +6 -6
- package/dist/core-server/index.js +661 -249
- 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-BKQscPdC.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-FC201B7s.js → globals-runtime-BweHuXkK.js} +2 -1
- 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-CXoVXiJA.js → globals-runtime-CJL1dQtn.js} +324 -118
- package/dist/manager/_manager-chunks/{globals-runtime-BQCkfH1B.js → globals-runtime-CfurFwS_.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-BmphMP6z.js → globals-runtime-CvIgTRVu.js} +10 -10
- package/dist/manager/_manager-chunks/{globals-runtime-f5oIrim0.js → globals-runtime-DBba3I9c.js} +394 -189
- package/dist/manager/_manager-chunks/{globals-runtime-BvM-NY2g.js → globals-runtime-DvV_TF3-.js} +638 -1731
- package/dist/manager/_manager-chunks/{globals-runtime-C02fvgcd.js → globals-runtime-NwJK8t0T.js} +410 -379
- 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-5B2mWjEm.js +294 -0
- package/dist/manager/_manager-chunks/{runtime-DMig8mT7.js → runtime-5o_11Jae.js} +4 -3
- package/dist/manager/_manager-chunks/runtime-B_nqedQW.js +197 -0
- package/dist/manager/_manager-chunks/{runtime-EITvVbkG.js → runtime-BdGkqNEt.js} +1 -2
- package/dist/manager/_manager-chunks/{runtime-DcJBhKG9.js → runtime-Bs3bEhuy.js} +200 -376
- package/dist/manager/_manager-chunks/{runtime-i-PDAHLR.js → runtime-CBQsKmch.js} +5 -147
- package/dist/manager/_manager-chunks/runtime-DG61zYUm.js +1158 -0
- package/dist/manager/_manager-chunks/{runtime-eDVAYF7N.js → runtime-DtCVCy4G.js} +10 -29
- package/dist/manager/_manager-chunks/runtime-P663lpsR.js +528 -0
- package/dist/manager/_manager-chunks/{runtime-Bry1Biu7.js → runtime-eBAgOym6.js} +989 -915
- package/dist/manager/_manager-chunks/{runtime-DtyerpFe.js → runtime-j9yqh0tr.js} +124 -80
- package/dist/manager/_manager-chunks/{runtime-D94Vq3oR.js → runtime-jj8qYc2n.js} +5 -531
- 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-M2BRIUUP.js +0 -25
- package/dist/_node-chunks/chunk-RJUHZH32.js +0 -20
- package/dist/_node-chunks/chunk-TB6Y6NSL.js +0 -3837
- package/dist/_node-chunks/chunk-VQEQ7ZLS.js +0 -4731
- package/dist/_node-chunks/chunk-WQ7PSP6H.js +0 -19
- package/dist/_node-chunks/chunk-WVCU34IS.js +0 -23
- package/dist/_node-chunks/chunk-X6OWHTYE.js +0 -20
- 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
|
@@ -1,42 +1,45 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_upaeg5sjpn from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_upaeg5sjpn from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_upaeg5sjpn from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_upaeg5sjpn.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_upaeg5sjpn.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_upaeg5sjpn.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
require_dist
|
|
14
|
+
} from "../_node-chunks/chunk-MKUA4ZCG.js";
|
|
15
|
+
import {
|
|
16
|
+
BananaSlug
|
|
17
|
+
} from "../_node-chunks/chunk-FRBE7ES4.js";
|
|
12
18
|
import {
|
|
13
19
|
fromMarkdown,
|
|
14
20
|
mdxFromMarkdown,
|
|
15
21
|
mdxjs
|
|
16
|
-
} from "../_node-chunks/chunk-
|
|
22
|
+
} from "../_node-chunks/chunk-JVWXCB3L.js";
|
|
17
23
|
import {
|
|
18
|
-
|
|
19
|
-
} from "../_node-chunks/chunk-
|
|
20
|
-
import {
|
|
21
|
-
BananaSlug
|
|
22
|
-
} from "../_node-chunks/chunk-JBCKN6P4.js";
|
|
24
|
+
withRouteDepth
|
|
25
|
+
} from "../_node-chunks/chunk-QVLHVO4X.js";
|
|
23
26
|
import {
|
|
24
27
|
debounce
|
|
25
|
-
} from "../_node-chunks/chunk-
|
|
28
|
+
} from "../_node-chunks/chunk-IGOX6TUG.js";
|
|
26
29
|
import {
|
|
27
30
|
require_lib
|
|
28
|
-
} from "../_node-chunks/chunk-
|
|
31
|
+
} from "../_node-chunks/chunk-QOFBJXPH.js";
|
|
29
32
|
import {
|
|
30
33
|
Parser,
|
|
31
34
|
init_acorn,
|
|
32
35
|
require_acorn_jsx
|
|
33
|
-
} from "../_node-chunks/chunk-
|
|
36
|
+
} from "../_node-chunks/chunk-WVRM6DQU.js";
|
|
34
37
|
import {
|
|
35
38
|
isTelemetryModuleEnabled,
|
|
36
39
|
telemetry,
|
|
37
40
|
withSpan
|
|
38
|
-
} from "../_node-chunks/chunk-
|
|
39
|
-
import "../_node-chunks/chunk-
|
|
41
|
+
} from "../_node-chunks/chunk-EBWZKN2I.js";
|
|
42
|
+
import "../_node-chunks/chunk-DPILYJH4.js";
|
|
40
43
|
import {
|
|
41
44
|
getEffectiveToolAvailability,
|
|
42
45
|
getManifestStatus,
|
|
@@ -46,42 +49,39 @@ import {
|
|
|
46
49
|
isClaudePreviewLaunch,
|
|
47
50
|
isModuleGraphSupported,
|
|
48
51
|
resolveSkillInputs
|
|
49
|
-
} from "../_node-chunks/chunk-
|
|
52
|
+
} from "../_node-chunks/chunk-IL7YA7QJ.js";
|
|
50
53
|
import {
|
|
51
54
|
CLAUDE_PREVIEW_AGENT_NAME
|
|
52
|
-
} from "../_node-chunks/chunk-
|
|
53
|
-
import "../_node-chunks/chunk-
|
|
54
|
-
import "../_node-chunks/chunk-
|
|
55
|
-
import "../_node-chunks/chunk-
|
|
55
|
+
} from "../_node-chunks/chunk-PEL4YXU6.js";
|
|
56
|
+
import "../_node-chunks/chunk-CSFNS7HA.js";
|
|
57
|
+
import "../_node-chunks/chunk-FAEOR2AW.js";
|
|
58
|
+
import "../_node-chunks/chunk-ENBDAHOV.js";
|
|
56
59
|
import {
|
|
57
60
|
detectAgent
|
|
58
|
-
} from "../_node-chunks/chunk-
|
|
59
|
-
import "../_node-chunks/chunk-
|
|
60
|
-
import "../_node-chunks/chunk-
|
|
61
|
+
} from "../_node-chunks/chunk-C3PLG47Q.js";
|
|
62
|
+
import "../_node-chunks/chunk-MRCPS4S3.js";
|
|
63
|
+
import "../_node-chunks/chunk-TNFH4Y4G.js";
|
|
61
64
|
import {
|
|
62
65
|
userOrAutoTitleFromSpecifier
|
|
63
|
-
} from "../_node-chunks/chunk-
|
|
64
|
-
import "../_node-chunks/chunk-
|
|
65
|
-
import "../_node-chunks/chunk-
|
|
66
|
-
import "../_node-chunks/chunk-
|
|
66
|
+
} from "../_node-chunks/chunk-GQYATLH6.js";
|
|
67
|
+
import "../_node-chunks/chunk-MQC7ZY6L.js";
|
|
68
|
+
import "../_node-chunks/chunk-VSHYJR23.js";
|
|
69
|
+
import "../_node-chunks/chunk-6DHTL5G2.js";
|
|
67
70
|
import {
|
|
68
71
|
resolveImport,
|
|
69
72
|
supportedExtensions
|
|
70
|
-
} from "../_node-chunks/chunk-
|
|
71
|
-
import "../_node-chunks/chunk-
|
|
72
|
-
import "../_node-chunks/chunk-
|
|
73
|
+
} from "../_node-chunks/chunk-NGFFEW2B.js";
|
|
74
|
+
import "../_node-chunks/chunk-ACSO4HQP.js";
|
|
75
|
+
import "../_node-chunks/chunk-HCP5DG52.js";
|
|
73
76
|
import {
|
|
74
77
|
require_src
|
|
75
|
-
} from "../_node-chunks/chunk-
|
|
76
|
-
import "../_node-chunks/chunk-
|
|
77
|
-
import "../_node-chunks/chunk-
|
|
78
|
-
import "../_node-chunks/chunk-
|
|
79
|
-
import "../_node-chunks/chunk-5J3BMBMY.js";
|
|
80
|
-
import "../_node-chunks/chunk-AWXGCPW6.js";
|
|
78
|
+
} from "../_node-chunks/chunk-3CSGIJKG.js";
|
|
79
|
+
import "../_node-chunks/chunk-7OY4VMAT.js";
|
|
80
|
+
import "../_node-chunks/chunk-T6IU66AM.js";
|
|
81
|
+
import "../_node-chunks/chunk-ECOW63CV.js";
|
|
81
82
|
import {
|
|
82
|
-
logger
|
|
83
|
-
|
|
84
|
-
} from "../_node-chunks/chunk-TB6Y6NSL.js";
|
|
83
|
+
logger
|
|
84
|
+
} from "../_node-chunks/chunk-3W4KR5GX.js";
|
|
85
85
|
import {
|
|
86
86
|
ChangeDetectionFailureError,
|
|
87
87
|
ChangeDetectionUnavailableError,
|
|
@@ -131,80 +131,84 @@ import {
|
|
|
131
131
|
useStatics,
|
|
132
132
|
withTelemetry,
|
|
133
133
|
writeManifests
|
|
134
|
-
} from "../_node-chunks/chunk-
|
|
134
|
+
} from "../_node-chunks/chunk-FXBZWUW3.js";
|
|
135
135
|
import {
|
|
136
136
|
UniversalStore
|
|
137
|
-
} from "../_node-chunks/chunk-
|
|
137
|
+
} from "../_node-chunks/chunk-QGVU7IFS.js";
|
|
138
|
+
import {
|
|
139
|
+
buildStoryPathMap,
|
|
140
|
+
urlPathDepth
|
|
141
|
+
} from "../_node-chunks/chunk-K4O2ZAMU.js";
|
|
138
142
|
import {
|
|
139
143
|
init_build,
|
|
140
144
|
parse
|
|
141
|
-
} from "../_node-chunks/chunk-
|
|
142
|
-
import "../_node-chunks/chunk-
|
|
143
|
-
import "../_node-chunks/chunk-
|
|
145
|
+
} from "../_node-chunks/chunk-THDTJJMO.js";
|
|
146
|
+
import "../_node-chunks/chunk-TY2ZY7AO.js";
|
|
147
|
+
import "../_node-chunks/chunk-TZIT6SZP.js";
|
|
144
148
|
import {
|
|
145
149
|
registerToolset
|
|
146
|
-
} from "../_node-chunks/chunk-
|
|
147
|
-
import "../_node-chunks/chunk-
|
|
148
|
-
import "../_node-chunks/chunk-
|
|
149
|
-
import "../_node-chunks/chunk-
|
|
150
|
+
} from "../_node-chunks/chunk-FERXOKZY.js";
|
|
151
|
+
import "../_node-chunks/chunk-GJSYGBI5.js";
|
|
152
|
+
import "../_node-chunks/chunk-LX2XSPPL.js";
|
|
153
|
+
import "../_node-chunks/chunk-ZD5TUA6I.js";
|
|
150
154
|
import {
|
|
151
155
|
STORY_FILE_TEST_REGEXP,
|
|
152
|
-
getStoryImportPathFromEntry
|
|
153
|
-
|
|
154
|
-
} from "../_node-chunks/chunk-ZBAIFZNB.js";
|
|
155
|
-
import "../_node-chunks/chunk-FUYZNTIS.js";
|
|
156
|
-
import "../_node-chunks/chunk-356LV3NX.js";
|
|
156
|
+
getStoryImportPathFromEntry
|
|
157
|
+
} from "../_node-chunks/chunk-FJFB7TWU.js";
|
|
157
158
|
import {
|
|
158
159
|
getService,
|
|
159
160
|
registerService,
|
|
160
161
|
writeOpenServiceStaticFiles
|
|
161
|
-
} from "../_node-chunks/chunk-
|
|
162
|
+
} from "../_node-chunks/chunk-BPL3ERBH.js";
|
|
162
163
|
import {
|
|
163
164
|
Channel,
|
|
164
165
|
describeService,
|
|
165
166
|
getRegisteredServices,
|
|
166
167
|
listServices
|
|
167
|
-
} from "../_node-chunks/chunk-
|
|
168
|
-
import "../_node-chunks/chunk-
|
|
169
|
-
import
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
import "../_node-chunks/chunk-
|
|
168
|
+
} from "../_node-chunks/chunk-AAL6X7YG.js";
|
|
169
|
+
import "../_node-chunks/chunk-DNV3LPV3.js";
|
|
170
|
+
import {
|
|
171
|
+
isEqual
|
|
172
|
+
} from "../_node-chunks/chunk-5NRWU7S2.js";
|
|
173
|
+
import "../_node-chunks/chunk-KRWR44KT.js";
|
|
174
|
+
import "../_node-chunks/chunk-7KD5DKGZ.js";
|
|
175
|
+
import "../_node-chunks/chunk-MIWBXEUH.js";
|
|
173
176
|
import {
|
|
174
177
|
Tag
|
|
175
|
-
} from "../_node-chunks/chunk-
|
|
176
|
-
import "../_node-chunks/chunk-
|
|
177
|
-
import "../_node-chunks/chunk-
|
|
178
|
+
} from "../_node-chunks/chunk-SYUOBOB5.js";
|
|
179
|
+
import "../_node-chunks/chunk-MY7UVHPL.js";
|
|
180
|
+
import "../_node-chunks/chunk-FR2ZDWKJ.js";
|
|
178
181
|
import {
|
|
179
182
|
up2 as up
|
|
180
|
-
} from "../_node-chunks/chunk-
|
|
183
|
+
} from "../_node-chunks/chunk-G2ZUFOHU.js";
|
|
181
184
|
import {
|
|
182
185
|
invariant
|
|
183
|
-
} from "../_node-chunks/chunk-
|
|
186
|
+
} from "../_node-chunks/chunk-CKE4R4NL.js";
|
|
184
187
|
import {
|
|
185
188
|
resolvePackageDir,
|
|
186
189
|
safeResolveModule
|
|
187
|
-
} from "../_node-chunks/chunk-
|
|
188
|
-
import "../_node-chunks/chunk-
|
|
190
|
+
} from "../_node-chunks/chunk-VUMGWJ6Y.js";
|
|
191
|
+
import "../_node-chunks/chunk-T5VZYRL2.js";
|
|
189
192
|
import {
|
|
190
193
|
StorybookError
|
|
191
|
-
} from "../_node-chunks/chunk-
|
|
194
|
+
} from "../_node-chunks/chunk-LH5QBX2U.js";
|
|
192
195
|
import {
|
|
193
196
|
require_picocolors
|
|
194
|
-
} from "../_node-chunks/chunk-
|
|
197
|
+
} from "../_node-chunks/chunk-7O2UIVID.js";
|
|
195
198
|
import {
|
|
196
199
|
storyIndexPathToAbsolutePath
|
|
197
|
-
} from "../_node-chunks/chunk-
|
|
198
|
-
import "../_node-chunks/chunk-
|
|
200
|
+
} from "../_node-chunks/chunk-R2ZCFA7I.js";
|
|
201
|
+
import "../_node-chunks/chunk-DQ44ZAEM.js";
|
|
199
202
|
import {
|
|
200
203
|
slash
|
|
201
|
-
} from "../_node-chunks/chunk-
|
|
202
|
-
import "../_node-chunks/chunk-
|
|
204
|
+
} from "../_node-chunks/chunk-HVOSLI2K.js";
|
|
205
|
+
import "../_node-chunks/chunk-7CV4VEA2.js";
|
|
206
|
+
import "../_node-chunks/chunk-OPG46TLN.js";
|
|
203
207
|
import {
|
|
204
208
|
__commonJS,
|
|
205
209
|
__require,
|
|
206
210
|
__toESM
|
|
207
|
-
} from "../_node-chunks/chunk-
|
|
211
|
+
} from "../_node-chunks/chunk-FQGQ5KHN.js";
|
|
208
212
|
|
|
209
213
|
// ../../node_modules/@discoveryjs/json-ext/package.json
|
|
210
214
|
var require_package = __commonJS({
|
|
@@ -707,7 +711,7 @@ var require_parse_chunked = __commonJS({
|
|
|
707
711
|
module.exports = function(chunkEmitter) {
|
|
708
712
|
let parser = new ChunkParser();
|
|
709
713
|
if (isObject(chunkEmitter) && isReadableStream(chunkEmitter))
|
|
710
|
-
return new Promise((
|
|
714
|
+
return new Promise((resolve10, reject) => {
|
|
711
715
|
chunkEmitter.on("data", (chunk) => {
|
|
712
716
|
try {
|
|
713
717
|
parser.push(chunk);
|
|
@@ -718,7 +722,7 @@ var require_parse_chunked = __commonJS({
|
|
|
718
722
|
parser = null, reject(e);
|
|
719
723
|
}).on("end", () => {
|
|
720
724
|
try {
|
|
721
|
-
|
|
725
|
+
resolve10(parser.finish());
|
|
722
726
|
} catch (e) {
|
|
723
727
|
reject(adjustPosition(e, parser));
|
|
724
728
|
} finally {
|
|
@@ -729,11 +733,11 @@ var require_parse_chunked = __commonJS({
|
|
|
729
733
|
if (typeof chunkEmitter == "function") {
|
|
730
734
|
let iterator = chunkEmitter();
|
|
731
735
|
if (isObject(iterator) && (Symbol.iterator in iterator || Symbol.asyncIterator in iterator))
|
|
732
|
-
return new Promise(async (
|
|
736
|
+
return new Promise(async (resolve10, reject) => {
|
|
733
737
|
try {
|
|
734
738
|
for await (let chunk of iterator)
|
|
735
739
|
parser.push(chunk);
|
|
736
|
-
|
|
740
|
+
resolve10(parser.finish());
|
|
737
741
|
} catch (e) {
|
|
738
742
|
reject(adjustPosition(e, parser));
|
|
739
743
|
} finally {
|
|
@@ -881,6 +885,361 @@ var require_src2 = __commonJS({
|
|
|
881
885
|
}
|
|
882
886
|
});
|
|
883
887
|
|
|
888
|
+
// ../../node_modules/isexe/windows.js
|
|
889
|
+
var require_windows = __commonJS({
|
|
890
|
+
"../../node_modules/isexe/windows.js"(exports, module) {
|
|
891
|
+
module.exports = isexe;
|
|
892
|
+
isexe.sync = sync;
|
|
893
|
+
var fs = __require("fs");
|
|
894
|
+
function checkPathExt(path, options) {
|
|
895
|
+
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
896
|
+
if (!pathext || (pathext = pathext.split(";"), pathext.indexOf("") !== -1))
|
|
897
|
+
return !0;
|
|
898
|
+
for (var i = 0; i < pathext.length; i++) {
|
|
899
|
+
var p = pathext[i].toLowerCase();
|
|
900
|
+
if (p && path.substr(-p.length).toLowerCase() === p)
|
|
901
|
+
return !0;
|
|
902
|
+
}
|
|
903
|
+
return !1;
|
|
904
|
+
}
|
|
905
|
+
function checkStat(stat2, path, options) {
|
|
906
|
+
return !stat2.isSymbolicLink() && !stat2.isFile() ? !1 : checkPathExt(path, options);
|
|
907
|
+
}
|
|
908
|
+
function isexe(path, options, cb) {
|
|
909
|
+
fs.stat(path, function(er, stat2) {
|
|
910
|
+
cb(er, er ? !1 : checkStat(stat2, path, options));
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
function sync(path, options) {
|
|
914
|
+
return checkStat(fs.statSync(path), path, options);
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
});
|
|
918
|
+
|
|
919
|
+
// ../../node_modules/isexe/mode.js
|
|
920
|
+
var require_mode = __commonJS({
|
|
921
|
+
"../../node_modules/isexe/mode.js"(exports, module) {
|
|
922
|
+
module.exports = isexe;
|
|
923
|
+
isexe.sync = sync;
|
|
924
|
+
var fs = __require("fs");
|
|
925
|
+
function isexe(path, options, cb) {
|
|
926
|
+
fs.stat(path, function(er, stat2) {
|
|
927
|
+
cb(er, er ? !1 : checkStat(stat2, options));
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
function sync(path, options) {
|
|
931
|
+
return checkStat(fs.statSync(path), options);
|
|
932
|
+
}
|
|
933
|
+
function checkStat(stat2, options) {
|
|
934
|
+
return stat2.isFile() && checkMode(stat2, options);
|
|
935
|
+
}
|
|
936
|
+
function checkMode(stat2, options) {
|
|
937
|
+
var mod = stat2.mode, uid = stat2.uid, gid = stat2.gid, myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid(), myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid(), u = parseInt("100", 8), g = parseInt("010", 8), o = parseInt("001", 8), ug = u | g, ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
|
|
938
|
+
return ret;
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
});
|
|
942
|
+
|
|
943
|
+
// ../../node_modules/isexe/index.js
|
|
944
|
+
var require_isexe = __commonJS({
|
|
945
|
+
"../../node_modules/isexe/index.js"(exports, module) {
|
|
946
|
+
var fs = __require("fs"), core;
|
|
947
|
+
process.platform === "win32" || global.TESTING_WINDOWS ? core = require_windows() : core = require_mode();
|
|
948
|
+
module.exports = isexe;
|
|
949
|
+
isexe.sync = sync;
|
|
950
|
+
function isexe(path, options, cb) {
|
|
951
|
+
if (typeof options == "function" && (cb = options, options = {}), !cb) {
|
|
952
|
+
if (typeof Promise != "function")
|
|
953
|
+
throw new TypeError("callback not provided");
|
|
954
|
+
return new Promise(function(resolve10, reject) {
|
|
955
|
+
isexe(path, options || {}, function(er, is) {
|
|
956
|
+
er ? reject(er) : resolve10(is);
|
|
957
|
+
});
|
|
958
|
+
});
|
|
959
|
+
}
|
|
960
|
+
core(path, options || {}, function(er, is) {
|
|
961
|
+
er && (er.code === "EACCES" || options && options.ignoreErrors) && (er = null, is = !1), cb(er, is);
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
function sync(path, options) {
|
|
965
|
+
try {
|
|
966
|
+
return core.sync(path, options || {});
|
|
967
|
+
} catch (er) {
|
|
968
|
+
if (options && options.ignoreErrors || er.code === "EACCES")
|
|
969
|
+
return !1;
|
|
970
|
+
throw er;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
});
|
|
975
|
+
|
|
976
|
+
// ../../node_modules/which/which.js
|
|
977
|
+
var require_which = __commonJS({
|
|
978
|
+
"../../node_modules/which/which.js"(exports, module) {
|
|
979
|
+
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", path = __require("path"), COLON = isWindows ? ";" : ":", isexe = require_isexe(), getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), getPathInfo = (cmd, opt) => {
|
|
980
|
+
let colon = opt.colon || COLON, pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [
|
|
981
|
+
// windows always checks the cwd first
|
|
982
|
+
...isWindows ? [process.cwd()] : [],
|
|
983
|
+
...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */
|
|
984
|
+
"").split(colon)
|
|
985
|
+
], pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", pathExt = isWindows ? pathExtExe.split(colon) : [""];
|
|
986
|
+
return isWindows && cmd.indexOf(".") !== -1 && pathExt[0] !== "" && pathExt.unshift(""), {
|
|
987
|
+
pathEnv,
|
|
988
|
+
pathExt,
|
|
989
|
+
pathExtExe
|
|
990
|
+
};
|
|
991
|
+
}, which = (cmd, opt, cb) => {
|
|
992
|
+
typeof opt == "function" && (cb = opt, opt = {}), opt || (opt = {});
|
|
993
|
+
let { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt), found = [], step = (i) => new Promise((resolve10, reject) => {
|
|
994
|
+
if (i === pathEnv.length)
|
|
995
|
+
return opt.all && found.length ? resolve10(found) : reject(getNotFoundError(cmd));
|
|
996
|
+
let ppRaw = pathEnv[i], pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw, pCmd = path.join(pathPart, cmd), p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
997
|
+
resolve10(subStep(p, i, 0));
|
|
998
|
+
}), subStep = (p, i, ii) => new Promise((resolve10, reject) => {
|
|
999
|
+
if (ii === pathExt.length)
|
|
1000
|
+
return resolve10(step(i + 1));
|
|
1001
|
+
let ext = pathExt[ii];
|
|
1002
|
+
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
1003
|
+
if (!er && is)
|
|
1004
|
+
if (opt.all)
|
|
1005
|
+
found.push(p + ext);
|
|
1006
|
+
else
|
|
1007
|
+
return resolve10(p + ext);
|
|
1008
|
+
return resolve10(subStep(p, i, ii + 1));
|
|
1009
|
+
});
|
|
1010
|
+
});
|
|
1011
|
+
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
1012
|
+
}, whichSync = (cmd, opt) => {
|
|
1013
|
+
opt = opt || {};
|
|
1014
|
+
let { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt), found = [];
|
|
1015
|
+
for (let i = 0; i < pathEnv.length; i++) {
|
|
1016
|
+
let ppRaw = pathEnv[i], pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw, pCmd = path.join(pathPart, cmd), p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
1017
|
+
for (let j = 0; j < pathExt.length; j++) {
|
|
1018
|
+
let cur = p + pathExt[j];
|
|
1019
|
+
try {
|
|
1020
|
+
if (isexe.sync(cur, { pathExt: pathExtExe }))
|
|
1021
|
+
if (opt.all)
|
|
1022
|
+
found.push(cur);
|
|
1023
|
+
else
|
|
1024
|
+
return cur;
|
|
1025
|
+
} catch {
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
if (opt.all && found.length)
|
|
1030
|
+
return found;
|
|
1031
|
+
if (opt.nothrow)
|
|
1032
|
+
return null;
|
|
1033
|
+
throw getNotFoundError(cmd);
|
|
1034
|
+
};
|
|
1035
|
+
module.exports = which;
|
|
1036
|
+
which.sync = whichSync;
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1039
|
+
|
|
1040
|
+
// ../../node_modules/path-key/index.js
|
|
1041
|
+
var require_path_key = __commonJS({
|
|
1042
|
+
"../../node_modules/path-key/index.js"(exports, module) {
|
|
1043
|
+
"use strict";
|
|
1044
|
+
var pathKey = (options = {}) => {
|
|
1045
|
+
let environment = options.env || process.env;
|
|
1046
|
+
return (options.platform || process.platform) !== "win32" ? "PATH" : Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
1047
|
+
};
|
|
1048
|
+
module.exports = pathKey;
|
|
1049
|
+
module.exports.default = pathKey;
|
|
1050
|
+
}
|
|
1051
|
+
});
|
|
1052
|
+
|
|
1053
|
+
// ../../node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
1054
|
+
var require_resolveCommand = __commonJS({
|
|
1055
|
+
"../../node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
|
|
1056
|
+
"use strict";
|
|
1057
|
+
var path = __require("path"), which = require_which(), getPathKey = require_path_key();
|
|
1058
|
+
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
1059
|
+
let env = parsed.options.env || process.env, cwd = process.cwd(), hasCustomCwd = parsed.options.cwd != null, shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
|
|
1060
|
+
if (shouldSwitchCwd)
|
|
1061
|
+
try {
|
|
1062
|
+
process.chdir(parsed.options.cwd);
|
|
1063
|
+
} catch {
|
|
1064
|
+
}
|
|
1065
|
+
let resolved;
|
|
1066
|
+
try {
|
|
1067
|
+
resolved = which.sync(parsed.command, {
|
|
1068
|
+
path: env[getPathKey({ env })],
|
|
1069
|
+
pathExt: withoutPathExt ? path.delimiter : void 0
|
|
1070
|
+
});
|
|
1071
|
+
} catch {
|
|
1072
|
+
} finally {
|
|
1073
|
+
shouldSwitchCwd && process.chdir(cwd);
|
|
1074
|
+
}
|
|
1075
|
+
return resolved && (resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved)), resolved;
|
|
1076
|
+
}
|
|
1077
|
+
function resolveCommand(parsed) {
|
|
1078
|
+
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, !0);
|
|
1079
|
+
}
|
|
1080
|
+
module.exports = resolveCommand;
|
|
1081
|
+
}
|
|
1082
|
+
});
|
|
1083
|
+
|
|
1084
|
+
// ../../node_modules/cross-spawn/lib/util/escape.js
|
|
1085
|
+
var require_escape = __commonJS({
|
|
1086
|
+
"../../node_modules/cross-spawn/lib/util/escape.js"(exports, module) {
|
|
1087
|
+
"use strict";
|
|
1088
|
+
var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
1089
|
+
function escapeCommand(arg) {
|
|
1090
|
+
return arg = arg.replace(metaCharsRegExp, "^$1"), arg;
|
|
1091
|
+
}
|
|
1092
|
+
function escapeArgument(arg, doubleEscapeMetaChars) {
|
|
1093
|
+
return arg = `${arg}`, arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"'), arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1"), arg = `"${arg}"`, arg = arg.replace(metaCharsRegExp, "^$1"), doubleEscapeMetaChars && (arg = arg.replace(metaCharsRegExp, "^$1")), arg;
|
|
1094
|
+
}
|
|
1095
|
+
module.exports.command = escapeCommand;
|
|
1096
|
+
module.exports.argument = escapeArgument;
|
|
1097
|
+
}
|
|
1098
|
+
});
|
|
1099
|
+
|
|
1100
|
+
// ../../node_modules/shebang-regex/index.js
|
|
1101
|
+
var require_shebang_regex = __commonJS({
|
|
1102
|
+
"../../node_modules/shebang-regex/index.js"(exports, module) {
|
|
1103
|
+
"use strict";
|
|
1104
|
+
module.exports = /^#!(.*)/;
|
|
1105
|
+
}
|
|
1106
|
+
});
|
|
1107
|
+
|
|
1108
|
+
// ../../node_modules/shebang-command/index.js
|
|
1109
|
+
var require_shebang_command = __commonJS({
|
|
1110
|
+
"../../node_modules/shebang-command/index.js"(exports, module) {
|
|
1111
|
+
"use strict";
|
|
1112
|
+
var shebangRegex = require_shebang_regex();
|
|
1113
|
+
module.exports = (string = "") => {
|
|
1114
|
+
let match = string.match(shebangRegex);
|
|
1115
|
+
if (!match)
|
|
1116
|
+
return null;
|
|
1117
|
+
let [path, argument] = match[0].replace(/#! ?/, "").split(" "), binary = path.split("/").pop();
|
|
1118
|
+
return binary === "env" ? argument : argument ? `${binary} ${argument}` : binary;
|
|
1119
|
+
};
|
|
1120
|
+
}
|
|
1121
|
+
});
|
|
1122
|
+
|
|
1123
|
+
// ../../node_modules/cross-spawn/lib/util/readShebang.js
|
|
1124
|
+
var require_readShebang = __commonJS({
|
|
1125
|
+
"../../node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
|
|
1126
|
+
"use strict";
|
|
1127
|
+
var fs = __require("fs"), shebangCommand = require_shebang_command();
|
|
1128
|
+
function readShebang(command) {
|
|
1129
|
+
let buffer = Buffer.alloc(150), fd;
|
|
1130
|
+
try {
|
|
1131
|
+
fd = fs.openSync(command, "r"), fs.readSync(fd, buffer, 0, 150, 0), fs.closeSync(fd);
|
|
1132
|
+
} catch {
|
|
1133
|
+
}
|
|
1134
|
+
return shebangCommand(buffer.toString());
|
|
1135
|
+
}
|
|
1136
|
+
module.exports = readShebang;
|
|
1137
|
+
}
|
|
1138
|
+
});
|
|
1139
|
+
|
|
1140
|
+
// ../../node_modules/cross-spawn/lib/parse.js
|
|
1141
|
+
var require_parse = __commonJS({
|
|
1142
|
+
"../../node_modules/cross-spawn/lib/parse.js"(exports, module) {
|
|
1143
|
+
"use strict";
|
|
1144
|
+
var path = __require("path"), resolveCommand = require_resolveCommand(), escape = require_escape(), readShebang = require_readShebang(), isWin = process.platform === "win32", isExecutableRegExp = /\.(?:com|exe)$/i, isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
1145
|
+
function detectShebang(parsed) {
|
|
1146
|
+
parsed.file = resolveCommand(parsed);
|
|
1147
|
+
let shebang = parsed.file && readShebang(parsed.file);
|
|
1148
|
+
return shebang ? (parsed.args.unshift(parsed.file), parsed.command = shebang, resolveCommand(parsed)) : parsed.file;
|
|
1149
|
+
}
|
|
1150
|
+
function parseNonShell(parsed) {
|
|
1151
|
+
if (!isWin)
|
|
1152
|
+
return parsed;
|
|
1153
|
+
let commandFile = detectShebang(parsed), needsShell = !isExecutableRegExp.test(commandFile);
|
|
1154
|
+
if (parsed.options.forceShell || needsShell) {
|
|
1155
|
+
let needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
1156
|
+
parsed.command = path.normalize(parsed.command), parsed.command = escape.command(parsed.command), parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
1157
|
+
let shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
1158
|
+
parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`], parsed.command = process.env.comspec || "cmd.exe", parsed.options.windowsVerbatimArguments = !0;
|
|
1159
|
+
}
|
|
1160
|
+
return parsed;
|
|
1161
|
+
}
|
|
1162
|
+
function parse5(command, args, options) {
|
|
1163
|
+
args && !Array.isArray(args) && (options = args, args = null), args = args ? args.slice(0) : [], options = Object.assign({}, options);
|
|
1164
|
+
let parsed = {
|
|
1165
|
+
command,
|
|
1166
|
+
args,
|
|
1167
|
+
options,
|
|
1168
|
+
file: void 0,
|
|
1169
|
+
original: {
|
|
1170
|
+
command,
|
|
1171
|
+
args
|
|
1172
|
+
}
|
|
1173
|
+
};
|
|
1174
|
+
return options.shell ? parsed : parseNonShell(parsed);
|
|
1175
|
+
}
|
|
1176
|
+
module.exports = parse5;
|
|
1177
|
+
}
|
|
1178
|
+
});
|
|
1179
|
+
|
|
1180
|
+
// ../../node_modules/cross-spawn/lib/enoent.js
|
|
1181
|
+
var require_enoent = __commonJS({
|
|
1182
|
+
"../../node_modules/cross-spawn/lib/enoent.js"(exports, module) {
|
|
1183
|
+
"use strict";
|
|
1184
|
+
var isWin = process.platform === "win32";
|
|
1185
|
+
function notFoundError(original, syscall) {
|
|
1186
|
+
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
|
|
1187
|
+
code: "ENOENT",
|
|
1188
|
+
errno: "ENOENT",
|
|
1189
|
+
syscall: `${syscall} ${original.command}`,
|
|
1190
|
+
path: original.command,
|
|
1191
|
+
spawnargs: original.args
|
|
1192
|
+
});
|
|
1193
|
+
}
|
|
1194
|
+
function hookChildProcess(cp3, parsed) {
|
|
1195
|
+
if (!isWin)
|
|
1196
|
+
return;
|
|
1197
|
+
let originalEmit = cp3.emit;
|
|
1198
|
+
cp3.emit = function(name, arg1) {
|
|
1199
|
+
if (name === "exit") {
|
|
1200
|
+
let err = verifyENOENT(arg1, parsed);
|
|
1201
|
+
if (err)
|
|
1202
|
+
return originalEmit.call(cp3, "error", err);
|
|
1203
|
+
}
|
|
1204
|
+
return originalEmit.apply(cp3, arguments);
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
function verifyENOENT(status, parsed) {
|
|
1208
|
+
return isWin && status === 1 && !parsed.file ? notFoundError(parsed.original, "spawn") : null;
|
|
1209
|
+
}
|
|
1210
|
+
function verifyENOENTSync(status, parsed) {
|
|
1211
|
+
return isWin && status === 1 && !parsed.file ? notFoundError(parsed.original, "spawnSync") : null;
|
|
1212
|
+
}
|
|
1213
|
+
module.exports = {
|
|
1214
|
+
hookChildProcess,
|
|
1215
|
+
verifyENOENT,
|
|
1216
|
+
verifyENOENTSync,
|
|
1217
|
+
notFoundError
|
|
1218
|
+
};
|
|
1219
|
+
}
|
|
1220
|
+
});
|
|
1221
|
+
|
|
1222
|
+
// ../../node_modules/cross-spawn/index.js
|
|
1223
|
+
var require_cross_spawn = __commonJS({
|
|
1224
|
+
"../../node_modules/cross-spawn/index.js"(exports, module) {
|
|
1225
|
+
"use strict";
|
|
1226
|
+
var cp3 = __require("child_process"), parse5 = require_parse(), enoent = require_enoent();
|
|
1227
|
+
function spawn2(command, args, options) {
|
|
1228
|
+
let parsed = parse5(command, args, options), spawned = cp3.spawn(parsed.command, parsed.args, parsed.options);
|
|
1229
|
+
return enoent.hookChildProcess(spawned, parsed), spawned;
|
|
1230
|
+
}
|
|
1231
|
+
function spawnSync(command, args, options) {
|
|
1232
|
+
let parsed = parse5(command, args, options), result = cp3.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
1233
|
+
return result.error = result.error || enoent.verifyENOENTSync(result.status, parsed), result;
|
|
1234
|
+
}
|
|
1235
|
+
module.exports = spawn2;
|
|
1236
|
+
module.exports.spawn = spawn2;
|
|
1237
|
+
module.exports.sync = spawnSync;
|
|
1238
|
+
module.exports._parse = parse5;
|
|
1239
|
+
module.exports._enoent = enoent;
|
|
1240
|
+
}
|
|
1241
|
+
});
|
|
1242
|
+
|
|
884
1243
|
// ../../node_modules/address/lib/address.js
|
|
885
1244
|
var require_address = __commonJS({
|
|
886
1245
|
"../../node_modules/address/lib/address.js"(exports, module) {
|
|
@@ -999,9 +1358,9 @@ var require_detect_port = __commonJS({
|
|
|
999
1358
|
let hostname = "";
|
|
1000
1359
|
typeof port == "object" && port ? (hostname = port.hostname, callback = port.callback, port = port.port) : typeof port == "function" && (callback = port, port = null), port = parseInt(port) || 0;
|
|
1001
1360
|
let maxPort = port + 10;
|
|
1002
|
-
return maxPort > 65535 && (maxPort = 65535), debug("detect free port between [%s, %s)", port, maxPort), typeof callback == "function" ? tryListen(port, maxPort, hostname, callback) : new Promise((
|
|
1361
|
+
return maxPort > 65535 && (maxPort = 65535), debug("detect free port between [%s, %s)", port, maxPort), typeof callback == "function" ? tryListen(port, maxPort, hostname, callback) : new Promise((resolve10) => {
|
|
1003
1362
|
tryListen(port, maxPort, hostname, (_, realPort) => {
|
|
1004
|
-
|
|
1363
|
+
resolve10(realPort);
|
|
1005
1364
|
});
|
|
1006
1365
|
});
|
|
1007
1366
|
};
|
|
@@ -1044,7 +1403,7 @@ var require_detect_port = __commonJS({
|
|
|
1044
1403
|
var require_wait_port = __commonJS({
|
|
1045
1404
|
"../../node_modules/detect-port/lib/wait-port.js"(exports, module) {
|
|
1046
1405
|
"use strict";
|
|
1047
|
-
var debug = require_src()("wait-port"), detect = require_detect_port(), sleep = (ms) => new Promise((
|
|
1406
|
+
var debug = require_src()("wait-port"), detect = require_detect_port(), sleep = (ms) => new Promise((resolve10) => setTimeout(resolve10, ms));
|
|
1048
1407
|
async function waitPort(port, options = {}) {
|
|
1049
1408
|
let { retryInterval = 1e3, retries = 1 / 0 } = options, count = 1;
|
|
1050
1409
|
async function loop() {
|
|
@@ -1076,8 +1435,7 @@ import {
|
|
|
1076
1435
|
} from "@aussieljk/forkbook/internal/common";
|
|
1077
1436
|
|
|
1078
1437
|
// src/core-server/build-static.ts
|
|
1079
|
-
|
|
1080
|
-
import { cp as cp2, mkdir } from "node:fs/promises";
|
|
1438
|
+
import { cp as cp2, mkdir as mkdir3 } from "node:fs/promises";
|
|
1081
1439
|
import { rm } from "node:fs/promises";
|
|
1082
1440
|
import { Channel as Channel2 } from "@aussieljk/forkbook/internal/channels";
|
|
1083
1441
|
import {
|
|
@@ -1088,8 +1446,13 @@ import {
|
|
|
1088
1446
|
} from "@aussieljk/forkbook/internal/common";
|
|
1089
1447
|
import { logger as logger4 } from "@aussieljk/forkbook/internal/node-logger";
|
|
1090
1448
|
import { getPrecedingUpgrade, telemetry as telemetry2 } from "@aussieljk/forkbook/internal/telemetry";
|
|
1091
|
-
|
|
1092
|
-
|
|
1449
|
+
|
|
1450
|
+
// src/shared/global.ts
|
|
1451
|
+
var global2 = globalThis;
|
|
1452
|
+
|
|
1453
|
+
// src/core-server/build-static.ts
|
|
1454
|
+
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
1455
|
+
import { join as join6, relative as relative4, resolve as resolve4 } from "pathe";
|
|
1093
1456
|
|
|
1094
1457
|
// src/core-server/utils/build-or-throw.ts
|
|
1095
1458
|
import { NoMatchingExportError } from "@aussieljk/forkbook/internal/server-errors";
|
|
@@ -1184,8 +1547,11 @@ function watchStorySpecifiers(specifiers, options, onInvalidate) {
|
|
|
1184
1547
|
// files can be e.g. '**/foo/*/*.js' so we just want the last bit,
|
|
1185
1548
|
// because the directory could already be within the files part (e.g. './x/foo/bar')
|
|
1186
1549
|
basename(specifier.files)
|
|
1187
|
-
), {
|
|
1188
|
-
(await
|
|
1550
|
+
), { glob } = await import("../_node-chunks/dist-7OJKTBKL.js");
|
|
1551
|
+
(await glob(slash(dirGlob), {
|
|
1552
|
+
...commonGlobOptions(dirGlob),
|
|
1553
|
+
expandDirectories: !1
|
|
1554
|
+
})).forEach((filePath) => {
|
|
1189
1555
|
let fileImportPath = toImportPath(filePath);
|
|
1190
1556
|
specifier.importPathMatcher.exec(fileImportPath) && onInvalidate(fileImportPath, removed);
|
|
1191
1557
|
});
|
|
@@ -1248,12 +1614,104 @@ function registerIndexJsonRoute({
|
|
|
1248
1614
|
});
|
|
1249
1615
|
}
|
|
1250
1616
|
|
|
1617
|
+
// src/core-server/utils/thumbnails.ts
|
|
1618
|
+
import { copyFile, mkdir, readFile } from "node:fs/promises";
|
|
1619
|
+
import { dirname as dirname2, join as join3 } from "pathe";
|
|
1620
|
+
|
|
1621
|
+
// src/shared/thumbnails.ts
|
|
1622
|
+
import { dirname, isAbsolute, normalize, relative as relative3, resolve as resolve3 } from "pathe";
|
|
1623
|
+
var THUMBNAIL_ROUTE = "thumbnails", THUMBNAIL_TYPES = {
|
|
1624
|
+
avif: "image/avif",
|
|
1625
|
+
gif: "image/gif",
|
|
1626
|
+
jpeg: "image/jpeg",
|
|
1627
|
+
jpg: "image/jpeg",
|
|
1628
|
+
png: "image/png",
|
|
1629
|
+
svg: "image/svg+xml",
|
|
1630
|
+
webp: "image/webp"
|
|
1631
|
+
}, extension = (path) => path.split(".").pop()?.toLowerCase() ?? "", isThumbnailUrl = (value) => /^([a-z][a-z\d+.-]*:|\/\/|\/)/i.test(value), resolveThumbnail = (value, storyFile, workingDir) => {
|
|
1632
|
+
if (!value)
|
|
1633
|
+
return;
|
|
1634
|
+
if (isThumbnailUrl(value) && !isAbsolute(value))
|
|
1635
|
+
return value;
|
|
1636
|
+
let file = isAbsolute(value) ? value : resolve3(dirname(storyFile), value);
|
|
1637
|
+
if (isAbsolute(value) && !normalize(value).startsWith(normalize(workingDir)))
|
|
1638
|
+
return value;
|
|
1639
|
+
let path = relative3(workingDir, file);
|
|
1640
|
+
if (!(path.startsWith("..") || !THUMBNAIL_TYPES[extension(path)]))
|
|
1641
|
+
return `${THUMBNAIL_ROUTE}/${path}`;
|
|
1642
|
+
}, thumbnailFile = (urlPath, workingDir) => {
|
|
1643
|
+
let path = urlPath.replace(/^\/+/, "");
|
|
1644
|
+
try {
|
|
1645
|
+
path = decodeURIComponent(path);
|
|
1646
|
+
} catch {
|
|
1647
|
+
return;
|
|
1648
|
+
}
|
|
1649
|
+
if (!path.startsWith(`${THUMBNAIL_ROUTE}/`))
|
|
1650
|
+
return;
|
|
1651
|
+
let file = resolve3(workingDir, path.slice(THUMBNAIL_ROUTE.length + 1));
|
|
1652
|
+
if (!(relative3(workingDir, file).startsWith("..") || !THUMBNAIL_TYPES[extension(file)]))
|
|
1653
|
+
return file;
|
|
1654
|
+
}, thumbnailContentType = (file) => THUMBNAIL_TYPES[extension(file)] ?? "application/octet-stream";
|
|
1655
|
+
|
|
1656
|
+
// src/core-server/utils/thumbnails.ts
|
|
1657
|
+
function registerThumbnailRoute(app, workingDir) {
|
|
1658
|
+
app.use(`/${THUMBNAIL_ROUTE}`, async (req, res) => {
|
|
1659
|
+
let url = (req.originalUrl ?? req.url ?? "").split("?")[0], file = thumbnailFile(url, workingDir);
|
|
1660
|
+
try {
|
|
1661
|
+
if (!file)
|
|
1662
|
+
throw new Error("Not a thumbnail");
|
|
1663
|
+
let body = await readFile(file);
|
|
1664
|
+
res.setHeader("Content-Type", thumbnailContentType(file)), res.end(body);
|
|
1665
|
+
} catch {
|
|
1666
|
+
res.statusCode = 404, res.end("Not found");
|
|
1667
|
+
}
|
|
1668
|
+
});
|
|
1669
|
+
}
|
|
1670
|
+
async function copyThumbnails(outputDir, index, workingDir) {
|
|
1671
|
+
let paths = new Set(
|
|
1672
|
+
Object.values(index.entries).map((entry) => entry.thumbnail).filter((path) => !!path && path.startsWith(`${THUMBNAIL_ROUTE}/`))
|
|
1673
|
+
), count = 0;
|
|
1674
|
+
return await Promise.all(
|
|
1675
|
+
[...paths].map(async (path) => {
|
|
1676
|
+
let file = thumbnailFile(path, workingDir);
|
|
1677
|
+
if (!file)
|
|
1678
|
+
return;
|
|
1679
|
+
let target = join3(outputDir, path);
|
|
1680
|
+
await mkdir(dirname2(target), { recursive: !0 }), await copyFile(file, target).then(
|
|
1681
|
+
() => count++,
|
|
1682
|
+
() => {
|
|
1683
|
+
}
|
|
1684
|
+
);
|
|
1685
|
+
})
|
|
1686
|
+
), count;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
// src/core-server/utils/write-route-pages.ts
|
|
1690
|
+
import { mkdir as mkdir2, readFile as readFile2, writeFile as writeFile2 } from "node:fs/promises";
|
|
1691
|
+
import { join as join4 } from "pathe";
|
|
1692
|
+
var STATIC_APP_ROUTES = [
|
|
1693
|
+
"/all",
|
|
1694
|
+
"/review",
|
|
1695
|
+
"/settings/about",
|
|
1696
|
+
"/settings/shortcuts",
|
|
1697
|
+
"/settings/whats-new"
|
|
1698
|
+
];
|
|
1699
|
+
async function writeRoutePages(outputDir, index) {
|
|
1700
|
+
let html = await readFile2(join4(outputDir, "index.html"), "utf8"), urlPaths = [...buildStoryPathMap(Object.values(index.entries)).byUrl.keys()], allPaths = [...STATIC_APP_ROUTES, ...urlPaths];
|
|
1701
|
+
return await Promise.all(
|
|
1702
|
+
allPaths.map(async (urlPath) => {
|
|
1703
|
+
let dir = join4(outputDir, urlPath);
|
|
1704
|
+
await mkdir2(dir, { recursive: !0 }), await writeFile2(join4(dir, "index.html"), withRouteDepth(html, urlPathDepth(urlPath)));
|
|
1705
|
+
})
|
|
1706
|
+
), allPaths.length;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1251
1709
|
// src/core-server/utils/metadata.ts
|
|
1252
|
-
import { writeFile as
|
|
1710
|
+
import { writeFile as writeFile3 } from "node:fs/promises";
|
|
1253
1711
|
import { getStorybookMetadata } from "@aussieljk/forkbook/internal/telemetry";
|
|
1254
1712
|
async function extractStorybookMetadata(outputFile, configDir) {
|
|
1255
1713
|
let storybookMetadata = await getStorybookMetadata(configDir);
|
|
1256
|
-
await
|
|
1714
|
+
await writeFile3(outputFile, JSON.stringify(storybookMetadata));
|
|
1257
1715
|
}
|
|
1258
1716
|
function useStorybookMetadata(app, configDir) {
|
|
1259
1717
|
app.use("/project.json", async (req, res) => {
|
|
@@ -1265,7 +1723,7 @@ function useStorybookMetadata(app, configDir) {
|
|
|
1265
1723
|
// src/core-server/utils/output-stats.ts
|
|
1266
1724
|
var import_json_ext = __toESM(require_src2(), 1), import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
1267
1725
|
import { createWriteStream } from "node:fs";
|
|
1268
|
-
import { join as
|
|
1726
|
+
import { join as join5 } from "node:path";
|
|
1269
1727
|
import { logger as logger3 } from "@aussieljk/forkbook/internal/node-logger";
|
|
1270
1728
|
async function outputStats(directory, previewStats, managerStats) {
|
|
1271
1729
|
if (previewStats) {
|
|
@@ -1278,9 +1736,9 @@ async function outputStats(directory, previewStats, managerStats) {
|
|
|
1278
1736
|
}
|
|
1279
1737
|
}
|
|
1280
1738
|
var writeStats = async (directory, name, stats) => {
|
|
1281
|
-
let filePath =
|
|
1282
|
-
return await new Promise((
|
|
1283
|
-
(0, import_json_ext.stringifyStream)(data, null, 2).on("error", reject).pipe(createWriteStream(filePath)).on("error", reject).on("finish",
|
|
1739
|
+
let filePath = join5(directory, `${name}-stats.json`), { chunks, ...data } = stats.toJson();
|
|
1740
|
+
return await new Promise((resolve10, reject) => {
|
|
1741
|
+
(0, import_json_ext.stringifyStream)(data, null, 2).on("error", reject).pipe(createWriteStream(filePath)).on("error", reject).on("finish", resolve10);
|
|
1284
1742
|
}), filePath;
|
|
1285
1743
|
};
|
|
1286
1744
|
|
|
@@ -1335,13 +1793,13 @@ function summarizeIndex(storyIndex) {
|
|
|
1335
1793
|
async function buildStaticStandalone(options) {
|
|
1336
1794
|
if (options.configType = "PRODUCTION", options.outputDir === "")
|
|
1337
1795
|
throw new Error("Won't remove current directory. Check your outputDir!");
|
|
1338
|
-
if (options.outputDir =
|
|
1796
|
+
if (options.outputDir = resolve4(options.outputDir), options.configDir = resolve4(options.configDir), logger4.step(`Cleaning outputDir: ${import_picocolors3.default.cyan(relative4(process.cwd(), options.outputDir))}`), options.outputDir === "/")
|
|
1339
1797
|
throw new Error("Won't remove directory '/'. Check your outputDir!");
|
|
1340
1798
|
await rm(options.outputDir, { recursive: !0, force: !0 }).catch(() => {
|
|
1341
|
-
}), await
|
|
1799
|
+
}), await mkdir3(options.outputDir, { recursive: !0 });
|
|
1342
1800
|
let config = await loadMainConfig(options), { framework } = config, corePresets = [], frameworkName = typeof framework == "string" ? framework : framework?.name;
|
|
1343
|
-
frameworkName ? corePresets.push(
|
|
1344
|
-
let commonPreset =
|
|
1801
|
+
frameworkName ? corePresets.push(join6(frameworkName, "preset")) : logger4.warn(`you have not specified a framework in your ${options.configDir}/main.js`);
|
|
1802
|
+
let commonPreset = join6(
|
|
1345
1803
|
resolvePackageDir("@aussieljk/forkbook"),
|
|
1346
1804
|
"dist/core-server/presets/common-preset.js"
|
|
1347
1805
|
), commonOverridePreset = import.meta.resolve("@aussieljk/forkbook/internal/core-server/presets/common-override-preset");
|
|
@@ -1389,7 +1847,7 @@ async function buildStaticStandalone(options) {
|
|
|
1389
1847
|
), staticDirs && effects.push(
|
|
1390
1848
|
copyAllStaticFilesRelativeToMain(staticDirs, options.outputDir, options.configDir)
|
|
1391
1849
|
);
|
|
1392
|
-
let coreServerPublicDir =
|
|
1850
|
+
let coreServerPublicDir = join6(resolvePackageDir("@aussieljk/forkbook"), "assets/browser");
|
|
1393
1851
|
effects.push(cp2(coreServerPublicDir, options.outputDir, { recursive: !0, force: !0 }));
|
|
1394
1852
|
let hasRegisteredServices = getRegisteredServices().length > 0, shouldWriteManifests = features?.componentsManifest;
|
|
1395
1853
|
(hasRegisteredServices || shouldWriteManifests) && effects.push(
|
|
@@ -1398,8 +1856,13 @@ async function buildStaticStandalone(options) {
|
|
|
1398
1856
|
})()
|
|
1399
1857
|
);
|
|
1400
1858
|
let storyIndexGeneratorPromise = presets.apply("storyIndexGenerator");
|
|
1401
|
-
effects.push(writeIndexJson(
|
|
1402
|
-
|
|
1859
|
+
effects.push(writeIndexJson(join6(options.outputDir, "index.json"), storyIndexGeneratorPromise)), options.previewOnly || effects.push(
|
|
1860
|
+
(async () => {
|
|
1861
|
+
let index = await (await storyIndexGeneratorPromise)?.getIndex();
|
|
1862
|
+
index && (await writeRoutePages(options.outputDir, index), await copyThumbnails(options.outputDir, index, process.cwd()));
|
|
1863
|
+
})()
|
|
1864
|
+
), core?.disableProjectJson || effects.push(
|
|
1865
|
+
extractStorybookMetadata(join6(options.outputDir, "project.json"), options.configDir)
|
|
1403
1866
|
), options.debugWebpack && logConfig("Preview webpack config", await previewBuilder.getConfig(fullOptions)), logger4.info("Building preview..");
|
|
1404
1867
|
let startTime = process.hrtime();
|
|
1405
1868
|
if (await Promise.all([
|
|
@@ -1432,7 +1895,7 @@ async function buildStaticStandalone(options) {
|
|
|
1432
1895
|
}
|
|
1433
1896
|
|
|
1434
1897
|
// src/core-server/build-dev.ts
|
|
1435
|
-
import { readFile as
|
|
1898
|
+
import { readFile as readFile5 } from "node:fs/promises";
|
|
1436
1899
|
import {
|
|
1437
1900
|
JsPackageManagerFactory,
|
|
1438
1901
|
getInterpretedFile,
|
|
@@ -1452,8 +1915,7 @@ import {
|
|
|
1452
1915
|
NoStatsForViteDevError
|
|
1453
1916
|
} from "@aussieljk/forkbook/internal/server-errors";
|
|
1454
1917
|
import { oneWayHash, telemetry as telemetry4 } from "@aussieljk/forkbook/internal/telemetry";
|
|
1455
|
-
import {
|
|
1456
|
-
import { join as join8, relative as relative4, resolve as resolve6 } from "pathe";
|
|
1918
|
+
import { join as join10, relative as relative5, resolve as resolve7 } from "pathe";
|
|
1457
1919
|
import { dedent as dedent5 } from "ts-dedent";
|
|
1458
1920
|
|
|
1459
1921
|
// src/channels/postmessage/index.ts
|
|
@@ -1627,63 +2089,7 @@ function build_default2(opts) {
|
|
|
1627
2089
|
}
|
|
1628
2090
|
|
|
1629
2091
|
// src/core-server/change-detection/change-detection-service.ts
|
|
1630
|
-
import { join as
|
|
1631
|
-
|
|
1632
|
-
// ../../node_modules/dequal/dist/index.mjs
|
|
1633
|
-
var has = Object.prototype.hasOwnProperty;
|
|
1634
|
-
function find(iter, tar, key) {
|
|
1635
|
-
for (key of iter.keys())
|
|
1636
|
-
if (dequal(key, tar)) return key;
|
|
1637
|
-
}
|
|
1638
|
-
function dequal(foo, bar) {
|
|
1639
|
-
var ctor, len, tmp;
|
|
1640
|
-
if (foo === bar) return !0;
|
|
1641
|
-
if (foo && bar && (ctor = foo.constructor) === bar.constructor) {
|
|
1642
|
-
if (ctor === Date) return foo.getTime() === bar.getTime();
|
|
1643
|
-
if (ctor === RegExp) return foo.toString() === bar.toString();
|
|
1644
|
-
if (ctor === Array) {
|
|
1645
|
-
if ((len = foo.length) === bar.length)
|
|
1646
|
-
for (; len-- && dequal(foo[len], bar[len]); ) ;
|
|
1647
|
-
return len === -1;
|
|
1648
|
-
}
|
|
1649
|
-
if (ctor === Set) {
|
|
1650
|
-
if (foo.size !== bar.size)
|
|
1651
|
-
return !1;
|
|
1652
|
-
for (len of foo)
|
|
1653
|
-
if (tmp = len, tmp && typeof tmp == "object" && (tmp = find(bar, tmp), !tmp) || !bar.has(tmp)) return !1;
|
|
1654
|
-
return !0;
|
|
1655
|
-
}
|
|
1656
|
-
if (ctor === Map) {
|
|
1657
|
-
if (foo.size !== bar.size)
|
|
1658
|
-
return !1;
|
|
1659
|
-
for (len of foo)
|
|
1660
|
-
if (tmp = len[0], tmp && typeof tmp == "object" && (tmp = find(bar, tmp), !tmp) || !dequal(len[1], bar.get(tmp)))
|
|
1661
|
-
return !1;
|
|
1662
|
-
return !0;
|
|
1663
|
-
}
|
|
1664
|
-
if (ctor === ArrayBuffer)
|
|
1665
|
-
foo = new Uint8Array(foo), bar = new Uint8Array(bar);
|
|
1666
|
-
else if (ctor === DataView) {
|
|
1667
|
-
if ((len = foo.byteLength) === bar.byteLength)
|
|
1668
|
-
for (; len-- && foo.getInt8(len) === bar.getInt8(len); ) ;
|
|
1669
|
-
return len === -1;
|
|
1670
|
-
}
|
|
1671
|
-
if (ArrayBuffer.isView(foo)) {
|
|
1672
|
-
if ((len = foo.byteLength) === bar.byteLength)
|
|
1673
|
-
for (; len-- && foo[len] === bar[len]; ) ;
|
|
1674
|
-
return len === -1;
|
|
1675
|
-
}
|
|
1676
|
-
if (!ctor || typeof foo == "object") {
|
|
1677
|
-
len = 0;
|
|
1678
|
-
for (ctor in foo)
|
|
1679
|
-
if (has.call(foo, ctor) && ++len && !has.call(bar, ctor) || !(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return !1;
|
|
1680
|
-
return Object.keys(bar).length === len;
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
return foo !== foo && bar !== bar;
|
|
1684
|
-
}
|
|
1685
|
-
|
|
1686
|
-
// src/core-server/change-detection/change-detection-service.ts
|
|
2092
|
+
import { join as join7, normalize as normalize2 } from "pathe";
|
|
1687
2093
|
import { logger as logger7 } from "@aussieljk/forkbook/internal/node-logger";
|
|
1688
2094
|
import { CHANGE_DETECTION_STATUS_TYPE_ID } from "@aussieljk/forkbook/internal/types";
|
|
1689
2095
|
|
|
@@ -1755,7 +2161,7 @@ function errorLikeToError(errorLike) {
|
|
|
1755
2161
|
return error.name = errorLike.name ?? error.name, errorLike.stack && (error.stack = errorLike.stack), error;
|
|
1756
2162
|
}
|
|
1757
2163
|
function isSameStatus(a, b) {
|
|
1758
|
-
return a ? a.storyId === b.storyId && a.typeId === b.typeId && a.value === b.value && a.title === b.title && a.description === b.description && a.sidebarContextMenu === b.sidebarContextMenu &&
|
|
2164
|
+
return a ? a.storyId === b.storyId && a.typeId === b.typeId && a.value === b.value && a.title === b.title && a.description === b.description && a.sidebarContextMenu === b.sidebarContextMenu && isEqual(a.data, b.data) : !1;
|
|
1759
2165
|
}
|
|
1760
2166
|
function mergeStatusValues(previousValue, nextValue) {
|
|
1761
2167
|
return previousValue === "status-value:new" || nextValue === "status-value:new" ? "status-value:new" : previousValue === "status-value:modified" || nextValue === "status-value:modified" ? "status-value:modified" : previousValue === "status-value:affected" || nextValue === "status-value:affected" ? "status-value:affected" : nextValue;
|
|
@@ -1917,9 +2323,9 @@ var ChangeDetectionService = class {
|
|
|
1917
2323
|
this.options.storyIndexGeneratorPromise,
|
|
1918
2324
|
this.getIndexBaselineService().getBaselineEntryIds()
|
|
1919
2325
|
]), changedFiles = new Set(
|
|
1920
|
-
Array.from(changes.changed).map((path) =>
|
|
2326
|
+
Array.from(changes.changed).map((path) => normalize2(join7(repoRoot, path)))
|
|
1921
2327
|
), newFiles = new Set(
|
|
1922
|
-
Array.from(changes.new).map((path) =>
|
|
2328
|
+
Array.from(changes.new).map((path) => normalize2(join7(repoRoot, path)))
|
|
1923
2329
|
), scannedFiles = /* @__PURE__ */ new Set([...changedFiles, ...newFiles]), storyIndex = await storyIndexGenerator.getIndex(), baselineStatuses = buildIndexBaselineStatuses(storyIndex, baselineEntryIds), storyIdsByFile = getStoryIdsByAbsolutePath(storyIndex, this.workingDir), statuses = /* @__PURE__ */ new Map(), scannedFilesArray = [...scannedFiles], lookupResults = await this.getModuleGraphIndex().queries.storiesForFiles.loaded({
|
|
1924
2330
|
files: scannedFilesArray
|
|
1925
2331
|
});
|
|
@@ -2130,13 +2536,13 @@ function getSecurityHeadersMiddleware(security) {
|
|
|
2130
2536
|
|
|
2131
2537
|
// src/core-server/utils/middleware.ts
|
|
2132
2538
|
import { existsSync } from "node:fs";
|
|
2133
|
-
import { resolve as
|
|
2539
|
+
import { resolve as resolve5 } from "pathe";
|
|
2134
2540
|
var fileExists = (basename4) => [".js", ".mjs", ".cjs"].reduce((found, ext) => {
|
|
2135
2541
|
let filename = `${basename4}${ext}`;
|
|
2136
2542
|
return !found && existsSync(filename) ? filename : found;
|
|
2137
2543
|
}, "");
|
|
2138
2544
|
async function getMiddleware(configDir) {
|
|
2139
|
-
let middlewarePath = fileExists(
|
|
2545
|
+
let middlewarePath = fileExists(resolve5(configDir, "middleware"));
|
|
2140
2546
|
if (middlewarePath) {
|
|
2141
2547
|
let middlewareModule = await import("file://" + middlewarePath);
|
|
2142
2548
|
return middlewareModule.default ?? middlewareModule;
|
|
@@ -2153,7 +2559,7 @@ import { dedent } from "ts-dedent";
|
|
|
2153
2559
|
// src/core-server/utils/open-browser/opener.ts
|
|
2154
2560
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1), import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
2155
2561
|
import { execSync } from "node:child_process";
|
|
2156
|
-
import { join as
|
|
2562
|
+
import { join as join8 } from "node:path";
|
|
2157
2563
|
import { logger as logger8 } from "@aussieljk/forkbook/internal/node-logger";
|
|
2158
2564
|
import open from "open";
|
|
2159
2565
|
var OSX_CHROME = "google chrome";
|
|
@@ -2214,7 +2620,7 @@ function startBrowserProcess(browser, url, args) {
|
|
|
2214
2620
|
for (let chromiumBrowser of supportedChromiumBrowsers)
|
|
2215
2621
|
try {
|
|
2216
2622
|
execSync(`ps cax | grep "${chromiumBrowser}"`);
|
|
2217
|
-
let command = `osascript "${
|
|
2623
|
+
let command = `osascript "${join8(
|
|
2218
2624
|
resolvePackageDir("@aussieljk/forkbook"),
|
|
2219
2625
|
"assets",
|
|
2220
2626
|
"server",
|
|
@@ -2301,23 +2707,25 @@ var getListenHost = (host) => host || "127.0.0.1", COVERS_LOOPBACK = /* @__PURE_
|
|
|
2301
2707
|
if (COVERS_LOOPBACK.has(address))
|
|
2302
2708
|
return;
|
|
2303
2709
|
let loopback = net3.createServer((socket) => server.emit("connection", socket));
|
|
2304
|
-
return server.once("close", () => loopback.close()), await new Promise((
|
|
2305
|
-
loopback.once("error", reject), loopback.listen({ port, host: "127.0.0.1" },
|
|
2710
|
+
return server.once("close", () => loopback.close()), await new Promise((resolve10, reject) => {
|
|
2711
|
+
loopback.once("error", reject), loopback.listen({ port, host: "127.0.0.1" }, resolve10);
|
|
2306
2712
|
}), loopback;
|
|
2307
2713
|
};
|
|
2308
2714
|
function getServerAddresses(port, host, proto, initialPath) {
|
|
2309
2715
|
let address = new URL(`${proto}://127.0.0.1:${port}/`), networkAddress = new URL(`${proto}://${host || getLocalIp()}:${port}/`);
|
|
2310
|
-
if (initialPath) {
|
|
2311
|
-
let searchParams = `?path=${decodeURIComponent(
|
|
2312
|
-
initialPath.startsWith("/") ? initialPath : `/${initialPath}`
|
|
2313
|
-
)}`;
|
|
2314
|
-
address.search = searchParams, networkAddress.search = searchParams;
|
|
2315
|
-
}
|
|
2316
2716
|
return {
|
|
2317
|
-
address: address.href,
|
|
2318
|
-
networkAddress: networkAddress.href
|
|
2717
|
+
address: withInitialPath(address.href, initialPath),
|
|
2718
|
+
networkAddress: withInitialPath(networkAddress.href, initialPath)
|
|
2319
2719
|
};
|
|
2320
2720
|
}
|
|
2721
|
+
function withInitialPath(address, initialPath) {
|
|
2722
|
+
if (!initialPath)
|
|
2723
|
+
return address;
|
|
2724
|
+
let url = new URL(address);
|
|
2725
|
+
return url.pathname = decodeURIComponent(
|
|
2726
|
+
initialPath.startsWith("/") ? initialPath : `/${initialPath}`
|
|
2727
|
+
).replace(/^\/(story|docs)\//, "/_$1/"), url.href;
|
|
2728
|
+
}
|
|
2321
2729
|
var getServerPort = (port, { exactPort } = {}) => (0, import_detect_port.default)(port).catch((error) => {
|
|
2322
2730
|
logger10.error(error), process.exit(-1);
|
|
2323
2731
|
}).then((freePort) => {
|
|
@@ -2365,7 +2773,7 @@ async function storybookDevServer(options, server) {
|
|
|
2365
2773
|
channel: options.channel,
|
|
2366
2774
|
workingDir,
|
|
2367
2775
|
configDir
|
|
2368
|
-
}), (await getMiddleware(options.configDir))(app), await options.presets.apply("experimental_devServer", app), !core?.builder)
|
|
2776
|
+
}), registerThumbnailRoute(app, workingDir), (await getMiddleware(options.configDir))(app), await options.presets.apply("experimental_devServer", app), !core?.builder)
|
|
2369
2777
|
throw new MissingBuilderError();
|
|
2370
2778
|
let resolvedPreviewBuilder = typeof core?.builder == "string" ? core.builder : core?.builder?.name, [previewBuilder, managerBuilder] = await Promise.all([
|
|
2371
2779
|
getPreviewBuilder(resolvedPreviewBuilder),
|
|
@@ -2406,14 +2814,16 @@ async function storybookDevServer(options, server) {
|
|
|
2406
2814
|
logger11.warn("Change detection: adapter initialisation failed"), logger11.debug(err instanceof Error ? err.stack ?? err.message : String(err));
|
|
2407
2815
|
}
|
|
2408
2816
|
resolveChangeDetectionAdapter(adapter), changeDetectionService.start();
|
|
2409
|
-
let listening = new Promise((
|
|
2410
|
-
server.once("error", reject), app.listen({ port: options.port, host: getListenHost(options.host) },
|
|
2817
|
+
let listening = new Promise((resolve10, reject) => {
|
|
2818
|
+
server.once("error", reject), app.listen({ port: options.port, host: getListenHost(options.host) }, resolve10);
|
|
2411
2819
|
}).then(() => addLoopbackListener(server));
|
|
2412
2820
|
try {
|
|
2413
2821
|
let [indexGenerator] = await Promise.all([storyIndexGeneratorPromise, listening]);
|
|
2414
2822
|
if (indexGenerator && !options.ci && !options.smokeTest && options.open) {
|
|
2415
2823
|
let url = options.host && options.host !== "0.0.0.0" ? options.networkAddress : options.localAddress;
|
|
2416
|
-
openInBrowser(
|
|
2824
|
+
openInBrowser(
|
|
2825
|
+
options.previewOnly ? `${url}iframe.html?navigator=true` : withInitialPath(url, options.initialPath)
|
|
2826
|
+
).catch(() => {
|
|
2417
2827
|
});
|
|
2418
2828
|
}
|
|
2419
2829
|
} catch (e) {
|
|
@@ -2497,6 +2907,7 @@ var CORE_EVENT_SENDERS = {
|
|
|
2497
2907
|
[events.STORIES_COLLAPSE_ALL]: "manager",
|
|
2498
2908
|
[events.STORIES_EXPAND_ALL]: "manager",
|
|
2499
2909
|
[events.DOCS_RENDERED]: "preview",
|
|
2910
|
+
[events.DOCS_PAGE_IN_VIEW]: "preview",
|
|
2500
2911
|
[events.SHARED_STATE_CHANGED]: "any",
|
|
2501
2912
|
[events.SHARED_STATE_SET]: "any",
|
|
2502
2913
|
[events.NAVIGATE_URL]: "any",
|
|
@@ -2645,7 +3056,7 @@ function prepareHeadlessUniversalStores() {
|
|
|
2645
3056
|
import { cache as cache2, isCI } from "@aussieljk/forkbook/internal/common";
|
|
2646
3057
|
import { logger as logger12, prompt } from "@aussieljk/forkbook/internal/node-logger";
|
|
2647
3058
|
import { dedent as dedent2 } from "ts-dedent";
|
|
2648
|
-
var DOCS_URL = "https://
|
|
3059
|
+
var DOCS_URL = "https://forkbook.ljk.dev/docs/api/main-config/main-config-core#allowedhosts", getHostValidationWarning = ({
|
|
2649
3060
|
host,
|
|
2650
3061
|
allowedHosts
|
|
2651
3062
|
}) => {
|
|
@@ -2702,8 +3113,8 @@ async function warnOnDisabledHostValidation(options) {
|
|
|
2702
3113
|
}
|
|
2703
3114
|
|
|
2704
3115
|
// src/core-server/utils/output-startup-information.ts
|
|
2705
|
-
var import_picocolors6 = __toESM(require_picocolors(), 1)
|
|
2706
|
-
import { CLI_COLORS, logger as logger13 } from "@aussieljk/forkbook/internal/node-logger";
|
|
3116
|
+
var import_picocolors6 = __toESM(require_picocolors(), 1);
|
|
3117
|
+
import { CLI_COLORS, logger as logger13, prettyTime } from "@aussieljk/forkbook/internal/node-logger";
|
|
2707
3118
|
import { dedent as dedent4 } from "ts-dedent";
|
|
2708
3119
|
|
|
2709
3120
|
// src/core-server/utils/update-check.ts
|
|
@@ -2712,7 +3123,7 @@ import { cache as cache3 } from "@aussieljk/forkbook/internal/common";
|
|
|
2712
3123
|
import { colors } from "@aussieljk/forkbook/internal/node-logger";
|
|
2713
3124
|
import semver from "semver";
|
|
2714
3125
|
import { dedent as dedent3 } from "ts-dedent";
|
|
2715
|
-
var { FORKBOOK_VERSION_BASE = "https://
|
|
3126
|
+
var { FORKBOOK_VERSION_BASE = "https://forkbook.ljk.dev", CI } = process.env, updateCheck = async (version) => {
|
|
2716
3127
|
let result, time = Date.now();
|
|
2717
3128
|
try {
|
|
2718
3129
|
let fromCache = await cache3.get("lastUpdateCheck", { success: !1, time: 0 });
|
|
@@ -2729,7 +3140,7 @@ var { FORKBOOK_VERSION_BASE = "https://storybook.js.org", CI } = process.env, up
|
|
|
2729
3140
|
function createUpdateMessage(updateInfo, version) {
|
|
2730
3141
|
let updateMessage;
|
|
2731
3142
|
try {
|
|
2732
|
-
let upgradeCommand = `npx
|
|
3143
|
+
let upgradeCommand = `npx @aussieljk/forkbook@${semver.prerelease(updateInfo.data.latest.version) ? "next" : "latest"} upgrade`;
|
|
2733
3144
|
updateMessage = updateInfo.success && semver.lt(version, updateInfo.data.latest.version) ? dedent3`
|
|
2734
3145
|
${colors.orange(
|
|
2735
3146
|
`A new version (${import_picocolors5.default.bold(updateInfo.data.latest.version)}) is available!`
|
|
@@ -2738,7 +3149,7 @@ function createUpdateMessage(updateInfo, version) {
|
|
|
2738
3149
|
${import_picocolors5.default.gray("Upgrade now:")} ${colors.green(upgradeCommand)}
|
|
2739
3150
|
|
|
2740
3151
|
${import_picocolors5.default.gray("Read full changelog:")} ${import_picocolors5.default.gray(
|
|
2741
|
-
import_picocolors5.default.underline("https://github.com/
|
|
3152
|
+
import_picocolors5.default.underline("https://github.com/aussieljk/forkbook/commits/master")
|
|
2742
3153
|
)}
|
|
2743
3154
|
` : "";
|
|
2744
3155
|
} catch {
|
|
@@ -2781,8 +3192,8 @@ ${updateMessage}` : ""}
|
|
|
2781
3192
|
}
|
|
2782
3193
|
);
|
|
2783
3194
|
let timeStatement = [
|
|
2784
|
-
managerTotalTime && `${import_picocolors6.default.underline((
|
|
2785
|
-
previewTotalTime && `${import_picocolors6.default.underline((
|
|
3195
|
+
managerTotalTime && `${import_picocolors6.default.underline(prettyTime(managerTotalTime))} for manager`,
|
|
3196
|
+
previewTotalTime && `${import_picocolors6.default.underline(prettyTime(previewTotalTime))} for preview`
|
|
2786
3197
|
].filter(Boolean).join(" and ");
|
|
2787
3198
|
logger13.info(timeStatement);
|
|
2788
3199
|
}
|
|
@@ -2791,10 +3202,10 @@ ${updateMessage}` : ""}
|
|
|
2791
3202
|
import { execFile } from "node:child_process";
|
|
2792
3203
|
import { randomUUID } from "node:crypto";
|
|
2793
3204
|
import { existsSync as existsSync2, rmSync } from "node:fs";
|
|
2794
|
-
import { chmod, mkdir as
|
|
3205
|
+
import { chmod, mkdir as mkdir4, readFile as readFile3, readdir, rename, rm as rm2, stat, writeFile as writeFile4 } from "node:fs/promises";
|
|
2795
3206
|
import { homedir, userInfo } from "node:os";
|
|
2796
3207
|
import { findStorybookPackageRoot, normalizeAddonName } from "@aussieljk/forkbook/internal/common";
|
|
2797
|
-
import { join as
|
|
3208
|
+
import { join as join9, resolve as resolve6 } from "pathe";
|
|
2798
3209
|
var FORKBOOK_MCP_ADDON = "@aussieljk/forkbook/addon-mcp", DEFAULT_MCP_ENDPOINT = "/mcp", ONE_DAY_MS = 1440 * 60 * 1e3, SEVEN_DAYS_MS = 7 * ONE_DAY_MS, REGISTRY_DIR_MODE = 448, RECORD_FILE_MODE = 384;
|
|
2799
3210
|
function execFileAsync(file, args) {
|
|
2800
3211
|
return new Promise((resolveExec, rejectExec) => {
|
|
@@ -2821,7 +3232,7 @@ async function restrictOwnerAccess(targetPath, mode) {
|
|
|
2821
3232
|
}
|
|
2822
3233
|
}
|
|
2823
3234
|
function getDefaultRuntimeInstanceRegistryDir() {
|
|
2824
|
-
return
|
|
3235
|
+
return join9(homedir(), ".forkbook", "instances");
|
|
2825
3236
|
}
|
|
2826
3237
|
function getStorybookBaseUrl(address) {
|
|
2827
3238
|
let url = new URL(address);
|
|
@@ -2855,8 +3266,8 @@ function createRuntimeInstanceRecord({
|
|
|
2855
3266
|
schemaVersion: 1,
|
|
2856
3267
|
instanceId,
|
|
2857
3268
|
pid,
|
|
2858
|
-
cwd:
|
|
2859
|
-
...configDir ? { configDir:
|
|
3269
|
+
cwd: resolve6(cwd),
|
|
3270
|
+
...configDir ? { configDir: resolve6(cwd, configDir) } : {},
|
|
2860
3271
|
url: storybookBaseUrl,
|
|
2861
3272
|
port,
|
|
2862
3273
|
...token ? { token } : {},
|
|
@@ -2869,13 +3280,13 @@ function createRuntimeInstanceRecord({
|
|
|
2869
3280
|
};
|
|
2870
3281
|
}
|
|
2871
3282
|
async function writeRuntimeInstanceRecord(record, registryDir = getDefaultRuntimeInstanceRegistryDir()) {
|
|
2872
|
-
await
|
|
2873
|
-
let recordPath =
|
|
3283
|
+
await mkdir4(registryDir, { recursive: !0, mode: REGISTRY_DIR_MODE }), await restrictOwnerAccess(registryDir, REGISTRY_DIR_MODE), await cleanupRuntimeInstanceRegistry(registryDir);
|
|
3284
|
+
let recordPath = join9(registryDir, `${record.instanceId}.json`), tempPath = join9(
|
|
2874
3285
|
registryDir,
|
|
2875
3286
|
`${record.instanceId}.${record.pid}.${Date.now()}.${Math.random().toString(16).slice(2)}.tmp`
|
|
2876
3287
|
);
|
|
2877
3288
|
try {
|
|
2878
|
-
await
|
|
3289
|
+
await writeFile4(tempPath, `${JSON.stringify(record, null, 2)}
|
|
2879
3290
|
`, {
|
|
2880
3291
|
encoding: "utf-8",
|
|
2881
3292
|
mode: RECORD_FILE_MODE
|
|
@@ -2936,7 +3347,7 @@ async function cleanupRuntimeInstanceRegistry(registryDir) {
|
|
|
2936
3347
|
entries.map(async (entry) => {
|
|
2937
3348
|
if (!entry.isFile())
|
|
2938
3349
|
return;
|
|
2939
|
-
let recordPath =
|
|
3350
|
+
let recordPath = join9(registryDir, entry.name);
|
|
2940
3351
|
try {
|
|
2941
3352
|
let { mtimeMs } = await stat(recordPath);
|
|
2942
3353
|
if (entry.name.endsWith(".tmp")) {
|
|
@@ -2952,7 +3363,7 @@ async function cleanupRuntimeInstanceRegistry(registryDir) {
|
|
|
2952
3363
|
}
|
|
2953
3364
|
if (!entry.name.endsWith(".json"))
|
|
2954
3365
|
return;
|
|
2955
|
-
let content = await
|
|
3366
|
+
let content = await readFile3(recordPath, "utf-8"), record;
|
|
2956
3367
|
try {
|
|
2957
3368
|
record = JSON.parse(content);
|
|
2958
3369
|
} catch {
|
|
@@ -3024,7 +3435,7 @@ async function writeStorybookRuntimeInstanceRecord({
|
|
|
3024
3435
|
}
|
|
3025
3436
|
|
|
3026
3437
|
// src/core-server/utils/server-init.ts
|
|
3027
|
-
import { readFile as
|
|
3438
|
+
import { readFile as readFile4 } from "node:fs/promises";
|
|
3028
3439
|
import { logger as logger14 } from "@aussieljk/forkbook/internal/node-logger";
|
|
3029
3440
|
import http2 from "http";
|
|
3030
3441
|
import https from "https";
|
|
@@ -3033,9 +3444,9 @@ async function getServer(options) {
|
|
|
3033
3444
|
return http2.createServer();
|
|
3034
3445
|
options.sslCert || (logger14.error("Error: --ssl-cert is required with --https"), process.exit(-1)), options.sslKey || (logger14.error("Error: --ssl-key is required with --https"), process.exit(-1));
|
|
3035
3446
|
let sslOptions = {
|
|
3036
|
-
ca: await Promise.all((options.sslCa || []).map((ca) =>
|
|
3037
|
-
cert: await
|
|
3038
|
-
key: await
|
|
3447
|
+
ca: await Promise.all((options.sslCa || []).map((ca) => readFile4(ca, { encoding: "utf8" }))),
|
|
3448
|
+
cert: await readFile4(options.sslCert, { encoding: "utf8" }),
|
|
3449
|
+
key: await readFile4(options.sslKey, { encoding: "utf8" })
|
|
3039
3450
|
};
|
|
3040
3451
|
return https.createServer(sslOptions);
|
|
3041
3452
|
}
|
|
@@ -3050,7 +3461,7 @@ function stripCommentsAndStrings(code) {
|
|
|
3050
3461
|
|
|
3051
3462
|
// src/core-server/build-dev.ts
|
|
3052
3463
|
async function buildDevStandalone(options) {
|
|
3053
|
-
let { packageJson, versionUpdates } = options, { storybookVersion } = options, configDir =
|
|
3464
|
+
let { packageJson, versionUpdates } = options, { storybookVersion } = options, configDir = resolve7(options.configDir);
|
|
3054
3465
|
packageJson ? (invariant(
|
|
3055
3466
|
packageJson.version !== void 0,
|
|
3056
3467
|
`Expected package.json#version to be defined in the "${packageJson.name}" package}`
|
|
@@ -3066,17 +3477,16 @@ async function buildDevStandalone(options) {
|
|
|
3066
3477
|
`,
|
|
3067
3478
|
initialValue: !0
|
|
3068
3479
|
}) || process.exit(1));
|
|
3069
|
-
let cacheKey = oneWayHash(
|
|
3480
|
+
let cacheKey = oneWayHash(relative5(getProjectRoot(), configDir));
|
|
3070
3481
|
invariant(port, "expected options to have a port");
|
|
3071
3482
|
let { address: localAddress, networkAddress } = getServerAddresses(
|
|
3072
3483
|
port,
|
|
3073
3484
|
options.host,
|
|
3074
|
-
options.https ? "https" : "http"
|
|
3075
|
-
|
|
3076
|
-
), cacheOutputDir = resolvePathInStorybookCache2("public", cacheKey), outputDir = resolve6(options.outputDir || cacheOutputDir);
|
|
3485
|
+
options.https ? "https" : "http"
|
|
3486
|
+
), cacheOutputDir = resolvePathInStorybookCache2("public", cacheKey), outputDir = resolve7(options.outputDir || cacheOutputDir);
|
|
3077
3487
|
options.smokeTest && (outputDir = cacheOutputDir), options.port = port, options.versionCheck = versionCheck, options.configType = "DEVELOPMENT", options.configDir = configDir, options.cacheKey = cacheKey, options.outputDir = outputDir, options.serverChannelUrl = getServerChannelUrl(port, options), options.localAddress = localAddress, options.networkAddress = networkAddress;
|
|
3078
3488
|
let config = await loadMainConfig2(options), { core, framework } = config, corePresets = [], frameworkName = typeof framework == "string" ? framework : framework?.name;
|
|
3079
|
-
validateFrameworkName(frameworkName), frameworkName && corePresets.push(
|
|
3489
|
+
validateFrameworkName(frameworkName), frameworkName && corePresets.push(join10(frameworkName, "preset")), frameworkName = frameworkName || "custom";
|
|
3080
3490
|
let packageManager = JsPackageManagerFactory.getPackageManager({
|
|
3081
3491
|
configDir: options.configDir
|
|
3082
3492
|
}), server = await getServer(options), presets = await loadAllPresets2({
|
|
@@ -3110,11 +3520,11 @@ async function buildDevStandalone(options) {
|
|
|
3110
3520
|
]);
|
|
3111
3521
|
if (resolvedPreviewBuilder.includes("builder-vite")) {
|
|
3112
3522
|
let deprecationMessage = dedent5(`Using CommonJS in your main configuration file is deprecated with Vite.
|
|
3113
|
-
- Refer to the migration guide at https://
|
|
3114
|
-
|
|
3523
|
+
- Refer to the migration guide at https://forkbook.ljk.dev/docs/migration#commonjs-with-vite-is-deprecated`), mainJsPath = getInterpretedFile(
|
|
3524
|
+
resolve7(options.configDir || defaultConfigDir(), "main")
|
|
3115
3525
|
);
|
|
3116
3526
|
/\.c[jt]s$/.test(mainJsPath) && deprecate(deprecationMessage);
|
|
3117
|
-
let mainJsContent = await
|
|
3527
|
+
let mainJsContent = await readFile5(mainJsPath, { encoding: "utf8" }), CJS_CONTENT_REGEX = /\bmodule\.exports\b|\bexports[.[]|\brequire\s*\(|\bObject\.(?:defineProperty|defineProperties|assign)\s*\(\s*exports\b/, strippedContent = stripCommentsAndStrings(mainJsContent);
|
|
3118
3528
|
CJS_CONTENT_REGEX.test(strippedContent) && deprecate(deprecationMessage);
|
|
3119
3529
|
}
|
|
3120
3530
|
let resolvedRenderer = renderer && resolveAddonName2(options.configDir, renderer, options), channel = getServerChannel(server, {
|
|
@@ -3127,7 +3537,7 @@ async function buildDevStandalone(options) {
|
|
|
3127
3537
|
});
|
|
3128
3538
|
presets = await loadAllPresets2({
|
|
3129
3539
|
corePresets: [
|
|
3130
|
-
|
|
3540
|
+
join10(resolvePackageDir("@aussieljk/forkbook"), "dist/core-server/presets/common-preset.js"),
|
|
3131
3541
|
...managerBuilder.corePresets || [],
|
|
3132
3542
|
...previewBuilder.corePresets || [],
|
|
3133
3543
|
...resolvedRenderer ? [resolvedRenderer] : [],
|
|
@@ -3141,7 +3551,7 @@ async function buildDevStandalone(options) {
|
|
|
3141
3551
|
channel
|
|
3142
3552
|
});
|
|
3143
3553
|
let features = await presets.apply("features");
|
|
3144
|
-
|
|
3554
|
+
global2.FEATURES = features, await presets.apply("experimental_serverChannel", channel);
|
|
3145
3555
|
let fullOptions = {
|
|
3146
3556
|
...options,
|
|
3147
3557
|
presets,
|
|
@@ -3185,9 +3595,9 @@ async function buildDevStandalone(options) {
|
|
|
3185
3595
|
updateInfo: versionCheck,
|
|
3186
3596
|
version: storybookVersion,
|
|
3187
3597
|
name,
|
|
3188
|
-
address: localAddress,
|
|
3598
|
+
address: withInitialPath(localAddress, options.initialPath),
|
|
3189
3599
|
host: options.host,
|
|
3190
|
-
networkAddress,
|
|
3600
|
+
networkAddress: withInitialPath(networkAddress, options.initialPath),
|
|
3191
3601
|
allowedHosts,
|
|
3192
3602
|
managerTotalTime,
|
|
3193
3603
|
previewTotalTime
|
|
@@ -3197,7 +3607,7 @@ async function buildDevStandalone(options) {
|
|
|
3197
3607
|
}
|
|
3198
3608
|
|
|
3199
3609
|
// src/core-server/build-index.ts
|
|
3200
|
-
import { writeFile as
|
|
3610
|
+
import { writeFile as writeFile5 } from "node:fs/promises";
|
|
3201
3611
|
import { normalizeStories as normalizeStories2 } from "@aussieljk/forkbook/internal/common";
|
|
3202
3612
|
import { logger as logger17 } from "@aussieljk/forkbook/internal/node-logger";
|
|
3203
3613
|
|
|
@@ -3212,15 +3622,14 @@ import {
|
|
|
3212
3622
|
validateFrameworkName as validateFrameworkName2
|
|
3213
3623
|
} from "@aussieljk/forkbook/internal/common";
|
|
3214
3624
|
import { oneWayHash as oneWayHash2 } from "@aussieljk/forkbook/internal/telemetry";
|
|
3215
|
-
import {
|
|
3216
|
-
import { dirname, isAbsolute, join as join9, relative as relative5, resolve as resolve7 } from "pathe";
|
|
3625
|
+
import { dirname as dirname3, isAbsolute as isAbsolute2, join as join11, relative as relative6, resolve as resolve8 } from "pathe";
|
|
3217
3626
|
async function loadStorybook(options) {
|
|
3218
|
-
let configDir =
|
|
3627
|
+
let configDir = resolve8(options.configDir), cacheKey = oneWayHash2(relative6(getProjectRoot2(), configDir));
|
|
3219
3628
|
options.configType = "DEVELOPMENT", options.configDir = configDir, options.cacheKey = cacheKey;
|
|
3220
3629
|
let channel = options.channel ?? new Channel4({});
|
|
3221
3630
|
setChannel3(channel);
|
|
3222
3631
|
let config = await loadMainConfig3(options), { framework } = config, corePresets = [], frameworkName = typeof framework == "string" ? framework : framework?.name;
|
|
3223
|
-
validateFrameworkName2(frameworkName), frameworkName && corePresets.push(
|
|
3632
|
+
validateFrameworkName2(frameworkName), frameworkName && corePresets.push(join11(frameworkName, "preset")), frameworkName = frameworkName || "custom";
|
|
3224
3633
|
let presets = await loadAllPresets3({
|
|
3225
3634
|
corePresets,
|
|
3226
3635
|
overridePresets: [
|
|
@@ -3231,12 +3640,12 @@ async function loadStorybook(options) {
|
|
|
3231
3640
|
channel
|
|
3232
3641
|
}), { renderer, builder } = await presets.apply("core", {}), resolvedRenderer = renderer && resolveAddonName3(options.configDir, renderer, options), builderName = typeof builder == "string" ? builder : builder?.name;
|
|
3233
3642
|
if (builderName) {
|
|
3234
|
-
let builderEntry = builderName.startsWith("file:") ? fileURLToPath(builderName) : builderName, builderPresetDir =
|
|
3643
|
+
let builderEntry = builderName.startsWith("file:") ? fileURLToPath(builderName) : builderName, builderPresetDir = isAbsolute2(builderEntry) ? dirname3(builderEntry) : resolvePackageDir(builderEntry), builderPreset = safeResolveModule({ specifier: join11(builderPresetDir, "preset.js") });
|
|
3235
3644
|
builderPreset && corePresets.push(builderPreset);
|
|
3236
3645
|
}
|
|
3237
3646
|
presets = await loadAllPresets3({
|
|
3238
3647
|
corePresets: [
|
|
3239
|
-
|
|
3648
|
+
join11(resolvePackageDir("@aussieljk/forkbook"), "dist/core-server/presets/common-preset.js"),
|
|
3240
3649
|
...resolvedRenderer ? [resolvedRenderer] : [],
|
|
3241
3650
|
...corePresets
|
|
3242
3651
|
],
|
|
@@ -3247,7 +3656,7 @@ async function loadStorybook(options) {
|
|
|
3247
3656
|
channel
|
|
3248
3657
|
});
|
|
3249
3658
|
let features = await presets.apply("features");
|
|
3250
|
-
return
|
|
3659
|
+
return global2.FEATURES = features, await applyServicesPresetOnce(presets), {
|
|
3251
3660
|
...options,
|
|
3252
3661
|
// the resolved channel — the one the presets received — never the possibly-absent option
|
|
3253
3662
|
channel,
|
|
@@ -3258,8 +3667,8 @@ async function loadStorybook(options) {
|
|
|
3258
3667
|
|
|
3259
3668
|
// src/core-server/utils/StoryIndexGenerator.ts
|
|
3260
3669
|
import { existsSync as existsSync3 } from "node:fs";
|
|
3261
|
-
import { readFile as
|
|
3262
|
-
import { dirname as
|
|
3670
|
+
import { readFile as readFile6 } from "node:fs/promises";
|
|
3671
|
+
import { dirname as dirname4, extname, join as join12, normalize as normalize3, relative as relative7, resolve as resolve9, sep as sep2 } from "node:path";
|
|
3263
3672
|
import {
|
|
3264
3673
|
commonGlobOptions as commonGlobOptions2,
|
|
3265
3674
|
getProjectRoot as getProjectRoot3,
|
|
@@ -3337,7 +3746,7 @@ var toComparator = (storySortParameter) => typeof storySortParameter == "functio
|
|
|
3337
3746
|
|
|
3338
3747
|
Are you using a V6-style sort function in V7 mode?
|
|
3339
3748
|
|
|
3340
|
-
More info: https://
|
|
3749
|
+
More info: https://forkbook.ljk.dev/docs/migration#v7-style-story-sort
|
|
3341
3750
|
`);
|
|
3342
3751
|
}
|
|
3343
3752
|
};
|
|
@@ -3519,7 +3928,7 @@ var addStats = (stat2, acc) => {
|
|
|
3519
3928
|
};
|
|
3520
3929
|
|
|
3521
3930
|
// src/core-server/utils/StoryIndexGenerator.ts
|
|
3522
|
-
var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.startsWith(".") ? slash(
|
|
3931
|
+
var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.startsWith(".") ? slash(resolve9(workingDir, normalizeStoryPath(join12(dirname4(normalizedPath), otherImport)))) : otherImport, StoryIndexGenerator = class _StoryIndexGenerator {
|
|
3523
3932
|
constructor(specifiers, options) {
|
|
3524
3933
|
this.specifiers = specifiers;
|
|
3525
3934
|
this.options = options;
|
|
@@ -3547,20 +3956,21 @@ var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.star
|
|
|
3547
3956
|
let cacheKey = this.getFindMatchingFilesCacheKey(specifier, workingDir, ignoreWarnings), cached = this.findMatchingFilesCache.get(cacheKey);
|
|
3548
3957
|
if (cached)
|
|
3549
3958
|
return cached;
|
|
3550
|
-
let pathToSubIndex = {}, globCwd = slash(
|
|
3959
|
+
let pathToSubIndex = {}, globCwd = slash(resolve9(workingDir, specifier.directory)), globPattern = specifier.files.startsWith("!") ? `./${specifier.files}` : specifier.files, { glob } = await import("../_node-chunks/dist-7OJKTBKL.js"), files = await glob(globPattern, {
|
|
3551
3960
|
absolute: !0,
|
|
3961
|
+
expandDirectories: !1,
|
|
3552
3962
|
cwd: globCwd,
|
|
3553
3963
|
...commonGlobOptions2(globPattern),
|
|
3554
3964
|
onlyFiles: !0
|
|
3555
3965
|
});
|
|
3556
3966
|
return files.length === 0 && !ignoreWarnings && once.warn(
|
|
3557
3967
|
`No story files found for the specified pattern: ${import_picocolors7.default.blue(
|
|
3558
|
-
|
|
3968
|
+
join12(specifier.directory, specifier.files)
|
|
3559
3969
|
)}`
|
|
3560
3970
|
), files.sort().forEach((absolutePath) => {
|
|
3561
3971
|
let ext = extname(absolutePath);
|
|
3562
3972
|
if (ext === ".storyshot") {
|
|
3563
|
-
let relativePath =
|
|
3973
|
+
let relativePath = relative7(workingDir, absolutePath);
|
|
3564
3974
|
logger16.info(`Skipping ${ext} file ${relativePath}`);
|
|
3565
3975
|
return;
|
|
3566
3976
|
}
|
|
@@ -3605,7 +4015,7 @@ var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.star
|
|
|
3605
4015
|
try {
|
|
3606
4016
|
entry[absolutePath] = await updater(specifier, absolutePath, entry[absolutePath]);
|
|
3607
4017
|
} catch (err) {
|
|
3608
|
-
let relativePath = `.${sep2}${
|
|
4018
|
+
let relativePath = `.${sep2}${relative7(this.options.workingDir, absolutePath)}`;
|
|
3609
4019
|
entry[absolutePath] = {
|
|
3610
4020
|
type: "error",
|
|
3611
4021
|
err: new IndexingError(
|
|
@@ -3666,15 +4076,15 @@ var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.star
|
|
|
3666
4076
|
resolveComponentPath(rawComponentPath, absolutePath, matchPath) {
|
|
3667
4077
|
let matchedPath = matchPath?.(rawComponentPath, void 0, void 0, supportedExtensions) ?? rawComponentPath, resolved;
|
|
3668
4078
|
try {
|
|
3669
|
-
resolved = resolveImport(matchedPath, { basedir:
|
|
4079
|
+
resolved = resolveImport(matchedPath, { basedir: dirname4(absolutePath) });
|
|
3670
4080
|
} catch {
|
|
3671
4081
|
return matchedPath;
|
|
3672
4082
|
}
|
|
3673
|
-
let relativePath =
|
|
4083
|
+
let relativePath = relative7(this.options.workingDir, resolved);
|
|
3674
4084
|
return slash(normalizeStoryPath(relativePath));
|
|
3675
4085
|
}
|
|
3676
4086
|
async extractStories(specifier, absolutePath, projectTags = []) {
|
|
3677
|
-
let relativePath =
|
|
4087
|
+
let relativePath = relative7(this.options.workingDir, absolutePath), importPath = slash(normalizeStoryPath(relativePath)), defaultMakeTitle = (userTitle) => {
|
|
3678
4088
|
let title = userOrAutoTitleFromSpecifier(importPath, specifier, userTitle);
|
|
3679
4089
|
return invariant(
|
|
3680
4090
|
title,
|
|
@@ -3693,7 +4103,7 @@ var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.star
|
|
|
3693
4103
|
tsconfig.paths,
|
|
3694
4104
|
["browser", "module", "main"]
|
|
3695
4105
|
));
|
|
3696
|
-
let toImportPath = (path) => path ? path.startsWith("virtual:") ? path : slash(normalizeStoryPath(
|
|
4106
|
+
let toImportPath = (path) => path ? path.startsWith("virtual:") ? path : slash(normalizeStoryPath(relative7(this.options.workingDir, path))) : importPath, storyEntries = indexInputs.map((input) => {
|
|
3697
4107
|
let name = input.name ?? storyNameFromExport(input.exportName), componentPath = input.rawComponentPath && this.resolveComponentPath(input.rawComponentPath, absolutePath, matchPath), title = input.title ?? defaultMakeTitle(), id = input.__id ?? toId(input.metaId ?? title, storyNameFromExport(input.exportName)), tags = combineTags(...projectTags, ...input.tags ?? []), subtype = input.subtype ?? "story", entry = {
|
|
3698
4108
|
type: "story",
|
|
3699
4109
|
subtype,
|
|
@@ -3708,7 +4118,9 @@ var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.star
|
|
|
3708
4118
|
componentPath,
|
|
3709
4119
|
tags
|
|
3710
4120
|
};
|
|
3711
|
-
|
|
4121
|
+
subtype === "test" && (entry.parent = input.parent, entry.parentName = input.parentName), input.exportName && (entry.exportName = input.exportName);
|
|
4122
|
+
let thumbnail = resolveThumbnail(input.thumbnail, absolutePath, this.options.workingDir);
|
|
4123
|
+
return thumbnail && (entry.thumbnail = thumbnail), entry;
|
|
3712
4124
|
});
|
|
3713
4125
|
if (storyEntries.some((entry) => entry.tags.includes(Tag.AUTODOCS)) && !!this.options.docs && this.options.build?.test?.disableAutoDocs !== !0) {
|
|
3714
4126
|
let name = this.options.docs?.defaultName ?? "Docs", { metaId } = indexInputs[0], entry = storyEntries[0], id = toId(metaId ?? entry.title, name), tags = combineTags(...projectTags, ...indexInputs[0].tags ?? []);
|
|
@@ -3738,9 +4150,9 @@ var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.star
|
|
|
3738
4150
|
};
|
|
3739
4151
|
}
|
|
3740
4152
|
async extractDocs(specifier, absolutePath, projectTags = []) {
|
|
3741
|
-
let relativePath =
|
|
4153
|
+
let relativePath = relative7(this.options.workingDir, absolutePath);
|
|
3742
4154
|
try {
|
|
3743
|
-
let normalizedPath = normalizeStoryPath(relativePath), importPath = slash(normalizedPath), content = await
|
|
4155
|
+
let normalizedPath = normalizeStoryPath(relativePath), importPath = slash(normalizedPath), content = await readFile6(absolutePath, { encoding: "utf8" }), result = await analyzeMdx(content);
|
|
3744
4156
|
if (result.isTemplate)
|
|
3745
4157
|
return !1;
|
|
3746
4158
|
let absoluteImports = result.imports.map(
|
|
@@ -3751,8 +4163,8 @@ var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.star
|
|
|
3751
4163
|
dependencies.forEach((dep) => {
|
|
3752
4164
|
if (dep.entries.length > 0) {
|
|
3753
4165
|
let first = dep.entries.find((e) => e.type !== "docs");
|
|
3754
|
-
|
|
3755
|
-
|
|
4166
|
+
normalize3(resolve9(this.options.workingDir, first.importPath)).startsWith(
|
|
4167
|
+
normalize3(absoluteOf)
|
|
3756
4168
|
) && (csfEntry = first, metaDependency = dep);
|
|
3757
4169
|
}
|
|
3758
4170
|
}), metaDependency && (sortedDependencies = [
|
|
@@ -3797,7 +4209,7 @@ var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.star
|
|
|
3797
4209
|
} catch (err) {
|
|
3798
4210
|
throw err && err.source?.match(/mdast-util-mdx-jsx/g) && logger16.warn(
|
|
3799
4211
|
`\u{1F4A1} This seems to be an MDX2 syntax error. Please refer to the MDX section in the following resource for assistance on how to fix this: ${import_picocolors7.default.yellow(
|
|
3800
|
-
"https://
|
|
4212
|
+
"https://forkbook.ljk.dev/docs/migration#mdx2-upgrade"
|
|
3801
4213
|
)}`
|
|
3802
4214
|
), err;
|
|
3803
4215
|
}
|
|
@@ -3894,7 +4306,7 @@ var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.star
|
|
|
3894
4306
|
}), this.lastIndex = null, this.lastError = null, this.invalidationListeners.forEach((listener) => listener());
|
|
3895
4307
|
}
|
|
3896
4308
|
invalidate(importPath, removed) {
|
|
3897
|
-
let absolutePath = slash(
|
|
4309
|
+
let absolutePath = slash(resolve9(this.options.workingDir, importPath)), specifier = Array.from(this.specifierToCache.keys()).find(
|
|
3898
4310
|
(ns) => ns.importPathMatcher.exec(importPath)
|
|
3899
4311
|
);
|
|
3900
4312
|
if (!specifier)
|
|
@@ -3918,7 +4330,7 @@ var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.star
|
|
|
3918
4330
|
if (removed) {
|
|
3919
4331
|
if (cacheEntry && cacheEntry.type === "docs") {
|
|
3920
4332
|
let absoluteImports = cacheEntry.storiesImports.map(
|
|
3921
|
-
(p) =>
|
|
4333
|
+
(p) => resolve9(this.options.workingDir, p)
|
|
3922
4334
|
);
|
|
3923
4335
|
this.findDependencies(absoluteImports).forEach(
|
|
3924
4336
|
(dep) => dep.dependents.splice(dep.dependents.indexOf(absolutePath), 1)
|
|
@@ -3935,8 +4347,8 @@ var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.star
|
|
|
3935
4347
|
};
|
|
3936
4348
|
}
|
|
3937
4349
|
async getPreviewCode() {
|
|
3938
|
-
let previewFile = ["js", "jsx", "ts", "tsx", "mjs", "cjs", "mts"].map((ext) =>
|
|
3939
|
-
return previewFile && (await
|
|
4350
|
+
let previewFile = ["js", "jsx", "ts", "tsx", "mjs", "cjs", "mts"].map((ext) => join12(this.options.configDir, `preview.${ext}`)).find((fname) => existsSync3(fname));
|
|
4351
|
+
return previewFile && (await readFile6(previewFile, { encoding: "utf8" })).toString();
|
|
3940
4352
|
}
|
|
3941
4353
|
getProjectTags(previewCode) {
|
|
3942
4354
|
let projectTags = [], defaultTags = [Tag.DEV, Tag.TEST, Tag.MANIFEST];
|
|
@@ -3993,7 +4405,7 @@ var buildIndex = async (options) => {
|
|
|
3993
4405
|
return await generator.initialize(), generator.getIndex();
|
|
3994
4406
|
}, buildIndexStandalone = async (options) => {
|
|
3995
4407
|
let index = await buildIndex(options);
|
|
3996
|
-
logger17.info(`Writing index to ${options.outputFile}`), await
|
|
4408
|
+
logger17.info(`Writing index to ${options.outputFile}`), await writeFile5(options.outputFile, JSON.stringify(index));
|
|
3997
4409
|
};
|
|
3998
4410
|
|
|
3999
4411
|
// src/core-server/standalone.ts
|