stratal 0.0.16 → 0.0.17
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 +4 -0
- package/dist/{application-zG8b-pol.d.mts → application-DfPtIzxF.d.mts} +65 -4
- package/dist/application-DfPtIzxF.d.mts.map +1 -0
- package/dist/{base-email.provider-Cuw4OAB0.mjs → base-email.provider-DypUAfWm.mjs} +1 -1
- package/dist/{base-email.provider-Cuw4OAB0.mjs.map → base-email.provider-DypUAfWm.mjs.map} +1 -1
- package/dist/bin/cloudflare-workers-loader.mjs +0 -0
- package/dist/bin/quarry.mjs +1 -50
- package/dist/bin/quarry.mjs.map +1 -1
- package/dist/cache/index.d.mts +1 -1
- package/dist/cache/index.mjs +10 -11
- package/dist/cache/index.mjs.map +1 -1
- package/dist/{colors-DJaRDXoS.mjs → colors-Y7WIFXs7.mjs} +1 -1
- package/dist/{colors-DJaRDXoS.mjs.map → colors-Y7WIFXs7.mjs.map} +1 -1
- package/dist/{command-BvCOD6df.mjs → command-B1CPgsrU.mjs} +6 -3
- package/dist/{command-BvCOD6df.mjs.map → command-B1CPgsrU.mjs.map} +1 -1
- package/dist/{command-B-QH-Vu3.d.mts → command-TnkPYWta.d.mts} +2 -2
- package/dist/{command-B-QH-Vu3.d.mts.map → command-TnkPYWta.d.mts.map} +1 -1
- package/dist/config/index.d.mts +2 -2
- package/dist/config/index.mjs +10 -11
- package/dist/config/index.mjs.map +1 -1
- package/dist/consumer-registry-Bymm6ff4.d.mts +142 -0
- package/dist/consumer-registry-Bymm6ff4.d.mts.map +1 -0
- package/dist/cron/index.d.mts +3 -116
- package/dist/cron/index.d.mts.map +1 -1
- package/dist/cron/index.mjs +3 -4
- package/dist/{cron-manager-DR7fiG6o.mjs → cron-manager-CFBamKKk.mjs} +3 -3
- package/dist/{cron-manager-DR7fiG6o.mjs.map → cron-manager-CFBamKKk.mjs.map} +1 -1
- package/dist/cron-manager-D7imGwUT.d.mts +117 -0
- package/dist/cron-manager-D7imGwUT.d.mts.map +1 -0
- package/dist/di/index.d.mts +1 -1
- package/dist/di/index.mjs +2 -3
- package/dist/email/index.d.mts +3 -3
- package/dist/email/index.mjs +16 -17
- package/dist/email/index.mjs.map +1 -1
- package/dist/errors/index.d.mts +1 -1
- package/dist/errors/index.mjs +2 -3
- package/dist/{errors-CtCi1wn6.mjs → errors-DSKapqD8.mjs} +4 -4
- package/dist/{errors-CtCi1wn6.mjs.map → errors-DSKapqD8.mjs.map} +1 -1
- package/dist/{errors-H3TZnVeX.mjs → errors-DuAR5Wke.mjs} +2 -2
- package/dist/{errors-H3TZnVeX.mjs.map → errors-DuAR5Wke.mjs.map} +1 -1
- package/dist/events/index.mjs +2 -3
- package/dist/{events-CXl-o1Ad.mjs → events-CvUSgEuN.mjs} +2 -3
- package/dist/{events-CXl-o1Ad.mjs.map → events-CvUSgEuN.mjs.map} +1 -1
- package/dist/{gateway-context-BkZ4UKaX.mjs → gateway-context-CNOLkLUC.mjs} +4 -4
- package/dist/{gateway-context-BkZ4UKaX.mjs.map → gateway-context-CNOLkLUC.mjs.map} +1 -1
- package/dist/guards/index.d.mts +1 -1
- package/dist/i18n/index.d.mts +3 -3
- package/dist/i18n/index.mjs +15 -15
- package/dist/i18n/validation/index.d.mts +1 -1
- package/dist/i18n/validation/index.mjs +1 -1
- package/dist/{i18n.module-W8OJxg3d.mjs → i18n.module-Dn9SrFdS.mjs} +210 -160
- package/dist/i18n.module-Dn9SrFdS.mjs.map +1 -0
- package/dist/{index-BJWm863C.d.mts → index-BFCxSp_f.d.mts} +82 -73
- package/dist/index-BFCxSp_f.d.mts.map +1 -0
- package/dist/{index-D9iYu2Yc.d.mts → index-DGRe6Yoa.d.mts} +5 -144
- package/dist/index-DGRe6Yoa.d.mts.map +1 -0
- package/dist/{index-DVhdhLvE.d.mts → index-NGxg-KP_.d.mts} +4 -4
- package/dist/{index-DVhdhLvE.d.mts.map → index-NGxg-KP_.d.mts.map} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +19 -19
- package/dist/{is-command-BfCgWAcQ.mjs → is-command-DJVI6wEJ.mjs} +2 -2
- package/dist/{is-command-BfCgWAcQ.mjs.map → is-command-DJVI6wEJ.mjs.map} +1 -1
- package/dist/{is-seeder-CebjZCDn.mjs → is-seeder-D5MIEcdz.mjs} +1 -1
- package/dist/{is-seeder-CebjZCDn.mjs.map → is-seeder-D5MIEcdz.mjs.map} +1 -1
- package/dist/logger/index.mjs +1 -2
- package/dist/{logger-BR1-s1Um.mjs → logger-CGT91VY6.mjs} +170 -4
- package/dist/logger-CGT91VY6.mjs.map +1 -0
- package/dist/middleware/index.d.mts +1 -1
- package/dist/middleware/index.mjs +4 -5
- package/dist/{middleware-C0Ebzswy.mjs → middleware-Bl-b5pkt.mjs} +3 -3
- package/dist/{middleware-C0Ebzswy.mjs.map → middleware-Bl-b5pkt.mjs.map} +1 -1
- package/dist/module/index.d.mts +2 -117
- package/dist/module/index.d.mts.map +1 -1
- package/dist/module/index.mjs +10 -11
- package/dist/module-registry-CmjBX6ol.d.mts +121 -0
- package/dist/module-registry-CmjBX6ol.d.mts.map +1 -0
- package/dist/{module-BgdxxzBe.mjs → module-tUtyVJ5E.mjs} +9 -8
- package/dist/module-tUtyVJ5E.mjs.map +1 -0
- package/dist/openapi/index.d.mts +54 -54
- package/dist/openapi/index.d.mts.map +1 -1
- package/dist/openapi/index.mjs +15 -15
- package/dist/openapi-tools.service-B3TxYKoQ.mjs +197 -0
- package/dist/openapi-tools.service-B3TxYKoQ.mjs.map +1 -0
- package/dist/openapi.service-DGnX3Fc4.d.mts +58 -0
- package/dist/openapi.service-DGnX3Fc4.d.mts.map +1 -0
- package/dist/quarry/index.d.mts +109 -28
- package/dist/quarry/index.d.mts.map +1 -1
- package/dist/quarry/index.mjs +9 -7
- package/dist/quarry-registry-B2rkO-JS.mjs +683 -0
- package/dist/quarry-registry-B2rkO-JS.mjs.map +1 -0
- package/dist/queue/index.d.mts +2 -1
- package/dist/queue/index.mjs +11 -12
- package/dist/queue/index.mjs.map +1 -1
- package/dist/{queue.module-BZvmeAMj.mjs → queue.module-BtI8f4Jo.mjs} +4 -4
- package/dist/{queue.module-BZvmeAMj.mjs.map → queue.module-BtI8f4Jo.mjs.map} +1 -1
- package/dist/{resend.provider-BCCACQAU.mjs → resend.provider-bXMEkdRJ.mjs} +4 -5
- package/dist/{resend.provider-BCCACQAU.mjs.map → resend.provider-bXMEkdRJ.mjs.map} +1 -1
- package/dist/router/index.d.mts +1 -1
- package/dist/router/index.mjs +14 -14
- package/dist/{router-context-BEJe9HEB.mjs → router-context-D9R1v2Ac.mjs} +7 -4
- package/dist/router-context-D9R1v2Ac.mjs.map +1 -0
- package/dist/{s3-storage.provider-BLlzQYiJ.mjs → s3-storage.provider-CttzNnDR.mjs} +5 -6
- package/dist/{s3-storage.provider-BLlzQYiJ.mjs.map → s3-storage.provider-CttzNnDR.mjs.map} +1 -1
- package/dist/seeder/index.d.mts +3 -3
- package/dist/seeder/index.mjs +6 -7
- package/dist/{seeder-Cupi5jl-.mjs → seeder-R7RXJC35.mjs} +20 -17
- package/dist/seeder-R7RXJC35.mjs.map +1 -0
- package/dist/{smtp.provider-B8XtOcHU.mjs → smtp.provider-DrbHQztF.mjs} +4 -5
- package/dist/{smtp.provider-B8XtOcHU.mjs.map → smtp.provider-DrbHQztF.mjs.map} +1 -1
- package/dist/storage/index.d.mts +2 -195
- package/dist/storage/index.d.mts.map +1 -1
- package/dist/storage/index.mjs +13 -14
- package/dist/storage/providers/index.d.mts +272 -0
- package/dist/storage/providers/index.d.mts.map +1 -0
- package/dist/storage/providers/index.mjs +5 -0
- package/dist/{storage-By_ow2o_.mjs → storage-CZKHOhci.mjs} +7 -7
- package/dist/{storage-By_ow2o_.mjs.map → storage-CZKHOhci.mjs.map} +1 -1
- package/dist/storage-provider.interface-0IqcdhBf.d.mts +197 -0
- package/dist/storage-provider.interface-0IqcdhBf.d.mts.map +1 -0
- package/dist/{stratal-CE0iTz4f.mjs → stratal-D5smIU1y.mjs} +22 -12
- package/dist/stratal-D5smIU1y.mjs.map +1 -0
- package/dist/{usage-generator-C9hWziY4.mjs → usage-generator-CVIsENuE.mjs} +2 -2
- package/dist/{usage-generator-C9hWziY4.mjs.map → usage-generator-CVIsENuE.mjs.map} +1 -1
- package/dist/{validation-Bh875Lyg.mjs → validation-DQTC259A.mjs} +4 -4
- package/dist/{validation-Bh875Lyg.mjs.map → validation-DQTC259A.mjs.map} +1 -1
- package/dist/websocket/index.d.mts +1 -1
- package/dist/websocket/index.mjs +4 -5
- package/dist/workers/index.d.mts +1 -1
- package/dist/workers/index.mjs +19 -19
- package/package.json +13 -8
- package/dist/application-zG8b-pol.d.mts.map +0 -1
- package/dist/decorate-D5j-d9_z.mjs +0 -171
- package/dist/decorate-D5j-d9_z.mjs.map +0 -1
- package/dist/i18n.module-W8OJxg3d.mjs.map +0 -1
- package/dist/index-BJWm863C.d.mts.map +0 -1
- package/dist/index-D9iYu2Yc.d.mts.map +0 -1
- package/dist/logger-BR1-s1Um.mjs.map +0 -1
- package/dist/module-BgdxxzBe.mjs.map +0 -1
- package/dist/quarry-registry-DCwqVcRp.mjs +0 -310
- package/dist/quarry-registry-DCwqVcRp.mjs.map +0 -1
- package/dist/router-context-BEJe9HEB.mjs.map +0 -1
- package/dist/seeder-Cupi5jl-.mjs.map +0 -1
- package/dist/stratal-CE0iTz4f.mjs.map +0 -1
- package/dist/types-CLhOhYsQ.d.mts +0 -64
- package/dist/types-CLhOhYsQ.d.mts.map +0 -1
|
@@ -1,146 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as II18nService } from "./index-
|
|
1
|
+
import { Ut as StratalEnv, at as DynamicModule, rt as AsyncModuleOptions, s as ApplicationError } from "./index-BFCxSp_f.mjs";
|
|
2
|
+
import { _ as II18nService } from "./index-NGxg-KP_.mjs";
|
|
3
|
+
import { r as QueueMessage, t as ConsumerRegistry } from "./consumer-registry-Bymm6ff4.mjs";
|
|
3
4
|
|
|
4
|
-
//#region src/queue/queue-consumer.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Queue message structure
|
|
7
|
-
*
|
|
8
|
-
* All messages dispatched to queues follow this structure.
|
|
9
|
-
* The `id` and `timestamp` are auto-generated by QueueSender.
|
|
10
|
-
*/
|
|
11
|
-
interface QueueMessage<T = unknown> {
|
|
12
|
-
/** Unique message identifier (UUID) */
|
|
13
|
-
id: string;
|
|
14
|
-
/** Timestamp when message was dispatched (milliseconds since epoch) */
|
|
15
|
-
timestamp: number;
|
|
16
|
-
/** Message type for routing to consumers */
|
|
17
|
-
type: string;
|
|
18
|
-
/** Message payload */
|
|
19
|
-
payload: T;
|
|
20
|
-
/** Optional metadata including locale for i18n */
|
|
21
|
-
metadata?: {
|
|
22
|
-
locale?: string;
|
|
23
|
-
[key: string]: unknown;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Queue consumer interface
|
|
28
|
-
*
|
|
29
|
-
* Consumers handle messages based on their `messageTypes` declaration.
|
|
30
|
-
* A consumer receives messages of the declared types from ANY queue.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```typescript
|
|
34
|
-
* @Transient()
|
|
35
|
-
* export class EmailConsumer implements IQueueConsumer<SendEmailInput> {
|
|
36
|
-
* readonly messageTypes = ['email.send', 'email.batch.send']
|
|
37
|
-
*
|
|
38
|
-
* async handle(message: QueueMessage<SendEmailInput>): Promise<void> {
|
|
39
|
-
* // Process email...
|
|
40
|
-
* }
|
|
41
|
-
* }
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
interface IQueueConsumer<T = unknown> {
|
|
45
|
-
/**
|
|
46
|
-
* Message types this consumer handles.
|
|
47
|
-
*
|
|
48
|
-
* The consumer receives messages matching these types from ANY queue.
|
|
49
|
-
* Use '*' to match all message types (wildcard consumer).
|
|
50
|
-
*/
|
|
51
|
-
readonly messageTypes: string[];
|
|
52
|
-
/**
|
|
53
|
-
* Handle an incoming message
|
|
54
|
-
*
|
|
55
|
-
* @param message - The queue message to process
|
|
56
|
-
*/
|
|
57
|
-
handle(message: QueueMessage<T>): Promise<void>;
|
|
58
|
-
/**
|
|
59
|
-
* Optional error handler for failed message processing
|
|
60
|
-
*
|
|
61
|
-
* @param error - The error that occurred
|
|
62
|
-
* @param message - The message that failed to process
|
|
63
|
-
*/
|
|
64
|
-
onError?(error: Error, message: QueueMessage<T>): Promise<void>;
|
|
65
|
-
}
|
|
66
|
-
//#endregion
|
|
67
|
-
//#region src/queue/consumer-registry.d.ts
|
|
68
|
-
/**
|
|
69
|
-
* Consumer Registry
|
|
70
|
-
*
|
|
71
|
-
* Singleton service that holds all registered queue consumers indexed by message type.
|
|
72
|
-
* Consumers declare the message types they handle, and this registry routes messages
|
|
73
|
-
* to the appropriate consumers based on their types.
|
|
74
|
-
*
|
|
75
|
-
* **Message-Type Routing:**
|
|
76
|
-
* - Consumers declare `messageTypes` array (e.g., `['email.send', 'email.batch.send']`)
|
|
77
|
-
* - When a message arrives, consumers matching the message type are invoked
|
|
78
|
-
* - A consumer can handle messages from ANY queue (routing is by type, not queue)
|
|
79
|
-
* - Use `'*'` as a wildcard to handle all message types
|
|
80
|
-
*
|
|
81
|
-
* @example Consumer registration
|
|
82
|
-
* ```typescript
|
|
83
|
-
* // In consumer.ts
|
|
84
|
-
* @Transient()
|
|
85
|
-
* export class EmailConsumer implements IQueueConsumer {
|
|
86
|
-
* readonly messageTypes = ['email.send', 'email.batch.send']
|
|
87
|
-
* // ...
|
|
88
|
-
* }
|
|
89
|
-
*
|
|
90
|
-
* // In module.ts
|
|
91
|
-
* @Module({
|
|
92
|
-
* consumers: [EmailConsumer]
|
|
93
|
-
* })
|
|
94
|
-
*
|
|
95
|
-
* // Application auto-registers via ConsumerRegistry
|
|
96
|
-
* this.consumerRegistry.register(consumer)
|
|
97
|
-
* ```
|
|
98
|
-
*/
|
|
99
|
-
declare class ConsumerRegistry {
|
|
100
|
-
/** Map from message type to consumers handling that type */
|
|
101
|
-
private consumersByType;
|
|
102
|
-
/** Set of all registered consumers (for iteration) */
|
|
103
|
-
private allConsumers;
|
|
104
|
-
/**
|
|
105
|
-
* Register a queue consumer
|
|
106
|
-
*
|
|
107
|
-
* Indexes the consumer by each of its declared message types.
|
|
108
|
-
*
|
|
109
|
-
* @param consumer - Queue consumer to register
|
|
110
|
-
*/
|
|
111
|
-
register(consumer: IQueueConsumer): void;
|
|
112
|
-
/**
|
|
113
|
-
* Get all consumers that can handle a specific message type
|
|
114
|
-
*
|
|
115
|
-
* Returns consumers that either:
|
|
116
|
-
* - Explicitly declare the message type
|
|
117
|
-
* - Use '*' wildcard to handle all types
|
|
118
|
-
*
|
|
119
|
-
* @param messageType - The message type to find consumers for
|
|
120
|
-
* @returns Array of consumers that can handle this message type
|
|
121
|
-
*/
|
|
122
|
-
getConsumers(messageType: string): IQueueConsumer[];
|
|
123
|
-
/**
|
|
124
|
-
* Check if any consumers can handle a message type
|
|
125
|
-
*
|
|
126
|
-
* @param messageType - The message type to check
|
|
127
|
-
* @returns true if at least one consumer can handle this type
|
|
128
|
-
*/
|
|
129
|
-
hasConsumers(messageType: string): boolean;
|
|
130
|
-
/**
|
|
131
|
-
* Get all registered message types
|
|
132
|
-
*
|
|
133
|
-
* @returns Array of message types with registered consumers
|
|
134
|
-
*/
|
|
135
|
-
getMessageTypes(): string[];
|
|
136
|
-
/**
|
|
137
|
-
* Get all registered consumers
|
|
138
|
-
*
|
|
139
|
-
* @returns Array of all registered consumers
|
|
140
|
-
*/
|
|
141
|
-
getAllConsumers(): IQueueConsumer[];
|
|
142
|
-
}
|
|
143
|
-
//#endregion
|
|
144
5
|
//#region src/queue/queue-manager.d.ts
|
|
145
6
|
/**
|
|
146
7
|
* Queue Manager
|
|
@@ -628,5 +489,5 @@ declare class QueueProviderNotSupportedError extends ApplicationError {
|
|
|
628
489
|
constructor(provider: string);
|
|
629
490
|
}
|
|
630
491
|
//#endregion
|
|
631
|
-
export { QueueNames as _, InjectQueue as a,
|
|
632
|
-
//# sourceMappingURL=index-
|
|
492
|
+
export { QueueNames as _, InjectQueue as a, QueueModule as c, SyncQueueProvider as d, CloudflareQueueProvider as f, QueueName as g, IQueueSender as h, QueueToken as i, QueueModuleOptions as l, DispatchMessage as m, QueueBindingNotFoundError as n, QueueRegistry as o, IQueueProvider as p, QUEUE_TOKENS as r, QueueProviderFactory as s, QueueProviderNotSupportedError as t, QueueSender as u, QueueManager as v };
|
|
493
|
+
//# sourceMappingURL=index-DGRe6Yoa.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DGRe6Yoa.d.mts","names":[],"sources":["../src/queue/queue-manager.ts","../src/queue/queue-name.ts","../src/queue/queue-sender.interface.ts","../src/queue/providers/queue-provider.interface.ts","../src/queue/providers/cloudflare-queue.provider.ts","../src/queue/providers/sync-queue.provider.ts","../src/queue/queue-sender.ts","../src/queue/queue.module.ts","../src/queue/services/queue-provider-factory.ts","../src/queue/queue-registry.ts","../src/queue/decorators/inject-queue.decorator.ts","../src/queue/queue.tokens.ts","../src/queue/errors/queue-binding-not-found.error.ts","../src/queue/errors/queue-provider-not-supported.error.ts"],"mappings":";;;;;;;;;AA0BA;;;;;;;;;;;;;;;;cACa,YAAA;EAAA,iBAE4C,QAAA;cAAA,QAAA,EAAU,gBAAA;;;;ACQnE;;;;;AAYA;EDRQ,YAAA,CAAa,UAAA,UAAoB,KAAA,EAAO,YAAA,GAAe,OAAA;AAAA;;;;;;;;AAf/D;;;;;;;;;;;;;;;;;;;;;;ACWA;;;;;AAYA;;;;UAZiB,UAAA;;;AC7BjB;;;;;;;;KDyCY,SAAA,SAAkB,UAAA,gCAA0C,UAAA;;;;;;;ADvBxE;;KElBY,eAAA,gBAA+B,IAAA,CAAK,YAAA,CAAa,CAAA;;;;;;;;;;;;;;;;;;;;AD6B7D;;;;;UCHiB,YAAA;EDeI;;;;;;;ACzCrB;;;EAqCE,QAAA,IAAY,OAAA,EAAS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;;;;;;;;;;;;;;;;cQQa,oBAAA;EAAA,iBAEyC,GAAA;EAAA,iBACG,QAAA;EAAA,iBAC2B,OAAA;cAF9B,GAAA,EAAK,UAAA,EACF,QAAA,EAAU,gBAAA,EACiB,OAAA,GAAU,kBAAA;EPWlF;;;;;;EOFV,MAAA,CAAA,GAAU,cAAA;AAAA;;;;;ARrBZ;;;;;;;;;;;;;;;;;;;;;;ACWA;;;cQCa,aAAA;EAAA,iBAMyC,IAAA;EAAA,iBALnC,QAAA;EAAA,iBACA,OAAA;cAG4B,eAAA,EAAiB,oBAAA,EACV,IAAA,EAAM,YAAA;ERK9B;;;;;ACzC9B;;;EOiDE,QAAA,CAAS,SAAA,WAAoB,YAAA;AAAA;;;;;;;AT/B/B;;;;;;;;;;;;;;;;;;;;;;ACWA;;iBSNgB,WAAA,CAAY,IAAA,EAAM,SAAA,GAAY,kBAAA;;;cC/BjC,YAAA;EAAA;;;;KAMD,UAAA,WAAqB,YAAA,eAA2B,YAAA;;;;;;;AXoB5D;;;cYjBa,yBAAA,SAAkC,gBAAA;cACjC,SAAA,UAAmB,WAAA;AAAA;;;;;;;AZgBjC;;;;cahBa,8BAAA,SAAuC,gBAAA;cACtC,QAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as index_d_exports$1 } from "./index-D_w_Rmtd.mjs";
|
|
2
|
-
import { OpenAPIHono, z } from "@hono/zod-openapi";
|
|
2
|
+
import { OpenAPIHono, z as z$1 } from "@hono/zod-openapi";
|
|
3
3
|
import * as zod from "zod";
|
|
4
4
|
import { ZodError } from "zod";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -176,10 +176,10 @@ declare const backendErrorMap: zod.ZodErrorMap<zod_v4_core0.$ZodIssue>;
|
|
|
176
176
|
*/
|
|
177
177
|
declare function runWithErrorMapContext<T>(context: ErrorMapContext, fn: () => T): T;
|
|
178
178
|
declare namespace index_d_exports {
|
|
179
|
-
export { ErrorMapContext, I18nErrorMetadata, LocaleProvider, OpenAPIHono, OpenAPIObject, PathItemObject, ZodCustomIssue, ZodError, backendErrorMap, runWithErrorMapContext, withI18n, z };
|
|
179
|
+
export { ErrorMapContext, I18nErrorMetadata, LocaleProvider, OpenAPIHono, OpenAPIObject, PathItemObject, ZodCustomIssue, ZodError, backendErrorMap, runWithErrorMapContext, withI18n, z$1 as z };
|
|
180
180
|
}
|
|
181
181
|
import * as import_zod from "zod";
|
|
182
182
|
import * as import__hono_zod_openapi from "@hono/zod-openapi";
|
|
183
183
|
//#endregion
|
|
184
|
-
export { II18nService as _, index_d_exports as a, SystemMessageKeys as b, runWithErrorMapContext as c, LocaleProvider as d, ZodCustomIssue as f, DeepKeys as g, AppMessages as h, ZodError as i, ErrorMapContext as l, AppMessageKeys as m, OpenAPIObject as n, z as o, withI18n as p, PathItemObject as r, backendErrorMap as s, OpenAPIHono as t, I18nErrorMetadata as u, MessageKeys as v, MessageParams as y };
|
|
185
|
-
//# sourceMappingURL=index-
|
|
184
|
+
export { II18nService as _, index_d_exports as a, SystemMessageKeys as b, runWithErrorMapContext as c, LocaleProvider as d, ZodCustomIssue as f, DeepKeys as g, AppMessages as h, ZodError as i, ErrorMapContext as l, AppMessageKeys as m, OpenAPIObject as n, z$1 as o, withI18n as p, PathItemObject as r, backendErrorMap as s, OpenAPIHono as t, I18nErrorMetadata as u, MessageKeys as v, MessageParams as y };
|
|
185
|
+
//# sourceMappingURL=index-NGxg-KP_.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-NGxg-KP_.d.mts","names":[],"sources":["../src/i18n/i18n.types.ts","../src/i18n/validation/with-i18n.ts","../src/i18n/validation/validation.types.ts","../src/i18n/validation/validation.context.ts","../src/i18n/validation/index.ts"],"mappings":";;;;;;;;;;;;;;AAoBA;;;;;;;KAAY,QAAA,kCAA0C,CAAA,gCAEpC,CAAA,YAAa,CAAA,CAAE,CAAA,mBACvB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{
|
|
3
|
+
import { d as StratalExecutionContext, n as ApplicationConfig, r as ApplicationOptions, t as Application } from "./application-DfPtIzxF.mjs";
|
|
4
4
|
//#region src/stratal.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Stratal — Hono-style entry point for Cloudflare Workers.
|
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import "./errors-
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import "./is-
|
|
10
|
-
import "./
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
14
|
-
import "./
|
|
1
|
+
import "./errors-DSKapqD8.mjs";
|
|
2
|
+
import "./logger-CGT91VY6.mjs";
|
|
3
|
+
import "./module-tUtyVJ5E.mjs";
|
|
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 "./cron-manager-CFBamKKk.mjs";
|
|
12
|
+
import "./validation-DQTC259A.mjs";
|
|
13
|
+
import "./i18n.module-Dn9SrFdS.mjs";
|
|
14
|
+
import "./openapi-tools.service-B3TxYKoQ.mjs";
|
|
15
15
|
import "./guards-DUk_Kzst.mjs";
|
|
16
|
-
import "./gateway-context-
|
|
17
|
-
import "./quarry-registry-
|
|
18
|
-
import "./queue.module-
|
|
19
|
-
import "./seeder-
|
|
20
|
-
import { n as Application, t as Stratal } from "./stratal-
|
|
16
|
+
import "./gateway-context-CNOLkLUC.mjs";
|
|
17
|
+
import "./quarry-registry-B2rkO-JS.mjs";
|
|
18
|
+
import "./queue.module-BtI8f4Jo.mjs";
|
|
19
|
+
import "./seeder-R7RXJC35.mjs";
|
|
20
|
+
import { n as Application, t as Stratal } from "./stratal-D5smIU1y.mjs";
|
|
21
21
|
export { Application, Stratal };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Command } from "./command-
|
|
1
|
+
import { t as Command } from "./command-B1CPgsrU.mjs";
|
|
2
2
|
//#region src/quarry/is-command.ts
|
|
3
3
|
/**
|
|
4
4
|
* Check if a class is a Command (extends Command base class).
|
|
@@ -11,4 +11,4 @@ function isCommand(target) {
|
|
|
11
11
|
//#endregion
|
|
12
12
|
export { isCommand as t };
|
|
13
13
|
|
|
14
|
-
//# sourceMappingURL=is-command-
|
|
14
|
+
//# sourceMappingURL=is-command-DJVI6wEJ.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-command-
|
|
1
|
+
{"version":3,"file":"is-command-DJVI6wEJ.mjs","names":[],"sources":["../src/quarry/is-command.ts"],"sourcesContent":["import { Command } from './command'\nimport type { Constructor } from '../types'\n\n/**\n * Check if a class is a Command (extends Command base class).\n *\n * Used by ModuleRegistry for auto-discovery from providers.\n */\nexport function isCommand(target: Constructor): boolean {\n return target.prototype instanceof Command\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,UAAU,QAA8B;AACtD,QAAO,OAAO,qBAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-seeder-
|
|
1
|
+
{"version":3,"file":"is-seeder-D5MIEcdz.mjs","names":[],"sources":["../src/seeder/seeder.ts","../src/seeder/is-seeder.ts"],"sourcesContent":["import type { Container } from '../di/container'\nimport type { Constructor } from '../types'\n\nexport const SEEDER_INTERNALS = Symbol('seeder:internals')\n\nexport interface SeederContext {\n run(SeederClass: Constructor<Seeder>): Promise<void>\n container: Container | null\n}\n\nexport abstract class Seeder {\n [SEEDER_INTERNALS]: SeederContext = {\n run: () => { throw new Error('SeederRegistry not available') },\n container: null,\n }\n\n abstract run(): Promise<void>\n\n /** Call another seeder (like Laravel's $this->call()) */\n protected async call(SeederClass: Constructor<Seeder>): Promise<void> {\n await this[SEEDER_INTERNALS].run(SeederClass)\n }\n}\n","import type { Constructor } from '../types'\nimport { Seeder } from './seeder'\n\n/**\n * Check if a class is a Seeder (extends Seeder base class).\n *\n * Used by ModuleRegistry for auto-discovery from providers.\n */\nexport function isSeeder(target: Constructor): boolean {\n return target.prototype instanceof Seeder\n}\n"],"mappings":";AAGA,MAAa,mBAAmB,OAAO,mBAAmB;AAO1D,IAAsB,SAAtB,MAA6B;CAC3B,CAAC,oBAAmC;EAClC,WAAW;AAAE,SAAM,IAAI,MAAM,+BAA+B;;EAC5D,WAAW;EACZ;;CAKD,MAAgB,KAAK,aAAiD;AACpE,QAAM,KAAK,kBAAkB,IAAI,YAAY;;;;;;;;;;ACZjD,SAAgB,SAAS,QAA8B;AACrD,QAAO,OAAO,qBAAqB"}
|
package/dist/logger/index.mjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import { a as LOG_LEVEL_PRIORITY, i as LoggerService, n as PrettyFormatter, o as LogLevel, r as JsonFormatter, s as LOGGER_TOKENS, t as ConsoleTransport } from "../logger-BR1-s1Um.mjs";
|
|
1
|
+
import { c as LOG_LEVEL_PRIORITY, i as LoggerService, l as LogLevel, n as PrettyFormatter, r as JsonFormatter, t as ConsoleTransport, u as LOGGER_TOKENS } from "../logger-CGT91VY6.mjs";
|
|
3
2
|
export { ConsoleTransport, JsonFormatter, LOGGER_TOKENS, LOG_LEVEL_PRIORITY, LogLevel, LoggerService, PrettyFormatter };
|
|
@@ -1,5 +1,151 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { inject, injectable } from "tsyringe";
|
|
2
|
+
//#region src/di/tokens.ts
|
|
3
|
+
/**
|
|
4
|
+
* Token for the Container instance
|
|
5
|
+
* Used for injecting the Container into services that need dynamic resolution
|
|
6
|
+
*/
|
|
7
|
+
const CONTAINER_TOKEN = Symbol.for("stratal:di:container");
|
|
8
|
+
const DI_TOKENS = {
|
|
9
|
+
CloudflareEnv: Symbol.for("stratal:cloudflare:env"),
|
|
10
|
+
ExecutionContext: Symbol.for("stratal:execution:context"),
|
|
11
|
+
Container: CONTAINER_TOKEN,
|
|
12
|
+
Application: Symbol.for("stratal:application"),
|
|
13
|
+
ModuleRegistry: Symbol.for("stratal:module:registry"),
|
|
14
|
+
ErrorHandler: Symbol.for("stratal:error:handler"),
|
|
15
|
+
Database: Symbol.for("stratal:database:service"),
|
|
16
|
+
Queue: Symbol.for("stratal:queue:manager"),
|
|
17
|
+
ConsumerRegistry: Symbol.for("stratal:consumer:registry"),
|
|
18
|
+
Cron: Symbol.for("stratal:cron:manager"),
|
|
19
|
+
EventRegistry: Symbol.for("stratal:event:registry"),
|
|
20
|
+
Quarry: Symbol.for("stratal:quarry"),
|
|
21
|
+
AuthContext: Symbol.for("stratal:auth:context"),
|
|
22
|
+
DurableObjectState: Symbol.for("stratal:durable:object:state"),
|
|
23
|
+
DurableObjectId: Symbol.for("stratal:durable:object:id")
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/di/decorators/inject-param.decorator.ts
|
|
27
|
+
/**
|
|
28
|
+
* Metadata key for storing parameter injection information
|
|
29
|
+
*/
|
|
30
|
+
const INJECT_PARAM_METADATA_KEY = Symbol.for("stratal:inject:param");
|
|
31
|
+
/**
|
|
32
|
+
* Mark a method parameter for DI injection
|
|
33
|
+
*
|
|
34
|
+
* The parameter will be resolved from the request-scoped container
|
|
35
|
+
* when the controller method is invoked.
|
|
36
|
+
*
|
|
37
|
+
* @param token - DI token to resolve (class or symbol)
|
|
38
|
+
*
|
|
39
|
+
* @example With class token
|
|
40
|
+
* ```typescript
|
|
41
|
+
* async show(
|
|
42
|
+
* ctx: RouterContext,
|
|
43
|
+
* @InjectParam(UserService) userService: UserService
|
|
44
|
+
* ) { }
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @example With symbol token
|
|
48
|
+
* ```typescript
|
|
49
|
+
* async show(
|
|
50
|
+
* ctx: RouterContext,
|
|
51
|
+
* @InjectParam(DI_TOKENS.Cache) cache: ICacheService
|
|
52
|
+
* ) { }
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
function InjectParam(token) {
|
|
56
|
+
return (target, propertyKey, parameterIndex) => {
|
|
57
|
+
if (propertyKey === void 0) throw new Error("@InjectParam can only be used on method parameters, not constructor parameters");
|
|
58
|
+
const existingInjections = Reflect.getMetadata(INJECT_PARAM_METADATA_KEY, target, propertyKey) ?? [];
|
|
59
|
+
existingInjections.push({
|
|
60
|
+
index: parameterIndex,
|
|
61
|
+
token
|
|
62
|
+
});
|
|
63
|
+
Reflect.defineMetadata(INJECT_PARAM_METADATA_KEY, existingInjections, target, propertyKey);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get method parameter injections
|
|
68
|
+
*
|
|
69
|
+
* @param target - Controller prototype
|
|
70
|
+
* @param propertyKey - Method name
|
|
71
|
+
* @returns Array of parameter injections sorted by index
|
|
72
|
+
*/
|
|
73
|
+
function getMethodInjections(target, propertyKey) {
|
|
74
|
+
return (Reflect.getMetadata(INJECT_PARAM_METADATA_KEY, target, propertyKey) ?? []).sort((a, b) => a.index - b.index);
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region src/di/decorators.ts
|
|
78
|
+
/**
|
|
79
|
+
* DI Decorators
|
|
80
|
+
*
|
|
81
|
+
* Provides decorators for dependency injection:
|
|
82
|
+
* - @Transient: Mark classes as injectable (lifecycle controlled at registration)
|
|
83
|
+
* - @InjectParam: Inject dependencies into method parameters
|
|
84
|
+
*
|
|
85
|
+
* Lifecycle (Singleton, Request, Transient) is controlled at registration time
|
|
86
|
+
* via the `scope` property in module providers or Container.register().
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* Mark a class as injectable
|
|
90
|
+
*
|
|
91
|
+
* This decorator wraps tsyringe's `@injectable` decorator and optionally
|
|
92
|
+
* associates a token with the class. The actual lifecycle (Singleton, Request,
|
|
93
|
+
* Transient) is determined at registration time, not decoration time.
|
|
94
|
+
*
|
|
95
|
+
* **Lifecycle Control:**
|
|
96
|
+
* - Use `scope: Scope.Singleton` in module providers for singleton
|
|
97
|
+
* - Use `scope: Scope.Request` in module providers for request-scoped
|
|
98
|
+
* - Default is Transient (new instance per resolution)
|
|
99
|
+
*
|
|
100
|
+
* @param token - Optional DI token for service resolution
|
|
101
|
+
*
|
|
102
|
+
* @example Basic usage (no token)
|
|
103
|
+
* ```typescript
|
|
104
|
+
* @Transient()
|
|
105
|
+
* export class UserService {
|
|
106
|
+
* constructor(@inject(DI_TOKENS.Database) private db: DatabaseService) {}
|
|
107
|
+
* }
|
|
108
|
+
*
|
|
109
|
+
* // In module:
|
|
110
|
+
* @Module({
|
|
111
|
+
* providers: [UserService] // Transient by default
|
|
112
|
+
* })
|
|
113
|
+
* ```
|
|
114
|
+
*
|
|
115
|
+
* @example With token
|
|
116
|
+
* ```typescript
|
|
117
|
+
* @Transient(DI_TOKENS.ConnectionManager)
|
|
118
|
+
* export class ConnectionManager implements Disposable {
|
|
119
|
+
* // ...
|
|
120
|
+
* }
|
|
121
|
+
*
|
|
122
|
+
* // In Application.ts:
|
|
123
|
+
* container.register(DI_TOKENS.ConnectionManager, ConnectionManager, Scope.Request)
|
|
124
|
+
* ```
|
|
125
|
+
*
|
|
126
|
+
* @example Singleton via provider scope
|
|
127
|
+
* ```typescript
|
|
128
|
+
* @Transient()
|
|
129
|
+
* export class ConsumerRegistry {
|
|
130
|
+
* // ...
|
|
131
|
+
* }
|
|
132
|
+
*
|
|
133
|
+
* // In module:
|
|
134
|
+
* @Module({
|
|
135
|
+
* providers: [
|
|
136
|
+
* { provide: DI_TOKENS.ConsumerRegistry, useClass: ConsumerRegistry, scope: Scope.Singleton }
|
|
137
|
+
* ]
|
|
138
|
+
* })
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
function Transient(token) {
|
|
142
|
+
return function(target) {
|
|
143
|
+
const targetConstructor = target;
|
|
144
|
+
injectable({ token })(targetConstructor);
|
|
145
|
+
return target;
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
//#endregion
|
|
3
149
|
//#region src/logger/logger.tokens.ts
|
|
4
150
|
/**
|
|
5
151
|
* Dependency Injection Tokens for Logger Module
|
|
@@ -38,6 +184,26 @@ const LOG_LEVEL_PRIORITY = {
|
|
|
38
184
|
[LogLevel.ERROR]: 3
|
|
39
185
|
};
|
|
40
186
|
//#endregion
|
|
187
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/decorateMetadata.js
|
|
188
|
+
function __decorateMetadata(k, v) {
|
|
189
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/decorateParam.js
|
|
193
|
+
function __decorateParam(paramIndex, decorator) {
|
|
194
|
+
return function(target, key) {
|
|
195
|
+
decorator(target, key, paramIndex);
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/decorate.js
|
|
200
|
+
function __decorate(decorators, target, key, desc) {
|
|
201
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
202
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
203
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
204
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
205
|
+
}
|
|
206
|
+
//#endregion
|
|
41
207
|
//#region src/logger/services/logger.service.ts
|
|
42
208
|
var _ref, _ref2;
|
|
43
209
|
let LoggerService = class LoggerService {
|
|
@@ -247,6 +413,6 @@ let ConsoleTransport = class ConsoleTransport extends BaseTransport {
|
|
|
247
413
|
};
|
|
248
414
|
ConsoleTransport = __decorate([Transient(LOGGER_TOKENS.ConsoleTransport)], ConsoleTransport);
|
|
249
415
|
//#endregion
|
|
250
|
-
export {
|
|
416
|
+
export { __decorate as a, LOG_LEVEL_PRIORITY as c, Transient as d, INJECT_PARAM_METADATA_KEY as f, DI_TOKENS as g, CONTAINER_TOKEN as h, LoggerService as i, LogLevel as l, getMethodInjections as m, PrettyFormatter as n, __decorateParam as o, InjectParam as p, JsonFormatter as r, __decorateMetadata as s, ConsoleTransport as t, LOGGER_TOKENS as u };
|
|
251
417
|
|
|
252
|
-
//# sourceMappingURL=logger-
|
|
418
|
+
//# sourceMappingURL=logger-CGT91VY6.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger-CGT91VY6.mjs","names":[],"sources":["../src/di/tokens.ts","../src/di/decorators/inject-param.decorator.ts","../src/di/decorators.ts","../src/logger/logger.tokens.ts","../src/logger/contracts/log-level.ts","../src/logger/services/logger.service.ts","../src/logger/formatters/json-formatter.ts","../src/logger/formatters/pretty-formatter.ts","../src/logger/transports/base-transport.ts","../src/logger/transports/console-transport.ts"],"sourcesContent":["/**\n * Token for the Container instance\n * Used for injecting the Container into services that need dynamic resolution\n */\nexport const CONTAINER_TOKEN = Symbol.for('stratal:di:container')\n\nexport const DI_TOKENS = {\n // Cloudflare\n CloudflareEnv: Symbol.for('stratal:cloudflare:env'),\n ExecutionContext: Symbol.for('stratal:execution:context'),\n\n // Infrastructure\n Container: CONTAINER_TOKEN,\n Application: Symbol.for('stratal:application'),\n ModuleRegistry: Symbol.for('stratal:module:registry'),\n ErrorHandler: Symbol.for('stratal:error:handler'),\n Database: Symbol.for('stratal:database:service'),\n Queue: Symbol.for('stratal:queue:manager'),\n ConsumerRegistry: Symbol.for('stratal:consumer:registry'),\n Cron: Symbol.for('stratal:cron:manager'),\n EventRegistry: Symbol.for('stratal:event:registry'),\n Quarry: Symbol.for('stratal:quarry'),\n\n // Context\n /**\n * AuthContext: Use for services that need user authentication (userId).\n */\n AuthContext: Symbol.for('stratal:auth:context'),\n\n // Workers\n DurableObjectState: Symbol.for('stratal:durable:object:state'),\n DurableObjectId: Symbol.for('stratal:durable:object:id'),\n} as const\n\nexport type DIToken = typeof DI_TOKENS[keyof typeof DI_TOKENS]\n","/**\n * Method Parameter Injection Decorator\n *\n * Enables DI for controller method parameters. Parameters marked with\n * @InjectParam(token) are resolved from the request-scoped container\n * at method invocation time.\n *\n * @example\n * ```typescript\n * @Route({ response: userSchema })\n * async show(\n * ctx: RouterContext,\n * @InjectParam(UserService) userService: UserService,\n * @InjectParam(CacheService) cache: CacheService\n * ): Promise<Response> {\n * // userService and cache auto-resolved from request container\n * }\n * ```\n */\nimport type InjectionToken from 'tsyringe/dist/typings/providers/injection-token'\n\n/**\n * Metadata key for storing parameter injection information\n */\nexport const INJECT_PARAM_METADATA_KEY = Symbol.for('stratal:inject:param')\n\n/**\n * Describes a parameter injection\n */\nexport interface ParamInjection {\n /** Parameter index in the method signature (0-based) */\n index: number\n /** DI token to resolve */\n token: InjectionToken\n}\n\n/**\n * Mark a method parameter for DI injection\n *\n * The parameter will be resolved from the request-scoped container\n * when the controller method is invoked.\n *\n * @param token - DI token to resolve (class or symbol)\n *\n * @example With class token\n * ```typescript\n * async show(\n * ctx: RouterContext,\n * @InjectParam(UserService) userService: UserService\n * ) { }\n * ```\n *\n * @example With symbol token\n * ```typescript\n * async show(\n * ctx: RouterContext,\n * @InjectParam(DI_TOKENS.Cache) cache: ICacheService\n * ) { }\n * ```\n */\nexport function InjectParam<T>(token: InjectionToken<T>): ParameterDecorator {\n return (target: object, propertyKey: string | symbol | undefined, parameterIndex: number) => {\n if (propertyKey === undefined) {\n throw new Error('@InjectParam can only be used on method parameters, not constructor parameters')\n }\n\n const existingInjections: ParamInjection[] =\n (Reflect.getMetadata(INJECT_PARAM_METADATA_KEY, target, propertyKey) as ParamInjection[] | undefined) ?? []\n\n existingInjections.push({\n index: parameterIndex,\n token,\n })\n\n Reflect.defineMetadata(INJECT_PARAM_METADATA_KEY, existingInjections, target, propertyKey)\n }\n}\n\n/**\n * Get method parameter injections\n *\n * @param target - Controller prototype\n * @param propertyKey - Method name\n * @returns Array of parameter injections sorted by index\n */\nexport function getMethodInjections(target: object, propertyKey: string | symbol): ParamInjection[] {\n const injections: ParamInjection[] =\n (Reflect.getMetadata(INJECT_PARAM_METADATA_KEY, target, propertyKey) as ParamInjection[] | undefined) ?? []\n\n return injections.sort((a, b) => a.index - b.index)\n}\n","/**\n * DI Decorators\n *\n * Provides decorators for dependency injection:\n * - @Transient: Mark classes as injectable (lifecycle controlled at registration)\n * - @InjectParam: Inject dependencies into method parameters\n *\n * Lifecycle (Singleton, Request, Transient) is controlled at registration time\n * via the `scope` property in module providers or Container.register().\n */\nimport { injectable } from 'tsyringe'\nimport type InjectionToken from 'tsyringe/dist/typings/providers/injection-token'\n\n// Re-export method parameter injection\nexport {\n InjectParam,\n getMethodInjections,\n type ParamInjection,\n INJECT_PARAM_METADATA_KEY,\n} from './decorators/inject-param.decorator'\n\n/**\n * Mark a class as injectable\n *\n * This decorator wraps tsyringe's `@injectable` decorator and optionally\n * associates a token with the class. The actual lifecycle (Singleton, Request,\n * Transient) is determined at registration time, not decoration time.\n *\n * **Lifecycle Control:**\n * - Use `scope: Scope.Singleton` in module providers for singleton\n * - Use `scope: Scope.Request` in module providers for request-scoped\n * - Default is Transient (new instance per resolution)\n *\n * @param token - Optional DI token for service resolution\n *\n * @example Basic usage (no token)\n * ```typescript\n * @Transient()\n * export class UserService {\n * constructor(@inject(DI_TOKENS.Database) private db: DatabaseService) {}\n * }\n *\n * // In module:\n * @Module({\n * providers: [UserService] // Transient by default\n * })\n * ```\n *\n * @example With token\n * ```typescript\n * @Transient(DI_TOKENS.ConnectionManager)\n * export class ConnectionManager implements Disposable {\n * // ...\n * }\n *\n * // In Application.ts:\n * container.register(DI_TOKENS.ConnectionManager, ConnectionManager, Scope.Request)\n * ```\n *\n * @example Singleton via provider scope\n * ```typescript\n * @Transient()\n * export class ConsumerRegistry {\n * // ...\n * }\n *\n * // In module:\n * @Module({\n * providers: [\n * { provide: DI_TOKENS.ConsumerRegistry, useClass: ConsumerRegistry, scope: Scope.Singleton }\n * ]\n * })\n * ```\n */\nexport function Transient<T>(token?: InjectionToken<T>) {\n return function <TFunction extends abstract new (...args: never[]) => unknown>(target: TFunction): TFunction {\n const targetConstructor = target as unknown as new (...args: unknown[]) => T\n injectable<T>({ token })(targetConstructor)\n return target\n }\n}\n","/**\n * Dependency Injection Tokens for Logger Module\n *\n * Symbol-based tokens ensure type-safe dependency injection\n * and prevent naming collisions.\n */\nexport const LOGGER_TOKENS = {\n /**\n * Main logger service facade\n */\n LoggerService: Symbol.for('stratal:logger:service'),\n\n /**\n * Log formatter (JSON or Pretty)\n */\n Formatter: Symbol.for('stratal:logger:formatter'),\n\n /**\n * Array of active transports\n */\n Transports: Symbol.for('stratal:logger:transports'),\n\n /**\n * Individual transport tokens (for factory registration)\n */\n ConsoleTransport: Symbol.for('stratal:logger:console:transport'),\n\n /**\n * Configured log level for filtering\n */\n LogLevelOptions: Symbol.for('stratal:logger:log:level:options'),\n} as const\n","/**\n * Log severity levels\n * Ordered from least to most severe\n */\nexport enum LogLevel {\n DEBUG = 'debug',\n INFO = 'info',\n WARN = 'warn',\n ERROR = 'error',\n}\n\n/**\n * Map log levels to numeric priorities (for filtering)\n * Higher numbers = more severe = higher priority\n */\nexport const LOG_LEVEL_PRIORITY: Record<LogLevel, number> = {\n [LogLevel.DEBUG]: 0,\n [LogLevel.INFO]: 1,\n [LogLevel.WARN]: 2,\n [LogLevel.ERROR]: 3,\n}\n","import { inject } from 'tsyringe'\nimport { Transient } from '../../di/decorators'\nimport { DI_TOKENS } from '../../di/tokens'\nimport type { InternalLogContext, LogContext, LogEntry } from '../contracts'\nimport { LOG_LEVEL_PRIORITY, LogLevel } from '../contracts/log-level'\nimport type { ILogFormatter } from '../formatters/formatter.interface'\nimport { LOGGER_TOKENS } from '../logger.tokens'\nimport type { ILogTransport } from '../transports/transport.interface'\n\n/**\n * Logger Service\n *\n * Main logging facade.\n *\n * **Features:**\n * - Async logging via ctx.waitUntil() for non-blocking performance\n * - Multi-transport support (console, future Sentry/Cloudflare Analytics)\n * - Configurable formatters (JSON production, Pretty development)\n * - Log level filtering based on environment\n *\n * **Architecture:**\n * - Transports and formatters injected via DI\n *\n * @example Basic usage\n * ```typescript\n * @Transient()\n * export class UserService {\n * constructor(\n * @inject(LOGGER_TOKENS.LoggerService)\n * private readonly logger: LoggerService\n * ) {}\n *\n * async createUser(input: CreateUserInput) {\n * this.logger.info('Creating user', { email: input.email })\n * }\n * }\n * ```\n */\n@Transient()\nexport class LoggerService {\n constructor(\n @inject(LOGGER_TOKENS.LogLevelOptions)\n private readonly logLevel: LogLevel,\n\n @inject(DI_TOKENS.ExecutionContext)\n private readonly executionContext: globalThis.ExecutionContext,\n\n @inject(LOGGER_TOKENS.Formatter)\n private readonly formatter: ILogFormatter,\n\n @inject(LOGGER_TOKENS.Transports)\n private readonly transports: ILogTransport[],\n ) { }\n\n /**\n * Log debug message (development only)\n */\n debug(message: string, context?: LogContext): void {\n this.log(LogLevel.DEBUG, message, context)\n }\n\n /**\n * Log info message\n */\n info(message: string, context?: LogContext): void {\n this.log(LogLevel.INFO, message, context)\n }\n\n /**\n * Log warning message\n */\n warn(message: string, context?: LogContext): void {\n this.log(LogLevel.WARN, message, context)\n }\n\n /**\n * Log error message\n * Accepts Error object or custom context\n */\n error(message: string, contextOrError?: LogContext | Error): void {\n let context: LogContext | undefined\n let error: Error | undefined\n\n if (contextOrError instanceof Error) {\n error = contextOrError\n } else {\n context = contextOrError\n }\n\n this.log(LogLevel.ERROR, message, context, error)\n }\n\n /**\n * Core logging implementation\n * Enriches context, formats message, dispatches to transports\n * Uses ctx.waitUntil() for async non-blocking processing\n */\n private log(\n level: LogLevel,\n message: string,\n userContext?: LogContext,\n error?: Error\n ): void {\n // Filter by configured log level\n if (LOG_LEVEL_PRIORITY[level] < LOG_LEVEL_PRIORITY[this.logLevel]) {\n return\n }\n\n // Build complete log entry with enriched context\n const entry: LogEntry = {\n level,\n message,\n context: this.enrichContext(userContext ?? {}),\n error: error ? this.serializeError(error) : undefined,\n }\n\n // Format once for all transports\n const formatted = this.formatter.format(entry)\n\n // Dispatch to all transports asynchronously\n const writePromises = this.transports.map(transport =>\n transport.write(entry, formatted).catch((err: unknown) => {\n // Swallow transport errors to prevent log failure from crashing app\n console.error(`Transport ${transport.name} failed:`, err)\n })\n )\n\n // Use waitUntil to ensure logs complete even after response sent\n const allWrites = Promise.all(writePromises)\n try {\n this.executionContext.waitUntil(allWrites)\n } catch (error) {\n if (!(error instanceof Error) || !error.message.includes('global scope')) {\n throw error\n }\n }\n }\n\n /**\n * Enrich log context with request info and timestamp\n * Context enrichment can be extended by application modules\n */\n private enrichContext(userContext: LogContext): InternalLogContext {\n return {\n ...userContext,\n timestamp: Date.now(),\n }\n }\n\n /**\n * Serialize Error object for transport\n */\n private serializeError(error: Error): { message: string; stack?: string; name?: string } {\n return {\n message: error.message,\n stack: error.stack,\n name: error.name,\n }\n }\n}\n","import type { LogEntry } from '../contracts'\nimport type { ILogFormatter } from './formatter.interface'\n\n/**\n * JSON Formatter\n *\n * Produces structured JSON logs for production environments.\n * Optimized for log aggregation systems (Cloudflare Analytics, Datadog, etc.)\n *\n * Output format:\n * {\n * \"level\": \"info\",\n * \"message\": \"User logged in\",\n * \"timestamp\": 1234567890,\n * \"userId\": \"user_456\",\n * \"error\": { \"message\": \"...\", \"stack\": \"...\" }\n * }\n */\nexport class JsonFormatter implements ILogFormatter {\n format(entry: LogEntry): string {\n const output = {\n level: entry.level,\n message: entry.message,\n ...entry.context,\n ...(entry.error && { error: entry.error }),\n }\n\n return JSON.stringify(output)\n }\n}\n","import type { LogEntry } from '../contracts'\nimport { LogLevel } from '../contracts'\nimport type { ILogFormatter } from './formatter.interface'\n\n/**\n * Pretty Formatter\n *\n * Human-readable colored output for development environments.\n * Uses ANSI color codes for terminal output.\n *\n * Output format:\n * [2024-01-15 10:30:45] INFO: User logged in\n * userId: user_456\n */\nexport class PrettyFormatter implements ILogFormatter {\n private readonly colors: Record<LogLevel, string> = {\n [LogLevel.DEBUG]: '\\x1b[36m', // Cyan\n [LogLevel.INFO]: '\\x1b[32m', // Green\n [LogLevel.WARN]: '\\x1b[33m', // Yellow\n [LogLevel.ERROR]: '\\x1b[31m', // Red\n }\n\n private readonly reset = '\\x1b[0m'\n\n format(entry: LogEntry): string {\n const color = this.colors[entry.level]\n const timestamp = new Date(entry.context.timestamp).toISOString()\n const levelStr = entry.level.toUpperCase().padEnd(5)\n\n let output = `${color}[${timestamp}] ${levelStr}${this.reset}: ${entry.message}`\n\n // Add context (exclude timestamp)\n const { timestamp: _, ...contextWithoutTimestamp } = entry.context\n const contextEntries = Object.entries(contextWithoutTimestamp)\n\n if (contextEntries.length > 0) {\n output += '\\n'\n contextEntries.forEach(([key, value]) => {\n output += ` ${key}: ${JSON.stringify(value)}\\n`\n })\n }\n\n // Add error stack if present\n if (entry.error?.stack) {\n output += `\\n${entry.error.stack}\\n`\n }\n\n return output.trimEnd()\n }\n}\n","import type { ILogTransport } from './transport.interface'\nimport type { LogEntry } from '../contracts'\n\n/**\n * Base Transport\n *\n * Abstract base class providing shared transport logic.\n * Reduces code duplication across transport implementations.\n */\nexport abstract class BaseTransport implements ILogTransport {\n abstract readonly name: string\n\n /**\n * Write log entry - must be implemented by concrete transports\n */\n abstract write(entry: LogEntry, formatted: string): Promise<void>\n\n /**\n * Handle transport errors gracefully\n * Logs to console.error as fallback to prevent log loss\n *\n * @param error - Error that occurred during write\n * @param entry - Log entry that failed\n */\n protected handleError(error: unknown, entry: LogEntry): void {\n console.error(`[${this.name}] Failed to write log:`, {\n error: error instanceof Error ? error.message : String(error),\n logMessage: entry.message,\n level: entry.level,\n })\n }\n}\n","import { Transient } from '../../di/decorators'\nimport { LOGGER_TOKENS } from '../logger.tokens'\nimport { BaseTransport } from './base-transport'\nimport type { LogEntry } from '../contracts'\nimport { LogLevel } from '../contracts'\n\n/**\n * Console Transport\n *\n * Writes logs to console using appropriate console methods.\n * Maps log levels to console.debug, console.info, console.warn, console.error.\n *\n * Thread-safe for Cloudflare Workers environment.\n */\n@Transient(LOGGER_TOKENS.ConsoleTransport)\nexport class ConsoleTransport extends BaseTransport {\n readonly name = 'console'\n\n write(entry: LogEntry, formatted: string): Promise<void> {\n try {\n const consoleMethod = this.getConsoleMethod(entry.level)\n consoleMethod(formatted)\n } catch (error) {\n this.handleError(error, entry)\n }\n\n return Promise.resolve()\n }\n\n /**\n * Map log level to console method\n */\n private getConsoleMethod(level: LogLevel): typeof console.log {\n switch (level) {\n case LogLevel.DEBUG:\n return console.debug\n case LogLevel.INFO:\n return console.info\n case LogLevel.WARN:\n return console.warn\n case LogLevel.ERROR:\n return console.error\n default:\n return console.log\n }\n }\n}\n"],"mappings":";;;;;;AAIA,MAAa,kBAAkB,OAAO,IAAI,uBAAuB;AAEjE,MAAa,YAAY;CAEvB,eAAe,OAAO,IAAI,yBAAyB;CACnD,kBAAkB,OAAO,IAAI,4BAA4B;CAGzD,WAAW;CACX,aAAa,OAAO,IAAI,sBAAsB;CAC9C,gBAAgB,OAAO,IAAI,0BAA0B;CACrD,cAAc,OAAO,IAAI,wBAAwB;CACjD,UAAU,OAAO,IAAI,2BAA2B;CAChD,OAAO,OAAO,IAAI,wBAAwB;CAC1C,kBAAkB,OAAO,IAAI,4BAA4B;CACzD,MAAM,OAAO,IAAI,uBAAuB;CACxC,eAAe,OAAO,IAAI,yBAAyB;CACnD,QAAQ,OAAO,IAAI,iBAAiB;CAMpC,aAAa,OAAO,IAAI,uBAAuB;CAG/C,oBAAoB,OAAO,IAAI,+BAA+B;C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GACnD,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM;GAC7D,YAAY,MAAM;GAClB,OAAO,MAAM;GACd,CAAC;;;;;ACdC,IAAA,mBAAA,MAAM,yBAAyB,cAAc;CAClD,OAAgB;CAEhB,MAAM,OAAiB,WAAkC;AACvD,MAAI;AACoB,QAAK,iBAAiB,MAAM,MAAM,CAC1C,UAAU;WACjB,OAAO;AACd,QAAK,YAAY,OAAO,MAAM;;AAGhC,SAAO,QAAQ,SAAS;;;;;CAM1B,iBAAyB,OAAqC;AAC5D,UAAQ,OAAR;GACE,KAAK,SAAS,MACZ,QAAO,QAAQ;GACjB,KAAK,SAAS,KACZ,QAAO,QAAQ;GACjB,KAAK,SAAS,KACZ,QAAO,QAAQ;GACjB,KAAK,SAAS,MACZ,QAAO,QAAQ;GACjB,QACE,QAAO,QAAQ;;;;+BA7BtB,UAAU,cAAc,iBAAiB,CAAA,EAAA,iBAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { G as MiddlewareConsumerImpl, K as createMiddlewareConsumer,
|
|
1
|
+
import { G as MiddlewareConsumerImpl, K as createMiddlewareConsumer, St as RouteInfo, W as MiddlewareConfigurationService, _t as MiddlewareBuilder, bt as MiddlewareConsumer, vt as MiddlewareConfigEntry, xt as MiddlewareRouteTarget, yt as MiddlewareConfigurable } from "../index-BFCxSp_f.mjs";
|
|
2
2
|
export { MiddlewareBuilder, MiddlewareConfigEntry, MiddlewareConfigurable, MiddlewareConfigurationService, MiddlewareConsumer, MiddlewareConsumerImpl, MiddlewareRouteTarget, RouteInfo, createMiddlewareConsumer };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import "../errors-
|
|
2
|
-
import "../
|
|
3
|
-
import "../
|
|
4
|
-
import
|
|
5
|
-
import "../router-context-BEJe9HEB.mjs";
|
|
1
|
+
import "../errors-DSKapqD8.mjs";
|
|
2
|
+
import "../logger-CGT91VY6.mjs";
|
|
3
|
+
import { o as MiddlewareConsumerImpl, s as createMiddlewareConsumer, t as MiddlewareConfigurationService } from "../middleware-Bl-b5pkt.mjs";
|
|
4
|
+
import "../router-context-D9R1v2Ac.mjs";
|
|
6
5
|
export { MiddlewareConfigurationService, MiddlewareConsumerImpl, createMiddlewareConsumer };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as ROUTE_METADATA_KEYS, t as RouterContext } from "./router-context-
|
|
1
|
+
import { d as Transient } from "./logger-CGT91VY6.mjs";
|
|
2
|
+
import { o as ROUTE_METADATA_KEYS, t as RouterContext } from "./router-context-D9R1v2Ac.mjs";
|
|
3
3
|
//#region src/middleware/middleware-consumer.ts
|
|
4
4
|
/**
|
|
5
5
|
* Builder for configuring middleware routes and exclusions
|
|
@@ -359,4 +359,4 @@ var MiddlewareConfigurationService = class {
|
|
|
359
359
|
//#endregion
|
|
360
360
|
export { getControllerVersion as a, getControllerRoute as i, Controller as n, MiddlewareConsumerImpl as o, getControllerOptions as r, createMiddlewareConsumer as s, MiddlewareConfigurationService as t };
|
|
361
361
|
|
|
362
|
-
//# sourceMappingURL=middleware-
|
|
362
|
+
//# sourceMappingURL=middleware-Bl-b5pkt.mjs.map
|