@guren/server 2.15.0 → 2.16.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.
- package/dist/{DocsViewerServiceProvider-qFCaeiUv.js → DocsViewerServiceProvider-D2cuVgtN.js} +7 -12
- package/dist/{Hash-C8aejmi8.js → Hash-D2DFd8xX.js} +7 -57
- package/dist/{HttpException-BkS3euNG.js → HttpException-BlQ2yEmT.js} +2 -79
- package/dist/{Job-BVT813DO.js → Job-DxQK8h3P.js} +24 -179
- package/dist/{McpServiceProvider-BawsYjgN.js → McpServiceProvider-nNcbCIQX.js} +11 -20
- package/dist/{Random-DbIJ22KQ.js → Random-S0OvCuR8.js} +9 -106
- package/dist/agent/AgentApprovalRequested.d.ts +11 -39
- package/dist/agent/approval.d.ts +76 -187
- package/dist/agent/audit-emitter.d.ts +16 -44
- package/dist/agent/audit.d.ts +20 -56
- package/dist/agent/derive.d.ts +32 -66
- package/dist/agent/dispatch.d.ts +38 -90
- package/dist/agent/events.d.ts +11 -19
- package/dist/agent/meta-tools.d.ts +18 -46
- package/dist/agent/public.d.ts +6 -25
- package/dist/agent/public.js +1 -1
- package/dist/agent/redact.d.ts +16 -38
- package/dist/agent/scopes.d.ts +23 -69
- package/dist/auth/AuthManager.d.ts +19 -40
- package/dist/auth/AuthenticatableModel.d.ts +2 -2
- package/dist/auth/SessionGuard.d.ts +0 -1
- package/dist/auth/TokenGuard.d.ts +6 -26
- package/dist/auth/api-token.d.ts +16 -148
- package/dist/auth/context.d.ts +5 -10
- package/dist/auth/email-verification.d.ts +29 -127
- package/dist/auth/index.js +1 -1
- package/dist/auth/oauth/index.d.ts +35 -57
- package/dist/auth/password/DefaultHasher.d.ts +5 -14
- package/dist/auth/password/PasswordHasher.d.ts +5 -13
- package/dist/auth/password/hash-format.d.ts +5 -13
- package/dist/auth/password-reset.d.ts +16 -42
- package/dist/auth/providers/ModelUserProvider.d.ts +3 -4
- package/dist/auth/providers/UserProvider.d.ts +4 -4
- package/dist/auth/signed-token.d.ts +18 -0
- package/dist/auth/types.d.ts +9 -32
- package/dist/auth/utils.d.ts +6 -27
- package/dist/{auth-DkYoAPVn.js → auth-CbdPH4Cd.js} +169 -502
- package/dist/authorization/Gate.d.ts +9 -145
- package/dist/authorization/Policy.d.ts +6 -53
- package/dist/authorization/index.js +1 -1
- package/dist/authorization/middleware.d.ts +16 -62
- package/dist/authorization/types.d.ts +8 -64
- package/dist/{authorization-CdfbCj8J.js → authorization-CdEWZZw3.js} +44 -309
- package/dist/broadcasting/BroadcastManager.d.ts +29 -149
- package/dist/broadcasting/channels/Channel.d.ts +1 -19
- package/dist/broadcasting/channels/PresenceChannel.d.ts +1 -55
- package/dist/broadcasting/channels/PrivateChannel.d.ts +1 -23
- package/dist/broadcasting/drivers/MemoryDriver.d.ts +18 -70
- package/dist/broadcasting/drivers/RedisDriver.d.ts +3 -80
- package/dist/broadcasting/drivers/index.d.ts +1 -1
- package/dist/broadcasting/index.d.ts +1 -1
- package/dist/broadcasting/index.js +1 -1
- package/dist/broadcasting/types.d.ts +7 -88
- package/dist/{broadcasting-BwodCA4q.js → broadcasting-B5RzB0A2.js} +87 -414
- package/dist/cache/CacheManager.d.ts +8 -62
- package/dist/cache/TaggedCache.d.ts +2 -35
- package/dist/cache/index.js +1 -1
- package/dist/cache/stores/FileStore.d.ts +2 -36
- package/dist/cache/stores/MemoryStore.d.ts +2 -26
- package/dist/cache/stores/RedisStore.d.ts +1 -29
- package/dist/cache/types.d.ts +21 -128
- package/dist/{cache-BYnZf2FR.js → cache-BOOIr324.js} +19 -198
- package/dist/client-C4TEr_Dd.js +9 -0
- package/dist/console/Command.d.ts +17 -126
- package/dist/console/ConsoleKernel.d.ts +2 -74
- package/dist/console/Input.d.ts +5 -113
- package/dist/console/Output.d.ts +3 -99
- package/dist/console/types.d.ts +3 -33
- package/dist/container/Container.d.ts +12 -103
- package/dist/container/ServiceProvider.d.ts +17 -61
- package/dist/container/bindings.d.ts +5 -26
- package/dist/container/defineModule.d.ts +16 -54
- package/dist/container/definePlugin.d.ts +12 -45
- package/dist/container/types.d.ts +2 -34
- package/dist/context-CXk_umpT.js +21 -0
- package/dist/database/Factory.d.ts +4 -57
- package/dist/database/Seeder.d.ts +8 -46
- package/dist/database/SeederRunner.d.ts +3 -33
- package/dist/database/types.d.ts +3 -24
- package/dist/discovery/AutoDiscovery.d.ts +10 -82
- package/dist/{dispatch-erOS9epZ.js → dispatch-BAwzftws.js} +32 -79
- package/dist/docs-viewer/DocsViewerServiceProvider.d.ts +2 -5
- package/dist/docs-viewer/endpoint.d.ts +5 -11
- package/dist/encryption/Encrypter.d.ts +5 -71
- package/dist/encryption/Hash.d.ts +7 -57
- package/dist/encryption/Random.d.ts +6 -99
- package/dist/encryption/index.js +3 -3
- package/dist/encryption/types.d.ts +10 -72
- package/dist/{encryption-D99Vmls3.js → encryption-uwP3Di4D.js} +9 -78
- package/dist/{endpoint-D6GIqOpe.js → endpoint-BXipU2Jj.js} +6 -12
- package/dist/endpoint-Dsw3Acvq.js +26 -0
- package/dist/errors/ExceptionHandler.d.ts +3 -90
- package/dist/errors/HttpException.d.ts +2 -79
- package/dist/errors/debug-page.d.ts +3 -17
- package/dist/errors/error-page.d.ts +1 -0
- package/dist/errors/exceptions/AuthenticationException.d.ts +2 -24
- package/dist/errors/exceptions/AuthorizationException.d.ts +1 -24
- package/dist/errors/exceptions/MethodNotAllowedException.d.ts +1 -23
- package/dist/errors/exceptions/NotFoundHttpException.d.ts +1 -27
- package/dist/errors/exceptions/ValidationException.d.ts +2 -43
- package/dist/errors/types.d.ts +1 -25
- package/dist/{errors-BgeOl_DC.js → errors-JpkcCjjn.js} +3 -41
- package/dist/events/Event.d.ts +1 -28
- package/dist/events/EventManager.d.ts +5 -107
- package/dist/events/Listener.d.ts +7 -55
- package/dist/events/builtin.d.ts +0 -24
- package/dist/events/index.js +1 -1
- package/dist/events/types.d.ts +4 -22
- package/dist/{events-aIH_bWRx.js → events-DOmAHDeP.js} +11 -191
- package/dist/facades/index.d.ts +2 -14
- package/dist/health/HealthCheck.d.ts +0 -24
- package/dist/health/HealthManager.d.ts +0 -36
- package/dist/health/checks/CacheCheck.d.ts +2 -17
- package/dist/health/checks/CustomCheck.d.ts +0 -9
- package/dist/health/checks/DatabaseCheck.d.ts +2 -17
- package/dist/health/checks/MemoryCheck.d.ts +3 -12
- package/dist/health/checks/RedisCheck.d.ts +1 -13
- package/dist/health/checks/StorageCheck.d.ts +2 -17
- package/dist/health/index.js +1 -1
- package/dist/health/types.d.ts +4 -24
- package/dist/{health-VWdWXRwh.js → health-DQSvUplL.js} +1 -76
- package/dist/hot-disposables-B5BXqaIH.js +167 -0
- package/dist/hot-reload/hot-disposables.d.ts +22 -74
- package/dist/hot-reload/testing.d.ts +4 -9
- package/dist/http/Application.d.ts +62 -208
- package/dist/http/FormRequest.d.ts +4 -55
- package/dist/http/dev-assets.d.ts +13 -31
- package/dist/http/dev-banner.d.ts +2 -5
- package/dist/http/inertia-assets.d.ts +3 -6
- package/dist/http/middleware/capabilities.d.ts +27 -50
- package/dist/http/middleware/cors.d.ts +4 -29
- package/dist/http/middleware/csp.d.ts +2 -25
- package/dist/http/middleware/csrf.d.ts +20 -95
- package/dist/http/middleware/detect-locale.d.ts +7 -27
- package/dist/http/middleware/force-https.d.ts +6 -24
- package/dist/http/middleware/host-authorization.d.ts +2 -12
- package/dist/http/middleware/loopback-guard.d.ts +15 -33
- package/dist/http/middleware/rate-limit.d.ts +29 -126
- package/dist/http/middleware/redirect-safety.d.ts +2 -20
- package/dist/http/middleware/request-id.d.ts +1 -14
- package/dist/http/middleware/request-logging.d.ts +2 -13
- package/dist/http/middleware/response-headers.d.ts +5 -13
- package/dist/http/middleware/security-headers.d.ts +2 -16
- package/dist/http/middleware/session.d.ts +15 -34
- package/dist/http/middleware/validation-errors-cookie.d.ts +7 -18
- package/dist/http/middleware/validation.d.ts +8 -63
- package/dist/http/public-assets.d.ts +11 -7
- package/dist/http/request.d.ts +32 -118
- package/dist/http/resources/CursorPaginator.d.ts +5 -64
- package/dist/http/resources/Paginator.d.ts +7 -84
- package/dist/http/resources/Resource.d.ts +9 -65
- package/dist/http/resources/ResourceCollection.d.ts +5 -39
- package/dist/http/resources/types.d.ts +10 -30
- package/dist/http/static-documents.d.ts +10 -20
- package/dist/http/validation/Validator.d.ts +25 -85
- package/dist/http/validation/rules.d.ts +48 -147
- package/dist/http/validation/types.d.ts +16 -61
- package/dist/http/vite-assets.d.ts +5 -28
- package/dist/http/vite-dev-server.d.ts +6 -9
- package/dist/http/vite-manifest.d.ts +19 -33
- package/dist/i18n/I18nManager.d.ts +12 -78
- package/dist/i18n/Translator.d.ts +3 -54
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/loaders/JsonLoader.d.ts +4 -31
- package/dist/i18n/loaders/MemoryLoader.d.ts +1 -21
- package/dist/i18n/pluralization.d.ts +4 -13
- package/dist/i18n/types.d.ts +17 -69
- package/dist/{i18n-mcWi7LCd.js → i18n-Cg1aajRP.js} +31 -225
- package/dist/index.d.ts +2 -1
- package/dist/index.js +714 -3011
- package/dist/internal/agent-preflight.d.ts +9 -21
- package/dist/internal/request.d.ts +6 -19
- package/dist/internal/request.js +1 -1
- package/dist/internal/route-path.d.ts +9 -21
- package/dist/internal/route-path.js +9 -21
- package/dist/internal/zod-compat.d.ts +55 -122
- package/dist/internal/zod-compat.js +39 -70
- package/dist/internal/zod-json-schema.d.ts +18 -54
- package/dist/internal/zod-json-schema.js +46 -123
- package/dist/jsx-runtime.d.ts +3 -8
- package/dist/lambda/index.d.ts +17 -79
- package/dist/lambda/index.js +11 -59
- package/dist/logging/LogManager.d.ts +1 -51
- package/dist/logging/Logger.d.ts +8 -47
- package/dist/logging/channels/ConsoleChannel.d.ts +1 -3
- package/dist/logging/channels/DailyFileChannel.d.ts +1 -3
- package/dist/logging/channels/FileChannel.d.ts +1 -3
- package/dist/logging/daily-file-path.d.ts +7 -16
- package/dist/logging/index.js +1 -1
- package/dist/logging/types.d.ts +13 -45
- package/dist/{logging-B-kngi3q.js → logging-zOY1XCtq.js} +52 -141
- package/dist/{loopback-guard-D0Kc7-xc.js → loopback-guard-DT9gHF0F.js} +41 -92
- package/dist/mail/Mail.d.ts +10 -106
- package/dist/mail/MailManager.d.ts +2 -60
- package/dist/mail/index.js +1 -1
- package/dist/mail/transports/LogTransport.d.ts +1 -4
- package/dist/mail/transports/MemoryTransport.d.ts +1 -63
- package/dist/mail/transports/ResendTransport.d.ts +1 -23
- package/dist/mail/transports/SmtpTransport.d.ts +1 -31
- package/dist/mail/types.d.ts +28 -150
- package/dist/{mail-DfEfSQEr.js → mail-76DWy9lj.js} +31 -289
- package/dist/mcp/McpServiceProvider.d.ts +4 -10
- package/dist/mcp/create-mcp-server.d.ts +25 -57
- package/dist/mcp/endpoint.d.ts +12 -36
- package/dist/mcp/index.js +1 -1
- package/dist/mvc/Controller.d.ts +46 -227
- package/dist/mvc/Router.d.ts +50 -129
- package/dist/mvc/inertia/InertiaEngine.d.ts +18 -48
- package/dist/mvc/inertia/shared.d.ts +6 -19
- package/dist/mvc/mount-route.d.ts +2 -6
- package/dist/mvc/view.d.ts +1 -2
- package/dist/notifications/Notification.d.ts +8 -75
- package/dist/notifications/NotificationManager.d.ts +15 -88
- package/dist/notifications/channels/DatabaseChannel.d.ts +1 -41
- package/dist/notifications/channels/MailChannel.d.ts +2 -31
- package/dist/notifications/channels/MemoryChannel.d.ts +2 -62
- package/dist/notifications/channels/SlackChannel.d.ts +3 -48
- package/dist/notifications/index.js +1 -1
- package/dist/notifications/notifiable-type.d.ts +3 -6
- package/dist/notifications/registry.d.ts +8 -27
- package/dist/notifications/types.d.ts +16 -53
- package/dist/{notifications-BGqmUNZ8.js → notifications-okWFs9ly.js} +37 -335
- package/dist/providers/AuthServiceProvider.d.ts +1 -3
- package/dist/providers/AuthorizationServiceProvider.d.ts +2 -3
- package/dist/providers/BroadcastServiceProvider.d.ts +1 -3
- package/dist/providers/CacheServiceProvider.d.ts +1 -3
- package/dist/providers/EncryptionServiceProvider.d.ts +1 -3
- package/dist/providers/ErrorServiceProvider.d.ts +1 -4
- package/dist/providers/EventServiceProvider.d.ts +1 -3
- package/dist/providers/HealthServiceProvider.d.ts +1 -3
- package/dist/providers/I18nServiceProvider.d.ts +6 -10
- package/dist/providers/InertiaServiceProvider.d.ts +1 -4
- package/dist/providers/LogServiceProvider.d.ts +1 -3
- package/dist/providers/MailServiceProvider.d.ts +1 -3
- package/dist/providers/NotificationServiceProvider.d.ts +1 -3
- package/dist/providers/OAuthServiceProvider.d.ts +1 -3
- package/dist/providers/QueueServiceProvider.d.ts +1 -3
- package/dist/providers/SchedulingServiceProvider.d.ts +1 -3
- package/dist/providers/StorageServiceProvider.d.ts +1 -3
- package/dist/queue/FailedJobReporter.d.ts +1 -24
- package/dist/queue/Job.d.ts +12 -99
- package/dist/queue/QueueManager.d.ts +6 -57
- package/dist/queue/Worker.d.ts +4 -65
- package/dist/queue/drivers/MemoryDriver.d.ts +3 -44
- package/dist/queue/drivers/RedisDriver.d.ts +7 -65
- package/dist/queue/drivers/SqsDriver.d.ts +6 -57
- package/dist/queue/drivers/SyncDriver.d.ts +10 -13
- package/dist/queue/index.js +2 -2
- package/dist/queue/types.d.ts +10 -92
- package/dist/{queue-CXrRK85G.js → queue-CcXCjuJI.js} +32 -260
- package/dist/redis/RedisApiTokenStore.d.ts +4 -56
- package/dist/redis/RedisEmailVerificationStore.d.ts +4 -37
- package/dist/redis/RedisOAuthStateStore.d.ts +2 -10
- package/dist/redis/RedisPasswordResetStore.d.ts +4 -37
- package/dist/redis/RedisRateLimitStore.d.ts +16 -49
- package/dist/redis/RedisSessionStore.d.ts +3 -44
- package/dist/redis/client.d.ts +2 -32
- package/dist/redis/index.js +47 -232
- package/dist/redis/redis-values.d.ts +6 -12
- package/dist/redis/scan-keys.d.ts +1 -4
- package/dist/request-CLOYytGP.js +68 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.js +50 -92
- package/dist/scheduling/CronParser.d.ts +0 -29
- package/dist/scheduling/Schedule.d.ts +1 -153
- package/dist/scheduling/ScheduledTask.d.ts +0 -31
- package/dist/scheduling/Scheduler.d.ts +0 -70
- package/dist/scheduling/index.js +1 -1
- package/dist/scheduling/types.d.ts +4 -65
- package/dist/{scheduling-CPiEdtQd.js → scheduling-C6tcOtUl.js} +2 -287
- package/dist/storage/StorageManager.d.ts +0 -48
- package/dist/storage/drivers/LocalDriver.d.ts +1 -25
- package/dist/storage/drivers/MemoryDriver.d.ts +5 -35
- package/dist/storage/drivers/S3Driver.d.ts +6 -36
- package/dist/storage/drivers/s3-acl.d.ts +5 -10
- package/dist/storage/index.js +1 -1
- package/dist/storage/types.d.ts +27 -265
- package/dist/{storage-TLD9t0Q2.js → storage-BB59f07j.js} +17 -157
- package/dist/support/contained-path.d.ts +10 -20
- package/dist/support/error-polyfill.d.ts +4 -6
- package/dist/support/expiry.d.ts +17 -33
- package/dist/support/expiry.js +17 -33
- package/dist/support/import-map.d.ts +3 -7
- package/dist/support/inertia-defaults.d.ts +5 -10
- package/dist/support/redirect-target.d.ts +4 -6
- package/dist/support/stack-frames.d.ts +11 -50
- package/dist/support/trim-slashes.d.ts +4 -7
- package/dist/support/warn-once.d.ts +2 -6
- package/dist/{trim-slashes-ZJ_VsY5s.js → trim-slashes-BLY9hKAa.js} +4 -7
- package/dist/{vite-manifest-w_RSOvQW.js → vite-manifest-CTQp-SOo.js} +34 -58
- package/package.json +2 -2
- package/dist/client-Dd7vLcqp.js +0 -27
- package/dist/context-DoD0c7J_.js +0 -26
- package/dist/endpoint-D-20PiHY.js +0 -46
- package/dist/hot-disposables-WsTX2ySN.js +0 -281
- package/dist/request-CVQwpu2J.js +0 -129
|
@@ -2,42 +2,27 @@ import { readFile, readdir } from "node:fs/promises";
|
|
|
2
2
|
import { basename, extname, join } from "node:path";
|
|
3
3
|
//#region src/i18n/pluralization.ts
|
|
4
4
|
/**
|
|
5
|
-
* Default pluralization rules
|
|
6
|
-
*
|
|
7
|
-
* Returns the index of the plural form to use.
|
|
8
|
-
* Most languages use: 0 = one, 1 = other
|
|
9
|
-
* Some languages have more complex rules.
|
|
5
|
+
* Default pluralization rules per language, each returning the index of the
|
|
6
|
+
* plural form to use.
|
|
10
7
|
*/
|
|
11
8
|
const pluralizationRules = {
|
|
12
|
-
/**
|
|
13
|
-
* English, German, Spanish, Italian, Portuguese, etc.
|
|
14
|
-
* 1 = singular, everything else = plural
|
|
15
|
-
*/
|
|
9
|
+
/** 1 = singular, everything else = plural. */
|
|
16
10
|
en: (count) => count === 1 ? 0 : 1,
|
|
17
11
|
de: (count) => count === 1 ? 0 : 1,
|
|
18
12
|
es: (count) => count === 1 ? 0 : 1,
|
|
19
13
|
it: (count) => count === 1 ? 0 : 1,
|
|
20
14
|
pt: (count) => count === 1 ? 0 : 1,
|
|
21
15
|
nl: (count) => count === 1 ? 0 : 1,
|
|
22
|
-
/**
|
|
23
|
-
* French, Brazilian Portuguese
|
|
24
|
-
* 0 and 1 = singular, everything else = plural
|
|
25
|
-
*/
|
|
16
|
+
/** 0 and 1 = singular, everything else = plural. */
|
|
26
17
|
fr: (count) => count <= 1 ? 0 : 1,
|
|
27
18
|
"pt-BR": (count) => count <= 1 ? 0 : 1,
|
|
28
|
-
/**
|
|
29
|
-
* Japanese, Chinese, Korean, Vietnamese, Thai
|
|
30
|
-
* No plural forms
|
|
31
|
-
*/
|
|
19
|
+
/** No plural forms. */
|
|
32
20
|
ja: () => 0,
|
|
33
21
|
zh: () => 0,
|
|
34
22
|
ko: () => 0,
|
|
35
23
|
vi: () => 0,
|
|
36
24
|
th: () => 0,
|
|
37
|
-
/**
|
|
38
|
-
* Russian, Ukrainian, Serbian, Croatian, Bosnian
|
|
39
|
-
* Three forms: one, few (2-4), many (5+)
|
|
40
|
-
*/
|
|
25
|
+
/** Three forms: one, few (2-4), many (5+). */
|
|
41
26
|
ru: (count) => {
|
|
42
27
|
const mod10 = count % 10;
|
|
43
28
|
const mod100 = count % 100;
|
|
@@ -52,10 +37,7 @@ const pluralizationRules = {
|
|
|
52
37
|
if (mod10 >= 2 && mod10 <= 4 && (mod100 < 10 || mod100 >= 20)) return 1;
|
|
53
38
|
return 2;
|
|
54
39
|
},
|
|
55
|
-
/**
|
|
56
|
-
* Polish
|
|
57
|
-
* Three forms with different rules
|
|
58
|
-
*/
|
|
40
|
+
/** Three forms, on Polish rules. */
|
|
59
41
|
pl: (count) => {
|
|
60
42
|
if (count === 1) return 0;
|
|
61
43
|
const mod10 = count % 10;
|
|
@@ -63,10 +45,7 @@ const pluralizationRules = {
|
|
|
63
45
|
if (mod10 >= 2 && mod10 <= 4 && (mod100 < 10 || mod100 >= 20)) return 1;
|
|
64
46
|
return 2;
|
|
65
47
|
},
|
|
66
|
-
/**
|
|
67
|
-
* Czech, Slovak
|
|
68
|
-
* Three forms: 1, 2-4, 5+
|
|
69
|
-
*/
|
|
48
|
+
/** Three forms: 1, 2-4, 5+. */
|
|
70
49
|
cs: (count) => {
|
|
71
50
|
if (count === 1) return 0;
|
|
72
51
|
if (count >= 2 && count <= 4) return 1;
|
|
@@ -77,10 +56,7 @@ const pluralizationRules = {
|
|
|
77
56
|
if (count >= 2 && count <= 4) return 1;
|
|
78
57
|
return 2;
|
|
79
58
|
},
|
|
80
|
-
/**
|
|
81
|
-
* Arabic
|
|
82
|
-
* Six forms
|
|
83
|
-
*/
|
|
59
|
+
/** Six forms. */
|
|
84
60
|
ar: (count) => {
|
|
85
61
|
if (count === 0) return 0;
|
|
86
62
|
if (count === 1) return 1;
|
|
@@ -91,20 +67,14 @@ const pluralizationRules = {
|
|
|
91
67
|
return 5;
|
|
92
68
|
}
|
|
93
69
|
};
|
|
94
|
-
/**
|
|
95
|
-
* Get pluralization rule for a locale.
|
|
96
|
-
*/
|
|
70
|
+
/** Falls back to the language code, then to English. */
|
|
97
71
|
function getPluralizationRule(locale) {
|
|
98
72
|
if (pluralizationRules[locale]) return pluralizationRules[locale];
|
|
99
73
|
const langCode = locale.split("-")[0];
|
|
100
74
|
if (pluralizationRules[langCode]) return pluralizationRules[langCode];
|
|
101
75
|
return pluralizationRules.en;
|
|
102
76
|
}
|
|
103
|
-
/**
|
|
104
|
-
* Select the appropriate plural form from a translation.
|
|
105
|
-
*
|
|
106
|
-
* Translation format: "singular|plural" or "one|few|many"
|
|
107
|
-
*/
|
|
77
|
+
/** Translation format: `"singular|plural"` or `"one|few|many"`. */
|
|
108
78
|
function selectPluralForm(translation, count, rule) {
|
|
109
79
|
const forms = translation.split("|");
|
|
110
80
|
return forms[rule(Math.abs(count))] ?? forms[forms.length - 1];
|
|
@@ -112,9 +82,6 @@ function selectPluralForm(translation, count, rule) {
|
|
|
112
82
|
//#endregion
|
|
113
83
|
//#region src/i18n/Translator.ts
|
|
114
84
|
const REGEXP_SPECIALS = /[.*+?^${}()|[\]\\]/g;
|
|
115
|
-
/**
|
|
116
|
-
* Translator class for handling translations.
|
|
117
|
-
*/
|
|
118
85
|
var Translator = class {
|
|
119
86
|
locale;
|
|
120
87
|
fallbackLocale;
|
|
@@ -128,15 +95,10 @@ var Translator = class {
|
|
|
128
95
|
this.pluralizationRules = options.pluralizationRules ?? {};
|
|
129
96
|
this.onMissingKey = options.onMissingKey;
|
|
130
97
|
}
|
|
131
|
-
/**
|
|
132
|
-
* Translate a key.
|
|
133
|
-
*/
|
|
134
98
|
t(key, replacements) {
|
|
135
99
|
return this.translate(key, replacements);
|
|
136
100
|
}
|
|
137
|
-
/**
|
|
138
|
-
* Translate a key with count for pluralization.
|
|
139
|
-
*/
|
|
101
|
+
/** Translate a key with count for pluralization. */
|
|
140
102
|
tc(key, count, replacements) {
|
|
141
103
|
const translation = this.getRawTranslation(key, this.locale) ?? this.getRawTranslation(key, this.fallbackLocale);
|
|
142
104
|
if (!translation) return this.handleMissingKey(key);
|
|
@@ -146,79 +108,45 @@ var Translator = class {
|
|
|
146
108
|
...replacements
|
|
147
109
|
});
|
|
148
110
|
}
|
|
149
|
-
/**
|
|
150
|
-
* Check if a translation exists.
|
|
151
|
-
*/
|
|
152
111
|
has(key, locale) {
|
|
153
112
|
const targetLocale = locale ?? this.locale;
|
|
154
113
|
return this.getRawTranslation(key, targetLocale) !== void 0;
|
|
155
114
|
}
|
|
156
|
-
/**
|
|
157
|
-
* Get the current locale.
|
|
158
|
-
*/
|
|
159
115
|
getLocale() {
|
|
160
116
|
return this.locale;
|
|
161
117
|
}
|
|
162
|
-
/**
|
|
163
|
-
* Set the current locale.
|
|
164
|
-
*/
|
|
165
118
|
setLocale(locale) {
|
|
166
119
|
this.locale = locale;
|
|
167
120
|
}
|
|
168
|
-
/**
|
|
169
|
-
* Get the fallback locale.
|
|
170
|
-
*/
|
|
171
121
|
getFallbackLocale() {
|
|
172
122
|
return this.fallbackLocale;
|
|
173
123
|
}
|
|
174
|
-
/**
|
|
175
|
-
* Set the fallback locale.
|
|
176
|
-
*/
|
|
177
124
|
setFallbackLocale(locale) {
|
|
178
125
|
this.fallbackLocale = locale;
|
|
179
126
|
}
|
|
180
|
-
/**
|
|
181
|
-
* Add messages for a locale.
|
|
182
|
-
*/
|
|
183
127
|
addMessages(locale, messages) {
|
|
184
128
|
this.messages[locale] = this.mergeMessages(this.messages[locale] ?? {}, messages);
|
|
185
129
|
}
|
|
186
|
-
/**
|
|
187
|
-
* Set messages for a locale (replaces existing).
|
|
188
|
-
*/
|
|
130
|
+
/** Set messages for a locale (replaces existing). */
|
|
189
131
|
setMessages(locale, messages) {
|
|
190
132
|
this.messages[locale] = messages;
|
|
191
133
|
}
|
|
192
|
-
/**
|
|
193
|
-
* Get all messages for a locale.
|
|
194
|
-
*/
|
|
195
134
|
getMessages(locale) {
|
|
196
135
|
return this.messages[locale ?? this.locale] ?? {};
|
|
197
136
|
}
|
|
198
|
-
/**
|
|
199
|
-
* Get available locales.
|
|
200
|
-
*/
|
|
201
137
|
getAvailableLocales() {
|
|
202
138
|
return Object.keys(this.messages);
|
|
203
139
|
}
|
|
204
|
-
/**
|
|
205
|
-
* Set a custom pluralization rule.
|
|
206
|
-
*/
|
|
207
140
|
setPluralizationRule(locale, rule) {
|
|
208
141
|
this.pluralizationRules[locale] = rule;
|
|
209
142
|
}
|
|
210
|
-
/**
|
|
211
|
-
* Internal translate method.
|
|
212
|
-
*/
|
|
213
143
|
translate(key, replacements) {
|
|
214
144
|
let translation = this.getRawTranslation(key, this.locale);
|
|
215
145
|
if (translation === void 0 && this.fallbackLocale) translation = this.getRawTranslation(key, this.fallbackLocale);
|
|
216
146
|
if (translation === void 0) return this.handleMissingKey(key);
|
|
217
147
|
return this.applyReplacements(translation, replacements);
|
|
218
148
|
}
|
|
219
|
-
/**
|
|
220
|
-
* Get raw translation without replacements.
|
|
221
|
-
*/
|
|
149
|
+
/** Get raw translation without replacements. */
|
|
222
150
|
getRawTranslation(key, locale) {
|
|
223
151
|
if (!locale) return void 0;
|
|
224
152
|
const messages = this.messages[locale];
|
|
@@ -231,9 +159,6 @@ var Translator = class {
|
|
|
231
159
|
}
|
|
232
160
|
return typeof result === "string" ? result : void 0;
|
|
233
161
|
}
|
|
234
|
-
/**
|
|
235
|
-
* Apply replacements to a translation string.
|
|
236
|
-
*/
|
|
237
162
|
applyReplacements(translation, replacements) {
|
|
238
163
|
if (!replacements) return translation;
|
|
239
164
|
let result = translation;
|
|
@@ -244,9 +169,6 @@ var Translator = class {
|
|
|
244
169
|
}
|
|
245
170
|
return result;
|
|
246
171
|
}
|
|
247
|
-
/**
|
|
248
|
-
* Handle missing translation key.
|
|
249
|
-
*/
|
|
250
172
|
handleMissingKey(key) {
|
|
251
173
|
if (this.onMissingKey) {
|
|
252
174
|
const result = this.onMissingKey(key, this.locale);
|
|
@@ -254,9 +176,6 @@ var Translator = class {
|
|
|
254
176
|
}
|
|
255
177
|
return key;
|
|
256
178
|
}
|
|
257
|
-
/**
|
|
258
|
-
* Deep merge messages.
|
|
259
|
-
*/
|
|
260
179
|
mergeMessages(target, source) {
|
|
261
180
|
const result = { ...target };
|
|
262
181
|
for (const [key, value] of Object.entries(source)) if (typeof value === "object" && value !== null && typeof result[key] === "object" && result[key] !== null) result[key] = this.mergeMessages(result[key], value);
|
|
@@ -267,22 +186,10 @@ var Translator = class {
|
|
|
267
186
|
//#endregion
|
|
268
187
|
//#region src/i18n/loaders/JsonLoader.ts
|
|
269
188
|
/**
|
|
270
|
-
* JSON file-based translation loader
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
* en/
|
|
275
|
-
* messages.json
|
|
276
|
-
* validation.json
|
|
277
|
-
* ja/
|
|
278
|
-
* messages.json
|
|
279
|
-
* validation.json
|
|
280
|
-
*
|
|
281
|
-
* This layout (locale subdirectories, namespace = file name) is a contract
|
|
282
|
-
* shared with the CLI: `guren codegen` (packages/cli/src/i18n-types.ts) and
|
|
283
|
-
* `guren check --i18n` (packages/cli/src/i18n-check.ts) re-implement the
|
|
284
|
-
* same walk statically. Changing the layout or parse tolerance here strands
|
|
285
|
-
* them on the old contract — update both together.
|
|
189
|
+
* JSON file-based translation loader: `<path>/<locale>/<namespace>.json`.
|
|
190
|
+
* That layout is a contract shared with the CLI — `guren codegen` and
|
|
191
|
+
* `guren check --i18n` re-implement the same walk statically, so a change to
|
|
192
|
+
* the layout or the parse tolerance has to be made in all three.
|
|
286
193
|
*/
|
|
287
194
|
var JsonLoader = class {
|
|
288
195
|
basePath;
|
|
@@ -292,9 +199,6 @@ var JsonLoader = class {
|
|
|
292
199
|
this.basePath = basePath;
|
|
293
200
|
this.useCache = options.cache ?? true;
|
|
294
201
|
}
|
|
295
|
-
/**
|
|
296
|
-
* Load all translations for a locale.
|
|
297
|
-
*/
|
|
298
202
|
async load(locale) {
|
|
299
203
|
const cacheKey = locale;
|
|
300
204
|
if (this.useCache && this.cache.has(cacheKey)) return this.cache.get(cacheKey);
|
|
@@ -317,9 +221,6 @@ var JsonLoader = class {
|
|
|
317
221
|
if (this.useCache) this.cache.set(cacheKey, messages);
|
|
318
222
|
return messages;
|
|
319
223
|
}
|
|
320
|
-
/**
|
|
321
|
-
* Load translations for a specific namespace.
|
|
322
|
-
*/
|
|
323
224
|
async loadNamespace(locale, namespace) {
|
|
324
225
|
const cacheKey = `${locale}:${namespace}`;
|
|
325
226
|
if (this.useCache && this.cache.has(cacheKey)) return this.cache.get(cacheKey);
|
|
@@ -333,9 +234,6 @@ var JsonLoader = class {
|
|
|
333
234
|
return {};
|
|
334
235
|
}
|
|
335
236
|
}
|
|
336
|
-
/**
|
|
337
|
-
* Get available locales.
|
|
338
|
-
*/
|
|
339
237
|
async getAvailableLocales() {
|
|
340
238
|
try {
|
|
341
239
|
return (await readdir(this.basePath, { withFileTypes: true })).filter((entry) => entry.isDirectory()).map((entry) => entry.name);
|
|
@@ -343,15 +241,9 @@ var JsonLoader = class {
|
|
|
343
241
|
return [];
|
|
344
242
|
}
|
|
345
243
|
}
|
|
346
|
-
/**
|
|
347
|
-
* Clear the cache.
|
|
348
|
-
*/
|
|
349
244
|
clearCache() {
|
|
350
245
|
this.cache.clear();
|
|
351
246
|
}
|
|
352
|
-
/**
|
|
353
|
-
* Enable or disable caching.
|
|
354
|
-
*/
|
|
355
247
|
setCaching(enabled) {
|
|
356
248
|
this.useCache = enabled;
|
|
357
249
|
if (!enabled) this.clearCache();
|
|
@@ -359,9 +251,6 @@ var JsonLoader = class {
|
|
|
359
251
|
};
|
|
360
252
|
//#endregion
|
|
361
253
|
//#region src/i18n/I18nManager.ts
|
|
362
|
-
/**
|
|
363
|
-
* I18n manager for handling multiple locales and translators.
|
|
364
|
-
*/
|
|
365
254
|
var I18nManager = class {
|
|
366
255
|
config;
|
|
367
256
|
translator;
|
|
@@ -377,51 +266,28 @@ var I18nManager = class {
|
|
|
377
266
|
});
|
|
378
267
|
if (config.messages) for (const locale of Object.keys(config.messages)) this.loadedLocales.add(locale);
|
|
379
268
|
}
|
|
380
|
-
/**
|
|
381
|
-
* Translate a key.
|
|
382
|
-
*/
|
|
383
269
|
t(key, replacements) {
|
|
384
270
|
return this.translator.t(key, replacements);
|
|
385
271
|
}
|
|
386
|
-
/**
|
|
387
|
-
* Translate a key with count for pluralization.
|
|
388
|
-
*/
|
|
272
|
+
/** Translate a key with count for pluralization. */
|
|
389
273
|
tc(key, count, replacements) {
|
|
390
274
|
return this.translator.tc(key, count, replacements);
|
|
391
275
|
}
|
|
392
|
-
/**
|
|
393
|
-
* Check if a translation exists.
|
|
394
|
-
*/
|
|
395
276
|
has(key, locale) {
|
|
396
277
|
return this.translator.has(key, locale);
|
|
397
278
|
}
|
|
398
|
-
/**
|
|
399
|
-
* Get the current locale.
|
|
400
|
-
*/
|
|
401
279
|
getLocale() {
|
|
402
280
|
return this.translator.getLocale();
|
|
403
281
|
}
|
|
404
|
-
/**
|
|
405
|
-
* Set the current locale.
|
|
406
|
-
*/
|
|
407
282
|
setLocale(locale) {
|
|
408
283
|
this.translator.setLocale(locale);
|
|
409
284
|
}
|
|
410
|
-
/**
|
|
411
|
-
* Get the fallback locale.
|
|
412
|
-
*/
|
|
413
285
|
getFallbackLocale() {
|
|
414
286
|
return this.translator.getFallbackLocale();
|
|
415
287
|
}
|
|
416
|
-
/**
|
|
417
|
-
* Set the fallback locale.
|
|
418
|
-
*/
|
|
419
288
|
setFallbackLocale(locale) {
|
|
420
289
|
this.translator.setFallbackLocale(locale);
|
|
421
290
|
}
|
|
422
|
-
/**
|
|
423
|
-
* Load translations for a locale.
|
|
424
|
-
*/
|
|
425
291
|
async loadLocale(locale) {
|
|
426
292
|
if (this.loadedLocales.has(locale)) return;
|
|
427
293
|
if (!this.loader) return;
|
|
@@ -429,15 +295,10 @@ var I18nManager = class {
|
|
|
429
295
|
this.translator.addMessages(locale, messages);
|
|
430
296
|
this.loadedLocales.add(locale);
|
|
431
297
|
}
|
|
432
|
-
/**
|
|
433
|
-
* Load translations for multiple locales.
|
|
434
|
-
*/
|
|
435
298
|
async loadLocales(locales) {
|
|
436
299
|
await Promise.all(locales.map((locale) => this.loadLocale(locale)));
|
|
437
300
|
}
|
|
438
|
-
/**
|
|
439
|
-
* Load a specific namespace for a locale.
|
|
440
|
-
*/
|
|
301
|
+
/** Load a specific namespace for a locale. */
|
|
441
302
|
async loadNamespace(locale, namespace) {
|
|
442
303
|
if (!this.loader?.loadNamespace) return;
|
|
443
304
|
const messages = await this.loader.loadNamespace(locale, namespace);
|
|
@@ -447,53 +308,31 @@ var I18nManager = class {
|
|
|
447
308
|
[namespace]: messages
|
|
448
309
|
});
|
|
449
310
|
}
|
|
450
|
-
/**
|
|
451
|
-
* Add messages for a locale.
|
|
452
|
-
*/
|
|
453
311
|
addMessages(locale, messages) {
|
|
454
312
|
this.translator.addMessages(locale, messages);
|
|
455
313
|
this.loadedLocales.add(locale);
|
|
456
314
|
}
|
|
457
|
-
/**
|
|
458
|
-
* Get all messages for a locale.
|
|
459
|
-
*/
|
|
460
315
|
getMessages(locale) {
|
|
461
316
|
return this.translator.getMessages(locale);
|
|
462
317
|
}
|
|
463
|
-
/**
|
|
464
|
-
* Get available locales.
|
|
465
|
-
*/
|
|
466
318
|
getAvailableLocales() {
|
|
467
319
|
return this.translator.getAvailableLocales();
|
|
468
320
|
}
|
|
469
|
-
/**
|
|
470
|
-
* Get available locales from loader.
|
|
471
|
-
*/
|
|
321
|
+
/** Get available locales from loader. */
|
|
472
322
|
async getLoaderLocales() {
|
|
473
323
|
if (!this.loader?.getAvailableLocales) return [];
|
|
474
324
|
return this.loader.getAvailableLocales();
|
|
475
325
|
}
|
|
476
|
-
/**
|
|
477
|
-
* Check if a locale is loaded.
|
|
478
|
-
*/
|
|
479
326
|
isLocaleLoaded(locale) {
|
|
480
327
|
return this.loadedLocales.has(locale);
|
|
481
328
|
}
|
|
482
|
-
/**
|
|
483
|
-
* Get the underlying translator.
|
|
484
|
-
*/
|
|
485
329
|
getTranslator() {
|
|
486
330
|
return this.translator;
|
|
487
331
|
}
|
|
488
|
-
/**
|
|
489
|
-
* Set a custom loader.
|
|
490
|
-
*/
|
|
491
332
|
setLoader(loader) {
|
|
492
333
|
this.loader = loader;
|
|
493
334
|
}
|
|
494
|
-
/**
|
|
495
|
-
* Create a scoped translator for a specific locale.
|
|
496
|
-
*/
|
|
335
|
+
/** Create a scoped translator for a specific locale. */
|
|
497
336
|
forLocale(locale) {
|
|
498
337
|
return new Translator({
|
|
499
338
|
locale,
|
|
@@ -502,9 +341,8 @@ var I18nManager = class {
|
|
|
502
341
|
});
|
|
503
342
|
}
|
|
504
343
|
/**
|
|
505
|
-
* The
|
|
506
|
-
*
|
|
507
|
-
* that flatten the record let the active locale win on key collisions.
|
|
344
|
+
* The fallback locale's catalog (when it differs) then the locale's own, so a
|
|
345
|
+
* consumer flattening the record lets the active locale win on collisions.
|
|
508
346
|
*/
|
|
509
347
|
messagesForLocale(locale) {
|
|
510
348
|
const fallback = this.config.fallbackLocale;
|
|
@@ -515,40 +353,28 @@ var I18nManager = class {
|
|
|
515
353
|
}
|
|
516
354
|
};
|
|
517
355
|
let globalI18n = null;
|
|
518
|
-
/**
|
|
519
|
-
* Create a new I18n manager.
|
|
520
|
-
*/
|
|
356
|
+
/** Create a new I18n manager. */
|
|
521
357
|
function createI18n(config) {
|
|
522
358
|
return new I18nManager(config);
|
|
523
359
|
}
|
|
524
|
-
/**
|
|
525
|
-
* Set the global I18n manager.
|
|
526
|
-
*/
|
|
360
|
+
/** Set the global I18n manager. */
|
|
527
361
|
function setI18n(i18n) {
|
|
528
362
|
globalI18n = i18n;
|
|
529
363
|
}
|
|
530
|
-
/**
|
|
531
|
-
* Get the global I18n manager.
|
|
532
|
-
*/
|
|
364
|
+
/** Get the global I18n manager. */
|
|
533
365
|
function getI18n() {
|
|
534
366
|
if (!globalI18n) throw new Error("I18n manager not initialized. Call setI18n() first.");
|
|
535
367
|
return globalI18n;
|
|
536
368
|
}
|
|
537
|
-
/**
|
|
538
|
-
* Get the global I18n manager, or `undefined` when none was registered.
|
|
539
|
-
*/
|
|
369
|
+
/** Get the global I18n manager, or `undefined` when none was registered. */
|
|
540
370
|
function tryGetI18n() {
|
|
541
371
|
return globalI18n ?? void 0;
|
|
542
372
|
}
|
|
543
|
-
/**
|
|
544
|
-
* Translate a key using the global I18n manager.
|
|
545
|
-
*/
|
|
373
|
+
/** Translate a key using the global I18n manager. */
|
|
546
374
|
function t(key, replacements) {
|
|
547
375
|
return getI18n().t(key, replacements);
|
|
548
376
|
}
|
|
549
|
-
/**
|
|
550
|
-
* Translate a key with count using the global I18n manager.
|
|
551
|
-
*/
|
|
377
|
+
/** Translate a key with count using the global I18n manager. */
|
|
552
378
|
function tc(key, count, replacements) {
|
|
553
379
|
return getI18n().tc(key, count, replacements);
|
|
554
380
|
}
|
|
@@ -563,15 +389,9 @@ var MemoryLoader = class {
|
|
|
563
389
|
constructor(messages = {}) {
|
|
564
390
|
this.messages = messages;
|
|
565
391
|
}
|
|
566
|
-
/**
|
|
567
|
-
* Load all translations for a locale.
|
|
568
|
-
*/
|
|
569
392
|
async load(locale) {
|
|
570
393
|
return this.messages[locale] ?? {};
|
|
571
394
|
}
|
|
572
|
-
/**
|
|
573
|
-
* Load translations for a specific namespace.
|
|
574
|
-
*/
|
|
575
395
|
async loadNamespace(locale, namespace) {
|
|
576
396
|
const localeMessages = this.messages[locale];
|
|
577
397
|
if (!localeMessages) return {};
|
|
@@ -579,36 +399,22 @@ var MemoryLoader = class {
|
|
|
579
399
|
if (typeof namespaceMessages === "object" && namespaceMessages !== null) return namespaceMessages;
|
|
580
400
|
return {};
|
|
581
401
|
}
|
|
582
|
-
/**
|
|
583
|
-
* Get available locales.
|
|
584
|
-
*/
|
|
585
402
|
async getAvailableLocales() {
|
|
586
403
|
return Object.keys(this.messages);
|
|
587
404
|
}
|
|
588
|
-
/**
|
|
589
|
-
* Add messages for a locale.
|
|
590
|
-
*/
|
|
591
405
|
addMessages(locale, messages) {
|
|
592
406
|
this.messages[locale] = {
|
|
593
407
|
...this.messages[locale],
|
|
594
408
|
...messages
|
|
595
409
|
};
|
|
596
410
|
}
|
|
597
|
-
/**
|
|
598
|
-
* Set messages for a locale (replaces existing).
|
|
599
|
-
*/
|
|
411
|
+
/** Set messages for a locale (replaces existing). */
|
|
600
412
|
setMessages(locale, messages) {
|
|
601
413
|
this.messages[locale] = messages;
|
|
602
414
|
}
|
|
603
|
-
/**
|
|
604
|
-
* Remove messages for a locale.
|
|
605
|
-
*/
|
|
606
415
|
removeLocale(locale) {
|
|
607
416
|
delete this.messages[locale];
|
|
608
417
|
}
|
|
609
|
-
/**
|
|
610
|
-
* Clear all messages.
|
|
611
|
-
*/
|
|
612
418
|
clear() {
|
|
613
419
|
this.messages = {};
|
|
614
420
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export type { InertiaResponse, InferInertiaProps, ControllerInertiaProps, AuthPa
|
|
|
6
6
|
export { renderDocument } from './mvc/view.js';
|
|
7
7
|
export type { ViewOptions } from './mvc/view.js';
|
|
8
8
|
export type { FC, PropsWithChildren } from 'hono/jsx';
|
|
9
|
+
export type { ContentfulStatusCode } from 'hono/utils/http-status';
|
|
9
10
|
export { viteAsset } from './http/vite-assets.js';
|
|
10
11
|
export type { ViteAssetOptions } from './http/vite-assets.js';
|
|
11
12
|
export { Router } from './mvc/Router.js';
|
|
@@ -66,7 +67,7 @@ export type { HealthStatus, CheckResult, HealthReport, HealthCheckOptions, Healt
|
|
|
66
67
|
export { Notification, NotificationManager, createNotificationManager, setNotificationManager, getNotificationManager, MailChannel, DatabaseChannel, SlackChannel, MemoryChannel, registerNotification, getNotification, clearNotificationRegistry, resolveNotifiableType, } from './notifications/index.js';
|
|
67
68
|
export type { NotificationConstructor, NotificationChannel, Notifiable, DatabaseNotification, NotificationMailMessage, NotificationAttachment, SlackMessage, SlackBlock, SlackAttachment, NotificationChannelFactory, NotificationManagerOptions, DatabaseChannelOptions, SentNotification, NotificationClass, MailChannelOptions, SlackChannelOptions, } from './notifications/index.js';
|
|
68
69
|
export { BroadcastManager, createBroadcastManager, setBroadcastManager, getBroadcastManager, Channel, PrivateChannel, PresenceChannel, MemoryDriver as MemoryBroadcastDriver, RedisDriver as RedisBroadcastDriver, } from './broadcasting/index.js';
|
|
69
|
-
export type { BroadcastEvent, BroadcastDriver, PresenceBroadcastDriver, ChannelAuthorizer, PresenceChannelAuthorizer, PresenceMember, SSEClient, WebSocketClient, BroadcastManagerOptions, BroadcastDriverFactory, ChannelRegistration, SSEMiddlewareOptions, AuthMiddlewareOptions, BroadcastableEvent, RedisClient as BroadcastRedisClient, RedisDriverOptions as BroadcastRedisDriverOptions, } from './broadcasting/index.js';
|
|
70
|
+
export type { BroadcastEvent, BroadcastDriver, PresenceBroadcastDriver, ChannelAuthorizer, PresenceChannelAuthorizer, PresenceMember, SSEClient, WebSocketClient, BroadcastManagerOptions, BroadcastDriverFactory, ChannelRegistration, SSEMiddlewareOptions, AuthMiddlewareOptions, BroadcastableEvent, MemoryDriverOptions as BroadcastMemoryDriverOptions, RedisClient as BroadcastRedisClient, RedisDriverOptions as BroadcastRedisDriverOptions, } from './broadcasting/index.js';
|
|
70
71
|
export { Container, createContainer, setContainer, getContainer, resolve, ServiceProvider, ProviderManager, definePlugin, defineModule, mountModuleRoutes, } from './container/index.js';
|
|
71
72
|
export type { PluginDefinition, PluginFactory, ModuleDefinition, GurenModule, ServiceFactory, ServiceClass, ServiceBinding, ServiceBindings, ContextualBindingBuilder, ContextualNeedsBuilder, ContextualBinding, ServiceProviderOptions, Provider as ContainerProvider, ServiceProviderClass, } from './container/index.js';
|
|
72
73
|
export { HttpException, ExceptionHandler, createExceptionHandler, setExceptionHandler, getExceptionHandler, abort, abortIf, abortUnless, ValidationException, AuthenticationException, AuthorizationException, NotFoundHttpException, MethodNotAllowedException, } from './errors/index.js';
|