@buenojs/bueno 0.8.8 → 0.8.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 (391) hide show
  1. package/dist/index.js +15 -12
  2. package/dist/modules/index.js +2 -2
  3. package/dist/template/index.js +13 -10
  4. package/dist/templates/index.js +13 -10
  5. package/package.json +2 -2
  6. package/src/templates/loader.ts +1 -1
  7. package/src/templates/renderers/simple.ts +13 -10
  8. package/src/validation/index.ts +20 -21
  9. package/tsconfig.json +1 -1
  10. package/dist/cache/index.d.ts +0 -187
  11. package/dist/cache/index.d.ts.map +0 -1
  12. package/dist/cli/bin.d.ts +0 -8
  13. package/dist/cli/bin.d.ts.map +0 -1
  14. package/dist/cli/commands/add-frontend.d.ts +0 -7
  15. package/dist/cli/commands/add-frontend.d.ts.map +0 -1
  16. package/dist/cli/commands/build.d.ts +0 -7
  17. package/dist/cli/commands/build.d.ts.map +0 -1
  18. package/dist/cli/commands/dev.d.ts +0 -7
  19. package/dist/cli/commands/dev.d.ts.map +0 -1
  20. package/dist/cli/commands/generate.d.ts +0 -7
  21. package/dist/cli/commands/generate.d.ts.map +0 -1
  22. package/dist/cli/commands/help.d.ts +0 -7
  23. package/dist/cli/commands/help.d.ts.map +0 -1
  24. package/dist/cli/commands/index.d.ts +0 -59
  25. package/dist/cli/commands/index.d.ts.map +0 -1
  26. package/dist/cli/commands/migration.d.ts +0 -7
  27. package/dist/cli/commands/migration.d.ts.map +0 -1
  28. package/dist/cli/commands/new.d.ts +0 -7
  29. package/dist/cli/commands/new.d.ts.map +0 -1
  30. package/dist/cli/commands/start.d.ts +0 -7
  31. package/dist/cli/commands/start.d.ts.map +0 -1
  32. package/dist/cli/core/args.d.ts +0 -61
  33. package/dist/cli/core/args.d.ts.map +0 -1
  34. package/dist/cli/core/console.d.ts +0 -135
  35. package/dist/cli/core/console.d.ts.map +0 -1
  36. package/dist/cli/core/index.d.ts +0 -10
  37. package/dist/cli/core/index.d.ts.map +0 -1
  38. package/dist/cli/core/prompt.d.ts +0 -63
  39. package/dist/cli/core/prompt.d.ts.map +0 -1
  40. package/dist/cli/core/spinner.d.ts +0 -111
  41. package/dist/cli/core/spinner.d.ts.map +0 -1
  42. package/dist/cli/index.d.ts +0 -47
  43. package/dist/cli/index.d.ts.map +0 -1
  44. package/dist/cli/templates/database/index.d.ts +0 -24
  45. package/dist/cli/templates/database/index.d.ts.map +0 -1
  46. package/dist/cli/templates/database/mysql.d.ts +0 -6
  47. package/dist/cli/templates/database/mysql.d.ts.map +0 -1
  48. package/dist/cli/templates/database/none.d.ts +0 -8
  49. package/dist/cli/templates/database/none.d.ts.map +0 -1
  50. package/dist/cli/templates/database/postgresql.d.ts +0 -6
  51. package/dist/cli/templates/database/postgresql.d.ts.map +0 -1
  52. package/dist/cli/templates/database/sqlite.d.ts +0 -6
  53. package/dist/cli/templates/database/sqlite.d.ts.map +0 -1
  54. package/dist/cli/templates/deploy.d.ts +0 -41
  55. package/dist/cli/templates/deploy.d.ts.map +0 -1
  56. package/dist/cli/templates/docker.d.ts +0 -30
  57. package/dist/cli/templates/docker.d.ts.map +0 -1
  58. package/dist/cli/templates/frontend/index.d.ts +0 -25
  59. package/dist/cli/templates/frontend/index.d.ts.map +0 -1
  60. package/dist/cli/templates/frontend/none.d.ts +0 -8
  61. package/dist/cli/templates/frontend/none.d.ts.map +0 -1
  62. package/dist/cli/templates/frontend/react.d.ts +0 -6
  63. package/dist/cli/templates/frontend/react.d.ts.map +0 -1
  64. package/dist/cli/templates/frontend/solid.d.ts +0 -6
  65. package/dist/cli/templates/frontend/solid.d.ts.map +0 -1
  66. package/dist/cli/templates/frontend/svelte.d.ts +0 -6
  67. package/dist/cli/templates/frontend/svelte.d.ts.map +0 -1
  68. package/dist/cli/templates/frontend/vue.d.ts +0 -6
  69. package/dist/cli/templates/frontend/vue.d.ts.map +0 -1
  70. package/dist/cli/templates/generators/index.d.ts +0 -29
  71. package/dist/cli/templates/generators/index.d.ts.map +0 -1
  72. package/dist/cli/templates/generators/types.d.ts +0 -32
  73. package/dist/cli/templates/generators/types.d.ts.map +0 -1
  74. package/dist/cli/templates/index.d.ts +0 -12
  75. package/dist/cli/templates/index.d.ts.map +0 -1
  76. package/dist/cli/templates/project/api.d.ts +0 -6
  77. package/dist/cli/templates/project/api.d.ts.map +0 -1
  78. package/dist/cli/templates/project/default.d.ts +0 -6
  79. package/dist/cli/templates/project/default.d.ts.map +0 -1
  80. package/dist/cli/templates/project/fullstack.d.ts +0 -14
  81. package/dist/cli/templates/project/fullstack.d.ts.map +0 -1
  82. package/dist/cli/templates/project/index.d.ts +0 -26
  83. package/dist/cli/templates/project/index.d.ts.map +0 -1
  84. package/dist/cli/templates/project/minimal.d.ts +0 -6
  85. package/dist/cli/templates/project/minimal.d.ts.map +0 -1
  86. package/dist/cli/templates/project/types.d.ts +0 -80
  87. package/dist/cli/templates/project/types.d.ts.map +0 -1
  88. package/dist/cli/templates/project/website.d.ts +0 -8
  89. package/dist/cli/templates/project/website.d.ts.map +0 -1
  90. package/dist/cli/utils/fs.d.ts +0 -137
  91. package/dist/cli/utils/fs.d.ts.map +0 -1
  92. package/dist/cli/utils/index.d.ts +0 -9
  93. package/dist/cli/utils/index.d.ts.map +0 -1
  94. package/dist/cli/utils/strings.d.ts +0 -86
  95. package/dist/cli/utils/strings.d.ts.map +0 -1
  96. package/dist/cli/utils/version.d.ts +0 -15
  97. package/dist/cli/utils/version.d.ts.map +0 -1
  98. package/dist/config/env-validation.d.ts +0 -49
  99. package/dist/config/env-validation.d.ts.map +0 -1
  100. package/dist/config/env.d.ts +0 -167
  101. package/dist/config/env.d.ts.map +0 -1
  102. package/dist/config/index.d.ts +0 -168
  103. package/dist/config/index.d.ts.map +0 -1
  104. package/dist/config/loader.d.ts +0 -81
  105. package/dist/config/loader.d.ts.map +0 -1
  106. package/dist/config/merge.d.ts +0 -66
  107. package/dist/config/merge.d.ts.map +0 -1
  108. package/dist/config/types.d.ts +0 -322
  109. package/dist/config/types.d.ts.map +0 -1
  110. package/dist/config/validation.d.ts +0 -100
  111. package/dist/config/validation.d.ts.map +0 -1
  112. package/dist/container/forward-ref.d.ts +0 -116
  113. package/dist/container/forward-ref.d.ts.map +0 -1
  114. package/dist/container/index.d.ts +0 -95
  115. package/dist/container/index.d.ts.map +0 -1
  116. package/dist/context/index.d.ts +0 -143
  117. package/dist/context/index.d.ts.map +0 -1
  118. package/dist/database/index.d.ts +0 -219
  119. package/dist/database/index.d.ts.map +0 -1
  120. package/dist/database/migrations/index.d.ts +0 -146
  121. package/dist/database/migrations/index.d.ts.map +0 -1
  122. package/dist/database/orm/builder.d.ts +0 -122
  123. package/dist/database/orm/builder.d.ts.map +0 -1
  124. package/dist/database/orm/casts/index.d.ts +0 -16
  125. package/dist/database/orm/casts/index.d.ts.map +0 -1
  126. package/dist/database/orm/casts/types.d.ts +0 -16
  127. package/dist/database/orm/casts/types.d.ts.map +0 -1
  128. package/dist/database/orm/compiler.d.ts +0 -90
  129. package/dist/database/orm/compiler.d.ts.map +0 -1
  130. package/dist/database/orm/hooks/index.d.ts +0 -53
  131. package/dist/database/orm/hooks/index.d.ts.map +0 -1
  132. package/dist/database/orm/index.d.ts +0 -21
  133. package/dist/database/orm/index.d.ts.map +0 -1
  134. package/dist/database/orm/model-registry.d.ts +0 -33
  135. package/dist/database/orm/model-registry.d.ts.map +0 -1
  136. package/dist/database/orm/model.d.ts +0 -245
  137. package/dist/database/orm/model.d.ts.map +0 -1
  138. package/dist/database/orm/relationships/base.d.ts +0 -69
  139. package/dist/database/orm/relationships/base.d.ts.map +0 -1
  140. package/dist/database/orm/relationships/belongs-to-many.d.ts +0 -47
  141. package/dist/database/orm/relationships/belongs-to-many.d.ts.map +0 -1
  142. package/dist/database/orm/relationships/belongs-to.d.ts +0 -17
  143. package/dist/database/orm/relationships/belongs-to.d.ts.map +0 -1
  144. package/dist/database/orm/relationships/has-many.d.ts +0 -14
  145. package/dist/database/orm/relationships/has-many.d.ts.map +0 -1
  146. package/dist/database/orm/relationships/has-one.d.ts +0 -14
  147. package/dist/database/orm/relationships/has-one.d.ts.map +0 -1
  148. package/dist/database/orm/relationships/index.d.ts +0 -10
  149. package/dist/database/orm/relationships/index.d.ts.map +0 -1
  150. package/dist/database/orm/scopes/index.d.ts +0 -36
  151. package/dist/database/orm/scopes/index.d.ts.map +0 -1
  152. package/dist/database/schema/index.d.ts +0 -155
  153. package/dist/database/schema/index.d.ts.map +0 -1
  154. package/dist/events/__tests__/event-system.test.d.ts +0 -2
  155. package/dist/events/__tests__/event-system.test.d.ts.map +0 -1
  156. package/dist/events/config.d.ts +0 -16
  157. package/dist/events/config.d.ts.map +0 -1
  158. package/dist/events/example-usage.d.ts +0 -12
  159. package/dist/events/example-usage.d.ts.map +0 -1
  160. package/dist/events/index.d.ts +0 -27
  161. package/dist/events/index.d.ts.map +0 -1
  162. package/dist/events/manager.d.ts +0 -33
  163. package/dist/events/manager.d.ts.map +0 -1
  164. package/dist/events/registry.d.ts +0 -31
  165. package/dist/events/registry.d.ts.map +0 -1
  166. package/dist/events/types.d.ts +0 -105
  167. package/dist/events/types.d.ts.map +0 -1
  168. package/dist/frontend/api-routes.d.ts +0 -189
  169. package/dist/frontend/api-routes.d.ts.map +0 -1
  170. package/dist/frontend/bundler.d.ts +0 -99
  171. package/dist/frontend/bundler.d.ts.map +0 -1
  172. package/dist/frontend/console-client.d.ts +0 -11
  173. package/dist/frontend/console-client.d.ts.map +0 -1
  174. package/dist/frontend/console-stream.d.ts +0 -138
  175. package/dist/frontend/console-stream.d.ts.map +0 -1
  176. package/dist/frontend/dev-server.d.ts +0 -174
  177. package/dist/frontend/dev-server.d.ts.map +0 -1
  178. package/dist/frontend/file-router.d.ts +0 -170
  179. package/dist/frontend/file-router.d.ts.map +0 -1
  180. package/dist/frontend/frameworks/index.d.ts +0 -41
  181. package/dist/frontend/frameworks/index.d.ts.map +0 -1
  182. package/dist/frontend/frameworks/react.d.ts +0 -32
  183. package/dist/frontend/frameworks/react.d.ts.map +0 -1
  184. package/dist/frontend/frameworks/solid.d.ts +0 -42
  185. package/dist/frontend/frameworks/solid.d.ts.map +0 -1
  186. package/dist/frontend/frameworks/svelte.d.ts +0 -57
  187. package/dist/frontend/frameworks/svelte.d.ts.map +0 -1
  188. package/dist/frontend/frameworks/vue.d.ts +0 -36
  189. package/dist/frontend/frameworks/vue.d.ts.map +0 -1
  190. package/dist/frontend/hmr-client.d.ts +0 -22
  191. package/dist/frontend/hmr-client.d.ts.map +0 -1
  192. package/dist/frontend/hmr.d.ts +0 -185
  193. package/dist/frontend/hmr.d.ts.map +0 -1
  194. package/dist/frontend/index.d.ts +0 -34
  195. package/dist/frontend/index.d.ts.map +0 -1
  196. package/dist/frontend/islands.d.ts +0 -135
  197. package/dist/frontend/islands.d.ts.map +0 -1
  198. package/dist/frontend/isr.d.ts +0 -143
  199. package/dist/frontend/isr.d.ts.map +0 -1
  200. package/dist/frontend/layout.d.ts +0 -140
  201. package/dist/frontend/layout.d.ts.map +0 -1
  202. package/dist/frontend/ssr/react.d.ts +0 -118
  203. package/dist/frontend/ssr/react.d.ts.map +0 -1
  204. package/dist/frontend/ssr/solid.d.ts +0 -141
  205. package/dist/frontend/ssr/solid.d.ts.map +0 -1
  206. package/dist/frontend/ssr/svelte.d.ts +0 -158
  207. package/dist/frontend/ssr/svelte.d.ts.map +0 -1
  208. package/dist/frontend/ssr/vue.d.ts +0 -161
  209. package/dist/frontend/ssr/vue.d.ts.map +0 -1
  210. package/dist/frontend/ssr.d.ts +0 -147
  211. package/dist/frontend/ssr.d.ts.map +0 -1
  212. package/dist/frontend/types.d.ts +0 -1902
  213. package/dist/frontend/types.d.ts.map +0 -1
  214. package/dist/graphql/built-in-engine.d.ts +0 -36
  215. package/dist/graphql/built-in-engine.d.ts.map +0 -1
  216. package/dist/graphql/context-builder.d.ts +0 -44
  217. package/dist/graphql/context-builder.d.ts.map +0 -1
  218. package/dist/graphql/decorators.d.ts +0 -162
  219. package/dist/graphql/decorators.d.ts.map +0 -1
  220. package/dist/graphql/execution-pipeline.d.ts +0 -67
  221. package/dist/graphql/execution-pipeline.d.ts.map +0 -1
  222. package/dist/graphql/graphql-module.d.ts +0 -70
  223. package/dist/graphql/graphql-module.d.ts.map +0 -1
  224. package/dist/graphql/index.d.ts +0 -48
  225. package/dist/graphql/index.d.ts.map +0 -1
  226. package/dist/graphql/metadata.d.ts +0 -37
  227. package/dist/graphql/metadata.d.ts.map +0 -1
  228. package/dist/graphql/schema-builder.d.ts +0 -34
  229. package/dist/graphql/schema-builder.d.ts.map +0 -1
  230. package/dist/graphql/subscription-handler.d.ts +0 -47
  231. package/dist/graphql/subscription-handler.d.ts.map +0 -1
  232. package/dist/graphql/types.d.ts +0 -252
  233. package/dist/graphql/types.d.ts.map +0 -1
  234. package/dist/health/index.d.ts +0 -176
  235. package/dist/health/index.d.ts.map +0 -1
  236. package/dist/i18n/engine.d.ts +0 -105
  237. package/dist/i18n/engine.d.ts.map +0 -1
  238. package/dist/i18n/index.d.ts +0 -13
  239. package/dist/i18n/index.d.ts.map +0 -1
  240. package/dist/i18n/loader.d.ts +0 -79
  241. package/dist/i18n/loader.d.ts.map +0 -1
  242. package/dist/i18n/middleware.d.ts +0 -96
  243. package/dist/i18n/middleware.d.ts.map +0 -1
  244. package/dist/i18n/negotiator.d.ts +0 -84
  245. package/dist/i18n/negotiator.d.ts.map +0 -1
  246. package/dist/i18n/types.d.ts +0 -129
  247. package/dist/i18n/types.d.ts.map +0 -1
  248. package/dist/index.d.ts +0 -48
  249. package/dist/index.d.ts.map +0 -1
  250. package/dist/jobs/drivers/memory.d.ts +0 -38
  251. package/dist/jobs/drivers/memory.d.ts.map +0 -1
  252. package/dist/jobs/drivers/redis.d.ts +0 -34
  253. package/dist/jobs/drivers/redis.d.ts.map +0 -1
  254. package/dist/jobs/index.d.ts +0 -12
  255. package/dist/jobs/index.d.ts.map +0 -1
  256. package/dist/jobs/queue.d.ts +0 -93
  257. package/dist/jobs/queue.d.ts.map +0 -1
  258. package/dist/jobs/types.d.ts +0 -193
  259. package/dist/jobs/types.d.ts.map +0 -1
  260. package/dist/jobs/worker.d.ts +0 -91
  261. package/dist/jobs/worker.d.ts.map +0 -1
  262. package/dist/lock/index.d.ts +0 -141
  263. package/dist/lock/index.d.ts.map +0 -1
  264. package/dist/logger/index.d.ts +0 -156
  265. package/dist/logger/index.d.ts.map +0 -1
  266. package/dist/logger/transports/index.d.ts +0 -371
  267. package/dist/logger/transports/index.d.ts.map +0 -1
  268. package/dist/metrics/index.d.ts +0 -163
  269. package/dist/metrics/index.d.ts.map +0 -1
  270. package/dist/middleware/built-in.d.ts +0 -50
  271. package/dist/middleware/built-in.d.ts.map +0 -1
  272. package/dist/middleware/index.d.ts +0 -40
  273. package/dist/middleware/index.d.ts.map +0 -1
  274. package/dist/migrations/index.d.ts +0 -10
  275. package/dist/migrations/index.d.ts.map +0 -1
  276. package/dist/modules/filters.d.ts +0 -150
  277. package/dist/modules/filters.d.ts.map +0 -1
  278. package/dist/modules/guards.d.ts +0 -188
  279. package/dist/modules/guards.d.ts.map +0 -1
  280. package/dist/modules/index.d.ts +0 -266
  281. package/dist/modules/index.d.ts.map +0 -1
  282. package/dist/modules/interceptors.d.ts +0 -242
  283. package/dist/modules/interceptors.d.ts.map +0 -1
  284. package/dist/modules/lazy.d.ts +0 -187
  285. package/dist/modules/lazy.d.ts.map +0 -1
  286. package/dist/modules/lifecycle.d.ts +0 -221
  287. package/dist/modules/lifecycle.d.ts.map +0 -1
  288. package/dist/modules/metadata.d.ts +0 -32
  289. package/dist/modules/metadata.d.ts.map +0 -1
  290. package/dist/modules/pipes.d.ts +0 -287
  291. package/dist/modules/pipes.d.ts.map +0 -1
  292. package/dist/notification/channels/base.d.ts +0 -32
  293. package/dist/notification/channels/base.d.ts.map +0 -1
  294. package/dist/notification/channels/email.d.ts +0 -37
  295. package/dist/notification/channels/email.d.ts.map +0 -1
  296. package/dist/notification/channels/push.d.ts +0 -37
  297. package/dist/notification/channels/push.d.ts.map +0 -1
  298. package/dist/notification/channels/sms.d.ts +0 -37
  299. package/dist/notification/channels/sms.d.ts.map +0 -1
  300. package/dist/notification/channels/whatsapp.d.ts +0 -37
  301. package/dist/notification/channels/whatsapp.d.ts.map +0 -1
  302. package/dist/notification/index.d.ts +0 -15
  303. package/dist/notification/index.d.ts.map +0 -1
  304. package/dist/notification/service.d.ts +0 -100
  305. package/dist/notification/service.d.ts.map +0 -1
  306. package/dist/notification/types.d.ts +0 -253
  307. package/dist/notification/types.d.ts.map +0 -1
  308. package/dist/observability/__tests__/observability.test.d.ts +0 -2
  309. package/dist/observability/__tests__/observability.test.d.ts.map +0 -1
  310. package/dist/observability/breadcrumbs.d.ts +0 -48
  311. package/dist/observability/breadcrumbs.d.ts.map +0 -1
  312. package/dist/observability/index.d.ts +0 -95
  313. package/dist/observability/index.d.ts.map +0 -1
  314. package/dist/observability/interceptor.d.ts +0 -19
  315. package/dist/observability/interceptor.d.ts.map +0 -1
  316. package/dist/observability/service.d.ts +0 -101
  317. package/dist/observability/service.d.ts.map +0 -1
  318. package/dist/observability/trace.d.ts +0 -21
  319. package/dist/observability/trace.d.ts.map +0 -1
  320. package/dist/observability/types.d.ts +0 -172
  321. package/dist/observability/types.d.ts.map +0 -1
  322. package/dist/openapi/__tests__/decorators.test.d.ts +0 -2
  323. package/dist/openapi/__tests__/decorators.test.d.ts.map +0 -1
  324. package/dist/openapi/__tests__/document-builder.test.d.ts +0 -2
  325. package/dist/openapi/__tests__/document-builder.test.d.ts.map +0 -1
  326. package/dist/openapi/__tests__/route-scanner.test.d.ts +0 -2
  327. package/dist/openapi/__tests__/route-scanner.test.d.ts.map +0 -1
  328. package/dist/openapi/__tests__/schema-generator.test.d.ts +0 -2
  329. package/dist/openapi/__tests__/schema-generator.test.d.ts.map +0 -1
  330. package/dist/openapi/decorators.d.ts +0 -173
  331. package/dist/openapi/decorators.d.ts.map +0 -1
  332. package/dist/openapi/document-builder.d.ts +0 -82
  333. package/dist/openapi/document-builder.d.ts.map +0 -1
  334. package/dist/openapi/index.d.ts +0 -48
  335. package/dist/openapi/index.d.ts.map +0 -1
  336. package/dist/openapi/metadata.d.ts +0 -36
  337. package/dist/openapi/metadata.d.ts.map +0 -1
  338. package/dist/openapi/route-scanner.d.ts +0 -34
  339. package/dist/openapi/route-scanner.d.ts.map +0 -1
  340. package/dist/openapi/schema-generator.d.ts +0 -53
  341. package/dist/openapi/schema-generator.d.ts.map +0 -1
  342. package/dist/openapi/swagger-module.d.ts +0 -57
  343. package/dist/openapi/swagger-module.d.ts.map +0 -1
  344. package/dist/openapi/types.d.ts +0 -344
  345. package/dist/openapi/types.d.ts.map +0 -1
  346. package/dist/orm/index.d.ts +0 -10
  347. package/dist/orm/index.d.ts.map +0 -1
  348. package/dist/router/index.d.ts +0 -73
  349. package/dist/router/index.d.ts.map +0 -1
  350. package/dist/router/linear.d.ts +0 -54
  351. package/dist/router/linear.d.ts.map +0 -1
  352. package/dist/router/regex.d.ts +0 -49
  353. package/dist/router/regex.d.ts.map +0 -1
  354. package/dist/router/tree.d.ts +0 -112
  355. package/dist/router/tree.d.ts.map +0 -1
  356. package/dist/rpc/index.d.ts +0 -321
  357. package/dist/rpc/index.d.ts.map +0 -1
  358. package/dist/schema/index.d.ts +0 -10
  359. package/dist/schema/index.d.ts.map +0 -1
  360. package/dist/security/index.d.ts +0 -126
  361. package/dist/security/index.d.ts.map +0 -1
  362. package/dist/ssg/index.d.ts +0 -73
  363. package/dist/ssg/index.d.ts.map +0 -1
  364. package/dist/storage/index.d.ts +0 -99
  365. package/dist/storage/index.d.ts.map +0 -1
  366. package/dist/telemetry/index.d.ts +0 -376
  367. package/dist/telemetry/index.d.ts.map +0 -1
  368. package/dist/template/index.d.ts +0 -7
  369. package/dist/template/index.d.ts.map +0 -1
  370. package/dist/templates/engine.d.ts +0 -60
  371. package/dist/templates/engine.d.ts.map +0 -1
  372. package/dist/templates/index.d.ts +0 -9
  373. package/dist/templates/index.d.ts.map +0 -1
  374. package/dist/templates/loader.d.ts +0 -45
  375. package/dist/templates/loader.d.ts.map +0 -1
  376. package/dist/templates/renderers/markdown.d.ts +0 -46
  377. package/dist/templates/renderers/markdown.d.ts.map +0 -1
  378. package/dist/templates/renderers/simple.d.ts +0 -35
  379. package/dist/templates/renderers/simple.d.ts.map +0 -1
  380. package/dist/templates/types.d.ts +0 -138
  381. package/dist/templates/types.d.ts.map +0 -1
  382. package/dist/testing/index.d.ts +0 -539
  383. package/dist/testing/index.d.ts.map +0 -1
  384. package/dist/types/index.d.ts +0 -116
  385. package/dist/types/index.d.ts.map +0 -1
  386. package/dist/validation/index.d.ts +0 -89
  387. package/dist/validation/index.d.ts.map +0 -1
  388. package/dist/validation/schemas.d.ts +0 -243
  389. package/dist/validation/schemas.d.ts.map +0 -1
  390. package/dist/websocket/index.d.ts +0 -252
  391. package/dist/websocket/index.d.ts.map +0 -1
@@ -1,1902 +0,0 @@
1
- /**
2
- * TypeScript interfaces for the Frontend Integration Layer
3
- *
4
- * Provides type definitions for the development server,
5
- * framework detection, and frontend-related configurations.
6
- */
7
- /**
8
- * Supported frontend frameworks
9
- */
10
- export type FrontendFramework = "react" | "vue" | "svelte" | "solid";
11
- /**
12
- * Framework detection mode
13
- */
14
- export type FrameworkDetectionMode = FrontendFramework | "auto";
15
- /**
16
- * Development server configuration options
17
- */
18
- export interface DevServerConfig {
19
- /**
20
- * Port number for the dev server
21
- * @default 3000
22
- */
23
- port: number;
24
- /**
25
- * Hostname for the dev server
26
- * @default 'localhost'
27
- */
28
- hostname: string;
29
- /**
30
- * Project root directory
31
- */
32
- rootDir: string;
33
- /**
34
- * Static files directory (relative to rootDir)
35
- * @default 'public'
36
- */
37
- publicDir: string;
38
- /**
39
- * Pages directory (relative to rootDir)
40
- * @default 'pages'
41
- */
42
- pagesDir: string;
43
- /**
44
- * Enable Hot Module Replacement
45
- * @default true
46
- */
47
- hmr: boolean;
48
- /**
49
- * Frontend framework to use
50
- * 'auto' will detect from package.json dependencies
51
- * @default 'auto'
52
- */
53
- framework: FrameworkDetectionMode;
54
- /**
55
- * Console streaming configuration
56
- * Browser console output will be streamed to terminal
57
- */
58
- consoleStream?: PartialConsoleStreamConfig;
59
- }
60
- /**
61
- * Partial configuration for creating a dev server
62
- */
63
- export type PartialDevServerConfig = Partial<DevServerConfig> & Pick<DevServerConfig, "rootDir">;
64
- /**
65
- * Runtime state of the development server
66
- */
67
- export interface DevServerState {
68
- /**
69
- * Whether the server is currently running
70
- */
71
- running: boolean;
72
- /**
73
- * Port the server is listening on
74
- */
75
- port: number;
76
- /**
77
- * Hostname the server is bound to
78
- */
79
- hostname: string;
80
- /**
81
- * Detected or configured framework
82
- */
83
- framework: FrontendFramework;
84
- /**
85
- * Server start time
86
- */
87
- startTime: Date | null;
88
- /**
89
- * Number of active connections
90
- */
91
- activeConnections: number;
92
- }
93
- /**
94
- * Information about an incoming request
95
- */
96
- export interface RequestInfo {
97
- /**
98
- * HTTP method
99
- */
100
- method: string;
101
- /**
102
- * Request URL
103
- */
104
- url: URL;
105
- /**
106
- * Request path
107
- */
108
- path: string;
109
- /**
110
- * Request headers
111
- */
112
- headers: Headers;
113
- /**
114
- * Query parameters
115
- */
116
- query: URLSearchParams;
117
- }
118
- /**
119
- * Result of file resolution for a request
120
- */
121
- export interface FileResolution {
122
- /**
123
- * Whether a file was found
124
- */
125
- found: boolean;
126
- /**
127
- * Absolute path to the file
128
- */
129
- filePath?: string;
130
- /**
131
- * Content type of the file
132
- */
133
- contentType?: string;
134
- /**
135
- * Whether this is an index.html fallback
136
- */
137
- isFallback?: boolean;
138
- }
139
- /**
140
- * Package.json dependency information for framework detection
141
- */
142
- export interface PackageDependencies {
143
- [key: string]: string;
144
- }
145
- /**
146
- * Result of framework detection
147
- */
148
- export interface FrameworkDetectionResult {
149
- /**
150
- * Detected framework
151
- */
152
- framework: FrontendFramework;
153
- /**
154
- * Whether detection was successful
155
- */
156
- detected: boolean;
157
- /**
158
- * Source of detection ('package.json' or 'config')
159
- */
160
- source: "package.json" | "config";
161
- }
162
- /**
163
- * Result of transforming a file
164
- */
165
- export interface TransformResult {
166
- /**
167
- * Transformed content
168
- */
169
- content: string;
170
- /**
171
- * Content type
172
- */
173
- contentType: string;
174
- /**
175
- * Source map (if applicable)
176
- */
177
- sourceMap?: string;
178
- }
179
- /**
180
- * Options for file transformation
181
- */
182
- export interface TransformOptions {
183
- /**
184
- * File path being transformed
185
- */
186
- filePath: string;
187
- /**
188
- * Original content
189
- */
190
- content: string;
191
- /**
192
- * Target framework
193
- */
194
- framework: FrontendFramework;
195
- /**
196
- * Whether to generate source maps
197
- */
198
- sourceMap?: boolean;
199
- }
200
- /**
201
- * Dev server middleware function
202
- */
203
- export type DevServerMiddleware = (request: Request, next: () => Promise<Response>) => Response | Promise<Response>;
204
- /**
205
- * Dev server event types
206
- */
207
- export type DevServerEvent = {
208
- type: "start";
209
- port: number;
210
- hostname: string;
211
- } | {
212
- type: "stop";
213
- reason?: string;
214
- } | {
215
- type: "request";
216
- method: string;
217
- path: string;
218
- duration: number;
219
- } | {
220
- type: "error";
221
- error: Error;
222
- } | {
223
- type: "file-change";
224
- path: string;
225
- } | {
226
- type: "framework-detected";
227
- framework: FrontendFramework;
228
- };
229
- /**
230
- * Dev server event listener
231
- */
232
- export type DevServerEventListener = (event: DevServerEvent) => void;
233
- /**
234
- * Standard error response
235
- */
236
- export interface ErrorResponse {
237
- /**
238
- * Error message
239
- */
240
- error: string;
241
- /**
242
- * HTTP status code
243
- */
244
- statusCode: number;
245
- /**
246
- * Optional stack trace (development only)
247
- */
248
- stack?: string;
249
- }
250
- /**
251
- * HMR client connection information
252
- */
253
- export interface HMRClient {
254
- /**
255
- * Unique client identifier
256
- */
257
- id: string;
258
- /**
259
- * WebSocket connection
260
- */
261
- ws: WebSocket;
262
- /**
263
- * Set of file paths the client is subscribed to
264
- */
265
- subscribedFiles: Set<string>;
266
- }
267
- /**
268
- * HMR update error information
269
- */
270
- export interface HMRUpdateError {
271
- /**
272
- * Error message
273
- */
274
- message: string;
275
- /**
276
- * Stack trace
277
- */
278
- stack?: string;
279
- /**
280
- * File where error occurred
281
- */
282
- file?: string;
283
- /**
284
- * Line number of error
285
- */
286
- line?: number;
287
- /**
288
- * Column number of error
289
- */
290
- column?: number;
291
- }
292
- /**
293
- * HMR update message sent to clients
294
- */
295
- export interface HMRUpdate {
296
- /**
297
- * Type of update
298
- */
299
- type: "update" | "reload" | "error";
300
- /**
301
- * Unique identifier for this update
302
- */
303
- fileId: string;
304
- /**
305
- * Timestamp of the update
306
- */
307
- timestamp: number;
308
- /**
309
- * List of changed file paths
310
- */
311
- changes: string[];
312
- /**
313
- * Error information if type is 'error'
314
- */
315
- error?: HMRUpdateError;
316
- }
317
- /**
318
- * HMR configuration options
319
- */
320
- export interface HMRConfig {
321
- /**
322
- * Enable or disable HMR
323
- * @default true
324
- */
325
- enabled: boolean;
326
- /**
327
- * WebSocket port for HMR
328
- * Defaults to dev server port + 1
329
- */
330
- port?: number;
331
- /**
332
- * Debounce time for file changes in milliseconds
333
- * @default 100
334
- */
335
- debounceMs: number;
336
- /**
337
- * File patterns to ignore for file watching
338
- * @default ['node_modules', '.git', 'dist', 'build']
339
- */
340
- ignorePatterns: string[];
341
- }
342
- /**
343
- * Partial HMR configuration for creating HMR manager
344
- */
345
- export type PartialHMRConfig = Partial<HMRConfig>;
346
- /**
347
- * HMR dependency graph entry
348
- */
349
- export interface HMRDependencyNode {
350
- /**
351
- * File path
352
- */
353
- filePath: string;
354
- /**
355
- * Files that this file imports
356
- */
357
- imports: Set<string>;
358
- /**
359
- * Files that import this file
360
- */
361
- importedBy: Set<string>;
362
- /**
363
- * Last modification timestamp
364
- */
365
- lastModified: number;
366
- }
367
- /**
368
- * HMR module update result
369
- */
370
- export interface HMRModuleUpdate {
371
- /**
372
- * Module ID (file path)
373
- */
374
- moduleId: string;
375
- /**
376
- * Updated module code
377
- */
378
- code: string;
379
- /**
380
- * Whether the module accepts hot updates
381
- */
382
- accepted: boolean;
383
- /**
384
- * Dependencies that need to be updated
385
- */
386
- dependencies: string[];
387
- }
388
- /**
389
- * HMR client message types
390
- */
391
- export type HMRClientMessage = {
392
- type: "subscribe";
393
- fileId: string;
394
- } | {
395
- type: "unsubscribe";
396
- fileId: string;
397
- } | {
398
- type: "ping";
399
- } | {
400
- type: "module-accepted";
401
- moduleId: string;
402
- dependencies: string[];
403
- };
404
- /**
405
- * HMR server message types
406
- */
407
- export type HMRServerMessage = HMRUpdate | {
408
- type: "pong";
409
- } | {
410
- type: "connected";
411
- clientId: string;
412
- };
413
- /**
414
- * File change event information
415
- */
416
- export interface FileChangeEvent {
417
- /**
418
- * Path to the changed file
419
- */
420
- path: string;
421
- /**
422
- * Type of change
423
- */
424
- event: "create" | "update" | "delete";
425
- /**
426
- * Timestamp of the change
427
- */
428
- timestamp: number;
429
- }
430
- /**
431
- * Console message types that can be captured
432
- */
433
- export type ConsoleMessageType = "log" | "info" | "warn" | "error" | "debug" | "trace" | "table";
434
- /**
435
- * Console message captured from the browser
436
- */
437
- export interface ConsoleMessage {
438
- /**
439
- * Type of console method called
440
- */
441
- type: ConsoleMessageType;
442
- /**
443
- * Serialized arguments passed to console method
444
- */
445
- args: unknown[];
446
- /**
447
- * Timestamp when the message was created
448
- */
449
- timestamp: number;
450
- /**
451
- * Source file where console was called
452
- */
453
- file?: string;
454
- /**
455
- * Line number in source file
456
- */
457
- line?: number;
458
- /**
459
- * Column number in source file
460
- */
461
- column?: number;
462
- /**
463
- * Stack trace for errors
464
- */
465
- stack?: string;
466
- /**
467
- * Page URL where console was called
468
- */
469
- url?: string;
470
- }
471
- /**
472
- * Configuration for console streaming
473
- */
474
- export interface ConsoleStreamConfig {
475
- /**
476
- * Enable or disable console streaming
477
- * @default true
478
- */
479
- enabled: boolean;
480
- /**
481
- * Show timestamps in output
482
- * @default true
483
- */
484
- showTimestamps: boolean;
485
- /**
486
- * Show file:line information
487
- * @default true
488
- */
489
- showFile: boolean;
490
- /**
491
- * Colorize terminal output
492
- * @default true
493
- */
494
- colorize: boolean;
495
- /**
496
- * Filter which console types to show
497
- * Default: show all types
498
- */
499
- filter: ConsoleMessageType[];
500
- }
501
- /**
502
- * Partial console stream configuration
503
- */
504
- export type PartialConsoleStreamConfig = Partial<ConsoleStreamConfig>;
505
- /**
506
- * Console stream client connection
507
- */
508
- export interface ConsoleStreamClient {
509
- /**
510
- * Unique client identifier
511
- */
512
- id: string;
513
- /**
514
- * WebSocket connection
515
- */
516
- ws: WebSocket;
517
- /**
518
- * Page URL of the client
519
- */
520
- url?: string;
521
- }
522
- /**
523
- * Console message from client
524
- */
525
- export interface ConsoleClientMessage {
526
- /**
527
- * Message type identifier
528
- */
529
- type: "console";
530
- /**
531
- * Console method called (log, warn, error, etc.)
532
- */
533
- consoleType: ConsoleMessageType;
534
- /**
535
- * Serialized arguments passed to console method
536
- */
537
- args: unknown[];
538
- /**
539
- * Timestamp when the message was created
540
- */
541
- timestamp: number;
542
- /**
543
- * Source file where console was called
544
- */
545
- file?: string;
546
- /**
547
- * Line number in source file
548
- */
549
- line?: number;
550
- /**
551
- * Column number in source file
552
- */
553
- column?: number;
554
- /**
555
- * Stack trace for errors
556
- */
557
- stack?: string;
558
- /**
559
- * Page URL where console was called
560
- */
561
- url?: string;
562
- }
563
- /**
564
- * Server message for console stream
565
- */
566
- export type ConsoleServerMessage = {
567
- type: "connected";
568
- clientId: string;
569
- } | {
570
- type: "pong";
571
- };
572
- /**
573
- * Build plugin interface for framework-specific plugins
574
- */
575
- export interface BuildPlugin {
576
- /**
577
- * Plugin name
578
- */
579
- name: string;
580
- /**
581
- * Setup function called during build
582
- */
583
- setup?: (build: unknown) => void | Promise<void>;
584
- /**
585
- * Plugin namespace for module resolution
586
- */
587
- namespace?: string;
588
- }
589
- /**
590
- * Source map generation options
591
- */
592
- export type SourcemapOption = "linked" | "external" | "none";
593
- /**
594
- * Build target environment
595
- */
596
- export type BuildTarget = "browser" | "node" | "bun";
597
- /**
598
- * Output module format
599
- */
600
- export type OutputFormat = "esm" | "cjs" | "iife";
601
- /**
602
- * Bundler configuration options
603
- */
604
- export interface BundlerConfig {
605
- /**
606
- * Entry file(s) for the build
607
- * Can be a single file or array of files
608
- */
609
- entryPoints: string | string[];
610
- /**
611
- * Output directory for built files
612
- * @default 'dist'
613
- */
614
- outDir: string;
615
- /**
616
- * Frontend framework to use
617
- * 'auto' will detect from package.json
618
- * @default 'auto'
619
- */
620
- framework: FrontendFramework | "auto";
621
- /**
622
- * Minify output
623
- * @default true
624
- */
625
- minify: boolean;
626
- /**
627
- * Source map generation
628
- * @default 'linked'
629
- */
630
- sourcemap: SourcemapOption;
631
- /**
632
- * Enable code splitting
633
- * @default true
634
- */
635
- splitting: boolean;
636
- /**
637
- * Enable tree shaking
638
- * @default true
639
- */
640
- treeshaking: boolean;
641
- /**
642
- * Environment variable prefix to include in build
643
- * @default 'PUBLIC_'
644
- */
645
- envPrefix: string;
646
- /**
647
- * Global constants to define
648
- */
649
- define: Record<string, string>;
650
- /**
651
- * External dependencies to exclude from bundle
652
- */
653
- external: string[];
654
- /**
655
- * Build target environment
656
- * @default 'browser'
657
- */
658
- target: BuildTarget;
659
- /**
660
- * Output module format
661
- * @default 'esm'
662
- */
663
- format: OutputFormat;
664
- /**
665
- * Project root directory
666
- * @default process.cwd()
667
- */
668
- rootDir?: string;
669
- /**
670
- * Public path for assets
671
- */
672
- publicPath?: string;
673
- /**
674
- * Generate build manifest
675
- * @default true
676
- */
677
- manifest: boolean;
678
- /**
679
- * Environment mode
680
- */
681
- mode?: "development" | "production";
682
- }
683
- /**
684
- * Partial bundler configuration
685
- */
686
- export type PartialBundlerConfig = Partial<BundlerConfig> & Pick<BundlerConfig, "entryPoints">;
687
- /**
688
- * Build output file information
689
- */
690
- export interface BuildOutput {
691
- /**
692
- * Output file path (relative to outDir)
693
- */
694
- path: string;
695
- /**
696
- * Type of output file
697
- */
698
- type: "js" | "css" | "asset";
699
- /**
700
- * File size in bytes
701
- */
702
- size: number;
703
- /**
704
- * Content hash for cache busting
705
- */
706
- hash?: string;
707
- /**
708
- * Entry point this file belongs to
709
- */
710
- entryPoint?: string;
711
- /**
712
- * For JS files, list of imported modules
713
- */
714
- imports?: string[];
715
- /**
716
- * For JS files, list of dynamically imported modules
717
- */
718
- dynamicImports?: string[];
719
- /**
720
- * For CSS files, list of referenced assets
721
- */
722
- references?: string[];
723
- }
724
- /**
725
- * Build error information
726
- */
727
- export interface BuildError {
728
- /**
729
- * Error message
730
- */
731
- message: string;
732
- /**
733
- * File where error occurred
734
- */
735
- file?: string;
736
- /**
737
- * Line number
738
- */
739
- line?: number;
740
- /**
741
- * Column number
742
- */
743
- column?: number;
744
- /**
745
- * Stack trace
746
- */
747
- stack?: string;
748
- }
749
- /**
750
- * Build warning information
751
- */
752
- export interface BuildWarning {
753
- /**
754
- * Warning message
755
- */
756
- message: string;
757
- /**
758
- * File where warning occurred
759
- */
760
- file?: string;
761
- /**
762
- * Line number
763
- */
764
- line?: number;
765
- /**
766
- * Column number
767
- */
768
- column?: number;
769
- }
770
- /**
771
- * Result of a production build
772
- */
773
- export interface BuildResult {
774
- /**
775
- * Whether the build succeeded
776
- */
777
- success: boolean;
778
- /**
779
- * Output files generated
780
- */
781
- outputs: BuildOutput[];
782
- /**
783
- * Build errors
784
- */
785
- errors: BuildError[];
786
- /**
787
- * Build warnings
788
- */
789
- warnings: BuildWarning[];
790
- /**
791
- * Build duration in milliseconds
792
- */
793
- duration: number;
794
- /**
795
- * Build manifest (if generated)
796
- */
797
- manifest?: BuildManifest;
798
- /**
799
- * Total output size in bytes
800
- */
801
- totalSize: number;
802
- }
803
- /**
804
- * Framework-specific build configuration
805
- */
806
- export interface FrameworkBuildConfig {
807
- /**
808
- * JSX runtime to use
809
- */
810
- jsxRuntime: "automatic" | "classic";
811
- /**
812
- * JSX import source for automatic runtime
813
- */
814
- jsxImportSource?: string;
815
- /**
816
- * JSX fragment import source
817
- */
818
- jsxFragment?: string;
819
- /**
820
- * Framework-specific build plugins
821
- */
822
- plugins: BuildPlugin[];
823
- /**
824
- * Global constants for the framework
825
- */
826
- define: Record<string, string>;
827
- /**
828
- * External dependencies
829
- */
830
- external: string[];
831
- /**
832
- * File extensions to handle
833
- */
834
- extensions: string[];
835
- /**
836
- * Additional loader configurations
837
- */
838
- loaders?: Record<string, "js" | "jsx" | "ts" | "tsx" | "css" | "file" | "dataurl" | "text">;
839
- }
840
- /**
841
- * Build manifest for SSR integration
842
- */
843
- export interface BuildManifest {
844
- /**
845
- * Entry points and their files
846
- */
847
- entryPoints: Record<string, string[]>;
848
- /**
849
- * All output files
850
- */
851
- files: Record<string, {
852
- type: "js" | "css" | "asset";
853
- size: number;
854
- hash?: string;
855
- imports?: string[];
856
- dynamicImports?: string[];
857
- }>;
858
- /**
859
- * CSS files for each entry point
860
- */
861
- css: Record<string, string[]>;
862
- /**
863
- * Build timestamp
864
- */
865
- timestamp: number;
866
- /**
867
- * Build duration in ms
868
- */
869
- duration: number;
870
- }
871
- /**
872
- * Bundle analysis result
873
- */
874
- export interface BundleAnalysis {
875
- /**
876
- * Total bundle size in bytes
877
- */
878
- totalSize: number;
879
- /**
880
- * Size breakdown by module
881
- */
882
- modules: {
883
- path: string;
884
- size: number;
885
- percentage: number;
886
- }[];
887
- /**
888
- * Duplicate code detection
889
- */
890
- duplicates: {
891
- module: string;
892
- occurrences: number;
893
- wastedBytes: number;
894
- }[];
895
- /**
896
- * Large modules (>50KB)
897
- */
898
- largeModules: {
899
- path: string;
900
- size: number;
901
- }[];
902
- /**
903
- * Dependency tree
904
- */
905
- dependencyTree: Record<string, string[]>;
906
- }
907
- /**
908
- * Watch mode callback
909
- */
910
- export type BuildWatchCallback = (result: BuildResult) => void;
911
- /**
912
- * Bundler state
913
- */
914
- export interface BundlerState {
915
- /**
916
- * Whether a build is in progress
917
- */
918
- building: boolean;
919
- /**
920
- * Last build result
921
- */
922
- lastResult: BuildResult | null;
923
- /**
924
- * Whether watch mode is active
925
- */
926
- watching: boolean;
927
- /**
928
- * Detected framework
929
- */
930
- framework: FrontendFramework | null;
931
- }
932
- /**
933
- * SSR element representation for head/body elements
934
- */
935
- export interface SSRElement {
936
- /**
937
- * HTML tag name
938
- */
939
- tag: string;
940
- /**
941
- * HTML attributes
942
- */
943
- attrs: Record<string, string>;
944
- /**
945
- * Child elements
946
- */
947
- children?: SSRElement[];
948
- /**
949
- * Inner HTML content
950
- */
951
- innerHTML?: string;
952
- }
953
- /**
954
- * SSR context passed to page components
955
- */
956
- export interface SSRContext {
957
- /**
958
- * Request URL
959
- */
960
- url: string;
961
- /**
962
- * Original request object
963
- */
964
- request: Request;
965
- /**
966
- * Response headers
967
- */
968
- headers: Headers;
969
- /**
970
- * HTTP response status
971
- */
972
- status: number;
973
- /**
974
- * Head elements to inject
975
- */
976
- head: SSRElement[];
977
- /**
978
- * Body elements to inject
979
- */
980
- body: SSRElement[];
981
- /**
982
- * Serialized data for client hydration
983
- */
984
- data: Record<string, unknown>;
985
- /**
986
- * Loaded modules for preload
987
- */
988
- modules: Set<string>;
989
- /**
990
- * URL pathname
991
- */
992
- pathname: string;
993
- /**
994
- * Query parameters
995
- */
996
- query: URLSearchParams;
997
- /**
998
- * Route parameters
999
- */
1000
- params: Record<string, string>;
1001
- }
1002
- /**
1003
- * Result of rendering a page
1004
- */
1005
- export interface RenderResult {
1006
- /**
1007
- * Rendered HTML or stream
1008
- */
1009
- html: string | ReadableStream<Uint8Array>;
1010
- /**
1011
- * Head content string
1012
- */
1013
- head: string;
1014
- /**
1015
- * Body content string
1016
- */
1017
- body: string;
1018
- /**
1019
- * Data for client hydration
1020
- */
1021
- data: Record<string, unknown>;
1022
- /**
1023
- * Loaded modules
1024
- */
1025
- modules: string[];
1026
- /**
1027
- * HTTP status code
1028
- */
1029
- status: number;
1030
- }
1031
- /**
1032
- * SSR page component interface
1033
- */
1034
- export interface SSRPage {
1035
- /**
1036
- * Render the page to HTML
1037
- */
1038
- render(ctx: SSRContext): Promise<RenderResult> | RenderResult;
1039
- /**
1040
- * Server-side data fetching
1041
- */
1042
- getServerSideProps?(ctx: SSRContext): Promise<Record<string, unknown>>;
1043
- /**
1044
- * Static paths for dynamic routes
1045
- */
1046
- getStaticPaths?(): Promise<{
1047
- paths: string[];
1048
- fallback: boolean;
1049
- }>;
1050
- }
1051
- /**
1052
- * SSR configuration options
1053
- */
1054
- export interface SSRConfig {
1055
- /**
1056
- * Server entry point file
1057
- */
1058
- entry: string;
1059
- /**
1060
- * Client entry point for hydration
1061
- */
1062
- clientEntry: string;
1063
- /**
1064
- * Build manifest from bundler
1065
- */
1066
- clientManifest: BuildManifest;
1067
- /**
1068
- * Enable streaming SSR
1069
- * @default true
1070
- */
1071
- streaming: boolean;
1072
- /**
1073
- * Maximum await timeout in milliseconds
1074
- * @default 5000
1075
- */
1076
- maxTimeout: number;
1077
- /**
1078
- * Buffer initial stream for faster TTFB
1079
- * @default true
1080
- */
1081
- bufferInitialStream: boolean;
1082
- /**
1083
- * Framework to use for SSR
1084
- */
1085
- framework: FrontendFramework;
1086
- /**
1087
- * Project root directory
1088
- */
1089
- rootDir?: string;
1090
- /**
1091
- * Base HTML template
1092
- */
1093
- template?: string;
1094
- /**
1095
- * Custom HTML template function
1096
- */
1097
- templateFn?: (ctx: SSRContext, content: string, head: string, body: string) => string;
1098
- }
1099
- /**
1100
- * Partial SSR configuration
1101
- */
1102
- export type PartialSSRConfig = Partial<SSRConfig> & Pick<SSRConfig, "entry" | "clientEntry" | "clientManifest" | "framework">;
1103
- /**
1104
- * Framework-specific SSR renderer
1105
- */
1106
- export interface FrameworkSSRRenderer {
1107
- /**
1108
- * Render a component to HTML string
1109
- */
1110
- renderToString(component: unknown, context: SSRContext): Promise<string>;
1111
- /**
1112
- * Render a component to a stream
1113
- */
1114
- renderToStream(component: unknown, context: SSRContext): ReadableStream<Uint8Array>;
1115
- /**
1116
- * Get head elements from component
1117
- */
1118
- getHeadElements(context: SSRContext): SSRElement[];
1119
- /**
1120
- * Create the framework-specific component
1121
- */
1122
- createComponent(page: SSRPage, context: SSRContext): unknown;
1123
- }
1124
- /**
1125
- * SSR hydration data structure
1126
- */
1127
- export interface SSRHydrationData {
1128
- /**
1129
- * Page props
1130
- */
1131
- props: Record<string, unknown>;
1132
- /**
1133
- * Current URL
1134
- */
1135
- url: string;
1136
- /**
1137
- * Route parameters
1138
- */
1139
- params: Record<string, string>;
1140
- /**
1141
- * Query parameters
1142
- */
1143
- query: Record<string, string>;
1144
- /**
1145
- * Framework identifier
1146
- */
1147
- framework: FrontendFramework;
1148
- }
1149
- /**
1150
- * SSR error information
1151
- */
1152
- export interface SSRError {
1153
- /**
1154
- * Error message
1155
- */
1156
- message: string;
1157
- /**
1158
- * Stack trace
1159
- */
1160
- stack?: string;
1161
- /**
1162
- * Component where error occurred
1163
- */
1164
- component?: string;
1165
- /**
1166
- * Error timestamp
1167
- */
1168
- timestamp: number;
1169
- }
1170
- /**
1171
- * SSR render options
1172
- */
1173
- export interface SSRRenderOptions {
1174
- /**
1175
- * Request URL
1176
- */
1177
- url: string;
1178
- /**
1179
- * Original request
1180
- */
1181
- request: Request;
1182
- /**
1183
- * Route parameters
1184
- */
1185
- params?: Record<string, string>;
1186
- /**
1187
- * Additional props to pass to page
1188
- */
1189
- props?: Record<string, unknown>;
1190
- /**
1191
- * Skip streaming and return string
1192
- */
1193
- skipStreaming?: boolean;
1194
- }
1195
- /**
1196
- * Preload link information
1197
- */
1198
- export interface PreloadLink {
1199
- /**
1200
- * Module path
1201
- */
1202
- href: string;
1203
- /**
1204
- * Link rel type
1205
- */
1206
- rel: "preload" | "prefetch" | "modulepreload";
1207
- /**
1208
- * As attribute
1209
- */
1210
- as?: "script" | "style" | "font" | "image" | "fetch";
1211
- /**
1212
- * Additional attributes
1213
- */
1214
- attrs?: Record<string, string>;
1215
- }
1216
- /**
1217
- * ISR cache entry
1218
- */
1219
- export interface ISRCacheEntry {
1220
- /**
1221
- * Rendered result
1222
- */
1223
- result: RenderResult;
1224
- /**
1225
- * Timestamp when cached
1226
- */
1227
- timestamp: number;
1228
- /**
1229
- * Revalidation time in seconds
1230
- */
1231
- revalidate: number;
1232
- /**
1233
- * Tags for tag-based revalidation
1234
- */
1235
- tags: string[];
1236
- }
1237
- /**
1238
- * ISR page configuration
1239
- */
1240
- export interface ISRPageConfig {
1241
- /**
1242
- * Revalidation time in seconds
1243
- */
1244
- revalidate?: number;
1245
- /**
1246
- * Tags for tag-based revalidation
1247
- */
1248
- tags?: string[];
1249
- /**
1250
- * Enable stale-while-revalidate
1251
- */
1252
- staleWhileRevalidate?: number;
1253
- }
1254
- /**
1255
- * ISR configuration options
1256
- */
1257
- export interface ISRConfig {
1258
- /**
1259
- * Cache directory for ISR pages
1260
- * @default '.isr-cache'
1261
- */
1262
- cacheDir: string;
1263
- /**
1264
- * Default revalidation time in seconds
1265
- * @default 3600 (1 hour)
1266
- */
1267
- defaultRevalidate: number;
1268
- /**
1269
- * Stale-while-revalidate time in seconds
1270
- * @default 60
1271
- */
1272
- staleWhileRevalidate: number;
1273
- /**
1274
- * Maximum number of pages in cache
1275
- */
1276
- maxCacheSize: number;
1277
- /**
1278
- * Redis client for distributed cache
1279
- */
1280
- redis?: {
1281
- get(key: string): Promise<string | null>;
1282
- set(key: string, value: string, options?: {
1283
- EX?: number;
1284
- }): Promise<void>;
1285
- del(...keys: string[]): Promise<void>;
1286
- keys(pattern: string): Promise<string[]>;
1287
- };
1288
- /**
1289
- * Redis key prefix
1290
- * @default 'bueno:isr:'
1291
- */
1292
- redisKeyPrefix: string;
1293
- /**
1294
- * Enable ISR
1295
- * @default true
1296
- */
1297
- enabled: boolean;
1298
- }
1299
- /**
1300
- * Partial ISR configuration
1301
- */
1302
- export type PartialISRConfig = Partial<ISRConfig>;
1303
- /**
1304
- * ISR revalidation result
1305
- */
1306
- export interface ISRRevalidationResult {
1307
- /**
1308
- * Whether revalidation succeeded
1309
- */
1310
- success: boolean;
1311
- /**
1312
- * URL that was revalidated
1313
- */
1314
- url: string;
1315
- /**
1316
- * Duration in milliseconds
1317
- */
1318
- duration: number;
1319
- /**
1320
- * Timestamp of revalidation
1321
- */
1322
- timestamp: number;
1323
- /**
1324
- * Error message if failed
1325
- */
1326
- error?: string;
1327
- }
1328
- /**
1329
- * ISR statistics
1330
- */
1331
- export interface ISRStats {
1332
- /**
1333
- * Number of cache hits
1334
- */
1335
- hits: number;
1336
- /**
1337
- * Number of cache misses
1338
- */
1339
- misses: number;
1340
- /**
1341
- * Number of revalidations
1342
- */
1343
- revalidations: number;
1344
- /**
1345
- * Number of stale hits (served stale while revalidating)
1346
- */
1347
- staleHits: number;
1348
- /**
1349
- * Current cache size
1350
- */
1351
- cacheSize: number;
1352
- /**
1353
- * Number of pending revalidations
1354
- */
1355
- pendingRevalidations: number;
1356
- /**
1357
- * Cache hit rate (0-1)
1358
- */
1359
- hitRate: number;
1360
- }
1361
- /**
1362
- * Island hydration strategy
1363
- */
1364
- export type IslandHydrationStrategy = "eager" | "lazy" | "visible" | "idle";
1365
- /**
1366
- * Island configuration options
1367
- */
1368
- export interface IslandConfig {
1369
- /**
1370
- * Unique island identifier
1371
- */
1372
- id: string;
1373
- /**
1374
- * Hydration strategy
1375
- * - eager: Hydrate immediately on page load
1376
- * - lazy: Hydrate on user interaction (click, focus, etc.)
1377
- * - visible: Hydrate when element enters viewport
1378
- * - idle: Hydrate when browser is idle
1379
- */
1380
- strategy: IslandHydrationStrategy;
1381
- /**
1382
- * Placeholder content before hydration
1383
- */
1384
- placeholder?: string;
1385
- }
1386
- /**
1387
- * Island definition for registration
1388
- */
1389
- export interface IslandDefinition {
1390
- /**
1391
- * Unique island identifier
1392
- */
1393
- id: string;
1394
- /**
1395
- * Component name
1396
- */
1397
- component: string;
1398
- /**
1399
- * Entry point for the island component
1400
- */
1401
- entry: string;
1402
- /**
1403
- * Hydration strategy
1404
- */
1405
- strategy: IslandHydrationStrategy;
1406
- /**
1407
- * CSS selector for the island
1408
- */
1409
- selector?: string;
1410
- /**
1411
- * Additional props
1412
- */
1413
- props?: Record<string, unknown>;
1414
- }
1415
- /**
1416
- * Island registry type
1417
- */
1418
- export type IslandRegistry = Map<string, IslandDefinition>;
1419
- /**
1420
- * Island render result
1421
- */
1422
- export interface IslandRenderResult {
1423
- /**
1424
- * Rendered HTML string
1425
- */
1426
- html: string;
1427
- /**
1428
- * Island ID
1429
- */
1430
- id: string;
1431
- /**
1432
- * Component name
1433
- */
1434
- component: string;
1435
- /**
1436
- * Whether the island is hydrated
1437
- */
1438
- hydrated: boolean;
1439
- /**
1440
- * Props passed to the island
1441
- */
1442
- props?: Record<string, unknown>;
1443
- /**
1444
- * Hydration strategy used
1445
- */
1446
- strategy?: IslandHydrationStrategy;
1447
- /**
1448
- * SSR content (if any)
1449
- */
1450
- ssrContent?: string;
1451
- }
1452
- /**
1453
- * Island state for client-side tracking
1454
- */
1455
- export interface IslandState {
1456
- /**
1457
- * Island ID
1458
- */
1459
- id: string;
1460
- /**
1461
- * Component name
1462
- */
1463
- component: string;
1464
- /**
1465
- * Props for the island
1466
- */
1467
- props: Record<string, unknown>;
1468
- /**
1469
- * Hydration strategy
1470
- */
1471
- strategy: IslandHydrationStrategy;
1472
- /**
1473
- * Whether the island is hydrated
1474
- */
1475
- hydrated: boolean;
1476
- }
1477
- /**
1478
- * Island hydration script info
1479
- */
1480
- export interface IslandHydrationScript {
1481
- /**
1482
- * Script content
1483
- */
1484
- script: string;
1485
- /**
1486
- * Whether to inline the script
1487
- */
1488
- inline: boolean;
1489
- /**
1490
- * Script type
1491
- */
1492
- type: "module" | "text/javascript";
1493
- }
1494
- /**
1495
- * Route type
1496
- */
1497
- export type RouteType = "page" | "api" | "layout";
1498
- /**
1499
- * Route definition from file
1500
- */
1501
- export interface RouteDefinition {
1502
- /**
1503
- * Unique route identifier
1504
- */
1505
- id: string;
1506
- /**
1507
- * Route path (e.g., /users/:id)
1508
- */
1509
- path: string;
1510
- /**
1511
- * Route pattern for matching
1512
- */
1513
- pattern: string;
1514
- /**
1515
- * File path to the route module
1516
- */
1517
- filePath: string;
1518
- /**
1519
- * Type of route
1520
- */
1521
- type: RouteType;
1522
- /**
1523
- * Parameter names extracted from path
1524
- */
1525
- params: string[];
1526
- /**
1527
- * Compiled regex for matching
1528
- */
1529
- regex: RegExp;
1530
- }
1531
- /**
1532
- * Dynamic route with parameter names
1533
- */
1534
- export interface DynamicRoute extends RouteDefinition {
1535
- /**
1536
- * Names of dynamic parameters
1537
- */
1538
- paramNames: string[];
1539
- }
1540
- /**
1541
- * Route match result
1542
- */
1543
- export interface RouteMatch {
1544
- /**
1545
- * Matched route definition
1546
- */
1547
- route: RouteDefinition;
1548
- /**
1549
- * Extracted parameters
1550
- */
1551
- params: Record<string, string>;
1552
- }
1553
- /**
1554
- * Route handler function
1555
- */
1556
- export type RouteHandler = (request: Request) => Response | Promise<Response>;
1557
- /**
1558
- * Route middleware function
1559
- */
1560
- export type RouteMiddleware = (request: Request, next: () => Promise<Response>) => Response | Promise<Response>;
1561
- /**
1562
- * File router configuration
1563
- */
1564
- export interface FileRouterConfig {
1565
- /**
1566
- * Pages directory path
1567
- * @default 'pages'
1568
- */
1569
- pagesDir: string;
1570
- /**
1571
- * API routes directory (relative to pagesDir)
1572
- * @default 'api'
1573
- */
1574
- apiDir: string;
1575
- /**
1576
- * Root directory for file scanning
1577
- */
1578
- rootDir: string;
1579
- /**
1580
- * Supported file extensions
1581
- * @default ['.tsx', '.ts', '.jsx', '.js']
1582
- */
1583
- extensions: string[];
1584
- /**
1585
- * Enable file watching for hot reload
1586
- * @default false
1587
- */
1588
- watch: boolean;
1589
- /**
1590
- * Patterns to ignore during scanning
1591
- */
1592
- ignore: string[];
1593
- }
1594
- /**
1595
- * Partial file router configuration
1596
- */
1597
- export type PartialFileRouterConfig = Partial<FileRouterConfig>;
1598
- /**
1599
- * File route options
1600
- */
1601
- export interface FileRouteOptions {
1602
- /**
1603
- * Route middleware
1604
- */
1605
- middleware?: RouteMiddleware[];
1606
- /**
1607
- * Route metadata
1608
- */
1609
- meta?: Record<string, unknown>;
1610
- }
1611
- /**
1612
- * Layout definition from file
1613
- */
1614
- export interface LayoutDefinition {
1615
- /**
1616
- * Unique layout identifier
1617
- */
1618
- id: string;
1619
- /**
1620
- * File path to the layout module
1621
- */
1622
- filePath: string;
1623
- /**
1624
- * Layout segment (e.g., "/", "/users")
1625
- */
1626
- segment: string;
1627
- /**
1628
- * Depth in the layout tree
1629
- */
1630
- depth: number;
1631
- }
1632
- /**
1633
- * Layout tree node
1634
- */
1635
- export interface LayoutNode {
1636
- /**
1637
- * Layout definition
1638
- */
1639
- layout: LayoutDefinition;
1640
- /**
1641
- * Parent node
1642
- */
1643
- parent: LayoutNode | null;
1644
- /**
1645
- * Child nodes
1646
- */
1647
- children: LayoutNode[];
1648
- }
1649
- /**
1650
- * Layout tree structure
1651
- */
1652
- export type LayoutTree = LayoutNode;
1653
- /**
1654
- * Layout props passed to layout components
1655
- */
1656
- export interface LayoutProps {
1657
- /**
1658
- * Child content (nested layouts or page)
1659
- */
1660
- children: string;
1661
- /**
1662
- * Route parameters
1663
- */
1664
- params: Record<string, string>;
1665
- /**
1666
- * Query parameters
1667
- */
1668
- query: URLSearchParams;
1669
- /**
1670
- * Current pathname
1671
- */
1672
- pathname: string;
1673
- }
1674
- /**
1675
- * Layout renderer function
1676
- */
1677
- export type LayoutRenderer = (props: LayoutProps, context: SSRContext) => Promise<string | LayoutRenderResult> | string | LayoutRenderResult;
1678
- /**
1679
- * Layout middleware function
1680
- */
1681
- export type LayoutMiddleware = (props: LayoutProps, context: SSRContext, next: () => Promise<string>) => Promise<string> | string;
1682
- /**
1683
- * Layout configuration
1684
- */
1685
- export interface LayoutConfig {
1686
- /**
1687
- * Pages directory path
1688
- * @default 'pages'
1689
- */
1690
- pagesDir: string;
1691
- /**
1692
- * Root directory for file scanning
1693
- */
1694
- rootDir: string;
1695
- /**
1696
- * Supported file extensions
1697
- * @default ['.tsx', '.ts', '.jsx', '.js']
1698
- */
1699
- extensions: string[];
1700
- /**
1701
- * Preserve layout state on navigation
1702
- * @default true
1703
- */
1704
- preserveState: boolean;
1705
- }
1706
- /**
1707
- * Partial layout configuration
1708
- */
1709
- export type PartialLayoutConfig = Partial<LayoutConfig>;
1710
- /**
1711
- * Layout render result
1712
- */
1713
- export interface LayoutRenderResult {
1714
- /**
1715
- * Rendered HTML
1716
- */
1717
- html: string;
1718
- /**
1719
- * Head elements
1720
- */
1721
- head: SSRElement[];
1722
- /**
1723
- * Body elements
1724
- */
1725
- body: SSRElement[];
1726
- /**
1727
- * Layouts that were rendered
1728
- */
1729
- layouts: string[];
1730
- }
1731
- /**
1732
- * Layout segment information
1733
- */
1734
- export interface LayoutSegment {
1735
- /**
1736
- * Segment path
1737
- */
1738
- path: string;
1739
- /**
1740
- * Route parameters
1741
- */
1742
- params: Record<string, string>;
1743
- /**
1744
- * Layout component
1745
- */
1746
- component: LayoutRenderer | null;
1747
- }
1748
- /**
1749
- * HTTP methods supported by API routes
1750
- */
1751
- export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
1752
- /**
1753
- * API route definition
1754
- */
1755
- export interface APIRouteDefinition {
1756
- /**
1757
- * Unique route identifier
1758
- */
1759
- id: string;
1760
- /**
1761
- * Route path (e.g., /api/users/:id)
1762
- */
1763
- path: string;
1764
- /**
1765
- * File path to the route module
1766
- */
1767
- filePath: string;
1768
- /**
1769
- * Supported HTTP methods
1770
- */
1771
- methods: HTTPMethod[];
1772
- /**
1773
- * Parameter names extracted from path
1774
- */
1775
- params: string[];
1776
- /**
1777
- * Compiled regex for matching
1778
- */
1779
- regex: RegExp;
1780
- }
1781
- /**
1782
- * API route handler function
1783
- */
1784
- export type APIRouteHandler = (ctx: APIContext) => APIResponse | Promise<APIResponse>;
1785
- /**
1786
- * API response type
1787
- */
1788
- export type APIResponse = Response | string | Record<string, unknown> | null;
1789
- /**
1790
- * API middleware function
1791
- */
1792
- export type APIMiddleware = (ctx: APIContext, next: () => Promise<Response>) => Response | Promise<Response>;
1793
- /**
1794
- * API context passed to handlers
1795
- */
1796
- export interface APIContext {
1797
- /**
1798
- * Original request object
1799
- */
1800
- request: Request;
1801
- /**
1802
- * Request URL
1803
- */
1804
- url: string;
1805
- /**
1806
- * URL pathname
1807
- */
1808
- pathname: string;
1809
- /**
1810
- * Query parameters
1811
- */
1812
- query: URLSearchParams;
1813
- /**
1814
- * Route parameters
1815
- */
1816
- params: Record<string, string>;
1817
- /**
1818
- * Request body (parsed)
1819
- */
1820
- body: unknown;
1821
- /**
1822
- * Request headers
1823
- */
1824
- headers: Headers;
1825
- /**
1826
- * HTTP method
1827
- */
1828
- method: HTTPMethod;
1829
- /**
1830
- * Cookies
1831
- */
1832
- cookies: Record<string, string>;
1833
- }
1834
- /**
1835
- * API route module interface
1836
- */
1837
- export interface APIRouteModule {
1838
- /**
1839
- * GET handler
1840
- */
1841
- GET?: APIRouteHandler;
1842
- /**
1843
- * POST handler
1844
- */
1845
- POST?: APIRouteHandler;
1846
- /**
1847
- * PUT handler
1848
- */
1849
- PUT?: APIRouteHandler;
1850
- /**
1851
- * PATCH handler
1852
- */
1853
- PATCH?: APIRouteHandler;
1854
- /**
1855
- * DELETE handler
1856
- */
1857
- DELETE?: APIRouteHandler;
1858
- /**
1859
- * HEAD handler
1860
- */
1861
- HEAD?: APIRouteHandler;
1862
- /**
1863
- * OPTIONS handler
1864
- */
1865
- OPTIONS?: APIRouteHandler;
1866
- /**
1867
- * Default export (config or handler)
1868
- */
1869
- default?: APIRouteHandler | {
1870
- handler: APIRouteHandler;
1871
- config?: APIRouteConfig;
1872
- };
1873
- }
1874
- /**
1875
- * API route configuration
1876
- */
1877
- export interface APIRouteConfig {
1878
- /**
1879
- * API routes directory
1880
- * @default 'pages/api'
1881
- */
1882
- apiDir: string;
1883
- /**
1884
- * Root directory for file scanning
1885
- */
1886
- rootDir: string;
1887
- /**
1888
- * Supported file extensions
1889
- * @default ['.ts', '.js']
1890
- */
1891
- extensions: string[];
1892
- /**
1893
- * Maximum request body size in bytes
1894
- * @default 1048576 (1MB)
1895
- */
1896
- bodyLimit: number;
1897
- }
1898
- /**
1899
- * Partial API route configuration
1900
- */
1901
- export type PartialAPIRouteConfig = Partial<APIRouteConfig>;
1902
- //# sourceMappingURL=types.d.ts.map