@bleedingdev/modern-js-app-tools 3.9.0-ultramodern.1 → 3.9.0-ultramodern.11

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 (352) hide show
  1. package/dist/cjs/builder/generator/index.js +0 -1
  2. package/dist/cjs/builder/shared/builderPlugins/index.js +4 -11
  3. package/dist/cjs/config/index.js +4 -11
  4. package/dist/cjs/index.js +46 -72
  5. package/dist/cjs/plugins/deploy/platforms/node.js +0 -13
  6. package/dist/cjs/plugins/deploy/utils/generator.js +1 -1
  7. package/dist/cjs/plugins/serverBuild.js +2 -1
  8. package/dist/cjs/{plugins/backendFederationBuild.js → server-plugin.js} +4 -7
  9. package/dist/esm/builder/generator/index.mjs +1 -2
  10. package/dist/esm/builder/shared/builderPlugins/index.mjs +0 -1
  11. package/dist/esm/config/index.mjs +0 -1
  12. package/dist/esm/index.mjs +3 -6
  13. package/dist/esm/plugins/deploy/platforms/node.mjs +0 -13
  14. package/dist/esm/plugins/deploy/utils/generator.mjs +1 -1
  15. package/dist/esm/plugins/serverBuild.mjs +2 -1
  16. package/dist/esm/server-plugin.mjs +1 -0
  17. package/dist/esm-node/builder/generator/index.mjs +1 -2
  18. package/dist/esm-node/builder/shared/builderPlugins/index.mjs +0 -1
  19. package/dist/esm-node/config/index.mjs +0 -1
  20. package/dist/esm-node/index.mjs +3 -6
  21. package/dist/esm-node/plugins/deploy/platforms/node.mjs +0 -13
  22. package/dist/esm-node/plugins/deploy/utils/generator.mjs +1 -1
  23. package/dist/esm-node/plugins/serverBuild.mjs +2 -1
  24. package/dist/esm-node/server-plugin.mjs +2 -0
  25. package/dist/types/builder/shared/builderPlugins/index.d.ts +0 -1
  26. package/dist/types/config/index.d.ts +0 -1
  27. package/dist/types/index.d.ts +2 -2
  28. package/dist/types/plugins/deploy/utils/generator.d.ts +1 -1
  29. package/dist/types/server-plugin.d.ts +10 -0
  30. package/dist/types/types/config/output.d.ts +0 -9
  31. package/dist/types/types/index.d.ts +1 -1
  32. package/dist/types/types/plugin.d.ts +56 -2
  33. package/dist/types/utils/initAppContext.d.ts +3 -2
  34. package/docs/apis/app/commands.md +2 -0
  35. package/docs/apis/app/hooks/api/lambda.md +2 -0
  36. package/docs/apis/app/hooks/config/favicon.md +2 -0
  37. package/docs/apis/app/hooks/config/html.md +2 -0
  38. package/docs/apis/app/hooks/config/icon.md +2 -0
  39. package/docs/apis/app/hooks/config/mock.md +2 -0
  40. package/docs/apis/app/hooks/config/public.md +2 -0
  41. package/docs/apis/app/hooks/config/upload.md +2 -0
  42. package/docs/apis/app/hooks/modern-config.md +2 -0
  43. package/docs/apis/app/hooks/server/server.md +2 -0
  44. package/docs/apis/app/hooks/shared.md +2 -0
  45. package/docs/apis/app/hooks/src/app.md +2 -0
  46. package/docs/apis/app/hooks/src/entry.md +2 -0
  47. package/docs/apis/app/hooks/src/entry.server.md +2 -0
  48. package/docs/apis/app/hooks/src/modern.runtime.md +2 -0
  49. package/docs/apis/app/hooks/src/routes.md +2 -0
  50. package/docs/apis/app/hooks/src/server.md +2 -0
  51. package/docs/apis/app/runtime/bff/use-backend-context.md +2 -0
  52. package/docs/apis/app/runtime/core/create-root.md +2 -0
  53. package/docs/apis/app/runtime/core/render.md +2 -0
  54. package/docs/apis/app/runtime/core/runtime-context.md +2 -0
  55. package/docs/apis/app/runtime/router/router.md +2 -0
  56. package/docs/apis/app/runtime/ssr/no-ssr.md +2 -0
  57. package/docs/apis/app/runtime/ssr/renderStreaming.md +2 -0
  58. package/docs/apis/app/runtime/ssr/renderString.md +2 -0
  59. package/docs/apis/app/runtime/ssr/requestHandler.md +2 -0
  60. package/docs/apis/app/runtime/utility/css-in-js.md +2 -0
  61. package/docs/apis/app/runtime/utility/head.md +2 -0
  62. package/docs/apis/app/runtime/utility/loadable.md +2 -0
  63. package/docs/community/blog/2022-0708-updates.md +2 -0
  64. package/docs/community/blog/2022-0910-updates.md +2 -0
  65. package/docs/community/blog/overview.md +2 -0
  66. package/docs/community/blog/v2-release-note.md +2 -0
  67. package/docs/community/blog/v3-release-note.md +2 -0
  68. package/docs/community/contributing-guide.md +2 -0
  69. package/docs/community/releases.md +2 -0
  70. package/docs/community/showcase.md +2 -0
  71. package/docs/community/team.md +2 -0
  72. package/docs/configure/app/bff/cross-project.md +2 -0
  73. package/docs/configure/app/bff/effect.md +31 -24
  74. package/docs/configure/app/bff/prefix.md +2 -0
  75. package/docs/configure/app/bff/runtime-framework.md +2 -0
  76. package/docs/configure/app/builder-plugins.md +2 -0
  77. package/docs/configure/app/dev/asset-prefix.md +2 -0
  78. package/docs/configure/app/dev/before-start-url.md +2 -0
  79. package/docs/configure/app/dev/client.md +2 -0
  80. package/docs/configure/app/dev/hmr.md +2 -0
  81. package/docs/configure/app/dev/host.md +2 -0
  82. package/docs/configure/app/dev/https.md +2 -0
  83. package/docs/configure/app/dev/lazy-compilation.md +2 -0
  84. package/docs/configure/app/dev/live-reload.md +2 -0
  85. package/docs/configure/app/dev/mock-dir.md +2 -0
  86. package/docs/configure/app/dev/progress-bar.md +2 -0
  87. package/docs/configure/app/dev/server.md +2 -0
  88. package/docs/configure/app/dev/setup-middlewares.md +2 -0
  89. package/docs/configure/app/dev/start-url.md +2 -0
  90. package/docs/configure/app/dev/watch-files.md +2 -0
  91. package/docs/configure/app/dev/write-to-disk.md +2 -0
  92. package/docs/configure/app/experiments/source-build.md +2 -0
  93. package/docs/configure/app/html/app-icon.md +2 -0
  94. package/docs/configure/app/html/crossorigin.md +2 -0
  95. package/docs/configure/app/html/favicon.md +2 -0
  96. package/docs/configure/app/html/inject.md +2 -0
  97. package/docs/configure/app/html/meta.md +2 -0
  98. package/docs/configure/app/html/mount-id.md +2 -0
  99. package/docs/configure/app/html/output-structure.md +2 -0
  100. package/docs/configure/app/html/script-loading.md +2 -0
  101. package/docs/configure/app/html/tags.md +2 -0
  102. package/docs/configure/app/html/template-parameters.md +2 -0
  103. package/docs/configure/app/html/template.md +2 -0
  104. package/docs/configure/app/html/title.md +2 -0
  105. package/docs/configure/app/output/asset-prefix.md +2 -0
  106. package/docs/configure/app/output/assets-retry.md +2 -0
  107. package/docs/configure/app/output/charset.md +2 -0
  108. package/docs/configure/app/output/clean-dist-path.md +2 -0
  109. package/docs/configure/app/output/convert-to-rem.md +2 -0
  110. package/docs/configure/app/output/copy.md +2 -0
  111. package/docs/configure/app/output/css-modules.md +2 -0
  112. package/docs/configure/app/output/data-uri-limit.md +2 -0
  113. package/docs/configure/app/output/disable-css-module-extension.md +2 -0
  114. package/docs/configure/app/output/disable-inline-runtime-chunk.md +2 -0
  115. package/docs/configure/app/output/disable-svgr.md +2 -0
  116. package/docs/configure/app/output/disable-ts-checker.md +2 -0
  117. package/docs/configure/app/output/dist-path.md +2 -0
  118. package/docs/configure/app/output/enable-asset-manifest.md +2 -0
  119. package/docs/configure/app/output/enable-css-module-tsdeclaration.md +2 -0
  120. package/docs/configure/app/output/enable-inline-route-manifests.md +2 -0
  121. package/docs/configure/app/output/externals.md +2 -0
  122. package/docs/configure/app/output/filename-hash.md +2 -0
  123. package/docs/configure/app/output/filename.md +2 -0
  124. package/docs/configure/app/output/inject-styles.md +2 -0
  125. package/docs/configure/app/output/inline-scripts.md +2 -0
  126. package/docs/configure/app/output/inline-styles.md +2 -0
  127. package/docs/configure/app/output/legal-comments.md +2 -0
  128. package/docs/configure/app/output/minify.md +2 -0
  129. package/docs/configure/app/output/override-browserslist.md +2 -0
  130. package/docs/configure/app/output/polyfill.md +2 -0
  131. package/docs/configure/app/output/source-map.md +2 -0
  132. package/docs/configure/app/output/split-route-chunks.md +2 -0
  133. package/docs/configure/app/output/ssg.md +2 -0
  134. package/docs/configure/app/output/ssgByEntries.md +2 -0
  135. package/docs/configure/app/output/svg-default-export.md +2 -0
  136. package/docs/configure/app/output/temp-dir.md +2 -0
  137. package/docs/configure/app/performance/build-cache.md +2 -0
  138. package/docs/configure/app/performance/chunk-split.md +2 -0
  139. package/docs/configure/app/performance/dns-prefetch.md +2 -0
  140. package/docs/configure/app/performance/preconnect.md +2 -0
  141. package/docs/configure/app/performance/prefetch.md +2 -0
  142. package/docs/configure/app/performance/preload.md +2 -0
  143. package/docs/configure/app/performance/print-file-size.md +2 -0
  144. package/docs/configure/app/performance/profile.md +2 -0
  145. package/docs/configure/app/performance/remove-console.md +2 -0
  146. package/docs/configure/app/performance/remove-moment-locale.md +2 -0
  147. package/docs/configure/app/performance/rsdoctor.md +2 -0
  148. package/docs/configure/app/plugins.md +2 -0
  149. package/docs/configure/app/resolve/alias-strategy.md +2 -0
  150. package/docs/configure/app/resolve/alias.md +2 -0
  151. package/docs/configure/app/resolve/condition-names.md +2 -0
  152. package/docs/configure/app/resolve/dedupe.md +2 -0
  153. package/docs/configure/app/resolve/extensions.md +2 -0
  154. package/docs/configure/app/runtime/0-intro.md +2 -0
  155. package/docs/configure/app/runtime/plugins.md +2 -0
  156. package/docs/configure/app/runtime/router.md +2 -0
  157. package/docs/configure/app/security/check-syntax.md +2 -0
  158. package/docs/configure/app/security/nonce.md +2 -0
  159. package/docs/configure/app/security/sri.md +2 -0
  160. package/docs/configure/app/server/base-url.md +2 -0
  161. package/docs/configure/app/server/port.md +2 -0
  162. package/docs/configure/app/server/public-routes.md +2 -0
  163. package/docs/configure/app/server/routes.md +2 -0
  164. package/docs/configure/app/server/rsc.md +2 -0
  165. package/docs/configure/app/server/ssr-by-entries.md +2 -0
  166. package/docs/configure/app/server/ssr.md +2 -0
  167. package/docs/configure/app/server/tsconfig-path.md +2 -0
  168. package/docs/configure/app/source/alias-strategy.md +2 -0
  169. package/docs/configure/app/source/alias.md +2 -0
  170. package/docs/configure/app/source/config-dir.md +2 -0
  171. package/docs/configure/app/source/decorators.md +2 -0
  172. package/docs/configure/app/source/define.md +2 -0
  173. package/docs/configure/app/source/disable-default-entries.md +2 -0
  174. package/docs/configure/app/source/enable-async-entry.md +2 -0
  175. package/docs/configure/app/source/enable-async-pre-entry.md +2 -0
  176. package/docs/configure/app/source/entries-dir.md +2 -0
  177. package/docs/configure/app/source/entries.md +2 -0
  178. package/docs/configure/app/source/exclude.md +2 -0
  179. package/docs/configure/app/source/global-vars.md +2 -0
  180. package/docs/configure/app/source/include.md +2 -0
  181. package/docs/configure/app/source/main-entry-name.md +2 -0
  182. package/docs/configure/app/source/pre-entry.md +2 -0
  183. package/docs/configure/app/source/react-compiler.md +2 -0
  184. package/docs/configure/app/source/transform-import.md +2 -0
  185. package/docs/configure/app/split-chunks.md +2 -0
  186. package/docs/configure/app/tools/autoprefixer.md +2 -0
  187. package/docs/configure/app/tools/bundler-chain.md +2 -0
  188. package/docs/configure/app/tools/css-extract.md +2 -0
  189. package/docs/configure/app/tools/css-loader.md +2 -0
  190. package/docs/configure/app/tools/dev-server.md +2 -0
  191. package/docs/configure/app/tools/html-plugin.md +2 -0
  192. package/docs/configure/app/tools/less.md +2 -0
  193. package/docs/configure/app/tools/lightningcss-loader.md +2 -0
  194. package/docs/configure/app/tools/minify-css.md +2 -0
  195. package/docs/configure/app/tools/postcss.md +2 -0
  196. package/docs/configure/app/tools/rspack.md +2 -0
  197. package/docs/configure/app/tools/sass.md +2 -0
  198. package/docs/configure/app/tools/style-loader.md +2 -0
  199. package/docs/configure/app/tools/swc.md +2 -0
  200. package/docs/configure/app/tools/ts-checker.md +2 -0
  201. package/docs/configure/app/usage.md +2 -0
  202. package/docs/guides/advanced-features/bff/cross-project.md +2 -0
  203. package/docs/guides/advanced-features/bff/data-platform.md +4 -2
  204. package/docs/guides/advanced-features/bff/extend-server.md +2 -0
  205. package/docs/guides/advanced-features/bff/frameworks.md +38 -24
  206. package/docs/guides/advanced-features/bff/function.md +4 -2
  207. package/docs/guides/advanced-features/bff/operators.md +19 -17
  208. package/docs/guides/advanced-features/bff/sdk.md +2 -0
  209. package/docs/guides/advanced-features/bff/upload.md +2 -0
  210. package/docs/guides/advanced-features/bff.md +2 -0
  211. package/docs/guides/advanced-features/build-performance.md +2 -0
  212. package/docs/guides/advanced-features/compatibility.md +2 -0
  213. package/docs/guides/advanced-features/international/advanced.md +2 -0
  214. package/docs/guides/advanced-features/international/api.md +2 -0
  215. package/docs/guides/advanced-features/international/best-practices.md +2 -0
  216. package/docs/guides/advanced-features/international/configuration.md +2 -0
  217. package/docs/guides/advanced-features/international/locale-detection.md +2 -0
  218. package/docs/guides/advanced-features/international/quick-start.md +2 -0
  219. package/docs/guides/advanced-features/international/resource-loading.md +2 -0
  220. package/docs/guides/advanced-features/international/routing.md +2 -0
  221. package/docs/guides/advanced-features/international.md +2 -0
  222. package/docs/guides/advanced-features/low-level.md +2 -0
  223. package/docs/guides/advanced-features/page-performance/code-split.md +2 -0
  224. package/docs/guides/advanced-features/page-performance/inline-assets.md +2 -0
  225. package/docs/guides/advanced-features/page-performance/optimize-bundle.md +2 -0
  226. package/docs/guides/advanced-features/page-performance/react-compiler.md +2 -0
  227. package/docs/guides/advanced-features/server-monitor/logger.md +2 -0
  228. package/docs/guides/advanced-features/server-monitor/metrics.md +2 -0
  229. package/docs/guides/advanced-features/server-monitor/monitors.md +2 -0
  230. package/docs/guides/advanced-features/source-build.md +2 -0
  231. package/docs/guides/advanced-features/web-server.md +2 -0
  232. package/docs/guides/basic-features/alias.md +2 -0
  233. package/docs/guides/basic-features/css/css-in-js.md +2 -0
  234. package/docs/guides/basic-features/css/css-modules.md +2 -0
  235. package/docs/guides/basic-features/css/css.md +2 -0
  236. package/docs/guides/basic-features/css/tailwindcss.md +2 -0
  237. package/docs/guides/basic-features/data/data-cache.md +2 -0
  238. package/docs/guides/basic-features/data/data-fetch.md +2 -0
  239. package/docs/guides/basic-features/data/data-write.md +2 -0
  240. package/docs/guides/basic-features/debug/mock.md +2 -0
  241. package/docs/guides/basic-features/debug/proxy.md +2 -0
  242. package/docs/guides/basic-features/debug/rsdoctor.md +2 -0
  243. package/docs/guides/basic-features/debug/using-storybook.md +2 -0
  244. package/docs/guides/basic-features/deploy.md +2 -0
  245. package/docs/guides/basic-features/env-vars.md +2 -0
  246. package/docs/guides/basic-features/html.md +2 -0
  247. package/docs/guides/basic-features/output-files.md +2 -0
  248. package/docs/guides/basic-features/render/before-render.md +2 -0
  249. package/docs/guides/basic-features/render/overview.md +2 -0
  250. package/docs/guides/basic-features/render/rsc.md +2 -0
  251. package/docs/guides/basic-features/render/ssg.md +2 -0
  252. package/docs/guides/basic-features/render/ssr-cache.md +16 -1
  253. package/docs/guides/basic-features/render/ssr.md +2 -0
  254. package/docs/guides/basic-features/render/streaming-ssr.md +2 -0
  255. package/docs/guides/basic-features/routes/config-routes.md +2 -0
  256. package/docs/guides/basic-features/routes/routes.md +2 -0
  257. package/docs/guides/basic-features/static-assets/json-files.md +2 -0
  258. package/docs/guides/basic-features/static-assets/svg-assets.md +2 -0
  259. package/docs/guides/basic-features/static-assets/wasm-assets.md +2 -0
  260. package/docs/guides/basic-features/static-assets.md +2 -0
  261. package/docs/guides/basic-features/testing/playwright.md +2 -0
  262. package/docs/guides/basic-features/testing/rstest.md +2 -0
  263. package/docs/guides/concept/builder.md +2 -0
  264. package/docs/guides/concept/entries.md +2 -0
  265. package/docs/guides/concept/server.md +2 -0
  266. package/docs/guides/get-started/ai-coding-agents.md +2 -0
  267. package/docs/guides/get-started/glossary.md +2 -0
  268. package/docs/guides/get-started/introduction.md +2 -0
  269. package/docs/guides/get-started/quick-start.md +3 -5
  270. package/docs/guides/get-started/tech-stack.md +2 -0
  271. package/docs/guides/get-started/ultramodern.md +11 -90
  272. package/docs/guides/get-started/upgrade.md +2 -0
  273. package/docs/guides/topic-detail/module-federation/application.md +2 -0
  274. package/docs/guides/topic-detail/module-federation/deploy.md +2 -0
  275. package/docs/guides/topic-detail/module-federation/i18n.md +2 -0
  276. package/docs/guides/topic-detail/module-federation/introduce.md +2 -0
  277. package/docs/guides/topic-detail/module-federation/ssr.md +2 -0
  278. package/docs/guides/topic-detail/module-federation/usage.md +2 -0
  279. package/docs/guides/troubleshooting/builder.md +2 -0
  280. package/docs/guides/troubleshooting/cli.md +2 -0
  281. package/docs/guides/troubleshooting/dependencies.md +2 -0
  282. package/docs/guides/troubleshooting/hmr.md +2 -0
  283. package/docs/guides/upgrade/config.md +2 -0
  284. package/docs/guides/upgrade/entry.md +2 -0
  285. package/docs/guides/upgrade/other.md +2 -0
  286. package/docs/guides/upgrade/overview.md +2 -0
  287. package/docs/guides/upgrade/tailwindcss.md +2 -0
  288. package/docs/guides/upgrade/web-server.md +2 -0
  289. package/docs/index.md +2 -0
  290. package/docs/llms.txt +2 -2
  291. package/docs/plugin/cli-plugins/api.md +2 -0
  292. package/docs/plugin/cli-plugins/life-cycle.md +2 -0
  293. package/docs/plugin/introduction.md +2 -0
  294. package/docs/plugin/official/cli-plugins/plugin-bff.md +2 -0
  295. package/docs/plugin/official/cli-plugins/plugin-ssg.md +2 -0
  296. package/docs/plugin/official/cli-plugins/plugin-styled-components.md +2 -0
  297. package/docs/plugin/official/cli-plugins.md +2 -0
  298. package/docs/plugin/plugin-system.md +2 -0
  299. package/docs/plugin/runtime-plugins/api.md +2 -0
  300. package/docs/plugin/runtime-plugins/life-cycle.md +2 -0
  301. package/docs/plugin/server-plugins/api.md +2 -0
  302. package/docs/plugin/server-plugins/life-cycle.md +2 -0
  303. package/docs/tutorials/examples/csr-auth.md +2 -0
  304. package/docs/tutorials/foundations/introduction.md +2 -0
  305. package/package.json +30 -38
  306. package/dist/cjs/builder/shared/builderPlugins/adapterPrecompress.js +0 -125
  307. package/dist/cjs/config/build-environment.js +0 -268
  308. package/dist/cjs/config/public.js +0 -46
  309. package/dist/cjs/plugins/backend-federation/codegen.js +0 -256
  310. package/dist/cjs/plugins/backend-federation/config.js +0 -204
  311. package/dist/cjs/plugins/backend-federation/emit.js +0 -150
  312. package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/index.js +0 -62
  313. package/dist/cjs/plugins/deploy/utils/npmAliases.js +0 -226
  314. package/dist/cjs/plugins/ultramodernReleaseEnvelope.js +0 -44
  315. package/dist/cjs/presetUltramodern.js +0 -168
  316. package/dist/cjs/types/config/precompress.js +0 -18
  317. package/dist/esm/builder/shared/builderPlugins/adapterPrecompress.mjs +0 -77
  318. package/dist/esm/config/build-environment.mjs +0 -224
  319. package/dist/esm/config/public.mjs +0 -1
  320. package/dist/esm/plugins/backend-federation/codegen.mjs +0 -205
  321. package/dist/esm/plugins/backend-federation/config.mjs +0 -128
  322. package/dist/esm/plugins/backend-federation/emit.mjs +0 -99
  323. package/dist/esm/plugins/backendFederationBuild.mjs +0 -1
  324. package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs +0 -1
  325. package/dist/esm/plugins/deploy/utils/npmAliases.mjs +0 -174
  326. package/dist/esm/plugins/ultramodernReleaseEnvelope.mjs +0 -6
  327. package/dist/esm/presetUltramodern.mjs +0 -112
  328. package/dist/esm/types/config/precompress.mjs +0 -0
  329. package/dist/esm-node/builder/shared/builderPlugins/adapterPrecompress.mjs +0 -78
  330. package/dist/esm-node/config/build-environment.mjs +0 -225
  331. package/dist/esm-node/config/public.mjs +0 -2
  332. package/dist/esm-node/plugins/backend-federation/codegen.mjs +0 -206
  333. package/dist/esm-node/plugins/backend-federation/config.mjs +0 -129
  334. package/dist/esm-node/plugins/backend-federation/emit.mjs +0 -100
  335. package/dist/esm-node/plugins/backendFederationBuild.mjs +0 -2
  336. package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs +0 -2
  337. package/dist/esm-node/plugins/deploy/utils/npmAliases.mjs +0 -175
  338. package/dist/esm-node/plugins/ultramodernReleaseEnvelope.mjs +0 -7
  339. package/dist/esm-node/presetUltramodern.mjs +0 -113
  340. package/dist/esm-node/types/config/precompress.mjs +0 -1
  341. package/dist/types/builder/shared/builderPlugins/adapterPrecompress.d.ts +0 -3
  342. package/dist/types/config/build-environment.d.ts +0 -22
  343. package/dist/types/config/public.d.ts +0 -2
  344. package/dist/types/plugins/backend-federation/codegen.d.ts +0 -86
  345. package/dist/types/plugins/backend-federation/config.d.ts +0 -103
  346. package/dist/types/plugins/backend-federation/emit.d.ts +0 -13
  347. package/dist/types/plugins/backendFederationBuild.d.ts +0 -2
  348. package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/index.d.ts +0 -1
  349. package/dist/types/plugins/deploy/utils/npmAliases.d.ts +0 -14
  350. package/dist/types/plugins/ultramodernReleaseEnvelope.d.ts +0 -3
  351. package/dist/types/presetUltramodern.d.ts +0 -87
  352. package/dist/types/types/config/precompress.d.ts +0 -20
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.aliasStrategy
2
4
 
3
5
  :::warning Deprecation Warning
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.alias
2
4
 
3
5
  :::warning Deprecation Warning
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.configDir
2
4
 
3
5
  - **Type:** `string`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.decorators
2
4
 
3
5
  - **Type:**
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.define
2
4
 
3
5
  - **Type:** `Record<string, unknown>`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.disableDefaultEntries
2
4
 
3
5
  - **Type:** `boolean`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.enableAsyncEntry
2
4
 
3
5
  - **Type:** `boolean`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.enableAsyncPreEntry
2
4
 
3
5
  - **Type:** `boolean`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.entriesDir
2
4
 
3
5
  - **Type:** `string`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.entries
2
4
 
3
5
  - **Type:**
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.exclude
2
4
 
3
5
  - **Type:** [RuleSetCondition\[\]](https://rspack.rs/config/module#condition)
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.globalVars
2
4
 
3
5
  - **Type:** `Record<string, JSONValue> | Function`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.include
2
4
 
3
5
  - **Type:** [RuleSetCondition\[\]](https://rspack.rs/config/module#condition)
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.mainEntryName
2
4
 
3
5
  - **Type:** `string`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.preEntry
2
4
 
3
5
  - **Type:** `string | string[]`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.reactCompiler
2
4
 
3
5
  - **Type:** `boolean | ReactCompilerOptions`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # source.transformImport
2
4
 
3
5
  Transform the import path, which can be used to modularly import the subpath of third-party packages. The functionality is similar to [babel-plugin-import](https://www.npmjs.com/package/babel-plugin-import)。
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # splitChunks
2
4
 
3
5
  - **Type:**
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # tools.autoprefixer
2
4
 
3
5
  - **Type:** `Object | Function`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # tools.bundlerChain
2
4
 
3
5
  - **Type:**
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # tools.cssExtract
2
4
 
3
5
  - **Type:**
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # tools.cssLoader
2
4
 
3
5
  - **Type:** `Object | Function`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # tools.devServer
2
4
 
3
5
  - **Type:** `Object`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # tools.htmlPlugin
2
4
 
3
5
  - **Type:** `boolean | Object | Function`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # tools.less
2
4
 
3
5
  - **Type:** `Object | Function`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # tools.lightningcssLoader
2
4
 
3
5
  - **Type:** `Rspack.LightningcssLoaderOptions | Function | boolean`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # tools.minifyCss
2
4
 
3
5
  - **Type:** `Object | Function | undefined`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # tools.postcss
2
4
 
3
5
  - **Type:** `Object | Function`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # tools.rspack
2
4
 
3
5
  - **Type:** `Rspack.Configuration | Function | undefined`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # tools.sass
2
4
 
3
5
  - **Type:** `Object | Function`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # tools.styleLoader
2
4
 
3
5
  - **Type:** `Object | Function`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # tools.swc
2
4
 
3
5
  - **Type:** `Object | Function`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # tools.tsChecker
2
4
 
3
5
  - **Type:** `Object | Function`
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # Configuration
2
4
 
3
5
  There are three types of configurations in Modern.js: Compile configuration, Runtime configuration, and Server Runtime configuration.
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # Cross-Project Invocation
2
4
 
3
5
  Based on the BFF architecture, Modern.js provides cross-project invocation capabilities, allowing BFF functions created in one project to be invoked by other projects through integrated calls, enabling function sharing and feature reuse across projects.
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # Data Platform
2
4
 
3
5
  Modern.js Effect API runtime now supports a request-envelope based data platform contract for safer and more predictable data orchestration in complex applications such as Module Federation and micro frontends.
@@ -13,7 +15,7 @@ Modern.js Effect API runtime now supports a request-envelope based data platform
13
15
 
14
16
  ## Runtime contract helpers
15
17
 
16
- Use `@modern-js/plugin-bff/data-platform` helpers to build and validate contracts:
18
+ Use `@modern-js/bff-effect/data-platform` helpers to build and validate contracts:
17
19
 
18
20
  ```ts
19
21
  import {
@@ -26,7 +28,7 @@ import {
26
28
  validateHydrationEnvelope,
27
29
  createInvalidationEvent,
28
30
  shouldApplyInvalidation,
29
- } from '@modern-js/plugin-bff/data-platform';
31
+ } from '@modern-js/bff-effect/data-platform';
30
32
  ```
31
33
 
32
34
  ## Effect runtime validation
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # Extend BFF Server
2
4
 
3
5
  In some applications, developers may want to handle all BFF functions uniformly, such as authentication, logging, data processing, etc.
@@ -1,9 +1,11 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # Runtime Framework
2
4
 
3
- Modern.js supports two BFF runtime frameworks:
5
+ Modern.js and the UltraModern BFF extension provide two runtime frameworks:
4
6
 
5
- - `effect` (default): use [Effect HttpApi](https://effect.website/) runtime from `api/index`.
6
- - `hono`: use file-convention BFF handlers from `api/lambda/**`.
7
+ - `hono` is the native plugin default and uses file-convention handlers from `api/lambda/**`.
8
+ - `effect` is the UltraModern extension default and uses [Effect HttpApi](https://effect.website/) from `api/index`.
7
9
 
8
10
  `effect` and `hono` are strict runtime modes. There is no automatic fallback between them.
9
11
 
@@ -14,12 +16,18 @@ Generated UltraModern workspaces use strict Effect APIs: author HTTP APIs in
14
16
 
15
17
  ## Switch to Effect runtime
16
18
 
19
+ Use the fork build plugin below. It includes the native BFF plugin and registers
20
+ the Effect adapter. The application needs `@modern-js/bff-effect` and
21
+ `@modern-js/plugin-bff-extensions` as production dependencies from the same
22
+ framework cohort. Install the exact Effect peers described in
23
+ [`bff.effect`](/configure/app/bff/effect.md).
24
+
17
25
  ```ts title="modern.config.ts"
18
- import { bffPlugin } from '@modern-js/plugin-bff';
19
- import { defineConfig } from '@modern-js/app-tools';
26
+ import { bffPlugin } from '@modern-js/plugin-bff-build-extensions';
27
+ import { appTools, defineConfig } from '@modern-js/app-tools';
20
28
 
21
29
  export default defineConfig({
22
- plugins: [bffPlugin()],
30
+ plugins: [appTools(), bffPlugin()],
23
31
  bff: {
24
32
  runtimeFramework: 'effect',
25
33
  effect: {
@@ -41,7 +49,7 @@ import {
41
49
  HttpApiEndpoint,
42
50
  HttpApiGroup,
43
51
  Schema,
44
- } from '@modern-js/plugin-bff/effect-client';
52
+ } from '@modern-js/bff-effect/effect-client';
45
53
 
46
54
  export const bffApi = HttpApi.make('MyApi').add(
47
55
  HttpApiGroup.make('hello').add(
@@ -55,14 +63,12 @@ export const bffApi = HttpApi.make('MyApi').add(
55
63
  Implement your Effect API entry at `api/index.ts`:
56
64
 
57
65
  ```ts title="api/index.ts"
58
- import {
59
- Schema,
60
- Effect,
61
- HttpApiBuilder,
62
- defineEffectBff,
63
- Layer,
64
- ServiceMap,
65
- } from '@modern-js/plugin-bff/effect-server';
66
+ import { defineEffectBff } from '@modern-js/bff-effect/effect';
67
+ import * as Context from 'effect/Context';
68
+ import * as Effect from 'effect/Effect';
69
+ import * as Layer from 'effect/Layer';
70
+ import * as Schema from 'effect/Schema';
71
+ import { HttpApiBuilder } from 'effect/unstable/httpapi';
66
72
  import { bffApi } from '../shared/api';
67
73
 
68
74
  class GreetingUnavailableError extends Schema.TaggedError<GreetingUnavailableError>()(
@@ -72,7 +78,7 @@ class GreetingUnavailableError extends Schema.TaggedError<GreetingUnavailableErr
72
78
  },
73
79
  ) {}
74
80
 
75
- class GreetingService extends ServiceMap.Service<GreetingService>()('GreetingService', {
81
+ class GreetingService extends Context.Service<GreetingService>()('GreetingService', {
76
82
  make: Effect.succeed({
77
83
  hello: Effect.fn('GreetingService.hello')(function* () {
78
84
  if (Date.now() < 0) {
@@ -107,19 +113,27 @@ const layer = HttpApiBuilder.layer(bffApi).pipe(
107
113
  export default defineEffectBff({ api: bffApi, layer });
108
114
  ```
109
115
 
110
- Call Effect endpoints from browser code via `@api/index`:
116
+ Create a native, fully inferred client from the shared contract:
111
117
 
112
118
  ```ts title="src/routes/page.tsx"
113
- import api from '@api/index';
119
+ import { Effect, makeEffectHttpApiClient } from '@modern-js/bff-effect/effect-client';
120
+ import { bffApi } from '../../shared/api';
114
121
 
115
- const response = await api.client.hello.ping({});
122
+ const response = await Effect.runPromise(
123
+ makeEffectHttpApiClient(bffApi, { baseUrl: '/api' }).pipe(
124
+ Effect.flatMap(client => client.hello.ping({})),
125
+ ),
126
+ );
116
127
  ```
117
128
 
118
- The `api.client.*` surface is materialized by the BFF loader for `@api/index` imports. Do not import `api/index` directly and expect `client` to run in server code, scripts, or tests; direct entry imports expose the server runtime definition, and `client` is only a typed placeholder there.
129
+ Requests, responses, and declared errors are inferred from `bffApi`. No client generation or server-entry import is needed.
119
130
 
120
131
  For UltraModern, Effect `HttpApi` plus Effect BFF is the single blessed authored HTTP path. Use `HttpApi` endpoints with `query`, `params`, `payload`, `success`, and declared errors such as `HttpApiSchema.status(...)`; implement them with `HttpApiBuilder.group(...).handle(...)` and `HttpApiBuilder.layer(...).pipe(Layer.provide(...))`, then default-export the entry as `defineEffectBff({ api, layer })`. See `packages/server/bff-effect/tests/effect-edge-runtime.test.ts` for the live runtime shape.
121
132
 
122
- Hono and `api/lambda/**` are internal compatibility only and feature-frozen.
133
+ Native Hono applications import operators from `@modern-js/plugin-bff/server`.
134
+ UltraModern-generated applications keep their strict Effect API model. Worker
135
+ handlers use `@modern-js/bff-effect/effect-edge`, including its worker request
136
+ context exports; Node handlers use the Effect entry shown above.
123
137
 
124
138
  ### Getting Request Context
125
139
 
@@ -144,7 +158,7 @@ For more details, refer to [useHonoContext](/apis/app/runtime/bff/use-backend-co
144
158
  When getting cookies in BFF functions, you need to get the request context through `useHonoContext`, then use `c.req.header('cookie')` to get the Cookie string and parse it manually:
145
159
 
146
160
  ```ts title="api/lambda/cookies.ts"
147
- import { Api, Get } from '@modern-js/plugin-bff/hono-server';
161
+ import { Api, Get } from '@modern-js/plugin-bff/server';
148
162
  import { useHonoContext } from '@modern-js/server-runtime';
149
163
 
150
164
  // Helper function to parse Cookie string
@@ -187,7 +201,7 @@ The `c.req.cookie()` method does not exist in the current version. You need to u
187
201
  When using Hono as the runtime framework, you can define interfaces through [Api functions](/guides/advanced-features/bff/operators.md):
188
202
 
189
203
  ```ts title="api/lambda/user.ts"
190
- import { Api, Get, Query } from '@modern-js/plugin-bff/hono-server';
204
+ import { Api, Get, Query } from '@modern-js/plugin-bff/server';
191
205
  import { z } from 'zod';
192
206
 
193
207
  const QuerySchema = z.object({
@@ -216,7 +230,7 @@ For more details about Api functions and operators, refer to [Creating Extensibl
216
230
  Hono supports a rich middleware ecosystem, and you can use middleware in BFF functions:
217
231
 
218
232
  ```ts title="api/lambda/user.ts"
219
- import { Api, Get, Middleware } from '@modern-js/plugin-bff/hono-server';
233
+ import { Api, Get, Middleware } from '@modern-js/plugin-bff/server';
220
234
 
221
235
  export const getUser = Api(
222
236
  Get('/user'),
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # Basic Usage
2
4
 
3
5
  In a Modern.js application, developers can define API files under the `api/lambda` directory and export API functions from these files. In the frontend code, these API functions can be directly invoked by importing the file, which initiates the API requests.
@@ -244,7 +246,7 @@ Parameters following the dynamic path are an object called `RequestOption`, whic
244
246
  In a standard function without dynamic routes, `RequestOption` can be obtained from the first parameter, for example:
245
247
 
246
248
  ```ts title="api/lambda/hello.ts"
247
- import type { RequestOption } from '@modern-js/plugin-bff/hono-server';
249
+ import type { RequestOption } from '@modern-js/plugin-bff/server';
248
250
 
249
251
  export async function post({
250
252
  query,
@@ -257,7 +259,7 @@ export async function post({
257
259
  Custom types can also be used here:
258
260
 
259
261
  ```ts title="api/lambda/hello.ts"
260
- import type { RequestOption } from '@modern-js/plugin-bff/hono-server';
262
+ import type { RequestOption } from '@modern-js/plugin-bff/server';
261
263
 
262
264
  type IQuery = {
263
265
  // some types
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # Creating Extensible BFF Functions
2
4
 
3
5
  The previous section showed how to export a simple BFF function in a file. In more complex scenarios, each BFF function may need to do independent type validation, pre-logic, etc.
@@ -27,7 +29,7 @@ A BFF function created by the `Api` function consists of the following parts:
27
29
  The server can define the input parameters and types of the interface. Based on the types, the server will automatically perform type validation at runtime:
28
30
 
29
31
  ```typescript title="api/lambda/user.ts"
30
- import { Api, Post, Query, Data } from '@modern-js/plugin-bff/hono-server';
32
+ import { Api, Post, Query, Data } from '@modern-js/plugin-bff/server';
31
33
  import { z } from 'zod';
32
34
 
33
35
  const UserSchema = z.object({
@@ -76,7 +78,7 @@ addUser({
76
78
  As shown in the example below, you can specify the route and HTTP Method through the `Get` function:
77
79
 
78
80
  ```typescript title="api/lambda/user.ts"
79
- import { Api, Get, Query, Data } from '@modern-js/plugin-bff/hono-server';
81
+ import { Api, Get, Query, Data } from '@modern-js/plugin-bff/server';
80
82
 
81
83
  // Specify the interface route, Modern.js sets `bff.prefix` to `/api` by default,
82
84
  // so the interface route is `/api/user`, and the HTTP Method is GET.
@@ -90,7 +92,7 @@ export const getHello = Api(
90
92
  When the route is not specified, the interface route is defined according to the file convention. As shown in the example below, with the function writing method, there is a code path `api/lambda/user.ts`, which will register the corresponding interface `/api/user`.
91
93
 
92
94
  ```typescript title="api/lambda/user.ts"
93
- import { Api, Get, Query, Data } from '@modern-js/plugin-bff/hono-server';
95
+ import { Api, Get, Query, Data } from '@modern-js/plugin-bff/server';
94
96
 
95
97
  // No interface route specified, according to file convention and function name, the interface is api/user, HTTP Method is get.
96
98
  export const get = Api(Query(UserSchema), async ({ query }) => query);
@@ -123,7 +125,7 @@ Using the `Query` function, you can define the type of query. After using the `Q
123
125
 
124
126
  ```typescript title="api/lambda/user.ts"
125
127
  // Server-side code
126
- import { Api, Query } from '@modern-js/plugin-bff/hono-server';
128
+ import { Api, Query } from '@modern-js/plugin-bff/server';
127
129
  import { z } from 'zod';
128
130
 
129
131
  const UserSchema = z.object({
@@ -151,7 +153,7 @@ get({
151
153
  URL query parameters are strings by default. If you need numeric types, you need to use `z.coerce.number()` for type conversion:
152
154
 
153
155
  ```typescript title="api/lambda/user.ts"
154
- import { Api, Get, Query } from '@modern-js/plugin-bff/hono-server';
156
+ import { Api, Get, Query } from '@modern-js/plugin-bff/server';
155
157
  import { z } from 'zod';
156
158
 
157
159
  const QuerySchema = z.object({
@@ -187,7 +189,7 @@ If you use the Data function, you must follow the HTTP protocol. When the HTTP M
187
189
  :::
188
190
 
189
191
  ```typescript title="api/lambda/user.ts"
190
- import { Api, Data } from '@modern-js/plugin-bff/hono-server';
192
+ import { Api, Data } from '@modern-js/plugin-bff/server';
191
193
  import { z } from 'zod';
192
194
 
193
195
  const DataSchema = z.object({
@@ -216,7 +218,7 @@ post({
216
218
  Route parameters can implement dynamic routes and get parameters from the path. You can specify path parameters through `Params<T>(schema: z.ZodType<T>)`
217
219
 
218
220
  ```typescript
219
- import { Api, Get, Params } from '@modern-js/plugin-bff/hono-server';
221
+ import { Api, Get, Params } from '@modern-js/plugin-bff/server';
220
222
  import { z } from 'zod';
221
223
 
222
224
  const UserSchema = z.object({
@@ -237,7 +239,7 @@ export const queryUser = Api(
237
239
  You can define the request headers required by the interface through the `Headers<T>(schema: z.ZodType<T>)` function and pass the request headers through integrated calls:
238
240
 
239
241
  ```typescript
240
- import { Api, Headers } from '@modern-js/plugin-bff/hono-server';
242
+ import { Api, Headers } from '@modern-js/plugin-bff/server';
241
243
  import { z } from 'zod';
242
244
 
243
245
  const headerSchema = z.object({
@@ -295,7 +297,7 @@ The `Middleware` operator can be configured multiple times, and the execution or
295
297
  :::
296
298
 
297
299
  ```typescript
298
- import { Api, Query, Middleware } from '@modern-js/plugin-bff/hono-server';
300
+ import { Api, Query, Middleware } from '@modern-js/plugin-bff/server';
299
301
  import { z } from 'zod';
300
302
 
301
303
  const UserSchema = z.object({
@@ -331,7 +333,7 @@ The `Pipe` operator can be configured multiple times. The execution order of fun
331
333
  :::
332
334
 
333
335
  ```typescript
334
- import { Api, Query, Pipe } from '@modern-js/plugin-bff/hono-server';
336
+ import { Api, Query, Pipe } from '@modern-js/plugin-bff/server';
335
337
  import { z } from 'zod';
336
338
 
337
339
  const UserSchema = z.object({
@@ -359,7 +361,7 @@ export const get = Api(
359
361
  Also,
360
362
 
361
363
  ```typescript
362
- import { Api, Query, Pipe } from '@modern-js/plugin-bff/hono-server';
364
+ import { Api, Query, Pipe } from '@modern-js/plugin-bff/server';
363
365
  import { z } from 'zod';
364
366
 
365
367
  const UserSchema = z.object({
@@ -390,7 +392,7 @@ export const get = Api(
390
392
  If you need to do more custom operations on the response, you can pass a function to the `end` function. The input parameter of the function is Hono's Context (`c`), and you can operate on `c.req` and `c.res`:
391
393
 
392
394
  ```typescript
393
- import { Api, Query, Pipe } from '@modern-js/plugin-bff/hono-server';
395
+ import { Api, Query, Pipe } from '@modern-js/plugin-bff/server';
394
396
  import { z } from 'zod';
395
397
 
396
398
  const UserSchema = z.object({
@@ -430,7 +432,7 @@ The following are response-related operators. Through response operators, you ca
430
432
  You can specify the status code returned by the interface through the `HttpCode(statusCode: number)` function
431
433
 
432
434
  ```typescript
433
- import { Api, Query, Data, HttpCode } from '@modern-js/plugin-bff/hono-server';
435
+ import { Api, Query, Data, HttpCode } from '@modern-js/plugin-bff/server';
434
436
  import { z } from 'zod';
435
437
 
436
438
  const UserSchema = z.object({
@@ -462,7 +464,7 @@ export const post = Api(
462
464
  Supports setting response headers through the `SetHeaders(headers: Record<string, string>)` function
463
465
 
464
466
  ```typescript
465
- import { Api, Get, SetHeaders } from '@modern-js/plugin-bff/hono-server';
467
+ import { Api, Get, SetHeaders } from '@modern-js/plugin-bff/server';
466
468
 
467
469
  export default Api(
468
470
  Get('/hello'),
@@ -478,7 +480,7 @@ export default Api(
478
480
  Supports redirecting the interface through `Redirect(url: string)`:
479
481
 
480
482
  ```typescript
481
- import { Api, Get, Redirect } from '@modern-js/plugin-bff/hono-server';
483
+ import { Api, Get, Redirect } from '@modern-js/plugin-bff/server';
482
484
 
483
485
  export default Api(
484
486
  Get('/hello'),
@@ -492,7 +494,7 @@ export default Api(
492
494
  As mentioned above, through operators, you can get `query`, `data`, `params`, etc. in the input parameters of the interface processing function. But sometimes we need to get more request context information. At this time, we can get it through [`useHonoContext`](/apis/app/runtime/bff/use-backend-context.md):
493
495
 
494
496
  ```typescript title="api/lambda/user.ts"
495
- import { Api, Get, Query } from '@modern-js/plugin-bff/hono-server';
497
+ import { Api, Get, Query } from '@modern-js/plugin-bff/server';
496
498
  import { useHonoContext } from '@modern-js/server-runtime';
497
499
  import { z } from 'zod';
498
500
 
@@ -537,7 +539,7 @@ For specific comparisons of different solutions, you can refer to [Why Use Zod](
537
539
  In frontend development, some server interfaces (such as some configuration interfaces) have long response times, but actually don't need to be updated for a long time. For such interfaces, we can set HTTP cache to improve page performance:
538
540
 
539
541
  ```typescript
540
- import { Api, SetHeaders } from '@modern-js/plugin-bff/hono-server';
542
+ import { Api, SetHeaders } from '@modern-js/plugin-bff/server';
541
543
 
542
544
  export const get = Api(
543
545
  // Cache will only take effect when using integrated calls or fetch for requests
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # Extend Request SDK
2
4
 
3
5
  The unified invocation of BFF functions is isomorphic in both CSR and SSR. The request SDK encapsulated by Modern.js relies on the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) on the browser side, and on [node-fetch](https://www.npmjs.com/package/node-fetch) on the server side. However, in actual business scenarios, additional processing may be required for requests or responses, such as:
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # File Upload
2
4
 
3
5
  BFF combined with runtime framework provides file upload capabilities, supporting integrated calls and pure function manual calls.
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # BFF
2
4
 
3
5
  BFF (Backends for Frontends) is an architectural pattern primarily used to address issues of data aggregation in front-end and back-end collaboration. Under the BFF architecture, front-end applications do not communicate directly with backend services. Instead, they interact with backend services through a dedicated BFF middleware layer, custom-made for the front end.
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # Improve Build Performance
2
4
 
3
5
  Modern.js optimizes build performance by default, but as the project becomes larger, you may encounter some build performance problems.
@@ -1,3 +1,5 @@
1
+ > For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.
2
+
1
3
  # Browser Compatibility
2
4
 
3
5
  ## Browserslist Configuration