@aussieljk/forkbook 0.0.1-8 → 0.0.1-9

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.
Files changed (258) hide show
  1. package/assets/server/template.ejs +13 -0
  2. package/dist/_browser-chunks/{Color-ZG7LKYDZ.js → Color-GEC6HRBY.js} +2 -2
  3. package/dist/_browser-chunks/{WithTooltip-YZ36EZ4X.js → WithTooltip-CS3HPMGA.js} +6 -4
  4. package/dist/_browser-chunks/{chunk-MZVQEZOB.js → chunk-6QEYM2YW.js} +24 -24
  5. package/dist/_browser-chunks/chunk-C5TKXHTM.js +82 -0
  6. package/dist/_browser-chunks/{chunk-WVF42CP2.js → chunk-DNJ3OSLB.js} +46 -52
  7. package/dist/_browser-chunks/{chunk-E47B5255.js → chunk-IFADVEQE.js} +63 -543
  8. package/dist/_browser-chunks/chunk-NPNIBOPF.js +18 -0
  9. package/dist/_browser-chunks/{chunk-YYWKZ7O3.js → chunk-NTUHL5NS.js} +5 -2
  10. package/dist/_browser-chunks/chunk-OOETBSA7.js +502 -0
  11. package/dist/_browser-chunks/{chunk-SK6S7ZXD.js → chunk-PFCGVFP6.js} +3 -3
  12. package/dist/_browser-chunks/{chunk-H4ZHAXN3.js → chunk-V5U45XXZ.js} +1 -1
  13. package/dist/_browser-chunks/chunk-XKTORVEQ.js +255 -0
  14. package/dist/_browser-chunks/{chunk-DAUHYZUB.js → chunk-XTQCLWVH.js} +255 -494
  15. package/dist/_browser-chunks/{chunk-SFMQDIN2.js → chunk-ZHKZKFY4.js} +1 -1
  16. package/dist/_node-chunks/{attached-runtime-SRP2RPCT.js → attached-runtime-OI5IEIR7.js} +29 -29
  17. package/dist/_node-chunks/builder-manager-JEIVVV43.js +1139 -0
  18. package/dist/_node-chunks/{chunk-A73YRJPA.js → chunk-2FWH7OUZ.js} +6 -6
  19. package/dist/_node-chunks/{chunk-DGA2Q7TE.js → chunk-2QPSOAHI.js} +6 -6
  20. package/dist/_node-chunks/{chunk-QQKVXB5Q.js → chunk-2T2S3YYS.js} +6 -6
  21. package/dist/_node-chunks/{chunk-7GLNBVQO.js → chunk-35JF5BS4.js} +6 -6
  22. package/dist/_node-chunks/{chunk-JB5Q4WGX.js → chunk-3I43FMZC.js} +7 -7
  23. package/dist/_node-chunks/{chunk-WF7RDUU7.js → chunk-3R57KO3F.js} +10 -10
  24. package/dist/_node-chunks/chunk-4CWEAS2M.js +11 -0
  25. package/dist/_node-chunks/{chunk-TLB2LNUO.js → chunk-4HYKKRBM.js} +8 -8
  26. package/dist/_node-chunks/{chunk-YBRV5FIK.js → chunk-4W6HJYYC.js} +7 -7
  27. package/dist/_node-chunks/{chunk-VV6CPF3T.js → chunk-57BBVTHQ.js} +6 -6
  28. package/dist/_node-chunks/{chunk-MGFH4KGP.js → chunk-5MDE2KCS.js} +6 -6
  29. package/dist/_node-chunks/{chunk-TBLZESXE.js → chunk-5NCRCPYK.js} +6 -6
  30. package/dist/_node-chunks/{chunk-QEDRYWP7.js → chunk-6O6BHNDO.js} +6 -6
  31. package/dist/_node-chunks/chunk-7PZDRNVT.js +19 -0
  32. package/dist/_node-chunks/{chunk-M74NU6PU.js → chunk-7X5WP3UJ.js} +6 -6
  33. package/dist/_node-chunks/{chunk-DSWCMXKR.js → chunk-7XYURNT2.js} +10 -10
  34. package/dist/_node-chunks/{chunk-SNQKCFKN.js → chunk-AONRQAQP.js} +6 -6
  35. package/dist/_node-chunks/chunk-ASFRQHZH.js +20 -0
  36. package/dist/_node-chunks/{chunk-54WGE5OK.js → chunk-AUY6EZPA.js} +8 -8
  37. package/dist/_node-chunks/{chunk-I5Y7NDAM.js → chunk-BCFTMBAH.js} +7 -7
  38. package/dist/_node-chunks/{chunk-6GBMB2E4.js → chunk-BEHNZYWF.js} +8 -8
  39. package/dist/_node-chunks/chunk-BZNVRJ6H.js +25 -0
  40. package/dist/_node-chunks/chunk-CHLWJ5F5.js +20 -0
  41. package/dist/_node-chunks/{chunk-D4IL5V6A.js → chunk-CMDR42D7.js} +6 -6
  42. package/dist/_node-chunks/{chunk-LF7EC235.js → chunk-CP646EXE.js} +8 -8
  43. package/dist/_node-chunks/chunk-DDRGY4RJ.js +57 -0
  44. package/dist/_node-chunks/{chunk-UCBUYT7S.js → chunk-DMDIIGJ4.js} +7 -7
  45. package/dist/_node-chunks/{chunk-DADJTKJT.js → chunk-DTZELAXT.js} +7 -7
  46. package/dist/_node-chunks/{chunk-6YDXCU32.js → chunk-ELMANXC3.js} +6 -6
  47. package/dist/_node-chunks/{chunk-VTLGMRU5.js → chunk-ELXK72IJ.js} +6 -6
  48. package/dist/_node-chunks/{chunk-GXSB54NU.js → chunk-F6RXCQF6.js} +6 -6
  49. package/dist/_node-chunks/{chunk-4T3WPVSQ.js → chunk-FKQHIPUA.js} +6 -6
  50. package/dist/_node-chunks/{chunk-2WPUJ7UM.js → chunk-FPWDVE2V.js} +7 -7
  51. package/dist/_node-chunks/{chunk-HNMHTOKI.js → chunk-FVJLKXNS.js} +23 -23
  52. package/dist/_node-chunks/{chunk-ICGRYYV7.js → chunk-GABGLW7D.js} +7 -7
  53. package/dist/_node-chunks/{chunk-BPMXWGDX.js → chunk-GOZDHTIK.js} +6 -6
  54. package/dist/_node-chunks/{chunk-3NXJBXBF.js → chunk-GPSR4MZL.js} +14 -14
  55. package/dist/_node-chunks/{chunk-T62LXT34.js → chunk-GZ2YC6US.js} +6 -6
  56. package/dist/_node-chunks/chunk-H5HD6EW2.js +28 -0
  57. package/dist/_node-chunks/{chunk-3KY2GA5X.js → chunk-I6ANUF4J.js} +7 -7
  58. package/dist/_node-chunks/{chunk-CZDEJ7DD.js → chunk-ICIP5FB5.js} +9 -9
  59. package/dist/_node-chunks/{chunk-CL4T6DGA.js → chunk-IK35TZRH.js} +7 -7
  60. package/dist/_node-chunks/{chunk-CHPKBTH7.js → chunk-IOJ6NYLD.js} +7 -7
  61. package/dist/_node-chunks/{chunk-77YIWZPS.js → chunk-IWEZ5KSJ.js} +7 -7
  62. package/dist/_node-chunks/{chunk-UBEILYLL.js → chunk-JOOZKSBS.js} +7 -7
  63. package/dist/_node-chunks/{chunk-I26RWAW3.js → chunk-JXVJAA3U.js} +6 -6
  64. package/dist/_node-chunks/{chunk-GUKZDREX.js → chunk-K6VX4GUH.js} +8 -8
  65. package/dist/_node-chunks/{chunk-VPGX2PAB.js → chunk-L7US6VLX.js} +6 -6
  66. package/dist/_node-chunks/{chunk-JCLP42A7.js → chunk-LKMHU2P3.js} +7 -7
  67. package/dist/_node-chunks/{chunk-IVU4D6LF.js → chunk-LMWS7NDR.js} +7 -7
  68. package/dist/_node-chunks/{chunk-M3F5R2JO.js → chunk-LPDII6WJ.js} +6 -6
  69. package/dist/_node-chunks/{chunk-RR3WLRNQ.js → chunk-MBJ2CUVU.js} +7 -7
  70. package/dist/_node-chunks/{chunk-KQBTXUT5.js → chunk-MGXABKCL.js} +6 -6
  71. package/dist/_node-chunks/{chunk-BY65FGKD.js → chunk-MHLTWQGQ.js} +8 -8
  72. package/dist/_node-chunks/{chunk-7YBOQWWR.js → chunk-MMMKY3DA.js} +8 -8
  73. package/dist/_node-chunks/{chunk-NV6HM53D.js → chunk-MXNT3HBF.js} +6 -6
  74. package/dist/_node-chunks/{chunk-LPLXO4HE.js → chunk-O7WMRMVJ.js} +6 -6
  75. package/dist/_node-chunks/{chunk-BLAPFOIX.js → chunk-OPLD7FOE.js} +6 -6
  76. package/dist/_node-chunks/{chunk-XTCOGCTP.js → chunk-P4CWOISW.js} +7 -7
  77. package/dist/_node-chunks/{chunk-IFF53QVX.js → chunk-POXIO453.js} +7 -7
  78. package/dist/_node-chunks/{chunk-4U5ZQZJ4.js → chunk-PRTTCG3N.js} +6 -6
  79. package/dist/_node-chunks/{chunk-27R37QFW.js → chunk-QE3NKWUX.js} +7 -7
  80. package/dist/_node-chunks/{chunk-LYMYDMEK.js → chunk-QMERCCIQ.js} +6 -6
  81. package/dist/_node-chunks/{chunk-4CPTSXU6.js → chunk-QVF2NJK4.js} +10 -10
  82. package/dist/_node-chunks/{chunk-Y2HWZ262.js → chunk-R33EXC6B.js} +12 -12
  83. package/dist/_node-chunks/{chunk-ZKS2H56J.js → chunk-R3BJJGEG.js} +6 -6
  84. package/dist/_node-chunks/chunk-REDMAZRP.js +18 -0
  85. package/dist/_node-chunks/{chunk-DVSKRIH3.js → chunk-RJV4QWRP.js} +7 -7
  86. package/dist/_node-chunks/{chunk-3KKSPEAE.js → chunk-RXEMA2TT.js} +6 -6
  87. package/dist/_node-chunks/{chunk-XGMO4SW2.js → chunk-TKOUTJWX.js} +6 -6
  88. package/dist/_node-chunks/{chunk-LSKOVF6F.js → chunk-TRZWEDUE.js} +6 -6
  89. package/dist/_node-chunks/{chunk-2ZB3ZVDY.js → chunk-U3BEYEZ5.js} +8 -8
  90. package/dist/_node-chunks/{chunk-HF6FRLS6.js → chunk-UI6NW64P.js} +19 -19
  91. package/dist/_node-chunks/chunk-UK2NKD4E.js +532 -0
  92. package/dist/_node-chunks/{chunk-II4SIIJW.js → chunk-VF6725VX.js} +7 -7
  93. package/dist/_node-chunks/{chunk-YMVL55QY.js → chunk-VJJTMS2R.js} +9 -9
  94. package/dist/_node-chunks/{chunk-62PEOH4P.js → chunk-VQBXHU2T.js} +8 -8
  95. package/dist/_node-chunks/{chunk-5BQKMZYJ.js → chunk-VZ3PQJKF.js} +23 -23
  96. package/dist/_node-chunks/{chunk-G6UTEYYQ.js → chunk-WI6FDUOM.js} +8 -8
  97. package/dist/_node-chunks/{chunk-4QYNOSOA.js → chunk-WTS7HYGM.js} +7 -7
  98. package/dist/_node-chunks/{chunk-VQ2NW4OR.js → chunk-WXMIR2F2.js} +8 -8
  99. package/dist/_node-chunks/{chunk-G3J2VAY4.js → chunk-XA2UQNP3.js} +10 -10
  100. package/dist/_node-chunks/{chunk-VTVQ5TKB.js → chunk-Y2FWEOIW.js} +8 -8
  101. package/dist/_node-chunks/{chunk-526SOV2Y.js → chunk-Y5JLYH6J.js} +6 -6
  102. package/dist/_node-chunks/{chunk-X5IJ42Q2.js → chunk-YELBVH4K.js} +7 -7
  103. package/dist/_node-chunks/{chunk-QQ7GEJNY.js → chunk-YK5N35SR.js} +9 -9
  104. package/dist/_node-chunks/{chunk-UEWCGYSE.js → chunk-YLXOGJX6.js} +21 -9
  105. package/dist/_node-chunks/{chunk-OZBNKCKM.js → chunk-YSVJU5VZ.js} +6 -6
  106. package/dist/_node-chunks/{chunk-F2XPZVCK.js → chunk-ZFTEHWNT.js} +8 -8
  107. package/dist/_node-chunks/{chunk-6DZY675E.js → chunk-ZLBDSC7U.js} +9 -9
  108. package/dist/_node-chunks/{chunk-6DCYMQX2.js → chunk-ZMI35R7E.js} +45 -34
  109. package/dist/_node-chunks/{chunk-QVIC3UDL.js → chunk-ZOE2QQSS.js} +8 -8
  110. package/dist/_node-chunks/{chunk-OFZX45ZR.js → chunk-ZST2SPBX.js} +6 -6
  111. package/dist/_node-chunks/{chunk-IAYHJZOR.js → chunk-ZUYRTHXN.js} +6 -6
  112. package/dist/_node-chunks/dist-FABQFQ76.js +27 -0
  113. package/dist/_node-chunks/dist-ZUXZVI3A.js +16 -0
  114. package/dist/_node-chunks/{local-runtime-Y6OH2SFM.js → local-runtime-LKT5I6NG.js} +20 -20
  115. package/dist/_node-chunks/{mdx-plugin-R6GNGQP2.js → mdx-plugin-2YIBFVCV.js} +13 -13
  116. package/dist/_node-chunks/{monorepo-R2CLQIWG.js → monorepo-HROZW452.js} +11 -11
  117. package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-PTWFSPXD.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-MUIOTVJR.js} +11 -11
  118. package/dist/_node-chunks/optimized-tests-EK5H7MUQ.js +22 -0
  119. package/dist/_node-chunks/{pattern-copy-play-5VCD6ED3.js → pattern-copy-play-VQNMME5S.js} +9 -9
  120. package/dist/_node-chunks/postinstallAddon-T4RENREB.js +20 -0
  121. package/dist/_node-chunks/{rehype-external-links-SKSQEDUP.js → rehype-external-links-WXD3NVWK.js} +9 -9
  122. package/dist/_node-chunks/{rehype-slug-27WNXM7U.js → rehype-slug-LWBEJBWR.js} +9 -9
  123. package/dist/_node-chunks/{relaxed-limits-PDGCGDW4.js → relaxed-limits-MKV6OE3S.js} +11 -11
  124. package/dist/_node-chunks/{run-BD52SWQC.js → run-A4A2HQDT.js} +17 -17
  125. package/dist/_node-chunks/{run-IKBDOUY2.js → run-UBPF7ZUG.js} +15 -15
  126. package/dist/_node-chunks/session-id-YZZIHNID.js +23 -0
  127. package/dist/_node-chunks/{setup-7ECNMG4A.js → setup-SMMCS2Q5.js} +8 -8
  128. package/dist/_node-chunks/{vitest.config.4.template-J4YODMMP.js → vitest.config.4.template-PYSDGPB4.js} +7 -7
  129. package/dist/addon-a11y/index.js +1 -1
  130. package/dist/addon-a11y/manager.js +20 -24
  131. package/dist/addon-a11y/preset.js +7 -7
  132. package/dist/addon-a11y/preview.js +1 -1
  133. package/dist/addon-docs/blocks.js +20 -26
  134. package/dist/addon-docs/manager.js +1 -1
  135. package/dist/addon-docs/preset.js +10 -10
  136. package/dist/addon-links/index.js +4 -2
  137. package/dist/addon-links/preview.d.ts +1 -1
  138. package/dist/addon-links/preview.js +4 -2
  139. package/dist/addon-links/react/index.js +3 -1
  140. package/dist/addon-mcp/preset.js +8 -8
  141. package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +3 -3
  142. package/dist/addon-pseudo-states/manager.js +2 -2
  143. package/dist/addon-themes/manager.js +3 -3
  144. package/dist/addon-themes/postinstall.js +7 -7
  145. package/dist/addon-vitest/constants.js +8 -8
  146. package/dist/addon-vitest/manager.js +9 -9
  147. package/dist/addon-vitest/node/coverage-reporter.js +8 -8
  148. package/dist/addon-vitest/node/vitest.js +16 -16
  149. package/dist/addon-vitest/postinstall.js +10 -10
  150. package/dist/addon-vitest/preset.js +14 -14
  151. package/dist/addon-vitest/vitest-plugin/global-setup.js +7 -7
  152. package/dist/addon-vitest/vitest-plugin/index.js +13 -13
  153. package/dist/addon-vitest/vitest-plugin/setup-file.js +1 -1
  154. package/dist/babel/index.js +11 -11
  155. package/dist/bin/core.js +59 -59
  156. package/dist/bin/dispatcher.js +10 -10
  157. package/dist/bin/loader.js +8 -8
  158. package/dist/builder-vite/index.js +15 -15
  159. package/dist/builder-vite/preset.js +13 -13
  160. package/dist/{chunk-CJY2njs4.d.ts → chunk-BhAPwdVB.d.ts} +1 -1
  161. package/dist/{chunk-pFH9P91a.d.ts → chunk-DXsI731B.d.ts} +1 -1
  162. package/dist/{chunk-DktrsDd6.d.ts → chunk-PdOIKm0H.d.ts} +35 -2
  163. package/dist/cli/index.d.ts +1 -1
  164. package/dist/cli/index.js +22 -22
  165. package/dist/cli/tools/sdk/child-host.d.ts +1 -1
  166. package/dist/cli/tools/sdk/child-host.js +17 -17
  167. package/dist/cli/tools/sdk/index.d.ts +1 -1
  168. package/dist/cli/tools/sdk/index.js +18 -18
  169. package/dist/cli-commands/bin/index.js +7 -7
  170. package/dist/common/index.d.ts +2 -2
  171. package/dist/common/index.js +35 -35
  172. package/dist/components/index.d.ts +38 -1
  173. package/dist/components/index.js +593 -518
  174. package/dist/core-server/index.d.ts +2 -2
  175. package/dist/core-server/index.js +282 -173
  176. package/dist/core-server/presets/common-manager.js +491 -117
  177. package/dist/core-server/presets/common-override-preset.js +10 -10
  178. package/dist/core-server/presets/common-preset.js +51 -43
  179. package/dist/create/bin/index.js +7 -7
  180. package/dist/create/index.js +15 -15
  181. package/dist/csf-tools/index.d.ts +3 -1
  182. package/dist/csf-tools/index.js +14 -12
  183. package/dist/manager/_manager-chunks/{globals-runtime-z143vedu.js → globals-runtime-B1q30If4.js} +4 -4
  184. package/dist/manager/_manager-chunks/{globals-runtime-4fCHtNC6.js → globals-runtime-BY3epqww.js} +413 -2
  185. package/dist/manager/_manager-chunks/globals-runtime-Bj5KDUJi.js +8935 -0
  186. package/dist/manager/_manager-chunks/{globals-runtime-Bpc_ftuT.js → globals-runtime-Bs75QQ_I.js} +3 -1192
  187. package/dist/manager/_manager-chunks/{globals-runtime-D82vqOGq.js → globals-runtime-BweHuXkK.js} +2 -2
  188. package/dist/manager/_manager-chunks/{globals-runtime-BKW-4ztO.js → globals-runtime-C4GdZS7_.js} +4 -4
  189. package/dist/manager/_manager-chunks/{globals-runtime-DB8fVA5g.js → globals-runtime-CA8AuIRT.js} +2 -1
  190. package/dist/manager/_manager-chunks/{globals-runtime-DZN_3ZLm.js → globals-runtime-CnfHMZV0.js} +153 -27
  191. package/dist/manager/_manager-chunks/{globals-runtime-WhJXr5R1.js → globals-runtime-DgHSAUIB.js} +1 -1
  192. package/dist/manager/_manager-chunks/{globals-runtime-kmPSyf3j.js → globals-runtime-DvV_TF3-.js} +2 -2
  193. package/dist/manager/_manager-chunks/{globals-runtime-DgUeynuu.js → globals-runtime-FcobHVj9.js} +475 -370
  194. package/dist/manager/_manager-chunks/{globals-runtime-CoCzM1V_.js → globals-runtime-WZKaeKm9.js} +1 -1
  195. package/dist/manager/_manager-chunks/{globals-runtime-CIcNS9TG.js → globals-runtime-dh5vgpgm.js} +238 -232
  196. package/dist/manager/_manager-chunks/{globals-runtime-DOPUchia.js → globals-runtime-wjkxyMn0.js} +4 -3
  197. package/dist/manager/_manager-chunks/{runtime-DEHcqyTM.js → runtime-BSkBrZa7.js} +3 -3
  198. package/dist/manager/_manager-chunks/{runtime-C-s1miBr.js → runtime-Bdda1ODD.js} +1 -1
  199. package/dist/manager/_manager-chunks/{runtime-DuptfEhw.js → runtime-Bp_XtatN.js} +2 -2
  200. package/dist/manager/_manager-chunks/{runtime-BrwmuSZ1.js → runtime-D-bkVc6v.js} +31 -30
  201. package/dist/manager/_manager-chunks/{runtime-CHQZzIX6.js → runtime-DP_7wWTN.js} +2 -2
  202. package/dist/manager/_manager-chunks/{runtime-Dtpc5s3G.js → runtime-DlX-MKi1.js} +335 -327
  203. package/dist/manager/_manager-chunks/{runtime-B_U-7omv.js → runtime-TytMkKcC.js} +340 -241
  204. package/dist/manager/_manager-chunks/{runtime-BrlctLSK.js → runtime-jOBCBZ66.js} +100 -63
  205. package/dist/manager/globals-runtime.js +1 -1
  206. package/dist/manager/globals.d.ts +1 -1
  207. package/dist/manager/globals.js +1 -1
  208. package/dist/manager/runtime.js +1 -1
  209. package/dist/manager-api/index.d.ts +1 -1
  210. package/dist/manager-api/index.js +34 -9
  211. package/dist/manager-errors.d.ts +1 -1
  212. package/dist/mcp/index.js +8 -8
  213. package/dist/mocking-utils/index.js +9 -9
  214. package/dist/nextjs-vite/node/index.js +7 -7
  215. package/dist/nextjs-vite/preset.js +10 -10
  216. package/dist/nextjs-vite/vite-plugin/index.js +7 -7
  217. package/dist/nextjs-vite-plugin/index.js +8 -8
  218. package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
  219. package/dist/node-logger/index.js +9 -9
  220. package/dist/oxc-parser/index.js +10 -10
  221. package/dist/oxc-parser/worker.js +10 -10
  222. package/dist/preview-api/index.d.ts +1 -1
  223. package/dist/preview-errors.d.ts +1 -1
  224. package/dist/react/docgen/docgen-worker.js +11 -11
  225. package/dist/react/preset.js +13 -13
  226. package/dist/react-native/bin/get-stories.js +8 -8
  227. package/dist/react-native/metro/node.js +10 -10
  228. package/dist/react-native/metro/withForkbook.js +11 -11
  229. package/dist/react-native/scripts/generate.js +8 -8
  230. package/dist/react-vite/node/index.js +7 -7
  231. package/dist/react-vite/preset.js +7 -7
  232. package/dist/router/index.d.ts +69 -1
  233. package/dist/router/index.js +48 -8
  234. package/dist/server-errors.d.ts +1 -1
  235. package/dist/server-errors.js +9 -9
  236. package/dist/shared/open-service/index.d.ts +1 -1
  237. package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
  238. package/dist/telemetry/index.js +43 -43
  239. package/dist/theming/index.js +13 -9
  240. package/dist/types/index.d.ts +2 -2
  241. package/package.json +2 -2
  242. package/dist/_node-chunks/builder-manager-V7M6SFEM.js +0 -1623
  243. package/dist/_node-chunks/chunk-27KT3BJI.js +0 -25
  244. package/dist/_node-chunks/chunk-4XNKH2BY.js +0 -18
  245. package/dist/_node-chunks/chunk-CT3L2NXZ.js +0 -20
  246. package/dist/_node-chunks/chunk-NORBEBNM.js +0 -19
  247. package/dist/_node-chunks/chunk-SBNQ6YGM.js +0 -11
  248. package/dist/_node-chunks/chunk-YHWOGAFM.js +0 -20
  249. package/dist/_node-chunks/dist-GJ53PFWF.js +0 -27
  250. package/dist/_node-chunks/dist-TLMACGH6.js +0 -16
  251. package/dist/_node-chunks/optimized-tests-DIPB4OM6.js +0 -22
  252. package/dist/_node-chunks/postinstallAddon-PSN7XRSV.js +0 -20
  253. package/dist/_node-chunks/session-id-K7PM5ZGL.js +0 -23
  254. package/dist/manager/_manager-chunks/globals-runtime-BMCaBukU.js +0 -413
  255. package/dist/manager/_manager-chunks/globals-runtime-BO0pfoqL.js +0 -3414
  256. package/dist/manager/_manager-chunks/globals-runtime-BZKYJxYC.js +0 -2093
  257. package/dist/manager/_manager-chunks/globals-runtime-CTyYXvUm.js +0 -41
  258. package/dist/manager/_manager-chunks/globals-runtime-Dbt08xWQ.js +0 -1960
@@ -1,1623 +0,0 @@
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
- BROWSER_TARGETS,
14
- NODE_TARGET
15
- } from "./chunk-IAYHJZOR.js";
16
- import {
17
- require_build
18
- } from "./chunk-3KY2GA5X.js";
19
- import {
20
- resolveModulePath,
21
- resolvePackageDir
22
- } from "./chunk-UBEILYLL.js";
23
- import "./chunk-3KKSPEAE.js";
24
- import {
25
- slash
26
- } from "./chunk-CT3L2NXZ.js";
27
- import {
28
- __commonJS,
29
- __require,
30
- __toESM
31
- } from "./chunk-OZBNKCKM.js";
32
-
33
- // ../../node_modules/ejs/lib/utils.js
34
- var require_utils = __commonJS({
35
- "../../node_modules/ejs/lib/utils.js"(exports) {
36
- "use strict";
37
- var regExpChars = /[|\\{}()[\]^$+*?.]/g, hasOwnProperty = Object.prototype.hasOwnProperty, hasOwn = function(obj, key) {
38
- return hasOwnProperty.apply(obj, [key]);
39
- };
40
- exports.escapeRegExpChars = function(string) {
41
- return string ? String(string).replace(regExpChars, "\\$&") : "";
42
- };
43
- var _ENCODE_HTML_RULES = {
44
- "&": "&",
45
- "<": "&lt;",
46
- ">": "&gt;",
47
- '"': "&#34;",
48
- "'": "&#39;"
49
- }, _MATCH_HTML = /[&<>'"]/g;
50
- function encode_char(c) {
51
- return _ENCODE_HTML_RULES[c] || c;
52
- }
53
- var escapeFuncStr = `var _ENCODE_HTML_RULES = {
54
- "&": "&amp;"
55
- , "<": "&lt;"
56
- , ">": "&gt;"
57
- , '"': "&#34;"
58
- , "'": "&#39;"
59
- }
60
- , _MATCH_HTML = /[&<>'"]/g;
61
- function encode_char(c) {
62
- return _ENCODE_HTML_RULES[c] || c;
63
- };
64
- `;
65
- exports.escapeXML = function(markup) {
66
- return markup == null ? "" : String(markup).replace(_MATCH_HTML, encode_char);
67
- };
68
- function escapeXMLToString() {
69
- return Function.prototype.toString.call(this) + `;
70
- ` + escapeFuncStr;
71
- }
72
- try {
73
- typeof Object.defineProperty == "function" ? Object.defineProperty(exports.escapeXML, "toString", { value: escapeXMLToString }) : exports.escapeXML.toString = escapeXMLToString;
74
- } catch {
75
- console.warn("Unable to set escapeXML.toString (is the Function prototype frozen?)");
76
- }
77
- exports.shallowCopy = function(to, from) {
78
- if (from = from || {}, to != null)
79
- for (var p in from)
80
- hasOwn(from, p) && (p === "__proto__" || p === "constructor" || (to[p] = from[p]));
81
- return to;
82
- };
83
- exports.shallowCopyFromList = function(to, from, list) {
84
- if (list = list || [], from = from || {}, to != null)
85
- for (var i = 0; i < list.length; i++) {
86
- var p = list[i];
87
- if (typeof from[p] < "u") {
88
- if (!hasOwn(from, p) || p === "__proto__" || p === "constructor")
89
- continue;
90
- to[p] = from[p];
91
- }
92
- }
93
- return to;
94
- };
95
- exports.cache = {
96
- _data: {},
97
- set: function(key, val) {
98
- this._data[key] = val;
99
- },
100
- get: function(key) {
101
- return this._data[key];
102
- },
103
- remove: function(key) {
104
- delete this._data[key];
105
- },
106
- reset: function() {
107
- this._data = {};
108
- }
109
- };
110
- exports.hyphenToCamel = function(str) {
111
- return str.replace(/-[a-z]/g, function(match) {
112
- return match[1].toUpperCase();
113
- });
114
- };
115
- exports.createNullProtoObjWherePossible = (function() {
116
- return typeof Object.create == "function" ? function() {
117
- return /* @__PURE__ */ Object.create(null);
118
- } : { __proto__: null } instanceof Object ? function() {
119
- return {};
120
- } : function() {
121
- return { __proto__: null };
122
- };
123
- })();
124
- exports.hasOwnOnlyObject = function(obj) {
125
- var o = exports.createNullProtoObjWherePossible();
126
- for (var p in obj)
127
- hasOwn(obj, p) && (o[p] = obj[p]);
128
- return o;
129
- };
130
- }
131
- });
132
-
133
- // ../../node_modules/ejs/package.json
134
- var require_package = __commonJS({
135
- "../../node_modules/ejs/package.json"(exports, module) {
136
- module.exports = {
137
- name: "ejs",
138
- description: "Embedded JavaScript templates",
139
- keywords: [
140
- "template",
141
- "engine",
142
- "ejs"
143
- ],
144
- version: "3.1.10",
145
- author: "Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",
146
- license: "Apache-2.0",
147
- bin: {
148
- ejs: "./bin/cli.js"
149
- },
150
- main: "./lib/ejs.js",
151
- jsdelivr: "ejs.min.js",
152
- unpkg: "ejs.min.js",
153
- repository: {
154
- type: "git",
155
- url: "git://github.com/mde/ejs.git"
156
- },
157
- bugs: "https://github.com/mde/ejs/issues",
158
- homepage: "https://github.com/mde/ejs",
159
- dependencies: {
160
- jake: "^10.8.5"
161
- },
162
- devDependencies: {
163
- browserify: "^16.5.1",
164
- eslint: "^6.8.0",
165
- "git-directory-deploy": "^1.5.1",
166
- jsdoc: "^4.0.2",
167
- "lru-cache": "^4.0.1",
168
- mocha: "^10.2.0",
169
- "uglify-js": "^3.3.16"
170
- },
171
- engines: {
172
- node: ">=0.10.0"
173
- },
174
- scripts: {
175
- test: "npx jake test"
176
- }
177
- };
178
- }
179
- });
180
-
181
- // ../../node_modules/ejs/lib/ejs.js
182
- var require_ejs = __commonJS({
183
- "../../node_modules/ejs/lib/ejs.js"(exports) {
184
- "use strict";
185
- var fs = __require("fs"), path = __require("path"), utils = require_utils(), scopeOptionWarned = !1, _VERSION_STRING = require_package().version, _DEFAULT_OPEN_DELIMITER = "<", _DEFAULT_CLOSE_DELIMITER = ">", _DEFAULT_DELIMITER = "%", _DEFAULT_LOCALS_NAME = "locals", _NAME = "ejs", _REGEX_STRING = "(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)", _OPTS_PASSABLE_WITH_DATA = [
186
- "delimiter",
187
- "scope",
188
- "context",
189
- "debug",
190
- "compileDebug",
191
- "client",
192
- "_with",
193
- "rmWhitespace",
194
- "strict",
195
- "filename",
196
- "async"
197
- ], _OPTS_PASSABLE_WITH_DATA_EXPRESS = _OPTS_PASSABLE_WITH_DATA.concat("cache"), _BOM = /^\uFEFF/, _JS_IDENTIFIER = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
198
- exports.cache = utils.cache;
199
- exports.fileLoader = fs.readFileSync;
200
- exports.localsName = _DEFAULT_LOCALS_NAME;
201
- exports.promiseImpl = new Function("return this;")().Promise;
202
- exports.resolveInclude = function(name, filename, isDir) {
203
- var dirname4 = path.dirname, extname = path.extname, resolve = path.resolve, includePath = resolve(isDir ? filename : dirname4(filename), name), ext = extname(name);
204
- return ext || (includePath += ".ejs"), includePath;
205
- };
206
- function resolvePaths(name, paths) {
207
- var filePath;
208
- if (paths.some(function(v) {
209
- return filePath = exports.resolveInclude(name, v, !0), fs.existsSync(filePath);
210
- }))
211
- return filePath;
212
- }
213
- function getIncludePath(path2, options) {
214
- var includePath, filePath, views = options.views, match = /^[A-Za-z]+:\\|^\//.exec(path2);
215
- if (match && match.length)
216
- path2 = path2.replace(/^\/*/, ""), Array.isArray(options.root) ? includePath = resolvePaths(path2, options.root) : includePath = exports.resolveInclude(path2, options.root || "/", !0);
217
- else if (options.filename && (filePath = exports.resolveInclude(path2, options.filename), fs.existsSync(filePath) && (includePath = filePath)), !includePath && Array.isArray(views) && (includePath = resolvePaths(path2, views)), !includePath && typeof options.includer != "function")
218
- throw new Error('Could not find the include file "' + options.escapeFunction(path2) + '"');
219
- return includePath;
220
- }
221
- function handleCache(options, template) {
222
- var func, filename = options.filename, hasTemplate = arguments.length > 1;
223
- if (options.cache) {
224
- if (!filename)
225
- throw new Error("cache option requires a filename");
226
- if (func = exports.cache.get(filename), func)
227
- return func;
228
- hasTemplate || (template = fileLoader(filename).toString().replace(_BOM, ""));
229
- } else if (!hasTemplate) {
230
- if (!filename)
231
- throw new Error("Internal EJS error: no file name or template provided");
232
- template = fileLoader(filename).toString().replace(_BOM, "");
233
- }
234
- return func = exports.compile(template, options), options.cache && exports.cache.set(filename, func), func;
235
- }
236
- function tryHandleCache(options, data, cb) {
237
- var result;
238
- if (cb) {
239
- try {
240
- result = handleCache(options)(data);
241
- } catch (err) {
242
- return cb(err);
243
- }
244
- cb(null, result);
245
- } else {
246
- if (typeof exports.promiseImpl == "function")
247
- return new exports.promiseImpl(function(resolve, reject) {
248
- try {
249
- result = handleCache(options)(data), resolve(result);
250
- } catch (err) {
251
- reject(err);
252
- }
253
- });
254
- throw new Error("Please provide a callback function");
255
- }
256
- }
257
- function fileLoader(filePath) {
258
- return exports.fileLoader(filePath);
259
- }
260
- function includeFile(path2, options) {
261
- var opts = utils.shallowCopy(utils.createNullProtoObjWherePossible(), options);
262
- if (opts.filename = getIncludePath(path2, opts), typeof options.includer == "function") {
263
- var includerResult = options.includer(path2, opts.filename);
264
- if (includerResult && (includerResult.filename && (opts.filename = includerResult.filename), includerResult.template))
265
- return handleCache(opts, includerResult.template);
266
- }
267
- return handleCache(opts);
268
- }
269
- function rethrow(err, str, flnm, lineno, esc) {
270
- var lines = str.split(`
271
- `), start2 = Math.max(lineno - 3, 0), end = Math.min(lines.length, lineno + 3), filename = esc(flnm), context = lines.slice(start2, end).map(function(line, i) {
272
- var curr = i + start2 + 1;
273
- return (curr == lineno ? " >> " : " ") + curr + "| " + line;
274
- }).join(`
275
- `);
276
- throw err.path = filename, err.message = (filename || "ejs") + ":" + lineno + `
277
- ` + context + `
278
-
279
- ` + err.message, err;
280
- }
281
- function stripSemi(str) {
282
- return str.replace(/;(\s*$)/, "$1");
283
- }
284
- exports.compile = function(template, opts) {
285
- var templ;
286
- return opts && opts.scope && (scopeOptionWarned || (console.warn("`scope` option is deprecated and will be removed in EJS 3"), scopeOptionWarned = !0), opts.context || (opts.context = opts.scope), delete opts.scope), templ = new Template(template, opts), templ.compile();
287
- };
288
- exports.render = function(template, d, o) {
289
- var data = d || utils.createNullProtoObjWherePossible(), opts = o || utils.createNullProtoObjWherePossible();
290
- return arguments.length == 2 && utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA), handleCache(opts, template)(data);
291
- };
292
- exports.renderFile = function() {
293
- var args = Array.prototype.slice.call(arguments), filename = args.shift(), cb, opts = { filename }, data, viewOpts;
294
- return typeof arguments[arguments.length - 1] == "function" && (cb = args.pop()), args.length ? (data = args.shift(), args.length ? utils.shallowCopy(opts, args.pop()) : (data.settings && (data.settings.views && (opts.views = data.settings.views), data.settings["view cache"] && (opts.cache = !0), viewOpts = data.settings["view options"], viewOpts && utils.shallowCopy(opts, viewOpts)), utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS)), opts.filename = filename) : data = utils.createNullProtoObjWherePossible(), tryHandleCache(opts, data, cb);
295
- };
296
- exports.Template = Template;
297
- exports.clearCache = function() {
298
- exports.cache.reset();
299
- };
300
- function Template(text, optsParam) {
301
- var opts = utils.hasOwnOnlyObject(optsParam), options = utils.createNullProtoObjWherePossible();
302
- this.templateText = text, this.mode = null, this.truncate = !1, this.currentLine = 1, this.source = "", options.client = opts.client || !1, options.escapeFunction = opts.escape || opts.escapeFunction || utils.escapeXML, options.compileDebug = opts.compileDebug !== !1, options.debug = !!opts.debug, options.filename = opts.filename, options.openDelimiter = opts.openDelimiter || exports.openDelimiter || _DEFAULT_OPEN_DELIMITER, options.closeDelimiter = opts.closeDelimiter || exports.closeDelimiter || _DEFAULT_CLOSE_DELIMITER, options.delimiter = opts.delimiter || exports.delimiter || _DEFAULT_DELIMITER, options.strict = opts.strict || !1, options.context = opts.context, options.cache = opts.cache || !1, options.rmWhitespace = opts.rmWhitespace, options.root = opts.root, options.includer = opts.includer, options.outputFunctionName = opts.outputFunctionName, options.localsName = opts.localsName || exports.localsName || _DEFAULT_LOCALS_NAME, options.views = opts.views, options.async = opts.async, options.destructuredLocals = opts.destructuredLocals, options.legacyInclude = typeof opts.legacyInclude < "u" ? !!opts.legacyInclude : !0, options.strict ? options._with = !1 : options._with = typeof opts._with < "u" ? opts._with : !0, this.opts = options, this.regex = this.createRegex();
303
- }
304
- Template.modes = {
305
- EVAL: "eval",
306
- ESCAPED: "escaped",
307
- RAW: "raw",
308
- COMMENT: "comment",
309
- LITERAL: "literal"
310
- };
311
- Template.prototype = {
312
- createRegex: function() {
313
- var str = _REGEX_STRING, delim = utils.escapeRegExpChars(this.opts.delimiter), open = utils.escapeRegExpChars(this.opts.openDelimiter), close = utils.escapeRegExpChars(this.opts.closeDelimiter);
314
- return str = str.replace(/%/g, delim).replace(/</g, open).replace(/>/g, close), new RegExp(str);
315
- },
316
- compile: function() {
317
- var src, fn, opts = this.opts, prepended = "", appended = "", escapeFn = opts.escapeFunction, ctor, sanitizedFilename = opts.filename ? JSON.stringify(opts.filename) : "undefined";
318
- if (!this.source) {
319
- if (this.generateSource(), prepended += ` var __output = "";
320
- function __append(s) { if (s !== undefined && s !== null) __output += s }
321
- `, opts.outputFunctionName) {
322
- if (!_JS_IDENTIFIER.test(opts.outputFunctionName))
323
- throw new Error("outputFunctionName is not a valid JS identifier.");
324
- prepended += " var " + opts.outputFunctionName + ` = __append;
325
- `;
326
- }
327
- if (opts.localsName && !_JS_IDENTIFIER.test(opts.localsName))
328
- throw new Error("localsName is not a valid JS identifier.");
329
- if (opts.destructuredLocals && opts.destructuredLocals.length) {
330
- for (var destructuring = " var __locals = (" + opts.localsName + ` || {}),
331
- `, i = 0; i < opts.destructuredLocals.length; i++) {
332
- var name = opts.destructuredLocals[i];
333
- if (!_JS_IDENTIFIER.test(name))
334
- throw new Error("destructuredLocals[" + i + "] is not a valid JS identifier.");
335
- i > 0 && (destructuring += `,
336
- `), destructuring += name + " = __locals." + name;
337
- }
338
- prepended += destructuring + `;
339
- `;
340
- }
341
- opts._with !== !1 && (prepended += " with (" + opts.localsName + ` || {}) {
342
- `, appended += ` }
343
- `), appended += ` return __output;
344
- `, this.source = prepended + this.source + appended;
345
- }
346
- opts.compileDebug ? src = `var __line = 1
347
- , __lines = ` + JSON.stringify(this.templateText) + `
348
- , __filename = ` + sanitizedFilename + `;
349
- try {
350
- ` + this.source + `} catch (e) {
351
- rethrow(e, __lines, __filename, __line, escapeFn);
352
- }
353
- ` : src = this.source, opts.client && (src = "escapeFn = escapeFn || " + escapeFn.toString() + `;
354
- ` + src, opts.compileDebug && (src = "rethrow = rethrow || " + rethrow.toString() + `;
355
- ` + src)), opts.strict && (src = `"use strict";
356
- ` + src), opts.debug && console.log(src), opts.compileDebug && opts.filename && (src = src + `
357
- //# sourceURL=` + sanitizedFilename + `
358
- `);
359
- try {
360
- if (opts.async)
361
- try {
362
- ctor = new Function("return (async function(){}).constructor;")();
363
- } catch (e) {
364
- throw e instanceof SyntaxError ? new Error("This environment does not support async/await") : e;
365
- }
366
- else
367
- ctor = Function;
368
- fn = new ctor(opts.localsName + ", escapeFn, include, rethrow", src);
369
- } catch (e) {
370
- throw e instanceof SyntaxError && (opts.filename && (e.message += " in " + opts.filename), e.message += ` while compiling ejs
371
-
372
- `, e.message += `If the above error is not helpful, you may want to try EJS-Lint:
373
- `, e.message += "https://github.com/RyanZim/EJS-Lint", opts.async || (e.message += `
374
- `, e.message += "Or, if you meant to create an async function, pass `async: true` as an option.")), e;
375
- }
376
- var returnedFn = opts.client ? fn : function(data) {
377
- var include = function(path2, includeData) {
378
- var d = utils.shallowCopy(utils.createNullProtoObjWherePossible(), data);
379
- return includeData && (d = utils.shallowCopy(d, includeData)), includeFile(path2, opts)(d);
380
- };
381
- return fn.apply(
382
- opts.context,
383
- [data || utils.createNullProtoObjWherePossible(), escapeFn, include, rethrow]
384
- );
385
- };
386
- if (opts.filename && typeof Object.defineProperty == "function") {
387
- var filename = opts.filename, basename2 = path.basename(filename, path.extname(filename));
388
- try {
389
- Object.defineProperty(returnedFn, "name", {
390
- value: basename2,
391
- writable: !1,
392
- enumerable: !1,
393
- configurable: !0
394
- });
395
- } catch {
396
- }
397
- }
398
- return returnedFn;
399
- },
400
- generateSource: function() {
401
- var opts = this.opts;
402
- opts.rmWhitespace && (this.templateText = this.templateText.replace(/[\r\n]+/g, `
403
- `).replace(/^\s+|\s+$/gm, "")), this.templateText = this.templateText.replace(/[ \t]*<%_/gm, "<%_").replace(/_%>[ \t]*/gm, "_%>");
404
- var self = this, matches = this.parseTemplateText(), d = this.opts.delimiter, o = this.opts.openDelimiter, c = this.opts.closeDelimiter;
405
- matches && matches.length && matches.forEach(function(line, index) {
406
- var closing;
407
- if (line.indexOf(o + d) === 0 && line.indexOf(o + d + d) !== 0 && (closing = matches[index + 2], !(closing == d + c || closing == "-" + d + c || closing == "_" + d + c)))
408
- throw new Error('Could not find matching close tag for "' + line + '".');
409
- self.scanLine(line);
410
- });
411
- },
412
- parseTemplateText: function() {
413
- for (var str = this.templateText, pat = this.regex, result = pat.exec(str), arr = [], firstPos; result; )
414
- firstPos = result.index, firstPos !== 0 && (arr.push(str.substring(0, firstPos)), str = str.slice(firstPos)), arr.push(result[0]), str = str.slice(result[0].length), result = pat.exec(str);
415
- return str && arr.push(str), arr;
416
- },
417
- _addOutput: function(line) {
418
- if (this.truncate && (line = line.replace(/^(?:\r\n|\r|\n)/, ""), this.truncate = !1), !line)
419
- return line;
420
- line = line.replace(/\\/g, "\\\\"), line = line.replace(/\n/g, "\\n"), line = line.replace(/\r/g, "\\r"), line = line.replace(/"/g, '\\"'), this.source += ' ; __append("' + line + `")
421
- `;
422
- },
423
- scanLine: function(line) {
424
- var self = this, d = this.opts.delimiter, o = this.opts.openDelimiter, c = this.opts.closeDelimiter, newLineCount = 0;
425
- switch (newLineCount = line.split(`
426
- `).length - 1, line) {
427
- case o + d:
428
- case o + d + "_":
429
- this.mode = Template.modes.EVAL;
430
- break;
431
- case o + d + "=":
432
- this.mode = Template.modes.ESCAPED;
433
- break;
434
- case o + d + "-":
435
- this.mode = Template.modes.RAW;
436
- break;
437
- case o + d + "#":
438
- this.mode = Template.modes.COMMENT;
439
- break;
440
- case o + d + d:
441
- this.mode = Template.modes.LITERAL, this.source += ' ; __append("' + line.replace(o + d + d, o + d) + `")
442
- `;
443
- break;
444
- case d + d + c:
445
- this.mode = Template.modes.LITERAL, this.source += ' ; __append("' + line.replace(d + d + c, d + c) + `")
446
- `;
447
- break;
448
- case d + c:
449
- case "-" + d + c:
450
- case "_" + d + c:
451
- this.mode == Template.modes.LITERAL && this._addOutput(line), this.mode = null, this.truncate = line.indexOf("-") === 0 || line.indexOf("_") === 0;
452
- break;
453
- default:
454
- if (this.mode) {
455
- switch (this.mode) {
456
- case Template.modes.EVAL:
457
- case Template.modes.ESCAPED:
458
- case Template.modes.RAW:
459
- line.lastIndexOf("//") > line.lastIndexOf(`
460
- `) && (line += `
461
- `);
462
- }
463
- switch (this.mode) {
464
- // Just executing code
465
- case Template.modes.EVAL:
466
- this.source += " ; " + line + `
467
- `;
468
- break;
469
- // Exec, esc, and output
470
- case Template.modes.ESCAPED:
471
- this.source += " ; __append(escapeFn(" + stripSemi(line) + `))
472
- `;
473
- break;
474
- // Exec and output
475
- case Template.modes.RAW:
476
- this.source += " ; __append(" + stripSemi(line) + `)
477
- `;
478
- break;
479
- case Template.modes.COMMENT:
480
- break;
481
- // Literal <%% mode, append as raw output
482
- case Template.modes.LITERAL:
483
- this._addOutput(line);
484
- break;
485
- }
486
- } else
487
- this._addOutput(line);
488
- }
489
- self.opts.compileDebug && newLineCount && (this.currentLine += newLineCount, this.source += " ; __line = " + this.currentLine + `
490
- `);
491
- }
492
- };
493
- exports.escapeXML = utils.escapeXML;
494
- exports.__express = exports.renderFile;
495
- exports.VERSION = _VERSION_STRING;
496
- exports.name = _NAME;
497
- typeof window < "u" && (window.ejs = exports);
498
- }
499
- });
500
-
501
- // src/builder-manager/index.ts
502
- import { cp, rm, writeFile as writeFile3 } from "node:fs/promises";
503
- import { stringifyProcessEnvs } from "@aussieljk/forkbook/internal/common";
504
- import { logger } from "@aussieljk/forkbook/internal/node-logger";
505
- var import_sirv = __toESM(require_build(), 1);
506
- import { join as join5, parse as parse2 } from "pathe";
507
-
508
- // src/builder-manager/bundle.ts
509
- import { readFile } from "node:fs/promises";
510
- import { dirname, join, relative } from "pathe";
511
-
512
- // src/manager/globals/exports.ts
513
- var exports_default = {
514
- react: [
515
- "Children",
516
- "Component",
517
- "Fragment",
518
- "Profiler",
519
- "PureComponent",
520
- "StrictMode",
521
- "Suspense",
522
- "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",
523
- "act",
524
- "cloneElement",
525
- "createContext",
526
- "createElement",
527
- "createFactory",
528
- "createRef",
529
- "forwardRef",
530
- "isValidElement",
531
- "lazy",
532
- "memo",
533
- "startTransition",
534
- "unstable_act",
535
- "useCallback",
536
- "useContext",
537
- "useDebugValue",
538
- "useDeferredValue",
539
- "useEffect",
540
- "useId",
541
- "useImperativeHandle",
542
- "useInsertionEffect",
543
- "useLayoutEffect",
544
- "useMemo",
545
- "useReducer",
546
- "useRef",
547
- "useState",
548
- "useSyncExternalStore",
549
- "useTransition",
550
- "version"
551
- ],
552
- "react/jsx-runtime": ["Fragment", "jsx", "jsxs"],
553
- "react/jsx-dev-runtime": ["Fragment", "jsxDEV"],
554
- "react-dom": [
555
- "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",
556
- "createPortal",
557
- "createRoot",
558
- "findDOMNode",
559
- "flushSync",
560
- "hydrate",
561
- "hydrateRoot",
562
- "render",
563
- "unmountComponentAtNode",
564
- "unstable_batchedUpdates",
565
- "unstable_renderSubtreeIntoContainer",
566
- "version"
567
- ],
568
- "react-dom/client": ["createRoot", "hydrateRoot"],
569
- "@phosphor-icons/react": [
570
- "AppleLogoIcon",
571
- "ArrowBendUpLeftIcon",
572
- "ArrowBendUpRightIcon",
573
- "ArrowCircleLeftIcon",
574
- "ArrowCircleRightIcon",
575
- "ArrowClockwiseIcon",
576
- "ArrowCounterClockwiseIcon",
577
- "ArrowDownIcon",
578
- "ArrowDownLeftIcon",
579
- "ArrowDownRightIcon",
580
- "ArrowLeftIcon",
581
- "ArrowRightIcon",
582
- "ArrowSquareInIcon",
583
- "ArrowSquareOutIcon",
584
- "ArrowUpIcon",
585
- "ArrowUpLeftIcon",
586
- "ArrowUpRightIcon",
587
- "ArrowsClockwiseIcon",
588
- "ArrowsInLineVerticalIcon",
589
- "ArrowsLeftRightIcon",
590
- "ArrowsOutIcon",
591
- "ArrowsOutLineVerticalIcon",
592
- "ArrowsOutSimpleIcon",
593
- "AtomIcon",
594
- "BackspaceIcon",
595
- "BasketIcon",
596
- "BellIcon",
597
- "BookOpenIcon",
598
- "BookmarkSimpleIcon",
599
- "BooksIcon",
600
- "BroomIcon",
601
- "BrowserIcon",
602
- "BugIcon",
603
- "CalendarBlankIcon",
604
- "CameraIcon",
605
- "CaretDownIcon",
606
- "CaretLeftIcon",
607
- "CaretRightIcon",
608
- "CaretUpIcon",
609
- "CertificateIcon",
610
- "ChartBarIcon",
611
- "ChartLineIcon",
612
- "ChatCenteredIcon",
613
- "ChatCenteredTextIcon",
614
- "ChatCircleDotsIcon",
615
- "ChatCircleIcon",
616
- "ChatsIcon",
617
- "CheckCircleIcon",
618
- "CheckIcon",
619
- "ChecksIcon",
620
- "CircleHalfIcon",
621
- "CircleHalfTiltIcon",
622
- "CircleIcon",
623
- "ClockIcon",
624
- "CloudIcon",
625
- "CodeIcon",
626
- "CommandIcon",
627
- "CompassIcon",
628
- "CopyIcon",
629
- "CpuIcon",
630
- "CreditCardIcon",
631
- "CrosshairIcon",
632
- "CursorClickIcon",
633
- "CursorIcon",
634
- "DatabaseIcon",
635
- "DeviceMobileIcon",
636
- "DeviceTabletIcon",
637
- "DiamondIcon",
638
- "DiscordLogoIcon",
639
- "DotsSixVerticalIcon",
640
- "DotsThreeIcon",
641
- "DownloadSimpleIcon",
642
- "EnvelopeSimpleIcon",
643
- "ExportIcon",
644
- "EyeIcon",
645
- "EyeSlashIcon",
646
- "FacebookLogoIcon",
647
- "FastForwardIcon",
648
- "FigmaLogoIcon",
649
- "FileTextIcon",
650
- "FilesIcon",
651
- "FlagIcon",
652
- "FlaskIcon",
653
- "FlipHorizontalIcon",
654
- "FloppyDiskIcon",
655
- "FolderIcon",
656
- "FunnelSimpleIcon",
657
- "GaugeIcon",
658
- "GearIcon",
659
- "GiftIcon",
660
- "GitBranchIcon",
661
- "GitCommitIcon",
662
- "GitMergeIcon",
663
- "GitPullRequestIcon",
664
- "GithubLogoIcon",
665
- "GitlabLogoIcon",
666
- "GlobeIcon",
667
- "GoogleChromeLogoIcon",
668
- "GoogleDriveLogoIcon",
669
- "GoogleLogoIcon",
670
- "GraphIcon",
671
- "GridFourIcon",
672
- "GridNineIcon",
673
- "HandPointingIcon",
674
- "HeartIcon",
675
- "HourglassIcon",
676
- "HouseIcon",
677
- "IconContext",
678
- "IdentificationCardIcon",
679
- "ImageIcon",
680
- "InfoIcon",
681
- "KeyIcon",
682
- "LifebuoyIcon",
683
- "LightningIcon",
684
- "LightningSlashIcon",
685
- "LinkBreakIcon",
686
- "LinkIcon",
687
- "LinkedinLogoIcon",
688
- "LinuxLogoIcon",
689
- "ListBulletsIcon",
690
- "ListChecksIcon",
691
- "ListIcon",
692
- "ListNumbersIcon",
693
- "LockIcon",
694
- "LockOpenIcon",
695
- "MagicWandIcon",
696
- "MagnifyingGlassIcon",
697
- "MagnifyingGlassMinusIcon",
698
- "MagnifyingGlassPlusIcon",
699
- "MapPinIcon",
700
- "MarkdownLogoIcon",
701
- "MediumLogoIcon",
702
- "MemoryIcon",
703
- "MicrosoftOutlookLogoIcon",
704
- "MinusIcon",
705
- "MoonIcon",
706
- "NutIcon",
707
- "PackageIcon",
708
- "PaintBrushBroadIcon",
709
- "PaintBrushIcon",
710
- "PaperclipIcon",
711
- "ParagraphIcon",
712
- "PencilSimpleIcon",
713
- "PersonArmsSpreadIcon",
714
- "PhoneIcon",
715
- "PlayCircleIcon",
716
- "PlayIcon",
717
- "PlusCircleIcon",
718
- "PlusIcon",
719
- "PowerIcon",
720
- "PrinterIcon",
721
- "ProhibitIcon",
722
- "PushPinIcon",
723
- "PushPinSlashIcon",
724
- "PuzzlePieceIcon",
725
- "QuestionIcon",
726
- "RewindIcon",
727
- "RssIcon",
728
- "RulerIcon",
729
- "SealCheckIcon",
730
- "SelectionIcon",
731
- "ShareNetworkIcon",
732
- "ShieldIcon",
733
- "SidebarIcon",
734
- "SidebarSimpleIcon",
735
- "SignpostIcon",
736
- "SkipBackIcon",
737
- "SkipForwardIcon",
738
- "SlidersHorizontalIcon",
739
- "SmileyIcon",
740
- "SmileyMehIcon",
741
- "SmileySadIcon",
742
- "SortAscendingIcon",
743
- "SortDescendingIcon",
744
- "SpeakerHighIcon",
745
- "SquareSplitHorizontalIcon",
746
- "SquareSplitVerticalIcon",
747
- "SquaresFourIcon",
748
- "StackIcon",
749
- "StarIcon",
750
- "StickerIcon",
751
- "StopCircleIcon",
752
- "StopIcon",
753
- "SunIcon",
754
- "TagIcon",
755
- "TextAlignLeftIcon",
756
- "TextAlignRightIcon",
757
- "TextBIcon",
758
- "TextItalicIcon",
759
- "TextTIcon",
760
- "TextboxIcon",
761
- "ThumbsUpIcon",
762
- "TimerIcon",
763
- "TrashIcon",
764
- "TrayArrowUpIcon",
765
- "TreeStructureIcon",
766
- "TwitterLogoIcon",
767
- "UploadSimpleIcon",
768
- "UserCircleIcon",
769
- "UserGearIcon",
770
- "UserIcon",
771
- "UserPlusIcon",
772
- "UsersIcon",
773
- "VideoCameraIcon",
774
- "WarningCircleIcon",
775
- "WarningIcon",
776
- "WatchIcon",
777
- "WindowsLogoIcon",
778
- "WrenchIcon",
779
- "XCircleIcon",
780
- "XIcon",
781
- "XLogoIcon",
782
- "XSquareIcon",
783
- "YoutubeLogoIcon"
784
- ],
785
- "@aussieljk/forkbook/manager-api": [
786
- "ActiveTabs",
787
- "Consumer",
788
- "ManagerContext",
789
- "Provider",
790
- "RequestResponseError",
791
- "Tag",
792
- "addons",
793
- "combineParameters",
794
- "controlOrMetaKey",
795
- "controlOrMetaSymbol",
796
- "eventMatchesShortcut",
797
- "eventToShortcut",
798
- "experimental_MockUniversalStore",
799
- "experimental_getStatusStore",
800
- "experimental_getTestProviderStore",
801
- "experimental_requestResponse",
802
- "experimental_useStatusStore",
803
- "experimental_useTestProviderStore",
804
- "getService",
805
- "internal_UniversalStore",
806
- "internal_fullStatusStore",
807
- "internal_fullTestProviderStore",
808
- "internal_universalStatusStore",
809
- "internal_universalTestProviderStore",
810
- "internal_useUniversalStore",
811
- "isMacLike",
812
- "isShortcutTaken",
813
- "keyToSymbol",
814
- "merge",
815
- "optionOrAltSymbol",
816
- "registerService",
817
- "shortcutMatchesShortcut",
818
- "shortcutToAriaKeyshortcuts",
819
- "shortcutToHumanString",
820
- "types",
821
- "useAddonState",
822
- "useArgTypes",
823
- "useArgs",
824
- "useChannel",
825
- "useGlobalTypes",
826
- "useGlobals",
827
- "useParameter",
828
- "useServiceCommand",
829
- "useServiceQuery",
830
- "useSharedState",
831
- "useStoryPrepared",
832
- "useStorybookApi",
833
- "useStorybookState"
834
- ],
835
- "@aussieljk/forkbook/theming": [
836
- "ThemeProvider",
837
- "background",
838
- "color",
839
- "convert",
840
- "create",
841
- "cssVarsToString",
842
- "darken",
843
- "easing",
844
- "ensure",
845
- "getPreferredColorScheme",
846
- "globalCss",
847
- "lighten",
848
- "resetCss",
849
- "themeToCssVars",
850
- "themes",
851
- "tokens",
852
- "typography",
853
- "useTheme"
854
- ],
855
- "@aussieljk/forkbook/theming/create": ["create", "themes"],
856
- "@aussieljk/forkbook/test": [
857
- "buildQueries",
858
- "clearAllMocks",
859
- "configure",
860
- "createEvent",
861
- "expect",
862
- "findAllByAltText",
863
- "findAllByDisplayValue",
864
- "findAllByLabelText",
865
- "findAllByPlaceholderText",
866
- "findAllByRole",
867
- "findAllByTestId",
868
- "findAllByText",
869
- "findAllByTitle",
870
- "findByAltText",
871
- "findByDisplayValue",
872
- "findByLabelText",
873
- "findByPlaceholderText",
874
- "findByRole",
875
- "findByTestId",
876
- "findByText",
877
- "findByTitle",
878
- "fireEvent",
879
- "fn",
880
- "getAllByAltText",
881
- "getAllByDisplayValue",
882
- "getAllByLabelText",
883
- "getAllByPlaceholderText",
884
- "getAllByRole",
885
- "getAllByTestId",
886
- "getAllByText",
887
- "getAllByTitle",
888
- "getByAltText",
889
- "getByDisplayValue",
890
- "getByLabelText",
891
- "getByPlaceholderText",
892
- "getByRole",
893
- "getByTestId",
894
- "getByText",
895
- "getByTitle",
896
- "getConfig",
897
- "getDefaultNormalizer",
898
- "getElementError",
899
- "getNodeText",
900
- "getQueriesForElement",
901
- "getRoles",
902
- "getSuggestedQuery",
903
- "isInaccessible",
904
- "isMockFunction",
905
- "logDOM",
906
- "logRoles",
907
- "mocked",
908
- "mocks",
909
- "onMockCall",
910
- "prettyDOM",
911
- "prettyFormat",
912
- "queries",
913
- "queryAllByAltText",
914
- "queryAllByAttribute",
915
- "queryAllByDisplayValue",
916
- "queryAllByLabelText",
917
- "queryAllByPlaceholderText",
918
- "queryAllByRole",
919
- "queryAllByTestId",
920
- "queryAllByText",
921
- "queryAllByTitle",
922
- "queryByAltText",
923
- "queryByAttribute",
924
- "queryByDisplayValue",
925
- "queryByLabelText",
926
- "queryByPlaceholderText",
927
- "queryByRole",
928
- "queryByTestId",
929
- "queryByText",
930
- "queryByTitle",
931
- "queryHelpers",
932
- "resetAllMocks",
933
- "restoreAllMocks",
934
- "sb",
935
- "screen",
936
- "spyOn",
937
- "uninstrumentedUserEvent",
938
- "userEvent",
939
- "waitFor",
940
- "waitForElementToBeRemoved",
941
- "within"
942
- ],
943
- "@aussieljk/forkbook/internal/channels": [
944
- "Channel",
945
- "HEARTBEAT_INTERVAL",
946
- "PostMessageTransport",
947
- "SERVER_CHANNEL_PATH",
948
- "WebsocketTransport",
949
- "clearChannel",
950
- "createBrowserChannel",
951
- "ensureChannel",
952
- "getChannel",
953
- "installNoopChannel",
954
- "requireChannel",
955
- "setChannel"
956
- ],
957
- "@aussieljk/forkbook/internal/client-logger": ["deprecate", "logger", "once", "pretty"],
958
- "@aussieljk/forkbook/internal/components": [
959
- "A",
960
- "AbstractToolbar",
961
- "ActionBar",
962
- "ActionList",
963
- "AddonPanel",
964
- "Badge",
965
- "Bar",
966
- "Blockquote",
967
- "Button",
968
- "Card",
969
- "ClipboardCode",
970
- "Code",
971
- "Collapsible",
972
- "DL",
973
- "Div",
974
- "DocumentWrapper",
975
- "EmptyTabContent",
976
- "ErrorFormatter",
977
- "FlexBar",
978
- "ForkbookIcon",
979
- "ForkbookLogo",
980
- "Form",
981
- "H1",
982
- "H2",
983
- "H3",
984
- "H4",
985
- "H5",
986
- "H6",
987
- "HR",
988
- "IconButton",
989
- "Img",
990
- "LI",
991
- "Link",
992
- "ListItem",
993
- "Loader",
994
- "Modal",
995
- "ModalDecorator",
996
- "OL",
997
- "P",
998
- "Placeholder",
999
- "Popover",
1000
- "PopoverProvider",
1001
- "Pre",
1002
- "ProgressSpinner",
1003
- "ResetWrapper",
1004
- "ScrollArea",
1005
- "Select",
1006
- "Separator",
1007
- "Spaced",
1008
- "Span",
1009
- "StatelessTab",
1010
- "StatelessTabList",
1011
- "StatelessTabPanel",
1012
- "StatelessTabsView",
1013
- "SyntaxHighlighter",
1014
- "TT",
1015
- "TabBar",
1016
- "TabButton",
1017
- "TabList",
1018
- "TabPanel",
1019
- "TabWrapper",
1020
- "Table",
1021
- "Tabs",
1022
- "TabsState",
1023
- "TabsView",
1024
- "ToggleButton",
1025
- "Toolbar",
1026
- "Tooltip",
1027
- "TooltipLinkList",
1028
- "TooltipMessage",
1029
- "TooltipNote",
1030
- "TooltipProvider",
1031
- "UL",
1032
- "WithTooltip",
1033
- "WithTooltipPure",
1034
- "Zoom",
1035
- "announce",
1036
- "clearAnnouncer",
1037
- "codeCommon",
1038
- "components",
1039
- "convertToBaseUiPlacement",
1040
- "createCopyToClipboardFunction",
1041
- "destroyAnnouncer",
1042
- "getStoryHref",
1043
- "interleaveSeparators",
1044
- "nameSpaceClassNames",
1045
- "resetComponents",
1046
- "useCopyButton",
1047
- "useTabsState",
1048
- "withReset"
1049
- ],
1050
- "@aussieljk/forkbook/internal/core-events": [
1051
- "AI_PROMPT_NUDGE",
1052
- "AI_SETUP_ANALYTICS_REQUEST",
1053
- "AI_SETUP_ANALYTICS_RESPONSE",
1054
- "ARGTYPES_INFO_REQUEST",
1055
- "ARGTYPES_INFO_RESPONSE",
1056
- "CHANNEL_CREATED",
1057
- "CHANNEL_WS_DISCONNECT",
1058
- "CONFIG_ERROR",
1059
- "CURRENT_STORY_WAS_SET",
1060
- "DOCS_PAGE_IN_VIEW",
1061
- "DOCS_PREPARED",
1062
- "DOCS_RENDERED",
1063
- "FORCE_REMOUNT",
1064
- "FORCE_RE_RENDER",
1065
- "GHOST_STORIES_REQUEST",
1066
- "GHOST_STORIES_RESPONSE",
1067
- "GLOBALS_UPDATED",
1068
- "MANAGER_INERT_ATTRIBUTE_CHANGED",
1069
- "NAVIGATE_URL",
1070
- "OPEN_IN_EDITOR_REQUEST",
1071
- "OPEN_IN_EDITOR_RESPONSE",
1072
- "PLAY_FUNCTION_THREW_EXCEPTION",
1073
- "PRELOAD_ENTRIES",
1074
- "PREVIEW_BUILDER_PROGRESS",
1075
- "PREVIEW_INITIALIZED",
1076
- "PREVIEW_KEYDOWN",
1077
- "REGISTER_SUBSCRIPTION",
1078
- "REQUEST_WHATS_NEW_DATA",
1079
- "RESET_STORY_ARGS",
1080
- "RESULT_WHATS_NEW_DATA",
1081
- "SAVE_STORY_REQUEST",
1082
- "SAVE_STORY_RESPONSE",
1083
- "SELECT_STORY",
1084
- "SET_CONFIG",
1085
- "SET_CURRENT_STORY",
1086
- "SET_FILTER",
1087
- "SET_GLOBALS",
1088
- "SET_INDEX",
1089
- "SET_STORIES",
1090
- "SET_WHATS_NEW_CACHE",
1091
- "SHARED_STATE_CHANGED",
1092
- "SHARED_STATE_SET",
1093
- "SHARE_ISOLATE_MODE",
1094
- "SIDEBAR_FILTER_CHANGED",
1095
- "STORIES_COLLAPSE_ALL",
1096
- "STORIES_EXPAND_ALL",
1097
- "STORY_ARGS_UPDATED",
1098
- "STORY_CHANGED",
1099
- "STORY_ERRORED",
1100
- "STORY_FINISHED",
1101
- "STORY_HOT_UPDATED",
1102
- "STORY_INDEX_INVALIDATED",
1103
- "STORY_MISSING",
1104
- "STORY_PREPARED",
1105
- "STORY_RENDERED",
1106
- "STORY_RENDER_PHASE_CHANGED",
1107
- "STORY_SPECIFIED",
1108
- "STORY_THREW_EXCEPTION",
1109
- "STORY_UNCHANGED",
1110
- "TELEMETRY_ERROR",
1111
- "TOGGLE_WHATS_NEW_NOTIFICATIONS",
1112
- "UNHANDLED_ERRORS_WHILE_PLAYING",
1113
- "UPDATE_GLOBALS",
1114
- "UPDATE_QUERY_PARAMS",
1115
- "UPDATE_STORY_ARGS"
1116
- ],
1117
- "@aussieljk/forkbook/internal/manager-errors": [
1118
- "Category",
1119
- "OpenServiceStaticSnapshotInvalidError",
1120
- "OpenServiceStaticSnapshotLoadError",
1121
- "ProviderDoesNotExtendBaseProviderError",
1122
- "StatusTypeIdMismatchError",
1123
- "UncaughtManagerError",
1124
- "UniversalStoreFollowerTimeoutError"
1125
- ],
1126
- "@aussieljk/forkbook/internal/router": [
1127
- "BaseLocationProvider",
1128
- "DEEPLY_EQUAL",
1129
- "Link",
1130
- "Location",
1131
- "LocationProvider",
1132
- "Match",
1133
- "MemoryRouter",
1134
- "Route",
1135
- "buildArgsParam",
1136
- "deepDiff",
1137
- "getMatch",
1138
- "parsePath",
1139
- "queryFromLocation",
1140
- "stringifyQuery",
1141
- "useNavigate"
1142
- ],
1143
- "@aussieljk/forkbook/internal/types": [
1144
- "Addon_TypesEnum",
1145
- "CHANGE_DETECTION_STATUS_TYPE_ID",
1146
- "Feature",
1147
- "NON_AGGREGATED_STATUS_TYPE_IDS",
1148
- "REVIEW_EVENTS",
1149
- "REVIEW_NAMESPACE",
1150
- "REVIEW_STATUS_TYPE_ID",
1151
- "SupportedBuilder",
1152
- "SupportedFramework",
1153
- "SupportedLanguage",
1154
- "SupportedRenderer"
1155
- ]
1156
- };
1157
-
1158
- // src/manager/globals/globals.ts
1159
- var globalsNameReferenceMap = {
1160
- react: "__REACT__",
1161
- "react/jsx-runtime": "__REACT_JSX_RUNTIME__",
1162
- "react/jsx-dev-runtime": "__REACT_JSX_DEV_RUNTIME__",
1163
- "react-dom": "__REACT_DOM__",
1164
- "react-dom/client": "__REACT_DOM_CLIENT__",
1165
- "@phosphor-icons/react": "__FORKBOOK_ICONS__",
1166
- "@aussieljk/forkbook/manager-api": "__FORKBOOK_API__",
1167
- "@aussieljk/forkbook/theming": "__FORKBOOK_THEMING__",
1168
- "@aussieljk/forkbook/theming/create": "__FORKBOOK_THEMING_CREATE__",
1169
- "@aussieljk/forkbook/test": "__FORKBOOK_TEST__",
1170
- "@aussieljk/forkbook/internal/channels": "__FORKBOOK_CHANNELS__",
1171
- "@aussieljk/forkbook/internal/client-logger": "__FORKBOOK_CLIENT_LOGGER__",
1172
- "@aussieljk/forkbook/internal/components": "__FORKBOOK_COMPONENTS__",
1173
- "@aussieljk/forkbook/internal/core-events": "__FORKBOOK_CORE_EVENTS__",
1174
- "@aussieljk/forkbook/internal/manager-errors": "__FORKBOOK_CORE_EVENTS_MANAGER_ERRORS__",
1175
- "@aussieljk/forkbook/internal/router": "__FORKBOOK_ROUTER__",
1176
- "@aussieljk/forkbook/internal/types": "__FORKBOOK_TYPES__"
1177
- }, globalPackages = Object.keys(globalsNameReferenceMap);
1178
-
1179
- // src/manager/globals/globals-module-info.ts
1180
- var duplicatedKeys = [
1181
- "@aussieljk/forkbook/theming",
1182
- "@aussieljk/forkbook/theming/create",
1183
- "@aussieljk/forkbook/manager-api",
1184
- "@aussieljk/forkbook/test",
1185
- "@aussieljk/forkbook/actions",
1186
- "@aussieljk/forkbook/highlight",
1187
- "@aussieljk/forkbook/viewport"
1188
- ], globalsModuleInfoMap = globalPackages.reduce(
1189
- (acc, key) => (acc[key] = {
1190
- type: "esm",
1191
- varName: globalsNameReferenceMap[key],
1192
- namedExports: exports_default[key],
1193
- defaultExport: !0
1194
- }, duplicatedKeys.includes(key) && (acc[key.replace("@aussieljk/forkbook", "@aussieljk/forkbook/internal")] = {
1195
- type: "esm",
1196
- varName: globalsNameReferenceMap[key],
1197
- namedExports: exports_default[key],
1198
- defaultExport: !0
1199
- }), acc),
1200
- {}
1201
- );
1202
-
1203
- // src/builder-manager/bundle.ts
1204
- var MEDIA_EXTENSIONS = [
1205
- ".png",
1206
- ".gif",
1207
- ".jpg",
1208
- ".jpeg",
1209
- ".svg",
1210
- ".webp",
1211
- ".webm",
1212
- ".mp3",
1213
- ".woff2",
1214
- ".woff",
1215
- ".eot",
1216
- ".ttf"
1217
- ], GLOBAL_PREFIX = "\0forkbook-global:";
1218
- function globalExternals() {
1219
- return {
1220
- name: "forkbook-global-externals",
1221
- resolveId(id) {
1222
- return id in globalsModuleInfoMap ? `${GLOBAL_PREFIX}${id}` : null;
1223
- },
1224
- load(id) {
1225
- if (!id.startsWith(GLOBAL_PREFIX))
1226
- return null;
1227
- let name = id.slice(GLOBAL_PREFIX.length), { namedExports, varName } = globalsModuleInfoMap[name];
1228
- return [
1229
- ...namedExports.map((key) => `export const ${key} = ${varName}[${JSON.stringify(key)}];`),
1230
- `export default ${varName};`
1231
- ].join(`
1232
- `);
1233
- }
1234
- };
1235
- }
1236
- function injectCss() {
1237
- return {
1238
- name: "forkbook-manager-css",
1239
- transform: {
1240
- filter: { id: /\.css$/ },
1241
- handler(code) {
1242
- return {
1243
- code: `const style = document.createElement('style');
1244
- style.textContent = ${JSON.stringify(code)};
1245
- document.head.appendChild(style);`,
1246
- moduleType: "js"
1247
- };
1248
- }
1249
- }
1250
- };
1251
- }
1252
- function commonDirectory(files) {
1253
- return files.map(dirname).reduce((common, directory) => {
1254
- for (; !`${directory}/`.startsWith(`${common}/`); )
1255
- common = dirname(common);
1256
- return common;
1257
- });
1258
- }
1259
- async function describeManagerEntry(entry) {
1260
- let wrapper = await readFile(entry, "utf8").catch(() => ""), file = /^import '(.*)';$/.exec(wrapper.trim())?.[1]?.replaceAll("\\'", "'") ?? entry, normalized = file.replaceAll("\\", "/"), packagePath = normalized.split("/node_modules/").slice(1).at(-1), owner;
1261
- if (packagePath) {
1262
- let parts = packagePath.split("/");
1263
- owner = parts[0].startsWith("@") ? `${parts[0]}/${parts[1]}` : parts[0];
1264
- let area = /\/dist\/(addon-[^/]+)\//.exec(normalized)?.[1];
1265
- area && (owner = `${owner}/${area}`);
1266
- }
1267
- return { file, owner };
1268
- }
1269
- async function bundleManagerEntries(config) {
1270
- let { rolldown } = await import("rolldown"), base = config.entryPoints.length ? commonDirectory(config.entryPoints) : config.outdir, outputFiles = await Promise.all(
1271
- config.entryPoints.map(async (entry) => {
1272
- try {
1273
- return await bundleManagerEntry(entry);
1274
- } catch (error) {
1275
- let { file, owner } = await describeManagerEntry(entry);
1276
- throw new Error(
1277
- `Could not build the manager entry ${file}${owner ? ` (from ${owner})` : ""}.
1278
- ${error instanceof Error ? error.message : String(error)}`,
1279
- { cause: error }
1280
- );
1281
- }
1282
- })
1283
- );
1284
- async function bundleManagerEntry(entry) {
1285
- let bundle = await rolldown({
1286
- input: entry,
1287
- platform: "browser",
1288
- tsconfig: config.tsconfig,
1289
- logLevel: "warn",
1290
- resolve: {
1291
- conditionNames: ["browser", "module", "default"],
1292
- extensions: [".ts", ".tsx", ".mjs", ".js", ".jsx"]
1293
- },
1294
- moduleTypes: {
1295
- ".js": "jsx",
1296
- ...Object.fromEntries(MEDIA_EXTENSIONS.map((extension) => [extension, "dataurl"]))
1297
- },
1298
- transform: { target: BROWSER_TARGETS, jsx: "react", define: config.define },
1299
- plugins: [globalExternals(), injectCss()],
1300
- // A manager entry runs for its side effects. Keep every module, even in a package that
1301
- // says it has no side effects.
1302
- treeshake: { moduleSideEffects: () => !0, annotations: !1 }
1303
- });
1304
- try {
1305
- let { output } = await bundle.generate({
1306
- format: "esm",
1307
- codeSplitting: !1,
1308
- minify: config.minify ? !0 : "dce-only",
1309
- banner: "try{",
1310
- footer: '}catch(e){ console.error("[Forkbook] One of your manager-entries failed: " + import.meta.url, e); }'
1311
- });
1312
- return { path: join(config.outdir, relative(base, entry)), contents: output[0].code };
1313
- } finally {
1314
- await bundle.close();
1315
- }
1316
- }
1317
- return { outputFiles };
1318
- }
1319
-
1320
- // src/builder-manager/utils/data.ts
1321
- import { basename } from "node:path";
1322
- import { getRefs } from "@aussieljk/forkbook/internal/common";
1323
-
1324
- // src/builder-manager/utils/template.ts
1325
- var import_ejs = __toESM(require_ejs(), 1);
1326
- import { readFile as readFile2 } from "node:fs/promises";
1327
- import { join as join2 } from "pathe";
1328
- var getTemplatePath = (template) => join2(resolvePackageDir("@aussieljk/forkbook"), "assets/server", template), readTemplate = async (template) => {
1329
- let path = getTemplatePath(template);
1330
- return readFile2(path, { encoding: "utf8" });
1331
- };
1332
- var customHeadHasFavicon = (head) => (head.match(/<link\b[^>]*>/gi) || []).some((tag) => {
1333
- let rel = tag.match(/\brel\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i);
1334
- return (rel?.[1] || rel?.[2] || rel?.[3] || "").split(/\s+/).some((token) => token.toLowerCase() === "icon");
1335
- }), renderHTML = async (template, title, favicon, customHead, cssFiles, jsFiles, features, refs, logLevel, docsOptions, tagsOptions, { versionCheck, configType }, globals) => {
1336
- let titleRef = await title, templateRef = await template, headRef = await customHead || "", stringifiedGlobals = Object.entries(globals).reduce(
1337
- (transformed, [key, value]) => ({ ...transformed, [key]: JSON.stringify(value) }),
1338
- {}
1339
- );
1340
- return (0, import_ejs.render)(templateRef, {
1341
- title: titleRef ? `${titleRef} - Forkbook` : "Forkbook",
1342
- files: { js: jsFiles, css: cssFiles },
1343
- favicon: customHeadHasFavicon(headRef) ? "" : await favicon,
1344
- globals: {
1345
- FEATURES: JSON.stringify(await features, null, 2),
1346
- REFS: JSON.stringify(await refs, null, 2),
1347
- LOGLEVEL: JSON.stringify(await logLevel, null, 2),
1348
- DOCS_OPTIONS: JSON.stringify(await docsOptions, null, 2),
1349
- CONFIG_TYPE: JSON.stringify(await configType, null, 2),
1350
- // Opt-in via FORKBOOK_DOCGEN_STORY_PREPARED: request server docgen for the Controls panel at
1351
- // STORY_PREPARED instead of the default STORY_RENDERED. See useStoryDocgenGateReady.
1352
- DOCGEN_STORY_PREPARED: JSON.stringify(process.env.FORKBOOK_DOCGEN_STORY_PREPARED === "true"),
1353
- // These two need to be double stringified because the UI expects a string
1354
- VERSIONCHECK: JSON.stringify(JSON.stringify(versionCheck), null, 2),
1355
- TAGS_OPTIONS: JSON.stringify(await tagsOptions, null, 2),
1356
- ...stringifiedGlobals
1357
- },
1358
- head: headRef
1359
- });
1360
- };
1361
-
1362
- // src/builder-manager/utils/data.ts
1363
- var getData = async (options) => {
1364
- let refs = getRefs(options), favicon = options.presets.apply("favicon").then((p) => basename(p)), features = options.presets.apply("features"), logLevel = options.presets.apply("logLevel"), title = options.presets.apply("title"), docsOptions = options.presets.apply("docs", {}), tagsOptions = options.presets.apply("tags", {}), template = readTemplate("template.ejs"), customHead = options.presets.apply("managerHead"), [instance, config] = await Promise.all([
1365
- //
1366
- executor.get(),
1367
- getConfig(options)
1368
- ]);
1369
- return {
1370
- refs,
1371
- features,
1372
- title,
1373
- docsOptions,
1374
- template,
1375
- customHead,
1376
- instance,
1377
- config,
1378
- logLevel,
1379
- favicon,
1380
- tagsOptions
1381
- };
1382
- };
1383
-
1384
- // src/builder-manager/utils/files.ts
1385
- import { existsSync } from "node:fs";
1386
- import { mkdir, writeFile } from "node:fs/promises";
1387
- import { dirname as dirname2, join as join3, normalize, relative as relative2 } from "node:path";
1388
- async function readOrderedFiles(addonsDir, outputFiles) {
1389
- let files = await Promise.all(
1390
- outputFiles?.map(async (file) => {
1391
- let { location, url } = sanitizePath(file, addonsDir);
1392
- if (!existsSync(location)) {
1393
- let directory = dirname2(location);
1394
- await mkdir(directory, { recursive: !0 });
1395
- }
1396
- return await writeFile(location, file.contents), url;
1397
- }) || []
1398
- ), jsFiles = files.filter((file) => file.endsWith(".js"));
1399
- return { cssFiles: files.filter((file) => file.endsWith(".css")), jsFiles };
1400
- }
1401
- function sanitizePath(file, addonsDir) {
1402
- let filePath = relative2(addonsDir, file.path), location = normalize(join3(addonsDir, filePath)), url = `./fb-addons/${slash(filePath).split("/").map(encodeURIComponent).join("/")}`;
1403
- return { location, url };
1404
- }
1405
-
1406
- // src/builder-manager/utils/framework.ts
1407
- import {
1408
- extractFrameworkPackageName,
1409
- frameworkPackages,
1410
- frameworkToRenderer,
1411
- getFrameworkName
1412
- } from "@aussieljk/forkbook/internal/common";
1413
- import {
1414
- SupportedBuilder
1415
- } from "@aussieljk/forkbook/internal/types";
1416
- var buildFrameworkGlobalsFromOptions = async (options) => {
1417
- let globals = {}, { builder: builderConfig, channelOptions } = await options.presets.apply("core"), builderName = typeof builderConfig == "string" ? builderConfig : builderConfig?.name, builder2 = Object.values(SupportedBuilder).find((builder3) => builderName?.includes(builder3)), frameworkName = await getFrameworkName(options), frameworkPackageName = extractFrameworkPackageName(frameworkName), framework = frameworkPackages[frameworkPackageName], renderer = frameworkToRenderer[framework];
1418
- return options.configType === "DEVELOPMENT" && (globals.CHANNEL_OPTIONS = { wsToken: channelOptions?.wsToken }), globals.FORKBOOK_BUILDER = builder2, globals.FORKBOOK_FRAMEWORK = framework, globals.FORKBOOK_RENDERER = renderer, globals.FORKBOOK_NETWORK_ADDRESS = options.host ? options.networkAddress : void 0, (await options.presets.apply("security"))?.insecureIframeMessaging && (globals.INSECURE_IFRAME_MESSAGING = !0), globals;
1419
- };
1420
-
1421
- // src/builder-manager/utils/managerEntries.ts
1422
- import { existsSync as existsSync2 } from "node:fs";
1423
- import { mkdir as mkdir2, writeFile as writeFile2 } from "node:fs/promises";
1424
- import { dirname as dirname3, join as join4, parse, relative as relative3, sep } from "node:path";
1425
- import { resolvePathInStorybookCache } from "@aussieljk/forkbook/internal/common";
1426
- var sanitizeBase = (path) => path.replaceAll(".", "").replaceAll("@", "").replaceAll(sep, "-").replaceAll("/", "-").replaceAll(new RegExp(/^(-)+/g), ""), sanitizeFinal = (path) => {
1427
- let sections = path.split(/-?node_modules-?/);
1428
- return sections[sections.length - 1].replaceAll("storybook-addon-", "").replaceAll("dist-", "");
1429
- };
1430
- async function wrapManagerEntries(entrypoints, uniqueId) {
1431
- return Promise.all(
1432
- entrypoints.map(async (entry, i) => {
1433
- let { name, dir } = parse(entry), cacheLocation = resolvePathInStorybookCache("fb-manager", uniqueId);
1434
- if (!cacheLocation)
1435
- throw new Error("Could not create/find cache directory");
1436
- let base = relative3(process.cwd(), dir), location = join4(
1437
- cacheLocation,
1438
- sanitizeFinal(join4(`${sanitizeBase(base)}-${i}`, `${sanitizeBase(name)}-bundle.js`))
1439
- );
1440
- if (!existsSync2(location)) {
1441
- let directory = dirname3(location);
1442
- await mkdir2(directory, { recursive: !0 });
1443
- }
1444
- return await writeFile2(location, `import '${slash(entry).replaceAll(/'/g, "\\'")}';`), location;
1445
- })
1446
- );
1447
- }
1448
-
1449
- // src/builder-manager/index.ts
1450
- var CORE_DIR_ORIGIN = join5(resolvePackageDir("@aussieljk/forkbook"), "dist/manager"), isRootPath = /^\/($|\?)/, compilation, asyncIterator, getConfig = async (options) => {
1451
- let [managerEntriesFromPresets, envs] = await Promise.all([
1452
- options.presets.apply("managerEntries", []),
1453
- options.presets.apply("env")
1454
- ]), tsconfigPath = getTemplatePath("addon.tsconfig.json"), configDirManagerEntry;
1455
- try {
1456
- configDirManagerEntry = resolveModulePath("./manager", {
1457
- from: options.configDir,
1458
- extensions: [".js", ".mjs", ".jsx", ".ts", ".mts", ".tsx"]
1459
- });
1460
- } catch {
1461
- }
1462
- let entryPoints = configDirManagerEntry ? [...managerEntriesFromPresets, configDirManagerEntry] : managerEntriesFromPresets;
1463
- return {
1464
- entryPoints: await wrapManagerEntries(entryPoints, options.cacheKey),
1465
- outdir: join5(options.outputDir || "./", "fb-addons"),
1466
- tsconfig: tsconfigPath,
1467
- minify: !1,
1468
- define: {
1469
- "process.env": JSON.stringify(envs),
1470
- ...stringifyProcessEnvs(envs),
1471
- global: "window",
1472
- module: "{}"
1473
- }
1474
- };
1475
- }, executor = {
1476
- get: async () => bundleManagerEntries
1477
- }, starter = async function* ({
1478
- startTime,
1479
- options,
1480
- router
1481
- }) {
1482
- options.quiet || logger.info("Starting...");
1483
- let {
1484
- config,
1485
- favicon,
1486
- customHead,
1487
- features,
1488
- instance,
1489
- refs,
1490
- template,
1491
- title,
1492
- logLevel,
1493
- docsOptions,
1494
- tagsOptions
1495
- } = await getData(options);
1496
- yield;
1497
- let addonsDir = config.outdir;
1498
- await rm(addonsDir, { recursive: !0, force: !0 }), yield, compilation = await instance({
1499
- ...config
1500
- }), yield, router.use(
1501
- "/fb-addons",
1502
- (0, import_sirv.default)(addonsDir, {
1503
- maxAge: 3e5,
1504
- dev: !0,
1505
- immutable: !0
1506
- })
1507
- ), router.use(
1508
- "/fb-manager",
1509
- (0, import_sirv.default)(CORE_DIR_ORIGIN, {
1510
- maxAge: 3e5,
1511
- dev: !0,
1512
- immutable: !0
1513
- })
1514
- );
1515
- let { cssFiles, jsFiles } = await readOrderedFiles(addonsDir, compilation?.outputFiles), globals = await buildFrameworkGlobalsFromOptions(options);
1516
- yield;
1517
- let html = await renderHTML(
1518
- template,
1519
- title,
1520
- favicon,
1521
- customHead,
1522
- cssFiles,
1523
- jsFiles,
1524
- features,
1525
- refs,
1526
- logLevel,
1527
- docsOptions,
1528
- tagsOptions,
1529
- options,
1530
- globals
1531
- );
1532
- return yield, router.use("/", ({ url }, res, next) => {
1533
- url && isRootPath.test(url) ? (res.statusCode = 200, res.setHeader("Content-Type", "text/html"), res.write(html), res.end()) : next();
1534
- }), router.use("/index.html", (req, res) => {
1535
- res.statusCode = 200, res.setHeader("Content-Type", "text/html"), res.write(html), res.end();
1536
- }), {
1537
- bail,
1538
- stats: {
1539
- toJson: () => ({})
1540
- },
1541
- totalTime: process.hrtime(startTime)
1542
- };
1543
- }, builder = async function* ({ startTime, options }) {
1544
- if (!options.outputDir)
1545
- throw new Error("outputDir is required");
1546
- logger.step("Building manager..");
1547
- let {
1548
- config,
1549
- customHead,
1550
- favicon,
1551
- features,
1552
- instance,
1553
- refs,
1554
- template,
1555
- title,
1556
- logLevel,
1557
- docsOptions,
1558
- tagsOptions
1559
- } = await getData(options);
1560
- yield;
1561
- let addonsDir = config.outdir, coreDirTarget = join5(options.outputDir, "fb-manager");
1562
- compilation = await instance({
1563
- ...config,
1564
- minify: !0
1565
- }), yield;
1566
- let managerFiles = cp(CORE_DIR_ORIGIN, coreDirTarget, {
1567
- filter: (src) => {
1568
- let { ext } = parse2(src);
1569
- return ext ? ext === ".js" : !0;
1570
- },
1571
- recursive: !0
1572
- }), { cssFiles, jsFiles } = await readOrderedFiles(addonsDir, compilation?.outputFiles), globals = await buildFrameworkGlobalsFromOptions(options);
1573
- yield;
1574
- let html = await renderHTML(
1575
- template,
1576
- title,
1577
- favicon,
1578
- customHead,
1579
- cssFiles,
1580
- jsFiles,
1581
- features,
1582
- refs,
1583
- logLevel,
1584
- docsOptions,
1585
- tagsOptions,
1586
- options,
1587
- globals
1588
- );
1589
- return await Promise.all([writeFile3(join5(options.outputDir, "index.html"), html), managerFiles]), logger.trace({ message: "Manager built", time: process.hrtime(startTime) }), {
1590
- toJson: () => ({})
1591
- };
1592
- }, bail = async () => {
1593
- if (asyncIterator)
1594
- try {
1595
- await asyncIterator.throw(new Error());
1596
- } catch {
1597
- }
1598
- }, start = async (options) => {
1599
- asyncIterator = starter(options);
1600
- let result;
1601
- do
1602
- result = await asyncIterator.next();
1603
- while (!result.done);
1604
- return result.value;
1605
- }, build = async (options) => {
1606
- asyncIterator = builder(options);
1607
- let result;
1608
- do
1609
- result = await asyncIterator.next();
1610
- while (!result.done);
1611
- return result.value;
1612
- }, corePresets = [], overridePresets = [];
1613
- export {
1614
- BROWSER_TARGETS,
1615
- NODE_TARGET,
1616
- bail,
1617
- build,
1618
- corePresets,
1619
- executor,
1620
- getConfig,
1621
- overridePresets,
1622
- start
1623
- };