@aussieljk/forkbook 0.0.1-6 → 0.0.1-8
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/create/templates/react-native/index.expo.js +4 -4
- package/assets/create/templates/react-native/index.js +5 -5
- package/dist/_browser-chunks/{Color-2BMQTRYG.js → Color-ZG7LKYDZ.js} +1 -1
- package/dist/_browser-chunks/{WithTooltip-GJACFWKM.js → WithTooltip-YZ36EZ4X.js} +3 -3
- package/dist/_browser-chunks/{chunk-X7D777E6.js → chunk-DAUHYZUB.js} +4 -0
- package/dist/_browser-chunks/{chunk-6EJEEII7.js → chunk-E47B5255.js} +2 -2
- package/dist/_browser-chunks/{chunk-6IKB2UHQ.js → chunk-MZVQEZOB.js} +12 -12
- package/dist/_browser-chunks/{chunk-QAHDGPZ7.js → chunk-SK6S7ZXD.js} +1 -1
- package/dist/_browser-chunks/{chunk-DPRGR3QP.js → chunk-WVF42CP2.js} +38 -6
- package/dist/_node-chunks/{attached-runtime-EBWIOQZN.js → attached-runtime-SRP2RPCT.js} +30 -30
- package/dist/_node-chunks/{builder-manager-ETBLZ2RH.js → builder-manager-V7M6SFEM.js} +69 -46
- package/dist/_node-chunks/{chunk-GIOREKIG.js → chunk-27KT3BJI.js} +7 -7
- package/dist/_node-chunks/{chunk-MQFB44YS.js → chunk-27R37QFW.js} +7 -7
- package/dist/_node-chunks/{chunk-4KCQYJT6.js → chunk-2WPUJ7UM.js} +7 -7
- package/dist/_node-chunks/{chunk-KWPWQA7G.js → chunk-2ZB3ZVDY.js} +8 -8
- package/dist/_node-chunks/{chunk-TPSJW4CQ.js → chunk-3KKSPEAE.js} +6 -6
- package/dist/_node-chunks/{chunk-644CUCK5.js → chunk-3KY2GA5X.js} +7 -7
- package/dist/_node-chunks/{chunk-25PXULSJ.js → chunk-3NXJBXBF.js} +15 -15
- package/dist/_node-chunks/{chunk-5T635FTI.js → chunk-4CPTSXU6.js} +10 -10
- package/dist/_node-chunks/{chunk-YQDBSAXW.js → chunk-4QYNOSOA.js} +7 -7
- package/dist/_node-chunks/{chunk-WIQ6Y3NX.js → chunk-4T3WPVSQ.js} +6 -6
- package/dist/_node-chunks/{chunk-BLUMKQQB.js → chunk-4U5ZQZJ4.js} +6 -6
- package/dist/_node-chunks/chunk-4XNKH2BY.js +18 -0
- package/dist/_node-chunks/{chunk-4MJIPOJ5.js → chunk-526SOV2Y.js} +6 -6
- package/dist/_node-chunks/{chunk-J6M5CRYZ.js → chunk-54WGE5OK.js} +10 -10
- package/dist/_node-chunks/{chunk-JPXJI6QR.js → chunk-5BQKMZYJ.js} +27 -32
- package/dist/_node-chunks/{chunk-P65JVLO3.js → chunk-62PEOH4P.js} +8 -8
- package/dist/_node-chunks/{chunk-R5DWO2S2.js → chunk-6DCYMQX2.js} +29 -29
- package/dist/_node-chunks/{chunk-NZ7EQWYA.js → chunk-6DZY675E.js} +9 -9
- package/dist/_node-chunks/{chunk-ZC3ZZKMS.js → chunk-6GBMB2E4.js} +8 -8
- package/dist/_node-chunks/{chunk-FQWTUSYB.js → chunk-6YDXCU32.js} +6 -6
- package/dist/_node-chunks/{chunk-HUPRQZ3I.js → chunk-77YIWZPS.js} +7 -7
- package/dist/_node-chunks/{chunk-L4JGWK4K.js → chunk-7GLNBVQO.js} +6 -6
- package/dist/_node-chunks/{chunk-CGVPHZVD.js → chunk-7YBOQWWR.js} +8 -8
- package/dist/_node-chunks/{chunk-YPGVYNJB.js → chunk-A73YRJPA.js} +7 -7
- package/dist/_node-chunks/{chunk-C5JG7EKF.js → chunk-BLAPFOIX.js} +6 -6
- package/dist/_node-chunks/{chunk-CBUQY454.js → chunk-BPMXWGDX.js} +6 -6
- package/dist/_node-chunks/{chunk-SLZV7PTQ.js → chunk-BY65FGKD.js} +8 -8
- package/dist/_node-chunks/{chunk-3UWWRDA5.js → chunk-CHPKBTH7.js} +7 -7
- package/dist/_node-chunks/{chunk-GRTI5653.js → chunk-CL4T6DGA.js} +7 -7
- package/dist/_node-chunks/{chunk-AS4SFRCZ.js → chunk-CT3L2NXZ.js} +6 -6
- package/dist/_node-chunks/{chunk-YHH57LHY.js → chunk-CZDEJ7DD.js} +9 -9
- package/dist/_node-chunks/{chunk-TN3ULFFZ.js → chunk-D4IL5V6A.js} +6 -6
- package/dist/_node-chunks/{chunk-YNENOZRY.js → chunk-DADJTKJT.js} +7 -7
- package/dist/_node-chunks/{chunk-N7HEOGTM.js → chunk-DGA2Q7TE.js} +6 -6
- package/dist/_node-chunks/{chunk-I7HRDCNY.js → chunk-DSWCMXKR.js} +10 -10
- package/dist/_node-chunks/{chunk-FIFCNBTL.js → chunk-DVSKRIH3.js} +7 -7
- package/dist/_node-chunks/{chunk-ANDQVXYX.js → chunk-F2XPZVCK.js} +8 -8
- package/dist/_node-chunks/{chunk-E3O7VAPG.js → chunk-G3J2VAY4.js} +10 -10
- package/dist/_node-chunks/{chunk-2DBJWMYE.js → chunk-G6UTEYYQ.js} +8 -8
- package/dist/_node-chunks/{chunk-ALHPFKVB.js → chunk-GUKZDREX.js} +8 -8
- package/dist/_node-chunks/{chunk-TMXWDY2O.js → chunk-GXSB54NU.js} +6 -6
- package/dist/_node-chunks/{chunk-CF7KLGUW.js → chunk-HF6FRLS6.js} +125 -144
- package/dist/_node-chunks/{chunk-ZSH6BUCW.js → chunk-HNMHTOKI.js} +23 -23
- package/dist/_node-chunks/{chunk-IFPMZ247.js → chunk-I26RWAW3.js} +6 -6
- package/dist/_node-chunks/{chunk-G6YNW4FK.js → chunk-I5Y7NDAM.js} +7 -7
- package/dist/_node-chunks/{chunk-ZNSGFYAT.js → chunk-IAYHJZOR.js} +6 -6
- package/dist/_node-chunks/{chunk-MFN2XBPL.js → chunk-ICGRYYV7.js} +7 -7
- package/dist/_node-chunks/{chunk-PAN35AYX.js → chunk-IFF53QVX.js} +7 -7
- package/dist/_node-chunks/{chunk-Z4NZLBOX.js → chunk-II4SIIJW.js} +7 -7
- package/dist/_node-chunks/{chunk-ZCITDAV4.js → chunk-IVU4D6LF.js} +7 -7
- package/dist/_node-chunks/{chunk-OLGIDCVD.js → chunk-JB5Q4WGX.js} +7 -7
- package/dist/_node-chunks/{chunk-MDW3GSU3.js → chunk-JCLP42A7.js} +7 -7
- package/dist/_node-chunks/{chunk-LWKLJYYQ.js → chunk-KQBTXUT5.js} +7 -7
- package/dist/_node-chunks/{chunk-4WLIN3VZ.js → chunk-LF7EC235.js} +8 -8
- package/dist/_node-chunks/{chunk-DCNZ6SFN.js → chunk-LPLXO4HE.js} +6 -6
- package/dist/_node-chunks/{chunk-HKL3VOYX.js → chunk-LSKOVF6F.js} +6 -6
- package/dist/_node-chunks/{chunk-YMZ2SGFK.js → chunk-LYMYDMEK.js} +6 -6
- package/dist/_node-chunks/{chunk-QNUXGVZZ.js → chunk-M3F5R2JO.js} +6 -6
- package/dist/_node-chunks/{chunk-HWRHYM7Z.js → chunk-M74NU6PU.js} +6 -6
- package/dist/_node-chunks/{chunk-JZWF3XLN.js → chunk-MGFH4KGP.js} +6 -6
- package/dist/_node-chunks/{chunk-TYBPAV3X.js → chunk-NORBEBNM.js} +6 -6
- package/dist/_node-chunks/{chunk-4XNPO23I.js → chunk-NV6HM53D.js} +6 -6
- package/dist/_node-chunks/{chunk-WRG3CFGS.js → chunk-OFZX45ZR.js} +6 -6
- package/dist/_node-chunks/{chunk-A35J7YYA.js → chunk-OZBNKCKM.js} +6 -6
- package/dist/_node-chunks/{chunk-Q4BEWGMK.js → chunk-QEDRYWP7.js} +7 -7
- package/dist/_node-chunks/{chunk-KF3FT3NI.js → chunk-QQ7GEJNY.js} +9 -9
- package/dist/_node-chunks/{chunk-ZTFNOXZF.js → chunk-QQKVXB5Q.js} +6 -6
- package/dist/_node-chunks/{chunk-YCXTTQ7K.js → chunk-QVIC3UDL.js} +8 -8
- package/dist/_node-chunks/{chunk-252Y5WHZ.js → chunk-RR3WLRNQ.js} +7 -7
- package/dist/_node-chunks/chunk-SBNQ6YGM.js +11 -0
- package/dist/_node-chunks/{chunk-GGTXOH3W.js → chunk-SNQKCFKN.js} +6 -6
- package/dist/_node-chunks/{chunk-PLWLCVP2.js → chunk-T62LXT34.js} +6 -6
- package/dist/_node-chunks/{chunk-LXVSVTQ3.js → chunk-TBLZESXE.js} +6 -6
- package/dist/_node-chunks/{chunk-MZ2GSR3G.js → chunk-TLB2LNUO.js} +17 -14
- package/dist/_node-chunks/{chunk-DRLBJM6X.js → chunk-UBEILYLL.js} +7 -7
- package/dist/_node-chunks/{chunk-5Z6MT4RI.js → chunk-UCBUYT7S.js} +7 -7
- package/dist/_node-chunks/{chunk-GQ3HJNIH.js → chunk-UEWCGYSE.js} +44 -10
- package/dist/_node-chunks/{chunk-GOFK4EKU.js → chunk-VPGX2PAB.js} +6 -6
- package/dist/_node-chunks/{chunk-NX6CSWF3.js → chunk-VQ2NW4OR.js} +8 -8
- package/dist/_node-chunks/{chunk-XWGMQW2H.js → chunk-VTLGMRU5.js} +6 -6
- package/dist/_node-chunks/{chunk-VPU4E7DI.js → chunk-VTVQ5TKB.js} +8 -8
- package/dist/_node-chunks/{chunk-LFIFBDMS.js → chunk-VV6CPF3T.js} +6 -6
- package/dist/_node-chunks/{chunk-XOGU5PWI.js → chunk-WF7RDUU7.js} +10 -10
- package/dist/_node-chunks/{chunk-7E27CGRU.js → chunk-X5IJ42Q2.js} +7 -7
- package/dist/_node-chunks/{chunk-GDFQQO5U.js → chunk-XGMO4SW2.js} +8 -8
- package/dist/_node-chunks/{chunk-TIRP5JQM.js → chunk-XTCOGCTP.js} +7 -7
- package/dist/_node-chunks/{chunk-NUAQC3XP.js → chunk-Y2HWZ262.js} +50 -50
- package/dist/_node-chunks/{chunk-X3RTVNRN.js → chunk-YBRV5FIK.js} +7 -7
- package/dist/_node-chunks/{chunk-DABFUVLR.js → chunk-YHWOGAFM.js} +6 -6
- package/dist/_node-chunks/{chunk-DDGW2EBW.js → chunk-YMVL55QY.js} +9 -9
- package/dist/_node-chunks/{chunk-JS2J2SKX.js → chunk-ZKS2H56J.js} +6 -6
- package/dist/_node-chunks/dist-GJ53PFWF.js +27 -0
- package/dist/_node-chunks/dist-TLMACGH6.js +16 -0
- package/dist/_node-chunks/{local-runtime-BUTEKJYV.js → local-runtime-Y6OH2SFM.js} +20 -20
- package/dist/_node-chunks/{mdx-plugin-7WXQIHPV.js → mdx-plugin-R6GNGQP2.js} +13 -13
- package/dist/_node-chunks/{monorepo-NCD3X2BR.js → monorepo-R2CLQIWG.js} +11 -11
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-SD3B272K.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-PTWFSPXD.js} +11 -11
- package/dist/_node-chunks/optimized-tests-DIPB4OM6.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-3QJANDJD.js → pattern-copy-play-5VCD6ED3.js} +11 -11
- package/dist/_node-chunks/postinstallAddon-PSN7XRSV.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-4LR5BDR2.js → rehype-external-links-SKSQEDUP.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-PWFRGOEV.js → rehype-slug-27WNXM7U.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-VNNWUW7X.js → relaxed-limits-PDGCGDW4.js} +11 -11
- package/dist/_node-chunks/{run-YK6ARCWS.js → run-BD52SWQC.js} +17 -17
- package/dist/_node-chunks/{run-RUAAWEQT.js → run-IKBDOUY2.js} +273 -13
- package/dist/_node-chunks/session-id-K7PM5ZGL.js +23 -0
- package/dist/_node-chunks/{setup-4QKCICV6.js → setup-7ECNMG4A.js} +8 -8
- package/dist/_node-chunks/{vitest.config.4.template-WVFLIXN7.js → vitest.config.4.template-J4YODMMP.js} +7 -7
- package/dist/addon-a11y/manager.js +6 -6
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-docs/blocks.js +10 -10
- 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 +10 -10
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +11 -8
- 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 +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 +15 -15
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +62 -62
- package/dist/bin/dispatcher.js +18 -16
- package/dist/bin/loader.js +8 -8
- package/dist/builder-vite/index.js +15 -15
- package/dist/builder-vite/preset.js +13 -13
- package/dist/{chunk-DuDsmeM7.d.ts → chunk-CFk6djyM.d.ts} +4 -4
- package/dist/{chunk-CVY28Ngy.d.ts → chunk-CJY2njs4.d.ts} +1 -1
- package/dist/{chunk-CzmZhVrn.d.ts → chunk-DktrsDd6.d.ts} +13 -8
- package/dist/{chunk-BWzbIWPz.d.ts → chunk-Dw_4ad2Y.d.ts} +5 -5
- package/dist/{chunk-ClI-HEh5.d.ts → chunk-pFH9P91a.d.ts} +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +22 -22
- package/dist/cli/skills/content/index.d.ts +1 -1
- package/dist/cli/skills/content/index.js +2 -2
- package/dist/cli/tools/sdk/child-host.d.ts +1 -1
- package/dist/cli/tools/sdk/child-host.js +17 -17
- package/dist/cli/tools/sdk/index.d.ts +1 -1
- package/dist/cli/tools/sdk/index.js +18 -18
- package/dist/cli-commands/bin/index.js +7 -7
- package/dist/common/index.d.ts +14 -27
- package/dist/common/index.js +36 -40
- package/dist/components/index.js +30 -30
- package/dist/core-server/index.d.ts +6 -6
- package/dist/core-server/index.js +69 -69
- package/dist/core-server/presets/common-manager.js +7 -7
- 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-tools/index.d.ts +12 -0
- package/dist/csf-tools/index.js +12 -12
- package/dist/manager/_manager-chunks/{globals-runtime-BUP5e_t9.js → globals-runtime-4fCHtNC6.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-CdgVeAbk.js → globals-runtime-BKW-4ztO.js} +7 -7
- package/dist/manager/_manager-chunks/{globals-runtime-DedfO-DP.js → globals-runtime-BO0pfoqL.js} +4 -4
- package/dist/manager/_manager-chunks/{globals-runtime-C7mqoHpE.js → globals-runtime-BZKYJxYC.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-CrIF09P8.js → globals-runtime-Bpc_ftuT.js} +8 -2
- package/dist/manager/_manager-chunks/{globals-runtime-B-IeQLQu.js → globals-runtime-CIcNS9TG.js} +12 -12
- package/dist/manager/_manager-chunks/{globals-runtime-XSxCU7PR.js → globals-runtime-CTyYXvUm.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-B71TiXST.js → globals-runtime-CoCzM1V_.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-DMBjo1QS.js → globals-runtime-D82vqOGq.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-CYNosEiD.js → globals-runtime-DB8fVA5g.js} +2 -144
- package/dist/manager/_manager-chunks/{globals-runtime-CvyFEPIY.js → globals-runtime-DOPUchia.js} +3 -3
- package/dist/manager/_manager-chunks/{globals-runtime-DUK6bGcb.js → globals-runtime-DZN_3ZLm.js} +99 -39
- package/dist/manager/_manager-chunks/{globals-runtime-C_evJrEn.js → globals-runtime-Dbt08xWQ.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-DqhIYwLp.js → globals-runtime-DgUeynuu.js} +75 -75
- package/dist/manager/_manager-chunks/{globals-runtime-B5-0Ccbv.js → globals-runtime-WhJXr5R1.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-Ct1kY4wb.js → globals-runtime-kmPSyf3j.js} +1 -1
- package/dist/manager/_manager-chunks/{globals-runtime-Cqn8KdSZ.js → globals-runtime-z143vedu.js} +10 -10
- package/dist/manager/_manager-chunks/{runtime-CqItbdKW.js → runtime-5o_11Jae.js} +1 -1
- package/dist/manager/_manager-chunks/{runtime-CUymj6EY.js → runtime-B_U-7omv.js} +139 -147
- package/dist/manager/_manager-chunks/{runtime-EITvVbkG.js → runtime-BdGkqNEt.js} +1 -2
- package/dist/manager/_manager-chunks/{runtime-BgYvp1WN.js → runtime-BrlctLSK.js} +82 -301
- package/dist/manager/_manager-chunks/{runtime-DrTLBe7a.js → runtime-BrwmuSZ1.js} +46 -22
- package/dist/manager/_manager-chunks/runtime-C-s1miBr.js +294 -0
- package/dist/manager/_manager-chunks/{runtime-DER98nV0.js → runtime-CHQZzIX6.js} +9 -12
- package/dist/manager/_manager-chunks/{runtime-D4ZOOIV0.js → runtime-DEHcqyTM.js} +4 -4
- package/dist/manager/_manager-chunks/{runtime-MAf7Wpk5.js → runtime-Dtpc5s3G.js} +501 -43
- package/dist/manager/_manager-chunks/{runtime-CHI-LHF1.js → runtime-DuptfEhw.js} +5 -147
- package/dist/manager/_manager-chunks/{runtime-CaU1DSEZ.js → runtime-P663lpsR.js} +1 -1
- 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 +2 -2
- 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/nextjs-vite/index.d.ts +2 -2
- 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 +92 -13
- 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.js +9 -9
- package/dist/oxc-parser/index.js +10 -10
- package/dist/oxc-parser/worker.js +10 -10
- package/dist/preview-api/index.d.ts +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 +12 -12
- package/dist/react-native/index.d.ts +8 -8
- package/dist/react-native/index.js +3 -3
- package/dist/react-native/metro/node.js +10 -10
- package/dist/react-native/metro/{withStorybook.d.ts → withForkbook.d.ts} +9 -9
- package/dist/react-native/metro/{withStorybook.js → withForkbook.js} +16 -16
- 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-vite/index.d.ts +2 -2
- package/dist/react-vite/node/index.d.ts +3 -3
- package/dist/react-vite/node/index.js +7 -7
- package/dist/react-vite/preset.js +7 -7
- package/dist/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.d.ts +3 -3
- package/dist/telemetry/index.js +43 -43
- package/dist/types/index.d.ts +2 -2
- package/package.json +11 -8
- package/dist/_node-chunks/chunk-UUE3PSJB.js +0 -11
- package/dist/_node-chunks/chunk-VKNRNBTB.js +0 -18
- package/dist/_node-chunks/dist-GGTGKXZA.js +0 -27
- package/dist/_node-chunks/dist-NS676VJR.js +0 -16
- package/dist/_node-chunks/optimized-tests-ITVOHEOA.js +0 -22
- package/dist/_node-chunks/postinstallAddon-LEUHOKX6.js +0 -20
- package/dist/_node-chunks/session-id-JJYVZAKO.js +0 -23
- package/dist/manager/_manager-chunks/runtime-BR5z0WoJ.js +0 -456
- package/dist/manager/_manager-chunks/runtime-cVFIMcca.js +0 -22
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_b2whu6ooy6h from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_b2whu6ooy6h from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_b2whu6ooy6h from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_b2whu6ooy6h.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_b2whu6ooy6h.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_b2whu6ooy6h.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
instructions
|
|
14
|
+
} from "./chunk-BY65FGKD.js";
|
|
15
|
+
import "./chunk-54WGE5OK.js";
|
|
16
|
+
import "./chunk-M3F5R2JO.js";
|
|
17
|
+
import "./chunk-VTLGMRU5.js";
|
|
18
|
+
import "./chunk-SNQKCFKN.js";
|
|
19
|
+
import "./chunk-OZBNKCKM.js";
|
|
20
|
+
export {
|
|
21
|
+
instructions
|
|
22
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_b2whu6ooy6h from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_b2whu6ooy6h from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_b2whu6ooy6h from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_b2whu6ooy6h.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_b2whu6ooy6h.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_b2whu6ooy6h.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
|
getDocsMarkdownUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-M3F5R2JO.js";
|
|
15
15
|
import {
|
|
16
16
|
getTypeImportSource
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-VTLGMRU5.js";
|
|
18
|
+
import "./chunk-OZBNKCKM.js";
|
|
19
19
|
|
|
20
20
|
// src/cli/skills/content/setup-prompts/pattern-copy-play.ts
|
|
21
21
|
import {
|
|
@@ -604,9 +604,9 @@ function instructions(projectInfo) {
|
|
|
604
604
|
|
|
605
605
|
\`\`\`ts
|
|
606
606
|
// ${configDir}/main.ts
|
|
607
|
-
import type {
|
|
607
|
+
import type { ForkbookConfig } from "${typeImport}";
|
|
608
608
|
|
|
609
|
-
const config:
|
|
609
|
+
const config: ForkbookConfig = {
|
|
610
610
|
staticDirs: ["../public"],
|
|
611
611
|
};
|
|
612
612
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_b2whu6ooy6h from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_b2whu6ooy6h from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_b2whu6ooy6h from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_b2whu6ooy6h.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_b2whu6ooy6h.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_b2whu6ooy6h.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
postinstallAddon
|
|
14
|
+
} from "./chunk-DADJTKJT.js";
|
|
15
|
+
import "./chunk-UBEILYLL.js";
|
|
16
|
+
import "./chunk-3KKSPEAE.js";
|
|
17
|
+
import "./chunk-OZBNKCKM.js";
|
|
18
|
+
export {
|
|
19
|
+
postinstallAddon
|
|
20
|
+
};
|
package/dist/_node-chunks/{rehype-external-links-4LR5BDR2.js → rehype-external-links-SKSQEDUP.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_b2whu6ooy6h from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_b2whu6ooy6h from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_b2whu6ooy6h from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_b2whu6ooy6h.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_b2whu6ooy6h.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_b2whu6ooy6h.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
@@ -12,11 +12,11 @@ var require = CJS_COMPAT_NODE_MODULE_7qov04rgzsv.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
esm_default,
|
|
14
14
|
parse
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LYMYDMEK.js";
|
|
16
16
|
import {
|
|
17
17
|
visit
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-DGA2Q7TE.js";
|
|
19
|
+
import "./chunk-OZBNKCKM.js";
|
|
20
20
|
|
|
21
21
|
// ../../node_modules/hast-util-is-element/lib/index.js
|
|
22
22
|
var convertElement = (
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_b2whu6ooy6h from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_b2whu6ooy6h from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_b2whu6ooy6h from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_b2whu6ooy6h.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_b2whu6ooy6h.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_b2whu6ooy6h.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
|
visit
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DGA2Q7TE.js";
|
|
15
15
|
import {
|
|
16
16
|
BananaSlug
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-LSKOVF6F.js";
|
|
18
|
+
import "./chunk-OZBNKCKM.js";
|
|
19
19
|
|
|
20
20
|
// ../../node_modules/hast-util-heading-rank/lib/index.js
|
|
21
21
|
function headingRank(node) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_b2whu6ooy6h from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_b2whu6ooy6h from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_b2whu6ooy6h from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_b2whu6ooy6h.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_b2whu6ooy6h.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_b2whu6ooy6h.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
@@ -37,13 +37,13 @@ import {
|
|
|
37
37
|
verifyStep,
|
|
38
38
|
vitestPassesStrictDOD,
|
|
39
39
|
writeStoriesStep
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-54WGE5OK.js";
|
|
41
41
|
import {
|
|
42
42
|
getDocsMarkdownUrl
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
43
|
+
} from "./chunk-M3F5R2JO.js";
|
|
44
|
+
import "./chunk-VTLGMRU5.js";
|
|
45
|
+
import "./chunk-SNQKCFKN.js";
|
|
46
|
+
import "./chunk-OZBNKCKM.js";
|
|
47
47
|
|
|
48
48
|
// src/cli/skills/content/setup-prompts/relaxed-limits.ts
|
|
49
49
|
import { dedent } from "ts-dedent";
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_b2whu6ooy6h from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_b2whu6ooy6h from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_b2whu6ooy6h from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_b2whu6ooy6h.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_b2whu6ooy6h.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_b2whu6ooy6h.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
|
initiate
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-Y2HWZ262.js";
|
|
15
|
+
import "./chunk-6DZY675E.js";
|
|
16
|
+
import "./chunk-D4IL5V6A.js";
|
|
17
17
|
import {
|
|
18
18
|
version
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4XNKH2BY.js";
|
|
20
20
|
import {
|
|
21
21
|
e,
|
|
22
22
|
i
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-526SOV2Y.js";
|
|
24
|
+
import "./chunk-QEDRYWP7.js";
|
|
25
|
+
import "./chunk-4U5ZQZJ4.js";
|
|
26
|
+
import "./chunk-4T3WPVSQ.js";
|
|
27
|
+
import "./chunk-UBEILYLL.js";
|
|
28
|
+
import "./chunk-3KKSPEAE.js";
|
|
29
|
+
import "./chunk-OZBNKCKM.js";
|
|
30
30
|
|
|
31
31
|
// src/create/bin/run.ts
|
|
32
32
|
import { ProjectType } from "@aussieljk/forkbook/internal/cli";
|
|
@@ -1,33 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_b2whu6ooy6h from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_b2whu6ooy6h from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_b2whu6ooy6h from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_b2whu6ooy6h.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_b2whu6ooy6h.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_b2whu6ooy6h.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
|
postinstallAddon
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DADJTKJT.js";
|
|
15
15
|
import {
|
|
16
16
|
version
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4XNKH2BY.js";
|
|
18
18
|
import {
|
|
19
19
|
leven
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-M74NU6PU.js";
|
|
21
|
+
import "./chunk-UBEILYLL.js";
|
|
22
|
+
import "./chunk-3KKSPEAE.js";
|
|
23
23
|
import {
|
|
24
24
|
require_picocolors
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-27R37QFW.js";
|
|
26
|
+
import {
|
|
27
|
+
glob
|
|
28
|
+
} from "./chunk-QVIC3UDL.js";
|
|
29
|
+
import "./chunk-IVU4D6LF.js";
|
|
26
30
|
import {
|
|
27
31
|
__commonJS,
|
|
28
32
|
__require,
|
|
29
33
|
__toESM
|
|
30
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-OZBNKCKM.js";
|
|
31
35
|
|
|
32
36
|
// ../../node_modules/envinfo/dist/envinfo.js
|
|
33
37
|
var require_envinfo = __commonJS({
|
|
@@ -4435,6 +4439,245 @@ function isValidVersion(version2) {
|
|
|
4435
4439
|
return SemVer.valid(version2) || version2.match(/^\d+$/);
|
|
4436
4440
|
}
|
|
4437
4441
|
|
|
4442
|
+
// src/cli-commands/migrate.ts
|
|
4443
|
+
import { existsSync } from "node:fs";
|
|
4444
|
+
import { readFile, rename, writeFile } from "node:fs/promises";
|
|
4445
|
+
import { join, relative as relative2 } from "node:path";
|
|
4446
|
+
var IMPORT_RULES = [
|
|
4447
|
+
[/(['"])@storybook\/([a-z-]+)/g, "$1@aussieljk/forkbook/$2"],
|
|
4448
|
+
[/(['"])storybook\//g, "$1@aussieljk/forkbook/"]
|
|
4449
|
+
], ENV_RULE = [/(?<![A-Za-z0-9])(_*)STORYBOOK_/g, "$1FORKBOOK_"], NAME_RULES = [
|
|
4450
|
+
[/\.rnstorybook\b/g, ".rnforkbook"],
|
|
4451
|
+
[/(?<![\w-])\.storybook\b/g, ".forkbook"],
|
|
4452
|
+
[/storybook\.requires/g, "forkbook.requires"],
|
|
4453
|
+
[
|
|
4454
|
+
/@storybook\/react-native\/metro\/withStorybook/g,
|
|
4455
|
+
"@aussieljk/forkbook/react-native/metro/withForkbook"
|
|
4456
|
+
],
|
|
4457
|
+
[/withStorybook/g, "withForkbook"],
|
|
4458
|
+
[/\bStorybookConfig\b/g, "ForkbookConfig"]
|
|
4459
|
+
], SCRIPT_RULES = [
|
|
4460
|
+
[/\bsb-rn-get-stories\b/g, "forkbook rn-stories"],
|
|
4461
|
+
[/(?<![\w@/.-])storybook(?=[\s:]|$)/g, "forkbook"]
|
|
4462
|
+
], MOVES = [
|
|
4463
|
+
[".storybook", ".forkbook"],
|
|
4464
|
+
[".rnstorybook", ".rnforkbook"],
|
|
4465
|
+
[".rnforkbook/storybook.requires.ts", ".rnforkbook/forkbook.requires.ts"],
|
|
4466
|
+
[".rnforkbook/storybook.requires.js", ".rnforkbook/forkbook.requires.js"]
|
|
4467
|
+
], CSS_RULE = [/(?<![\w-])(--)?sb-(?=[a-z])/g, "$1fb-"], SOURCE_GLOBS = ["**/*.{js,jsx,ts,tsx,mjs,cjs,mts,cts,mdx,css,scss,sass,less,html}", ".env*"], IGNORE = [
|
|
4468
|
+
"**/node_modules/**",
|
|
4469
|
+
"**/dist/**",
|
|
4470
|
+
"**/build/**",
|
|
4471
|
+
"**/.next/**",
|
|
4472
|
+
"**/storybook-static/**"
|
|
4473
|
+
], isStorybookPackage = (name) => name === "storybook" || name.startsWith("@storybook/");
|
|
4474
|
+
function apply(text, rules) {
|
|
4475
|
+
return rules.reduce((out, [pattern, replacement]) => out.replace(pattern, replacement), text);
|
|
4476
|
+
}
|
|
4477
|
+
function migrateSource(text) {
|
|
4478
|
+
return apply(text, [NAME_RULES[3], ...IMPORT_RULES, ...NAME_RULES, ENV_RULE, CSS_RULE]);
|
|
4479
|
+
}
|
|
4480
|
+
function installCommand(cwd) {
|
|
4481
|
+
return existsSync(join(cwd, "pnpm-lock.yaml")) ? "pnpm install" : existsSync(join(cwd, "yarn.lock")) ? "yarn install" : existsSync(join(cwd, "package-lock.json")) ? "npm install" : "bun install";
|
|
4482
|
+
}
|
|
4483
|
+
async function migrate({
|
|
4484
|
+
cwd = process.cwd(),
|
|
4485
|
+
dryRun = !1,
|
|
4486
|
+
version: version2
|
|
4487
|
+
}) {
|
|
4488
|
+
let changedFiles = [], removedPackages = [], packageJsonPath = join(cwd, "package.json"), packageJson = JSON.parse(await readFile(packageJsonPath, "utf8"));
|
|
4489
|
+
for (let field of [
|
|
4490
|
+
"dependencies",
|
|
4491
|
+
"devDependencies",
|
|
4492
|
+
"peerDependencies",
|
|
4493
|
+
"optionalDependencies"
|
|
4494
|
+
]) {
|
|
4495
|
+
let deps = packageJson[field];
|
|
4496
|
+
for (let name of Object.keys(deps ?? {}))
|
|
4497
|
+
deps && isStorybookPackage(name) && (delete deps[name], removedPackages.push(name));
|
|
4498
|
+
}
|
|
4499
|
+
packageJson.devDependencies = {
|
|
4500
|
+
...packageJson.devDependencies,
|
|
4501
|
+
"@aussieljk/forkbook": `^${version2}`
|
|
4502
|
+
}, packageJson.scripts && (packageJson.scripts = Object.fromEntries(
|
|
4503
|
+
Object.entries(packageJson.scripts).map(([name, script]) => [
|
|
4504
|
+
apply(name, SCRIPT_RULES),
|
|
4505
|
+
apply(script, [ENV_RULE, ...NAME_RULES, ...SCRIPT_RULES])
|
|
4506
|
+
])
|
|
4507
|
+
));
|
|
4508
|
+
let before = await readFile(packageJsonPath, "utf8"), after = `${JSON.stringify(packageJson, null, 2)}
|
|
4509
|
+
`;
|
|
4510
|
+
after !== before && (changedFiles.push("package.json"), dryRun || await writeFile(packageJsonPath, after));
|
|
4511
|
+
let moved = [];
|
|
4512
|
+
for (let [from, to] of MOVES) {
|
|
4513
|
+
let source = join(cwd, dryRun ? from.replace(".rnforkbook/", ".rnstorybook/") : from);
|
|
4514
|
+
existsSync(source) && !existsSync(join(cwd, to)) && (moved.push(`${from} -> ${to}`), dryRun || await rename(source, join(cwd, to)));
|
|
4515
|
+
}
|
|
4516
|
+
let files = await glob(SOURCE_GLOBS, { cwd, dot: !0, ignore: IGNORE, absolute: !0 });
|
|
4517
|
+
for (let file of files.sort()) {
|
|
4518
|
+
let text = await readFile(file, "utf8"), next = migrateSource(text);
|
|
4519
|
+
next !== text && (changedFiles.push(relative2(cwd, file)), dryRun || await writeFile(file, next));
|
|
4520
|
+
}
|
|
4521
|
+
return {
|
|
4522
|
+
moved,
|
|
4523
|
+
removedPackages,
|
|
4524
|
+
addedPackage: `@aussieljk/forkbook@^${version2}`,
|
|
4525
|
+
changedFiles,
|
|
4526
|
+
installCommand: installCommand(cwd)
|
|
4527
|
+
};
|
|
4528
|
+
}
|
|
4529
|
+
|
|
4530
|
+
// src/cli-commands/pages.ts
|
|
4531
|
+
import { existsSync as existsSync2 } from "node:fs";
|
|
4532
|
+
import { mkdir, readFile as readFile2, writeFile as writeFile2 } from "node:fs/promises";
|
|
4533
|
+
import { dirname, join as join2, relative as relative3 } from "node:path";
|
|
4534
|
+
var HELPER_FILE = "page.tsx";
|
|
4535
|
+
function routeFromPage(pagePath) {
|
|
4536
|
+
return `/${dirname(pagePath).split("/").filter((segment) => segment !== "." && !/^\(.*\)$/.test(segment) && !segment.startsWith("@")).join("/")}`;
|
|
4537
|
+
}
|
|
4538
|
+
function isRedirectOnly(source) {
|
|
4539
|
+
return /\b(redirect|permanentRedirect)\s*\(/.test(source) && !/<[A-Za-z]/.test(source);
|
|
4540
|
+
}
|
|
4541
|
+
var hasStaticParams = (source) => /export\s+(async\s+)?function\s+generateStaticParams\b|export\s+(const|let)\s+generateStaticParams\b/.test(
|
|
4542
|
+
source
|
|
4543
|
+
), importPath = (from, to) => {
|
|
4544
|
+
let path = relative3(dirname(from), to).replace(/\.tsx?$/, "");
|
|
4545
|
+
return path.startsWith(".") ? path : `./${path}`;
|
|
4546
|
+
};
|
|
4547
|
+
function pageStory({
|
|
4548
|
+
storyPath,
|
|
4549
|
+
helperPath,
|
|
4550
|
+
route,
|
|
4551
|
+
withStaticParams
|
|
4552
|
+
}) {
|
|
4553
|
+
let title = route === "/" ? "index" : route.slice(1), name = title.split("/").at(-1), pageImport = withStaticParams ? "Page, { generateStaticParams }" : "Page", options = withStaticParams ? ", { generateStaticParams }" : "";
|
|
4554
|
+
return `import type { Meta, StoryObj } from '@aussieljk/forkbook/nextjs-vite';
|
|
4555
|
+
|
|
4556
|
+
import { page } from '${importPath(storyPath, helperPath)}';
|
|
4557
|
+
import ${pageImport} from './page';
|
|
4558
|
+
|
|
4559
|
+
const meta = {
|
|
4560
|
+
title: ${JSON.stringify(title)},
|
|
4561
|
+
tags: ['!autodocs'],
|
|
4562
|
+
...page(${JSON.stringify(route)}, Page${options}),
|
|
4563
|
+
} satisfies Meta;
|
|
4564
|
+
|
|
4565
|
+
export default meta;
|
|
4566
|
+
|
|
4567
|
+
export const Default: StoryObj = { name: ${JSON.stringify(name)} };
|
|
4568
|
+
`;
|
|
4569
|
+
}
|
|
4570
|
+
function pageHelper({
|
|
4571
|
+
helperPath,
|
|
4572
|
+
layoutPath
|
|
4573
|
+
}) {
|
|
4574
|
+
return `import { Children, Fragment, cloneElement, isValidElement } from 'react';
|
|
4575
|
+
import type { ComponentType, ReactNode } from 'react';
|
|
4576
|
+
|
|
4577
|
+
${layoutPath ? `import RootLayout from '${importPath(helperPath, layoutPath)}';
|
|
4578
|
+
` : ""}
|
|
4579
|
+
type Params = Record<string, string | string[]>;
|
|
4580
|
+
|
|
4581
|
+
interface PageOptions {
|
|
4582
|
+
generateStaticParams?: () => Params[] | Promise<Params[]>;
|
|
4583
|
+
}
|
|
4584
|
+
|
|
4585
|
+
const SLOT = '__forkbook_page_slot__';
|
|
4586
|
+
|
|
4587
|
+
const isAsync = (component: unknown) =>
|
|
4588
|
+
Object.prototype.toString.call(component) === '[object AsyncFunction]';
|
|
4589
|
+
|
|
4590
|
+
/** Puts \`params\` into the dynamic segments of a route: \`/blog/[slug]\` to \`/blog/hello\`. */
|
|
4591
|
+
function fillRoute(route: string, params: Params) {
|
|
4592
|
+
return route.replace(/\\[{1,2}(?:\\.\\.\\.)?([^\\]]+)\\]{1,2}/g, (_, key: string) => {
|
|
4593
|
+
const value = params[key];
|
|
4594
|
+
return Array.isArray(value) ? value.join('/') : (value ?? key);
|
|
4595
|
+
});
|
|
4596
|
+
}
|
|
4597
|
+
|
|
4598
|
+
/** Keeps the layout chrome (header, footer) and removes \`<html>\` and \`<body>\`. */
|
|
4599
|
+
function chrome(node: ReactNode, page: ReactNode): ReactNode {
|
|
4600
|
+
return Children.map(node, (child) => {
|
|
4601
|
+
if (!isValidElement<{ children?: ReactNode }>(child)) {
|
|
4602
|
+
return child;
|
|
4603
|
+
}
|
|
4604
|
+
if (child.type === SLOT) {
|
|
4605
|
+
return page;
|
|
4606
|
+
}
|
|
4607
|
+
const children = chrome(child.props.children, page);
|
|
4608
|
+
if (child.type === 'html' || child.type === 'body') {
|
|
4609
|
+
return <Fragment key={child.key}>{children}</Fragment>;
|
|
4610
|
+
}
|
|
4611
|
+
return child.props.children === undefined ? child : cloneElement(child, undefined, children);
|
|
4612
|
+
});
|
|
4613
|
+
}
|
|
4614
|
+
|
|
4615
|
+
/** Makes the meta for a story of a Next.js App Router page. Written by \`forkbook init --pages\`. */
|
|
4616
|
+
export function page(route: string, Page: ComponentType<any>, options: PageOptions = {}) {
|
|
4617
|
+
const Layout: ComponentType<any> | undefined = ${layoutPath ? "RootLayout" : "undefined"};
|
|
4618
|
+
return {
|
|
4619
|
+
component: Page,
|
|
4620
|
+
parameters: {
|
|
4621
|
+
layout: 'fullscreen',
|
|
4622
|
+
nextjs: { appDirectory: true, navigation: { pathname: route, segments: [] } },
|
|
4623
|
+
},
|
|
4624
|
+
loaders: [
|
|
4625
|
+
async (context: any) => {
|
|
4626
|
+
const params = (await options.generateStaticParams?.())?.[0] ?? {};
|
|
4627
|
+
// The Next.js decorator reads the navigation parameters when it renders, after the loaders.
|
|
4628
|
+
context.parameters.nextjs.navigation = {
|
|
4629
|
+
pathname: fillRoute(route, params),
|
|
4630
|
+
segments: Object.entries(params),
|
|
4631
|
+
};
|
|
4632
|
+
const props = { params: Promise.resolve(params), searchParams: Promise.resolve({}) };
|
|
4633
|
+
const pageNode = isAsync(Page) ? await Page(props) : <Page {...props} />;
|
|
4634
|
+
const slot = <SLOT />;
|
|
4635
|
+
const layoutNode = Layout
|
|
4636
|
+
? isAsync(Layout)
|
|
4637
|
+
? await (Layout as any)({ children: slot, params: props.params })
|
|
4638
|
+
: (Layout as any)({ children: slot, params: props.params })
|
|
4639
|
+
: slot;
|
|
4640
|
+
return { pageNode, layoutNode };
|
|
4641
|
+
},
|
|
4642
|
+
],
|
|
4643
|
+
render: (_args: unknown, { loaded }: any) => chrome(loaded.layoutNode, loaded.pageNode),
|
|
4644
|
+
};
|
|
4645
|
+
}
|
|
4646
|
+
`;
|
|
4647
|
+
}
|
|
4648
|
+
async function pages({
|
|
4649
|
+
cwd = process.cwd(),
|
|
4650
|
+
dryRun = !1
|
|
4651
|
+
} = {}) {
|
|
4652
|
+
let appDir = ["app", "src/app"].find((dir) => existsSync2(join2(cwd, dir)));
|
|
4653
|
+
if (!appDir)
|
|
4654
|
+
throw new Error(
|
|
4655
|
+
"No `app` or `src/app` folder found. This command is for the Next.js App Router."
|
|
4656
|
+
);
|
|
4657
|
+
let result = { written: [], skipped: [] }, helperFile = join2(".forkbook", HELPER_FILE), helperPath = join2(cwd, helperFile), layoutPath = (await glob(`${appDir}/layout.{tsx,jsx,ts,js}`, { cwd, absolute: !0 }))[0], pageFiles = await glob(`${appDir}/**/page.{tsx,jsx}`, {
|
|
4658
|
+
cwd,
|
|
4659
|
+
ignore: ["**/node_modules/**"]
|
|
4660
|
+
});
|
|
4661
|
+
for (let pageFile of pageFiles.sort()) {
|
|
4662
|
+
let storyFile = join2(cwd, dirname(pageFile), "page.stories.tsx");
|
|
4663
|
+
if ((await glob("page.stories.*", { cwd: join2(cwd, dirname(pageFile)) })).length > 0)
|
|
4664
|
+
continue;
|
|
4665
|
+
let source = await readFile2(join2(cwd, pageFile), "utf8");
|
|
4666
|
+
if (isRedirectOnly(source)) {
|
|
4667
|
+
result.skipped.push(pageFile);
|
|
4668
|
+
continue;
|
|
4669
|
+
}
|
|
4670
|
+
let story = pageStory({
|
|
4671
|
+
storyPath: storyFile,
|
|
4672
|
+
helperPath,
|
|
4673
|
+
route: routeFromPage(relative3(appDir, pageFile)),
|
|
4674
|
+
withStaticParams: hasStaticParams(source)
|
|
4675
|
+
});
|
|
4676
|
+
result.written.push(relative3(cwd, storyFile)), dryRun || await writeFile2(storyFile, story);
|
|
4677
|
+
}
|
|
4678
|
+
return result.written.length > 0 && !existsSync2(helperPath) && (result.helper = helperFile, dryRun || (await mkdir(dirname(helperPath), { recursive: !0 }), await writeFile2(helperPath, pageHelper({ helperPath, layoutPath })))), result;
|
|
4679
|
+
}
|
|
4680
|
+
|
|
4438
4681
|
// src/cli-commands/bin/run.ts
|
|
4439
4682
|
addToGlobalContext("cliVersion", versions["@aussieljk/forkbook"]);
|
|
4440
4683
|
var handleCommandFailure = (logFilePath) => async (error) => {
|
|
@@ -4506,6 +4749,23 @@ command("remove <addon>").description("Remove an addon from your Forkbook").addO
|
|
|
4506
4749
|
}), await telemetry("remove", { addon: addonName, source: "cli" }), logger.outro("Done!");
|
|
4507
4750
|
}).catch(handleCommandFailure(options.logfile))
|
|
4508
4751
|
);
|
|
4752
|
+
command("migrate").description("Move a Storybook project to Forkbook").option("--dry-run", "Print the changes, but do not write them").action(async (options) => {
|
|
4753
|
+
let result = await migrate({ dryRun: options.dryRun, version: String(version) }), verb = options.dryRun ? "Would change" : "Changed";
|
|
4754
|
+
logger.log(`Removed packages: ${result.removedPackages.join(", ") || "none"}`), logger.log(`Added package: ${result.addedPackage}`);
|
|
4755
|
+
for (let move of result.moved)
|
|
4756
|
+
logger.log(`${options.dryRun ? "Would move" : "Moved"} ${move}`);
|
|
4757
|
+
logger.log(`${verb} ${result.changedFiles.length} files:`);
|
|
4758
|
+
for (let file of result.changedFiles)
|
|
4759
|
+
logger.log(` ${file}`);
|
|
4760
|
+
logger.log(`Now run ${import_picocolors.default.bold(result.installCommand)}, then read the diff.`);
|
|
4761
|
+
});
|
|
4762
|
+
command("pages").description("Write a story for each Next.js App Router page (also `init --pages`)").option("--dry-run", "Print the files, but do not write them").action(async (options) => {
|
|
4763
|
+
let result = await pages({ dryRun: options.dryRun });
|
|
4764
|
+
for (let file of [result.helper, ...result.written].filter(Boolean))
|
|
4765
|
+
logger.log(`${options.dryRun ? "Would write" : "Wrote"} ${file}`);
|
|
4766
|
+
for (let file of result.skipped)
|
|
4767
|
+
logger.log(`Skipped ${file} (redirect only)`);
|
|
4768
|
+
});
|
|
4509
4769
|
command("info").description("Prints debugging information about the local environment").action(async () => {
|
|
4510
4770
|
logger.log(import_picocolors.default.bold(`
|
|
4511
4771
|
Storybook Environment Info:`));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_b2whu6ooy6h from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_b2whu6ooy6h from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_b2whu6ooy6h from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_b2whu6ooy6h.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_b2whu6ooy6h.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_b2whu6ooy6h.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
SESSION_TIMEOUT,
|
|
14
|
+
getSessionId,
|
|
15
|
+
resetSessionIdForTest
|
|
16
|
+
} from "./chunk-RR3WLRNQ.js";
|
|
17
|
+
import "./chunk-7GLNBVQO.js";
|
|
18
|
+
import "./chunk-OZBNKCKM.js";
|
|
19
|
+
export {
|
|
20
|
+
SESSION_TIMEOUT,
|
|
21
|
+
getSessionId,
|
|
22
|
+
resetSessionIdForTest
|
|
23
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_b2whu6ooy6h from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_b2whu6ooy6h from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_b2whu6ooy6h from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_b2whu6ooy6h.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_b2whu6ooy6h.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_b2whu6ooy6h.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
|
getTypeImportSource
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-VTLGMRU5.js";
|
|
15
|
+
import "./chunk-OZBNKCKM.js";
|
|
16
16
|
|
|
17
17
|
// src/cli/skills/content/setup-prompts/setup.ts
|
|
18
18
|
import { getVitestStorybookRunCommand } from "@aussieljk/forkbook/internal/common";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_b2whu6ooy6h from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_b2whu6ooy6h from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_b2whu6ooy6h from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_b2whu6ooy6h.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_b2whu6ooy6h.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_b2whu6ooy6h.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Forkbook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-OZBNKCKM.js";
|
|
13
13
|
|
|
14
14
|
// raw:../../assets/addon-vitest/templates/vitest.config.4.template.ts
|
|
15
15
|
var vitest_config_4_template_default = `import path from 'node:path';
|