stratal 0.0.17 → 0.0.19
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/README.md +8 -8
- package/dist/{base-email.provider-DypUAfWm.mjs → base-email.provider-mjynzewK.mjs} +1 -1
- package/dist/{base-email.provider-DypUAfWm.mjs.map → base-email.provider-mjynzewK.mjs.map} +1 -1
- package/dist/bin/cloudflare-workers-loader.mjs +33 -1
- package/dist/bin/cloudflare-workers-loader.mjs.map +1 -1
- package/dist/bin/quarry.mjs +169 -7
- package/dist/bin/quarry.mjs.map +1 -1
- package/dist/cache/index.d.mts +3 -2
- package/dist/cache/index.d.mts.map +1 -1
- package/dist/cache/index.mjs +3 -10
- package/dist/cache/index.mjs.map +1 -1
- package/dist/{colors-Y7WIFXs7.mjs → colors-DJaRDXoS.mjs} +1 -1
- package/dist/{colors-Y7WIFXs7.mjs.map → colors-DJaRDXoS.mjs.map} +1 -1
- package/dist/{command-B1CPgsrU.mjs → command-BgSlsS4M.mjs} +3 -3
- package/dist/command-BgSlsS4M.mjs.map +1 -0
- package/dist/{command-TnkPYWta.d.mts → command-DsQq56Lp.d.mts} +2 -2
- package/dist/{command-TnkPYWta.d.mts.map → command-DsQq56Lp.d.mts.map} +1 -1
- package/dist/config/index.d.mts +81 -37
- package/dist/config/index.d.mts.map +1 -1
- package/dist/config/index.mjs +135 -61
- package/dist/config/index.mjs.map +1 -1
- package/dist/{consumer-registry-Bymm6ff4.d.mts → consumer-registry-Doom7BEh.d.mts} +1 -1
- package/dist/{consumer-registry-Bymm6ff4.d.mts.map → consumer-registry-Doom7BEh.d.mts.map} +1 -1
- package/dist/controller.decorator-LZY9aHYG.mjs +66 -0
- package/dist/controller.decorator-LZY9aHYG.mjs.map +1 -0
- package/dist/cron/index.d.mts +4 -3
- package/dist/cron/index.d.mts.map +1 -1
- package/dist/cron/index.mjs +1 -3
- package/dist/{cron-manager-CFBamKKk.mjs → cron-manager-C30t9UZM.mjs} +29 -19
- package/dist/cron-manager-C30t9UZM.mjs.map +1 -0
- package/dist/{cron-manager-D7imGwUT.d.mts → cron-manager-RuPtFVLy.d.mts} +28 -14
- package/dist/cron-manager-RuPtFVLy.d.mts.map +1 -0
- package/dist/di/index.d.mts +2 -2
- package/dist/di/index.mjs +3 -3
- package/dist/email/index.d.mts +3 -3
- package/dist/email/index.mjs +87 -18
- package/dist/email/index.mjs.map +1 -1
- package/dist/{en-DaewN8hc.mjs → en-rHmW6vD9.mjs} +14 -31
- package/dist/en-rHmW6vD9.mjs.map +1 -0
- package/dist/env-CamWD-U1.d.mts +25 -0
- package/dist/env-CamWD-U1.d.mts.map +1 -0
- package/dist/errors/index.d.mts +2 -2
- package/dist/errors/index.mjs +2 -3
- package/dist/errors-B4pYgYON.mjs +1714 -0
- package/dist/errors-B4pYgYON.mjs.map +1 -0
- package/dist/{errors-DuAR5Wke.mjs → errors-BUyUfr2Z.mjs} +14 -7
- package/dist/errors-BUyUfr2Z.mjs.map +1 -0
- package/dist/events/index.d.mts +2 -2
- package/dist/events/index.mjs +1 -2
- package/dist/{events-CvUSgEuN.mjs → events-COKixqnG.mjs} +2 -2
- package/dist/{events-CvUSgEuN.mjs.map → events-COKixqnG.mjs.map} +1 -1
- package/dist/{gateway-context-CNOLkLUC.mjs → gateway-context-cqZ8wMoi.mjs} +4 -9
- package/dist/gateway-context-cqZ8wMoi.mjs.map +1 -0
- package/dist/guards/index.d.mts +14 -5
- package/dist/guards/index.d.mts.map +1 -1
- package/dist/guards/index.mjs +1 -1
- package/dist/{guards-DUk_Kzst.mjs → guards-DMbsAxSX.mjs} +1 -1
- package/dist/guards-DMbsAxSX.mjs.map +1 -0
- package/dist/http-method.decorator-BT3ufnz8.mjs +96 -0
- package/dist/http-method.decorator-BT3ufnz8.mjs.map +1 -0
- package/dist/i18n/index.d.mts +3 -3
- package/dist/i18n/index.mjs +3 -16
- package/dist/i18n/messages/en/index.d.mts +1 -1
- package/dist/i18n/messages/en/index.mjs +1 -1
- package/dist/i18n/utils/index.d.mts +30 -0
- package/dist/i18n/utils/index.d.mts.map +1 -0
- package/dist/i18n/utils/index.mjs +2 -0
- package/dist/i18n/validation/index.d.mts +1 -1
- package/dist/i18n/validation/index.mjs +1 -1
- package/dist/i18n.module-CI_prYFD.mjs +2340 -0
- package/dist/i18n.module-CI_prYFD.mjs.map +1 -0
- package/dist/{index-NGxg-KP_.d.mts → index-B437eK7p.d.mts} +59 -16
- package/dist/index-B437eK7p.d.mts.map +1 -0
- package/dist/{index-Dp6A5ywM.d.mts → index-CWRS7Ri3.d.mts} +1 -1
- package/dist/{index-Dp6A5ywM.d.mts.map → index-CWRS7Ri3.d.mts.map} +1 -1
- package/dist/{index-D_w_Rmtd.d.mts → index-DFhEeFfC.d.mts} +13 -30
- package/dist/{index-D_w_Rmtd.d.mts.map → index-DFhEeFfC.d.mts.map} +1 -1
- package/dist/index-DPFqRs8L.d.mts +4318 -0
- package/dist/index-DPFqRs8L.d.mts.map +1 -0
- package/dist/{index-DGRe6Yoa.d.mts → index-Dnqm9ZB6.d.mts} +5 -4
- package/dist/index-Dnqm9ZB6.d.mts.map +1 -0
- package/dist/index-SHx31sBJ.d.mts +101 -0
- package/dist/index-SHx31sBJ.d.mts.map +1 -0
- package/dist/index.d.mts +5 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -20
- package/dist/{is-command-DJVI6wEJ.mjs → is-command-C6a7WTPw.mjs} +2 -2
- package/dist/{is-command-DJVI6wEJ.mjs.map → is-command-C6a7WTPw.mjs.map} +1 -1
- package/dist/{is-seeder-D5MIEcdz.mjs → is-seeder-CebjZCDn.mjs} +1 -1
- package/dist/{is-seeder-D5MIEcdz.mjs.map → is-seeder-CebjZCDn.mjs.map} +1 -1
- package/dist/logger/index.d.mts +1 -1
- package/dist/logger/index.mjs +1 -1
- package/dist/{logger-CGT91VY6.mjs → logger-V6Ms3QnQ.mjs} +63 -45
- package/dist/logger-V6Ms3QnQ.mjs.map +1 -0
- package/dist/macroable/index.d.mts +2 -0
- package/dist/macroable/index.mjs +2 -0
- package/dist/macroable-BmufBshB.mjs +122 -0
- package/dist/macroable-BmufBshB.mjs.map +1 -0
- package/dist/module/index.d.mts +3 -4
- package/dist/module/index.d.mts.map +1 -1
- package/dist/module/index.mjs +1 -10
- package/dist/module-qGE_1duv.mjs +732 -0
- package/dist/module-qGE_1duv.mjs.map +1 -0
- package/dist/openapi/index.d.mts +3 -3
- package/dist/openapi/index.mjs +2 -15
- package/dist/{openapi-tools.service-B3TxYKoQ.mjs → openapi-tools.service-CYWGuhue.mjs} +4 -1
- package/dist/{openapi-tools.service-B3TxYKoQ.mjs.map → openapi-tools.service-CYWGuhue.mjs.map} +1 -1
- package/dist/{openapi.service-DGnX3Fc4.d.mts → openapi.service-Bv_NioM9.d.mts} +9 -17
- package/dist/openapi.service-Bv_NioM9.d.mts.map +1 -0
- package/dist/quarry/index.d.mts +26 -12
- package/dist/quarry/index.d.mts.map +1 -1
- package/dist/quarry/index.mjs +4 -8
- package/dist/{quarry-registry-B2rkO-JS.mjs → quarry-registry-DFfRRkA7.mjs} +45 -40
- package/dist/quarry-registry-DFfRRkA7.mjs.map +1 -0
- package/dist/queue/index.d.mts +2 -2
- package/dist/queue/index.mjs +3 -13
- package/dist/queue/index.mjs.map +1 -1
- package/dist/{queue.module-BtI8f4Jo.mjs → queue.module-P-G-nCYz.mjs} +39 -42
- package/dist/queue.module-P-G-nCYz.mjs.map +1 -0
- package/dist/r2-storage.provider-LdzK9tfG.mjs +244 -0
- package/dist/r2-storage.provider-LdzK9tfG.mjs.map +1 -0
- package/dist/{resend.provider-bXMEkdRJ.mjs → resend.provider-bwILp0WI.mjs} +2 -4
- package/dist/{resend.provider-bXMEkdRJ.mjs.map → resend.provider-bwILp0WI.mjs.map} +1 -1
- package/dist/router/index.d.mts +2 -2
- package/dist/router/index.mjs +7 -16
- package/dist/seeder/index.d.mts +3 -4
- package/dist/seeder/index.d.mts.map +1 -1
- package/dist/seeder/index.mjs +2 -6
- package/dist/{seeder-R7RXJC35.mjs → seeder-BcqIFa2X.mjs} +5 -5
- package/dist/{seeder-R7RXJC35.mjs.map → seeder-BcqIFa2X.mjs.map} +1 -1
- package/dist/setup-CtekcwuO.mjs +37 -0
- package/dist/setup-CtekcwuO.mjs.map +1 -0
- package/dist/signed-url-COX7cCWR.mjs +74 -0
- package/dist/signed-url-COX7cCWR.mjs.map +1 -0
- package/dist/{smtp.provider-DrbHQztF.mjs → smtp.provider-B07yuARi.mjs} +2 -4
- package/dist/{smtp.provider-DrbHQztF.mjs.map → smtp.provider-B07yuARi.mjs.map} +1 -1
- package/dist/storage/index.d.mts +39 -17
- package/dist/storage/index.d.mts.map +1 -1
- package/dist/storage/index.mjs +3 -14
- package/dist/storage/providers/index.d.mts +30 -69
- package/dist/storage/providers/index.d.mts.map +1 -1
- package/dist/storage/providers/index.mjs +2 -5
- package/dist/{storage-CZKHOhci.mjs → storage-P6X4h9So.mjs} +102 -29
- package/dist/storage-P6X4h9So.mjs.map +1 -0
- package/dist/{storage-provider.interface-0IqcdhBf.d.mts → storage-provider.interface-CC1nniHk.d.mts} +20 -15
- package/dist/storage-provider.interface-CC1nniHk.d.mts.map +1 -0
- package/dist/stratal-BCiwCFN9.mjs +533 -0
- package/dist/stratal-BCiwCFN9.mjs.map +1 -0
- package/dist/{types-DahElfUw.d.mts → types-DIWemRad.d.mts} +2 -2
- package/dist/types-DIWemRad.d.mts.map +1 -0
- package/dist/{usage-generator-CVIsENuE.mjs → usage-generator-MBcRo0Q2.mjs} +2 -2
- package/dist/{usage-generator-CVIsENuE.mjs.map → usage-generator-MBcRo0Q2.mjs.map} +1 -1
- package/dist/{validation-DQTC259A.mjs → validation-Dbg3ehdP.mjs} +2 -2
- package/dist/{validation-DQTC259A.mjs.map → validation-Dbg3ehdP.mjs.map} +1 -1
- package/dist/websocket/index.d.mts +3 -3
- package/dist/websocket/index.d.mts.map +1 -1
- package/dist/websocket/index.mjs +1 -4
- package/dist/workers/index.d.mts +2 -1
- package/dist/workers/index.d.mts.map +1 -1
- package/dist/workers/index.mjs +2 -20
- package/dist/workers/index.mjs.map +1 -1
- package/package.json +41 -50
- package/dist/application-DfPtIzxF.d.mts +0 -177
- package/dist/application-DfPtIzxF.d.mts.map +0 -1
- package/dist/command-B1CPgsrU.mjs.map +0 -1
- package/dist/cron-manager-CFBamKKk.mjs.map +0 -1
- package/dist/cron-manager-D7imGwUT.d.mts.map +0 -1
- package/dist/en-DaewN8hc.mjs.map +0 -1
- package/dist/errors-DSKapqD8.mjs +0 -707
- package/dist/errors-DSKapqD8.mjs.map +0 -1
- package/dist/errors-DuAR5Wke.mjs.map +0 -1
- package/dist/gateway-context-CNOLkLUC.mjs.map +0 -1
- package/dist/guards-DUk_Kzst.mjs.map +0 -1
- package/dist/i18n.module-Dn9SrFdS.mjs +0 -1841
- package/dist/i18n.module-Dn9SrFdS.mjs.map +0 -1
- package/dist/index-BFCxSp_f.d.mts +0 -2625
- package/dist/index-BFCxSp_f.d.mts.map +0 -1
- package/dist/index-DGRe6Yoa.d.mts.map +0 -1
- package/dist/index-NGxg-KP_.d.mts.map +0 -1
- package/dist/logger-CGT91VY6.mjs.map +0 -1
- package/dist/middleware/index.d.mts +0 -2
- package/dist/middleware/index.mjs +0 -5
- package/dist/middleware-Bl-b5pkt.mjs +0 -362
- package/dist/middleware-Bl-b5pkt.mjs.map +0 -1
- package/dist/module-registry-CmjBX6ol.d.mts +0 -121
- package/dist/module-registry-CmjBX6ol.d.mts.map +0 -1
- package/dist/module-tUtyVJ5E.mjs +0 -371
- package/dist/module-tUtyVJ5E.mjs.map +0 -1
- package/dist/openapi.service-DGnX3Fc4.d.mts.map +0 -1
- package/dist/quarry-registry-B2rkO-JS.mjs.map +0 -1
- package/dist/queue.module-BtI8f4Jo.mjs.map +0 -1
- package/dist/router-context-D9R1v2Ac.mjs +0 -267
- package/dist/router-context-D9R1v2Ac.mjs.map +0 -1
- package/dist/s3-storage.provider-CttzNnDR.mjs +0 -335
- package/dist/s3-storage.provider-CttzNnDR.mjs.map +0 -1
- package/dist/storage-CZKHOhci.mjs.map +0 -1
- package/dist/storage-provider.interface-0IqcdhBf.d.mts.map +0 -1
- package/dist/stratal-D5smIU1y.mjs +0 -315
- package/dist/stratal-D5smIU1y.mjs.map +0 -1
- package/dist/types-DahElfUw.d.mts.map +0 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { f as ROUTE_METADATA_KEYS } from "./errors-B4pYgYON.mjs";
|
|
2
|
+
import { i as z } from "./validation-Dbg3ehdP.mjs";
|
|
3
|
+
//#region src/router/decorators/http-method.decorator.ts
|
|
4
|
+
/**
|
|
5
|
+
* Creates an HTTP method decorator factory for the given HTTP method.
|
|
6
|
+
*
|
|
7
|
+
* The returned decorator stores {@link ExplicitRouteMetadata} on the method and
|
|
8
|
+
* tracks the method name under {@link ROUTE_METADATA_KEYS.DECORATED_METHODS}
|
|
9
|
+
* on the controller prototype so they can be discovered at registration time.
|
|
10
|
+
*/
|
|
11
|
+
function createHttpMethodDecorator(method) {
|
|
12
|
+
return function(path, config) {
|
|
13
|
+
return function(target, propertyKey, descriptor) {
|
|
14
|
+
const metadata = {
|
|
15
|
+
type: "explicit",
|
|
16
|
+
method,
|
|
17
|
+
path,
|
|
18
|
+
config: config ?? { response: z.any() }
|
|
19
|
+
};
|
|
20
|
+
Reflect.defineMetadata(ROUTE_METADATA_KEYS.ROUTE_CONFIG, metadata, target, propertyKey);
|
|
21
|
+
const existing = Reflect.getOwnMetadata(ROUTE_METADATA_KEYS.DECORATED_METHODS, target) ?? [];
|
|
22
|
+
existing.push(propertyKey);
|
|
23
|
+
Reflect.defineMetadata(ROUTE_METADATA_KEYS.DECORATED_METHODS, existing, target);
|
|
24
|
+
return descriptor;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Registers a GET route on the controller method.
|
|
30
|
+
*
|
|
31
|
+
* @param path - Route path relative to the controller base path
|
|
32
|
+
* @param config - Optional route configuration (response schema, body, params, etc.)
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* @Controller('/api/v1/users')
|
|
37
|
+
* class UsersController {
|
|
38
|
+
* @Get('/', { response: z.array(userSchema), summary: 'List users' })
|
|
39
|
+
* async list(ctx: RouterContext) { ... }
|
|
40
|
+
*
|
|
41
|
+
* @Get('/:id', { params: z.object({ id: z.string().uuid() }), response: userSchema })
|
|
42
|
+
* async getUser(ctx: RouterContext) { ... }
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
const Get = createHttpMethodDecorator("get");
|
|
47
|
+
/**
|
|
48
|
+
* Registers a POST route on the controller method.
|
|
49
|
+
*
|
|
50
|
+
* @param path - Route path relative to the controller base path
|
|
51
|
+
* @param config - Optional route configuration (response schema, body, params, etc.)
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```typescript
|
|
55
|
+
* @Controller('/api/v1/users')
|
|
56
|
+
* class UsersController {
|
|
57
|
+
* @Post('/', { body: createUserSchema, response: userSchema, statusCode: 201 })
|
|
58
|
+
* async createUser(ctx: RouterContext) { ... }
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
const Post = createHttpMethodDecorator("post");
|
|
63
|
+
/**
|
|
64
|
+
* Registers a PUT route on the controller method.
|
|
65
|
+
*
|
|
66
|
+
* @param path - Route path relative to the controller base path
|
|
67
|
+
* @param config - Optional route configuration
|
|
68
|
+
*/
|
|
69
|
+
const Put = createHttpMethodDecorator("put");
|
|
70
|
+
/**
|
|
71
|
+
* Registers a PATCH route on the controller method.
|
|
72
|
+
*
|
|
73
|
+
* @param path - Route path relative to the controller base path
|
|
74
|
+
* @param config - Optional route configuration
|
|
75
|
+
*/
|
|
76
|
+
const Patch = createHttpMethodDecorator("patch");
|
|
77
|
+
/**
|
|
78
|
+
* Registers a DELETE route on the controller method.
|
|
79
|
+
*
|
|
80
|
+
* @param path - Route path relative to the controller base path
|
|
81
|
+
* @param config - Optional route configuration
|
|
82
|
+
*/
|
|
83
|
+
const Delete = createHttpMethodDecorator("delete");
|
|
84
|
+
/**
|
|
85
|
+
* Registers an ALL (any HTTP method) route on the controller method.
|
|
86
|
+
* Routes using @All are registered without OpenAPI validation
|
|
87
|
+
* since OpenAPI does not support a catch-all HTTP method.
|
|
88
|
+
*
|
|
89
|
+
* @param path - Route path relative to the controller base path
|
|
90
|
+
* @param config - Optional route configuration
|
|
91
|
+
*/
|
|
92
|
+
const All = createHttpMethodDecorator("all");
|
|
93
|
+
//#endregion
|
|
94
|
+
export { Post as a, Patch as i, Delete as n, Put as o, Get as r, All as t };
|
|
95
|
+
|
|
96
|
+
//# sourceMappingURL=http-method.decorator-BT3ufnz8.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-method.decorator-BT3ufnz8.mjs","names":[],"sources":["../src/router/decorators/http-method.decorator.ts"],"sourcesContent":["import { z } from '../../i18n/validation'\nimport { ROUTE_METADATA_KEYS } from '../constants'\nimport type { ExplicitRouteMetadata, HttpMethod, RouteConfig } from '../types'\n\n/**\n * Creates an HTTP method decorator factory for the given HTTP method.\n *\n * The returned decorator stores {@link ExplicitRouteMetadata} on the method and\n * tracks the method name under {@link ROUTE_METADATA_KEYS.DECORATED_METHODS}\n * on the controller prototype so they can be discovered at registration time.\n */\nfunction createHttpMethodDecorator(method: HttpMethod) {\n return function (path: string, config?: RouteConfig) {\n return function (\n target: object,\n propertyKey: string,\n descriptor: PropertyDescriptor\n ) {\n const metadata: ExplicitRouteMetadata = {\n type: 'explicit',\n method,\n path,\n config: config ?? { response: z.any() },\n }\n\n Reflect.defineMetadata(\n ROUTE_METADATA_KEYS.ROUTE_CONFIG,\n metadata,\n target,\n propertyKey\n )\n\n // Track this method as decorated on the prototype\n const existing: string[] =\n (Reflect.getOwnMetadata(ROUTE_METADATA_KEYS.DECORATED_METHODS, target) as string[] | undefined) ?? []\n existing.push(propertyKey)\n Reflect.defineMetadata(ROUTE_METADATA_KEYS.DECORATED_METHODS, existing, target)\n\n return descriptor\n }\n }\n}\n\n/**\n * Registers a GET route on the controller method.\n *\n * @param path - Route path relative to the controller base path\n * @param config - Optional route configuration (response schema, body, params, etc.)\n *\n * @example\n * ```typescript\n * @Controller('/api/v1/users')\n * class UsersController {\n * @Get('/', { response: z.array(userSchema), summary: 'List users' })\n * async list(ctx: RouterContext) { ... }\n *\n * @Get('/:id', { params: z.object({ id: z.string().uuid() }), response: userSchema })\n * async getUser(ctx: RouterContext) { ... }\n * }\n * ```\n */\nexport const Get = createHttpMethodDecorator('get')\n\n/**\n * Registers a POST route on the controller method.\n *\n * @param path - Route path relative to the controller base path\n * @param config - Optional route configuration (response schema, body, params, etc.)\n *\n * @example\n * ```typescript\n * @Controller('/api/v1/users')\n * class UsersController {\n * @Post('/', { body: createUserSchema, response: userSchema, statusCode: 201 })\n * async createUser(ctx: RouterContext) { ... }\n * }\n * ```\n */\nexport const Post = createHttpMethodDecorator('post')\n\n/**\n * Registers a PUT route on the controller method.\n *\n * @param path - Route path relative to the controller base path\n * @param config - Optional route configuration\n */\nexport const Put = createHttpMethodDecorator('put')\n\n/**\n * Registers a PATCH route on the controller method.\n *\n * @param path - Route path relative to the controller base path\n * @param config - Optional route configuration\n */\nexport const Patch = createHttpMethodDecorator('patch')\n\n/**\n * Registers a DELETE route on the controller method.\n *\n * @param path - Route path relative to the controller base path\n * @param config - Optional route configuration\n */\nexport const Delete = createHttpMethodDecorator('delete')\n\n/**\n * Registers an ALL (any HTTP method) route on the controller method.\n * Routes using @All are registered without OpenAPI validation\n * since OpenAPI does not support a catch-all HTTP method.\n *\n * @param path - Route path relative to the controller base path\n * @param config - Optional route configuration\n */\nexport const All = createHttpMethodDecorator('all')\n"],"mappings":";;;;;;;;;;AAWA,SAAS,0BAA0B,QAAoB;AACrD,QAAO,SAAU,MAAc,QAAsB;AACnD,SAAO,SACL,QACA,aACA,YACA;GACA,MAAM,WAAkC;IACtC,MAAM;IACN;IACA;IACA,QAAQ,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE;IACxC;AAED,WAAQ,eACN,oBAAoB,cACpB,UACA,QACA,YACD;GAGD,MAAM,WACH,QAAQ,eAAe,oBAAoB,mBAAmB,OAAO,IAA6B,EAAE;AACvG,YAAS,KAAK,YAAY;AAC1B,WAAQ,eAAe,oBAAoB,mBAAmB,UAAU,OAAO;AAE/E,UAAO;;;;;;;;;;;;;;;;;;;;;;AAuBb,MAAa,MAAM,0BAA0B,MAAM;;;;;;;;;;;;;;;;AAiBnD,MAAa,OAAO,0BAA0B,OAAO;;;;;;;AAQrD,MAAa,MAAM,0BAA0B,MAAM;;;;;;;AAQnD,MAAa,QAAQ,0BAA0B,QAAQ;;;;;;;AAQvD,MAAa,SAAS,0BAA0B,SAAS;;;;;;;;;AAUzD,MAAa,MAAM,0BAA0B,MAAM"}
|
package/dist/i18n/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as
|
|
3
|
-
export { AppMessageKeys, AppMessages, DeepKeys, I18N_TOKENS, I18nContextMiddleware, I18nModule, I18nModuleOptions, II18nService,
|
|
1
|
+
import { A as LocaleNotSupportedError, C as DetectionStrategy, D as buildDetectorOptions, E as ResolvedI18nOptions, O as resolveI18nOptions, S as I18nModule, T as LanguageDetectionOptions, _ as Messages, b as messages, g as MessageRegistry, h as MessageLoaderService, k as TranslationMissingError, m as I18nContextMiddleware, v as getLocales, w as I18nModuleOptions, x as I18N_TOKENS, y as getMessages } from "../index-DPFqRs8L.mjs";
|
|
2
|
+
import { C as SystemMessageKeys, S as Prefixes, _ as DeepKeys, b as MessageKeys, g as AppMessages, h as AppMessageNamespaces, m as AppMessageKeys, v as II18nService, x as MessageParams, y as MessageKeyPrefix } from "../index-B437eK7p.mjs";
|
|
3
|
+
export { AppMessageKeys, AppMessageNamespaces, AppMessages, DeepKeys, DetectionStrategy, I18N_TOKENS, I18nContextMiddleware, I18nModule, I18nModuleOptions, II18nService, LanguageDetectionOptions, LocaleNotSupportedError, MessageKeyPrefix, MessageKeys, MessageLoaderService, MessageParams, MessageRegistry, Messages, Prefixes, ResolvedI18nOptions, SystemMessageKeys, TranslationMissingError, buildDetectorOptions, getLocales, getMessages, messages, resolveI18nOptions };
|
package/dist/i18n/index.mjs
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../
|
|
3
|
-
|
|
4
|
-
import "../events-CvUSgEuN.mjs";
|
|
5
|
-
import "../middleware-Bl-b5pkt.mjs";
|
|
6
|
-
import "../router-context-D9R1v2Ac.mjs";
|
|
7
|
-
import "../colors-Y7WIFXs7.mjs";
|
|
8
|
-
import "../command-B1CPgsrU.mjs";
|
|
9
|
-
import "../is-command-DJVI6wEJ.mjs";
|
|
10
|
-
import "../is-seeder-D5MIEcdz.mjs";
|
|
11
|
-
import "../validation-DQTC259A.mjs";
|
|
12
|
-
import { A as LocaleNotSupportedError, F as getMessages, I as messages, M as setupI18nCompiler, N as MessageRegistry, P as getLocales, R as LocaleExtractionMiddleware, j as resolveI18nOptions, k as TranslationMissingError, t as I18nModule, z as I18nContextMiddleware } from "../i18n.module-Dn9SrFdS.mjs";
|
|
13
|
-
import "../openapi-tools.service-B3TxYKoQ.mjs";
|
|
14
|
-
import "../guards-DUk_Kzst.mjs";
|
|
15
|
-
import "../gateway-context-CNOLkLUC.mjs";
|
|
16
|
-
export { I18N_TOKENS, I18nContextMiddleware, I18nModule, LocaleExtractionMiddleware, LocaleNotSupportedError, MessageRegistry, TranslationMissingError, getLocales, getMessages, messages, resolveI18nOptions, setupI18nCompiler };
|
|
1
|
+
import { w as I18N_TOKENS } from "../errors-B4pYgYON.mjs";
|
|
2
|
+
import { B as LocaleNotSupportedError, F as getMessages, H as I18nContextMiddleware, I as messages, L as buildDetectorOptions, M as MessageRegistry, N as MessageLoaderService, P as getLocales, R as resolveI18nOptions, t as I18nModule, z as TranslationMissingError } from "../i18n.module-CI_prYFD.mjs";
|
|
3
|
+
export { I18N_TOKENS, I18nContextMiddleware, I18nModule, LocaleNotSupportedError, MessageLoaderService, MessageRegistry, TranslationMissingError, buildDetectorOptions, getLocales, getMessages, messages, resolveI18nOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as errors, i as emails, n as zodI18n, o as common, r as validation } from "../../../index-
|
|
1
|
+
import { a as errors, i as emails, n as zodI18n, o as common, r as validation } from "../../../index-DFhEeFfC.mjs";
|
|
2
2
|
export { common, emails, errors, validation, zodI18n };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as errors, i as emails, n as zodI18n, o as common, r as validation } from "../../../en-
|
|
1
|
+
import { a as errors, i as emails, n as zodI18n, o as common, r as validation } from "../../../en-rHmW6vD9.mjs";
|
|
2
2
|
export { common, emails, errors, validation, zodI18n };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/i18n/utils/setup.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* I18n Setup - Message Compiler Registration
|
|
4
|
+
*
|
|
5
|
+
* Registers a JIT (Just-In-Time) message compiler for @intlify/core-base
|
|
6
|
+
* that works in Cloudflare Workers edge runtime.
|
|
7
|
+
*
|
|
8
|
+
* This must be called ONCE at application startup, before any I18nService instances are created.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Setup JIT message compiler for i18n
|
|
12
|
+
*
|
|
13
|
+
* Registers a message compiler that uses JIT compilation mode.
|
|
14
|
+
* In @intlify/core-base v10+, JIT mode is enabled by default, which generates
|
|
15
|
+
* AST (Abstract Syntax Tree) instead of JavaScript code, making it compatible
|
|
16
|
+
* with CSP-restricted environments like Cloudflare Workers.
|
|
17
|
+
*
|
|
18
|
+
* **IMPORTANT:** Call this function once at application startup before creating
|
|
19
|
+
* any I18nService instances. Safe to call multiple times (only registers once).
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* // In application entry point (before app.initialize())
|
|
24
|
+
* setupI18nCompiler()
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare function setupI18nCompiler(): void;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { setupI18nCompiler };
|
|
30
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/i18n/utils/setup.ts"],"mappings":";;AA8BA;;;;;;;;;;;;;;;;;;;;;;;;iBAAgB,iBAAA,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as runWithErrorMapContext, d as LocaleProvider, f as ZodCustomIssue, i as ZodError, l as ErrorMapContext, n as OpenAPIObject, o as z, p as withI18n, r as PathItemObject, s as backendErrorMap, t as OpenAPIHono, u as I18nErrorMetadata } from "../../index-
|
|
1
|
+
import { c as runWithErrorMapContext, d as LocaleProvider, f as ZodCustomIssue, i as ZodError, l as ErrorMapContext, n as OpenAPIObject, o as z, p as withI18n, r as PathItemObject, s as backendErrorMap, t as OpenAPIHono, u as I18nErrorMetadata } from "../../index-B437eK7p.mjs";
|
|
2
2
|
export * from "@hono/zod-openapi";
|
|
3
3
|
export * from "zod";
|
|
4
4
|
export { ErrorMapContext, I18nErrorMetadata, LocaleProvider, OpenAPIHono, OpenAPIObject, PathItemObject, ZodCustomIssue, ZodError, backendErrorMap, runWithErrorMapContext, withI18n, z };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as withI18n, i as z, n as ZodError, o as backendErrorMap, s as runWithErrorMapContext, t as OpenAPIHono } from "../../validation-
|
|
1
|
+
import { a as withI18n, i as z, n as ZodError, o as backendErrorMap, s as runWithErrorMapContext, t as OpenAPIHono } from "../../validation-Dbg3ehdP.mjs";
|
|
2
2
|
export * from "@hono/zod-openapi";
|
|
3
3
|
export { OpenAPIHono, ZodError, backendErrorMap, runWithErrorMapContext, withI18n, z };
|