@aussieljk/forkbook 0.0.1-20 → 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/dist/_browser-chunks/{Color-KALNKPOV.js → Color-7FO5YFB5.js} +1 -1
- package/dist/_browser-chunks/{WithTooltip-66AWY4VQ.js → WithTooltip-QWFSUQZP.js} +1 -1
- package/dist/_browser-chunks/{chunk-OWWV6YG7.js → chunk-5Z3MWCFR.js} +1 -1
- package/dist/_browser-chunks/{chunk-CX37N6FG.js → chunk-BSYOFSF6.js} +9 -9
- package/dist/_browser-chunks/{chunk-4ZGQ4YQ2.js → chunk-FAOLWWRN.js} +1 -1
- package/dist/_browser-chunks/{chunk-TRXLBGLS.js → chunk-ZIZCGWCG.js} +4 -4
- package/dist/_node-chunks/{attached-runtime-YD6HKC4B.js → attached-runtime-UC2CB4GH.js} +34 -34
- package/dist/_node-chunks/{builder-manager-UNJGYVTD.js → builder-manager-S5UUKVOR.js} +17 -19
- package/dist/_node-chunks/{chunk-QEYWG5C7.js → chunk-3335ZZIO.js} +6 -6
- package/dist/_node-chunks/{chunk-75TTPKEA.js → chunk-3D6N6P2R.js} +8 -8
- package/dist/_node-chunks/{chunk-65X3MXFT.js → chunk-3ER54PQM.js} +8 -8
- package/dist/_node-chunks/{chunk-AGLGQNTY.js → chunk-3H5C52QU.js} +6 -6
- package/dist/_node-chunks/{chunk-X6OGIC2G.js → chunk-3UI3TQ7R.js} +6 -6
- package/dist/_node-chunks/{chunk-5LFJQCYN.js → chunk-4C3ACAHV.js} +6 -6
- package/dist/_node-chunks/{chunk-J6FGP2VM.js → chunk-4UTCKJEQ.js} +7 -7
- package/dist/_node-chunks/{chunk-LAJIVWUF.js → chunk-53A5CYDK.js} +92 -17
- package/dist/_node-chunks/{chunk-HHM5X5RQ.js → chunk-53PSBDRK.js} +9 -9
- package/dist/_node-chunks/{chunk-7CWDZLIZ.js → chunk-54MO4QLB.js} +6 -6
- package/dist/_node-chunks/{chunk-QDVIQG3B.js → chunk-5CJMRQZ6.js} +6 -6
- package/dist/_node-chunks/{chunk-U54Q3F7E.js → chunk-5HOM7B4V.js} +6 -6
- package/dist/_node-chunks/{chunk-VNZF62KE.js → chunk-5QG6AXK4.js} +7 -7
- package/dist/_node-chunks/{chunk-LGHTKFSF.js → chunk-67XVZZUO.js} +6 -6
- package/dist/_node-chunks/{chunk-IIGBIVK3.js → chunk-6HQJJDLH.js} +6 -6
- package/dist/_node-chunks/chunk-6IPHWCFI.js +29 -0
- package/dist/_node-chunks/{chunk-ZZ5XMIGW.js → chunk-6XYOFBRD.js} +14 -31
- package/dist/_node-chunks/{chunk-F762PHMI.js → chunk-7IAYDGYH.js} +6 -6
- package/dist/_node-chunks/{chunk-WDANLGYN.js → chunk-7P67PUU2.js} +7 -7
- package/dist/_node-chunks/{chunk-6RYD6ENB.js → chunk-AAK5BBF2.js} +7 -7
- package/dist/_node-chunks/{chunk-VPFU5CEP.js → chunk-BGUVBOOU.js} +8 -8
- package/dist/_node-chunks/{chunk-ZLC4JSBV.js → chunk-BNGBOASQ.js} +6 -6
- package/dist/_node-chunks/{chunk-2GA4VQCS.js → chunk-BWZWCVVH.js} +9 -9
- package/dist/_node-chunks/{chunk-MWKSSYPG.js → chunk-C6HQ6WLU.js} +6 -6
- package/dist/_node-chunks/chunk-CJHRH777.js +20 -0
- package/dist/_node-chunks/{chunk-3ZOSFS7G.js → chunk-COEW4ORP.js} +6 -6
- package/dist/_node-chunks/{chunk-LCNF6BLP.js → chunk-CVHDAEDZ.js} +7 -7
- package/dist/_node-chunks/{chunk-ZX32M4O7.js → chunk-CXGOQNGI.js} +7 -7
- package/dist/_node-chunks/chunk-D4XTQWRM.js +11 -0
- package/dist/_node-chunks/{chunk-EFCBUWOB.js → chunk-D5V6CZ6U.js} +7 -7
- package/dist/_node-chunks/{chunk-CPDP5SQS.js → chunk-DCTXJ4TT.js} +9 -9
- package/dist/_node-chunks/{chunk-LNGSV5UI.js → chunk-DP6WFY3D.js} +7 -7
- package/dist/_node-chunks/{chunk-DQEUNKLX.js → chunk-E23GDXG6.js} +9 -85
- package/dist/_node-chunks/{chunk-SFXFL4TP.js → chunk-E3ZFMURC.js} +8 -8
- package/dist/_node-chunks/{chunk-N4LNGTYL.js → chunk-E6O3NA44.js} +7 -7
- package/dist/_node-chunks/{chunk-UZH2V3WY.js → chunk-ECS3WDOU.js} +7 -7
- package/dist/_node-chunks/{chunk-N5WU4BEY.js → chunk-FB5YJWOH.js} +6 -6
- package/dist/_node-chunks/{chunk-XVSUIOZA.js → chunk-FCK5FM6D.js} +7 -7
- package/dist/_node-chunks/{chunk-3CQI3JH5.js → chunk-FJUGPEJK.js} +6 -6
- package/dist/_node-chunks/{chunk-Z665R6AF.js → chunk-FPYXI76E.js} +7 -7
- package/dist/_node-chunks/{chunk-PJRPETSU.js → chunk-GEWVOY3F.js} +6 -6
- package/dist/_node-chunks/{chunk-FC3V4KZO.js → chunk-GHZ44BFB.js} +7 -7
- package/dist/_node-chunks/{chunk-WTPHQ2NG.js → chunk-GJMFISS3.js} +6 -6
- package/dist/_node-chunks/{chunk-33I6AQU7.js → chunk-GK2Y2RFX.js} +6 -6
- package/dist/_node-chunks/{chunk-7M3TOE4F.js → chunk-GP6YBA2R.js} +6 -6
- package/dist/_node-chunks/{chunk-KAALBGRE.js → chunk-GQUFGJ4D.js} +6 -6
- package/dist/_node-chunks/{chunk-MC4BFUVH.js → chunk-H4CRQDTK.js} +6 -6
- package/dist/_node-chunks/{chunk-IENHXJVB.js → chunk-HCDG54OG.js} +7 -7
- package/dist/_node-chunks/{chunk-2CNN3CRI.js → chunk-HGJMP4EI.js} +8 -8
- package/dist/_node-chunks/chunk-HSX6BDBA.js +18 -0
- package/dist/_node-chunks/{chunk-WMZJ2WK4.js → chunk-IPFPWMT5.js} +1255 -291
- package/dist/_node-chunks/{chunk-FXW52X4U.js → chunk-KRIOC4WF.js} +8 -8
- package/dist/_node-chunks/{chunk-NRXCMSAI.js → chunk-KUL2MJ6N.js} +6 -6
- package/dist/_node-chunks/{chunk-DAYTIH6Z.js → chunk-LUR6QTYB.js} +8 -8
- package/dist/_node-chunks/{chunk-2VJHCGAK.js → chunk-LYS7TI35.js} +8 -8
- package/dist/_node-chunks/{chunk-AVHJZUTH.js → chunk-MDTXL6SN.js} +8 -8
- package/dist/_node-chunks/{chunk-EKYNX5NX.js → chunk-MIIPXT4S.js} +8 -8
- package/dist/_node-chunks/{chunk-WYRBOMQF.js → chunk-MLWGAA2I.js} +8 -7
- package/dist/_node-chunks/{chunk-XF7H5GZM.js → chunk-MWUGCUB5.js} +8 -8
- package/dist/_node-chunks/{chunk-SPAHK37C.js → chunk-MX5MVLEK.js} +6 -6
- package/dist/_node-chunks/{chunk-25A7444H.js → chunk-N44UIGCO.js} +6 -6
- package/dist/_node-chunks/{chunk-JXZONVHW.js → chunk-NP2JHOFY.js} +7 -7
- package/dist/_node-chunks/{chunk-6FWJWEAG.js → chunk-OMNGOPNG.js} +7 -7
- package/dist/_node-chunks/{chunk-WZBMPROH.js → chunk-OO2GTHUF.js} +6 -6
- package/dist/_node-chunks/{chunk-ZN6YOIB2.js → chunk-PC57BIYZ.js} +7 -7
- package/dist/_node-chunks/{chunk-SUQ4OM7Y.js → chunk-PHWMAF5C.js} +6 -6
- package/dist/_node-chunks/{chunk-CJDYU653.js → chunk-PLIQQETC.js} +7 -7
- package/dist/_node-chunks/{chunk-B2EEX2SZ.js → chunk-QMYCIS2U.js} +6 -6
- package/dist/_node-chunks/{chunk-4BE3LRIQ.js → chunk-QZIDK3GX.js} +13 -14
- package/dist/_node-chunks/{chunk-6NLQCV6A.js → chunk-ROJ6RSIJ.js} +7 -7
- package/dist/_node-chunks/{chunk-NZWK62R5.js → chunk-S2NB6QEG.js} +30 -30
- package/dist/_node-chunks/{chunk-GWT4HQZU.js → chunk-S6VCOSQS.js} +6 -6
- package/dist/_node-chunks/{chunk-6OQKMJJA.js → chunk-SEVOOOB2.js} +10 -10
- package/dist/_node-chunks/{chunk-S7RGKBGT.js → chunk-SFT6ZAVN.js} +6 -6
- package/dist/_node-chunks/{chunk-AP4HJ3I3.js → chunk-SXBUK4F6.js} +7 -7
- package/dist/_node-chunks/{chunk-XUZB4FIX.js → chunk-TGF6Q66I.js} +8 -8
- package/dist/_node-chunks/{chunk-AOYLA323.js → chunk-TGFHWGGT.js} +6 -6
- package/dist/_node-chunks/{chunk-GFEH7IBP.js → chunk-TTLSBLPQ.js} +8 -8
- package/dist/_node-chunks/{chunk-VIMGLCNZ.js → chunk-UUAEW2AR.js} +6 -6
- package/dist/_node-chunks/{chunk-JOX7OETB.js → chunk-VQHM66NL.js} +8 -8
- package/dist/_node-chunks/{chunk-ZEYZWDOS.js → chunk-VSTTY3TM.js} +6 -6
- package/dist/_node-chunks/{chunk-N25CZ3RC.js → chunk-XDBSAFUB.js} +7 -7
- package/dist/_node-chunks/{chunk-EG2WLN5V.js → chunk-XTQQGAUZ.js} +7 -7
- package/dist/_node-chunks/{chunk-X2GGQZIN.js → chunk-YMJVSFJT.js} +6 -6
- package/dist/_node-chunks/{chunk-OBPVOYJA.js → chunk-YXEKWVJQ.js} +7 -7
- package/dist/_node-chunks/{chunk-L52VGA36.js → chunk-Z6CUUWJO.js} +7 -7
- package/dist/_node-chunks/{chunk-GEJBTN76.js → chunk-ZAIGR7EV.js} +9 -17
- package/dist/_node-chunks/{chunk-OMMQME7G.js → chunk-ZCFXEFR6.js} +14 -14
- package/dist/_node-chunks/{chunk-DO3CPQAZ.js → chunk-ZHUBOYOD.js} +6 -6
- package/dist/_node-chunks/{chunk-IBLUURAJ.js → chunk-ZHUBTBP2.js} +8 -8
- package/dist/_node-chunks/{chunk-JR7ZCQ77.js → chunk-ZSTIFZHY.js} +6 -6
- package/dist/_node-chunks/dist-TRTHRODT.js +16 -0
- package/dist/_node-chunks/dist-XPLJ5T4W.js +27 -0
- package/dist/_node-chunks/{local-runtime-4ETW6QTI.js → local-runtime-AC7MOWYK.js} +21 -21
- package/dist/_node-chunks/{mdx-plugin-OOYTYMVU.js → mdx-plugin-ZW26VGEP.js} +13 -13
- package/dist/_node-chunks/{monorepo-3AWUYNFD.js → monorepo-T2KZK62Q.js} +11 -11
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-ORY3BAP5.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-2CWUUF6H.js} +11 -11
- package/dist/_node-chunks/optimized-tests-4AK3PFSX.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-AY4DE7ME.js → pattern-copy-play-CMRGEXHM.js} +9 -9
- package/dist/_node-chunks/postinstallAddon-OUQENFYO.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-FGVC633L.js → rehype-external-links-LHOAIJ2E.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-2AZLMC5G.js → rehype-slug-K54MMYY6.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-QI3YR6CU.js → relaxed-limits-TTL4PWH7.js} +11 -11
- package/dist/_node-chunks/{run-QJJ4FOF3.js → run-6DXBB5F7.js} +28 -26
- package/dist/_node-chunks/{run-WFJZYNZN.js → run-BMTV5ZAO.js} +17 -17
- package/dist/_node-chunks/{setup-V5CRAJMV.js → setup-FDPYW25Y.js} +8 -8
- package/dist/_node-chunks/{vitest.config.4.template-LECBBF3L.js → vitest.config.4.template-2TCFWAAI.js} +7 -7
- package/dist/addon-a11y/manager.js +3 -3
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-comments/manager.js +2 -2
- package/dist/addon-comments/preset.js +43 -15
- package/dist/addon-comments/preview.js +1 -1
- package/dist/addon-docs/blocks.js +9 -9
- package/dist/addon-docs/manager.js +2 -2
- package/dist/addon-docs/preset.js +10 -10
- package/dist/addon-links/preview.d.ts +1 -1
- package/dist/addon-mcp/preset.js +39 -39
- package/dist/addon-mcp/preview.js +1 -1
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +2 -2
- package/dist/addon-themes/postinstall.js +7 -7
- package/dist/addon-vitest/constants.js +8 -8
- package/dist/addon-vitest/manager.js +4 -4
- package/dist/addon-vitest/node/coverage-reporter.js +8 -8
- package/dist/addon-vitest/node/vitest.js +18 -18
- package/dist/addon-vitest/postinstall.js +10 -10
- package/dist/addon-vitest/preset.js +18 -18
- package/dist/addon-vitest/vitest-plugin/global-setup.js +8 -8
- package/dist/addon-vitest/vitest-plugin/index.js +18 -18
- package/dist/babel/index.js +30582 -31
- package/dist/bin/core.js +60 -71
- package/dist/bin/dispatcher.js +10 -10
- package/dist/bin/loader.js +8 -8
- package/dist/builder-next/index.js +9 -9
- package/dist/builder-vite/index.js +15 -15
- package/dist/builder-vite/preset.js +13 -13
- package/dist/{chunk-ge-rSPy0.d.ts → chunk-B53gRJBs.d.ts} +22 -4
- package/dist/{chunk-Bubi-WAs.d.ts → chunk-BspNQvZn.d.ts} +1 -6
- package/dist/{chunk-OksNJcvJ.d.ts → chunk-CMx6bGAU.d.ts} +1 -1
- package/dist/{chunk-BsO65uOb.d.ts → chunk-CRmUwbkb.d.ts} +1 -1
- package/dist/{chunk-D2CQlXaR.d.ts → chunk-bhl-7rRD.d.ts} +28 -1
- package/dist/cli/index.d.ts +3 -39
- package/dist/cli/index.js +37 -282
- package/dist/cli/skills/content/index.d.ts +1 -1
- package/dist/cli/skills/content/index.js +1 -1
- 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 +2 -2
- package/dist/cli/tools/sdk/index.js +18 -18
- package/dist/cli-commands/bin/index.js +7 -7
- package/dist/common/index.d.ts +9 -9
- package/dist/common/index.js +89 -91
- package/dist/components/index.js +29 -29
- package/dist/core-events/index.d.ts +12 -5
- package/dist/core-events/index.js +1 -5
- package/dist/core-server/index.d.ts +41 -13
- package/dist/core-server/index.js +247 -98
- package/dist/core-server/presets/common-manager.js +9 -9
- package/dist/core-server/presets/common-override-preset.js +10 -10
- package/dist/core-server/presets/common-preset.js +39 -39
- package/dist/create/bin/index.js +7 -7
- package/dist/create/index.js +15 -15
- package/dist/csf/index.js +6 -7
- package/dist/csf-tools/index.js +13 -13
- package/dist/instrumenter/index.d.ts +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-D6tkG2NO.js → globals-runtime-BJ6EZqH7.js} +6 -6
- package/dist/manager/_manager-chunks/{globals-runtime-BnWjPJUH.js → globals-runtime-BfXaq_CP.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-Bv2PBsx6.js → globals-runtime-BkSn_Jpe.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-D9zzVzSP.js → globals-runtime-Cisw9IIE.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-DafcXCKU.js → globals-runtime-DpvE_zRs.js} +80 -84
- package/dist/manager/_manager-chunks/{globals-runtime-BDkYPr00.js → globals-runtime-wV08sCKl.js} +2 -2
- package/dist/manager/_manager-chunks/{runtime-DJlTd1qE.js → runtime-4OQZWibO.js} +134 -134
- package/dist/manager/_manager-chunks/{runtime-mjv_40eH.js → runtime-BYxbyNm0.js} +4 -4
- package/dist/manager/_manager-chunks/{runtime-BuPcYKCO.js → runtime-CM4Z8aKR.js} +0 -2
- package/dist/manager/_manager-chunks/{runtime-CGaGp83p.js → runtime-Cjo1UL1u.js} +2 -2
- package/dist/manager/_manager-chunks/{runtime-BhfRBP4G.js → runtime-Cx1-wr6J.js} +1 -1
- package/dist/manager/_manager-chunks/{runtime-CXROgt6G.js → runtime-Cxe_uJRb.js} +8 -8
- package/dist/manager/_manager-chunks/{runtime-DmpQacrn.js → runtime-D702FFTO.js} +5 -7
- package/dist/manager/_manager-chunks/{runtime-Dc6lf19c.js → runtime-DnWFp6Zw.js} +3 -3
- package/dist/manager/_manager-chunks/{runtime-DTUm5K9J.js → runtime-DoYPE6g6.js} +24 -24
- package/dist/manager/_manager-chunks/{runtime-Cn5PJT3-.js → runtime-sppa-0ll.js} +2 -2
- package/dist/manager/globals-runtime.js +1 -1
- package/dist/manager/runtime.js +1 -1
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +1 -1
- package/dist/manager-errors.d.ts +1 -1
- package/dist/mcp/index.d.ts +10 -10
- package/dist/mcp/index.js +10 -10
- package/dist/mocking-utils/index.js +9 -9
- package/dist/next/index.js +9 -9
- package/dist/nextjs-vite/node/index.js +7 -7
- package/dist/nextjs-vite/preset.js +11 -11
- package/dist/nextjs-vite/vite-plugin/index.js +7 -7
- package/dist/nextjs-vite-plugin/index.js +8 -8
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
- package/dist/node-logger/index.d.ts +8 -2
- package/dist/node-logger/index.js +9 -9
- package/dist/oxc-parser/index.js +10 -10
- package/dist/oxc-parser/worker.js +10 -10
- package/dist/preview/_chunks/{runtime-C88AzFBv.js → runtime-Cbq5WjbL.js} +2 -2
- package/dist/preview/_chunks/{runtime-Cpzxe5eK.js → runtime-DDEUZops.js} +12 -16
- package/dist/preview/_chunks/{runtime-BiYuZt-X.js → runtime-DsjyhLpG.js} +8 -6
- package/dist/preview/_chunks/{runtime-MYVHRAoo.js → runtime-Dwi6NFcX.js} +2 -2
- package/dist/preview/runtime.js +1 -1
- package/dist/preview-api/index.d.ts +2 -2
- package/dist/preview-api/index.js +1 -1
- package/dist/preview-errors.d.ts +1 -1
- package/dist/react/docgen/docgen-worker.js +11 -11
- package/dist/react/preset.js +13 -13
- package/dist/react-native/bin/get-stories.js +8 -8
- package/dist/react-native/metro/node.js +10 -10
- package/dist/react-native/metro/withForkbook.js +11 -11
- package/dist/react-native/scripts/generate.js +8 -8
- package/dist/react-vite/node/index.js +7 -7
- package/dist/react-vite/preset.js +8 -8
- package/dist/server-errors.d.ts +1 -1
- package/dist/server-errors.js +9 -9
- package/dist/shared/open-service/index.d.ts +1 -1
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
- package/dist/telemetry/index.js +11 -11
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/_node-chunks/chunk-CGVVOUBC.js +0 -18
- package/dist/_node-chunks/chunk-QQNRWEHL.js +0 -972
- package/dist/_node-chunks/chunk-RAIWLNFA.js +0 -30606
- package/dist/_node-chunks/chunk-VYCVBW5Q.js +0 -92
- package/dist/_node-chunks/chunk-WYCITRIE.js +0 -11
- package/dist/_node-chunks/chunk-ZHRCL7PG.js +0 -148
- package/dist/_node-chunks/dist-HBFOS25E.js +0 -16
- package/dist/_node-chunks/dist-Q2XNFC24.js +0 -27
- package/dist/_node-chunks/optimized-tests-DOKSUJAM.js +0 -22
- package/dist/_node-chunks/postinstallAddon-L46G75CD.js +0 -20
- package/dist/chunk-CDMZhRke.d.ts +0 -30
|
@@ -1,10 +1,10 @@
|
|
|
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
|
|
@@ -13,77 +13,76 @@ import {
|
|
|
13
13
|
fromMarkdown,
|
|
14
14
|
mdxFromMarkdown,
|
|
15
15
|
mdxjs
|
|
16
|
-
} from "../_node-chunks/chunk-
|
|
16
|
+
} from "../_node-chunks/chunk-ZHUBTBP2.js";
|
|
17
17
|
import {
|
|
18
18
|
require_dist
|
|
19
|
-
} from "../_node-chunks/chunk-
|
|
19
|
+
} from "../_node-chunks/chunk-MWUGCUB5.js";
|
|
20
20
|
import {
|
|
21
21
|
BananaSlug
|
|
22
|
-
} from "../_node-chunks/chunk-
|
|
22
|
+
} from "../_node-chunks/chunk-FB5YJWOH.js";
|
|
23
23
|
import {
|
|
24
24
|
withRouteDepth
|
|
25
|
-
} from "../_node-chunks/chunk-
|
|
25
|
+
} from "../_node-chunks/chunk-VQHM66NL.js";
|
|
26
26
|
import {
|
|
27
27
|
createBasePathMount,
|
|
28
28
|
isForwardedForOrigin,
|
|
29
29
|
resolveBasePath
|
|
30
|
-
} from "../_node-chunks/chunk-
|
|
30
|
+
} from "../_node-chunks/chunk-OMNGOPNG.js";
|
|
31
31
|
import {
|
|
32
32
|
debounce
|
|
33
|
-
} from "../_node-chunks/chunk-
|
|
33
|
+
} from "../_node-chunks/chunk-CXGOQNGI.js";
|
|
34
34
|
import {
|
|
35
35
|
require_lib
|
|
36
|
-
} from "../_node-chunks/chunk-
|
|
36
|
+
} from "../_node-chunks/chunk-XDBSAFUB.js";
|
|
37
37
|
import {
|
|
38
38
|
Parser,
|
|
39
39
|
init_acorn,
|
|
40
40
|
require_acorn_jsx
|
|
41
|
-
} from "../_node-chunks/chunk-
|
|
41
|
+
} from "../_node-chunks/chunk-DP6WFY3D.js";
|
|
42
42
|
import {
|
|
43
43
|
isTelemetryModuleEnabled,
|
|
44
44
|
telemetry,
|
|
45
45
|
withSpan
|
|
46
|
-
} from "../_node-chunks/chunk-
|
|
46
|
+
} from "../_node-chunks/chunk-KRIOC4WF.js";
|
|
47
47
|
import {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
isCsfFactoryPreview,
|
|
49
|
+
readConfig
|
|
50
|
+
} from "../_node-chunks/chunk-3D6N6P2R.js";
|
|
51
|
+
import {
|
|
52
|
+
require_src
|
|
53
|
+
} from "../_node-chunks/chunk-E3ZFMURC.js";
|
|
54
|
+
import "../_node-chunks/chunk-D5V6CZ6U.js";
|
|
55
|
+
import {
|
|
56
|
+
isClaudePreviewLaunch
|
|
57
|
+
} from "../_node-chunks/chunk-CJHRH777.js";
|
|
57
58
|
import {
|
|
58
59
|
CLAUDE_PREVIEW_AGENT_NAME
|
|
59
|
-
} from "../_node-chunks/chunk-
|
|
60
|
-
import "../_node-chunks/chunk-CJDYU653.js";
|
|
61
|
-
import "../_node-chunks/chunk-CGVVOUBC.js";
|
|
60
|
+
} from "../_node-chunks/chunk-S6VCOSQS.js";
|
|
62
61
|
import {
|
|
63
|
-
|
|
64
|
-
} from "../_node-chunks/chunk-
|
|
65
|
-
import "../_node-chunks/chunk-
|
|
66
|
-
import "../_node-chunks/chunk-75TTPKEA.js";
|
|
62
|
+
frameworkToRendererMap
|
|
63
|
+
} from "../_node-chunks/chunk-PLIQQETC.js";
|
|
64
|
+
import "../_node-chunks/chunk-HSX6BDBA.js";
|
|
67
65
|
import {
|
|
68
|
-
|
|
69
|
-
} from "../_node-chunks/chunk-
|
|
70
|
-
import "../_node-chunks/chunk-
|
|
71
|
-
import "../_node-chunks/chunk-6NLQCV6A.js";
|
|
72
|
-
import "../_node-chunks/chunk-7M3TOE4F.js";
|
|
66
|
+
detectAgent
|
|
67
|
+
} from "../_node-chunks/chunk-YXEKWVJQ.js";
|
|
68
|
+
import "../_node-chunks/chunk-SFT6ZAVN.js";
|
|
73
69
|
import {
|
|
70
|
+
defaultConfigDir,
|
|
71
|
+
extractFrameworkPackageName,
|
|
72
|
+
findConfigFile,
|
|
74
73
|
resolveImport,
|
|
75
|
-
supportedExtensions
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
import "../_node-chunks/chunk-
|
|
79
|
-
import
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
import "../_node-chunks/chunk-
|
|
83
|
-
import "../_node-chunks/chunk-
|
|
74
|
+
supportedExtensions,
|
|
75
|
+
userOrAutoTitleFromSpecifier
|
|
76
|
+
} from "../_node-chunks/chunk-IPFPWMT5.js";
|
|
77
|
+
import "../_node-chunks/chunk-CVHDAEDZ.js";
|
|
78
|
+
import "../_node-chunks/chunk-C6HQ6WLU.js";
|
|
79
|
+
import "../_node-chunks/chunk-ROJ6RSIJ.js";
|
|
80
|
+
import "../_node-chunks/chunk-LYS7TI35.js";
|
|
81
|
+
import "../_node-chunks/chunk-GP6YBA2R.js";
|
|
82
|
+
import "../_node-chunks/chunk-6IPHWCFI.js";
|
|
84
83
|
import {
|
|
85
84
|
logger
|
|
86
|
-
} from "../_node-chunks/chunk-
|
|
85
|
+
} from "../_node-chunks/chunk-MDTXL6SN.js";
|
|
87
86
|
import {
|
|
88
87
|
ChangeDetectionFailureError,
|
|
89
88
|
ChangeDetectionUnavailableError,
|
|
@@ -127,88 +126,88 @@ import {
|
|
|
127
126
|
useStatics,
|
|
128
127
|
withTelemetry,
|
|
129
128
|
writeManifests
|
|
130
|
-
} from "../_node-chunks/chunk-
|
|
129
|
+
} from "../_node-chunks/chunk-S2NB6QEG.js";
|
|
131
130
|
import {
|
|
132
131
|
UniversalStore
|
|
133
|
-
} from "../_node-chunks/chunk-
|
|
132
|
+
} from "../_node-chunks/chunk-NP2JHOFY.js";
|
|
134
133
|
import {
|
|
135
134
|
buildStoryPathMap,
|
|
136
135
|
urlPathDepth
|
|
137
|
-
} from "../_node-chunks/chunk-
|
|
136
|
+
} from "../_node-chunks/chunk-GEWVOY3F.js";
|
|
138
137
|
import {
|
|
139
138
|
init_build,
|
|
140
139
|
parse
|
|
141
|
-
} from "../_node-chunks/chunk-
|
|
140
|
+
} from "../_node-chunks/chunk-4UTCKJEQ.js";
|
|
142
141
|
import {
|
|
143
142
|
joinBasePath,
|
|
144
143
|
normalizeBasePath
|
|
145
|
-
} from "../_node-chunks/chunk-
|
|
146
|
-
import "../_node-chunks/chunk-
|
|
144
|
+
} from "../_node-chunks/chunk-PHWMAF5C.js";
|
|
145
|
+
import "../_node-chunks/chunk-4C3ACAHV.js";
|
|
147
146
|
import {
|
|
148
147
|
registerToolset
|
|
149
|
-
} from "../_node-chunks/chunk-
|
|
150
|
-
import "../_node-chunks/chunk-
|
|
151
|
-
import "../_node-chunks/chunk-
|
|
152
|
-
import "../_node-chunks/chunk-
|
|
148
|
+
} from "../_node-chunks/chunk-3ER54PQM.js";
|
|
149
|
+
import "../_node-chunks/chunk-5QG6AXK4.js";
|
|
150
|
+
import "../_node-chunks/chunk-7P67PUU2.js";
|
|
151
|
+
import "../_node-chunks/chunk-6HQJJDLH.js";
|
|
153
152
|
import {
|
|
154
153
|
STORY_FILE_TEST_REGEXP,
|
|
155
154
|
getStoryImportPathFromEntry
|
|
156
|
-
} from "../_node-chunks/chunk-
|
|
155
|
+
} from "../_node-chunks/chunk-53A5CYDK.js";
|
|
156
|
+
import {
|
|
157
|
+
Tag
|
|
158
|
+
} from "../_node-chunks/chunk-UUAEW2AR.js";
|
|
157
159
|
import {
|
|
158
160
|
getService,
|
|
159
161
|
registerService,
|
|
160
162
|
writeOpenServiceStaticFiles
|
|
161
|
-
} from "../_node-chunks/chunk-
|
|
163
|
+
} from "../_node-chunks/chunk-E23GDXG6.js";
|
|
162
164
|
import {
|
|
163
165
|
Channel,
|
|
164
166
|
describeService,
|
|
165
167
|
getRegisteredServices,
|
|
166
168
|
listServices
|
|
167
|
-
} from "../_node-chunks/chunk-
|
|
169
|
+
} from "../_node-chunks/chunk-53PSBDRK.js";
|
|
168
170
|
import {
|
|
169
171
|
isEqual
|
|
170
|
-
} from "../_node-chunks/chunk-
|
|
171
|
-
import "../_node-chunks/chunk-
|
|
172
|
-
import "../_node-chunks/chunk-
|
|
173
|
-
import "../_node-chunks/chunk-
|
|
174
|
-
import
|
|
175
|
-
|
|
176
|
-
} from "../_node-chunks/chunk-VIMGLCNZ.js";
|
|
177
|
-
import "../_node-chunks/chunk-XUZB4FIX.js";
|
|
178
|
-
import "../_node-chunks/chunk-AP4HJ3I3.js";
|
|
172
|
+
} from "../_node-chunks/chunk-XTQQGAUZ.js";
|
|
173
|
+
import "../_node-chunks/chunk-H4CRQDTK.js";
|
|
174
|
+
import "../_node-chunks/chunk-54MO4QLB.js";
|
|
175
|
+
import "../_node-chunks/chunk-3335ZZIO.js";
|
|
176
|
+
import "../_node-chunks/chunk-TGF6Q66I.js";
|
|
177
|
+
import "../_node-chunks/chunk-SXBUK4F6.js";
|
|
179
178
|
import {
|
|
180
179
|
up2 as up
|
|
181
|
-
} from "../_node-chunks/chunk-
|
|
180
|
+
} from "../_node-chunks/chunk-MX5MVLEK.js";
|
|
182
181
|
import {
|
|
183
182
|
invariant
|
|
184
|
-
} from "../_node-chunks/chunk-
|
|
183
|
+
} from "../_node-chunks/chunk-GQUFGJ4D.js";
|
|
185
184
|
import {
|
|
186
185
|
resolvePackageDir,
|
|
187
186
|
safeResolveModule
|
|
188
|
-
} from "../_node-chunks/chunk-
|
|
189
|
-
import "../_node-chunks/chunk-
|
|
187
|
+
} from "../_node-chunks/chunk-PC57BIYZ.js";
|
|
188
|
+
import "../_node-chunks/chunk-7IAYDGYH.js";
|
|
190
189
|
import {
|
|
191
190
|
StorybookError
|
|
192
|
-
} from "../_node-chunks/chunk-
|
|
191
|
+
} from "../_node-chunks/chunk-HGJMP4EI.js";
|
|
193
192
|
import {
|
|
194
193
|
require_picocolors
|
|
195
|
-
} from "../_node-chunks/chunk-
|
|
194
|
+
} from "../_node-chunks/chunk-HCDG54OG.js";
|
|
196
195
|
import {
|
|
197
196
|
storyIndexPathToAbsolutePath
|
|
198
|
-
} from "../_node-chunks/chunk-
|
|
199
|
-
import "../_node-chunks/chunk-
|
|
197
|
+
} from "../_node-chunks/chunk-AAK5BBF2.js";
|
|
198
|
+
import "../_node-chunks/chunk-ZHUBOYOD.js";
|
|
200
199
|
import {
|
|
201
200
|
slash
|
|
202
|
-
} from "../_node-chunks/chunk-
|
|
201
|
+
} from "../_node-chunks/chunk-3H5C52QU.js";
|
|
203
202
|
import {
|
|
204
203
|
glob
|
|
205
|
-
} from "../_node-chunks/chunk-
|
|
206
|
-
import "../_node-chunks/chunk-
|
|
204
|
+
} from "../_node-chunks/chunk-TTLSBLPQ.js";
|
|
205
|
+
import "../_node-chunks/chunk-Z6CUUWJO.js";
|
|
207
206
|
import {
|
|
208
207
|
__commonJS,
|
|
209
208
|
__require,
|
|
210
209
|
__toESM
|
|
211
|
-
} from "../_node-chunks/chunk-
|
|
210
|
+
} from "../_node-chunks/chunk-YMJVSFJT.js";
|
|
212
211
|
|
|
213
212
|
// ../../node_modules/@discoveryjs/json-ext/package.json
|
|
214
213
|
var require_package = __commonJS({
|
|
@@ -1475,9 +1474,7 @@ import { logger as logger2 } from "@aussieljk/forkbook/internal/node-logger";
|
|
|
1475
1474
|
async function copyAllStaticFilesRelativeToMain(staticDirs, outputDir, configDir) {
|
|
1476
1475
|
return staticDirs?.reduce(async (acc, dir) => {
|
|
1477
1476
|
await acc;
|
|
1478
|
-
let { staticPath: from, targetEndpoint: to } = mapStaticDir(dir, configDir), targetPath = join(outputDir, to), skipPaths = ["index.html", "iframe.html", "index.json"
|
|
1479
|
-
(f) => resolve(outputDir, f)
|
|
1480
|
-
);
|
|
1477
|
+
let { staticPath: from, targetEndpoint: to } = mapStaticDir(dir, configDir), targetPath = join(outputDir, to), skipPaths = ["index.html", "iframe.html", "index.json"].map((f) => resolve(outputDir, f));
|
|
1481
1478
|
from.includes("node_modules") || logger2.info(
|
|
1482
1479
|
`Copying static files: ${import_picocolors.default.cyan(print(from))} at ${import_picocolors.default.cyan(print(targetPath))}`
|
|
1483
1480
|
), await cp(from, targetPath, {
|
|
@@ -1547,7 +1544,7 @@ function watchStorySpecifiers(specifiers, options, onInvalidate) {
|
|
|
1547
1544
|
// files can be e.g. '**/foo/*/*.js' so we just want the last bit,
|
|
1548
1545
|
// because the directory could already be within the files part (e.g. './x/foo/bar')
|
|
1549
1546
|
basename(specifier.files)
|
|
1550
|
-
), { glob: glob2 } = await import("../_node-chunks/dist-
|
|
1547
|
+
), { glob: glob2 } = await import("../_node-chunks/dist-XPLJ5T4W.js");
|
|
1551
1548
|
(await glob2(slash(dirGlob), {
|
|
1552
1549
|
...commonGlobOptions(dirGlob),
|
|
1553
1550
|
expandDirectories: !1
|
|
@@ -1900,11 +1897,11 @@ import {
|
|
|
1900
1897
|
getInterpretedFile,
|
|
1901
1898
|
getProjectRoot,
|
|
1902
1899
|
isWebContainer,
|
|
1903
|
-
defaultConfigDir,
|
|
1900
|
+
defaultConfigDir as defaultConfigDir2,
|
|
1904
1901
|
loadAllPresets as loadAllPresets2,
|
|
1905
1902
|
loadMainConfig as loadMainConfig2,
|
|
1906
1903
|
resolveAddonName as resolveAddonName2,
|
|
1907
|
-
|
|
1904
|
+
resolvePathInForkbookCache as resolvePathInForkbookCache2,
|
|
1908
1905
|
validateFrameworkName,
|
|
1909
1906
|
versions
|
|
1910
1907
|
} from "@aussieljk/forkbook/internal/common";
|
|
@@ -2095,7 +2092,7 @@ import { CHANGE_DETECTION_STATUS_TYPE_ID } from "@aussieljk/forkbook/internal/ty
|
|
|
2095
2092
|
// src/core-server/change-detection/IndexBaselineService.ts
|
|
2096
2093
|
import {
|
|
2097
2094
|
createFileSystemCache,
|
|
2098
|
-
|
|
2095
|
+
resolvePathInForkbookCache
|
|
2099
2096
|
} from "@aussieljk/forkbook/internal/common";
|
|
2100
2097
|
var DEFAULT_CACHE_KEY = "index-baseline";
|
|
2101
2098
|
function extractBaselineEntryIds(storyIndex) {
|
|
@@ -2110,7 +2107,7 @@ var IndexBaselineService = class {
|
|
|
2110
2107
|
this.baselineEntryIds = /* @__PURE__ */ new Set();
|
|
2111
2108
|
this.syncInFlight = !1;
|
|
2112
2109
|
this.cache = options.cache ?? createFileSystemCache({
|
|
2113
|
-
basePath:
|
|
2110
|
+
basePath: resolvePathInForkbookCache(DEFAULT_CACHE_KEY),
|
|
2114
2111
|
ns: "storybook"
|
|
2115
2112
|
});
|
|
2116
2113
|
}
|
|
@@ -3033,8 +3030,6 @@ var CORE_EVENT_SENDERS = {
|
|
|
3033
3030
|
[events.SAVE_STORY_RESPONSE]: "server",
|
|
3034
3031
|
[events.ARGTYPES_INFO_REQUEST]: "manager",
|
|
3035
3032
|
[events.ARGTYPES_INFO_RESPONSE]: "preview",
|
|
3036
|
-
[events.GHOST_STORIES_REQUEST]: "manager",
|
|
3037
|
-
[events.GHOST_STORIES_RESPONSE]: "server",
|
|
3038
3033
|
[events.AI_SETUP_ANALYTICS_RESPONSE]: "server",
|
|
3039
3034
|
[events.AI_SETUP_ANALYTICS_REQUEST]: "server",
|
|
3040
3035
|
[events.OPEN_IN_EDITOR_REQUEST]: "manager",
|
|
@@ -3598,7 +3593,7 @@ async function buildDevStandalone(options) {
|
|
|
3598
3593
|
port,
|
|
3599
3594
|
options.host,
|
|
3600
3595
|
options.https ? "https" : "http"
|
|
3601
|
-
), cacheOutputDir =
|
|
3596
|
+
), cacheOutputDir = resolvePathInForkbookCache2("public", cacheKey), outputDir = resolve7(options.outputDir || cacheOutputDir);
|
|
3602
3597
|
options.smokeTest && (outputDir = cacheOutputDir), options.port = port, options.versionCheck = versionCheck, options.configType = "DEVELOPMENT", options.configDir = configDir, options.cacheKey = cacheKey, options.outputDir = outputDir, options.localAddress = localAddress, options.networkAddress = networkAddress;
|
|
3603
3598
|
let config = await loadMainConfig2(options), { core, framework } = config;
|
|
3604
3599
|
options.basePath = resolveBasePath(
|
|
@@ -3646,7 +3641,7 @@ async function buildDevStandalone(options) {
|
|
|
3646
3641
|
if (resolvedPreviewBuilder.includes("builder-vite")) {
|
|
3647
3642
|
let deprecationMessage = dedent5(`Using CommonJS in your main configuration file is deprecated with Vite.
|
|
3648
3643
|
- Refer to the migration guide at https://forkbook.ljk.dev/docs/migration#commonjs-with-vite-is-deprecated`), mainJsPath = getInterpretedFile(
|
|
3649
|
-
resolve7(options.configDir ||
|
|
3644
|
+
resolve7(options.configDir || defaultConfigDir2(), "main")
|
|
3650
3645
|
);
|
|
3651
3646
|
/\.c[jt]s$/.test(mainJsPath) && deprecate(deprecationMessage);
|
|
3652
3647
|
let mainJsContent = await readFile5(mainJsPath, { encoding: "utf8" }), CJS_CONTENT_REGEX = /\bmodule\.exports\b|\bexports[.[]|\brequire\s*\(|\bObject\.(?:defineProperty|defineProperties|assign)\s*\(\s*exports\b/, strippedContent = stripCommentsAndStrings(mainJsContent);
|
|
@@ -3761,7 +3756,7 @@ import {
|
|
|
3761
3756
|
} from "@aussieljk/forkbook/internal/common";
|
|
3762
3757
|
import { oneWayHash as oneWayHash2 } from "@aussieljk/forkbook/internal/telemetry";
|
|
3763
3758
|
import { dirname as dirname3, isAbsolute as isAbsolute2, join as join11, relative as relative6, resolve as resolve8 } from "pathe";
|
|
3764
|
-
async function
|
|
3759
|
+
async function loadForkbook(options) {
|
|
3765
3760
|
let configDir = resolve8(options.configDir), cacheKey = oneWayHash2(relative6(getProjectRoot2(), configDir));
|
|
3766
3761
|
options.configType = "DEVELOPMENT", options.configDir = configDir, options.cacheKey = cacheKey;
|
|
3767
3762
|
let channel = options.channel ?? new Channel4({});
|
|
@@ -4138,7 +4133,7 @@ var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.star
|
|
|
4138
4133
|
let cacheKey = this.getFindMatchingFilesCacheKey(specifier, workingDir, ignoreWarnings), cached = this.findMatchingFilesCache.get(cacheKey);
|
|
4139
4134
|
if (cached)
|
|
4140
4135
|
return cached;
|
|
4141
|
-
let pathToSubIndex = {}, globCwd = slash(resolve9(workingDir, specifier.directory)), globPattern = specifier.files.startsWith("!") ? `./${specifier.files}` : specifier.files, { glob: glob2 } = await import("../_node-chunks/dist-
|
|
4136
|
+
let pathToSubIndex = {}, globCwd = slash(resolve9(workingDir, specifier.directory)), globPattern = specifier.files.startsWith("!") ? `./${specifier.files}` : specifier.files, { glob: glob2 } = await import("../_node-chunks/dist-XPLJ5T4W.js"), files = await glob2(globPattern, {
|
|
4142
4137
|
absolute: !0,
|
|
4143
4138
|
expandDirectories: !1,
|
|
4144
4139
|
cwd: globCwd,
|
|
@@ -4614,7 +4609,7 @@ var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.star
|
|
|
4614
4609
|
|
|
4615
4610
|
// src/core-server/build-index.ts
|
|
4616
4611
|
var buildIndex = async (options) => {
|
|
4617
|
-
let { presets } = await
|
|
4612
|
+
let { presets } = await loadForkbook(options), [indexers, stories, docsOptions, features] = await Promise.all([
|
|
4618
4613
|
presets.apply("experimental_indexers", []),
|
|
4619
4614
|
presets.apply("stories", []),
|
|
4620
4615
|
presets.apply("docs"),
|
|
@@ -4734,6 +4729,50 @@ var MockUniversalStore = class _MockUniversalStore extends UniversalStore {
|
|
|
4734
4729
|
}
|
|
4735
4730
|
};
|
|
4736
4731
|
|
|
4732
|
+
// src/core-server/utils/request-guards.ts
|
|
4733
|
+
var SAME_SITE_FETCH_VALUES = /* @__PURE__ */ new Set(["same-origin", "none"]), firstHeader = (value) => Array.isArray(value) ? value[0] : value;
|
|
4734
|
+
function isCrossSiteRequest(req, hostValidation) {
|
|
4735
|
+
let fetchSite = firstHeader(req.headers["sec-fetch-site"])?.trim().toLowerCase();
|
|
4736
|
+
if (fetchSite && !SAME_SITE_FETCH_VALUES.has(fetchSite)) {
|
|
4737
|
+
let method = req.method?.toUpperCase();
|
|
4738
|
+
if (!((method === "GET" || method === "HEAD") && firstHeader(req.headers["sec-fetch-mode"])?.trim().toLowerCase() === "navigate"))
|
|
4739
|
+
return !0;
|
|
4740
|
+
}
|
|
4741
|
+
let origin = firstHeader(req.headers.origin);
|
|
4742
|
+
if (!origin)
|
|
4743
|
+
return !1;
|
|
4744
|
+
try {
|
|
4745
|
+
return !isValidHost(new URL(origin).host, hostValidation);
|
|
4746
|
+
} catch {
|
|
4747
|
+
return !0;
|
|
4748
|
+
}
|
|
4749
|
+
}
|
|
4750
|
+
var RequestBodyTooLargeError = class extends Error {
|
|
4751
|
+
constructor(limit) {
|
|
4752
|
+
super(`Request body is larger than ${limit} bytes`);
|
|
4753
|
+
this.limit = limit;
|
|
4754
|
+
this.name = "RequestBodyTooLargeError";
|
|
4755
|
+
}
|
|
4756
|
+
};
|
|
4757
|
+
async function readRequestBody(req, maxBytes) {
|
|
4758
|
+
let declared = Number(firstHeader(req.headers["content-length"]));
|
|
4759
|
+
if (Number.isFinite(declared) && declared > maxBytes)
|
|
4760
|
+
throw new RequestBodyTooLargeError(maxBytes);
|
|
4761
|
+
let chunks = [], size = 0;
|
|
4762
|
+
for await (let chunk of req) {
|
|
4763
|
+
let data = Buffer.from(chunk);
|
|
4764
|
+
if (size += data.length, size > maxBytes)
|
|
4765
|
+
throw new RequestBodyTooLargeError(maxBytes);
|
|
4766
|
+
chunks.push(data);
|
|
4767
|
+
}
|
|
4768
|
+
return Buffer.concat(chunks);
|
|
4769
|
+
}
|
|
4770
|
+
function sendPayloadTooLarge(res, error, contentType = "text/plain") {
|
|
4771
|
+
res.writeHead(413, { "Content-Type": contentType, Connection: "close" }), res.end(
|
|
4772
|
+
contentType === "application/json" ? JSON.stringify({ error: error.message }) : error.message
|
|
4773
|
+
);
|
|
4774
|
+
}
|
|
4775
|
+
|
|
4737
4776
|
// src/core-server/utils/ghost-stories/get-candidates.ts
|
|
4738
4777
|
import { readFile as readFile7 } from "node:fs/promises";
|
|
4739
4778
|
import { babelParse, traverse } from "@aussieljk/forkbook/internal/babel";
|
|
@@ -4857,7 +4896,7 @@ async function getComponentCandidates({
|
|
|
4857
4896
|
// src/core-server/utils/ghost-stories/run-story-tests.ts
|
|
4858
4897
|
import { existsSync as existsSync4 } from "node:fs";
|
|
4859
4898
|
import { mkdir as mkdir5, readFile as readFile8 } from "node:fs/promises";
|
|
4860
|
-
import { executeCommand,
|
|
4899
|
+
import { executeCommand, resolvePathInForkbookCache as resolvePathInForkbookCache3 } from "@aussieljk/forkbook/internal/common";
|
|
4861
4900
|
import { join as join13 } from "pathe";
|
|
4862
4901
|
|
|
4863
4902
|
// src/shared/utils/ecosystem-identifier.ts
|
|
@@ -5151,7 +5190,7 @@ function parseVitestResults(report) {
|
|
|
5151
5190
|
async function runStoryTests(componentFilePaths, options) {
|
|
5152
5191
|
let cwd = options?.cwd;
|
|
5153
5192
|
try {
|
|
5154
|
-
let cacheDir =
|
|
5193
|
+
let cacheDir = resolvePathInForkbookCache3("story-tests");
|
|
5155
5194
|
await mkdir5(cacheDir, { recursive: !0 });
|
|
5156
5195
|
let timestamp = Date.now(), outputFile = join13(cacheDir, `test-results-${timestamp}.json`), startTime = Date.now(), testFailureMessage;
|
|
5157
5196
|
try {
|
|
@@ -5208,12 +5247,119 @@ async function runStoryTests(componentFilePaths, options) {
|
|
|
5208
5247
|
};
|
|
5209
5248
|
}
|
|
5210
5249
|
}
|
|
5250
|
+
|
|
5251
|
+
// src/core-server/utils/skills/addon-a11y.ts
|
|
5252
|
+
async function isAddonA11yEnabled(options) {
|
|
5253
|
+
try {
|
|
5254
|
+
return await options.presets.apply("isAddonA11yEnabled", !1);
|
|
5255
|
+
} catch {
|
|
5256
|
+
return !1;
|
|
5257
|
+
}
|
|
5258
|
+
}
|
|
5259
|
+
|
|
5260
|
+
// src/core-server/utils/skills/addon-vitest.ts
|
|
5261
|
+
async function isAddonVitestEnabled(options) {
|
|
5262
|
+
try {
|
|
5263
|
+
return await options.presets.apply("isAddonVitestEnabled", !1);
|
|
5264
|
+
} catch {
|
|
5265
|
+
return !1;
|
|
5266
|
+
}
|
|
5267
|
+
}
|
|
5268
|
+
|
|
5269
|
+
// src/core-server/utils/skills/manifest-status.ts
|
|
5270
|
+
var hasComponentManifestFeature = (features) => !!(features?.componentsManifest ?? features?.experimentalComponentsManifest), isDocgenServerMode = (features) => !!(features?.docgenServer && features?.componentsManifest), getManifestStatus = async (options) => {
|
|
5271
|
+
let [
|
|
5272
|
+
features,
|
|
5273
|
+
manifests,
|
|
5274
|
+
// Added for backwards compatibility with Forkbook versions prior to v10.2.0-alpha.10
|
|
5275
|
+
// Should be removed once support for Forkbook version < 10.2.0 is dropped
|
|
5276
|
+
legacyComponentManifestGenerator
|
|
5277
|
+
] = await Promise.all([
|
|
5278
|
+
options.presets.apply("features"),
|
|
5279
|
+
options.presets.apply("experimental_manifests", void 0, {
|
|
5280
|
+
manifestEntries: []
|
|
5281
|
+
}),
|
|
5282
|
+
options.presets.apply("experimental_componentManifestGenerator")
|
|
5283
|
+
]), hasFeatureFlag = hasComponentManifestFeature(features), docgenServer = isDocgenServerMode(features), hasManifests = docgenServer || manifests && "components" in manifests || !!legacyComponentManifestGenerator;
|
|
5284
|
+
return {
|
|
5285
|
+
available: hasFeatureFlag && hasManifests,
|
|
5286
|
+
hasManifests,
|
|
5287
|
+
hasFeatureFlag,
|
|
5288
|
+
docgenServer
|
|
5289
|
+
};
|
|
5290
|
+
};
|
|
5291
|
+
|
|
5292
|
+
// src/core-server/utils/skills/availability.ts
|
|
5293
|
+
function getEffectiveToolAvailability(availability, { multiSource = !1 } = {}) {
|
|
5294
|
+
return multiSource ? {
|
|
5295
|
+
...availability,
|
|
5296
|
+
docsEnabled: !0,
|
|
5297
|
+
docsEnabledForCli: !0,
|
|
5298
|
+
docsHasManifests: !0,
|
|
5299
|
+
docsFeatureEnabled: !0
|
|
5300
|
+
} : availability;
|
|
5301
|
+
}
|
|
5302
|
+
async function isModuleGraphSupported() {
|
|
5303
|
+
try {
|
|
5304
|
+
return getService("core/module-graph", { internal: !0 }) !== void 0;
|
|
5305
|
+
} catch {
|
|
5306
|
+
return !1;
|
|
5307
|
+
}
|
|
5308
|
+
}
|
|
5309
|
+
async function getToolAvailability(options) {
|
|
5310
|
+
let [moduleGraphSupported, manifestStatus, addonVitestEnabled, a11yEnabled] = await Promise.all(
|
|
5311
|
+
[
|
|
5312
|
+
isModuleGraphSupported(),
|
|
5313
|
+
getManifestStatus(options),
|
|
5314
|
+
isAddonVitestEnabled(options),
|
|
5315
|
+
isAddonA11yEnabled(options)
|
|
5316
|
+
]
|
|
5317
|
+
);
|
|
5318
|
+
return {
|
|
5319
|
+
moduleGraphSupported,
|
|
5320
|
+
docsEnabled: manifestStatus.available,
|
|
5321
|
+
docsEnabledForCli: manifestStatus.hasManifests,
|
|
5322
|
+
docsHasManifests: manifestStatus.hasManifests,
|
|
5323
|
+
docsFeatureEnabled: manifestStatus.hasFeatureFlag,
|
|
5324
|
+
testSupported: addonVitestEnabled,
|
|
5325
|
+
a11yEnabled,
|
|
5326
|
+
docgenServer: manifestStatus.docgenServer
|
|
5327
|
+
};
|
|
5328
|
+
}
|
|
5329
|
+
|
|
5330
|
+
// src/core-server/utils/skills/inputs.ts
|
|
5331
|
+
import { relative as relative8 } from "node:path";
|
|
5332
|
+
var isTypeScriptFile = (path) => /\.[cm]?tsx?$/.test(path);
|
|
5333
|
+
async function resolvePreview(configDir = defaultConfigDir()) {
|
|
5334
|
+
let previewPath = findConfigFile("preview", configDir), typescript = isTypeScriptFile(previewPath ?? findConfigFile("main", configDir) ?? ""), path = previewPath ?? `${configDir}/preview.${typescript ? "ts" : "js"}`, csfFactories = !1;
|
|
5335
|
+
if (previewPath)
|
|
5336
|
+
try {
|
|
5337
|
+
csfFactories = isCsfFactoryPreview(await readConfig(previewPath));
|
|
5338
|
+
} catch {
|
|
5339
|
+
}
|
|
5340
|
+
return {
|
|
5341
|
+
csfFactories,
|
|
5342
|
+
typescript,
|
|
5343
|
+
previewFile: relative8(process.cwd(), path).replaceAll("\\", "/") || path
|
|
5344
|
+
};
|
|
5345
|
+
}
|
|
5346
|
+
async function resolveSkillInputs(options) {
|
|
5347
|
+
let [availability, frameworkPreset, preview] = await Promise.all([
|
|
5348
|
+
getToolAvailability(options),
|
|
5349
|
+
options.presets.apply("framework"),
|
|
5350
|
+
resolvePreview(options.configDir)
|
|
5351
|
+
]), framework = extractFrameworkPackageName(
|
|
5352
|
+
typeof frameworkPreset == "string" ? frameworkPreset : frameworkPreset?.name ?? ""
|
|
5353
|
+
);
|
|
5354
|
+
return { ...availability, ...preview, framework, renderer: frameworkToRendererMap[framework] };
|
|
5355
|
+
}
|
|
5211
5356
|
export {
|
|
5212
5357
|
ChangeDetectionFailureError,
|
|
5213
5358
|
ChangeDetectionService,
|
|
5214
5359
|
ChangeDetectionUnavailableError,
|
|
5215
5360
|
DEFAULT_STATIC_OUTPUT_DIR,
|
|
5216
5361
|
MDX_SERVICE_ID,
|
|
5362
|
+
RequestBodyTooLargeError,
|
|
5217
5363
|
StoryIndexGenerator,
|
|
5218
5364
|
Tag,
|
|
5219
5365
|
analyzeMdx,
|
|
@@ -5236,7 +5382,7 @@ export {
|
|
|
5236
5382
|
getChangeDetectionReadiness as experimental_getChangeDetectionReadiness,
|
|
5237
5383
|
getStatusStoreByTypeId as experimental_getStatusStore,
|
|
5238
5384
|
getTestProviderStoreById as experimental_getTestProviderStore,
|
|
5239
|
-
|
|
5385
|
+
loadForkbook as experimental_loadForkbook,
|
|
5240
5386
|
registerService as experimental_registerService,
|
|
5241
5387
|
resetChangeDetectionReadiness as experimental_resetChangeDetectionReadiness,
|
|
5242
5388
|
resetServicesPresetOnce as experimental_resetServicesPresetOnce,
|
|
@@ -5261,6 +5407,7 @@ export {
|
|
|
5261
5407
|
universalTestProviderStore as internal_universalTestProviderStore,
|
|
5262
5408
|
isAddonA11yEnabled,
|
|
5263
5409
|
isAddonVitestEnabled,
|
|
5410
|
+
isCrossSiteRequest,
|
|
5264
5411
|
isModuleGraphSupported,
|
|
5265
5412
|
isValidHost,
|
|
5266
5413
|
listServices,
|
|
@@ -5270,12 +5417,14 @@ export {
|
|
|
5270
5417
|
mdxQueryStaticPath,
|
|
5271
5418
|
mdxStaticStorePath,
|
|
5272
5419
|
prepareHeadlessUniversalStores,
|
|
5420
|
+
readRequestBody,
|
|
5273
5421
|
registerToolset,
|
|
5274
5422
|
resolveChangeDetectionAdapter,
|
|
5275
5423
|
resolveSkillInputs,
|
|
5276
5424
|
resolveStaticOutputDir,
|
|
5277
5425
|
reviewToolset,
|
|
5278
5426
|
runStoryTests,
|
|
5427
|
+
sendPayloadTooLarge,
|
|
5279
5428
|
sendTelemetryError,
|
|
5280
5429
|
storyInputArraySchema,
|
|
5281
5430
|
toStoryTestResult,
|