@aussieljk/forkbook 0.0.1-2 → 0.0.1-21
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 +7 -7
- package/assets/create/rendererAssets/common/header.css +6 -6
- package/assets/create/rendererAssets/common/page.css +12 -12
- 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 +31 -26
- package/dist/_browser-chunks/{Color-PCLE2J36.js → Color-7FO5YFB5.js} +8 -8
- package/dist/_browser-chunks/{DocsRenderer-JXND3PVQ.js → DocsRenderer-DKXSW2OY.js} +2 -2
- package/dist/_browser-chunks/WithTooltip-QWFSUQZP.js +199 -0
- package/dist/_browser-chunks/{chunk-RBCHTR7C.js → chunk-2ELGJRFZ.js} +1 -1
- package/dist/_browser-chunks/{chunk-PFRNG3UC.js → chunk-2WZWS7GJ.js} +5 -5
- package/dist/_browser-chunks/{chunk-52CW7FF7.js → chunk-3QNZOMD7.js} +8 -3
- package/dist/_browser-chunks/{chunk-LV5PIKV4.js → chunk-3QPZOXB7.js} +6 -8
- package/dist/_browser-chunks/{chunk-ODVJ3XZJ.js → chunk-4BOJAE7P.js} +14 -10
- package/dist/_browser-chunks/{chunk-2MEPHP35.js → chunk-4KIQBRD2.js} +1 -1
- package/dist/_browser-chunks/{chunk-KQ7CRO2B.js → chunk-5Z3MWCFR.js} +12 -12
- package/dist/_browser-chunks/chunk-6AKCRYVX.js +6 -0
- package/dist/_browser-chunks/{chunk-W5M6NPS3.js → chunk-6SL45YM3.js} +15 -18
- package/dist/_browser-chunks/{chunk-2SCZVUKW.js → chunk-AN2LJG5I.js} +1 -1
- package/dist/_browser-chunks/{chunk-P6PK47TQ.js → chunk-BLCZ3C5M.js} +48 -83
- package/dist/_browser-chunks/{chunk-RSPAQWVJ.js → chunk-BNP234B4.js} +1 -1
- package/dist/_browser-chunks/{chunk-JYVGARBG.js → chunk-BSYOFSF6.js} +770 -720
- package/dist/_browser-chunks/{chunk-JSBKXXXF.js → chunk-DHTLVXAL.js} +38 -45
- package/dist/_browser-chunks/{chunk-GNZY6LOW.js → chunk-DISGPOF4.js} +54 -51
- package/dist/_browser-chunks/chunk-DNJ3OSLB.js +6021 -0
- package/dist/_browser-chunks/{chunk-6SXYJQST.js → chunk-E6QKKKLO.js} +21 -6
- package/dist/_browser-chunks/{chunk-FJGWSWL5.js → chunk-EBSOKHFG.js} +10 -4
- package/dist/_browser-chunks/{chunk-CFAOWGL7.js → chunk-ECMVTOVD.js} +1 -1
- package/dist/_browser-chunks/{chunk-CFWWCCZV.js → chunk-ENHFQXYS.js} +9 -7
- package/dist/_browser-chunks/{chunk-YTIT5NA5.js → chunk-EW2M3URL.js} +91 -84
- package/dist/_browser-chunks/chunk-FAOLWWRN.js +20 -0
- package/dist/_browser-chunks/{chunk-MFMDGWP6.js → chunk-FCULT3AE.js} +3 -3
- package/dist/_browser-chunks/{chunk-46Z7NGAS.js → chunk-HX443LKV.js} +1 -1
- package/dist/_browser-chunks/chunk-HZFHNYRC.js +53 -0
- package/dist/_browser-chunks/chunk-IFADVEQE.js +669 -0
- package/dist/_browser-chunks/{chunk-OQWFVDIN.js → chunk-KQJ4T6JL.js} +31 -25
- 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-V2G23FV7.js → chunk-N5WQGLI7.js} +1 -1
- package/dist/_browser-chunks/{chunk-EIYAKDGP.js → chunk-NA4ITZTK.js} +127 -105
- package/dist/_browser-chunks/{chunk-RMYQ3QN3.js → chunk-NK5SGJNG.js} +22 -17
- package/dist/_browser-chunks/chunk-NPNIBOPF.js +18 -0
- 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-PFYL47RM.js +45 -0
- package/dist/_browser-chunks/{chunk-OD6IBQCC.js → chunk-PQRPDA4U.js} +5 -5
- package/dist/_browser-chunks/{chunk-2JDQ35OA.js → chunk-PU7D2WDP.js} +0 -11
- package/dist/_browser-chunks/chunk-PZQRXPVR.js +21 -0
- package/dist/_browser-chunks/{chunk-5WMXI5GW.js → chunk-QFO2B4X2.js} +31 -28
- package/dist/_browser-chunks/{chunk-2JT76G3E.js → chunk-SBOQ4QPY.js} +15 -15
- package/dist/_browser-chunks/{chunk-ZTQ5MEJ5.js → chunk-UMGDO2ZM.js} +3 -37
- package/dist/_browser-chunks/{chunk-5I7E4GMO.js → chunk-WY2LUGOH.js} +1 -1
- package/dist/_browser-chunks/chunk-XKTORVEQ.js +255 -0
- package/dist/_browser-chunks/chunk-XSVERCGB.js +91 -0
- package/dist/_browser-chunks/{chunk-FVSEPWWX.js → chunk-XTQCLWVH.js} +325 -1635
- package/dist/_browser-chunks/{chunk-MDOL7KML.js → chunk-YJO5BK52.js} +7 -3
- package/dist/_browser-chunks/{chunk-66OCZ54D.js → chunk-ZF37BMDS.js} +6 -2
- package/dist/_browser-chunks/{chunk-C3D4HEFY.js → chunk-ZIZCGWCG.js} +348 -170
- package/dist/_browser-chunks/{matchers-YLBYSYAF.js → matchers-2HVLNCVO.js} +4 -4
- package/dist/_browser-chunks/{react-dom-client-4OHE3QDV.js → react-dom-client-SLBUX3U3.js} +1 -1
- package/dist/_node-chunks/{attached-runtime-I2G4WLJI.js → attached-runtime-UC2CB4GH.js} +37 -35
- package/dist/_node-chunks/builder-manager-S5UUKVOR.js +1174 -0
- package/dist/_node-chunks/{chunk-OUW6R7C3.js → chunk-3335ZZIO.js} +6 -6
- package/dist/_node-chunks/{chunk-V2DY426G.js → chunk-3D6N6P2R.js} +283 -306
- package/dist/_node-chunks/{chunk-3Y6AAY5H.js → chunk-3ER54PQM.js} +8 -8
- package/dist/_node-chunks/{chunk-DC7DKR5K.js → chunk-3H5C52QU.js} +6 -6
- package/dist/_node-chunks/chunk-3UI3TQ7R.js +28 -0
- package/dist/_node-chunks/{chunk-Q7QNUM5H.js → chunk-4C3ACAHV.js} +6 -6
- package/dist/_node-chunks/{chunk-XGIUVY52.js → chunk-4UTCKJEQ.js} +7 -7
- package/dist/_node-chunks/chunk-53A5CYDK.js +572 -0
- package/dist/_node-chunks/{chunk-4FEANXWU.js → chunk-53PSBDRK.js} +140 -118
- package/dist/_node-chunks/{chunk-3W7F2B7P.js → chunk-54MO4QLB.js} +6 -6
- package/dist/_node-chunks/{chunk-7GUDZVRQ.js → chunk-5CJMRQZ6.js} +6 -6
- package/dist/_node-chunks/chunk-5HOM7B4V.js +20 -0
- package/dist/_node-chunks/{chunk-BSKFCWQD.js → chunk-5QG6AXK4.js} +7 -7
- package/dist/_node-chunks/chunk-67XVZZUO.js +405 -0
- package/dist/_node-chunks/{chunk-EWOX7HPJ.js → chunk-6HQJJDLH.js} +6 -6
- package/dist/_node-chunks/chunk-6IPHWCFI.js +29 -0
- package/dist/_node-chunks/{chunk-NDWKJ4CL.js → chunk-6XYOFBRD.js} +98 -129
- package/dist/_node-chunks/{chunk-TNJIXE37.js → chunk-7IAYDGYH.js} +6 -6
- package/dist/_node-chunks/{chunk-ICPBH3E7.js → chunk-7P67PUU2.js} +7 -7
- package/dist/_node-chunks/{chunk-XLP2ZKXV.js → chunk-AAK5BBF2.js} +7 -7
- package/dist/_node-chunks/{chunk-CCOTJ4FC.js → chunk-BGUVBOOU.js} +10 -10
- package/dist/_node-chunks/chunk-BNGBOASQ.js +25 -0
- package/dist/_node-chunks/{chunk-VLOXOXXE.js → chunk-BWZWCVVH.js} +9 -9
- package/dist/_node-chunks/{chunk-SWO5CDYU.js → chunk-C6HQ6WLU.js} +8 -8
- package/dist/_node-chunks/chunk-CJHRH777.js +20 -0
- package/dist/_node-chunks/{chunk-IK4FGZLR.js → chunk-COEW4ORP.js} +6 -6
- package/dist/_node-chunks/{chunk-JGGFYIG5.js → chunk-CVHDAEDZ.js} +7 -7
- package/dist/_node-chunks/{chunk-YCMRA6RX.js → chunk-CXGOQNGI.js} +7 -7
- package/dist/_node-chunks/chunk-D4XTQWRM.js +11 -0
- package/dist/_node-chunks/{chunk-BS2WMZMR.js → chunk-D5V6CZ6U.js} +7 -7
- package/dist/_node-chunks/{chunk-XHL2LVBM.js → chunk-DCTXJ4TT.js} +14 -16
- package/dist/_node-chunks/{chunk-WCULS5TP.js → chunk-DP6WFY3D.js} +7 -7
- package/dist/_node-chunks/chunk-E23GDXG6.js +271 -0
- package/dist/_node-chunks/{chunk-GEFQN7K3.js → chunk-E3ZFMURC.js} +8 -8
- package/dist/_node-chunks/{chunk-WZJF2OUH.js → chunk-E6O3NA44.js} +7 -7
- package/dist/_node-chunks/{chunk-RWFIFGO5.js → chunk-ECS3WDOU.js} +8 -8
- package/dist/_node-chunks/{chunk-XI6B6P47.js → chunk-FB5YJWOH.js} +6 -6
- package/dist/_node-chunks/{chunk-3SDUYDXH.js → chunk-FCK5FM6D.js} +7 -7
- package/dist/_node-chunks/{chunk-6YKBRP72.js → chunk-FJUGPEJK.js} +6 -6
- package/dist/_node-chunks/{chunk-TFEWM4E3.js → chunk-FPYXI76E.js} +75 -75
- package/dist/_node-chunks/chunk-GEWVOY3F.js +62 -0
- package/dist/_node-chunks/{chunk-ET7PWEO7.js → chunk-GHZ44BFB.js} +14 -13
- package/dist/_node-chunks/{chunk-LXBD4UL4.js → chunk-GJMFISS3.js} +8 -8
- package/dist/_node-chunks/{chunk-FK7KGTV7.js → chunk-GK2Y2RFX.js} +7 -7
- package/dist/_node-chunks/{chunk-FPZB5OI7.js → chunk-GP6YBA2R.js} +6 -6
- package/dist/_node-chunks/{chunk-34EO2PUT.js → chunk-GQUFGJ4D.js} +6 -6
- package/dist/_node-chunks/{chunk-HMP2G23X.js → chunk-H4CRQDTK.js} +6 -6
- package/dist/_node-chunks/{chunk-2BUPBPFB.js → chunk-HCDG54OG.js} +7 -7
- package/dist/_node-chunks/{chunk-U5W53R2J.js → chunk-HGJMP4EI.js} +506 -494
- package/dist/_node-chunks/chunk-HSX6BDBA.js +18 -0
- package/dist/_node-chunks/{chunk-UMUBKI6E.js → chunk-IPFPWMT5.js} +1320 -437
- package/dist/_node-chunks/chunk-KRIOC4WF.js +281 -0
- package/dist/_node-chunks/{chunk-TINO74G5.js → chunk-KUL2MJ6N.js} +6 -6
- package/dist/_node-chunks/{chunk-LO56I6E2.js → chunk-LUR6QTYB.js} +10 -10
- package/dist/_node-chunks/{chunk-YZFWBA5L.js → chunk-LYS7TI35.js} +368 -321
- package/dist/_node-chunks/chunk-MDTXL6SN.js +2613 -0
- package/dist/_node-chunks/{chunk-LCK4ZQKG.js → chunk-MIIPXT4S.js} +9 -9
- package/dist/_node-chunks/chunk-MLWGAA2I.js +138 -0
- package/dist/_node-chunks/{chunk-42UWAGPW.js → chunk-MWUGCUB5.js} +52 -22
- package/dist/_node-chunks/{chunk-JDXXX6LB.js → chunk-MX5MVLEK.js} +6 -6
- package/dist/_node-chunks/chunk-N44UIGCO.js +47 -0
- package/dist/_node-chunks/{chunk-OISX4AGQ.js → chunk-NP2JHOFY.js} +37 -31
- package/dist/_node-chunks/chunk-OMNGOPNG.js +52 -0
- package/dist/_node-chunks/{chunk-ZWBCQ4MJ.js → chunk-OO2GTHUF.js} +9 -17
- package/dist/_node-chunks/{chunk-F3ZFKBHY.js → chunk-PC57BIYZ.js} +8 -8
- package/dist/_node-chunks/chunk-PHWMAF5C.js +49 -0
- package/dist/_node-chunks/{chunk-B5J7Q7J4.js → chunk-PLIQQETC.js} +7 -7
- package/dist/_node-chunks/{chunk-H32DYT6P.js → chunk-QMYCIS2U.js} +6 -6
- package/dist/_node-chunks/{chunk-DUR55DJJ.js → chunk-QZIDK3GX.js} +89 -71
- package/dist/_node-chunks/{chunk-UVINFLGY.js → chunk-ROJ6RSIJ.js} +7 -7
- package/dist/_node-chunks/{chunk-E6YESGLX.js → chunk-S2NB6QEG.js} +542 -1049
- package/dist/_node-chunks/{chunk-TWI4GVH7.js → chunk-S6VCOSQS.js} +6 -6
- package/dist/_node-chunks/{chunk-KISMCCP5.js → chunk-SEVOOOB2.js} +474 -479
- package/dist/_node-chunks/{chunk-JZOO7GGC.js → chunk-SFT6ZAVN.js} +6 -6
- package/dist/_node-chunks/{chunk-RRN2V55B.js → chunk-SXBUK4F6.js} +7 -7
- package/dist/_node-chunks/{chunk-WNZ2UMFM.js → chunk-TGF6Q66I.js} +15 -9
- package/dist/_node-chunks/{chunk-NIBT7XDZ.js → chunk-TGFHWGGT.js} +9 -6
- package/dist/_node-chunks/chunk-TTLSBLPQ.js +620 -0
- package/dist/_node-chunks/{chunk-SVTBJ7Q3.js → chunk-UUAEW2AR.js} +6 -6
- package/dist/_node-chunks/chunk-VQHM66NL.js +534 -0
- package/dist/_node-chunks/{chunk-H4PPVMP5.js → chunk-VSTTY3TM.js} +6 -6
- package/dist/_node-chunks/{chunk-2DSIDINN.js → chunk-XDBSAFUB.js} +650 -9
- package/dist/_node-chunks/{chunk-OWNFOGTA.js → chunk-XTQQGAUZ.js} +7 -7
- package/dist/_node-chunks/{chunk-CXRU72ET.js → chunk-YMJVSFJT.js} +6 -6
- package/dist/_node-chunks/{chunk-DHJFTB4K.js → chunk-YXEKWVJQ.js} +7 -7
- package/dist/_node-chunks/{chunk-SLWQNBGO.js → chunk-Z6CUUWJO.js} +34 -949
- package/dist/_node-chunks/{chunk-TD5PLLQG.js → chunk-ZAIGR7EV.js} +64 -17
- package/dist/_node-chunks/{chunk-6KEHV53S.js → chunk-ZCFXEFR6.js} +33 -41
- package/dist/_node-chunks/{chunk-FW2HQUBQ.js → chunk-ZHUBOYOD.js} +6 -6
- package/dist/_node-chunks/{chunk-MA24JW6C.js → chunk-ZHUBTBP2.js} +25 -8
- package/dist/_node-chunks/{chunk-RXNJDRGO.js → chunk-ZSTIFZHY.js} +21 -25
- package/dist/_node-chunks/dist-TRTHRODT.js +16 -0
- package/dist/_node-chunks/dist-XPLJ5T4W.js +27 -0
- package/dist/_node-chunks/{local-runtime-NTKIN2QT.js → local-runtime-AC7MOWYK.js} +21 -22
- package/dist/_node-chunks/{mdx-plugin-MWISDWDQ.js → mdx-plugin-ZW26VGEP.js} +2263 -130
- package/dist/_node-chunks/{monorepo-LIRFMQXE.js → monorepo-T2KZK62Q.js} +12 -12
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-CPDW4XTW.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-2CWUUF6H.js} +12 -12
- package/dist/_node-chunks/optimized-tests-4AK3PFSX.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-EKHIUAU2.js → pattern-copy-play-CMRGEXHM.js} +12 -12
- package/dist/_node-chunks/postinstallAddon-OUQENFYO.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-BUN3HUCO.js → rehype-external-links-LHOAIJ2E.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-PLADX223.js → rehype-slug-K54MMYY6.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-GBHW6KIQ.js → relaxed-limits-TTL4PWH7.js} +12 -12
- package/dist/_node-chunks/{run-NL66VTNR.js → run-6DXBB5F7.js} +294 -30
- package/dist/_node-chunks/{run-KDTIZNSY.js → run-BMTV5ZAO.js} +18 -18
- package/dist/_node-chunks/{setup-MGC7BQO6.js → setup-FDPYW25Y.js} +9 -9
- package/dist/_node-chunks/{vitest.config.4.template-JH2THZFG.js → vitest.config.4.template-2TCFWAAI.js} +9 -9
- package/dist/actions/decorator.js +18 -22
- package/dist/actions/index.d.ts +4 -4
- package/dist/actions/index.js +3 -2
- package/dist/addon-a11y/index.d.ts +3 -3
- package/dist/addon-a11y/index.js +3 -2
- package/dist/addon-a11y/manager.js +41 -38
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-a11y/preview.d.ts +8 -2
- package/dist/addon-a11y/preview.js +3 -2
- package/dist/addon-comments/manager.js +353 -0
- package/dist/addon-comments/preset.js +80 -0
- package/dist/addon-comments/preview.js +101 -0
- package/dist/addon-docs/blocks.d.ts +123 -85
- package/dist/addon-docs/blocks.js +159 -85
- package/dist/addon-docs/index.d.ts +21 -21
- package/dist/addon-docs/index.js +3 -3
- package/dist/addon-docs/manager.js +6 -6
- package/dist/addon-docs/preset.js +12 -12
- package/dist/addon-docs/preview.d.ts +3 -1
- package/dist/addon-docs/preview.js +1 -1
- package/dist/addon-links/index.d.ts +2 -1
- 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 +203 -84
- package/dist/addon-mcp/preview.js +1 -1
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +71 -71
- 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/index.js +1 -1
- package/dist/addon-pseudo-states/manager.js +2 -2
- package/dist/addon-pseudo-states/preview.d.ts +1 -1
- package/dist/addon-pseudo-states/preview.js +1 -1
- package/dist/addon-themes/index.d.ts +7 -6
- 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 +32 -23
- package/dist/addon-vitest/node/coverage-reporter.js +11 -11
- package/dist/addon-vitest/node/vitest.js +37 -37
- package/dist/addon-vitest/postinstall.js +10 -10
- package/dist/addon-vitest/preset.js +26 -26
- package/dist/addon-vitest/vitest-plugin/global-setup.js +23 -23
- package/dist/addon-vitest/vitest-plugin/index.js +83 -73
- 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 +241 -995
- package/dist/babel/index.js +30583 -38
- package/dist/backgrounds/index.d.ts +1 -1
- package/dist/bin/core.js +122 -110
- package/dist/bin/dispatcher.js +18 -16
- package/dist/bin/loader.js +17 -16
- package/dist/builder-next/index.d.ts +59 -0
- package/dist/builder-next/index.js +201 -0
- package/dist/builder-vite/index.d.ts +8 -3
- package/dist/builder-vite/index.js +80 -25
- package/dist/builder-vite/preset.js +13 -13
- package/dist/channels/index.d.ts +3 -2
- package/dist/channels/index.js +97 -24
- package/dist/{chunk-Dr3R0DXk.d.ts → chunk-B-NVyPqN.d.ts} +2 -2
- package/dist/{chunk-C2p5r3Vt.d.ts → chunk-B53gRJBs.d.ts} +838 -703
- package/dist/{chunk-DoIGKY33.d.ts → chunk-BLZXEm1K.d.ts} +6 -8
- package/dist/chunk-BcYKnZln.d.ts +10 -0
- package/dist/{chunk-Bpi2tz-6.d.ts → chunk-BspNQvZn.d.ts} +21 -23
- package/dist/{chunk-BCoJQE-f.d.ts → chunk-BtKww7r1.d.ts} +6 -4
- package/dist/chunk-CFhJCPSB.d.ts +48 -0
- package/dist/{chunk-DtHByo32.d.ts → chunk-CFk6djyM.d.ts} +5 -5
- package/dist/{chunk-CwQKNaYL.d.ts → chunk-CMx6bGAU.d.ts} +2 -2
- package/dist/{chunk-DEVFdzxR.d.ts → chunk-CRmUwbkb.d.ts} +4 -4
- package/dist/{chunk-CMeX4WRe.d.ts → chunk-CT2iXaHz.d.ts} +1 -1
- package/dist/{chunk-pcFXCimE.d.ts → chunk-CmV7WZzR.d.ts} +124 -2
- package/dist/{chunk-BGkgZp-H.d.ts → chunk-D3uSIa6H.d.ts} +9 -1
- package/dist/{chunk-DzuY9DXg.d.ts → chunk-DDd8BhTY.d.ts} +2 -2
- package/dist/{chunk-Dw1z1Pki.d.ts → chunk-DNCU78oW.d.ts} +160 -323
- package/dist/chunk-DVIvUVkS.d.ts +195 -0
- 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-Susgfkap.d.ts +20 -0
- package/dist/{chunk-B2t1tGRh.d.ts → chunk-bhl-7rRD.d.ts} +40 -15
- package/dist/{chunk-BXLImeLy.d.ts → chunk-r-Vjut9o.d.ts} +52 -11
- package/dist/cli/index.d.ts +15 -904
- package/dist/cli/index.js +49 -5209
- package/dist/cli/skills/content/index.d.ts +3 -3
- package/dist/cli/skills/content/index.js +3 -3
- 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 +4 -4
- package/dist/cli/tools/sdk/index.js +18 -18
- package/dist/cli-commands/bin/index.js +7 -7
- package/dist/client-logger/index.d.ts +20 -21
- package/dist/client-logger/index.js +5 -2
- package/dist/common/index.d.ts +32 -44
- package/dist/common/index.js +89 -98
- package/dist/components/index.d.ts +86 -272
- package/dist/components/index.js +2759 -8547
- package/dist/core-events/index.d.ts +16 -7
- package/dist/core-events/index.js +5 -5
- package/dist/core-server/index.d.ts +95 -26
- package/dist/core-server/index.js +1675 -408
- package/dist/core-server/presets/common-manager.js +837 -1335
- package/dist/core-server/presets/common-override-preset.js +12 -10
- package/dist/core-server/presets/common-preset.js +100 -282
- package/dist/create/bin/index.js +7 -7
- package/dist/create/index.js +15 -15
- package/dist/csf/csf-utils.d.ts +1 -1
- package/dist/csf/index.d.ts +6 -6
- package/dist/csf/index.js +90 -159
- package/dist/csf-tools/index.d.ts +66 -54
- package/dist/csf-tools/index.js +19 -17
- package/dist/docs-tools/index.d.ts +332 -16
- package/dist/docs-tools/index.js +3 -3
- package/dist/highlight/index.d.ts +1 -1
- package/dist/instrumenter/index.d.ts +5 -5
- package/dist/instrumenter/index.js +31 -19
- package/dist/manager/_manager-chunks/{globals-runtime-BvM-NY2g.js → globals-runtime-B4NRbNSS.js} +638 -1731
- package/dist/{preview/_chunks/runtime-CqHxptiK.js → manager/_manager-chunks/globals-runtime-BC43T1rL.js} +3413 -173
- package/dist/manager/_manager-chunks/{globals-runtime-qKvCZHFY.js → globals-runtime-BJ6EZqH7.js} +1035 -623
- package/dist/manager/_manager-chunks/{globals-runtime-Rp_zjGnh.js → globals-runtime-BfXaq_CP.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-C02fvgcd.js → globals-runtime-BkSn_Jpe.js} +411 -379
- package/dist/manager/_manager-chunks/{globals-runtime-eLPTIfX-.js → globals-runtime-BnQ7i5wq.js} +232 -370
- package/dist/manager/_manager-chunks/globals-runtime-BtduS2C2.js +10601 -0
- package/dist/manager/_manager-chunks/globals-runtime-BzuYs3dZ.js +1971 -0
- package/dist/manager/_manager-chunks/globals-runtime-CBviMKtt.js +446 -0
- package/dist/manager/_manager-chunks/globals-runtime-CS41oTca.js +1808 -0
- package/dist/manager/_manager-chunks/{globals-runtime-BmphMP6z.js → globals-runtime-Cisw9IIE.js} +11 -11
- package/dist/manager/_manager-chunks/globals-runtime-CoTrrHG3.js +1163 -0
- package/dist/manager/_manager-chunks/{globals-runtime-FC201B7s.js → globals-runtime-DCmvKMN5.js} +2 -1
- package/dist/manager/_manager-chunks/globals-runtime-DgO0hT2p.js +32 -0
- package/dist/manager/_manager-chunks/{globals-runtime-DpNYC-qi.js → globals-runtime-DpvE_zRs.js} +1013 -782
- package/dist/manager/_manager-chunks/globals-runtime-Me9Bl-sx.js +156 -0
- package/dist/manager/_manager-chunks/globals-runtime-nQMRiA0J.js +19 -0
- package/dist/manager/_manager-chunks/globals-runtime-oRjPg2jY.js +8935 -0
- package/dist/manager/_manager-chunks/{globals-runtime-sGpNlIJ1.js → globals-runtime-wV08sCKl.js} +715 -620
- package/dist/manager/_manager-chunks/{runtime-cp5pazY2.js → runtime-4OQZWibO.js} +1717 -1536
- package/dist/manager/_manager-chunks/runtime-BYxbyNm0.js +201 -0
- package/dist/manager/_manager-chunks/{runtime-EITvVbkG.js → runtime-BdGkqNEt.js} +1 -2
- package/dist/manager/_manager-chunks/runtime-CM4Z8aKR.js +735 -0
- package/dist/manager/_manager-chunks/{runtime-eDVAYF7N.js → runtime-Cjo1UL1u.js} +57 -76
- package/dist/manager/_manager-chunks/runtime-Cx1-wr6J.js +294 -0
- package/dist/manager/_manager-chunks/{runtime-BhkT2CXl.js → runtime-Cxe_uJRb.js} +220 -406
- package/dist/manager/_manager-chunks/runtime-D702FFTO.js +551 -0
- package/dist/manager/_manager-chunks/{runtime-D94Vq3oR.js → runtime-DnWFp6Zw.js} +8 -534
- package/dist/manager/_manager-chunks/{runtime-D0UOWx0U.js → runtime-DoYPE6g6.js} +232 -158
- package/dist/manager/_manager-chunks/runtime-P663lpsR.js +528 -0
- package/dist/manager/_manager-chunks/{runtime-i-PDAHLR.js → runtime-sppa-0ll.js} +741 -698
- 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 +538 -528
- package/dist/manager-errors.d.ts +1 -1
- package/dist/manager-errors.js +2 -2
- package/dist/mcp/index.d.ts +10 -10
- package/dist/mcp/index.js +11 -11
- package/dist/mocking-utils/index.d.ts +7 -5
- package/dist/mocking-utils/index.js +34 -34
- package/dist/mocking-utils/mocker-runtime.js +2 -2
- package/dist/next/index.d.ts +231 -0
- package/dist/next/index.js +398 -0
- package/dist/nextjs-vite/export-mocks/headers/index.js +3 -1
- package/dist/nextjs-vite/export-mocks/link/index.d.ts +4 -1
- package/dist/nextjs-vite/export-mocks/navigation/index.d.ts +9 -1
- package/dist/nextjs-vite/export-mocks/router/index.js +13 -7
- package/dist/nextjs-vite/index.d.ts +4 -4
- package/dist/nextjs-vite/index.js +10 -5
- 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 +117 -15
- package/dist/nextjs-vite/preview.d.ts +2 -1
- package/dist/nextjs-vite/preview.js +1 -1
- package/dist/nextjs-vite/vite-plugin/index.d.ts +2 -2
- package/dist/nextjs-vite/vite-plugin/index.js +9 -9
- package/dist/nextjs-vite-plugin/index.d.ts +2 -3
- package/dist/nextjs-vite-plugin/index.js +24 -49
- 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/nextjs-vite-plugin/plugins/next-mocks/alias/router/index.js +10 -6
- package/dist/node-logger/index.d.ts +89 -90
- package/dist/node-logger/index.js +11 -12
- package/dist/oxc-parser/index.js +15 -14
- package/dist/oxc-parser/worker.js +10 -10
- package/dist/{manager/_manager-chunks/globals-runtime-8HkdnU2F.js → preview/_chunks/runtime-BYRCSYBN.js} +4440 -179
- package/dist/preview/_chunks/{runtime-BZSnICCg.js → runtime-Bvh_rfnQ.js} +29 -64
- package/dist/preview/_chunks/{runtime-iXdo8CR8.js → runtime-Cbq5WjbL.js} +772 -418
- package/dist/preview/_chunks/{runtime-q3wt0e_N.js → runtime-D2MPrqbU.js} +2 -2
- package/dist/preview/_chunks/{runtime-DrTjJkPY.js → runtime-DDEUZops.js} +453 -161
- package/dist/preview/_chunks/{runtime-BIzIdDbb.js → runtime-DS0s7U3c.js} +482 -334
- package/dist/preview/_chunks/{runtime-CsV4HZPV.js → runtime-DsjyhLpG.js} +397 -176
- package/dist/preview/_chunks/{runtime-CxZK_Ln3.js → runtime-Dwi6NFcX.js} +3 -3
- 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 +3 -3
- package/dist/preview-api/index.js +12 -10
- 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-argtypes.js +1 -1
- package/dist/react/entry-preview-docs.js +1 -1
- package/dist/react/entry-preview.js +2 -1
- package/dist/react/index.d.ts +9 -11
- package/dist/react/index.js +8 -6
- package/dist/react/preset.js +13 -14
- package/dist/react/preview.d.ts +1 -1
- package/dist/react/preview.js +5 -4
- package/dist/react-native/bin/get-stories.js +12 -12
- package/dist/react-native/index.d.ts +48 -47
- package/dist/react-native/index.js +64 -249
- package/dist/react-native/metro/node.d.ts +3 -3
- package/dist/react-native/metro/node.js +10 -9
- package/dist/react-native/metro/{withStorybook.d.ts → withForkbook.d.ts} +18 -18
- package/dist/react-native/metro/{withStorybook.js → withForkbook.js} +27 -26
- package/dist/react-native/preview.js +4 -1
- 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 +14 -14
- package/dist/react-native-ui/index.js +8 -15
- package/dist/react-native-ui-common/index.d.ts +32 -12
- package/dist/react-native-ui-common/index.js +26 -31
- 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.d.ts +3 -1
- package/dist/react-vite/preset.js +16 -9
- package/dist/router/index.d.ts +80 -3
- package/dist/router/index.js +66 -12
- package/dist/server-errors.d.ts +1 -1
- package/dist/server-errors.js +9 -9
- package/dist/shared/open-service/index.d.ts +3 -3
- 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 +28 -28
- package/dist/telemetry/index.d.ts +38 -274
- package/dist/telemetry/index.js +11 -68
- package/dist/test/index.d.ts +2 -2
- package/dist/test/index.js +765 -511
- package/dist/theming/create.d.ts +1 -1
- package/dist/theming/create.js +2 -1
- package/dist/theming/index.d.ts +6 -6
- 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 +69 -69
- package/skills/setup/SKILL.md +14 -0
- package/skills/stories/SKILL.md +21 -0
- package/skills/write-story/SKILL.md +14 -0
- package/template/nextjs-vite/cli/js/Button.jsx +2 -2
- 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.jsx +1 -1
- package/template/nextjs-vite/cli/js/Header.stories.js +2 -2
- package/template/nextjs-vite/cli/js/Page.jsx +3 -3
- 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/Button.tsx +2 -2
- 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/Header.tsx +1 -1
- package/template/nextjs-vite/cli/ts/Page.stories.ts +2 -2
- package/template/nextjs-vite/cli/ts/Page.tsx +3 -3
- package/template/react/cli/js/Button.jsx +2 -2
- package/template/react/cli/js/Button.stories.js +6 -6
- package/template/react/cli/js/Header.jsx +1 -1
- package/template/react/cli/js/Header.stories.js +2 -2
- package/template/react/cli/js/Page.jsx +3 -3
- 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/Button.tsx +2 -2
- package/template/react/cli/ts/Header.stories.ts +2 -2
- package/template/react/cli/ts/Header.tsx +1 -1
- package/template/react/cli/ts/Page.stories.ts +2 -2
- package/template/react/cli/ts/Page.tsx +3 -3
- package/template/react-vite/cli/js/Button.jsx +2 -2
- package/template/react-vite/cli/js/Button.stories.js +6 -6
- package/template/react-vite/cli/js/Header.jsx +1 -1
- package/template/react-vite/cli/js/Header.stories.js +2 -2
- package/template/react-vite/cli/js/Page.jsx +3 -3
- 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/Button.tsx +2 -2
- package/template/react-vite/cli/ts/Header.stories.ts +2 -2
- package/template/react-vite/cli/ts/Header.tsx +1 -1
- package/template/react-vite/cli/ts/Page.stories.ts +2 -2
- package/template/react-vite/cli/ts/Page.tsx +3 -3
- 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-XSQFTBMB.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-VVHYQXCH.js +0 -1661
- package/dist/_node-chunks/chunk-2RU7BKEW.js +0 -23
- package/dist/_node-chunks/chunk-3BKIBF5S.js +0 -3008
- package/dist/_node-chunks/chunk-3T4ZSNPH.js +0 -662
- package/dist/_node-chunks/chunk-5DQFEZEA.js +0 -40
- package/dist/_node-chunks/chunk-6LMWA44H.js +0 -3837
- package/dist/_node-chunks/chunk-BXVYT7SB.js +0 -36
- package/dist/_node-chunks/chunk-CQKMLL5J.js +0 -33
- package/dist/_node-chunks/chunk-EHUNOMDD.js +0 -52345
- package/dist/_node-chunks/chunk-FY6UXW6G.js +0 -11
- package/dist/_node-chunks/chunk-GRBLDJCR.js +0 -989
- package/dist/_node-chunks/chunk-IDEL2J23.js +0 -23
- package/dist/_node-chunks/chunk-JPAZLYJ3.js +0 -29
- package/dist/_node-chunks/chunk-MK2KYAI6.js +0 -5414
- package/dist/_node-chunks/chunk-NPO45IMH.js +0 -33
- package/dist/_node-chunks/chunk-QEQLR22M.js +0 -1877
- package/dist/_node-chunks/chunk-RZMQ7S3L.js +0 -92
- package/dist/_node-chunks/chunk-SIEXZVCR.js +0 -51
- package/dist/_node-chunks/chunk-TEQGGSP7.js +0 -33
- package/dist/_node-chunks/chunk-TFCEV2XX.js +0 -155
- package/dist/_node-chunks/chunk-UBOGWBEA.js +0 -148
- package/dist/_node-chunks/chunk-W4OMYLSP.js +0 -1297
- package/dist/_node-chunks/chunk-WAXVSN3O.js +0 -18
- package/dist/_node-chunks/chunk-ZMAMXQKP.js +0 -4731
- package/dist/_node-chunks/dist-VTSTZKUB.js +0 -16
- package/dist/_node-chunks/globby-OEMHPBFY.js +0 -2884
- package/dist/_node-chunks/jiti-NFX6UU74.js +0 -3848
- package/dist/_node-chunks/lib-MDVARD7W.js +0 -366
- package/dist/_node-chunks/optimized-tests-HDOLR3EY.js +0 -22
- package/dist/_node-chunks/postinstallAddon-GYGMWDL6.js +0 -20
- package/dist/_node-chunks/session-id-KIIVOQLR.js +0 -23
- package/dist/chunk-BTVrWliM.d.ts +0 -115
- package/dist/chunk-BfBzpgct.d.ts +0 -916
- package/dist/chunk-BxWufQms.d.ts +0 -142
- package/dist/chunk-DaVb55-_.d.ts +0 -124
- 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/globals-runtime-ZHrQFa3-.js +0 -10463
- package/dist/manager/_manager-chunks/runtime-B1L9TH89.js +0 -452
- package/dist/manager/_manager-chunks/runtime-BK0zF7FN.js +0 -22
- package/dist/manager/_manager-chunks/runtime-Bly6WJLN.js +0 -998
- package/dist/manager/_manager-chunks/runtime-DMig8mT7.js +0 -77
- package/dist/preview/_chunks/runtime-BTPtVY1p.js +0 -1102
- package/dist/preview/_chunks/runtime-BwSxqk3t.js +0 -63
- package/dist/preview/_chunks/runtime-DZToXfvO.js +0 -9767
- package/dist/preview/_chunks/runtime-DuHdxMFA.js +0 -387
|
@@ -1,39 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_wrk1cj8d1xj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_wrk1cj8d1xj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_wrk1cj8d1xj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_wrk1cj8d1xj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_wrk1cj8d1xj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_wrk1cj8d1xj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
require_picocolors
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HCDG54OG.js";
|
|
15
15
|
import {
|
|
16
16
|
__toESM
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
|
|
19
|
-
// src/server-errors.ts
|
|
20
|
-
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
21
|
-
import { dedent } from "ts-dedent";
|
|
22
|
-
|
|
23
|
-
// src/shared/open-service/errors.ts
|
|
24
|
-
function formatIssuePath(path) {
|
|
25
|
-
return path?.length ? path.map((segment) => {
|
|
26
|
-
let key = typeof segment == "object" && segment !== null && "key" in segment ? segment.key : segment;
|
|
27
|
-
return typeof key == "number" ? `[${key}]` : `.${String(key)}`;
|
|
28
|
-
}).join("").replace(/^\./, "") : "";
|
|
29
|
-
}
|
|
30
|
-
function formatIssues(issues) {
|
|
31
|
-
return issues.map((issue) => {
|
|
32
|
-
let path = formatIssuePath(issue.path);
|
|
33
|
-
return path === "" ? issue.message : `${path}: ${issue.message}`;
|
|
34
|
-
}).join(`
|
|
35
|
-
`);
|
|
36
|
-
}
|
|
17
|
+
} from "./chunk-YMJVSFJT.js";
|
|
37
18
|
|
|
38
19
|
// src/storybook-error.ts
|
|
39
20
|
function parseErrorCode({
|
|
@@ -41,17 +22,7 @@ function parseErrorCode({
|
|
|
41
22
|
category
|
|
42
23
|
}) {
|
|
43
24
|
let paddedCode = String(code).padStart(4, "0");
|
|
44
|
-
return `
|
|
45
|
-
}
|
|
46
|
-
function appendErrorRef(url) {
|
|
47
|
-
if (/^(?!.*storybook\.js\.org)|[?&]ref=error\b/.test(url))
|
|
48
|
-
return url;
|
|
49
|
-
try {
|
|
50
|
-
let urlObj = new URL(url);
|
|
51
|
-
return urlObj.searchParams.set("ref", "error"), urlObj.toString();
|
|
52
|
-
} catch {
|
|
53
|
-
return url;
|
|
54
|
-
}
|
|
25
|
+
return `FB_${category}_${paddedCode}`;
|
|
55
26
|
}
|
|
56
27
|
var StorybookError = class _StorybookError extends Error {
|
|
57
28
|
constructor(props) {
|
|
@@ -95,7 +66,7 @@ var StorybookError = class _StorybookError extends Error {
|
|
|
95
66
|
get fullErrorCode() {
|
|
96
67
|
return parseErrorCode({ code: this.code, category: this.category });
|
|
97
68
|
}
|
|
98
|
-
/** Overrides the default `Error.name` property in the format:
|
|
69
|
+
/** Overrides the default `Error.name` property in the format: FB_<CATEGORY>_<CODE>. */
|
|
99
70
|
get name() {
|
|
100
71
|
let errorName = this._name || this.constructor.name;
|
|
101
72
|
return `${this.fullErrorCode} (${errorName})`;
|
|
@@ -111,8 +82,8 @@ var StorybookError = class _StorybookError extends Error {
|
|
|
111
82
|
message
|
|
112
83
|
}) {
|
|
113
84
|
let page;
|
|
114
|
-
return documentation === !0 ? page = `https://
|
|
115
|
-
${documentation.map((doc) => ` - ${
|
|
85
|
+
return documentation === !0 ? page = `https://forkbook.ljk.dev/error/${parseErrorCode({ code, category })}` : typeof documentation == "string" ? page = documentation : Array.isArray(documentation) && (page = `
|
|
86
|
+
${documentation.map((doc) => ` - ${doc}`).join(`
|
|
116
87
|
`)}`), `${message}${page != null ? `
|
|
117
88
|
|
|
118
89
|
More info: ${page}
|
|
@@ -120,15 +91,117 @@ More info: ${page}
|
|
|
120
91
|
}
|
|
121
92
|
};
|
|
122
93
|
|
|
123
|
-
// src/server
|
|
124
|
-
var Category = /* @__PURE__ */ ((Category2) => (Category2.CLI = "CLI", Category2.CLI_INIT = "CLI_INIT", Category2.CLI_ADD = "CLI_ADD", Category2.CODEMOD = "CODEMOD", Category2.CORE_SERVER = "CORE-SERVER", Category2.CSF_PLUGIN = "CSF-PLUGIN", Category2.CSF_TOOLS = "CSF-TOOLS", Category2.CORE_COMMON = "CORE-COMMON", Category2.NODE_LOGGER = "NODE-LOGGER", Category2.TELEMETRY = "TELEMETRY", Category2.BUILDER_MANAGER = "BUILDER-MANAGER", Category2.BUILDER_VITE = "BUILDER-VITE", Category2.SOURCE_LOADER = "SOURCE-LOADER", Category2.POSTINSTALL = "POSTINSTALL", Category2.DOCS_TOOLS = "DOCS-TOOLS", Category2.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", Category2.FRAMEWORK_REACT_VITE = "FRAMEWORK_REACT-VITE", Category2))(Category || {})
|
|
94
|
+
// src/errors/server/category.ts
|
|
95
|
+
var Category = /* @__PURE__ */ ((Category2) => (Category2.CLI = "CLI", Category2.CLI_INIT = "CLI_INIT", Category2.CLI_ADD = "CLI_ADD", Category2.CODEMOD = "CODEMOD", Category2.CORE_SERVER = "CORE-SERVER", Category2.CSF_PLUGIN = "CSF-PLUGIN", Category2.CSF_TOOLS = "CSF-TOOLS", Category2.CORE_COMMON = "CORE-COMMON", Category2.NODE_LOGGER = "NODE-LOGGER", Category2.TELEMETRY = "TELEMETRY", Category2.BUILDER_MANAGER = "BUILDER-MANAGER", Category2.BUILDER_VITE = "BUILDER-VITE", Category2.SOURCE_LOADER = "SOURCE-LOADER", Category2.POSTINSTALL = "POSTINSTALL", Category2.DOCS_TOOLS = "DOCS-TOOLS", Category2.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", Category2.FRAMEWORK_REACT_VITE = "FRAMEWORK_REACT-VITE", Category2))(Category || {});
|
|
96
|
+
|
|
97
|
+
// src/errors/server/cli.ts
|
|
98
|
+
import { dedent } from "ts-dedent";
|
|
99
|
+
var GenerateNewProjectOnInitError = class extends StorybookError {
|
|
100
|
+
constructor(data) {
|
|
101
|
+
super({
|
|
102
|
+
name: "GenerateNewProjectOnInitError",
|
|
103
|
+
category: "CLI_INIT" /* CLI_INIT */,
|
|
104
|
+
code: 3,
|
|
105
|
+
documentation: "",
|
|
106
|
+
message: dedent`
|
|
107
|
+
There was an error while using ${data.packageManager} to create a new ${data.projectType} project.
|
|
108
|
+
|
|
109
|
+
${data.error instanceof Error ? data.error.message : ""}`
|
|
110
|
+
});
|
|
111
|
+
this.data = data;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
function createMinimumReleaseAgeHandledErrorMessage(data) {
|
|
115
|
+
if ("message" in data)
|
|
116
|
+
return data.message;
|
|
117
|
+
let followUp = data.minimumReleaseAgeExclusionsConfigName ? `To fix this, either wait for the configured age window to pass and rerun the command, or add the blocked packages to ${data.packageManagerName}'s ${data.minimumReleaseAgeExclusionsConfigName} setting.` : "To fix this, either wait for the configured age window to pass and rerun the command, or rerun Forkbook with an older compatible release.";
|
|
118
|
+
return dedent`
|
|
119
|
+
${data.packageManagerName} blocked package installation because your project uses ${data.minimumReleaseAgeConfigName}.
|
|
120
|
+
${data.failedPackage ? `
|
|
121
|
+
Failed package: ${data.failedPackage}
|
|
122
|
+
` : ""}
|
|
123
|
+
${followUp}
|
|
124
|
+
`;
|
|
125
|
+
}
|
|
126
|
+
var MinimumReleaseAgeHandledError = class extends StorybookError {
|
|
127
|
+
constructor(data) {
|
|
128
|
+
super({
|
|
129
|
+
name: "MinimumReleaseAgeHandledError",
|
|
130
|
+
category: "CLI" /* CLI */,
|
|
131
|
+
isHandledError: !0,
|
|
132
|
+
code: 2,
|
|
133
|
+
cause: data.cause,
|
|
134
|
+
message: createMinimumReleaseAgeHandledErrorMessage(data)
|
|
135
|
+
});
|
|
136
|
+
this.data = data;
|
|
137
|
+
}
|
|
138
|
+
}, AddonVitestPostinstallPrerequisiteCheckError = class extends StorybookError {
|
|
139
|
+
constructor(data) {
|
|
140
|
+
super({
|
|
141
|
+
name: "AddonVitestPostinstallPrerequisiteCheckError",
|
|
142
|
+
category: "CLI_INIT" /* CLI_INIT */,
|
|
143
|
+
isHandledError: !0,
|
|
144
|
+
code: 4,
|
|
145
|
+
documentation: "",
|
|
146
|
+
message: "The prerequisite check for the Vitest addon failed."
|
|
147
|
+
});
|
|
148
|
+
this.data = data;
|
|
149
|
+
}
|
|
150
|
+
}, AddonVitestPostinstallWorkspaceUpdateError = class extends StorybookError {
|
|
151
|
+
constructor(data) {
|
|
152
|
+
super({
|
|
153
|
+
name: "AddonVitestPostinstallWorkspaceUpdateError",
|
|
154
|
+
category: "CLI_INIT" /* CLI_INIT */,
|
|
155
|
+
isHandledError: !0,
|
|
156
|
+
code: 8,
|
|
157
|
+
documentation: "https://forkbook.ljk.dev/docs/writing-tests/integrations/vitest-addon#manual-setup-advanced",
|
|
158
|
+
message: dedent`
|
|
159
|
+
Could not update existing Vitest workspace file: ${data.filePath}
|
|
160
|
+
Please refer to the documentation to complete the setup manually.
|
|
161
|
+
`
|
|
162
|
+
});
|
|
163
|
+
this.data = data;
|
|
164
|
+
}
|
|
165
|
+
}, AddonVitestPostinstallConfigUpdateError = class extends StorybookError {
|
|
166
|
+
constructor(data) {
|
|
167
|
+
super({
|
|
168
|
+
name: "AddonVitestPostinstallConfigUpdateError",
|
|
169
|
+
category: "CLI_INIT" /* CLI_INIT */,
|
|
170
|
+
isHandledError: !0,
|
|
171
|
+
code: 9,
|
|
172
|
+
documentation: "https://forkbook.ljk.dev/docs/writing-tests/integrations/vitest-addon#manual-setup-advanced",
|
|
173
|
+
message: dedent`
|
|
174
|
+
Unable to update existing Vitest config file: ${data.filePath}
|
|
175
|
+
Please refer to the documentation to complete the setup manually.
|
|
176
|
+
`
|
|
177
|
+
});
|
|
178
|
+
this.data = data;
|
|
179
|
+
}
|
|
180
|
+
}, AddonVitestPostinstallError = class extends StorybookError {
|
|
181
|
+
constructor(data) {
|
|
182
|
+
super({
|
|
183
|
+
name: "AddonVitestPostinstallError",
|
|
184
|
+
category: "CLI_INIT" /* CLI_INIT */,
|
|
185
|
+
isHandledError: !0,
|
|
186
|
+
code: 5,
|
|
187
|
+
message: "The Vitest addon setup failed.",
|
|
188
|
+
subErrors: data.errors
|
|
189
|
+
});
|
|
190
|
+
this.data = data;
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
// src/errors/server/config.ts
|
|
195
|
+
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
196
|
+
import { dedent as dedent2 } from "ts-dedent";
|
|
197
|
+
var NxProjectDetectedError = class extends StorybookError {
|
|
125
198
|
constructor() {
|
|
126
199
|
super({
|
|
127
200
|
name: "NxProjectDetectedError",
|
|
128
201
|
category: "CLI_INIT" /* CLI_INIT */,
|
|
129
202
|
code: 1,
|
|
130
203
|
documentation: "https://nx.dev/nx-api/storybook#generating-storybook-configuration",
|
|
131
|
-
message:
|
|
204
|
+
message: dedent2`
|
|
132
205
|
We have detected Nx in your project. Nx has its own Forkbook initializer, so please use it instead.
|
|
133
206
|
Run "nx g @nx/storybook:configuration <your-project-name>" to add Forkbook to a given Nx app or lib.`
|
|
134
207
|
});
|
|
@@ -139,8 +212,8 @@ var Category = /* @__PURE__ */ ((Category2) => (Category2.CLI = "CLI", Category2
|
|
|
139
212
|
name: "MissingFrameworkFieldError",
|
|
140
213
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
141
214
|
code: 1,
|
|
142
|
-
documentation: "https://
|
|
143
|
-
message:
|
|
215
|
+
documentation: "https://forkbook.ljk.dev/docs/migration#new-framework-api",
|
|
216
|
+
message: dedent2`
|
|
144
217
|
Could not find a 'framework' field in Forkbook config.
|
|
145
218
|
|
|
146
219
|
Set it to '@aussieljk/forkbook/react-vite' or '@aussieljk/forkbook/nextjs-vite'.`
|
|
@@ -152,8 +225,8 @@ var Category = /* @__PURE__ */ ((Category2) => (Category2.CLI = "CLI", Category2
|
|
|
152
225
|
name: "InvalidFrameworkNameError",
|
|
153
226
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
154
227
|
code: 2,
|
|
155
|
-
documentation: "https://
|
|
156
|
-
message:
|
|
228
|
+
documentation: "https://forkbook.ljk.dev/docs/migration#new-framework-api",
|
|
229
|
+
message: dedent2`
|
|
157
230
|
Invalid value of '${data.frameworkName}' in the 'framework' field of Forkbook config.
|
|
158
231
|
|
|
159
232
|
Set it to '@aussieljk/forkbook/react-vite' or '@aussieljk/forkbook/nextjs-vite'.
|
|
@@ -168,7 +241,7 @@ var Category = /* @__PURE__ */ ((Category2) => (Category2.CLI = "CLI", Category2
|
|
|
168
241
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
169
242
|
code: 3,
|
|
170
243
|
documentation: "",
|
|
171
|
-
message:
|
|
244
|
+
message: dedent2`
|
|
172
245
|
Could not evaluate the '${data.frameworkName}' package from the 'framework' field of Forkbook config.
|
|
173
246
|
|
|
174
247
|
Are you sure it's a valid package and is installed?`
|
|
@@ -181,8 +254,8 @@ var Category = /* @__PURE__ */ ((Category2) => (Category2.CLI = "CLI", Category2
|
|
|
181
254
|
name: "ConflictingStaticDirConfigError",
|
|
182
255
|
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
183
256
|
code: 1,
|
|
184
|
-
documentation: "https://
|
|
185
|
-
message:
|
|
257
|
+
documentation: "https://forkbook.ljk.dev/docs/configure/integration/images-and-assets#serving-static-files-via-storybook-configuration",
|
|
258
|
+
message: dedent2`
|
|
186
259
|
Forkbook encountered a conflict when trying to serve statics. You have configured both:
|
|
187
260
|
* Forkbook's option in the config file: 'staticDirs'
|
|
188
261
|
* Forkbook's (deprecated) CLI flag: '--staticDir' or '-s'
|
|
@@ -196,621 +269,560 @@ var Category = /* @__PURE__ */ ((Category2) => (Category2.CLI = "CLI", Category2
|
|
|
196
269
|
name: "InvalidStoriesEntryError",
|
|
197
270
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
198
271
|
code: 4,
|
|
199
|
-
documentation: "https://
|
|
200
|
-
message:
|
|
272
|
+
documentation: "https://forkbook.ljk.dev/docs/faq#can-i-have-a-storybook-with-no-local-stories",
|
|
273
|
+
message: dedent2`
|
|
201
274
|
Forkbook could not index your stories.
|
|
202
275
|
Your main configuration does not contain a 'stories' field, or it resolved to an empty array.
|
|
203
276
|
|
|
204
277
|
Please check your main configuration file and make sure it exports a 'stories' field that is not an empty array.`
|
|
205
278
|
});
|
|
206
279
|
}
|
|
207
|
-
},
|
|
280
|
+
}, CriticalPresetLoadError = class extends StorybookError {
|
|
208
281
|
constructor(data) {
|
|
209
282
|
super({
|
|
210
|
-
name: "
|
|
211
|
-
category: "CORE-
|
|
212
|
-
code:
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
data.
|
|
216
|
-
|
|
283
|
+
name: "CriticalPresetLoadError",
|
|
284
|
+
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
285
|
+
code: 2,
|
|
286
|
+
documentation: "",
|
|
287
|
+
message: dedent2`
|
|
288
|
+
Forkbook failed to load the following preset: ${data.presetName}.
|
|
289
|
+
|
|
290
|
+
Please check whether your setup is correct, the Forkbook dependencies (and their peer dependencies) are installed correctly and there are no package version clashes.
|
|
291
|
+
|
|
292
|
+
If you believe this is a bug, please open an issue on Github.
|
|
293
|
+
|
|
294
|
+
${data.error.stack || data.error.message}`
|
|
217
295
|
});
|
|
218
296
|
this.data = data;
|
|
219
297
|
}
|
|
220
|
-
},
|
|
221
|
-
constructor(
|
|
298
|
+
}, MissingBuilderError = class extends StorybookError {
|
|
299
|
+
constructor() {
|
|
222
300
|
super({
|
|
223
|
-
name: "
|
|
224
|
-
category: "CORE-
|
|
225
|
-
code:
|
|
226
|
-
|
|
301
|
+
name: "MissingBuilderError",
|
|
302
|
+
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
303
|
+
code: 3,
|
|
304
|
+
documentation: "https://github.com/storybookjs/storybook/issues/24071",
|
|
305
|
+
message: dedent2`
|
|
306
|
+
Forkbook could not find a builder configuration for your project.
|
|
307
|
+
Builders normally come from a framework package e.g. '@aussieljk/forkbook/react-vite', or from builder packages e.g. '@aussieljk/forkbook/builder-vite'.
|
|
308
|
+
|
|
309
|
+
- Does your main config file contain a 'framework' field configured correctly?
|
|
310
|
+
- Is the Forkbook framework package installed correctly?
|
|
311
|
+
- If you don't use a framework, does your main config contain a 'core.builder' configured correctly?
|
|
312
|
+
- Are you in a monorepo and perhaps the framework package is hoisted incorrectly?
|
|
313
|
+
|
|
314
|
+
If you believe this is a bug, please describe your issue in detail on Github.`
|
|
227
315
|
});
|
|
228
|
-
this.data = data;
|
|
229
316
|
}
|
|
230
|
-
},
|
|
317
|
+
}, NoMatchingExportError = class extends StorybookError {
|
|
231
318
|
constructor(data) {
|
|
232
319
|
super({
|
|
233
|
-
name: "
|
|
234
|
-
category: "CORE-
|
|
235
|
-
code:
|
|
236
|
-
|
|
320
|
+
name: "NoMatchingExportError",
|
|
321
|
+
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
322
|
+
code: 4,
|
|
323
|
+
documentation: "",
|
|
324
|
+
message: dedent2`
|
|
325
|
+
There was an exports mismatch error when trying to build Forkbook.
|
|
326
|
+
Please check whether the versions of your Forkbook packages match whenever possible, as this might be the cause.
|
|
327
|
+
|
|
328
|
+
Problematic example:
|
|
329
|
+
{ "@aussieljk/forkbook/react": "7.5.3", "@aussieljk/forkbook/react-vite": "7.4.5", "@aussieljk/forkbook": "7.3.0" }
|
|
330
|
+
|
|
331
|
+
Correct example:
|
|
332
|
+
{ "@aussieljk/forkbook/react": "7.5.3", "@aussieljk/forkbook/react-vite": "7.5.3", "@aussieljk/forkbook": "7.5.3" }`
|
|
237
333
|
});
|
|
238
334
|
this.data = data;
|
|
239
335
|
}
|
|
240
|
-
},
|
|
336
|
+
}, MainFileMissingError = class extends StorybookError {
|
|
241
337
|
constructor(data) {
|
|
338
|
+
let map = {
|
|
339
|
+
storybook: {
|
|
340
|
+
helperMessage: "You can pass a --config-dir flag to tell Forkbook, where your main.js|ts file is located at.",
|
|
341
|
+
documentation: "https://forkbook.ljk.dev/docs/configure"
|
|
342
|
+
},
|
|
343
|
+
vitest: {
|
|
344
|
+
helperMessage: "You can pass a configDir plugin option to tell where your main.js|ts file is located at.",
|
|
345
|
+
// TODO: add proper docs once available
|
|
346
|
+
documentation: "https://forkbook.ljk.dev/docs/configure"
|
|
347
|
+
}
|
|
348
|
+
}, { documentation, helperMessage } = map[data.source || "storybook"];
|
|
242
349
|
super({
|
|
243
|
-
name: "
|
|
244
|
-
category: "CORE-
|
|
245
|
-
code:
|
|
246
|
-
|
|
350
|
+
name: "MainFileMissingError",
|
|
351
|
+
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
352
|
+
code: 6,
|
|
353
|
+
documentation,
|
|
354
|
+
message: dedent2`
|
|
355
|
+
No configuration files have been found in your configDir: ${import_picocolors.default.yellow(data.location)}.
|
|
356
|
+
Forkbook needs a "main.js|ts" file, please add it.
|
|
357
|
+
|
|
358
|
+
${helperMessage}`
|
|
247
359
|
});
|
|
248
360
|
this.data = data;
|
|
249
361
|
}
|
|
250
|
-
},
|
|
362
|
+
}, MainFileEvaluationError = class extends StorybookError {
|
|
251
363
|
constructor(data) {
|
|
364
|
+
let errorText = import_picocolors.default.white(
|
|
365
|
+
(data.error.stack || data.error.message).replaceAll(process.cwd(), "")
|
|
366
|
+
);
|
|
252
367
|
super({
|
|
253
|
-
name: "
|
|
254
|
-
category: "CORE-
|
|
255
|
-
code:
|
|
256
|
-
message:
|
|
368
|
+
name: "MainFileEvaluationError",
|
|
369
|
+
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
370
|
+
code: 7,
|
|
371
|
+
message: dedent2`
|
|
372
|
+
Forkbook couldn't evaluate your ${import_picocolors.default.yellow(data.location)} file.
|
|
373
|
+
|
|
374
|
+
Original error:
|
|
375
|
+
${errorText}`
|
|
257
376
|
});
|
|
258
377
|
this.data = data;
|
|
259
378
|
}
|
|
260
|
-
}
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
// src/errors/server/builder.ts
|
|
382
|
+
import { dedent as dedent3 } from "ts-dedent";
|
|
383
|
+
var GoogleFontsDownloadError = class extends StorybookError {
|
|
261
384
|
constructor(data) {
|
|
262
385
|
super({
|
|
263
|
-
name: "
|
|
264
|
-
category: "
|
|
265
|
-
code:
|
|
266
|
-
|
|
386
|
+
name: "GoogleFontsDownloadError",
|
|
387
|
+
category: "FRAMEWORK_NEXTJS" /* FRAMEWORK_NEXTJS */,
|
|
388
|
+
code: 1,
|
|
389
|
+
documentation: "https://forkbook.ljk.dev/docs/get-started/frameworks/nextjs#nextjs-font-optimization",
|
|
390
|
+
message: dedent3`
|
|
391
|
+
Failed to fetch \`${data.fontFamily}\` from Google Fonts with URL: \`${data.url}\``
|
|
267
392
|
});
|
|
268
393
|
this.data = data;
|
|
269
394
|
}
|
|
270
|
-
},
|
|
395
|
+
}, GoogleFontsLoadingError = class extends StorybookError {
|
|
271
396
|
constructor(data) {
|
|
272
397
|
super({
|
|
273
|
-
name: "
|
|
274
|
-
category: "
|
|
275
|
-
code:
|
|
276
|
-
|
|
398
|
+
name: "GoogleFontsLoadingError",
|
|
399
|
+
category: "FRAMEWORK_NEXTJS" /* FRAMEWORK_NEXTJS */,
|
|
400
|
+
code: 2,
|
|
401
|
+
documentation: "https://forkbook.ljk.dev/docs/get-started/frameworks/nextjs#nextjs-font-optimization",
|
|
402
|
+
message: dedent3`
|
|
403
|
+
An error occurred when trying to load Google Fonts with URL \`${data.url}\`.
|
|
404
|
+
|
|
405
|
+
${data.error instanceof Error ? data.error.message : ""}`
|
|
277
406
|
});
|
|
278
407
|
this.data = data;
|
|
279
408
|
}
|
|
280
|
-
},
|
|
281
|
-
constructor(
|
|
409
|
+
}, NoStatsForViteDevError = class extends StorybookError {
|
|
410
|
+
constructor() {
|
|
282
411
|
super({
|
|
283
|
-
name: "
|
|
284
|
-
category: "
|
|
285
|
-
code:
|
|
286
|
-
message: `
|
|
412
|
+
name: "NoStatsForViteDevError",
|
|
413
|
+
category: "BUILDER-VITE" /* BUILDER_VITE */,
|
|
414
|
+
code: 1,
|
|
415
|
+
message: dedent3`
|
|
416
|
+
Unable to write preview stats as the Vite builder does not support stats in dev mode.
|
|
417
|
+
|
|
418
|
+
Please remove the \`--stats-json\` flag when running in dev mode.`
|
|
287
419
|
});
|
|
288
|
-
this.data = data;
|
|
289
420
|
}
|
|
290
|
-
},
|
|
291
|
-
constructor(
|
|
292
|
-
super({
|
|
293
|
-
name: "OpenServiceDocgenMissingComponentError",
|
|
294
|
-
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
295
|
-
code: 12,
|
|
296
|
-
message: `No story or attached docs entry was found for component id "${data.id}". The docgen service can only return docs for components that are present in the story index.`
|
|
297
|
-
});
|
|
298
|
-
this.data = data;
|
|
299
|
-
}
|
|
300
|
-
}, OpenServiceMissingChannelError = class extends StorybookError {
|
|
301
|
-
constructor(data = {}) {
|
|
421
|
+
}, ViteModuleGraphSubscriptionError = class extends StorybookError {
|
|
422
|
+
constructor() {
|
|
302
423
|
super({
|
|
303
|
-
name: "
|
|
304
|
-
category: "
|
|
305
|
-
code:
|
|
306
|
-
message:
|
|
424
|
+
name: "ViteModuleGraphSubscriptionError",
|
|
425
|
+
category: "BUILDER-VITE" /* BUILDER_VITE */,
|
|
426
|
+
code: 2,
|
|
427
|
+
message: "Vite module graph listeners must be registered before the builder starts."
|
|
307
428
|
});
|
|
308
|
-
this.data = data;
|
|
309
429
|
}
|
|
310
|
-
},
|
|
430
|
+
}, IncompatiblePostCssConfigError = class extends StorybookError {
|
|
311
431
|
constructor(data) {
|
|
312
432
|
super({
|
|
313
|
-
name: "
|
|
314
|
-
category: "
|
|
315
|
-
code:
|
|
316
|
-
message: `
|
|
433
|
+
name: "IncompatiblePostCssConfigError",
|
|
434
|
+
category: "FRAMEWORK_NEXTJS" /* FRAMEWORK_NEXTJS */,
|
|
435
|
+
code: 3,
|
|
436
|
+
message: dedent3`
|
|
437
|
+
Incompatible PostCSS configuration format detected.
|
|
438
|
+
|
|
439
|
+
Next.js uses an array-based format for plugins which is not compatible with Vite:
|
|
440
|
+
|
|
441
|
+
// ❌ Incompatible format (used by Next.js)
|
|
442
|
+
const config = {
|
|
443
|
+
plugins: ["@tailwindcss/postcss"],
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
Please transform your PostCSS config to use the object-based format, which is compatible with Next.js and Vite:
|
|
447
|
+
|
|
448
|
+
// ✅ Compatible format (works with Next.js and Vite)
|
|
449
|
+
const config = {
|
|
450
|
+
plugins: {
|
|
451
|
+
"@tailwindcss/postcss": {},
|
|
452
|
+
},
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
Original error: ${data.error.message}
|
|
456
|
+
`
|
|
317
457
|
});
|
|
318
458
|
this.data = data;
|
|
319
459
|
}
|
|
320
|
-
}
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
// src/errors/server/dev-server.ts
|
|
463
|
+
import { dedent as dedent4 } from "ts-dedent";
|
|
464
|
+
var StatusTypeIdMismatchError = class extends StorybookError {
|
|
321
465
|
constructor(data) {
|
|
322
466
|
super({
|
|
323
|
-
name: "
|
|
324
|
-
category: "CORE-
|
|
325
|
-
code:
|
|
326
|
-
message:
|
|
467
|
+
name: "StatusTypeIdMismatchError",
|
|
468
|
+
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
469
|
+
code: 16,
|
|
470
|
+
message: `Status has typeId "${data.status.typeId}" but was added to store with typeId "${data.typeId}". Full status: ${JSON.stringify(
|
|
471
|
+
data.status,
|
|
472
|
+
null,
|
|
473
|
+
2
|
|
474
|
+
)}`
|
|
327
475
|
});
|
|
328
476
|
this.data = data;
|
|
329
477
|
}
|
|
330
|
-
},
|
|
478
|
+
}, NoFreePortError = class extends StorybookError {
|
|
331
479
|
constructor(data) {
|
|
332
480
|
super({
|
|
333
|
-
name: "
|
|
334
|
-
category: "CORE-
|
|
335
|
-
|
|
336
|
-
|
|
481
|
+
name: "NoFreePortError",
|
|
482
|
+
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
483
|
+
// Note: 17 is taken by OxcParseError in ../oxc-parser/errors.ts
|
|
484
|
+
code: 18,
|
|
485
|
+
message: dedent4`
|
|
486
|
+
Unable to find a free port for Forkbook's dev server${data.requestedPort ? ` (requested port: ${data.requestedPort})` : ""}.
|
|
487
|
+
Your environment appears to block Forkbook from listening on network ports.
|
|
488
|
+
If you are running Forkbook in a sandboxed or restricted shell, allow binding to localhost ports and try again.`
|
|
337
489
|
});
|
|
338
490
|
this.data = data;
|
|
339
491
|
}
|
|
340
|
-
},
|
|
341
|
-
constructor() {
|
|
342
|
-
super({
|
|
343
|
-
name: "OpenServiceAsyncRecipeError",
|
|
344
|
-
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
345
|
-
code: 31,
|
|
346
|
-
message: "setState recipes must be synchronous. A write after an await would change state without authoring a sync entry. Split the command into one setState per synchronous step."
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
}, OpenServiceCyclicStateError = class extends StorybookError {
|
|
350
|
-
constructor() {
|
|
351
|
-
super({
|
|
352
|
-
name: "OpenServiceCyclicStateError",
|
|
353
|
-
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
354
|
-
code: 32,
|
|
355
|
-
message: "Service state must be JSON-serializable, but the value is cyclic or nested more than 256 levels deep. Store an id and look the value up in a query instead of a reference."
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
}, OpenServiceOperationNameCollisionError = class extends StorybookError {
|
|
359
|
-
constructor(data) {
|
|
492
|
+
}, StorybookDevServerDisconnectedError = class extends StorybookError {
|
|
493
|
+
constructor(data = {}) {
|
|
360
494
|
super({
|
|
361
|
-
name: "
|
|
362
|
-
category: "CORE-
|
|
363
|
-
code:
|
|
364
|
-
message: `
|
|
495
|
+
name: "StorybookDevServerDisconnectedError",
|
|
496
|
+
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
497
|
+
code: 19,
|
|
498
|
+
message: dedent4`
|
|
499
|
+
Forkbook dev server disconnected${data.code ? ` (close code ${data.code}${data.reason ? `: ${data.reason}` : ""})` : ""}.
|
|
500
|
+
Any request that was still in flight has been abandoned.
|
|
501
|
+
Make sure the dev server is still running, then try again.`
|
|
365
502
|
});
|
|
366
503
|
this.data = data;
|
|
367
504
|
}
|
|
368
|
-
},
|
|
505
|
+
}, SavingGlobalSettingsFileError = class extends StorybookError {
|
|
369
506
|
constructor(data) {
|
|
370
507
|
super({
|
|
371
|
-
name: "
|
|
372
|
-
category: "CORE-
|
|
373
|
-
code:
|
|
374
|
-
message: `
|
|
508
|
+
name: "SavingGlobalSettingsFileError",
|
|
509
|
+
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
510
|
+
code: 1,
|
|
511
|
+
message: dedent4`
|
|
512
|
+
Unable to save global settings file to ${data.filePath}
|
|
513
|
+
${data.error && `Reason: ${data.error}`}`
|
|
375
514
|
});
|
|
376
515
|
this.data = data;
|
|
377
516
|
}
|
|
378
517
|
};
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
518
|
+
|
|
519
|
+
// src/errors/server/open-service.ts
|
|
520
|
+
import { dedent as dedent5 } from "ts-dedent";
|
|
521
|
+
|
|
522
|
+
// src/shared/open-service/errors.ts
|
|
523
|
+
function formatIssuePath(path) {
|
|
524
|
+
return path?.length ? path.map((segment) => {
|
|
525
|
+
let key = typeof segment == "object" && segment !== null && "key" in segment ? segment.key : segment;
|
|
526
|
+
return typeof key == "number" ? `[${key}]` : `.${String(key)}`;
|
|
527
|
+
}).join("").replace(/^\./, "") : "";
|
|
382
528
|
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
let
|
|
529
|
+
function formatIssues(issues) {
|
|
530
|
+
return issues.map((issue) => {
|
|
531
|
+
let path = formatIssuePath(issue.path);
|
|
532
|
+
return path === "" ? issue.message : `${path}: ${issue.message}`;
|
|
533
|
+
}).join(`
|
|
386
534
|
`);
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
message: `${describeUnknownStoryIds(data.unknownIds)}
|
|
392
|
-
${list}`
|
|
393
|
-
});
|
|
394
|
-
this.data = data;
|
|
395
|
-
}
|
|
396
|
-
}, OpenServiceTestRunTimeoutError = class extends StorybookError {
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
// src/errors/server/open-service.ts
|
|
538
|
+
var OpenServiceValidationError = class extends StorybookError {
|
|
397
539
|
constructor(data) {
|
|
398
540
|
super({
|
|
399
|
-
name: "
|
|
541
|
+
name: "OpenServiceValidationError",
|
|
400
542
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
401
|
-
code:
|
|
402
|
-
message: `
|
|
543
|
+
code: 5,
|
|
544
|
+
message: `Invalid ${data.phase} for ${data.kind} "${data.serviceId}.${data.name}":
|
|
545
|
+
${formatIssues(
|
|
546
|
+
data.issues
|
|
547
|
+
)}`
|
|
403
548
|
});
|
|
404
549
|
this.data = data;
|
|
405
550
|
}
|
|
406
|
-
},
|
|
407
|
-
constructor() {
|
|
408
|
-
super({
|
|
409
|
-
name: "OpenServiceServicesAppliedTwiceError",
|
|
410
|
-
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
411
|
-
code: 22,
|
|
412
|
-
message: dedent`The "services" preset property was applied twice, but should only be applied once.
|
|
413
|
-
Multiple code paths applying it will cause service and toolset registration to fail.`
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
}, OpenServiceMissingToolsetError = class extends StorybookError {
|
|
551
|
+
}, OpenServiceDuplicateRegistrationError = class extends StorybookError {
|
|
417
552
|
constructor(data) {
|
|
418
553
|
super({
|
|
419
|
-
name: "
|
|
554
|
+
name: "OpenServiceDuplicateRegistrationError",
|
|
420
555
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
421
|
-
code:
|
|
422
|
-
message: `
|
|
556
|
+
code: 6,
|
|
557
|
+
message: `A service with id "${data.serviceId}" is already registered.`
|
|
423
558
|
});
|
|
424
559
|
this.data = data;
|
|
425
560
|
}
|
|
426
|
-
},
|
|
561
|
+
}, OpenServiceMissingServiceError = class extends StorybookError {
|
|
427
562
|
constructor(data) {
|
|
428
563
|
super({
|
|
429
|
-
name: "
|
|
564
|
+
name: "OpenServiceMissingServiceError",
|
|
430
565
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
431
|
-
code:
|
|
432
|
-
message: `
|
|
566
|
+
code: 7,
|
|
567
|
+
message: `No registered service with id "${data.serviceId}" exists in this environment.`
|
|
433
568
|
});
|
|
434
569
|
this.data = data;
|
|
435
570
|
}
|
|
436
|
-
},
|
|
571
|
+
}, OpenServiceInternalServiceError = class extends StorybookError {
|
|
437
572
|
constructor(data) {
|
|
438
573
|
super({
|
|
439
|
-
name: "
|
|
574
|
+
name: "OpenServiceInternalServiceError",
|
|
440
575
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
441
|
-
code:
|
|
442
|
-
message: data.
|
|
443
|
-
agentFacing: !0
|
|
576
|
+
code: 19,
|
|
577
|
+
message: `Service "${data.serviceId}" is internal. Pass { internal: true } to getService() only if you intentionally depend on an unstable OSA surface. Internal services may change without notice.`
|
|
444
578
|
});
|
|
445
579
|
this.data = data;
|
|
446
580
|
}
|
|
447
|
-
},
|
|
581
|
+
}, OpenServiceUnimplementedOperationError = class extends StorybookError {
|
|
448
582
|
constructor(data) {
|
|
449
|
-
let serialized;
|
|
450
|
-
try {
|
|
451
|
-
serialized = JSON.stringify(data.issues)?.slice(0, 2e3) ?? String(data.issues);
|
|
452
|
-
} catch {
|
|
453
|
-
serialized = `${data.issues.length} issue(s) that could not be serialized`;
|
|
454
|
-
}
|
|
455
583
|
super({
|
|
456
|
-
name: "
|
|
584
|
+
name: "OpenServiceUnimplementedOperationError",
|
|
457
585
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
458
|
-
code:
|
|
459
|
-
message:
|
|
586
|
+
code: 8,
|
|
587
|
+
message: `${data.kind[0].toUpperCase()}${data.kind.slice(1)} "${data.serviceId}.${data.name}" is not implemented for this environment.`
|
|
460
588
|
});
|
|
461
589
|
this.data = data;
|
|
462
590
|
}
|
|
463
|
-
},
|
|
591
|
+
}, OpenServiceInvalidStaticPathError = class extends StorybookError {
|
|
464
592
|
constructor(data) {
|
|
465
593
|
super({
|
|
466
|
-
name: "
|
|
594
|
+
name: "OpenServiceInvalidStaticPathError",
|
|
467
595
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
468
|
-
code:
|
|
469
|
-
message: `Invalid
|
|
596
|
+
code: 10,
|
|
597
|
+
message: `Invalid static path "${data.path}" for query "${data.serviceId}.${data.name}": use a relative path with forward slashes and no ".." segments.`
|
|
470
598
|
});
|
|
471
599
|
this.data = data;
|
|
472
600
|
}
|
|
473
|
-
},
|
|
601
|
+
}, OpenServiceAsyncSchemaError = class extends StorybookError {
|
|
474
602
|
constructor(data) {
|
|
475
603
|
super({
|
|
476
|
-
name: "
|
|
604
|
+
name: "OpenServiceAsyncSchemaError",
|
|
477
605
|
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
478
|
-
code:
|
|
479
|
-
message:
|
|
606
|
+
code: 9,
|
|
607
|
+
message: `Async schema for ${data.kind} "${data.serviceId}.${data.name}" (${data.phase}): query input and output schemas must validate synchronously.`
|
|
480
608
|
});
|
|
481
609
|
this.data = data;
|
|
482
610
|
}
|
|
483
|
-
}
|
|
484
|
-
var CriticalPresetLoadError = class extends StorybookError {
|
|
611
|
+
}, OpenServiceLoadedDrainExceededError = class extends StorybookError {
|
|
485
612
|
constructor(data) {
|
|
486
613
|
super({
|
|
487
|
-
name: "
|
|
488
|
-
category: "CORE-
|
|
489
|
-
code:
|
|
490
|
-
|
|
491
|
-
message: dedent`
|
|
492
|
-
Forkbook failed to load the following preset: ${data.presetName}.
|
|
493
|
-
|
|
494
|
-
Please check whether your setup is correct, the Forkbook dependencies (and their peer dependencies) are installed correctly and there are no package version clashes.
|
|
495
|
-
|
|
496
|
-
If you believe this is a bug, please open an issue on Github.
|
|
497
|
-
|
|
498
|
-
${data.error.stack || data.error.message}`
|
|
614
|
+
name: "OpenServiceLoadedDrainExceededError",
|
|
615
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
616
|
+
code: 11,
|
|
617
|
+
message: `Query "${data.serviceId}.${data.name}".loaded(...) did not settle after ${data.iterations} drain iterations. Check for handlers that keep discovering new dependencies after every state change.`
|
|
499
618
|
});
|
|
500
619
|
this.data = data;
|
|
501
620
|
}
|
|
502
|
-
},
|
|
503
|
-
constructor() {
|
|
504
|
-
super({
|
|
505
|
-
name: "MissingBuilderError",
|
|
506
|
-
category: "CORE-SERVER" /* CORE_SERVER */,
|
|
507
|
-
code: 3,
|
|
508
|
-
documentation: "https://github.com/storybookjs/storybook/issues/24071",
|
|
509
|
-
message: dedent`
|
|
510
|
-
Forkbook could not find a builder configuration for your project.
|
|
511
|
-
Builders normally come from a framework package e.g. '@aussieljk/forkbook/react-vite', or from builder packages e.g. '@aussieljk/forkbook/builder-vite'.
|
|
512
|
-
|
|
513
|
-
- Does your main config file contain a 'framework' field configured correctly?
|
|
514
|
-
- Is the Forkbook framework package installed correctly?
|
|
515
|
-
- If you don't use a framework, does your main config contain a 'core.builder' configured correctly?
|
|
516
|
-
- Are you in a monorepo and perhaps the framework package is hoisted incorrectly?
|
|
517
|
-
|
|
518
|
-
If you believe this is a bug, please describe your issue in detail on Github.`
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
|
-
}, GoogleFontsDownloadError = class extends StorybookError {
|
|
621
|
+
}, OpenServiceDocgenMissingComponentError = class extends StorybookError {
|
|
522
622
|
constructor(data) {
|
|
523
623
|
super({
|
|
524
|
-
name: "
|
|
525
|
-
category: "
|
|
526
|
-
code:
|
|
527
|
-
|
|
528
|
-
message: dedent`
|
|
529
|
-
Failed to fetch \`${data.fontFamily}\` from Google Fonts with URL: \`${data.url}\``
|
|
624
|
+
name: "OpenServiceDocgenMissingComponentError",
|
|
625
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
626
|
+
code: 12,
|
|
627
|
+
message: `No story or attached docs entry was found for component id "${data.id}". The docgen service can only return docs for components that are present in the story index.`
|
|
530
628
|
});
|
|
531
629
|
this.data = data;
|
|
532
630
|
}
|
|
533
|
-
},
|
|
534
|
-
constructor(data) {
|
|
631
|
+
}, OpenServiceMissingChannelError = class extends StorybookError {
|
|
632
|
+
constructor(data = {}) {
|
|
535
633
|
super({
|
|
536
|
-
name: "
|
|
537
|
-
category: "
|
|
538
|
-
code:
|
|
539
|
-
|
|
540
|
-
message: dedent`
|
|
541
|
-
An error occurred when trying to load Google Fonts with URL \`${data.url}\`.
|
|
542
|
-
|
|
543
|
-
${data.error instanceof Error ? data.error.message : ""}`
|
|
634
|
+
name: "OpenServiceMissingChannelError",
|
|
635
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
636
|
+
code: 13,
|
|
637
|
+
message: data.serviceId ? `Cannot register service "${data.serviceId}": the Forkbook addons channel is not installed in this runtime.` : "The Forkbook addons channel is not installed in this runtime."
|
|
544
638
|
});
|
|
545
639
|
this.data = data;
|
|
546
640
|
}
|
|
547
|
-
},
|
|
641
|
+
}, OpenServiceRemoteCommandDisconnectedError = class extends StorybookError {
|
|
548
642
|
constructor(data) {
|
|
549
643
|
super({
|
|
550
|
-
name: "
|
|
551
|
-
category: "CORE-
|
|
552
|
-
code:
|
|
553
|
-
|
|
554
|
-
message: dedent`
|
|
555
|
-
There was an exports mismatch error when trying to build Forkbook.
|
|
556
|
-
Please check whether the versions of your Forkbook packages match whenever possible, as this might be the cause.
|
|
557
|
-
|
|
558
|
-
Problematic example:
|
|
559
|
-
{ "@aussieljk/forkbook/react": "7.5.3", "@aussieljk/forkbook/react-vite": "7.4.5", "@aussieljk/forkbook": "7.3.0" }
|
|
560
|
-
|
|
561
|
-
Correct example:
|
|
562
|
-
{ "@aussieljk/forkbook/react": "7.5.3", "@aussieljk/forkbook/react-vite": "7.5.3", "@aussieljk/forkbook": "7.5.3" }`
|
|
644
|
+
name: "OpenServiceRemoteCommandDisconnectedError",
|
|
645
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
646
|
+
code: 14,
|
|
647
|
+
message: `Service "${data.serviceId}" was unregistered before a remote command resolved.`
|
|
563
648
|
});
|
|
564
649
|
this.data = data;
|
|
565
650
|
}
|
|
566
|
-
},
|
|
651
|
+
}, OpenServiceRemoteCommandUnhandledError = class extends StorybookError {
|
|
567
652
|
constructor(data) {
|
|
568
|
-
let map = {
|
|
569
|
-
storybook: {
|
|
570
|
-
helperMessage: "You can pass a --config-dir flag to tell Forkbook, where your main.js|ts file is located at.",
|
|
571
|
-
documentation: "https://storybook.js.org/docs/configure?ref=error"
|
|
572
|
-
},
|
|
573
|
-
vitest: {
|
|
574
|
-
helperMessage: "You can pass a configDir plugin option to tell where your main.js|ts file is located at.",
|
|
575
|
-
// TODO: add proper docs once available
|
|
576
|
-
documentation: "https://storybook.js.org/docs/configure?ref=error"
|
|
577
|
-
}
|
|
578
|
-
}, { documentation, helperMessage } = map[data.source || "storybook"];
|
|
579
653
|
super({
|
|
580
|
-
name: "
|
|
581
|
-
category: "CORE-
|
|
582
|
-
code:
|
|
583
|
-
|
|
584
|
-
message: dedent`
|
|
585
|
-
No configuration files have been found in your configDir: ${import_picocolors.default.yellow(data.location)}.
|
|
586
|
-
Forkbook needs a "main.js|ts" file, please add it.
|
|
587
|
-
|
|
588
|
-
${helperMessage}`
|
|
654
|
+
name: "OpenServiceRemoteCommandUnhandledError",
|
|
655
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
656
|
+
code: 15,
|
|
657
|
+
message: data.delegated ? `The Forkbook this runtime is attached to did not acknowledge remote command "${data.serviceId}.${data.commandName}" in time \u2014 it may be busy or unreachable. Retry; note the command may still have executed on that instance.` : `No runtime acknowledged remote command "${data.serviceId}.${data.commandName}"; its handler is not implemented in any connected runtime.`
|
|
589
658
|
});
|
|
590
659
|
this.data = data;
|
|
591
660
|
}
|
|
592
|
-
},
|
|
661
|
+
}, OpenServiceRemoteCommandConfigDriftError = class extends StorybookError {
|
|
593
662
|
constructor(data) {
|
|
594
|
-
let errorText = import_picocolors.default.white(
|
|
595
|
-
(data.error.stack || data.error.message).replaceAll(process.cwd(), "")
|
|
596
|
-
);
|
|
597
663
|
super({
|
|
598
|
-
name: "
|
|
599
|
-
category: "CORE-
|
|
600
|
-
code:
|
|
601
|
-
message:
|
|
602
|
-
Forkbook couldn't evaluate your ${import_picocolors.default.yellow(data.location)} file.
|
|
603
|
-
|
|
604
|
-
Original error:
|
|
605
|
-
${errorText}`
|
|
664
|
+
name: "OpenServiceRemoteCommandConfigDriftError",
|
|
665
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
666
|
+
code: 30,
|
|
667
|
+
message: `The Forkbook this runtime is attached to reported it has no handler for remote command "${data.serviceId}.${data.commandName}". The two processes are running different configurations (for example a feature flag enabled in one but not the other). Restart the attached Forkbook with a configuration matching this process.`
|
|
606
668
|
});
|
|
607
669
|
this.data = data;
|
|
608
670
|
}
|
|
609
|
-
},
|
|
610
|
-
constructor(
|
|
671
|
+
}, OpenServiceAsyncRecipeError = class extends StorybookError {
|
|
672
|
+
constructor() {
|
|
611
673
|
super({
|
|
612
|
-
name: "
|
|
613
|
-
category: "CORE-
|
|
614
|
-
code:
|
|
615
|
-
message:
|
|
616
|
-
data.status,
|
|
617
|
-
null,
|
|
618
|
-
2
|
|
619
|
-
)}`
|
|
674
|
+
name: "OpenServiceAsyncRecipeError",
|
|
675
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
676
|
+
code: 31,
|
|
677
|
+
message: "setState recipes must be synchronous. A write after an await would change state without authoring a sync entry. Split the command into one setState per synchronous step."
|
|
620
678
|
});
|
|
621
|
-
this.data = data;
|
|
622
679
|
}
|
|
623
|
-
},
|
|
624
|
-
constructor(
|
|
625
|
-
super({
|
|
626
|
-
name: "
|
|
627
|
-
category: "CORE-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
message: dedent`
|
|
631
|
-
Unable to find a free port for Forkbook's dev server${data.requestedPort ? ` (requested port: ${data.requestedPort})` : ""}.
|
|
632
|
-
Your environment appears to block Forkbook from listening on network ports.
|
|
633
|
-
If you are running Forkbook in a sandboxed or restricted shell, allow binding to localhost ports and try again.`
|
|
680
|
+
}, OpenServiceCyclicStateError = class extends StorybookError {
|
|
681
|
+
constructor() {
|
|
682
|
+
super({
|
|
683
|
+
name: "OpenServiceCyclicStateError",
|
|
684
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
685
|
+
code: 32,
|
|
686
|
+
message: "Service state must be JSON-serializable, but the value is cyclic or nested more than 256 levels deep. Store an id and look the value up in a query instead of a reference."
|
|
634
687
|
});
|
|
635
|
-
this.data = data;
|
|
636
688
|
}
|
|
637
|
-
},
|
|
638
|
-
constructor(data
|
|
689
|
+
}, OpenServiceOperationNameCollisionError = class extends StorybookError {
|
|
690
|
+
constructor(data) {
|
|
639
691
|
super({
|
|
640
|
-
name: "
|
|
641
|
-
category: "CORE-
|
|
642
|
-
code:
|
|
643
|
-
message:
|
|
644
|
-
Forkbook dev server disconnected${data.code ? ` (close code ${data.code}${data.reason ? `: ${data.reason}` : ""})` : ""}.
|
|
645
|
-
Any request that was still in flight has been abandoned.
|
|
646
|
-
Make sure the dev server is still running, then try again.`
|
|
692
|
+
name: "OpenServiceOperationNameCollisionError",
|
|
693
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
694
|
+
code: 16,
|
|
695
|
+
message: `Service "${data.serviceId}" cannot register "${data.operationName}" as both a query and a command.`
|
|
647
696
|
});
|
|
648
697
|
this.data = data;
|
|
649
698
|
}
|
|
650
|
-
},
|
|
699
|
+
}, OpenServiceMissingOriginError = class extends StorybookError {
|
|
651
700
|
constructor(data) {
|
|
652
701
|
super({
|
|
653
|
-
name: "
|
|
654
|
-
category: "
|
|
655
|
-
code:
|
|
656
|
-
|
|
657
|
-
message: dedent`
|
|
658
|
-
There was an error while using ${data.packageManager} to create a new ${data.projectType} project.
|
|
659
|
-
|
|
660
|
-
${data.error instanceof Error ? data.error.message : ""}`
|
|
702
|
+
name: "OpenServiceMissingOriginError",
|
|
703
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
704
|
+
code: 17,
|
|
705
|
+
message: `Method "${data.toolsetId}.${data.methodName}" requires a Forkbook server origin. Run it against a live Forkbook so the adapter can provide ctx.origin.`
|
|
661
706
|
});
|
|
662
707
|
this.data = data;
|
|
663
708
|
}
|
|
664
709
|
};
|
|
665
|
-
function
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
let followUp = data.minimumReleaseAgeExclusionsConfigName ? `To fix this, either wait for the configured age window to pass and rerun the command, or add the blocked packages to ${data.packageManagerName}'s ${data.minimumReleaseAgeExclusionsConfigName} setting.` : "To fix this, either wait for the configured age window to pass and rerun the command, or rerun Forkbook with an older compatible release.";
|
|
669
|
-
return dedent`
|
|
670
|
-
${data.packageManagerName} blocked package installation because your project uses ${data.minimumReleaseAgeConfigName}.
|
|
671
|
-
${data.failedPackage ? `
|
|
672
|
-
Failed package: ${data.failedPackage}
|
|
673
|
-
` : ""}
|
|
674
|
-
${followUp}
|
|
675
|
-
`;
|
|
710
|
+
function describeUnknownStoryIds(unknownIds) {
|
|
711
|
+
let plural = unknownIds.length === 1 ? "ID is" : "IDs are";
|
|
712
|
+
return `Refusing to publish review: ${unknownIds.length} story ${plural} not backed by a story entry in the live Forkbook index (docs entries cannot be review slots):`;
|
|
676
713
|
}
|
|
677
|
-
var
|
|
714
|
+
var OpenServiceUnknownStoryIdsError = class extends StorybookError {
|
|
678
715
|
constructor(data) {
|
|
716
|
+
let list = data.unknownIds.map((id) => `- ${id}`).join(`
|
|
717
|
+
`);
|
|
679
718
|
super({
|
|
680
|
-
name: "
|
|
681
|
-
category: "
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
message: createMinimumReleaseAgeHandledErrorMessage(data)
|
|
719
|
+
name: "OpenServiceUnknownStoryIdsError",
|
|
720
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
721
|
+
code: 18,
|
|
722
|
+
message: `${describeUnknownStoryIds(data.unknownIds)}
|
|
723
|
+
${list}`
|
|
686
724
|
});
|
|
687
725
|
this.data = data;
|
|
688
726
|
}
|
|
689
|
-
},
|
|
727
|
+
}, OpenServiceTestRunTimeoutError = class extends StorybookError {
|
|
690
728
|
constructor(data) {
|
|
691
729
|
super({
|
|
692
|
-
name: "
|
|
693
|
-
category: "
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
documentation: "",
|
|
697
|
-
message: "The prerequisite check for the Vitest addon failed."
|
|
730
|
+
name: "OpenServiceTestRunTimeoutError",
|
|
731
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
732
|
+
code: 21,
|
|
733
|
+
message: `Timed out after ${data.timeoutMs}ms waiting for addon-vitest response to test run "${data.requestId}". Ensure @aussieljk/forkbook/addon-vitest is installed and responding.`
|
|
698
734
|
});
|
|
699
735
|
this.data = data;
|
|
700
736
|
}
|
|
701
|
-
},
|
|
702
|
-
constructor(
|
|
737
|
+
}, OpenServiceServicesAppliedTwiceError = class extends StorybookError {
|
|
738
|
+
constructor() {
|
|
703
739
|
super({
|
|
704
|
-
name: "
|
|
705
|
-
category: "
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
message: dedent`
|
|
710
|
-
Could not update existing Vitest workspace file: ${data.filePath}
|
|
711
|
-
Please refer to the documentation to complete the setup manually.
|
|
712
|
-
`
|
|
740
|
+
name: "OpenServiceServicesAppliedTwiceError",
|
|
741
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
742
|
+
code: 22,
|
|
743
|
+
message: dedent5`The "services" preset property was applied twice, but should only be applied once.
|
|
744
|
+
Multiple code paths applying it will cause service and toolset registration to fail.`
|
|
713
745
|
});
|
|
714
|
-
this.data = data;
|
|
715
746
|
}
|
|
716
|
-
},
|
|
747
|
+
}, OpenServiceMissingToolsetError = class extends StorybookError {
|
|
717
748
|
constructor(data) {
|
|
718
749
|
super({
|
|
719
|
-
name: "
|
|
720
|
-
category: "
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
documentation: "https://storybook.js.org/docs/writing-tests/integrations/vitest-addon#manual-setup-advanced",
|
|
724
|
-
message: dedent`
|
|
725
|
-
Unable to update existing Vitest config file: ${data.filePath}
|
|
726
|
-
Please refer to the documentation to complete the setup manually.
|
|
727
|
-
`
|
|
750
|
+
name: "OpenServiceMissingToolsetError",
|
|
751
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
752
|
+
code: 23,
|
|
753
|
+
message: `No registered toolset with id "${data.toolsetId}" exists in this environment.`
|
|
728
754
|
});
|
|
729
755
|
this.data = data;
|
|
730
756
|
}
|
|
731
|
-
},
|
|
757
|
+
}, OpenServiceDuplicateToolsetError = class extends StorybookError {
|
|
732
758
|
constructor(data) {
|
|
733
759
|
super({
|
|
734
|
-
name: "
|
|
735
|
-
category: "
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
message: "The Vitest addon setup failed.",
|
|
739
|
-
subErrors: data.errors
|
|
760
|
+
name: "OpenServiceDuplicateToolsetError",
|
|
761
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
762
|
+
code: 24,
|
|
763
|
+
message: `A toolset with id "${data.toolsetId}" is already registered. Each public toolset must be registered exactly once.`
|
|
740
764
|
});
|
|
741
765
|
this.data = data;
|
|
742
766
|
}
|
|
743
|
-
},
|
|
744
|
-
constructor() {
|
|
767
|
+
}, OpenServiceModuleGraphUnavailableError = class extends StorybookError {
|
|
768
|
+
constructor(data) {
|
|
745
769
|
super({
|
|
746
|
-
name: "
|
|
747
|
-
category: "
|
|
748
|
-
code:
|
|
749
|
-
message:
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
Please remove the \`--stats-json\` flag when running in dev mode.`
|
|
770
|
+
name: "OpenServiceModuleGraphUnavailableError",
|
|
771
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
772
|
+
code: 25,
|
|
773
|
+
message: data.reason,
|
|
774
|
+
agentFacing: !0
|
|
753
775
|
});
|
|
776
|
+
this.data = data;
|
|
754
777
|
}
|
|
755
|
-
},
|
|
756
|
-
constructor() {
|
|
778
|
+
}, OpenServiceToolsetOutputMismatchError = class extends StorybookError {
|
|
779
|
+
constructor(data) {
|
|
780
|
+
let serialized;
|
|
781
|
+
try {
|
|
782
|
+
serialized = JSON.stringify(data.issues)?.slice(0, 2e3) ?? String(data.issues);
|
|
783
|
+
} catch {
|
|
784
|
+
serialized = `${data.issues.length} issue(s) that could not be serialized`;
|
|
785
|
+
}
|
|
757
786
|
super({
|
|
758
|
-
name: "
|
|
759
|
-
category: "
|
|
760
|
-
code:
|
|
761
|
-
message:
|
|
787
|
+
name: "OpenServiceToolsetOutputMismatchError",
|
|
788
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
789
|
+
code: 26,
|
|
790
|
+
message: `Toolset output did not match its published output schema: ${serialized}`
|
|
762
791
|
});
|
|
792
|
+
this.data = data;
|
|
763
793
|
}
|
|
764
|
-
},
|
|
794
|
+
}, OpenServiceInvalidToolsetMethodIdError = class extends StorybookError {
|
|
765
795
|
constructor(data) {
|
|
766
796
|
super({
|
|
767
|
-
name: "
|
|
768
|
-
category: "
|
|
769
|
-
code:
|
|
770
|
-
message:
|
|
771
|
-
Unable to find versions of "${data.packageName}" using ${data.packageManager}
|
|
772
|
-
${data.error && `Reason: ${data.error}`}`
|
|
797
|
+
name: "OpenServiceInvalidToolsetMethodIdError",
|
|
798
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
799
|
+
code: 28,
|
|
800
|
+
message: `Invalid toolset method id "${data.methodId}". Expected exactly one separator: toolsetId.methodName.`
|
|
773
801
|
});
|
|
774
802
|
this.data = data;
|
|
775
803
|
}
|
|
776
|
-
},
|
|
804
|
+
}, OpenServiceDuplicateToolNameError = class extends StorybookError {
|
|
777
805
|
constructor(data) {
|
|
778
806
|
super({
|
|
779
|
-
name: "
|
|
780
|
-
category: "
|
|
781
|
-
code:
|
|
782
|
-
message:
|
|
783
|
-
Incompatible PostCSS configuration format detected.
|
|
784
|
-
|
|
785
|
-
Next.js uses an array-based format for plugins which is not compatible with Vite:
|
|
786
|
-
|
|
787
|
-
// ❌ Incompatible format (used by Next.js)
|
|
788
|
-
const config = {
|
|
789
|
-
plugins: ["@tailwindcss/postcss"],
|
|
790
|
-
};
|
|
791
|
-
|
|
792
|
-
Please transform your PostCSS config to use the object-based format, which is compatible with Next.js and Vite:
|
|
793
|
-
|
|
794
|
-
// ✅ Compatible format (works with Next.js and Vite)
|
|
795
|
-
const config = {
|
|
796
|
-
plugins: {
|
|
797
|
-
"@tailwindcss/postcss": {},
|
|
798
|
-
},
|
|
799
|
-
};
|
|
800
|
-
|
|
801
|
-
Original error: ${data.error.message}
|
|
802
|
-
`
|
|
807
|
+
name: "OpenServiceDuplicateToolNameError",
|
|
808
|
+
category: "CORE-COMMON" /* CORE_COMMON */,
|
|
809
|
+
code: 29,
|
|
810
|
+
message: data.transport === "mcp" ? `Derived MCP tool name "${data.derivedName}" collides between "${data.first}" and "${data.second}". Rename one toolset id or method key.` : `Derived CLI method name "${data.derivedName}" collides between "${data.first}" and "${data.second}" in the same toolset. Rename one method key.`
|
|
803
811
|
});
|
|
804
812
|
this.data = data;
|
|
805
813
|
}
|
|
806
|
-
}
|
|
814
|
+
};
|
|
815
|
+
|
|
816
|
+
// src/errors/server/package-manager.ts
|
|
817
|
+
import { dedent as dedent6 } from "ts-dedent";
|
|
818
|
+
var FindPackageVersionsError = class extends StorybookError {
|
|
807
819
|
constructor(data) {
|
|
808
820
|
super({
|
|
809
|
-
name: "
|
|
810
|
-
category: "
|
|
821
|
+
name: "FindPackageVersionsError",
|
|
822
|
+
category: "CLI" /* CLI */,
|
|
811
823
|
code: 1,
|
|
812
|
-
message:
|
|
813
|
-
Unable to
|
|
824
|
+
message: dedent6`
|
|
825
|
+
Unable to find versions of "${data.packageName}" using ${data.packageManager}
|
|
814
826
|
${data.error && `Reason: ${data.error}`}`
|
|
815
827
|
});
|
|
816
828
|
this.data = data;
|
|
@@ -824,7 +836,7 @@ function formatExecaFailureDetails(data) {
|
|
|
824
836
|
return trimmedLogs || (data.exitCode != null ? `Process exited with code ${data.exitCode}` : data.signal ? `Process was killed with signal ${data.signal}` : "No additional output was captured.");
|
|
825
837
|
}
|
|
826
838
|
function createExecaCommandFailedMessage(data) {
|
|
827
|
-
return
|
|
839
|
+
return dedent6`
|
|
828
840
|
Command failed: ${formatExecaCommand(data)}
|
|
829
841
|
|
|
830
842
|
${formatExecaFailureDetails(data)}`;
|
|
@@ -847,7 +859,7 @@ var ExecaCommandFailedError = class extends StorybookError {
|
|
|
847
859
|
category: "CLI_INIT" /* CLI_INIT */,
|
|
848
860
|
code: 10,
|
|
849
861
|
cause: data.cause,
|
|
850
|
-
message:
|
|
862
|
+
message: dedent6`
|
|
851
863
|
Failed to install dependencies using ${data.command}.
|
|
852
864
|
|
|
853
865
|
${formatExecaFailureDetails(data)}`
|
|
@@ -861,7 +873,7 @@ var ExecaCommandFailedError = class extends StorybookError {
|
|
|
861
873
|
category: "CLI_INIT" /* CLI_INIT */,
|
|
862
874
|
code: 11,
|
|
863
875
|
cause: data.cause,
|
|
864
|
-
message:
|
|
876
|
+
message: dedent6`
|
|
865
877
|
Dependency installation failed because of a version conflict.
|
|
866
878
|
|
|
867
879
|
${formatExecaFailureDetails(data)}`
|
|
@@ -875,7 +887,7 @@ var ExecaCommandFailedError = class extends StorybookError {
|
|
|
875
887
|
category: "CLI_INIT" /* CLI_INIT */,
|
|
876
888
|
code: 12,
|
|
877
889
|
cause: data.cause,
|
|
878
|
-
message:
|
|
890
|
+
message: dedent6`
|
|
879
891
|
Dependency installation failed because no package.json was found in the current directory.
|
|
880
892
|
|
|
881
893
|
${formatExecaFailureDetails(data)}`
|
|
@@ -889,7 +901,7 @@ var ExecaCommandFailedError = class extends StorybookError {
|
|
|
889
901
|
category: "CLI_INIT" /* CLI_INIT */,
|
|
890
902
|
code: 13,
|
|
891
903
|
cause: data.cause,
|
|
892
|
-
message:
|
|
904
|
+
message: dedent6`
|
|
893
905
|
pnpm blocked postinstall scripts for one or more packages.
|
|
894
906
|
|
|
895
907
|
${formatExecaFailureDetails(data)}`
|
|
@@ -903,7 +915,7 @@ var ExecaCommandFailedError = class extends StorybookError {
|
|
|
903
915
|
category: "CLI_INIT" /* CLI_INIT */,
|
|
904
916
|
code: 14,
|
|
905
917
|
cause: data.cause,
|
|
906
|
-
message:
|
|
918
|
+
message: dedent6`
|
|
907
919
|
pnpm aborted while removing the modules directory because no TTY was available.
|
|
908
920
|
|
|
909
921
|
${formatExecaFailureDetails(data)}`
|
|
@@ -917,7 +929,7 @@ var ExecaCommandFailedError = class extends StorybookError {
|
|
|
917
929
|
category: "CLI_INIT" /* CLI_INIT */,
|
|
918
930
|
code: 15,
|
|
919
931
|
cause: data.cause,
|
|
920
|
-
message:
|
|
932
|
+
message: dedent6`
|
|
921
933
|
Forkbook could not find the "${data.command}" command on your PATH.
|
|
922
934
|
|
|
923
935
|
${formatExecaFailureDetails(data)}`
|
|
@@ -931,7 +943,7 @@ var ExecaCommandFailedError = class extends StorybookError {
|
|
|
931
943
|
category: "CLI_INIT" /* CLI_INIT */,
|
|
932
944
|
code: 16,
|
|
933
945
|
cause: data.cause,
|
|
934
|
-
message:
|
|
946
|
+
message: dedent6`
|
|
935
947
|
Failed to install Playwright browser binaries.
|
|
936
948
|
|
|
937
949
|
${formatExecaFailureDetails(data)}`
|
|
@@ -941,15 +953,35 @@ var ExecaCommandFailedError = class extends StorybookError {
|
|
|
941
953
|
};
|
|
942
954
|
|
|
943
955
|
export {
|
|
944
|
-
formatIssues,
|
|
945
956
|
StorybookError,
|
|
946
957
|
Category,
|
|
958
|
+
GenerateNewProjectOnInitError,
|
|
959
|
+
MinimumReleaseAgeHandledError,
|
|
960
|
+
AddonVitestPostinstallPrerequisiteCheckError,
|
|
961
|
+
AddonVitestPostinstallWorkspaceUpdateError,
|
|
962
|
+
AddonVitestPostinstallConfigUpdateError,
|
|
963
|
+
AddonVitestPostinstallError,
|
|
947
964
|
NxProjectDetectedError,
|
|
948
965
|
MissingFrameworkFieldError,
|
|
949
966
|
InvalidFrameworkNameError,
|
|
950
967
|
CouldNotEvaluateFrameworkError,
|
|
951
968
|
ConflictingStaticDirConfigError,
|
|
952
969
|
InvalidStoriesEntryError,
|
|
970
|
+
CriticalPresetLoadError,
|
|
971
|
+
MissingBuilderError,
|
|
972
|
+
NoMatchingExportError,
|
|
973
|
+
MainFileMissingError,
|
|
974
|
+
MainFileEvaluationError,
|
|
975
|
+
GoogleFontsDownloadError,
|
|
976
|
+
GoogleFontsLoadingError,
|
|
977
|
+
NoStatsForViteDevError,
|
|
978
|
+
ViteModuleGraphSubscriptionError,
|
|
979
|
+
IncompatiblePostCssConfigError,
|
|
980
|
+
StatusTypeIdMismatchError,
|
|
981
|
+
NoFreePortError,
|
|
982
|
+
StorybookDevServerDisconnectedError,
|
|
983
|
+
SavingGlobalSettingsFileError,
|
|
984
|
+
formatIssues,
|
|
953
985
|
OpenServiceValidationError,
|
|
954
986
|
OpenServiceDuplicateRegistrationError,
|
|
955
987
|
OpenServiceMissingServiceError,
|
|
@@ -977,27 +1009,7 @@ export {
|
|
|
977
1009
|
OpenServiceToolsetOutputMismatchError,
|
|
978
1010
|
OpenServiceInvalidToolsetMethodIdError,
|
|
979
1011
|
OpenServiceDuplicateToolNameError,
|
|
980
|
-
CriticalPresetLoadError,
|
|
981
|
-
MissingBuilderError,
|
|
982
|
-
GoogleFontsDownloadError,
|
|
983
|
-
GoogleFontsLoadingError,
|
|
984
|
-
NoMatchingExportError,
|
|
985
|
-
MainFileMissingError,
|
|
986
|
-
MainFileEvaluationError,
|
|
987
|
-
StatusTypeIdMismatchError,
|
|
988
|
-
NoFreePortError,
|
|
989
|
-
StorybookDevServerDisconnectedError,
|
|
990
|
-
GenerateNewProjectOnInitError,
|
|
991
|
-
MinimumReleaseAgeHandledError,
|
|
992
|
-
AddonVitestPostinstallPrerequisiteCheckError,
|
|
993
|
-
AddonVitestPostinstallWorkspaceUpdateError,
|
|
994
|
-
AddonVitestPostinstallConfigUpdateError,
|
|
995
|
-
AddonVitestPostinstallError,
|
|
996
|
-
NoStatsForViteDevError,
|
|
997
|
-
ViteModuleGraphSubscriptionError,
|
|
998
1012
|
FindPackageVersionsError,
|
|
999
|
-
IncompatiblePostCssConfigError,
|
|
1000
|
-
SavingGlobalSettingsFileError,
|
|
1001
1013
|
formatExecaCommand,
|
|
1002
1014
|
formatExecaFailureDetails,
|
|
1003
1015
|
ExecaCommandFailedError,
|