@aussieljk/forkbook 0.0.1-16 → 0.0.1-18
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/assets/server/template.ejs +5 -1
- package/dist/_browser-chunks/{Color-CSCUIZNV.js → Color-CHK5SYAK.js} +1 -1
- package/dist/_browser-chunks/{WithTooltip-QCFTNB6P.js → WithTooltip-SLEBZZYA.js} +1 -1
- package/dist/_browser-chunks/{chunk-Z4YTPAKR.js → chunk-5X5VDKPT.js} +10 -10
- package/dist/_browser-chunks/chunk-PFYL47RM.js +45 -0
- package/dist/_browser-chunks/{chunk-RSK2QATC.js → chunk-VCUPEQLQ.js} +1 -1
- package/dist/_node-chunks/{attached-runtime-M3LR7CRL.js → attached-runtime-ZWS3ITCU.js} +32 -29
- package/dist/_node-chunks/{builder-manager-S5R76DLZ.js → builder-manager-MFEAPDDJ.js} +41 -20
- package/dist/_node-chunks/{chunk-PLQUKACJ.js → chunk-3IAEGPC6.js} +6 -6
- package/dist/_node-chunks/{chunk-F6IRDFGE.js → chunk-3UTE6IWX.js} +8 -8
- package/dist/_node-chunks/{chunk-JP6U6V57.js → chunk-43EE7M6B.js} +8 -8
- package/dist/_node-chunks/{chunk-GG57O5WL.js → chunk-4EC6ZCAU.js} +7 -7
- package/dist/_node-chunks/{chunk-S6KVMMG5.js → chunk-4KYM2KSJ.js} +6 -6
- package/dist/_node-chunks/{chunk-PK7PIHFX.js → chunk-4QLNIRBY.js} +6 -6
- package/dist/_node-chunks/{chunk-T5ZUNH6T.js → chunk-4QX2ECVH.js} +6 -6
- package/dist/_node-chunks/{chunk-C7LQKP5N.js → chunk-4XHQ65LH.js} +6 -6
- package/dist/_node-chunks/{chunk-C3NHS7JV.js → chunk-5VKLBV3U.js} +21 -9
- package/dist/_node-chunks/chunk-66MT4R3I.js +20 -0
- package/dist/_node-chunks/{chunk-V5UORMCO.js → chunk-7JXTYBXL.js} +7 -7
- package/dist/_node-chunks/{chunk-EYI7KYY6.js → chunk-7LMKJKAQ.js} +8 -8
- package/dist/_node-chunks/{chunk-PAPQY3TW.js → chunk-7QJLW3RJ.js} +8 -8
- package/dist/_node-chunks/{chunk-3RIDLOKA.js → chunk-AAPO6DVK.js} +9 -9
- package/dist/_node-chunks/{chunk-RCJSAGZJ.js → chunk-AOLMH3XG.js} +15 -11
- package/dist/_node-chunks/{chunk-7SQTDU62.js → chunk-AP4REHEI.js} +7 -7
- package/dist/_node-chunks/{chunk-XLLJO7QN.js → chunk-ATMBZKPG.js} +8 -8
- package/dist/_node-chunks/{chunk-TTT6HKCH.js → chunk-B77YYPPE.js} +6 -6
- package/dist/_node-chunks/{chunk-LZR5V6AC.js → chunk-BUBLGEJK.js} +8 -8
- package/dist/_node-chunks/{chunk-WKOD2VTN.js → chunk-CD4UNHSD.js} +6 -6
- package/dist/_node-chunks/{chunk-7N4FSYG5.js → chunk-CHAPTCXW.js} +26 -26
- package/dist/_node-chunks/{chunk-IA5HRJZF.js → chunk-CSKLM3SG.js} +9 -9
- package/dist/_node-chunks/{chunk-JX2FN4Q3.js → chunk-CSYW7JSG.js} +6 -6
- package/dist/_node-chunks/chunk-CVS5RXU4.js +19 -0
- package/dist/_node-chunks/{chunk-K5XZRTQZ.js → chunk-CZXN5VUN.js} +7 -7
- package/dist/_node-chunks/{chunk-OGBMQXAL.js → chunk-DMQHQOWT.js} +8 -8
- package/dist/_node-chunks/{chunk-XY5DZDIL.js → chunk-DUJAQGDD.js} +10 -10
- package/dist/_node-chunks/{chunk-RY5SXMMS.js → chunk-ETOEMP6K.js} +7 -7
- package/dist/_node-chunks/chunk-F5JV3P2K.js +49 -0
- package/dist/_node-chunks/{chunk-GDBK4HY3.js → chunk-F6LG6ZTH.js} +12 -12
- package/dist/_node-chunks/{chunk-SUWLYB5G.js → chunk-GADZYB7K.js} +6 -6
- package/dist/_node-chunks/{chunk-JT7FTSPB.js → chunk-GC5GNEU6.js} +7 -7
- package/dist/_node-chunks/chunk-GG4A54OB.js +52 -0
- package/dist/_node-chunks/{chunk-76ZAQTUI.js → chunk-GXIROVYL.js} +6 -6
- package/dist/_node-chunks/{chunk-IJYTDXUI.js → chunk-HAQE45NF.js} +8 -8
- package/dist/_node-chunks/{chunk-7HEDXUYY.js → chunk-HKYFHGCD.js} +6 -6
- package/dist/_node-chunks/{chunk-N5DU4RGS.js → chunk-HOZK625X.js} +7 -7
- package/dist/_node-chunks/{chunk-NT2NODZ6.js → chunk-HP4RVLEB.js} +6 -6
- package/dist/_node-chunks/{chunk-KQZVI6MC.js → chunk-HTAHNPU2.js} +6 -6
- package/dist/_node-chunks/{chunk-5OFZSOQT.js → chunk-HZPU25LI.js} +8 -8
- package/dist/_node-chunks/{chunk-72BCEHLN.js → chunk-IHPNFVF3.js} +9 -9
- package/dist/_node-chunks/{chunk-GDWG7F53.js → chunk-IPIEE34R.js} +6 -6
- package/dist/_node-chunks/{chunk-AYBIJKYK.js → chunk-J3LAZZTR.js} +8 -8
- package/dist/_node-chunks/{chunk-4GBTYHEQ.js → chunk-J4FHHY7S.js} +7 -7
- package/dist/_node-chunks/{chunk-Y2FHDZ2F.js → chunk-JV3BLGQU.js} +9 -9
- package/dist/_node-chunks/{chunk-PYLGT7HR.js → chunk-KNYUZVVR.js} +8 -8
- package/dist/_node-chunks/{chunk-IW4JU27L.js → chunk-L6UNXQVV.js} +7 -7
- package/dist/_node-chunks/{chunk-EB7VOG5E.js → chunk-LF6QBPS2.js} +6 -6
- package/dist/_node-chunks/{chunk-PH4DKJCF.js → chunk-M6P773JM.js} +6 -6
- package/dist/_node-chunks/{chunk-BMBHJB46.js → chunk-MBQQZ53T.js} +6 -6
- package/dist/_node-chunks/{chunk-FJWE2TBB.js → chunk-NAQAQ5JU.js} +14 -14
- package/dist/_node-chunks/{chunk-K6GKT7RR.js → chunk-NL2NSBHC.js} +8 -8
- package/dist/_node-chunks/{chunk-UFZDQ6B2.js → chunk-O432EICO.js} +7 -7
- package/dist/_node-chunks/{chunk-PMYTZ2QW.js → chunk-OQF3DZON.js} +6 -6
- package/dist/_node-chunks/{chunk-I5YT3ZVT.js → chunk-OWAPLHBK.js} +6 -6
- package/dist/_node-chunks/{chunk-XXDUSVOM.js → chunk-P5UQQAVT.js} +8 -8
- package/dist/_node-chunks/{chunk-3VMGUWTV.js → chunk-PD2B4CCJ.js} +6 -6
- package/dist/_node-chunks/{chunk-S5AP3365.js → chunk-PLY7VOL7.js} +19 -19
- package/dist/_node-chunks/{chunk-2GKDQBC6.js → chunk-PNKI23DA.js} +11 -10
- package/dist/_node-chunks/{chunk-5U6PJ5YZ.js → chunk-Q5QVDDH2.js} +6 -6
- package/dist/_node-chunks/{chunk-XWNZORKV.js → chunk-QIYPM5FW.js} +7 -7
- package/dist/_node-chunks/{chunk-E5PKDO5S.js → chunk-QQNAFDRV.js} +6 -6
- package/dist/_node-chunks/chunk-QX47Z5FH.js +18 -0
- package/dist/_node-chunks/{chunk-IHOUXOSK.js → chunk-R3ICZFLN.js} +8 -8
- package/dist/_node-chunks/{chunk-ZTZCXWZV.js → chunk-R5L5IULY.js} +6 -6
- package/dist/_node-chunks/{chunk-CNIGCMVT.js → chunk-RBTE26TI.js} +6 -6
- package/dist/_node-chunks/chunk-RTTAFZ52.js +25 -0
- package/dist/_node-chunks/{chunk-YBAT4RJ7.js → chunk-RUEDYIYF.js} +6 -6
- package/dist/_node-chunks/{chunk-54Q363BU.js → chunk-SFXUROK4.js} +10 -10
- package/dist/_node-chunks/{chunk-WB6KEM5Y.js → chunk-SI3EDPTV.js} +7 -7
- package/dist/_node-chunks/{chunk-VXTAQURA.js → chunk-TG4TFBAD.js} +6 -6
- package/dist/_node-chunks/{chunk-JQYFHZ7Z.js → chunk-TMRHGLYF.js} +6 -6
- package/dist/_node-chunks/{chunk-UW6HXL4F.js → chunk-UANUKRU3.js} +7 -7
- package/dist/_node-chunks/{chunk-OKAP7V5Y.js → chunk-UDHDJDLE.js} +7 -7
- package/dist/_node-chunks/{chunk-5H64FI2Q.js → chunk-VCDXUGKB.js} +7 -7
- package/dist/_node-chunks/{chunk-QDBA3OPO.js → chunk-VQSS7OII.js} +6 -6
- package/dist/_node-chunks/{chunk-DNZAIWOF.js → chunk-VQXJE5RG.js} +10 -10
- package/dist/_node-chunks/chunk-WFGTVI33.js +20 -0
- package/dist/_node-chunks/{chunk-RWKRFANH.js → chunk-WPGIUS6F.js} +6 -6
- package/dist/_node-chunks/{chunk-VL5IW2LC.js → chunk-WRHG6PWE.js} +6 -6
- package/dist/_node-chunks/{chunk-BNBWGBBX.js → chunk-X5SV7UIZ.js} +7 -7
- package/dist/_node-chunks/{chunk-A2PJPFXZ.js → chunk-XC2RV6BH.js} +6 -6
- package/dist/_node-chunks/{chunk-BLNJ2DX2.js → chunk-XF4DIPLO.js} +7 -7
- package/dist/_node-chunks/{chunk-LYDJ7XSD.js → chunk-XFUBYI3U.js} +6 -6
- package/dist/_node-chunks/{chunk-47RQBQRS.js → chunk-XG72Q4LL.js} +7 -7
- package/dist/_node-chunks/{chunk-5CTBWF65.js → chunk-XN7EHJVR.js} +7 -7
- package/dist/_node-chunks/chunk-XWO2VFNK.js +298 -0
- package/dist/_node-chunks/chunk-YBFKJXTN.js +11 -0
- package/dist/_node-chunks/{chunk-2J7TLO3T.js → chunk-YCES67AJ.js} +7 -7
- package/dist/_node-chunks/{chunk-NMJ6S2BO.js → chunk-YF6BDZJP.js} +9 -9
- package/dist/_node-chunks/{chunk-4NF4B5VC.js → chunk-YPJFFP22.js} +7 -7
- package/dist/_node-chunks/{chunk-SZC3BDMK.js → chunk-ZCTTWMP3.js} +23 -23
- package/dist/_node-chunks/{chunk-HBGFSTD5.js → chunk-ZGPTFIJY.js} +6 -6
- package/dist/_node-chunks/dist-S4XHG4S5.js +16 -0
- package/dist/_node-chunks/dist-ZLGPDQAK.js +27 -0
- package/dist/_node-chunks/{local-runtime-HTS37XDN.js → local-runtime-VNZEXHPN.js} +19 -19
- package/dist/_node-chunks/{mdx-plugin-IUQIVM3G.js → mdx-plugin-B2RRIE5M.js} +13 -13
- package/dist/_node-chunks/{monorepo-SYIDMETZ.js → monorepo-ZOBVE7R5.js} +11 -11
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-5OYJKBOA.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-RKE5VH5C.js} +11 -11
- package/dist/_node-chunks/optimized-tests-GUPK5ZYE.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-74TXIEUZ.js → pattern-copy-play-5JYSDTHX.js} +9 -9
- package/dist/_node-chunks/postinstallAddon-KIZYAP3B.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-DWA5SPB5.js → rehype-external-links-V66P44D4.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-KAFPVNH4.js → rehype-slug-YZMIIK27.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-6EIL2N6I.js → relaxed-limits-DI6DQXM7.js} +11 -11
- package/dist/_node-chunks/{run-6W2ISL24.js → run-EIJKYUHM.js} +15 -15
- package/dist/_node-chunks/{run-C7CGXC2E.js → run-MVQQYDMF.js} +17 -17
- package/dist/_node-chunks/{setup-3LVKWS2Y.js → setup-P3E5WIHM.js} +8 -8
- package/dist/_node-chunks/{vitest.config.4.template-EXNOA6EO.js → vitest.config.4.template-JLKIRDI6.js} +7 -7
- package/dist/addon-a11y/manager.js +5 -5
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-comments/manager.js +10 -3
- package/dist/addon-comments/preset.js +8 -8
- 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 +23 -12
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +15 -3
- package/dist/addon-themes/postinstall.js +7 -7
- package/dist/addon-vitest/constants.js +8 -8
- package/dist/addon-vitest/manager.js +3 -3
- package/dist/addon-vitest/node/coverage-reporter.js +8 -8
- package/dist/addon-vitest/node/vitest.js +16 -16
- package/dist/addon-vitest/postinstall.js +10 -10
- package/dist/addon-vitest/preset.js +14 -14
- package/dist/addon-vitest/vitest-plugin/global-setup.js +7 -7
- package/dist/addon-vitest/vitest-plugin/index.js +12 -12
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +60 -59
- package/dist/bin/dispatcher.js +10 -10
- package/dist/bin/loader.js +8 -8
- package/dist/builder-next/index.d.ts +59 -0
- package/dist/builder-next/index.js +185 -0
- package/dist/builder-vite/index.d.ts +7 -2
- package/dist/builder-vite/index.js +23 -16
- package/dist/builder-vite/preset.js +13 -13
- package/dist/channels/index.d.ts +3 -2
- package/dist/channels/index.js +25 -3
- package/dist/{chunk-C4-cnJ1R.d.ts → chunk-BsO65uOb.d.ts} +1 -1
- package/dist/{chunk-CV4-Z2pn.d.ts → chunk-CDMZhRke.d.ts} +1 -1
- package/dist/chunk-CFhJCPSB.d.ts +48 -0
- package/dist/{chunk-BNRZY6Jq.d.ts → chunk-D2CQlXaR.d.ts} +1 -1
- package/dist/chunk-DtFyKAil.d.ts +142 -0
- package/dist/{chunk-s5Ka0eSs.d.ts → chunk-OksNJcvJ.d.ts} +1 -1
- package/dist/{chunk-BRMwIGWt.d.ts → chunk-ge-rSPy0.d.ts} +33 -14
- package/dist/{chunk-QtkUsZCs.d.ts → chunk-r-Vjut9o.d.ts} +2 -1
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +21 -21
- 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 +4 -4
- package/dist/common/index.js +34 -34
- package/dist/components/index.js +28 -28
- package/dist/core-server/index.d.ts +19 -4
- package/dist/core-server/index.js +166 -107
- 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 +42 -39
- package/dist/create/bin/index.js +7 -7
- package/dist/create/index.js +15 -15
- package/dist/csf-tools/index.js +12 -12
- package/dist/manager/_manager-chunks/{globals-runtime-BWRrfZHd.js → globals-runtime-B4SHGLOz.js} +137 -73
- package/dist/manager/_manager-chunks/{globals-runtime-BshBawD_.js → globals-runtime-Bp8OD5XP.js} +4 -4
- package/dist/manager/_manager-chunks/{globals-runtime-BGys8g47.js → globals-runtime-CFubTdpY.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-C-EipbnO.js → globals-runtime-CIwwmsq8.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-Ct6r_VIk.js → globals-runtime-DnBr0uHL.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-BimU8G7b.js → globals-runtime-DrIZ7TV0.js} +2 -2
- package/dist/manager/_manager-chunks/{runtime-DJCouYTq.js → runtime-4g05lOCJ.js} +3 -3
- package/dist/manager/_manager-chunks/{runtime-BhqfjXNm.js → runtime-B3dYQqb0.js} +2 -2
- package/dist/manager/_manager-chunks/{runtime-TSEq5lJd.js → runtime-B3sVeEUb.js} +1 -1
- package/dist/manager/_manager-chunks/{runtime-7sf36XMA.js → runtime-CDYOGzex.js} +4 -4
- package/dist/manager/_manager-chunks/{runtime-C6l5GIW9.js → runtime-CIywE7ED.js} +20 -20
- package/dist/manager/_manager-chunks/{runtime-DnHl3vQZ.js → runtime-Cd_gbHrb.js} +3 -3
- package/dist/manager/_manager-chunks/{runtime-CBJsfhjk.js → runtime-D7EqJrYN.js} +8 -8
- package/dist/manager/_manager-chunks/{runtime-BMoEpoix.js → runtime-DPTwiG8p.js} +7 -0
- package/dist/manager/_manager-chunks/{runtime-ByNphI7g.js → runtime-FgbxvsLo.js} +2 -2
- package/dist/manager/_manager-chunks/{runtime-DJfG4OGP.js → runtime-V4-aY7uL.js} +145 -145
- 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-errors.d.ts +1 -1
- package/dist/mcp/index.js +8 -8
- package/dist/mocking-utils/index.js +9 -9
- package/dist/next/index.d.ts +189 -0
- package/dist/next/index.js +289 -0
- 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 +1 -1
- 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-YJlypwja.js → runtime-BiYuZt-X.js} +3 -3
- package/dist/preview/_chunks/{runtime-CrKf1OM4.js → runtime-C88AzFBv.js} +2 -2
- package/dist/preview/_chunks/{runtime-COMyPEkR.js → runtime-Cpzxe5eK.js} +73 -9
- package/dist/preview/_chunks/{runtime-CqTqsVg2.js → runtime-MYVHRAoo.js} +2 -2
- package/dist/preview/runtime.js +1 -1
- package/dist/preview-api/index.d.ts +2 -2
- 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.d.ts +2 -2
- package/dist/react-native/metro/withForkbook.js +13 -13
- 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 +1 -1
- package/package.json +15 -3
- package/skills/setup/SKILL.md +14 -0
- package/skills/stories/SKILL.md +21 -0
- package/skills/write-story/SKILL.md +14 -0
- package/dist/_node-chunks/chunk-CN26V2O6.js +0 -19
- package/dist/_node-chunks/chunk-NHIONGG3.js +0 -11
- package/dist/_node-chunks/chunk-QXQQQC3B.js +0 -20
- package/dist/_node-chunks/chunk-RR6N4UDR.js +0 -25
- package/dist/_node-chunks/chunk-VAU4QOZO.js +0 -20
- package/dist/_node-chunks/chunk-YZ5HE6CE.js +0 -18
- package/dist/_node-chunks/dist-5M4OQEOE.js +0 -16
- package/dist/_node-chunks/dist-DNAZ454H.js +0 -27
- package/dist/_node-chunks/optimized-tests-LAR2SZGJ.js +0 -22
- package/dist/_node-chunks/postinstallAddon-5GFBQQOP.js +0 -20
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_of2djqq8j1 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_of2djqq8j1 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_of2djqq8j1 from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_of2djqq8j1.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_of2djqq8j1.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_of2djqq8j1.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
// src/builder-next/route.ts
|
|
14
|
+
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
15
|
+
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
16
|
+
var PREVIEW_ROUTE_GROUP = "(forkbook)", PREVIEW_ROUTE_SEGMENT = "iframe", PREVIEW_GLOBALS_PATH = "/iframe-globals.json", PREVIEW_ROUTE_FILES = {
|
|
17
|
+
page: "page.tsx",
|
|
18
|
+
client: "forkbook-client.tsx",
|
|
19
|
+
runtime: "forkbook-runtime.tsx",
|
|
20
|
+
stories: "forkbook-stories.js",
|
|
21
|
+
annotations: "forkbook-annotations.js"
|
|
22
|
+
}, GENERATED_HEADER = "// Generated by Forkbook (builder-next). Do not edit. It is removed when `next dev` stops.\n";
|
|
23
|
+
function findAppDir(projectDir) {
|
|
24
|
+
for (let candidate of [join(projectDir, "app"), join(projectDir, "src", "app")])
|
|
25
|
+
if (existsSync(candidate))
|
|
26
|
+
return candidate;
|
|
27
|
+
}
|
|
28
|
+
function getRouteSegments(basePath) {
|
|
29
|
+
return basePath.split("/").filter(Boolean).map((segment) => segment.startsWith("_") ? `%5F${segment.slice(1)}` : segment);
|
|
30
|
+
}
|
|
31
|
+
function getRouteGroupDir(appDir) {
|
|
32
|
+
return join(appDir, PREVIEW_ROUTE_GROUP);
|
|
33
|
+
}
|
|
34
|
+
function getPreviewRouteDir(appDir, basePath) {
|
|
35
|
+
return join(getRouteGroupDir(appDir), ...getRouteSegments(basePath), PREVIEW_ROUTE_SEGMENT);
|
|
36
|
+
}
|
|
37
|
+
function toImportSpecifier(fromDir, target) {
|
|
38
|
+
if (!isAbsolute(target))
|
|
39
|
+
return target;
|
|
40
|
+
let path = relative(fromDir, target).split(sep).join("/");
|
|
41
|
+
return path.startsWith(".") ? path : `./${path}`;
|
|
42
|
+
}
|
|
43
|
+
function getStoryImportPaths(entries) {
|
|
44
|
+
return [...new Set(Object.values(entries).map((entry) => entry.importPath))].sort();
|
|
45
|
+
}
|
|
46
|
+
function generateStoryLoaderCode(entries, { workingDir, routeDir }) {
|
|
47
|
+
let lines = getStoryImportPaths(entries).map((importPath) => {
|
|
48
|
+
let specifier = importPath.startsWith("virtual:") ? importPath : toImportSpecifier(routeDir, resolve(workingDir, importPath));
|
|
49
|
+
return ` ${JSON.stringify(importPath)}: () => import(${JSON.stringify(specifier)}),`;
|
|
50
|
+
});
|
|
51
|
+
return `${GENERATED_HEADER}
|
|
52
|
+
const importers = {
|
|
53
|
+
${lines.join(`
|
|
54
|
+
`)}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export async function importFn(path) {
|
|
58
|
+
const importer = importers[path];
|
|
59
|
+
if (!importer) {
|
|
60
|
+
throw new Error(\`Forkbook: no story file for "\${path}". Restart next dev if it is new.\`);
|
|
61
|
+
}
|
|
62
|
+
return importer();
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
65
|
+
}
|
|
66
|
+
function generateAnnotationsCode(annotationPaths, routeDir) {
|
|
67
|
+
let specifiers = annotationPaths.map((path) => toImportSpecifier(routeDir, path)), imports = specifiers.map(
|
|
68
|
+
(specifier, index) => `import * as annotations${index} from ${JSON.stringify(specifier)};`
|
|
69
|
+
), names = specifiers.map((_, index) => `annotations${index}`);
|
|
70
|
+
return `${GENERATED_HEADER}
|
|
71
|
+
import { composeConfigs } from '@aussieljk/forkbook/preview-api';
|
|
72
|
+
${imports.join(`
|
|
73
|
+
`)}
|
|
74
|
+
|
|
75
|
+
const modules = [${names.join(", ")}];
|
|
76
|
+
|
|
77
|
+
export function getProjectAnnotations() {
|
|
78
|
+
const preview = modules[modules.length - 1];
|
|
79
|
+
if (preview?.default?.composed) {
|
|
80
|
+
return preview.default.composed;
|
|
81
|
+
}
|
|
82
|
+
return composeConfigs(modules);
|
|
83
|
+
}
|
|
84
|
+
`;
|
|
85
|
+
}
|
|
86
|
+
function generatePageCode() {
|
|
87
|
+
return `${GENERATED_HEADER}
|
|
88
|
+
import ForkbookClient from './${PREVIEW_ROUTE_FILES.client.replace(/\.tsx$/, "")}';
|
|
89
|
+
|
|
90
|
+
export const metadata = { title: 'Forkbook', robots: { index: false, follow: false } };
|
|
91
|
+
|
|
92
|
+
export default function ForkbookPreviewPage() {
|
|
93
|
+
return <ForkbookClient />;
|
|
94
|
+
}
|
|
95
|
+
`;
|
|
96
|
+
}
|
|
97
|
+
function generateClientCode() {
|
|
98
|
+
return `${GENERATED_HEADER}
|
|
99
|
+
'use client';
|
|
100
|
+
|
|
101
|
+
import dynamic from 'next/dynamic';
|
|
102
|
+
|
|
103
|
+
const ForkbookRuntime = dynamic(() => import('./${PREVIEW_ROUTE_FILES.runtime.replace(/\.tsx$/, "")}'), {
|
|
104
|
+
ssr: false,
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
export default function ForkbookClient() {
|
|
108
|
+
return <ForkbookRuntime />;
|
|
109
|
+
}
|
|
110
|
+
`;
|
|
111
|
+
}
|
|
112
|
+
function generateRuntimeCode({ basePath }) {
|
|
113
|
+
let globalsUrl = `${basePath}${PREVIEW_GLOBALS_PATH}`;
|
|
114
|
+
return `${GENERATED_HEADER}
|
|
115
|
+
'use client';
|
|
116
|
+
|
|
117
|
+
import { useEffect } from 'react';
|
|
118
|
+
import { setup } from '@aussieljk/forkbook/internal/preview/runtime';
|
|
119
|
+
import { createBrowserChannel } from '@aussieljk/forkbook/internal/channels';
|
|
120
|
+
import { addons, PreviewWeb } from '@aussieljk/forkbook/preview-api';
|
|
121
|
+
import { importFn } from './${PREVIEW_ROUTE_FILES.stories}';
|
|
122
|
+
import { getProjectAnnotations } from './${PREVIEW_ROUTE_FILES.annotations}';
|
|
123
|
+
|
|
124
|
+
const w = window;
|
|
125
|
+
|
|
126
|
+
async function loadGlobals() {
|
|
127
|
+
const response = await fetch(${JSON.stringify(globalsUrl)});
|
|
128
|
+
if (!response.ok) {
|
|
129
|
+
throw new Error('Forkbook: could not load the preview globals (' + response.status + ').');
|
|
130
|
+
}
|
|
131
|
+
Object.assign(w, await response.json());
|
|
132
|
+
w.global = w;
|
|
133
|
+
w.module = undefined;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
async function start() {
|
|
137
|
+
if (!w.__FORKBOOK_PREVIEW_STARTING__) {
|
|
138
|
+
w.__FORKBOOK_PREVIEW_STARTING__ = (async () => {
|
|
139
|
+
await loadGlobals();
|
|
140
|
+
setup();
|
|
141
|
+
const channel = createBrowserChannel({ page: 'preview' });
|
|
142
|
+
addons.setChannel(channel);
|
|
143
|
+
if (w.CONFIG_TYPE === 'DEVELOPMENT') {
|
|
144
|
+
w.__FORKBOOK_SERVER_CHANNEL__ = channel;
|
|
145
|
+
}
|
|
146
|
+
w.__FORKBOOK_PREVIEW__ = new PreviewWeb(importFn, getProjectAnnotations);
|
|
147
|
+
w.__FORKBOOK_STORY_STORE__ = w.__FORKBOOK_PREVIEW__.storyStore;
|
|
148
|
+
})();
|
|
149
|
+
return w.__FORKBOOK_PREVIEW_STARTING__;
|
|
150
|
+
}
|
|
151
|
+
// A hot update ran this module again. Give the new modules to the running preview.
|
|
152
|
+
await w.__FORKBOOK_PREVIEW_STARTING__;
|
|
153
|
+
const preview = w.__FORKBOOK_PREVIEW__;
|
|
154
|
+
await preview.onGetProjectAnnotationsChanged({ getProjectAnnotations });
|
|
155
|
+
await preview.onStoriesChanged({ importFn });
|
|
156
|
+
w.__FORKBOOK_SERVER_CHANNEL__?.emit('storyHotUpdated');
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const started = start().catch((error) => {
|
|
160
|
+
console.error(error);
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
export default function ForkbookRuntime() {
|
|
164
|
+
useEffect(() => {
|
|
165
|
+
void started;
|
|
166
|
+
}, []);
|
|
167
|
+
return (
|
|
168
|
+
<>
|
|
169
|
+
<div id="storybook-root" />
|
|
170
|
+
<div id="storybook-docs" />
|
|
171
|
+
</>
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
`;
|
|
175
|
+
}
|
|
176
|
+
function writeIfChanged(path, content) {
|
|
177
|
+
return existsSync(path) && readFileSync(path, "utf8") === content ? !1 : (mkdirSync(dirname(path), { recursive: !0 }), writeFileSync(path, content), !0);
|
|
178
|
+
}
|
|
179
|
+
function resolvePreviewRoute({
|
|
180
|
+
projectDir,
|
|
181
|
+
basePath,
|
|
182
|
+
appDir
|
|
183
|
+
}) {
|
|
184
|
+
let app = appDir ?? findAppDir(projectDir);
|
|
185
|
+
if (!app)
|
|
186
|
+
throw new Error(
|
|
187
|
+
`Forkbook (builder-next): no "app" or "src/app" folder in ${projectDir}. builder-next needs the App Router.`
|
|
188
|
+
);
|
|
189
|
+
return {
|
|
190
|
+
appDir: app,
|
|
191
|
+
groupDir: getRouteGroupDir(app),
|
|
192
|
+
routeDir: getPreviewRouteDir(app, basePath)
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function writePreviewRoute(options) {
|
|
196
|
+
let route = resolvePreviewRoute(options), { routeDir } = route;
|
|
197
|
+
writeIfChanged(join(routeDir, PREVIEW_ROUTE_FILES.page), generatePageCode()), writeIfChanged(join(routeDir, PREVIEW_ROUTE_FILES.client), generateClientCode()), writeIfChanged(
|
|
198
|
+
join(routeDir, PREVIEW_ROUTE_FILES.runtime),
|
|
199
|
+
generateRuntimeCode({ basePath: options.basePath })
|
|
200
|
+
);
|
|
201
|
+
let stories = join(routeDir, PREVIEW_ROUTE_FILES.stories);
|
|
202
|
+
existsSync(stories) || writeIfChanged(stories, generateStoryLoaderCode({}, { workingDir: routeDir, routeDir }));
|
|
203
|
+
let annotations = join(routeDir, PREVIEW_ROUTE_FILES.annotations);
|
|
204
|
+
return existsSync(annotations) || writeIfChanged(annotations, generateAnnotationsCode([], routeDir)), ignoreInGit(route.groupDir), route;
|
|
205
|
+
}
|
|
206
|
+
function removePreviewRoute(route) {
|
|
207
|
+
rmSync(route.groupDir, { recursive: !0, force: !0 });
|
|
208
|
+
}
|
|
209
|
+
function findGitDir(dir) {
|
|
210
|
+
let current = resolve(dir);
|
|
211
|
+
for (; ; ) {
|
|
212
|
+
let candidate = join(current, ".git");
|
|
213
|
+
if (existsSync(candidate)) {
|
|
214
|
+
try {
|
|
215
|
+
let text = readFileSync(candidate, "utf8"), match = /^gitdir:\s*(.+)$/m.exec(text);
|
|
216
|
+
if (match) {
|
|
217
|
+
let gitDir = resolve(current, match[1].trim()), common = join(gitDir, "commondir");
|
|
218
|
+
return existsSync(common) ? resolve(gitDir, readFileSync(common, "utf8").trim()) : gitDir;
|
|
219
|
+
}
|
|
220
|
+
} catch {
|
|
221
|
+
}
|
|
222
|
+
return candidate;
|
|
223
|
+
}
|
|
224
|
+
let parent = dirname(current);
|
|
225
|
+
if (parent === current)
|
|
226
|
+
return;
|
|
227
|
+
current = parent;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
function ignoreInGit(groupDir) {
|
|
231
|
+
let gitDir = findGitDir(dirname(groupDir));
|
|
232
|
+
if (!gitDir)
|
|
233
|
+
return !1;
|
|
234
|
+
let pattern = `${PREVIEW_ROUTE_GROUP}/`, excludePath = join(gitDir, "info", "exclude"), existing = existsSync(excludePath) ? readFileSync(excludePath, "utf8") : "";
|
|
235
|
+
if (existing.split(/\r?\n/).includes(pattern))
|
|
236
|
+
return !0;
|
|
237
|
+
mkdirSync(dirname(excludePath), { recursive: !0 });
|
|
238
|
+
let prefix = existing && !existing.endsWith(`
|
|
239
|
+
`) ? `
|
|
240
|
+
` : "";
|
|
241
|
+
return writeFileSync(
|
|
242
|
+
excludePath,
|
|
243
|
+
`${existing}${prefix}# Forkbook builder-next preview route (generated)
|
|
244
|
+
${pattern}
|
|
245
|
+
`
|
|
246
|
+
), !0;
|
|
247
|
+
}
|
|
248
|
+
function toProjectRelativeAlias(alias, projectDir) {
|
|
249
|
+
return typeof alias == "string" ? isAbsolute(alias) ? toImportSpecifier(projectDir, alias) : alias : Object.fromEntries(
|
|
250
|
+
Object.entries(alias).map(([condition, target]) => [
|
|
251
|
+
condition,
|
|
252
|
+
toProjectRelativeAlias(target, projectDir)
|
|
253
|
+
])
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
function applyPreviewRouteMocks(config, { resolveAlias = {} }, projectDir = process.cwd()) {
|
|
257
|
+
if (Object.keys(resolveAlias).length === 0)
|
|
258
|
+
return config;
|
|
259
|
+
let aliases = Object.fromEntries(
|
|
260
|
+
Object.entries(resolveAlias).map(([name, alias]) => [
|
|
261
|
+
name,
|
|
262
|
+
toProjectRelativeAlias(alias, projectDir)
|
|
263
|
+
])
|
|
264
|
+
);
|
|
265
|
+
return {
|
|
266
|
+
...config,
|
|
267
|
+
turbopack: {
|
|
268
|
+
...config.turbopack,
|
|
269
|
+
resolveAlias: { ...aliases, ...config.turbopack?.resolveAlias }
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export {
|
|
275
|
+
PREVIEW_ROUTE_GROUP,
|
|
276
|
+
PREVIEW_ROUTE_SEGMENT,
|
|
277
|
+
PREVIEW_GLOBALS_PATH,
|
|
278
|
+
PREVIEW_ROUTE_FILES,
|
|
279
|
+
findAppDir,
|
|
280
|
+
getRouteSegments,
|
|
281
|
+
getRouteGroupDir,
|
|
282
|
+
getPreviewRouteDir,
|
|
283
|
+
toImportSpecifier,
|
|
284
|
+
getStoryImportPaths,
|
|
285
|
+
generateStoryLoaderCode,
|
|
286
|
+
generateAnnotationsCode,
|
|
287
|
+
generatePageCode,
|
|
288
|
+
generateClientCode,
|
|
289
|
+
generateRuntimeCode,
|
|
290
|
+
writeIfChanged,
|
|
291
|
+
resolvePreviewRoute,
|
|
292
|
+
writePreviewRoute,
|
|
293
|
+
removePreviewRoute,
|
|
294
|
+
findGitDir,
|
|
295
|
+
ignoreInGit,
|
|
296
|
+
toProjectRelativeAlias,
|
|
297
|
+
applyPreviewRouteMocks
|
|
298
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_of2djqq8j1 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_of2djqq8j1 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_of2djqq8j1 from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_of2djqq8j1.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_of2djqq8j1.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_of2djqq8j1.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_of2djqq8j1 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_of2djqq8j1 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_of2djqq8j1 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_of2djqq8j1.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_of2djqq8j1.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_of2djqq8j1.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
|
StorybookError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-43EE7M6B.js";
|
|
15
15
|
|
|
16
16
|
// src/manager-errors.ts
|
|
17
17
|
var StatusTypeIdMismatchError = class extends StorybookError {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_of2djqq8j1 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_of2djqq8j1 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_of2djqq8j1 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_of2djqq8j1.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_of2djqq8j1.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_of2djqq8j1.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
|
ADDON_ID2 as ADDON_ID
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RUEDYIYF.js";
|
|
15
15
|
import {
|
|
16
16
|
require_picocolors
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VCDXUGKB.js";
|
|
18
18
|
import {
|
|
19
19
|
__toESM
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-IPIEE34R.js";
|
|
21
21
|
|
|
22
22
|
// src/addon-vitest/logger.ts
|
|
23
23
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_of2djqq8j1 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_of2djqq8j1 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_of2djqq8j1 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_of2djqq8j1.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_of2djqq8j1.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_of2djqq8j1.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_mavmgxtxjxo.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
__commonJS,
|
|
14
14
|
__require
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IPIEE34R.js";
|
|
16
16
|
|
|
17
17
|
// ../../node_modules/yaml/dist/nodes/identity.js
|
|
18
18
|
var require_identity = __commonJS({
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_of2djqq8j1 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_of2djqq8j1 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_of2djqq8j1 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_of2djqq8j1.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_of2djqq8j1.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_of2djqq8j1.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_dist
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YPJFFP22.js";
|
|
15
15
|
import {
|
|
16
16
|
cache,
|
|
17
17
|
up as up3
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ETOEMP6K.js";
|
|
19
19
|
import {
|
|
20
20
|
FORKBOOK_PACKAGE_PATTERNS,
|
|
21
21
|
FORKBOOK_RERUN_INSTRUCTION,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
parseReleaseTime,
|
|
41
41
|
validateConfigurationFiles,
|
|
42
42
|
versions_default
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-PLY7VOL7.js";
|
|
44
44
|
import {
|
|
45
45
|
createModuleResolver,
|
|
46
46
|
isSelfContained,
|
|
@@ -48,17 +48,17 @@ import {
|
|
|
48
48
|
resolveReferencedValue,
|
|
49
49
|
sourceOf,
|
|
50
50
|
unwrapExpression
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-7LMKJKAQ.js";
|
|
52
52
|
import {
|
|
53
53
|
logger
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-KNYUZVVR.js";
|
|
55
55
|
import {
|
|
56
56
|
STORY_FILE_TEST_REGEXP,
|
|
57
57
|
exec,
|
|
58
58
|
execNode,
|
|
59
59
|
execSync,
|
|
60
60
|
getStoryImportPathFromEntry
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-DMQHQOWT.js";
|
|
62
62
|
import {
|
|
63
63
|
BUN_LOCKFILE,
|
|
64
64
|
BUN_LOCKFILE_BINARY,
|
|
@@ -67,23 +67,23 @@ import {
|
|
|
67
67
|
YARN_LOCKFILE,
|
|
68
68
|
getProjectRoot,
|
|
69
69
|
normalizeStoryPath
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-SFXUROK4.js";
|
|
71
71
|
import {
|
|
72
72
|
any,
|
|
73
73
|
from,
|
|
74
74
|
up,
|
|
75
75
|
up2
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-WRHG6PWE.js";
|
|
77
77
|
import {
|
|
78
78
|
importModule,
|
|
79
79
|
resolveModulePath,
|
|
80
80
|
resolvePackageDir,
|
|
81
81
|
safeResolveModule
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-SI3EDPTV.js";
|
|
83
83
|
import {
|
|
84
84
|
jsModuleExtensions,
|
|
85
85
|
jsTsSourceExtensions
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-TG4TFBAD.js";
|
|
87
87
|
import {
|
|
88
88
|
ExecaCommandFailedError,
|
|
89
89
|
PackageInstallDependencyConflictError,
|
|
@@ -94,22 +94,22 @@ import {
|
|
|
94
94
|
PnpmIgnoredBuildsError,
|
|
95
95
|
PnpmNoTtyModulesDirError,
|
|
96
96
|
StorybookError
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-43EE7M6B.js";
|
|
98
98
|
import {
|
|
99
99
|
require_picocolors
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-VCDXUGKB.js";
|
|
101
101
|
import {
|
|
102
102
|
slash
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-66MT4R3I.js";
|
|
104
104
|
import {
|
|
105
105
|
globSync
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-R3ICZFLN.js";
|
|
107
107
|
import {
|
|
108
108
|
require_picomatch
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-GC5GNEU6.js";
|
|
110
110
|
import {
|
|
111
111
|
__toESM
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-IPIEE34R.js";
|
|
113
113
|
|
|
114
114
|
// src/common/presets.ts
|
|
115
115
|
import { logger as logger2 } from "@aussieljk/forkbook/internal/node-logger";
|
|
@@ -3453,7 +3453,7 @@ async function scanAndTransformFiles({
|
|
|
3453
3453
|
initialValue: defaultGlob
|
|
3454
3454
|
});
|
|
3455
3455
|
logger14.log("Scanning for affected files...");
|
|
3456
|
-
let { glob: globFiles } = await import("./dist-
|
|
3456
|
+
let { glob: globFiles } = await import("./dist-ZLGPDQAK.js"), sourceFiles = await globFiles([glob], {
|
|
3457
3457
|
expandDirectories: !1,
|
|
3458
3458
|
...commonGlobOptions(""),
|
|
3459
3459
|
ignore: ["**/node_modules/**"],
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_of2djqq8j1 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_of2djqq8j1 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_of2djqq8j1 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_of2djqq8j1.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_of2djqq8j1.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_of2djqq8j1.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_of2djqq8j1 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_of2djqq8j1 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_of2djqq8j1 from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_of2djqq8j1.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_of2djqq8j1.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_of2djqq8j1.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
require_dist
|
|
14
|
+
} from "./chunk-YPJFFP22.js";
|
|
15
|
+
import "./chunk-IPIEE34R.js";
|
|
16
|
+
export default require_dist();
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_of2djqq8j1 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_of2djqq8j1 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_of2djqq8j1 from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_of2djqq8j1.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_of2djqq8j1.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_of2djqq8j1.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
convertPathToPattern,
|
|
14
|
+
escapePath,
|
|
15
|
+
glob,
|
|
16
|
+
globSync,
|
|
17
|
+
isDynamicPattern
|
|
18
|
+
} from "./chunk-R3ICZFLN.js";
|
|
19
|
+
import "./chunk-GC5GNEU6.js";
|
|
20
|
+
import "./chunk-IPIEE34R.js";
|
|
21
|
+
export {
|
|
22
|
+
convertPathToPattern,
|
|
23
|
+
escapePath,
|
|
24
|
+
glob,
|
|
25
|
+
globSync,
|
|
26
|
+
isDynamicPattern
|
|
27
|
+
};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_of2djqq8j1 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_of2djqq8j1 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_of2djqq8j1 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_of2djqq8j1.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_of2djqq8j1.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_of2djqq8j1.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
|
resolveStorybookConfigDir
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OQF3DZON.js";
|
|
15
15
|
import {
|
|
16
16
|
ToolsRuntimeError,
|
|
17
17
|
projectPathsEqual
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-4EC6ZCAU.js";
|
|
19
19
|
import {
|
|
20
20
|
clearToolsetRegistry,
|
|
21
21
|
getRegisteredToolsets
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-J3LAZZTR.js";
|
|
23
|
+
import "./chunk-QIYPM5FW.js";
|
|
24
|
+
import "./chunk-WFGTVI33.js";
|
|
25
25
|
import {
|
|
26
26
|
clearRegistry
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-CSKLM3SG.js";
|
|
28
|
+
import "./chunk-J4FHHY7S.js";
|
|
29
|
+
import "./chunk-WPGIUS6F.js";
|
|
30
|
+
import "./chunk-GXIROVYL.js";
|
|
31
|
+
import "./chunk-HTAHNPU2.js";
|
|
32
|
+
import "./chunk-43EE7M6B.js";
|
|
33
|
+
import "./chunk-VCDXUGKB.js";
|
|
34
|
+
import "./chunk-IPIEE34R.js";
|
|
35
35
|
|
|
36
36
|
// src/cli/tools/sdk/local-runtime.ts
|
|
37
37
|
import { resolve } from "node:path";
|