@guren/server 2.15.0 → 2.17.0

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 (302) hide show
  1. package/dist/{DocsViewerServiceProvider-qFCaeiUv.js → DocsViewerServiceProvider-D2cuVgtN.js} +7 -12
  2. package/dist/{Hash-C8aejmi8.js → Hash-D2DFd8xX.js} +7 -57
  3. package/dist/{HttpException-BkS3euNG.js → HttpException-BlQ2yEmT.js} +2 -79
  4. package/dist/{Job-BVT813DO.js → Job-DxQK8h3P.js} +24 -179
  5. package/dist/{McpServiceProvider-BawsYjgN.js → McpServiceProvider-Zihx3Bjq.js} +35 -20
  6. package/dist/{Random-DbIJ22KQ.js → Random-S0OvCuR8.js} +9 -106
  7. package/dist/agent/AgentApprovalRequested.d.ts +11 -39
  8. package/dist/agent/approval-status.d.ts +56 -0
  9. package/dist/agent/approval.d.ts +76 -187
  10. package/dist/agent/audit-emitter.d.ts +16 -44
  11. package/dist/agent/audit.d.ts +20 -56
  12. package/dist/agent/derive.d.ts +32 -66
  13. package/dist/agent/dispatch.d.ts +38 -90
  14. package/dist/agent/events.d.ts +17 -23
  15. package/dist/agent/gate.d.ts +118 -0
  16. package/dist/agent/meta-tools.d.ts +18 -46
  17. package/dist/agent/pipeline.d.ts +234 -0
  18. package/dist/agent/public.d.ts +6 -25
  19. package/dist/agent/public.js +1 -1
  20. package/dist/agent/redact.d.ts +16 -38
  21. package/dist/agent/scopes.d.ts +55 -69
  22. package/dist/auth/AgentPrincipalGuard.d.ts +49 -0
  23. package/dist/auth/AuthManager.d.ts +22 -43
  24. package/dist/auth/AuthenticatableModel.d.ts +2 -2
  25. package/dist/auth/SessionGuard.d.ts +0 -1
  26. package/dist/auth/TokenGuard.d.ts +6 -26
  27. package/dist/auth/api-token.d.ts +16 -148
  28. package/dist/auth/context.d.ts +5 -10
  29. package/dist/auth/email-verification.d.ts +29 -127
  30. package/dist/auth/index.js +1 -1
  31. package/dist/auth/oauth/index.d.ts +35 -57
  32. package/dist/auth/password/DefaultHasher.d.ts +5 -14
  33. package/dist/auth/password/PasswordHasher.d.ts +5 -13
  34. package/dist/auth/password/hash-format.d.ts +5 -13
  35. package/dist/auth/password-reset.d.ts +16 -42
  36. package/dist/auth/providers/ModelUserProvider.d.ts +3 -4
  37. package/dist/auth/providers/UserProvider.d.ts +4 -4
  38. package/dist/auth/signed-token.d.ts +18 -0
  39. package/dist/auth/types.d.ts +9 -32
  40. package/dist/auth/utils.d.ts +6 -27
  41. package/dist/{auth-DkYoAPVn.js → auth-Gg54ppQi.js} +279 -519
  42. package/dist/authorization/Gate.d.ts +9 -145
  43. package/dist/authorization/Policy.d.ts +6 -53
  44. package/dist/authorization/index.js +1 -1
  45. package/dist/authorization/middleware.d.ts +16 -62
  46. package/dist/authorization/types.d.ts +8 -64
  47. package/dist/{authorization-CdfbCj8J.js → authorization-CdEWZZw3.js} +44 -309
  48. package/dist/broadcasting/BroadcastManager.d.ts +29 -149
  49. package/dist/broadcasting/channels/Channel.d.ts +1 -19
  50. package/dist/broadcasting/channels/PresenceChannel.d.ts +1 -55
  51. package/dist/broadcasting/channels/PrivateChannel.d.ts +1 -23
  52. package/dist/broadcasting/drivers/MemoryDriver.d.ts +18 -70
  53. package/dist/broadcasting/drivers/RedisDriver.d.ts +3 -80
  54. package/dist/broadcasting/drivers/index.d.ts +1 -1
  55. package/dist/broadcasting/index.d.ts +1 -1
  56. package/dist/broadcasting/index.js +1 -1
  57. package/dist/broadcasting/types.d.ts +7 -88
  58. package/dist/{broadcasting-BwodCA4q.js → broadcasting-B5RzB0A2.js} +87 -414
  59. package/dist/cache/CacheManager.d.ts +8 -62
  60. package/dist/cache/TaggedCache.d.ts +2 -35
  61. package/dist/cache/index.js +1 -1
  62. package/dist/cache/stores/FileStore.d.ts +2 -36
  63. package/dist/cache/stores/MemoryStore.d.ts +2 -26
  64. package/dist/cache/stores/RedisStore.d.ts +1 -29
  65. package/dist/cache/types.d.ts +21 -128
  66. package/dist/{cache-BYnZf2FR.js → cache-BOOIr324.js} +19 -198
  67. package/dist/client-C4TEr_Dd.js +9 -0
  68. package/dist/console/Command.d.ts +17 -126
  69. package/dist/console/ConsoleKernel.d.ts +2 -74
  70. package/dist/console/Input.d.ts +5 -113
  71. package/dist/console/Output.d.ts +3 -99
  72. package/dist/console/types.d.ts +3 -33
  73. package/dist/container/Container.d.ts +12 -103
  74. package/dist/container/ServiceProvider.d.ts +17 -61
  75. package/dist/container/bindings.d.ts +5 -26
  76. package/dist/container/defineModule.d.ts +16 -54
  77. package/dist/container/definePlugin.d.ts +12 -45
  78. package/dist/container/types.d.ts +2 -34
  79. package/dist/context-CXk_umpT.js +21 -0
  80. package/dist/database/Factory.d.ts +4 -57
  81. package/dist/database/Seeder.d.ts +8 -46
  82. package/dist/database/SeederRunner.d.ts +3 -33
  83. package/dist/database/types.d.ts +3 -24
  84. package/dist/discovery/AutoDiscovery.d.ts +10 -82
  85. package/dist/{dispatch-erOS9epZ.js → dispatch-BAwzftws.js} +32 -79
  86. package/dist/docs-viewer/DocsViewerServiceProvider.d.ts +2 -5
  87. package/dist/docs-viewer/endpoint.d.ts +5 -11
  88. package/dist/encryption/Encrypter.d.ts +5 -71
  89. package/dist/encryption/Hash.d.ts +7 -57
  90. package/dist/encryption/Random.d.ts +6 -99
  91. package/dist/encryption/index.js +3 -3
  92. package/dist/encryption/types.d.ts +10 -72
  93. package/dist/{encryption-D99Vmls3.js → encryption-uwP3Di4D.js} +9 -78
  94. package/dist/{endpoint-D6GIqOpe.js → endpoint-BXipU2Jj.js} +6 -12
  95. package/dist/endpoint-Dsw3Acvq.js +26 -0
  96. package/dist/errors/ExceptionHandler.d.ts +3 -90
  97. package/dist/errors/HttpException.d.ts +2 -79
  98. package/dist/errors/debug-page.d.ts +3 -17
  99. package/dist/errors/error-page.d.ts +1 -0
  100. package/dist/errors/exceptions/AuthenticationException.d.ts +2 -24
  101. package/dist/errors/exceptions/AuthorizationException.d.ts +1 -24
  102. package/dist/errors/exceptions/MethodNotAllowedException.d.ts +1 -23
  103. package/dist/errors/exceptions/NotFoundHttpException.d.ts +1 -27
  104. package/dist/errors/exceptions/ValidationException.d.ts +2 -43
  105. package/dist/errors/types.d.ts +1 -25
  106. package/dist/{errors-BgeOl_DC.js → errors-JpkcCjjn.js} +3 -41
  107. package/dist/events/Event.d.ts +1 -28
  108. package/dist/events/EventManager.d.ts +5 -107
  109. package/dist/events/Listener.d.ts +7 -55
  110. package/dist/events/builtin.d.ts +0 -24
  111. package/dist/events/index.js +1 -1
  112. package/dist/events/types.d.ts +4 -22
  113. package/dist/{events-aIH_bWRx.js → events-DOmAHDeP.js} +11 -191
  114. package/dist/facades/index.d.ts +2 -14
  115. package/dist/health/HealthCheck.d.ts +0 -24
  116. package/dist/health/HealthManager.d.ts +0 -36
  117. package/dist/health/checks/CacheCheck.d.ts +2 -17
  118. package/dist/health/checks/CustomCheck.d.ts +0 -9
  119. package/dist/health/checks/DatabaseCheck.d.ts +2 -17
  120. package/dist/health/checks/MemoryCheck.d.ts +3 -12
  121. package/dist/health/checks/RedisCheck.d.ts +1 -13
  122. package/dist/health/checks/StorageCheck.d.ts +2 -17
  123. package/dist/health/index.js +1 -1
  124. package/dist/health/types.d.ts +4 -24
  125. package/dist/{health-VWdWXRwh.js → health-DQSvUplL.js} +1 -76
  126. package/dist/hot-disposables-B5BXqaIH.js +167 -0
  127. package/dist/hot-reload/hot-disposables.d.ts +22 -74
  128. package/dist/hot-reload/testing.d.ts +4 -9
  129. package/dist/http/Application.d.ts +77 -205
  130. package/dist/http/FormRequest.d.ts +4 -55
  131. package/dist/http/dev-assets.d.ts +13 -31
  132. package/dist/http/dev-banner.d.ts +2 -5
  133. package/dist/http/inertia-assets.d.ts +3 -6
  134. package/dist/http/middleware/capabilities.d.ts +27 -50
  135. package/dist/http/middleware/cors.d.ts +4 -29
  136. package/dist/http/middleware/csp.d.ts +2 -25
  137. package/dist/http/middleware/csrf.d.ts +28 -95
  138. package/dist/http/middleware/detect-locale.d.ts +7 -27
  139. package/dist/http/middleware/force-https.d.ts +6 -24
  140. package/dist/http/middleware/host-authorization.d.ts +2 -12
  141. package/dist/http/middleware/index.d.ts +1 -1
  142. package/dist/http/middleware/loopback-guard.d.ts +15 -33
  143. package/dist/http/middleware/rate-limit.d.ts +29 -126
  144. package/dist/http/middleware/redirect-safety.d.ts +2 -20
  145. package/dist/http/middleware/request-id.d.ts +1 -14
  146. package/dist/http/middleware/request-logging.d.ts +2 -13
  147. package/dist/http/middleware/response-headers.d.ts +5 -13
  148. package/dist/http/middleware/security-headers.d.ts +2 -16
  149. package/dist/http/middleware/session.d.ts +15 -34
  150. package/dist/http/middleware/validation-errors-cookie.d.ts +7 -18
  151. package/dist/http/middleware/validation.d.ts +8 -63
  152. package/dist/http/public-assets.d.ts +11 -7
  153. package/dist/http/request.d.ts +32 -118
  154. package/dist/http/resources/CursorPaginator.d.ts +5 -64
  155. package/dist/http/resources/Paginator.d.ts +7 -84
  156. package/dist/http/resources/Resource.d.ts +9 -65
  157. package/dist/http/resources/ResourceCollection.d.ts +5 -39
  158. package/dist/http/resources/types.d.ts +10 -30
  159. package/dist/http/static-documents.d.ts +10 -20
  160. package/dist/http/validation/Validator.d.ts +25 -85
  161. package/dist/http/validation/rules.d.ts +48 -147
  162. package/dist/http/validation/types.d.ts +16 -61
  163. package/dist/http/vite-assets.d.ts +5 -28
  164. package/dist/http/vite-dev-server.d.ts +6 -9
  165. package/dist/http/vite-manifest.d.ts +19 -33
  166. package/dist/i18n/I18nManager.d.ts +12 -78
  167. package/dist/i18n/Translator.d.ts +3 -54
  168. package/dist/i18n/index.js +1 -1
  169. package/dist/i18n/loaders/JsonLoader.d.ts +4 -31
  170. package/dist/i18n/loaders/MemoryLoader.d.ts +1 -21
  171. package/dist/i18n/pluralization.d.ts +4 -13
  172. package/dist/i18n/types.d.ts +17 -69
  173. package/dist/{i18n-mcWi7LCd.js → i18n-Cg1aajRP.js} +31 -225
  174. package/dist/index.d.ts +11 -4
  175. package/dist/index.js +1186 -3040
  176. package/dist/internal/agent-preflight.d.ts +9 -21
  177. package/dist/internal/agent-principal.d.ts +32 -0
  178. package/dist/internal/request.d.ts +6 -19
  179. package/dist/internal/request.js +1 -1
  180. package/dist/internal/route-path.d.ts +9 -21
  181. package/dist/internal/route-path.js +9 -21
  182. package/dist/internal/zod-compat.d.ts +55 -122
  183. package/dist/internal/zod-compat.js +39 -70
  184. package/dist/internal/zod-json-schema.d.ts +18 -54
  185. package/dist/internal/zod-json-schema.js +46 -123
  186. package/dist/jsx-runtime.d.ts +3 -8
  187. package/dist/lambda/index.d.ts +17 -79
  188. package/dist/lambda/index.js +11 -59
  189. package/dist/logging/LogManager.d.ts +1 -51
  190. package/dist/logging/Logger.d.ts +8 -47
  191. package/dist/logging/channels/ConsoleChannel.d.ts +1 -3
  192. package/dist/logging/channels/DailyFileChannel.d.ts +1 -3
  193. package/dist/logging/channels/FileChannel.d.ts +1 -3
  194. package/dist/logging/daily-file-path.d.ts +7 -16
  195. package/dist/logging/index.js +1 -1
  196. package/dist/logging/types.d.ts +13 -45
  197. package/dist/{logging-B-kngi3q.js → logging-zOY1XCtq.js} +52 -141
  198. package/dist/{loopback-guard-D0Kc7-xc.js → loopback-guard-DT9gHF0F.js} +41 -92
  199. package/dist/mail/Mail.d.ts +10 -106
  200. package/dist/mail/MailManager.d.ts +2 -60
  201. package/dist/mail/index.js +1 -1
  202. package/dist/mail/transports/LogTransport.d.ts +1 -4
  203. package/dist/mail/transports/MemoryTransport.d.ts +1 -63
  204. package/dist/mail/transports/ResendTransport.d.ts +1 -23
  205. package/dist/mail/transports/SmtpTransport.d.ts +1 -31
  206. package/dist/mail/types.d.ts +28 -150
  207. package/dist/{mail-DfEfSQEr.js → mail-76DWy9lj.js} +31 -289
  208. package/dist/mcp/McpServiceProvider.d.ts +4 -10
  209. package/dist/mcp/create-mcp-server.d.ts +42 -57
  210. package/dist/mcp/endpoint.d.ts +12 -36
  211. package/dist/mcp/index.js +1 -1
  212. package/dist/mvc/Controller.d.ts +46 -227
  213. package/dist/mvc/Router.d.ts +50 -129
  214. package/dist/mvc/inertia/InertiaEngine.d.ts +18 -48
  215. package/dist/mvc/inertia/shared.d.ts +6 -19
  216. package/dist/mvc/mount-route.d.ts +2 -6
  217. package/dist/mvc/view.d.ts +1 -2
  218. package/dist/notifications/Notification.d.ts +8 -75
  219. package/dist/notifications/NotificationManager.d.ts +15 -88
  220. package/dist/notifications/channels/DatabaseChannel.d.ts +1 -41
  221. package/dist/notifications/channels/MailChannel.d.ts +2 -31
  222. package/dist/notifications/channels/MemoryChannel.d.ts +2 -62
  223. package/dist/notifications/channels/SlackChannel.d.ts +3 -48
  224. package/dist/notifications/index.js +1 -1
  225. package/dist/notifications/notifiable-type.d.ts +3 -6
  226. package/dist/notifications/registry.d.ts +8 -27
  227. package/dist/notifications/types.d.ts +16 -53
  228. package/dist/{notifications-BGqmUNZ8.js → notifications-okWFs9ly.js} +37 -335
  229. package/dist/providers/AuthServiceProvider.d.ts +1 -3
  230. package/dist/providers/AuthorizationServiceProvider.d.ts +2 -3
  231. package/dist/providers/BroadcastServiceProvider.d.ts +1 -3
  232. package/dist/providers/CacheServiceProvider.d.ts +1 -3
  233. package/dist/providers/EncryptionServiceProvider.d.ts +1 -3
  234. package/dist/providers/ErrorServiceProvider.d.ts +1 -4
  235. package/dist/providers/EventServiceProvider.d.ts +1 -3
  236. package/dist/providers/HealthServiceProvider.d.ts +1 -3
  237. package/dist/providers/I18nServiceProvider.d.ts +6 -10
  238. package/dist/providers/InertiaServiceProvider.d.ts +1 -4
  239. package/dist/providers/LogServiceProvider.d.ts +1 -3
  240. package/dist/providers/MailServiceProvider.d.ts +1 -3
  241. package/dist/providers/NotificationServiceProvider.d.ts +1 -3
  242. package/dist/providers/OAuthServiceProvider.d.ts +1 -3
  243. package/dist/providers/QueueServiceProvider.d.ts +1 -3
  244. package/dist/providers/SchedulingServiceProvider.d.ts +1 -3
  245. package/dist/providers/StorageServiceProvider.d.ts +1 -3
  246. package/dist/queue/FailedJobReporter.d.ts +1 -24
  247. package/dist/queue/Job.d.ts +12 -99
  248. package/dist/queue/QueueManager.d.ts +6 -57
  249. package/dist/queue/Worker.d.ts +4 -65
  250. package/dist/queue/drivers/MemoryDriver.d.ts +3 -44
  251. package/dist/queue/drivers/RedisDriver.d.ts +7 -65
  252. package/dist/queue/drivers/SqsDriver.d.ts +6 -57
  253. package/dist/queue/drivers/SyncDriver.d.ts +10 -13
  254. package/dist/queue/index.js +2 -2
  255. package/dist/queue/types.d.ts +10 -92
  256. package/dist/{queue-CXrRK85G.js → queue-CcXCjuJI.js} +32 -260
  257. package/dist/redis/RedisApiTokenStore.d.ts +4 -56
  258. package/dist/redis/RedisEmailVerificationStore.d.ts +4 -37
  259. package/dist/redis/RedisOAuthStateStore.d.ts +2 -10
  260. package/dist/redis/RedisPasswordResetStore.d.ts +4 -37
  261. package/dist/redis/RedisRateLimitStore.d.ts +16 -49
  262. package/dist/redis/RedisSessionStore.d.ts +3 -44
  263. package/dist/redis/client.d.ts +2 -32
  264. package/dist/redis/index.js +47 -232
  265. package/dist/redis/redis-values.d.ts +6 -12
  266. package/dist/redis/scan-keys.d.ts +1 -4
  267. package/dist/request-CLOYytGP.js +68 -0
  268. package/dist/runtime/index.d.ts +2 -0
  269. package/dist/runtime/index.js +50 -92
  270. package/dist/scheduling/CronParser.d.ts +0 -29
  271. package/dist/scheduling/Schedule.d.ts +1 -153
  272. package/dist/scheduling/ScheduledTask.d.ts +0 -31
  273. package/dist/scheduling/Scheduler.d.ts +0 -70
  274. package/dist/scheduling/index.js +1 -1
  275. package/dist/scheduling/types.d.ts +4 -65
  276. package/dist/{scheduling-CPiEdtQd.js → scheduling-C6tcOtUl.js} +2 -287
  277. package/dist/storage/StorageManager.d.ts +0 -48
  278. package/dist/storage/drivers/LocalDriver.d.ts +1 -25
  279. package/dist/storage/drivers/MemoryDriver.d.ts +5 -35
  280. package/dist/storage/drivers/S3Driver.d.ts +6 -36
  281. package/dist/storage/drivers/s3-acl.d.ts +5 -10
  282. package/dist/storage/index.js +1 -1
  283. package/dist/storage/types.d.ts +27 -265
  284. package/dist/{storage-TLD9t0Q2.js → storage-BB59f07j.js} +17 -157
  285. package/dist/support/contained-path.d.ts +10 -20
  286. package/dist/support/error-polyfill.d.ts +4 -6
  287. package/dist/support/expiry.d.ts +17 -33
  288. package/dist/support/expiry.js +17 -33
  289. package/dist/support/import-map.d.ts +3 -7
  290. package/dist/support/inertia-defaults.d.ts +5 -10
  291. package/dist/support/redirect-target.d.ts +4 -6
  292. package/dist/support/stack-frames.d.ts +11 -50
  293. package/dist/support/trim-slashes.d.ts +4 -7
  294. package/dist/support/warn-once.d.ts +2 -6
  295. package/dist/{trim-slashes-ZJ_VsY5s.js → trim-slashes-BLY9hKAa.js} +4 -7
  296. package/dist/{vite-manifest-w_RSOvQW.js → vite-manifest-B_Iy5183.js} +34 -58
  297. package/package.json +2 -2
  298. package/dist/client-Dd7vLcqp.js +0 -27
  299. package/dist/context-DoD0c7J_.js +0 -26
  300. package/dist/endpoint-D-20PiHY.js +0 -46
  301. package/dist/hot-disposables-WsTX2ySN.js +0 -281
  302. package/dist/request-CVQwpu2J.js +0 -129
@@ -13,38 +13,15 @@ export interface ViteAssetOptions {
13
13
  /** @internal Test seam — clears the memoized manifest reads. */
14
14
  export declare function __resetViteAssetCache(): void;
15
15
  /**
16
- * Resolve the public URL of a Vite build input, for server-rendered content
17
- * pages (RFC 0014). The URL is environment-dependent and this helper owns
18
- * both branches:
19
- *
20
- * - **Development** (a dev server is configured, or `NODE_ENV` is not
21
- * `production`): the Vite dev server serves the source path directly, so
22
- * this returns `${devServerUrl}/${entry}`.
23
- * - **Production**: the entry is looked up in the Vite build manifest and the
24
- * hashed output file is returned under the `/public/assets/` route that
25
- * `configureInertiaAssets` serves with immutable caching.
26
- *
27
- * Fails loudly: an unresolvable manifest or an entry the manifest does not
28
- * record throws with the paths tried and the likely fix — never a silent
29
- * empty string.
16
+ * Public URL of a Vite build input for server-rendered content pages (RFC 0014):
17
+ * the dev server URL in development, the hashed `/public/assets/` manifest entry
18
+ * in production, where a build-time `GUREN_VITE_MANIFEST` wins over the filesystem
19
+ * (serverless) unless `manifestPaths` names files. Throws with the paths tried. A
20
+ * CSS file bundled *through* a JS entry has no manifest key — list it in `build.rollupOptions.input`.
30
21
  *
31
22
  * @example
32
23
  * ```tsx
33
24
  * <link rel="stylesheet" href={viteAsset('resources/css/app.css')} />
34
25
  * ```
35
- *
36
- * Note a CSS file bundled *through* a JS entry (imported from `app.tsx`) has
37
- * no manifest key of its own — declare it as an explicit build input in
38
- * `vite.config.ts` (`build.rollupOptions.input`) so Vite emits and records
39
- * it.
40
- *
41
- * **Serverless targets:** production resolution prefers a build-time
42
- * injected manifest over the filesystem — when `GUREN_VITE_MANIFEST` holds
43
- * the client manifest JSON, entries resolve from it and no file is read. The
44
- * deploy plugins (`@guren/plugin-cloudflare`, `@guren/plugin-vercel`,
45
- * `@guren/plugin-lambda`) populate it during their build step, so `view()`
46
- * pages work on targets whose runtime never sees
47
- * `public/assets/manifest.json`. An explicit `manifestPaths` still reads the
48
- * named files — a caller stating paths is asking for exactly those.
49
26
  */
50
27
  export declare function viteAsset(entry: string, options?: ViteAssetOptions): string;
@@ -3,10 +3,9 @@ export interface StartViteDevServerOptions {
3
3
  root?: string;
4
4
  config?: InlineConfig;
5
5
  /**
6
- * What the dev server binds to. Left unset it follows Vite's own
7
- * localhost-only default, which is the safe choice: the dev server serves
8
- * every file under the project root, including the default SQLite database,
9
- * with no authentication. Pass `true` to expose it on the network.
6
+ * What the dev server binds to. Unset it follows Vite's localhost-only
7
+ * default, which is the safe choice: the dev server serves every file under
8
+ * the project root, unauthenticated. Pass `true` to expose it on the network.
10
9
  */
11
10
  host?: boolean | string;
12
11
  port?: number;
@@ -17,11 +16,9 @@ export interface StartedViteDevServer {
17
16
  networkUrls: string[];
18
17
  }
19
18
  /**
20
- * Build the inline config the managed dev server starts with.
21
- *
22
- * `server.host` is only set when the caller asked for one. Left undefined it
23
- * is dropped during Vite's config merge, so the project's own `vite.config.ts`
24
- * decides, falling back to Vite's localhost-only default.
19
+ * Build the inline config the managed dev server starts with. `server.host` is
20
+ * left undefined unless asked for, so Vite's config merge drops it and the
21
+ * project's own `vite.config.ts` decides.
25
22
  */
26
23
  export declare function resolveViteDevServerConfig(options?: StartViteDevServerOptions): InlineConfig;
27
24
  export declare function startViteDevServer(options?: StartViteDevServerOptions): Promise<StartedViteDevServer>;
@@ -1,11 +1,9 @@
1
1
  /**
2
- * The one rule for how Vite build output is found and addressed, shared
3
- * between the Inertia asset wiring (`inertia-assets.ts`) and the content-page
4
- * `viteAsset()` helper (`vite-assets.ts`, RFC 0014): what counts as a
5
- * manifest, where one may live (a filesystem path, or the build-time
6
- * `GUREN_VITE_MANIFEST` injection for runtimes without one), which URL prefix
7
- * serves the hashed files, and what "the dev server is on" means. Factored
8
- * out so the two consumers cannot drift on any of it.
2
+ * The one rule for how Vite build output is found and addressed, shared by the
3
+ * Inertia asset wiring (`inertia-assets.ts`) and `viteAsset()` (`vite-assets.ts`,
4
+ * RFC 0014) so the two cannot drift: what counts as a manifest, where one may
5
+ * live, which URL prefix serves the hashed files, and what "the dev server is
6
+ * on" means.
9
7
  */
10
8
  /** Where `configureInertiaAssets` serves hashed build output from. */
11
9
  export declare const PUBLIC_ASSETS_URL_PREFIX = "/public/assets/";
@@ -19,34 +17,24 @@ export declare const DEFAULT_DEV_SERVER_URL = "http://localhost:5173";
19
17
  export declare function isViteProduction(devServerUrl?: string | undefined): boolean;
20
18
  export declare function normalizeDevServerUrl(value: string): string;
21
19
  /**
22
- * Candidate client-manifest locations under a project root, in preference
23
- * order: `.vite/manifest.json` first, because Vite >= 5 writes it there — a
24
- * flat `manifest.json` beside it is most likely a stale leftover from an
25
- * older Vite config. The deploy plugins locate the same pair through
26
- * `@guren/core`'s deploy-build helpers, and the two orders must agree, or an
27
- * app with both layouts resolves different asset versions locally than after
28
- * a serverless deploy; `tests/http/vite-manifest.test.ts` pins the agreement.
29
- *
30
- * `baseDir` defaults to the working directory (`viteAsset()`'s anchor); the
31
- * Inertia wiring passes the root it derives from the app entry module.
20
+ * Candidate client-manifest locations, `.vite/manifest.json` first: Vite >= 5
21
+ * writes it there, so a flat `manifest.json` is likely a stale leftover. The
22
+ * deploy plugins order the same pair through `@guren/core`'s deploy-build
23
+ * helpers and must agree, or an app with both layouts resolves different asset
24
+ * versions after a serverless deploy; `tests/http/vite-manifest.test.ts` pins it.
32
25
  */
33
26
  export declare function clientManifestCandidates(baseDir?: string): string[];
34
27
  /**
35
- * `__path__` label for a manifest injected through {@link injectedClientManifest},
36
- * so "entry not in the manifest" errors name the real source instead of a
37
- * filesystem path that was never read.
28
+ * `__path__` label for an injected manifest, so "entry not in the manifest"
29
+ * errors name the real source rather than a path that was never read.
38
30
  */
39
31
  export declare const INJECTED_CLIENT_MANIFEST_SOURCE = "GUREN_VITE_MANIFEST (injected by the deploy build)";
40
32
  /**
41
33
  * The client manifest a deploy build injected for runtimes that do not ship
42
- * `public/assets/manifest.json`: `GUREN_VITE_MANIFEST` holds the manifest
43
- * *JSON text* (not a path). The deploy plugins populate it during their build
44
- * step — Workers and Lambda as an assignment in their generated entry module,
45
- * Vercel by substituting the read at bundle time.
46
- *
47
- * Fails loudly on a value that is set but not a manifest: falling through to
48
- * the filesystem would end in "run `bunx vite build`", a diagnosis pointing
49
- * away from the variable that is actually broken.
34
+ * `public/assets/manifest.json`: `GUREN_VITE_MANIFEST` holds the manifest *JSON
35
+ * text*, not a path. Fails loudly on a value that is set but not a manifest,
36
+ * because falling through to the filesystem would end in "run `bunx vite build`"
37
+ * — a diagnosis pointing away from the variable that is actually broken.
50
38
  */
51
39
  export declare function injectedClientManifest(): ViteManifest | undefined;
52
40
  export type ViteManifestEntryObject = {
@@ -64,14 +52,12 @@ export type ViteManifest = Record<string, ViteManifestValue> & {
64
52
  export interface LoadViteManifestOptions {
65
53
  /**
66
54
  * Emit console warnings when no manifest is found (the Inertia wiring's
67
- * behavior). `viteAsset()` passes `false` and throws its own error instead
68
- * — a warning can scroll past, a missing stylesheet URL cannot.
55
+ * behavior). `viteAsset()` passes `false` and throws instead.
69
56
  */
70
57
  warnOnMissing?: boolean;
71
58
  /**
72
- * Retain the raw manifest text as `__raw__` on the result. Off by default:
73
- * only the Inertia wiring hashes it (for the build id), and long-lived
74
- * caches should not pin hundreds of KB of JSON text nothing reads.
59
+ * Retain the raw manifest text as `__raw__`. Off by default: only the Inertia
60
+ * wiring hashes it, and caches should not pin JSON text nothing reads.
75
61
  */
76
62
  includeRaw?: boolean;
77
63
  }
@@ -1,114 +1,48 @@
1
1
  import type { TranslationMessages, TranslationLoader, I18nConfig, ReplacementValues } from './types.js';
2
2
  import { Translator } from './Translator.js';
3
- /**
4
- * I18n manager for handling multiple locales and translators.
5
- */
6
3
  export declare class I18nManager {
7
4
  private config;
8
5
  private translator;
9
6
  private loader;
10
7
  private loadedLocales;
11
8
  constructor(config: I18nConfig);
12
- /**
13
- * Translate a key.
14
- */
15
9
  t(key: string, replacements?: ReplacementValues): string;
16
- /**
17
- * Translate a key with count for pluralization.
18
- */
10
+ /** Translate a key with count for pluralization. */
19
11
  tc(key: string, count: number, replacements?: ReplacementValues): string;
20
- /**
21
- * Check if a translation exists.
22
- */
23
12
  has(key: string, locale?: string): boolean;
24
- /**
25
- * Get the current locale.
26
- */
27
13
  getLocale(): string;
28
- /**
29
- * Set the current locale.
30
- */
31
14
  setLocale(locale: string): void;
32
- /**
33
- * Get the fallback locale.
34
- */
35
15
  getFallbackLocale(): string | undefined;
36
- /**
37
- * Set the fallback locale.
38
- */
39
16
  setFallbackLocale(locale: string | undefined): void;
40
- /**
41
- * Load translations for a locale.
42
- */
43
17
  loadLocale(locale: string): Promise<void>;
44
- /**
45
- * Load translations for multiple locales.
46
- */
47
18
  loadLocales(locales: string[]): Promise<void>;
48
- /**
49
- * Load a specific namespace for a locale.
50
- */
19
+ /** Load a specific namespace for a locale. */
51
20
  loadNamespace(locale: string, namespace: string): Promise<void>;
52
- /**
53
- * Add messages for a locale.
54
- */
55
21
  addMessages(locale: string, messages: TranslationMessages): void;
56
- /**
57
- * Get all messages for a locale.
58
- */
59
22
  getMessages(locale?: string): TranslationMessages;
60
- /**
61
- * Get available locales.
62
- */
63
23
  getAvailableLocales(): string[];
64
- /**
65
- * Get available locales from loader.
66
- */
24
+ /** Get available locales from loader. */
67
25
  getLoaderLocales(): Promise<string[]>;
68
- /**
69
- * Check if a locale is loaded.
70
- */
71
26
  isLocaleLoaded(locale: string): boolean;
72
- /**
73
- * Get the underlying translator.
74
- */
75
27
  getTranslator(): Translator;
76
- /**
77
- * Set a custom loader.
78
- */
79
28
  setLoader(loader: TranslationLoader): void;
80
- /**
81
- * Create a scoped translator for a specific locale.
82
- */
29
+ /** Create a scoped translator for a specific locale. */
83
30
  forLocale(locale: string): Translator;
84
31
  /**
85
- * The message catalogs that accompany a locale: the fallback locale's
86
- * (when it differs) plus the locale's own, in that order — so consumers
87
- * that flatten the record let the active locale win on key collisions.
32
+ * The fallback locale's catalog (when it differs) then the locale's own, so a
33
+ * consumer flattening the record lets the active locale win on collisions.
88
34
  */
89
35
  messagesForLocale(locale: string): Record<string, TranslationMessages>;
90
36
  }
91
- /**
92
- * Create a new I18n manager.
93
- */
37
+ /** Create a new I18n manager. */
94
38
  export declare function createI18n(config: I18nConfig): I18nManager;
95
- /**
96
- * Set the global I18n manager.
97
- */
39
+ /** Set the global I18n manager. */
98
40
  export declare function setI18n(i18n: I18nManager): void;
99
- /**
100
- * Get the global I18n manager.
101
- */
41
+ /** Get the global I18n manager. */
102
42
  export declare function getI18n(): I18nManager;
103
- /**
104
- * Get the global I18n manager, or `undefined` when none was registered.
105
- */
43
+ /** Get the global I18n manager, or `undefined` when none was registered. */
106
44
  export declare function tryGetI18n(): I18nManager | undefined;
107
- /**
108
- * Translate a key using the global I18n manager.
109
- */
45
+ /** Translate a key using the global I18n manager. */
110
46
  export declare function t(key: string, replacements?: ReplacementValues): string;
111
- /**
112
- * Translate a key with count using the global I18n manager.
113
- */
47
+ /** Translate a key with count using the global I18n manager. */
114
48
  export declare function tc(key: string, count: number, replacements?: ReplacementValues): string;
@@ -1,7 +1,4 @@
1
1
  import type { TranslationMessages, ReplacementValues, TranslatorOptions, PluralizationRule } from './types.js';
2
- /**
3
- * Translator class for handling translations.
4
- */
5
2
  export declare class Translator {
6
3
  private locale;
7
4
  private fallbackLocale;
@@ -9,72 +6,24 @@ export declare class Translator {
9
6
  private pluralizationRules;
10
7
  private onMissingKey?;
11
8
  constructor(options: TranslatorOptions);
12
- /**
13
- * Translate a key.
14
- */
15
9
  t(key: string, replacements?: ReplacementValues): string;
16
- /**
17
- * Translate a key with count for pluralization.
18
- */
10
+ /** Translate a key with count for pluralization. */
19
11
  tc(key: string, count: number, replacements?: ReplacementValues): string;
20
- /**
21
- * Check if a translation exists.
22
- */
23
12
  has(key: string, locale?: string): boolean;
24
- /**
25
- * Get the current locale.
26
- */
27
13
  getLocale(): string;
28
- /**
29
- * Set the current locale.
30
- */
31
14
  setLocale(locale: string): void;
32
- /**
33
- * Get the fallback locale.
34
- */
35
15
  getFallbackLocale(): string | undefined;
36
- /**
37
- * Set the fallback locale.
38
- */
39
16
  setFallbackLocale(locale: string | undefined): void;
40
- /**
41
- * Add messages for a locale.
42
- */
43
17
  addMessages(locale: string, messages: TranslationMessages): void;
44
- /**
45
- * Set messages for a locale (replaces existing).
46
- */
18
+ /** Set messages for a locale (replaces existing). */
47
19
  setMessages(locale: string, messages: TranslationMessages): void;
48
- /**
49
- * Get all messages for a locale.
50
- */
51
20
  getMessages(locale?: string): TranslationMessages;
52
- /**
53
- * Get available locales.
54
- */
55
21
  getAvailableLocales(): string[];
56
- /**
57
- * Set a custom pluralization rule.
58
- */
59
22
  setPluralizationRule(locale: string, rule: PluralizationRule): void;
60
- /**
61
- * Internal translate method.
62
- */
63
23
  private translate;
64
- /**
65
- * Get raw translation without replacements.
66
- */
24
+ /** Get raw translation without replacements. */
67
25
  private getRawTranslation;
68
- /**
69
- * Apply replacements to a translation string.
70
- */
71
26
  private applyReplacements;
72
- /**
73
- * Handle missing translation key.
74
- */
75
27
  private handleMissingKey;
76
- /**
77
- * Deep merge messages.
78
- */
79
28
  private mergeMessages;
80
29
  }
@@ -1,2 +1,2 @@
1
- import { a as setI18n, c as tryGetI18n, d as getPluralizationRule, f as pluralizationRules, i as getI18n, l as JsonLoader, n as I18nManager, o as t, p as selectPluralForm, r as createI18n, s as tc, t as MemoryLoader, u as Translator } from "../i18n-mcWi7LCd.js";
1
+ import { a as setI18n, c as tryGetI18n, d as getPluralizationRule, f as pluralizationRules, i as getI18n, l as JsonLoader, n as I18nManager, o as t, p as selectPluralForm, r as createI18n, s as tc, t as MemoryLoader, u as Translator } from "../i18n-Cg1aajRP.js";
2
2
  export { I18nManager, JsonLoader, MemoryLoader, Translator, createI18n, getI18n, getPluralizationRule, pluralizationRules, selectPluralForm, setI18n, t, tc, tryGetI18n };
@@ -1,21 +1,9 @@
1
1
  import type { TranslationLoader, TranslationMessages } from '../types.js';
2
2
  /**
3
- * JSON file-based translation loader.
4
- *
5
- * Expected directory structure:
6
- * path/
7
- * en/
8
- * messages.json
9
- * validation.json
10
- * ja/
11
- * messages.json
12
- * validation.json
13
- *
14
- * This layout (locale subdirectories, namespace = file name) is a contract
15
- * shared with the CLI: `guren codegen` (packages/cli/src/i18n-types.ts) and
16
- * `guren check --i18n` (packages/cli/src/i18n-check.ts) re-implement the
17
- * same walk statically. Changing the layout or parse tolerance here strands
18
- * them on the old contract — update both together.
3
+ * JSON file-based translation loader: `<path>/<locale>/<namespace>.json`.
4
+ * That layout is a contract shared with the CLI — `guren codegen` and
5
+ * `guren check --i18n` re-implement the same walk statically, so a change to
6
+ * the layout or the parse tolerance has to be made in all three.
19
7
  */
20
8
  export declare class JsonLoader implements TranslationLoader {
21
9
  private basePath;
@@ -24,24 +12,9 @@ export declare class JsonLoader implements TranslationLoader {
24
12
  constructor(basePath: string, options?: {
25
13
  cache?: boolean;
26
14
  });
27
- /**
28
- * Load all translations for a locale.
29
- */
30
15
  load(locale: string): Promise<TranslationMessages>;
31
- /**
32
- * Load translations for a specific namespace.
33
- */
34
16
  loadNamespace(locale: string, namespace: string): Promise<TranslationMessages>;
35
- /**
36
- * Get available locales.
37
- */
38
17
  getAvailableLocales(): Promise<string[]>;
39
- /**
40
- * Clear the cache.
41
- */
42
18
  clearCache(): void;
43
- /**
44
- * Enable or disable caching.
45
- */
46
19
  setCaching(enabled: boolean): void;
47
20
  }
@@ -6,32 +6,12 @@ import type { TranslationLoader, TranslationMessages } from '../types.js';
6
6
  export declare class MemoryLoader implements TranslationLoader {
7
7
  private messages;
8
8
  constructor(messages?: Record<string, TranslationMessages>);
9
- /**
10
- * Load all translations for a locale.
11
- */
12
9
  load(locale: string): Promise<TranslationMessages>;
13
- /**
14
- * Load translations for a specific namespace.
15
- */
16
10
  loadNamespace(locale: string, namespace: string): Promise<TranslationMessages>;
17
- /**
18
- * Get available locales.
19
- */
20
11
  getAvailableLocales(): Promise<string[]>;
21
- /**
22
- * Add messages for a locale.
23
- */
24
12
  addMessages(locale: string, messages: TranslationMessages): void;
25
- /**
26
- * Set messages for a locale (replaces existing).
27
- */
13
+ /** Set messages for a locale (replaces existing). */
28
14
  setMessages(locale: string, messages: TranslationMessages): void;
29
- /**
30
- * Remove messages for a locale.
31
- */
32
15
  removeLocale(locale: string): void;
33
- /**
34
- * Clear all messages.
35
- */
36
16
  clear(): void;
37
17
  }
@@ -1,19 +1,10 @@
1
1
  import type { PluralizationRule } from './types.js';
2
2
  /**
3
- * Default pluralization rules for common languages.
4
- *
5
- * Returns the index of the plural form to use.
6
- * Most languages use: 0 = one, 1 = other
7
- * Some languages have more complex rules.
3
+ * Default pluralization rules per language, each returning the index of the
4
+ * plural form to use.
8
5
  */
9
6
  export declare const pluralizationRules: Record<string, PluralizationRule>;
10
- /**
11
- * Get pluralization rule for a locale.
12
- */
7
+ /** Falls back to the language code, then to English. */
13
8
  export declare function getPluralizationRule(locale: string): PluralizationRule;
14
- /**
15
- * Select the appropriate plural form from a translation.
16
- *
17
- * Translation format: "singular|plural" or "one|few|many"
18
- */
9
+ /** Translation format: `"singular|plural"` or `"one|few|many"`. */
19
10
  export declare function selectPluralForm(translation: string, count: number, rule: PluralizationRule): string;
@@ -1,15 +1,11 @@
1
- /**
2
- * Translation messages type - nested object structure.
3
- */
1
+ /** Translation messages type - nested object structure. */
4
2
  export type TranslationMessages = {
5
3
  [key: string]: string | TranslationMessages;
6
4
  };
7
5
  /**
8
- * Registry for the app's generated translation keys. `guren codegen` emits
9
- * `.guren/translations.gen.ts`, which augments this interface (declaration
10
- * merging) with a `keys` union derived from `lang/<locale>/*.json`. Apps
11
- * without the generated file leave it empty and translation helpers accept
12
- * any string.
6
+ * Registry for the app's generated translation keys: `guren codegen` emits
7
+ * `.guren/translations.gen.ts`, which merges a `keys` union into this interface.
8
+ * Left empty, translation helpers accept any string.
13
9
  */
14
10
  export interface GurenTranslationKeys {
15
11
  }
@@ -20,87 +16,39 @@ export interface GurenTranslationKeys {
20
16
  export type RegisteredTranslationKey = GurenTranslationKeys extends {
21
17
  keys: infer K extends string;
22
18
  } ? K : string;
23
- /**
24
- * Replacement values for interpolation.
25
- */
19
+ /** Replacement values for interpolation. */
26
20
  export type ReplacementValues = Record<string, string | number>;
27
- /**
28
- * Pluralization rule function.
29
- */
21
+ /** Pluralization rule function. */
30
22
  export type PluralizationRule = (count: number) => number;
31
- /**
32
- * Translation loader interface.
33
- */
23
+ /** Translation loader interface. */
34
24
  export interface TranslationLoader {
35
- /**
36
- * Load translations for a locale.
37
- */
38
25
  load(locale: string): Promise<TranslationMessages>;
39
- /**
40
- * Load translations for a specific namespace.
41
- */
42
26
  loadNamespace?(locale: string, namespace: string): Promise<TranslationMessages>;
43
- /**
44
- * Get available locales.
45
- */
46
27
  getAvailableLocales?(): Promise<string[]>;
47
28
  }
48
- /**
49
- * Translator options.
50
- */
29
+ /** Translator options. */
51
30
  export interface TranslatorOptions {
52
- /**
53
- * Default locale.
54
- */
55
31
  locale: string;
56
- /**
57
- * Fallback locale when translation is missing.
58
- */
32
+ /** Fallback locale when translation is missing. */
59
33
  fallbackLocale?: string;
60
- /**
61
- * Translation loader.
62
- */
34
+ /** Translation loader. */
63
35
  loader?: TranslationLoader;
64
- /**
65
- * Preloaded messages.
66
- */
67
36
  messages?: Record<string, TranslationMessages>;
68
- /**
69
- * Custom pluralization rules per locale.
70
- */
37
+ /** Custom pluralization rules per locale. */
71
38
  pluralizationRules?: Record<string, PluralizationRule>;
72
- /**
73
- * Missing key handler.
74
- */
39
+ /** Missing key handler. */
75
40
  onMissingKey?: (key: string, locale: string) => string | undefined;
76
41
  }
77
- /**
78
- * I18n manager configuration.
79
- */
42
+ /** I18n manager configuration. */
80
43
  export interface I18nConfig {
81
- /**
82
- * Default locale.
83
- */
84
44
  locale: string;
85
- /**
86
- * Fallback locale.
87
- */
45
+ /** Fallback locale. */
88
46
  fallbackLocale?: string;
89
- /**
90
- * Path to translation files (constructs a JsonLoader internally).
91
- */
47
+ /** Path to translation files (constructs a JsonLoader internally). */
92
48
  path?: string;
93
- /**
94
- * Custom translation loader (e.g. JsonLoader, MemoryLoader).
95
- * Takes precedence over `path`.
96
- */
49
+ /** Takes precedence over `path`. */
97
50
  loader?: TranslationLoader;
98
- /**
99
- * Preloaded messages.
100
- */
101
51
  messages?: Record<string, TranslationMessages>;
102
52
  }
103
- /**
104
- * Translation loader factory.
105
- */
53
+ /** Translation loader factory. */
106
54
  export type TranslationLoaderFactory = () => TranslationLoader;