@guren/server 1.5.0 → 2.0.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 (53) hide show
  1. package/dist/{AuthManager-C84xF5ks.d.ts → AuthManager-DBP4KYsx.d.ts} +1 -1
  2. package/dist/{ConsoleKernel-D0dkFt6u.d.ts → ConsoleKernel-DlK9j2Lu.d.ts} +1 -1
  3. package/dist/DocsViewerServiceProvider-D7RGJPGM.js +75 -0
  4. package/dist/{I18nManager-CmUqj6bU.d.ts → I18nManager-BiSoczfV.d.ts} +1 -1
  5. package/dist/McpServiceProvider-7BB5FPF3.js +8 -0
  6. package/dist/auth/index.d.ts +39 -29
  7. package/dist/auth/index.js +2 -2
  8. package/dist/broadcasting/index.js +2 -2
  9. package/dist/cache/index.js +2 -2
  10. package/dist/chunk-2V3YID4H.js +20 -0
  11. package/dist/{chunk-SHYRVOMJ.js → chunk-4DW4GRWF.js} +3 -3
  12. package/dist/chunk-AZOYI43J.js +18 -0
  13. package/dist/{chunk-DCYKSYAT.js → chunk-B5E5VBDI.js} +54 -2
  14. package/dist/{chunk-NYQGAWDN.js → chunk-BZMZEFRG.js} +7 -11
  15. package/dist/{chunk-4SBGSJNT.js → chunk-CWI4AJ47.js} +2 -1
  16. package/dist/{chunk-NQCZQAJL.js → chunk-DSDX3ASM.js} +21 -2
  17. package/dist/{chunk-MC752CQT.js → chunk-EI5GYMAT.js} +2 -1
  18. package/dist/{chunk-AUXQISW5.js → chunk-HONCNQXZ.js} +38 -5
  19. package/dist/{chunk-CSRQTEQA.js → chunk-HWEWL6TE.js} +6 -1
  20. package/dist/chunk-JBG4AR24.js +18 -0
  21. package/dist/{chunk-RNXTRWKL.js → chunk-K6CUBJX6.js} +9 -15
  22. package/dist/{chunk-Z3HXKWI6.js → chunk-KTNJG7R7.js} +4 -0
  23. package/dist/{chunk-74HTZG3V.js → chunk-LAJQCSSF.js} +24 -0
  24. package/dist/{chunk-H32L2NE3.js → chunk-LVJCZCAV.js} +20 -13
  25. package/dist/{chunk-5AD7LYWO.js → chunk-N7PLD7MB.js} +9 -8
  26. package/dist/{chunk-ONSDE37A.js → chunk-SFQP6O52.js} +1 -0
  27. package/dist/{chunk-XMQZENBP.js → chunk-TVY72CLV.js} +3 -1
  28. package/dist/chunk-WIXGT4TN.js +18 -0
  29. package/dist/{email-verification-H_WlpsVH.d.ts → email-verification-D8N7P6Pu.d.ts} +1 -1
  30. package/dist/encryption/index.js +2 -2
  31. package/dist/events/index.js +1 -1
  32. package/dist/i18n/index.d.ts +2 -2
  33. package/dist/index.d.ts +333 -333
  34. package/dist/index.js +186 -65
  35. package/dist/lambda/index.d.ts +5 -5
  36. package/dist/mail/index.js +3 -2
  37. package/dist/mcp/index.d.ts +14 -4
  38. package/dist/mcp/index.js +3 -2
  39. package/dist/notifications/index.d.ts +5 -5
  40. package/dist/notifications/index.js +3 -2
  41. package/dist/queue/index.d.ts +5 -5
  42. package/dist/queue/index.js +1 -1
  43. package/dist/redis/index.d.ts +4 -4
  44. package/dist/redis/index.js +7 -0
  45. package/dist/runtime/index.d.ts +5 -5
  46. package/dist/runtime/index.js +24 -9
  47. package/dist/scheduling/index.js +2 -2
  48. package/dist/storage/index.js +2 -1
  49. package/dist/{Application-Bi-olFMF.d.ts → validation-CDR7lRE8.d.ts} +749 -719
  50. package/package.json +3 -3
  51. package/dist/McpServiceProvider-TZWQWXCT.js +0 -7
  52. package/dist/{api-token-COQHXyM_.d.ts → api-token-D24VPr_E.d.ts} +101 -101
  53. package/dist/{client-BQwF2b9Y.d.ts → rate-limit-D9J2b4S1.d.ts} +36 -36
@@ -21,6 +21,7 @@ var RedisSessionStore = class {
21
21
  this.redis = redis;
22
22
  this.prefix = options.prefix ?? "session:";
23
23
  }
24
+ redis;
24
25
  prefix;
25
26
  /**
26
27
  * Read session data from Redis.
@@ -107,6 +108,7 @@ var RedisRateLimitStore = class {
107
108
  this.redis = redis;
108
109
  this.prefix = options.prefix ?? "ratelimit:";
109
110
  }
111
+ redis;
110
112
  prefix;
111
113
  /**
112
114
  * Get current rate limit entry for a key.
@@ -173,6 +175,7 @@ var RedisSlidingWindowRateLimitStore = class {
173
175
  this.redis = redis;
174
176
  this.prefix = options.prefix ?? "ratelimit:sw:";
175
177
  }
178
+ redis;
176
179
  prefix;
177
180
  /**
178
181
  * Get current rate limit entry for a key.
@@ -233,6 +236,7 @@ var RedisApiTokenStore = class {
233
236
  this.redis = redis;
234
237
  this.prefix = options.prefix ?? "apitoken:";
235
238
  }
239
+ redis;
236
240
  prefix;
237
241
  /**
238
242
  * Store a new API token.
@@ -372,6 +376,7 @@ var RedisPasswordResetStore = class {
372
376
  this.redis = redis;
373
377
  this.prefix = options.prefix ?? "pwreset:";
374
378
  }
379
+ redis;
375
380
  prefix;
376
381
  /**
377
382
  * Store a password reset token.
@@ -455,6 +460,7 @@ var RedisEmailVerificationStore = class {
455
460
  this.redis = redis;
456
461
  this.prefix = options.prefix ?? "emailverify:";
457
462
  }
463
+ redis;
458
464
  prefix;
459
465
  /**
460
466
  * Store an email verification token.
@@ -552,6 +558,7 @@ var RedisOAuthStateStore = class {
552
558
  this.redis = redis;
553
559
  this.prefix = options.prefix ?? "oauthstate:";
554
560
  }
561
+ redis;
555
562
  prefix;
556
563
  async store(stateHash, payload) {
557
564
  const ttlMs = Math.max(0, payload.expiresAt.getTime() - Date.now());
@@ -1,15 +1,15 @@
1
- import { A as Application } from '../Application-Bi-olFMF.js';
2
- export { D as DevBannerOptions, G as GUREN_ASCII_ART, c as StartViteDevServerOptions, d as StartedViteDevServer, l as logDevServerBanner, s as startViteDevServer } from '../Application-Bi-olFMF.js';
1
+ import { A as Application } from '../validation-CDR7lRE8.js';
2
+ export { D as DevBannerOptions, G as GUREN_ASCII_ART, c as StartViteDevServerOptions, d as StartedViteDevServer, l as logDevServerBanner, s as startViteDevServer } from '../validation-CDR7lRE8.js';
3
3
  import 'hono';
4
- import '../api-token-COQHXyM_.js';
5
- import '../AuthManager-C84xF5ks.js';
4
+ import '../api-token-D24VPr_E.js';
5
+ import '../AuthManager-DBP4KYsx.js';
6
6
  import '@guren/orm';
7
7
  import 'vite';
8
8
  import '../EventManager-CmIoLt7r.js';
9
9
  import '../CacheManager-BmDzUKrF.js';
10
10
  import '../MailManager-DpMvYiP9.js';
11
11
  import '../LogManager-7mxnkaPM.js';
12
- import '../I18nManager-CmUqj6bU.js';
12
+ import '../I18nManager-BiSoczfV.js';
13
13
  import '../BroadcastManager-D8KoJxiV.js';
14
14
  import '../index-9_Jzj5jo.js';
15
15
  import '../app-key-CsBfRC_Q.js';
@@ -3,7 +3,10 @@ import {
3
3
  logDevServerBanner,
4
4
  parseImportMap,
5
5
  startViteDevServer
6
- } from "../chunk-SHYRVOMJ.js";
6
+ } from "../chunk-4DW4GRWF.js";
7
+ import {
8
+ trimTrailingSlashes
9
+ } from "../chunk-AZOYI43J.js";
7
10
  import {
8
11
  hash
9
12
  } from "../chunk-QQKTH5KX.js";
@@ -40,7 +43,7 @@ function registerRootPublicAssets(app, publicDir, config) {
40
43
  return;
41
44
  }
42
45
  const { extensions, cacheControlHeader, routePrefix, contentTypeMap } = normalized;
43
- const normalizedPrefix = routePrefix ? routePrefix.replace(/\/+$/u, "") || "/" : void 0;
46
+ const normalizedPrefix = routePrefix ? trimTrailingSlashes(routePrefix) || "/" : void 0;
44
47
  app.hono.use(async (ctx, next) => {
45
48
  const path = ctx.req.path;
46
49
  if (!path || path === "/" || path.startsWith("/public/")) {
@@ -109,6 +112,14 @@ function normalizeExtension(value) {
109
112
  var DEFAULT_PREFIX = "/resources/js";
110
113
  var DEFAULT_VENDOR_PATH = "/vendor/inertia-client.tsx";
111
114
  var DEFAULT_JSX_RUNTIME = "https://esm.sh/react@19.0.0/jsx-dev-runtime?dev";
115
+ function resolveInertiaClientRoute(inertiaClientPath) {
116
+ const base = inertiaClientPath.slice(0, inertiaClientPath.lastIndexOf("/") + 1) || "/";
117
+ return {
118
+ base,
119
+ pattern: `${base}*`,
120
+ requestPath: inertiaClientPath.slice(base.length)
121
+ };
122
+ }
112
123
  var require2 = createRequire(import.meta.url);
113
124
  function resolveGurenInertiaClient() {
114
125
  return require2.resolve("@guren/inertia-client/app");
@@ -154,9 +165,11 @@ function registerDevAssets(app, options) {
154
165
  }
155
166
  if (options.inertiaClient !== false) {
156
167
  const inertiaClientDir = dirname(inertiaClientSource);
157
- const inertiaClientBase = inertiaClientPath.replace(/[^/]*$/u, "") || "/";
158
- const inertiaClientPattern = `${inertiaClientBase.endsWith("/") ? inertiaClientBase : `${inertiaClientBase}/`}*`;
159
- const inertiaClientRequestPath = inertiaClientPath.slice(inertiaClientBase.length);
168
+ const {
169
+ base: inertiaClientBase,
170
+ pattern: inertiaClientPattern,
171
+ requestPath: inertiaClientRequestPath
172
+ } = resolveInertiaClientRoute(inertiaClientPath);
160
173
  app.hono.get(inertiaClientPattern, (ctx) => {
161
174
  const relativeRequest = ctx.req.path.slice(inertiaClientBase.length) || inertiaClientRequestPath;
162
175
  if (relativeRequest === inertiaClientRequestPath) {
@@ -369,9 +382,11 @@ function configureInertiaAssets(app, options) {
369
382
  }
370
383
  const inertiaClientDir = dirname2(inertiaClientEntry);
371
384
  const inertiaClientPath = options.inertiaClientPath ?? DEFAULT_VENDOR_CLIENT_PATH;
372
- const inertiaClientBase = inertiaClientPath.replace(/[^/]*$/u, "") || "/";
373
- const inertiaClientPattern = `${inertiaClientBase.endsWith("/") ? inertiaClientBase : `${inertiaClientBase}/`}*`;
374
- const inertiaClientRequestPath = inertiaClientPath.slice(inertiaClientBase.length);
385
+ const {
386
+ base: inertiaClientBase,
387
+ pattern: inertiaClientPattern,
388
+ requestPath: inertiaClientRequestPath
389
+ } = resolveInertiaClientRoute(inertiaClientPath);
375
390
  app.hono.get(inertiaClientPattern, async (ctx) => {
376
391
  const relativeRequest = ctx.req.path.slice(inertiaClientBase.length) || inertiaClientRequestPath;
377
392
  let targetPath;
@@ -535,7 +550,7 @@ function normalizeDevServerUrl(value) {
535
550
  if (!trimmed) {
536
551
  return trimmed;
537
552
  }
538
- const stripped = trimmed.replace(/\/+$/u, "");
553
+ const stripped = trimTrailingSlashes(trimmed);
539
554
  return stripped.length > 0 ? stripped : "/";
540
555
  }
541
556
  function loadViteManifest(candidatePaths, label) {
@@ -11,8 +11,8 @@ import {
11
11
  matchesCron,
12
12
  parseCron,
13
13
  toTimezone
14
- } from "../chunk-MC752CQT.js";
15
- import "../chunk-DCYKSYAT.js";
14
+ } from "../chunk-EI5GYMAT.js";
15
+ import "../chunk-B5E5VBDI.js";
16
16
  export {
17
17
  PendingSchedule,
18
18
  Schedule,
@@ -4,7 +4,8 @@ import {
4
4
  S3Driver,
5
5
  StorageManager,
6
6
  createStorageManager
7
- } from "../chunk-CSRQTEQA.js";
7
+ } from "../chunk-HWEWL6TE.js";
8
+ import "../chunk-AZOYI43J.js";
8
9
  export {
9
10
  LocalDriver,
10
11
  MemoryDriver,