@geekmidas/constructs 10.0.0-alpha.17 → 10.0.0-alpha.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 +3 -3
- package/dist/{Construct-DfbwIntp.d.cts → Construct-DTqYvkPG.d.cts} +2 -2
- package/dist/{Construct-l5aOn_jv.d.mts.map → Construct-DTqYvkPG.d.cts.map} +1 -1
- package/dist/{Construct-BeYVu_QF.mjs → Construct-Detz65RA.mjs} +2 -2
- package/dist/Construct-Detz65RA.mjs.map +1 -0
- package/dist/{Construct-l5aOn_jv.d.mts → Construct-pVadmURD.d.mts} +2 -2
- package/dist/{Construct-DfbwIntp.d.cts.map → Construct-pVadmURD.d.mts.map} +1 -1
- package/dist/{Construct-DqdlARxq.cjs → Construct-yG9Sw-5p.cjs} +2 -2
- package/dist/Construct-yG9Sw-5p.cjs.map +1 -0
- package/dist/{Cron-l4Wlz6G9.d.mts → Cron-DFFsKfMQ.d.mts} +2 -2
- package/dist/{Cron-l4Wlz6G9.d.mts.map → Cron-DFFsKfMQ.d.mts.map} +1 -1
- package/dist/{Cron-zsoSAwZo.d.cts → Cron-szLBpMSi.d.cts} +2 -2
- package/dist/{Cron-zsoSAwZo.d.cts.map → Cron-szLBpMSi.d.cts.map} +1 -1
- package/dist/{CronBuilder-UoNgFe8S.d.mts → CronBuilder-Czxh8nnD.d.mts} +3 -3
- package/dist/{CronBuilder-CyT71Nzg.d.cts.map → CronBuilder-Czxh8nnD.d.mts.map} +1 -1
- package/dist/{CronBuilder-CyT71Nzg.d.cts → CronBuilder-kqU9icLS.d.cts} +3 -3
- package/dist/{CronBuilder-UoNgFe8S.d.mts.map → CronBuilder-kqU9icLS.d.cts.map} +1 -1
- package/dist/{CronBuilder-D_0HNBTr.mjs → CronBuilder-vkjuo1UP.mjs} +3 -3
- package/dist/{CronBuilder-D_0HNBTr.mjs.map → CronBuilder-vkjuo1UP.mjs.map} +1 -1
- package/dist/{CronBuilder-BdnI6lxF.cjs → CronBuilder-zdTdaT-e.cjs} +3 -3
- package/dist/{CronBuilder-BdnI6lxF.cjs.map → CronBuilder-zdTdaT-e.cjs.map} +1 -1
- package/dist/{Endpoint-ONsly_dq.mjs → Endpoint-BIpXUxNf.mjs} +3 -3
- package/dist/{Endpoint-ONsly_dq.mjs.map → Endpoint-BIpXUxNf.mjs.map} +1 -1
- package/dist/{Endpoint-BpZHtJ2W.cjs → Endpoint-DDRSyB7y.cjs} +3 -3
- package/dist/{Endpoint-BpZHtJ2W.cjs.map → Endpoint-DDRSyB7y.cjs.map} +1 -1
- package/dist/{Endpoint-oS-Fe3d_.d.mts → Endpoint-DVBog_2-.d.mts} +2 -2
- package/dist/{Endpoint-DBflWAe4.d.cts.map → Endpoint-DVBog_2-.d.mts.map} +1 -1
- package/dist/{Endpoint-DBflWAe4.d.cts → Endpoint-DlGPQpsH.d.cts} +2 -2
- package/dist/{Endpoint-oS-Fe3d_.d.mts.map → Endpoint-DlGPQpsH.d.cts.map} +1 -1
- package/dist/{index-C1ZwNOOk.d.cts → EndpointFactory-BG6DLRJH.d.cts} +6 -57
- package/dist/EndpointFactory-BG6DLRJH.d.cts.map +1 -0
- package/dist/{EndpointFactory-CLvWuHyt.cjs → EndpointFactory-BTj1GjZd.cjs} +4 -4
- package/dist/{EndpointFactory-CLvWuHyt.cjs.map → EndpointFactory-BTj1GjZd.cjs.map} +1 -1
- package/dist/{index-Cc4kKPag.d.mts → EndpointFactory-CrZXVjna.d.mts} +6 -57
- package/dist/EndpointFactory-CrZXVjna.d.mts.map +1 -0
- package/dist/{EndpointFactory-Bm3aKRdV.mjs → EndpointFactory-o_15B_ka.mjs} +4 -4
- package/dist/{EndpointFactory-Bm3aKRdV.mjs.map → EndpointFactory-o_15B_ka.mjs.map} +1 -1
- package/dist/{HonoEndpointAdaptor-yYaU7jVJ.mjs → HonoEndpointAdaptor-Bid8spbq.mjs} +2 -2
- package/dist/{HonoEndpointAdaptor-yYaU7jVJ.mjs.map → HonoEndpointAdaptor-Bid8spbq.mjs.map} +1 -1
- package/dist/{HonoEndpointAdaptor-92zavCsV.cjs → HonoEndpointAdaptor-K97N70mh.cjs} +2 -2
- package/dist/{HonoEndpointAdaptor-92zavCsV.cjs.map → HonoEndpointAdaptor-K97N70mh.cjs.map} +1 -1
- package/dist/{Queue-DYPB2KWL.d.cts → Queue-Bhzi2WQC.d.cts} +2 -2
- package/dist/{Queue-D9X6OoON.d.mts.map → Queue-Bhzi2WQC.d.cts.map} +1 -1
- package/dist/{Queue-D9X6OoON.d.mts → Queue-BoUA-e83.d.mts} +2 -2
- package/dist/{Queue-DYPB2KWL.d.cts.map → Queue-BoUA-e83.d.mts.map} +1 -1
- package/dist/{Subscriber-C4heaAyO.d.mts → Subscriber-CIO3pwji.d.mts} +2 -2
- package/dist/{Subscriber-C4heaAyO.d.mts.map → Subscriber-CIO3pwji.d.mts.map} +1 -1
- package/dist/{Subscriber-CotDUELC.d.cts → Subscriber-DQCaiOXF.d.cts} +2 -2
- package/dist/{Subscriber-CotDUELC.d.cts.map → Subscriber-DQCaiOXF.d.cts.map} +1 -1
- package/dist/{SubscriberBuilder-h7B_cHMr.mjs → SubscriberBuilder-B4YRTBng.mjs} +2 -2
- package/dist/{SubscriberBuilder-h7B_cHMr.mjs.map → SubscriberBuilder-B4YRTBng.mjs.map} +1 -1
- package/dist/{SubscriberBuilder-C0ZEtGDI.cjs → SubscriberBuilder-C2bCOuPT.cjs} +2 -2
- package/dist/{SubscriberBuilder-C0ZEtGDI.cjs.map → SubscriberBuilder-C2bCOuPT.cjs.map} +1 -1
- package/dist/{SubscriberBuilder-tyH5yTk5.d.mts → SubscriberBuilder-COW4rHnb.d.mts} +3 -3
- package/dist/{SubscriberBuilder-BEv0eoHy.d.cts.map → SubscriberBuilder-COW4rHnb.d.mts.map} +1 -1
- package/dist/{SubscriberBuilder-BEv0eoHy.d.cts → SubscriberBuilder-DQ7EWdGO.d.cts} +3 -3
- package/dist/{SubscriberBuilder-tyH5yTk5.d.mts.map → SubscriberBuilder-DQ7EWdGO.d.cts.map} +1 -1
- package/dist/{Topic-DEVGo0Dm.d.cts → Topic-D6blllEn.d.cts} +2 -2
- package/dist/{Topic-DEVGo0Dm.d.cts.map → Topic-D6blllEn.d.cts.map} +1 -1
- package/dist/{Topic-zk_6Gthr.d.mts → Topic-DVvheJ_-.d.mts} +2 -2
- package/dist/{Topic-zk_6Gthr.d.mts.map → Topic-DVvheJ_-.d.mts.map} +1 -1
- package/dist/adaptors/aws.cjs +2 -2
- package/dist/adaptors/aws.d.cts +5 -5
- package/dist/adaptors/aws.d.mts +5 -5
- package/dist/adaptors/aws.mjs +3 -3
- package/dist/adaptors/hono.cjs +1 -1
- package/dist/adaptors/hono.d.cts +1 -1
- package/dist/adaptors/hono.d.mts +1 -1
- package/dist/adaptors/hono.mjs +1 -1
- package/dist/adaptors/testing.cjs +3 -3
- package/dist/adaptors/testing.d.cts +4 -4
- package/dist/adaptors/testing.d.mts +4 -4
- package/dist/adaptors/testing.mjs +3 -3
- package/dist/crons/index.cjs +1 -1
- package/dist/crons/index.d.cts +2 -2
- package/dist/crons/index.d.mts +2 -2
- package/dist/crons/index.mjs +1 -1
- package/dist/endpoints/index.cjs +2 -2
- package/dist/endpoints/index.d.cts +60 -3
- package/dist/endpoints/index.d.cts.map +1 -0
- package/dist/endpoints/index.d.mts +60 -3
- package/dist/endpoints/index.d.mts.map +1 -0
- package/dist/endpoints/index.mjs +2 -2
- package/dist/functions/index.cjs +1 -1
- package/dist/functions/index.d.cts +1 -1
- package/dist/functions/index.d.mts +1 -1
- package/dist/functions/index.mjs +1 -1
- package/dist/{functions-B6qCvfmy.cjs → functions-VnOTEp74.cjs} +2 -2
- package/dist/{functions-B6qCvfmy.cjs.map → functions-VnOTEp74.cjs.map} +1 -1
- package/dist/{functions-C53GW2eQ.mjs → functions-faoJOUmr.mjs} +2 -2
- package/dist/{functions-C53GW2eQ.mjs.map → functions-faoJOUmr.mjs.map} +1 -1
- package/dist/{index-D_frT6MP.d.cts → index-D9gxXK1m.d.cts} +2 -2
- package/dist/{index-D_frT6MP.d.cts.map → index-D9gxXK1m.d.cts.map} +1 -1
- package/dist/{index-DcyIYbDS.d.mts → index-Df4DrCZd.d.mts} +2 -2
- package/dist/{index-DcyIYbDS.d.mts.map → index-Df4DrCZd.d.mts.map} +1 -1
- package/dist/{index-B2urf3YI.d.cts → index-fnpjXiA-.d.mts} +2 -2
- package/dist/{index-B2urf3YI.d.cts.map → index-fnpjXiA-.d.mts.map} +1 -1
- package/dist/{index-DMCDvnsM.d.mts → index-tE_119SX.d.cts} +2 -2
- package/dist/{index-DMCDvnsM.d.mts.map → index-tE_119SX.d.cts.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/queue/index.cjs +1 -1
- package/dist/queue/index.d.cts +1 -1
- package/dist/queue/index.d.mts +1 -1
- package/dist/queue/index.mjs +1 -1
- package/dist/rest-api.cjs +56 -34
- package/dist/rest-api.cjs.map +1 -1
- package/dist/rest-api.d.cts +36 -23
- package/dist/rest-api.d.cts.map +1 -1
- package/dist/rest-api.d.mts +36 -23
- package/dist/rest-api.d.mts.map +1 -1
- package/dist/rest-api.mjs +56 -34
- package/dist/rest-api.mjs.map +1 -1
- package/dist/subscribers/index.cjs +1 -1
- package/dist/subscribers/index.d.cts +2 -2
- package/dist/subscribers/index.d.mts +2 -2
- package/dist/subscribers/index.mjs +1 -1
- package/dist/topic/index.cjs +1 -1
- package/dist/topic/index.d.cts +2 -2
- package/dist/topic/index.d.mts +2 -2
- package/dist/topic/index.mjs +1 -1
- package/dist/worker.cjs +3 -3
- package/dist/worker.d.cts +6 -6
- package/dist/worker.d.mts +6 -6
- package/dist/worker.mjs +3 -3
- package/package.json +30 -30
- package/dist/Construct-BeYVu_QF.mjs.map +0 -1
- package/dist/Construct-DqdlARxq.cjs.map +0 -1
- package/dist/index-C1ZwNOOk.d.cts.map +0 -1
- package/dist/index-Cc4kKPag.d.mts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriberBuilder-C0ZEtGDI.cjs","names":["Construct","DEFAULT_LOGGER","DEFAULT_LOGGER","cloneWith","servicesOf","idsOf"],"sources":["../src/subscribers/Subscriber.ts","../src/subscribers/SubscriberBuilder.ts"],"sourcesContent":["import type {\n\tEventPublisher,\n\tExtractPublisherMessage,\n} from '@geekmidas/events';\nimport type { Logger } from '@geekmidas/logger';\nimport { DEFAULT_LOGGER } from '@geekmidas/logger/console';\nimport type { InferStandardSchema } from '@geekmidas/schema';\nimport type { Service, ServiceRecord } from '@geekmidas/services';\nimport type { StandardSchemaV1 } from '@standard-schema/spec';\nimport { Construct, ConstructType } from '../Construct';\n\n// Helper type to extract payload types for subscribed events\ntype ExtractEventPayloads<\n\tTPublisher extends EventPublisher<any> | undefined,\n\tTEventTypes extends any[],\n> = TPublisher extends EventPublisher<any>\n\t? Extract<ExtractPublisherMessage<TPublisher>, { type: TEventTypes[number] }>\n\t: never;\n\nexport class Subscriber<\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n\tOutSchema extends StandardSchemaV1 | undefined = undefined,\n\tTEventPublisher extends EventPublisher<any> | undefined = undefined,\n\tTEventPublisherServiceName extends string = string,\n\tTSubscribedEvents extends\n\t\tExtractPublisherMessage<TEventPublisher>['type'][] = ExtractPublisherMessage<TEventPublisher>['type'][],\n> extends Construct<\n\tTLogger,\n\tTEventPublisherServiceName,\n\tTEventPublisher,\n\tOutSchema,\n\tTServices\n> {\n\t__IS_SUBSCRIBER__ = true;\n\n\tstatic isSubscriber(\n\t\tobj: any,\n\t): obj is Subscriber<any, any, any, any, any, any> {\n\t\treturn Boolean(\n\t\t\tobj &&\n\t\t\t\tobj.__IS_SUBSCRIBER__ === true &&\n\t\t\t\tobj.type === ConstructType.Subscriber,\n\t\t);\n\t}\n\n\tconstructor(\n\t\tpublic readonly handler: SubscriberHandler<\n\t\t\tTEventPublisher,\n\t\t\tTSubscribedEvents,\n\t\t\tTServices,\n\t\t\tTLogger,\n\t\t\tOutSchema\n\t\t>,\n\t\tpublic override readonly timeout: number = 30000,\n\t\tprotected _subscribedEvents?: TSubscribedEvents,\n\t\tpublic override readonly outputSchema?: OutSchema,\n\t\tpublic override readonly services: TServices = [] as unknown as TServices,\n\t\tpublic override readonly logger: TLogger = DEFAULT_LOGGER as TLogger,\n\t\tpublic override readonly publisherService?: Service<\n\t\t\tTEventPublisherServiceName,\n\t\t\tTEventPublisher\n\t\t>,\n\t\t/**\n\t\t * The name of the {@link Topic} this subscriber binds to (via\n\t\t * `s.topic(topic)`), recorded for the manifest so infra wires the SNS\n\t\t * subscription. Undefined when the subscriber's events are typed from a\n\t\t * (hand-written) publisher instead.\n\t\t */\n\t\tpublic readonly topicName?: string,\n\t\t/**\n\t\t * The construct ids `.dependsOn()` named — last, so no existing positional\n\t\t * argument moves.\n\t\t */\n\t\tconstructs: string[] = [],\n\t) {\n\t\tsuper(\n\t\t\tConstructType.Subscriber,\n\t\t\tlogger,\n\t\t\tservices,\n\t\t\t[],\n\t\t\tpublisherService,\n\t\t\toutputSchema,\n\t\t\ttimeout,\n\t\t\tundefined, // memorySize\n\t\t\tundefined, // auditorStorageService\n\t\t\tconstructs,\n\t\t);\n\t}\n\n\tget subscribedEvents(): TSubscribedEvents | undefined {\n\t\treturn this._subscribedEvents;\n\t}\n}\n\n// Handler type for subscribers that receives an array of events\nexport type SubscriberHandler<\n\tTEventPublisher extends EventPublisher<any> | undefined,\n\tTSubscribedEvents extends ExtractPublisherMessage<TEventPublisher>['type'][],\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n\tOutSchema extends StandardSchemaV1 | undefined = undefined,\n> = (\n\tctx: SubscriberContext<\n\t\tTEventPublisher,\n\t\tTSubscribedEvents,\n\t\tTServices,\n\t\tTLogger\n\t>,\n) => OutSchema extends StandardSchemaV1\n\t? InferStandardSchema<OutSchema> | Promise<InferStandardSchema<OutSchema>>\n\t: any | Promise<any>;\n\n// Context type for subscriber handlers\nexport type SubscriberContext<\n\tTEventPublisher extends EventPublisher<any> | undefined,\n\tTSubscribedEvents extends ExtractPublisherMessage<TEventPublisher>['type'][],\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n> = {\n\tevents: ExtractEventPayloads<TEventPublisher, TSubscribedEvents>[];\n\tservices: ServiceRecord<TServices>;\n\tlogger: TLogger;\n};\n","import type {\n\tEventPublisher,\n\tExtractPublisherMessage,\n} from '@geekmidas/events';\nimport type { Logger } from '@geekmidas/logger';\nimport { DEFAULT_LOGGER } from '@geekmidas/logger/console';\nimport type { Service } from '@geekmidas/services';\nimport type { StandardSchemaV1 } from '@standard-schema/spec';\nimport { cloneWith } from '../clone';\nimport {\n\ttype Consumable,\n\tidsOf,\n\ttype ServicesOf,\n\tservicesOf,\n} from '../construct-interface';\nimport type { Topic, TopicEvents, TopicMessage } from '../topic/Topic';\nimport { Subscriber, type SubscriberHandler } from './Subscriber';\n\nexport class SubscriberBuilder<\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n\tOutSchema extends StandardSchemaV1 | undefined = undefined,\n\tTEventPublisher extends EventPublisher<any> | undefined = undefined,\n\tTEventPublisherServiceName extends string = string,\n\tTSubscribedEvents extends any[] = [],\n> {\n\tprivate _subscribedEvents: TSubscribedEvents = [] as any;\n\tprivate _timeout?: number;\n\tprivate outputSchema?: OutSchema;\n\tprivate _services: TServices = [] as Service[] as TServices;\n\t/** The construct ids `.dependsOn()` named — what the manifest records. */\n\tpublic _constructs: string[] = [];\n\tprivate _logger: TLogger = DEFAULT_LOGGER;\n\t/**\n\t * The deploy unit that runs this, by construct id. Seeded by the factory a\n\t * `Worker` hands out, so a subscriber is not owned by its directory.\n\t */\n\tpublic _owner?: string;\n\tprivate _publisher?: Service<TEventPublisherServiceName, TEventPublisher>;\n\tprivate _topicName?: string;\n\n\tconstructor() {\n\t\tthis._timeout = 30000; // Default timeout\n\t}\n\n\t/**\n\t * Bind this subscriber to a {@link Topic} — the preferred way to type and wire\n\t * a fan-out consumer. It supplies the subscribable event types (and their\n\t * payloads) from the topic's contract and records the binding for the manifest,\n\t * so infra wires the SNS subscription.\n\t *\n\t * Prefer this over typing via a hand-written publisher service: a consumer does\n\t * not publish, so binding a topic does *not* require the topic's publisher\n\t * connection string (least privilege). Use `.publisher(...)` only when the\n\t * subscriber actually publishes follow-up events.\n\t */\n\ttopic<TName extends string, TEvents extends TopicEvents>(\n\t\ttopic: Topic<TName, TEvents>,\n\t): SubscriberBuilder<\n\t\tTServices,\n\t\tTLogger,\n\t\tOutSchema,\n\t\tEventPublisher<TopicMessage<TEvents>>,\n\t\tTEventPublisherServiceName,\n\t\tTSubscribedEvents\n\t> {\n\t\treturn cloneWith(this, {\n\t\t\t_topicName: topic.name,\n\t\t}) as unknown as SubscriberBuilder<\n\t\t\tTServices,\n\t\t\tTLogger,\n\t\t\tOutSchema,\n\t\t\tEventPublisher<TopicMessage<TEvents>>,\n\t\t\tTEventPublisherServiceName,\n\t\t\tTSubscribedEvents\n\t\t>;\n\t}\n\n\ttimeout(timeout: number): this {\n\t\treturn cloneWith(this, { _timeout: timeout });\n\t}\n\n\toutput<T extends StandardSchemaV1>(\n\t\tschema: T,\n\t): SubscriberBuilder<\n\t\tTServices,\n\t\tTLogger,\n\t\tT,\n\t\tTEventPublisher,\n\t\tTEventPublisherServiceName,\n\t\tTSubscribedEvents\n\t> {\n\t\treturn cloneWith(this, {\n\t\t\toutputSchema: schema as unknown as OutSchema,\n\t\t}) as any;\n\t}\n\n\t/**\n\t * Depend on constructs — a database, a bucket, a mail sender, a queue, a\n\t * topic.\n\t *\n\t * It records the edge and dissolves each construct's client into the\n\t * handler's service record under the construct's own id, so\n\t * `.dependsOn([uploads])` is what makes `services.uploads` exist and type.\n\t *\n\t * Constructs only. A `Service` does not match the shape, which is what keeps\n\t * env sniffing confined to `.services()` and the explicit lift.\n\t */\n\tdependsOn<const T extends readonly Consumable[]>(\n\t\tconstructs: T,\n\t): SubscriberBuilder<\n\t\t[...TServices, ...ServicesOf<T>],\n\t\tTLogger,\n\t\tOutSchema,\n\t\tTEventPublisher,\n\t\tTEventPublisherServiceName,\n\t\tTSubscribedEvents\n\t> {\n\t\t// Both halves of the edge, from one call and one clone: the services the\n\t\t// handler runs with, and the ids the manifest records. Recording them\n\t\t// separately is what let them drift apart.\n\t\t//\n\t\t// `servicesOf` is the half that validates, so it runs first — recording\n\t\t// ids ahead of it left a caught `NotAConstruct` with `undefined` already\n\t\t// on a `string[]`.\n\t\tconst services = servicesOf(constructs) as unknown as Service[];\n\n\t\treturn cloneWith(this, {\n\t\t\t_services: [...this._services, ...services],\n\t\t\t_constructs: idsOf(constructs, this._constructs),\n\t\t}) as unknown as SubscriberBuilder<\n\t\t\t[...TServices, ...ServicesOf<T>],\n\t\t\tTLogger,\n\t\t\tOutSchema,\n\t\t\tTEventPublisher,\n\t\t\tTEventPublisherServiceName,\n\t\t\tTSubscribedEvents\n\t\t>;\n\t}\n\n\tservices<T extends Service[]>(\n\t\tservices: T,\n\t): SubscriberBuilder<\n\t\t[...TServices, ...T],\n\t\tTLogger,\n\t\tOutSchema,\n\t\tTEventPublisher,\n\t\tTEventPublisherServiceName,\n\t\tTSubscribedEvents\n\t> {\n\t\treturn cloneWith(this, {\n\t\t\t_services: [...this._services, ...services] as any,\n\t\t}) as any;\n\t}\n\n\tlogger<T extends Logger>(\n\t\tlogger: T,\n\t): SubscriberBuilder<\n\t\tTServices,\n\t\tT,\n\t\tOutSchema,\n\t\tTEventPublisher,\n\t\tTEventPublisherServiceName,\n\t\tTSubscribedEvents\n\t> {\n\t\treturn cloneWith(this, { _logger: logger as unknown as TLogger }) as any;\n\t}\n\n\tpublisher<T extends EventPublisher<any>, TName extends string>(\n\t\tpublisher: Service<TName, T>,\n\t): SubscriberBuilder<\n\t\tTServices,\n\t\tTLogger,\n\t\tOutSchema,\n\t\tT,\n\t\tTName,\n\t\tTSubscribedEvents\n\t> {\n\t\treturn cloneWith(this, { _publisher: publisher as any }) as any;\n\t}\n\n\tsubscribe<\n\t\tTEvent extends TEventPublisher extends EventPublisher<any>\n\t\t\t?\n\t\t\t\t\t| ExtractPublisherMessage<TEventPublisher>['type']\n\t\t\t\t\t| ExtractPublisherMessage<TEventPublisher>['type'][]\n\t\t\t: never,\n\t>(\n\t\tevent: TEvent,\n\t): SubscriberBuilder<\n\t\tTServices,\n\t\tTLogger,\n\t\tOutSchema,\n\t\tTEventPublisher,\n\t\tTEventPublisherServiceName,\n\t\tTEvent extends any[]\n\t\t\t? [...TSubscribedEvents, ...TEvent]\n\t\t\t: [...TSubscribedEvents, TEvent]\n\t> {\n\t\tconst eventsToAdd = Array.isArray(event) ? event : [event];\n\t\treturn cloneWith(this, {\n\t\t\t_subscribedEvents: [...this._subscribedEvents, ...eventsToAdd] as any,\n\t\t}) as any;\n\t}\n\n\thandle(\n\t\tfn: SubscriberHandler<\n\t\t\tTEventPublisher,\n\t\t\tTSubscribedEvents,\n\t\t\tTServices,\n\t\t\tTLogger,\n\t\t\tOutSchema\n\t\t>,\n\t): Subscriber<\n\t\tTServices,\n\t\tTLogger,\n\t\tOutSchema,\n\t\tTEventPublisher,\n\t\tTEventPublisherServiceName,\n\t\tTSubscribedEvents\n\t> {\n\t\tconst subscriber = new Subscriber(\n\t\t\tfn,\n\t\t\tthis._timeout,\n\t\t\tthis._subscribedEvents,\n\t\t\tthis.outputSchema,\n\t\t\tthis._services,\n\t\t\tthis._logger,\n\t\t\tthis._publisher,\n\t\t\tthis._topicName,\n\t\t\tthis._constructs,\n\t\t);\n\n\t\t// Which process runs it. Carried from the factory rather than inferred\n\t\t// from the directory the file happens to sit in.\n\t\tsubscriber.owner = this._owner;\n\n\t\t// No reset: `.handle()` reads this builder and leaves it alone, so a\n\t\t// configured base stays usable for the next subscriber.\n\t\treturn subscriber;\n\t}\n}\n"],"mappings":";;;;;AAmBA,IAAa,aAAb,cAQUA,kBAAAA,UAMR;CAcgB;CAOS;CACf;CACe;CACA;CACA;CACA;CAUT;CAnCjB,oBAAoB;CAEpB,OAAO,aACN,KACkD;EAClD,OAAO,QACN,OACC,IAAI,sBAAsB,QAC1B,IAAI,SAAA,mCACN;CACD;CAEA,YACC,SAOA,UAA2C,KAC3C,mBACA,cACA,WAA+C,CAAC,GAChD,SAA2CC,0BAAAA,gBAC3C,kBAUA,WAKA,aAAuB,CAAC,GACvB;EACD,MAAA,qCAEC,QACA,UACA,CAAC,GACD,kBACA,cACA,SACA,KAAA,GACA,KAAA,GACA,UACD;EAxCgB,KAAA,UAAA;EAOS,KAAA,UAAA;EACf,KAAA,oBAAA;EACe,KAAA,eAAA;EACA,KAAA,WAAA;EACA,KAAA,SAAA;EACA,KAAA,mBAAA;EAUT,KAAA,YAAA;CAmBjB;CAEA,IAAI,mBAAkD;EACrD,OAAO,KAAK;CACb;AACD;;;AC3EA,IAAa,oBAAb,MAOE;CACD,oBAA+C,CAAC;CAChD;CACA;CACA,YAA+B,CAAC;;CAEhC,cAA+B,CAAC;CAChC,UAA2BC,0BAAAA;;;;;CAK3B;CACA;CACA;CAEA,cAAc;EACb,KAAK,WAAW;CACjB;;;;;;;;;;;;CAaA,MACC,OAQC;EACD,OAAOC,cAAAA,UAAU,MAAM,EACtB,YAAY,MAAM,KACnB,CAAC;CAQF;CAEA,QAAQ,SAAuB;EAC9B,OAAOA,cAAAA,UAAU,MAAM,EAAE,UAAU,QAAQ,CAAC;CAC7C;CAEA,OACC,QAQC;EACD,OAAOA,cAAAA,UAAU,MAAM,EACtB,cAAc,OACf,CAAC;CACF;;;;;;;;;;;;CAaA,UACC,YAQC;EAQD,MAAM,WAAWC,4BAAAA,WAAW,UAAU;EAEtC,OAAOD,cAAAA,UAAU,MAAM;GACtB,WAAW,CAAC,GAAG,KAAK,WAAW,GAAG,QAAQ;GAC1C,aAAaE,4BAAAA,MAAM,YAAY,KAAK,WAAW;EAChD,CAAC;CAQF;CAEA,SACC,UAQC;EACD,OAAOF,cAAAA,UAAU,MAAM,EACtB,WAAW,CAAC,GAAG,KAAK,WAAW,GAAG,QAAQ,EAC3C,CAAC;CACF;CAEA,OACC,QAQC;EACD,OAAOA,cAAAA,UAAU,MAAM,EAAE,SAAS,OAA6B,CAAC;CACjE;CAEA,UACC,WAQC;EACD,OAAOA,cAAAA,UAAU,MAAM,EAAE,YAAY,UAAiB,CAAC;CACxD;CAEA,UAOC,OAUC;EACD,MAAM,cAAc,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,KAAK;EACzD,OAAOA,cAAAA,UAAU,MAAM,EACtB,mBAAmB,CAAC,GAAG,KAAK,mBAAmB,GAAG,WAAW,EAC9D,CAAC;CACF;CAEA,OACC,IAcC;EACD,MAAM,aAAa,IAAI,WACtB,IACA,KAAK,UACL,KAAK,mBACL,KAAK,cACL,KAAK,WACL,KAAK,SACL,KAAK,YACL,KAAK,YACL,KAAK,WACN;EAIA,WAAW,QAAQ,KAAK;EAIxB,OAAO;CACR;AACD"}
|
|
1
|
+
{"version":3,"file":"SubscriberBuilder-C2bCOuPT.cjs","names":["Construct","DEFAULT_LOGGER","DEFAULT_LOGGER","cloneWith","servicesOf","idsOf"],"sources":["../src/subscribers/Subscriber.ts","../src/subscribers/SubscriberBuilder.ts"],"sourcesContent":["import type {\n\tEventPublisher,\n\tExtractPublisherMessage,\n} from '@geekmidas/events';\nimport type { Logger } from '@geekmidas/logger';\nimport { DEFAULT_LOGGER } from '@geekmidas/logger/console';\nimport type { InferStandardSchema } from '@geekmidas/schema';\nimport type { Service, ServiceRecord } from '@geekmidas/services';\nimport type { StandardSchemaV1 } from '@standard-schema/spec';\nimport { Construct, ConstructType } from '../Construct';\n\n// Helper type to extract payload types for subscribed events\ntype ExtractEventPayloads<\n\tTPublisher extends EventPublisher<any> | undefined,\n\tTEventTypes extends any[],\n> = TPublisher extends EventPublisher<any>\n\t? Extract<ExtractPublisherMessage<TPublisher>, { type: TEventTypes[number] }>\n\t: never;\n\nexport class Subscriber<\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n\tOutSchema extends StandardSchemaV1 | undefined = undefined,\n\tTEventPublisher extends EventPublisher<any> | undefined = undefined,\n\tTEventPublisherServiceName extends string = string,\n\tTSubscribedEvents extends\n\t\tExtractPublisherMessage<TEventPublisher>['type'][] = ExtractPublisherMessage<TEventPublisher>['type'][],\n> extends Construct<\n\tTLogger,\n\tTEventPublisherServiceName,\n\tTEventPublisher,\n\tOutSchema,\n\tTServices\n> {\n\t__IS_SUBSCRIBER__ = true;\n\n\tstatic isSubscriber(\n\t\tobj: any,\n\t): obj is Subscriber<any, any, any, any, any, any> {\n\t\treturn Boolean(\n\t\t\tobj &&\n\t\t\t\tobj.__IS_SUBSCRIBER__ === true &&\n\t\t\t\tobj.type === ConstructType.Subscriber,\n\t\t);\n\t}\n\n\tconstructor(\n\t\tpublic readonly handler: SubscriberHandler<\n\t\t\tTEventPublisher,\n\t\t\tTSubscribedEvents,\n\t\t\tTServices,\n\t\t\tTLogger,\n\t\t\tOutSchema\n\t\t>,\n\t\tpublic override readonly timeout: number = 30000,\n\t\tprotected _subscribedEvents?: TSubscribedEvents,\n\t\tpublic override readonly outputSchema?: OutSchema,\n\t\tpublic override readonly services: TServices = [] as unknown as TServices,\n\t\tpublic override readonly logger: TLogger = DEFAULT_LOGGER as TLogger,\n\t\tpublic override readonly publisherService?: Service<\n\t\t\tTEventPublisherServiceName,\n\t\t\tTEventPublisher\n\t\t>,\n\t\t/**\n\t\t * The name of the {@link Topic} this subscriber binds to (via\n\t\t * `s.topic(topic)`), recorded for the manifest so infra wires the SNS\n\t\t * subscription. Undefined when the subscriber's events are typed from a\n\t\t * (hand-written) publisher instead.\n\t\t */\n\t\tpublic readonly topicName?: string,\n\t\t/**\n\t\t * The construct ids `.dependsOn()` named — last, so no existing positional\n\t\t * argument moves.\n\t\t */\n\t\tconstructs: string[] = [],\n\t) {\n\t\tsuper(\n\t\t\tConstructType.Subscriber,\n\t\t\tlogger,\n\t\t\tservices,\n\t\t\t[],\n\t\t\tpublisherService,\n\t\t\toutputSchema,\n\t\t\ttimeout,\n\t\t\tundefined, // memorySize\n\t\t\tundefined, // auditorStorageService\n\t\t\tconstructs,\n\t\t);\n\t}\n\n\tget subscribedEvents(): TSubscribedEvents | undefined {\n\t\treturn this._subscribedEvents;\n\t}\n}\n\n// Handler type for subscribers that receives an array of events\nexport type SubscriberHandler<\n\tTEventPublisher extends EventPublisher<any> | undefined,\n\tTSubscribedEvents extends ExtractPublisherMessage<TEventPublisher>['type'][],\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n\tOutSchema extends StandardSchemaV1 | undefined = undefined,\n> = (\n\tctx: SubscriberContext<\n\t\tTEventPublisher,\n\t\tTSubscribedEvents,\n\t\tTServices,\n\t\tTLogger\n\t>,\n) => OutSchema extends StandardSchemaV1\n\t? InferStandardSchema<OutSchema> | Promise<InferStandardSchema<OutSchema>>\n\t: any | Promise<any>;\n\n// Context type for subscriber handlers\nexport type SubscriberContext<\n\tTEventPublisher extends EventPublisher<any> | undefined,\n\tTSubscribedEvents extends ExtractPublisherMessage<TEventPublisher>['type'][],\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n> = {\n\tevents: ExtractEventPayloads<TEventPublisher, TSubscribedEvents>[];\n\tservices: ServiceRecord<TServices>;\n\tlogger: TLogger;\n};\n","import type {\n\tEventPublisher,\n\tExtractPublisherMessage,\n} from '@geekmidas/events';\nimport type { Logger } from '@geekmidas/logger';\nimport { DEFAULT_LOGGER } from '@geekmidas/logger/console';\nimport type { Service } from '@geekmidas/services';\nimport type { StandardSchemaV1 } from '@standard-schema/spec';\nimport { cloneWith } from '../clone';\nimport {\n\ttype Consumable,\n\tidsOf,\n\ttype ServicesOf,\n\tservicesOf,\n} from '../construct-interface';\nimport type { Topic, TopicEvents, TopicMessage } from '../topic/Topic';\nimport { Subscriber, type SubscriberHandler } from './Subscriber';\n\nexport class SubscriberBuilder<\n\tTServices extends Service[] = [],\n\tTLogger extends Logger = Logger,\n\tOutSchema extends StandardSchemaV1 | undefined = undefined,\n\tTEventPublisher extends EventPublisher<any> | undefined = undefined,\n\tTEventPublisherServiceName extends string = string,\n\tTSubscribedEvents extends any[] = [],\n> {\n\tprivate _subscribedEvents: TSubscribedEvents = [] as any;\n\tprivate _timeout?: number;\n\tprivate outputSchema?: OutSchema;\n\tprivate _services: TServices = [] as Service[] as TServices;\n\t/** The construct ids `.dependsOn()` named — what the manifest records. */\n\tpublic _constructs: string[] = [];\n\tprivate _logger: TLogger = DEFAULT_LOGGER;\n\t/**\n\t * The deploy unit that runs this, by construct id. Seeded by the factory a\n\t * `Worker` hands out, so a subscriber is not owned by its directory.\n\t */\n\tpublic _owner?: string;\n\tprivate _publisher?: Service<TEventPublisherServiceName, TEventPublisher>;\n\tprivate _topicName?: string;\n\n\tconstructor() {\n\t\tthis._timeout = 30000; // Default timeout\n\t}\n\n\t/**\n\t * Bind this subscriber to a {@link Topic} — the preferred way to type and wire\n\t * a fan-out consumer. It supplies the subscribable event types (and their\n\t * payloads) from the topic's contract and records the binding for the manifest,\n\t * so infra wires the SNS subscription.\n\t *\n\t * Prefer this over typing via a hand-written publisher service: a consumer does\n\t * not publish, so binding a topic does *not* require the topic's publisher\n\t * connection string (least privilege). Use `.publisher(...)` only when the\n\t * subscriber actually publishes follow-up events.\n\t */\n\ttopic<TName extends string, TEvents extends TopicEvents>(\n\t\ttopic: Topic<TName, TEvents>,\n\t): SubscriberBuilder<\n\t\tTServices,\n\t\tTLogger,\n\t\tOutSchema,\n\t\tEventPublisher<TopicMessage<TEvents>>,\n\t\tTEventPublisherServiceName,\n\t\tTSubscribedEvents\n\t> {\n\t\treturn cloneWith(this, {\n\t\t\t_topicName: topic.name,\n\t\t}) as unknown as SubscriberBuilder<\n\t\t\tTServices,\n\t\t\tTLogger,\n\t\t\tOutSchema,\n\t\t\tEventPublisher<TopicMessage<TEvents>>,\n\t\t\tTEventPublisherServiceName,\n\t\t\tTSubscribedEvents\n\t\t>;\n\t}\n\n\ttimeout(timeout: number): this {\n\t\treturn cloneWith(this, { _timeout: timeout });\n\t}\n\n\toutput<T extends StandardSchemaV1>(\n\t\tschema: T,\n\t): SubscriberBuilder<\n\t\tTServices,\n\t\tTLogger,\n\t\tT,\n\t\tTEventPublisher,\n\t\tTEventPublisherServiceName,\n\t\tTSubscribedEvents\n\t> {\n\t\treturn cloneWith(this, {\n\t\t\toutputSchema: schema as unknown as OutSchema,\n\t\t}) as any;\n\t}\n\n\t/**\n\t * Depend on constructs — a database, a bucket, a mail sender, a queue, a\n\t * topic.\n\t *\n\t * It records the edge and dissolves each construct's client into the\n\t * handler's service record under the construct's own id, so\n\t * `.dependsOn([uploads])` is what makes `services.uploads` exist and type.\n\t *\n\t * Constructs only. A `Service` does not match the shape, which is what keeps\n\t * env sniffing confined to `.services()` and the explicit lift.\n\t */\n\tdependsOn<const T extends readonly Consumable[]>(\n\t\tconstructs: T,\n\t): SubscriberBuilder<\n\t\t[...TServices, ...ServicesOf<T>],\n\t\tTLogger,\n\t\tOutSchema,\n\t\tTEventPublisher,\n\t\tTEventPublisherServiceName,\n\t\tTSubscribedEvents\n\t> {\n\t\t// Both halves of the edge, from one call and one clone: the services the\n\t\t// handler runs with, and the ids the manifest records. Recording them\n\t\t// separately is what let them drift apart.\n\t\t//\n\t\t// `servicesOf` is the half that validates, so it runs first — recording\n\t\t// ids ahead of it left a caught `NotAConstruct` with `undefined` already\n\t\t// on a `string[]`.\n\t\tconst services = servicesOf(constructs) as unknown as Service[];\n\n\t\treturn cloneWith(this, {\n\t\t\t_services: [...this._services, ...services],\n\t\t\t_constructs: idsOf(constructs, this._constructs),\n\t\t}) as unknown as SubscriberBuilder<\n\t\t\t[...TServices, ...ServicesOf<T>],\n\t\t\tTLogger,\n\t\t\tOutSchema,\n\t\t\tTEventPublisher,\n\t\t\tTEventPublisherServiceName,\n\t\t\tTSubscribedEvents\n\t\t>;\n\t}\n\n\tservices<T extends Service[]>(\n\t\tservices: T,\n\t): SubscriberBuilder<\n\t\t[...TServices, ...T],\n\t\tTLogger,\n\t\tOutSchema,\n\t\tTEventPublisher,\n\t\tTEventPublisherServiceName,\n\t\tTSubscribedEvents\n\t> {\n\t\treturn cloneWith(this, {\n\t\t\t_services: [...this._services, ...services] as any,\n\t\t}) as any;\n\t}\n\n\tlogger<T extends Logger>(\n\t\tlogger: T,\n\t): SubscriberBuilder<\n\t\tTServices,\n\t\tT,\n\t\tOutSchema,\n\t\tTEventPublisher,\n\t\tTEventPublisherServiceName,\n\t\tTSubscribedEvents\n\t> {\n\t\treturn cloneWith(this, { _logger: logger as unknown as TLogger }) as any;\n\t}\n\n\tpublisher<T extends EventPublisher<any>, TName extends string>(\n\t\tpublisher: Service<TName, T>,\n\t): SubscriberBuilder<\n\t\tTServices,\n\t\tTLogger,\n\t\tOutSchema,\n\t\tT,\n\t\tTName,\n\t\tTSubscribedEvents\n\t> {\n\t\treturn cloneWith(this, { _publisher: publisher as any }) as any;\n\t}\n\n\tsubscribe<\n\t\tTEvent extends TEventPublisher extends EventPublisher<any>\n\t\t\t?\n\t\t\t\t\t| ExtractPublisherMessage<TEventPublisher>['type']\n\t\t\t\t\t| ExtractPublisherMessage<TEventPublisher>['type'][]\n\t\t\t: never,\n\t>(\n\t\tevent: TEvent,\n\t): SubscriberBuilder<\n\t\tTServices,\n\t\tTLogger,\n\t\tOutSchema,\n\t\tTEventPublisher,\n\t\tTEventPublisherServiceName,\n\t\tTEvent extends any[]\n\t\t\t? [...TSubscribedEvents, ...TEvent]\n\t\t\t: [...TSubscribedEvents, TEvent]\n\t> {\n\t\tconst eventsToAdd = Array.isArray(event) ? event : [event];\n\t\treturn cloneWith(this, {\n\t\t\t_subscribedEvents: [...this._subscribedEvents, ...eventsToAdd] as any,\n\t\t}) as any;\n\t}\n\n\thandle(\n\t\tfn: SubscriberHandler<\n\t\t\tTEventPublisher,\n\t\t\tTSubscribedEvents,\n\t\t\tTServices,\n\t\t\tTLogger,\n\t\t\tOutSchema\n\t\t>,\n\t): Subscriber<\n\t\tTServices,\n\t\tTLogger,\n\t\tOutSchema,\n\t\tTEventPublisher,\n\t\tTEventPublisherServiceName,\n\t\tTSubscribedEvents\n\t> {\n\t\tconst subscriber = new Subscriber(\n\t\t\tfn,\n\t\t\tthis._timeout,\n\t\t\tthis._subscribedEvents,\n\t\t\tthis.outputSchema,\n\t\t\tthis._services,\n\t\t\tthis._logger,\n\t\t\tthis._publisher,\n\t\t\tthis._topicName,\n\t\t\tthis._constructs,\n\t\t);\n\n\t\t// Which process runs it. Carried from the factory rather than inferred\n\t\t// from the directory the file happens to sit in.\n\t\tsubscriber.owner = this._owner;\n\n\t\t// No reset: `.handle()` reads this builder and leaves it alone, so a\n\t\t// configured base stays usable for the next subscriber.\n\t\treturn subscriber;\n\t}\n}\n"],"mappings":";;;;;AAmBA,IAAa,aAAb,cAQUA,kBAAAA,UAMR;CAcgB;CAOS;CACf;CACe;CACA;CACA;CACA;CAUT;CAnCjB,oBAAoB;CAEpB,OAAO,aACN,KACkD;EAClD,OAAO,QACN,OACC,IAAI,sBAAsB,QAC1B,IAAI,SAAA,mCACN;CACD;CAEA,YACC,SAOA,UAA2C,KAC3C,mBACA,cACA,WAA+C,CAAC,GAChD,SAA2CC,0BAAAA,gBAC3C,kBAUA,WAKA,aAAuB,CAAC,GACvB;EACD,MAAA,qCAEC,QACA,UACA,CAAC,GACD,kBACA,cACA,SACA,KAAA,GACA,KAAA,GACA,UACD;EAxCgB,KAAA,UAAA;EAOS,KAAA,UAAA;EACf,KAAA,oBAAA;EACe,KAAA,eAAA;EACA,KAAA,WAAA;EACA,KAAA,SAAA;EACA,KAAA,mBAAA;EAUT,KAAA,YAAA;CAmBjB;CAEA,IAAI,mBAAkD;EACrD,OAAO,KAAK;CACb;AACD;;;AC3EA,IAAa,oBAAb,MAOE;CACD,oBAA+C,CAAC;CAChD;CACA;CACA,YAA+B,CAAC;;CAEhC,cAA+B,CAAC;CAChC,UAA2BC,0BAAAA;;;;;CAK3B;CACA;CACA;CAEA,cAAc;EACb,KAAK,WAAW;CACjB;;;;;;;;;;;;CAaA,MACC,OAQC;EACD,OAAOC,cAAAA,UAAU,MAAM,EACtB,YAAY,MAAM,KACnB,CAAC;CAQF;CAEA,QAAQ,SAAuB;EAC9B,OAAOA,cAAAA,UAAU,MAAM,EAAE,UAAU,QAAQ,CAAC;CAC7C;CAEA,OACC,QAQC;EACD,OAAOA,cAAAA,UAAU,MAAM,EACtB,cAAc,OACf,CAAC;CACF;;;;;;;;;;;;CAaA,UACC,YAQC;EAQD,MAAM,WAAWC,4BAAAA,WAAW,UAAU;EAEtC,OAAOD,cAAAA,UAAU,MAAM;GACtB,WAAW,CAAC,GAAG,KAAK,WAAW,GAAG,QAAQ;GAC1C,aAAaE,4BAAAA,MAAM,YAAY,KAAK,WAAW;EAChD,CAAC;CAQF;CAEA,SACC,UAQC;EACD,OAAOF,cAAAA,UAAU,MAAM,EACtB,WAAW,CAAC,GAAG,KAAK,WAAW,GAAG,QAAQ,EAC3C,CAAC;CACF;CAEA,OACC,QAQC;EACD,OAAOA,cAAAA,UAAU,MAAM,EAAE,SAAS,OAA6B,CAAC;CACjE;CAEA,UACC,WAQC;EACD,OAAOA,cAAAA,UAAU,MAAM,EAAE,YAAY,UAAiB,CAAC;CACxD;CAEA,UAOC,OAUC;EACD,MAAM,cAAc,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,KAAK;EACzD,OAAOA,cAAAA,UAAU,MAAM,EACtB,mBAAmB,CAAC,GAAG,KAAK,mBAAmB,GAAG,WAAW,EAC9D,CAAC;CACF;CAEA,OACC,IAcC;EACD,MAAM,aAAa,IAAI,WACtB,IACA,KAAK,UACL,KAAK,mBACL,KAAK,cACL,KAAK,WACL,KAAK,SACL,KAAK,YACL,KAAK,YACL,KAAK,WACN;EAIA,WAAW,QAAQ,KAAK;EAIxB,OAAO;CACR;AACD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as StandardSchemaV1 } from "./index-CeEtxDmK.mjs";
|
|
2
2
|
import { n as Consumable, s as ServicesOf } from "./construct-interface-DPlxfpoS.mjs";
|
|
3
|
-
import { n as SubscriberHandler, t as Subscriber } from "./Subscriber-
|
|
4
|
-
import { n as TopicEvents, r as TopicMessage, t as Topic } from "./Topic-
|
|
3
|
+
import { n as SubscriberHandler, t as Subscriber } from "./Subscriber-CIO3pwji.mjs";
|
|
4
|
+
import { n as TopicEvents, r as TopicMessage, t as Topic } from "./Topic-DVvheJ_-.mjs";
|
|
5
5
|
import { EventPublisher, ExtractPublisherMessage } from "@geekmidas/events";
|
|
6
6
|
import { Service } from "@geekmidas/services";
|
|
7
7
|
import { Logger } from "@geekmidas/logger";
|
|
@@ -56,4 +56,4 @@ declare class SubscriberBuilder<TServices extends Service[] = [], TLogger extend
|
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
58
|
export { SubscriberBuilder as t };
|
|
59
|
-
//# sourceMappingURL=SubscriberBuilder-
|
|
59
|
+
//# sourceMappingURL=SubscriberBuilder-COW4rHnb.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriberBuilder-
|
|
1
|
+
{"version":3,"file":"SubscriberBuilder-COW4rHnb.d.mts","names":[],"sources":["../src/subscribers/SubscriberBuilder.ts"],"mappings":";;;;;;;;cAkBa,kBACZ,kBAAkB,gBAClB,gBAAgB,SAAS,QACzB,kBAAkB,0CAClB,wBAAwB,6CACxB,oDACA;UAEQ;UACA;UACA;UACA;;EAED;UACC;;;;;EAKD;UACC;UACA;EAER;;;;;;;;;;;;EAeA,MAAM,sBAAsB,gBAAgB,aAC3C,OAAO,MAAM,OAAO,WAClB,kBACF,WACA,SACA,WACA,eAAe,aAAa,WAC5B,4BACA;EAcD,QAAQ;EAIR,OAAO,UAAU,kBAChB,QAAQ,IACN,kBACF,WACA,SACA,GACA,iBACA,4BACA;;;;;;;;;;;;EAkBD,gBAAgB,mBAAmB,cAClC,YAAY,IACV,sBACE,cAAc,WAAW,KAC7B,SACA,WACA,iBACA,4BACA;EAwBD,SAAS,UAAU,WAClB,UAAU,IACR,sBACE,cAAc,IAClB,SACA,WACA,iBACA,4BACA;EAOD,OAAO,UAAU,QAChB,QAAQ,IACN,kBACF,WACA,GACA,WACA,iBACA,4BACA;EAKD,UAAU,UAAU,qBAAqB,sBACxC,WAAW,QAAQ,OAAO,KACxB,kBACF,WACA,SACA,WACA,GACA,OACA;EAKD,UACC,eAAe,wBAAwB,sBAElC,wBAAwB,2BACxB,wBAAwB,oCAG7B,OAAO,SACL,kBACF,WACA,SACA,WACA,iBACA,4BACA,2BACO,sBAAsB,cACtB,mBAAmB;EAQ3B,OACC,IAAI,kBACH,iBACA,mBACA,WACA,SACA,aAEC,WACF,WACA,SACA,WACA,iBACA,4BACA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as StandardSchemaV1 } from "./index-CeEtxDmK.cjs";
|
|
2
2
|
import { n as Consumable, s as ServicesOf } from "./construct-interface-DgXTJcOD.cjs";
|
|
3
|
-
import { n as SubscriberHandler, t as Subscriber } from "./Subscriber-
|
|
4
|
-
import { n as TopicEvents, r as TopicMessage, t as Topic } from "./Topic-
|
|
3
|
+
import { n as SubscriberHandler, t as Subscriber } from "./Subscriber-DQCaiOXF.cjs";
|
|
4
|
+
import { n as TopicEvents, r as TopicMessage, t as Topic } from "./Topic-D6blllEn.cjs";
|
|
5
5
|
import { EventPublisher, ExtractPublisherMessage } from "@geekmidas/events";
|
|
6
6
|
import { Logger } from "@geekmidas/logger";
|
|
7
7
|
import { Service } from "@geekmidas/services";
|
|
@@ -56,4 +56,4 @@ declare class SubscriberBuilder<TServices extends Service[] = [], TLogger extend
|
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
58
|
export { SubscriberBuilder as t };
|
|
59
|
-
//# sourceMappingURL=SubscriberBuilder-
|
|
59
|
+
//# sourceMappingURL=SubscriberBuilder-DQ7EWdGO.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriberBuilder-
|
|
1
|
+
{"version":3,"file":"SubscriberBuilder-DQ7EWdGO.d.cts","names":[],"sources":["../src/subscribers/SubscriberBuilder.ts"],"mappings":";;;;;;;;cAkBa,kBACZ,kBAAkB,gBAClB,gBAAgB,SAAS,QACzB,kBAAkB,0CAClB,wBAAwB,6CACxB,oDACA;UAEQ;UACA;UACA;UACA;;EAED;UACC;;;;;EAKD;UACC;UACA;EAER;;;;;;;;;;;;EAeA,MAAM,sBAAsB,gBAAgB,aAC3C,OAAO,MAAM,OAAO,WAClB,kBACF,WACA,SACA,WACA,eAAe,aAAa,WAC5B,4BACA;EAcD,QAAQ;EAIR,OAAO,UAAU,kBAChB,QAAQ,IACN,kBACF,WACA,SACA,GACA,iBACA,4BACA;;;;;;;;;;;;EAkBD,gBAAgB,mBAAmB,cAClC,YAAY,IACV,sBACE,cAAc,WAAW,KAC7B,SACA,WACA,iBACA,4BACA;EAwBD,SAAS,UAAU,WAClB,UAAU,IACR,sBACE,cAAc,IAClB,SACA,WACA,iBACA,4BACA;EAOD,OAAO,UAAU,QAChB,QAAQ,IACN,kBACF,WACA,GACA,WACA,iBACA,4BACA;EAKD,UAAU,UAAU,qBAAqB,sBACxC,WAAW,QAAQ,OAAO,KACxB,kBACF,WACA,SACA,WACA,GACA,OACA;EAKD,UACC,eAAe,wBAAwB,sBAElC,wBAAwB,2BACxB,wBAAwB,oCAG7B,OAAO,SACL,kBACF,WACA,SACA,WACA,iBACA,4BACA,2BACO,sBAAsB,cACtB,mBAAmB;EAQ3B,OACC,IAAI,kBACH,iBACA,mBACA,WACA,SACA,aAEC,WACF,WACA,SACA,WACA,iBACA,4BACA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as StandardSchemaV1 } from "./index-CeEtxDmK.cjs";
|
|
2
|
-
import { t as Construct } from "./Construct-
|
|
2
|
+
import { t as Construct } from "./Construct-DTqYvkPG.cjs";
|
|
3
3
|
import { EventPublisher, PublishableMessage } from "@geekmidas/events";
|
|
4
4
|
import { Logger } from "@geekmidas/logger";
|
|
5
5
|
import { InferStandardSchema } from "@geekmidas/schema";
|
|
@@ -86,4 +86,4 @@ declare class Topic<TName extends string = string, TEvents extends TopicEvents =
|
|
|
86
86
|
}
|
|
87
87
|
//#endregion
|
|
88
88
|
export { TopicEvents as n, TopicMessage as r, Topic as t };
|
|
89
|
-
//# sourceMappingURL=Topic-
|
|
89
|
+
//# sourceMappingURL=Topic-D6blllEn.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Topic-
|
|
1
|
+
{"version":3,"file":"Topic-D6blllEn.d.cts","names":[],"sources":["../src/topic/Topic.ts"],"mappings":";;;;;;;;;KAoBY,cAAc,eAAe;;;;;KAM7B,aAAa,gBAAgB,kBACvC,WAAW,mBAAmB,mBAC9B,GACA,oBAAoB,QAAQ,cAEtB;;;;;;;;;;;cAYK,MACZ,+BACA,gBAAgB,cAAc,qBACrB;WA0BQ,MAAM;;;;;;WAMN,cAAc;EA/B/B;SAEO,QAAQ,eAAe,OAAO,cAAc;;;;;;;WAc1C;;;;;mBAMQ;EAEjB,YACiB,MAAM,OAMN;;;;;;EAAA,cAAc,SAC9B,SAAQ;;;;;;;;EAeT,WAAW;;MAmBP,qBAAqB;;;;;;;;;;;;;;;;;;;;MAuBrB,WAAW,QACd,aAAa,QACb,eAAe,aAAa;MAUzB,aAAa,WACb,kBACH,eAAe,aAAa"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as StandardSchemaV1 } from "./index-CeEtxDmK.mjs";
|
|
2
|
-
import { t as Construct } from "./Construct-
|
|
2
|
+
import { t as Construct } from "./Construct-pVadmURD.mjs";
|
|
3
3
|
import { Declaration } from "@geekmidas/manifest";
|
|
4
4
|
import { EventPublisher, PublishableMessage } from "@geekmidas/events";
|
|
5
5
|
import { Service } from "@geekmidas/services";
|
|
@@ -86,4 +86,4 @@ declare class Topic<TName extends string = string, TEvents extends TopicEvents =
|
|
|
86
86
|
}
|
|
87
87
|
//#endregion
|
|
88
88
|
export { TopicEvents as n, TopicMessage as r, Topic as t };
|
|
89
|
-
//# sourceMappingURL=Topic-
|
|
89
|
+
//# sourceMappingURL=Topic-DVvheJ_-.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Topic-
|
|
1
|
+
{"version":3,"file":"Topic-DVvheJ_-.d.mts","names":[],"sources":["../src/topic/Topic.ts"],"mappings":";;;;;;;;;KAoBY,cAAc,eAAe;;;;;KAM7B,aAAa,gBAAgB,kBACvC,WAAW,mBAAmB,mBAC9B,GACA,oBAAoB,QAAQ,cAEtB;;;;;;;;;;;cAYK,MACZ,+BACA,gBAAgB,cAAc,qBACrB;WA0BQ,MAAM;;;;;;WAMN,cAAc;EA/B/B;SAEO,QAAQ,eAAe,OAAO,cAAc;;;;;;;WAc1C;;;;;mBAMQ;EAEjB,YACiB,MAAM,OAMN;;;;;;EAAA,cAAc,SAC9B,SAAQ;;;;;;;;EAeT,WAAW;;MAmBP,qBAAqB;;;;;;;;;;;;;;;;;;;;MAuBrB,WAAW,QACd,aAAa,QACb,eAAe,aAAa;MAUzB,aAAa,WACb,kBACH,eAAe,aAAa"}
|
package/dist/adaptors/aws.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("../rolldown-runtime-y5ARvAq5.cjs");
|
|
3
|
-
const require_functions = require("../functions-
|
|
4
|
-
const require_Endpoint = require("../Endpoint-
|
|
3
|
+
const require_functions = require("../functions-VnOTEp74.cjs");
|
|
4
|
+
const require_Endpoint = require("../Endpoint-DDRSyB7y.cjs");
|
|
5
5
|
const require_surfaceEnv = require("../surfaceEnv-CNimK76p.cjs");
|
|
6
6
|
const require_lazyAccessors = require("../lazyAccessors-Dx9NLwJZ.cjs");
|
|
7
7
|
const require_processAudits = require("../processAudits-D_2W5x8k.cjs");
|
package/dist/adaptors/aws.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as StandardSchemaV1 } from "../index-CeEtxDmK.cjs";
|
|
2
|
-
import { a as FunctionHandler, r as Function$1 } from "../index-
|
|
3
|
-
import { t as Cron } from "../Cron-
|
|
2
|
+
import { a as FunctionHandler, r as Function$1 } from "../index-D9gxXK1m.cjs";
|
|
3
|
+
import { t as Cron } from "../Cron-szLBpMSi.cjs";
|
|
4
4
|
import { t as HttpMethod } from "../types-DMuSQeLL.cjs";
|
|
5
5
|
import { t as Telemetry } from "../telemetry-DGcFlVpB.cjs";
|
|
6
|
-
import { n as CookieFn, r as Endpoint, s as EndpointSchemas } from "../Endpoint-
|
|
7
|
-
import { t as Queue } from "../Queue-
|
|
8
|
-
import { t as Subscriber } from "../Subscriber-
|
|
6
|
+
import { n as CookieFn, r as Endpoint, s as EndpointSchemas } from "../Endpoint-DlGPQpsH.cjs";
|
|
7
|
+
import { t as Queue } from "../Queue-Bhzi2WQC.cjs";
|
|
8
|
+
import { t as Subscriber } from "../Subscriber-DQCaiOXF.cjs";
|
|
9
9
|
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
10
10
|
import { EventPublisher } from "@geekmidas/events";
|
|
11
11
|
import { Logger } from "@geekmidas/logger";
|
package/dist/adaptors/aws.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as StandardSchemaV1 } from "../index-CeEtxDmK.mjs";
|
|
2
|
-
import { a as FunctionHandler, r as Function$1 } from "../index-
|
|
3
|
-
import { t as Cron } from "../Cron-
|
|
2
|
+
import { a as FunctionHandler, r as Function$1 } from "../index-Df4DrCZd.mjs";
|
|
3
|
+
import { t as Cron } from "../Cron-DFFsKfMQ.mjs";
|
|
4
4
|
import { t as HttpMethod } from "../types-DMuSQeLL.mjs";
|
|
5
5
|
import { t as Telemetry } from "../telemetry-DGcFlVpB.mjs";
|
|
6
|
-
import { n as CookieFn, r as Endpoint, s as EndpointSchemas } from "../Endpoint-
|
|
7
|
-
import { t as Queue } from "../Queue-
|
|
8
|
-
import { t as Subscriber } from "../Subscriber-
|
|
6
|
+
import { n as CookieFn, r as Endpoint, s as EndpointSchemas } from "../Endpoint-DVBog_2-.mjs";
|
|
7
|
+
import { t as Queue } from "../Queue-BoUA-e83.mjs";
|
|
8
|
+
import { t as Subscriber } from "../Subscriber-CIO3pwji.mjs";
|
|
9
9
|
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
10
10
|
import { EventPublisher } from "@geekmidas/events";
|
|
11
11
|
import { Service, ServiceDiscovery, ServiceRecord } from "@geekmidas/services";
|
package/dist/adaptors/aws.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as __toESM } from "../Construct-
|
|
2
|
-
import { t as FunctionBuilder } from "../functions-
|
|
3
|
-
import { n as ResponseBuilder, r as require_lodash_set, t as Endpoint } from "../Endpoint-
|
|
1
|
+
import { o as __toESM } from "../Construct-Detz65RA.mjs";
|
|
2
|
+
import { t as FunctionBuilder } from "../functions-faoJOUmr.mjs";
|
|
3
|
+
import { n as ResponseBuilder, r as require_lodash_set, t as Endpoint } from "../Endpoint-BIpXUxNf.mjs";
|
|
4
4
|
import { n as envParserFor } from "../surfaceEnv-wMT5QzgZ.mjs";
|
|
5
5
|
import { l as publishConstructEvents, t as createApiGatewayCookies, u as publishEvents } from "../lazyAccessors-BHtcqgz2.mjs";
|
|
6
6
|
import { n as executeWithAuditTransaction, t as createAuditContext } from "../processAudits-BpRlPQMW.mjs";
|
package/dist/adaptors/hono.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_HonoEndpointAdaptor = require("../HonoEndpointAdaptor-
|
|
2
|
+
const require_HonoEndpointAdaptor = require("../HonoEndpointAdaptor-K97N70mh.cjs");
|
|
3
3
|
exports.HonoEndpoint = require_HonoEndpointAdaptor.HonoEndpoint;
|
package/dist/adaptors/hono.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as StandardSchemaV1 } from "../index-CeEtxDmK.cjs";
|
|
2
2
|
import { t as HttpMethod } from "../types-DMuSQeLL.cjs";
|
|
3
|
-
import { r as Endpoint, s as EndpointSchemas } from "../Endpoint-
|
|
3
|
+
import { r as Endpoint, s as EndpointSchemas } from "../Endpoint-DlGPQpsH.cjs";
|
|
4
4
|
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
5
5
|
import { EventPublisher } from "@geekmidas/events";
|
|
6
6
|
import { Logger } from "@geekmidas/logger";
|
package/dist/adaptors/hono.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as StandardSchemaV1 } from "../index-CeEtxDmK.mjs";
|
|
2
2
|
import { t as HttpMethod } from "../types-DMuSQeLL.mjs";
|
|
3
|
-
import { r as Endpoint, s as EndpointSchemas } from "../Endpoint-
|
|
3
|
+
import { r as Endpoint, s as EndpointSchemas } from "../Endpoint-DVBog_2-.mjs";
|
|
4
4
|
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
5
5
|
import { EventPublisher } from "@geekmidas/events";
|
|
6
6
|
import { Service, ServiceDiscovery, ServiceRecord } from "@geekmidas/services";
|
package/dist/adaptors/hono.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as HonoEndpoint } from "../HonoEndpointAdaptor-
|
|
1
|
+
import { t as HonoEndpoint } from "../HonoEndpointAdaptor-Bid8spbq.mjs";
|
|
2
2
|
export { HonoEndpoint };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_functions = require("../functions-
|
|
3
|
-
const require_Endpoint = require("../Endpoint-
|
|
2
|
+
const require_functions = require("../functions-VnOTEp74.cjs");
|
|
3
|
+
const require_Endpoint = require("../Endpoint-DDRSyB7y.cjs");
|
|
4
4
|
const require_lazyAccessors = require("../lazyAccessors-Dx9NLwJZ.cjs");
|
|
5
|
-
const require_HonoEndpointAdaptor = require("../HonoEndpointAdaptor-
|
|
5
|
+
const require_HonoEndpointAdaptor = require("../HonoEndpointAdaptor-K97N70mh.cjs");
|
|
6
6
|
const require_processAudits = require("../processAudits-D_2W5x8k.cjs");
|
|
7
7
|
let _geekmidas_errors = require("@geekmidas/errors");
|
|
8
8
|
let _geekmidas_envkit = require("@geekmidas/envkit");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as StandardSchemaV1 } from "../index-CeEtxDmK.cjs";
|
|
2
|
-
import { r as Function } from "../index-
|
|
2
|
+
import { r as Function } from "../index-D9gxXK1m.cjs";
|
|
3
3
|
import { t as HttpMethod } from "../types-DMuSQeLL.cjs";
|
|
4
|
-
import { r as Endpoint, s as EndpointSchemas } from "../Endpoint-
|
|
5
|
-
import { t as Queue } from "../Queue-
|
|
6
|
-
import { t as Subscriber } from "../Subscriber-
|
|
4
|
+
import { r as Endpoint, s as EndpointSchemas } from "../Endpoint-DlGPQpsH.cjs";
|
|
5
|
+
import { t as Queue } from "../Queue-Bhzi2WQC.cjs";
|
|
6
|
+
import { t as Subscriber } from "../Subscriber-DQCaiOXF.cjs";
|
|
7
7
|
import { EventPublisher, ExtractPublisherMessage } from "@geekmidas/events";
|
|
8
8
|
import { Logger } from "@geekmidas/logger";
|
|
9
9
|
import { ComposableStandardSchema, InferComposableStandardSchema, InferStandardSchema } from "@geekmidas/schema";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as StandardSchemaV1 } from "../index-CeEtxDmK.mjs";
|
|
2
|
-
import { r as Function } from "../index-
|
|
2
|
+
import { r as Function } from "../index-Df4DrCZd.mjs";
|
|
3
3
|
import { t as HttpMethod } from "../types-DMuSQeLL.mjs";
|
|
4
|
-
import { r as Endpoint, s as EndpointSchemas } from "../Endpoint-
|
|
5
|
-
import { t as Queue } from "../Queue-
|
|
6
|
-
import { t as Subscriber } from "../Subscriber-
|
|
4
|
+
import { r as Endpoint, s as EndpointSchemas } from "../Endpoint-DVBog_2-.mjs";
|
|
5
|
+
import { t as Queue } from "../Queue-BoUA-e83.mjs";
|
|
6
|
+
import { t as Subscriber } from "../Subscriber-CIO3pwji.mjs";
|
|
7
7
|
import { EventPublisher, ExtractPublisherMessage } from "@geekmidas/events";
|
|
8
8
|
import { Service, ServiceDiscovery, ServiceRecord } from "@geekmidas/services";
|
|
9
9
|
import { AuditStorage, AuditableAction, Auditor } from "@geekmidas/audit";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as FunctionBuilder } from "../functions-
|
|
2
|
-
import { n as ResponseBuilder, t as Endpoint } from "../Endpoint-
|
|
1
|
+
import { t as FunctionBuilder } from "../functions-faoJOUmr.mjs";
|
|
2
|
+
import { n as ResponseBuilder, t as Endpoint } from "../Endpoint-BIpXUxNf.mjs";
|
|
3
3
|
import { c as createObjectHeaders, l as publishConstructEvents, r as createCookieHeaderAccessor, u as publishEvents } from "../lazyAccessors-BHtcqgz2.mjs";
|
|
4
|
-
import { t as HonoEndpoint } from "../HonoEndpointAdaptor-
|
|
4
|
+
import { t as HonoEndpoint } from "../HonoEndpointAdaptor-Bid8spbq.mjs";
|
|
5
5
|
import { n as executeWithAuditTransaction } from "../processAudits-BpRlPQMW.mjs";
|
|
6
6
|
import { ForbiddenError } from "@geekmidas/errors";
|
|
7
7
|
import { EnvironmentParser } from "@geekmidas/envkit";
|
package/dist/crons/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_CronBuilder = require("../CronBuilder-
|
|
2
|
+
const require_CronBuilder = require("../CronBuilder-zdTdaT-e.cjs");
|
|
3
3
|
//#region src/crons/schedule.ts
|
|
4
4
|
/**
|
|
5
5
|
* A schedule a cron runner can take, as standard five-field cron.
|
package/dist/crons/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as ScheduleExpression, n as CronExpression, r as RateExpression, t as Cron } from "../Cron-
|
|
2
|
-
import { t as CronBuilder } from "../CronBuilder-
|
|
1
|
+
import { i as ScheduleExpression, n as CronExpression, r as RateExpression, t as Cron } from "../Cron-szLBpMSi.cjs";
|
|
2
|
+
import { t as CronBuilder } from "../CronBuilder-kqU9icLS.cjs";
|
|
3
3
|
//#region src/crons/schedule.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* A schedule a cron runner can take, as standard five-field cron.
|
package/dist/crons/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as ScheduleExpression, n as CronExpression, r as RateExpression, t as Cron } from "../Cron-
|
|
2
|
-
import { t as CronBuilder } from "../CronBuilder-
|
|
1
|
+
import { i as ScheduleExpression, n as CronExpression, r as RateExpression, t as Cron } from "../Cron-DFFsKfMQ.mjs";
|
|
2
|
+
import { t as CronBuilder } from "../CronBuilder-Czxh8nnD.mjs";
|
|
3
3
|
//#region src/crons/schedule.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* A schedule a cron runner can take, as standard five-field cron.
|
package/dist/crons/index.mjs
CHANGED
package/dist/endpoints/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_EndpointFactory = require("../EndpointFactory-
|
|
3
|
-
const require_Endpoint = require("../Endpoint-
|
|
2
|
+
const require_EndpointFactory = require("../EndpointFactory-BTj1GjZd.cjs");
|
|
3
|
+
const require_Endpoint = require("../Endpoint-DDRSyB7y.cjs");
|
|
4
4
|
const require_surfaceEnv = require("../surfaceEnv-CNimK76p.cjs");
|
|
5
5
|
const require_lazyAccessors = require("../lazyAccessors-Dx9NLwJZ.cjs");
|
|
6
6
|
exports.BUILT_IN_SECURITY_SCHEMES = require_EndpointFactory.BUILT_IN_SECURITY_SCHEMES;
|
|
@@ -1,3 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { t as StandardSchemaV1 } from "../index-CeEtxDmK.cjs";
|
|
2
|
+
import { t as Construct } from "../Construct-DTqYvkPG.cjs";
|
|
3
|
+
import { C as OAuthFlow, D as getSecurityScheme, E as createAuthorizer, O as isBuiltInSecurityScheme, S as BuiltInSecuritySchemeId, T as SecurityScheme, _ as RlsContextExtractor, a as EndpointHandler, b as Authorizer, c as EndpointSurface, g as RlsContext, h as RlsConfig, i as EndpointContext, l as HeaderFn, m as RlsBypass, n as CookieFn, o as EndpointOutput, p as RLS_BYPASS, r as Endpoint, s as EndpointSchemas, u as ResponseBuilder, v as ActorExtractor, w as OAuthFlows, x as BUILT_IN_SECURITY_SCHEMES, y as MappedAudit } from "../Endpoint-DlGPQpsH.cjs";
|
|
4
|
+
import { n as EndpointBuilder, t as EndpointFactory } from "../EndpointFactory-BG6DLRJH.cjs";
|
|
5
|
+
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
6
|
+
import { EventPublisher, MappedEvent } from "@geekmidas/events";
|
|
7
|
+
import { Logger } from "@geekmidas/logger";
|
|
8
|
+
import { InferStandardSchema } from "@geekmidas/schema";
|
|
9
|
+
import { Service, ServiceDiscovery } from "@geekmidas/services";
|
|
10
|
+
import { AuditStorage } from "@geekmidas/audit";
|
|
11
|
+
import { Context } from "hono";
|
|
12
|
+
//#region src/publisher.d.ts
|
|
13
|
+
export declare function publishConstructEvents<T extends EventPublisher<any> | undefined, OutSchema extends StandardSchemaV1 | undefined = undefined, TServiceName extends string = string, TServices extends Service[] = [], TAuditStorageServiceName extends string = string, TAuditStorage extends AuditStorage | undefined = undefined>(construct: Construct<Logger, TServiceName, T, OutSchema, TServices, TAuditStorageServiceName, TAuditStorage>, response: InferStandardSchema<OutSchema>, serviceDiscovery: ServiceDiscovery<any>, logger?: Logger): Promise<void>;
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/endpoints/lazyAccessors.d.ts
|
|
16
|
+
/**
|
|
17
|
+
* Create a lazy header accessor for Hono.
|
|
18
|
+
* Uses `c.req.header(name)` for single lookups (native, case-insensitive).
|
|
19
|
+
* Only calls `c.req.header()` to get all headers when needed.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createHonoHeaders(c: Context): HeaderFn;
|
|
22
|
+
/**
|
|
23
|
+
* Create a lazy cookie accessor for Hono.
|
|
24
|
+
* Uses `getCookie(c, name)` for single lookups (native).
|
|
25
|
+
* Only parses the cookie header when all cookies are requested.
|
|
26
|
+
*/
|
|
27
|
+
export declare function createHonoCookies(c: Context): CookieFn;
|
|
28
|
+
/**
|
|
29
|
+
* Create a lazy header accessor for API Gateway events.
|
|
30
|
+
* Handles case-insensitive lookups.
|
|
31
|
+
*/
|
|
32
|
+
export declare function createApiGatewayHeaders(headers: Record<string, string | undefined> | null | undefined): HeaderFn;
|
|
33
|
+
/**
|
|
34
|
+
* Create a lazy cookie accessor for API Gateway events.
|
|
35
|
+
* Decodes URL-encoded values to match browser behavior.
|
|
36
|
+
*/
|
|
37
|
+
export declare function createApiGatewayCookies(cookies: string[] | undefined, cookieHeader: string | undefined): CookieFn;
|
|
38
|
+
/**
|
|
39
|
+
* Create a no-op header accessor (for minimal endpoints that don't use headers).
|
|
40
|
+
*/
|
|
41
|
+
export declare function createNoopHeaders(): HeaderFn;
|
|
42
|
+
/**
|
|
43
|
+
* Create a no-op cookie accessor (for minimal endpoints that don't use cookies).
|
|
44
|
+
*/
|
|
45
|
+
export declare function createNoopCookies(): CookieFn;
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/endpoints/surfaceEnv.d.ts
|
|
48
|
+
/**
|
|
49
|
+
* The default parser, built once.
|
|
50
|
+
*
|
|
51
|
+
* Once because `Credentials` resolves through `globalThis` and decryption is
|
|
52
|
+
* not free, and because two parsers over the same environment are two caches of
|
|
53
|
+
* the same answer.
|
|
54
|
+
*/
|
|
55
|
+
export declare function defaultEnvParser(): EnvironmentParser<{}>;
|
|
56
|
+
/** The parser for an endpoint, from its surface or the default. */
|
|
57
|
+
export declare function envParserFor(surface: EndpointSurface | undefined): EnvironmentParser<{}>;
|
|
58
|
+
//#endregion
|
|
59
|
+
export { type ActorExtractor, type Authorizer, BUILT_IN_SECURITY_SCHEMES, type BuiltInSecuritySchemeId, Endpoint, EndpointBuilder, type EndpointContext, EndpointFactory, type EndpointHandler, type EndpointOutput, type EndpointSchemas, type MappedAudit, type OAuthFlow, type OAuthFlows, RLS_BYPASS, ResponseBuilder, type RlsBypass, type RlsConfig, type RlsContext, type RlsContextExtractor, type SecurityScheme, createAuthorizer, getSecurityScheme, isBuiltInSecurityScheme };
|
|
60
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/publisher.ts","../../src/endpoints/lazyAccessors.ts","../../src/endpoints/surfaceEnv.ts"],"mappings":";;;;;;;;;;;;wBAgEsB,uBACrB,UAAU,iCACV,kBAAkB,0CAClB,sCACA,kBAAkB,gBAClB,kDACA,sBAAsB,sCAEtB,WAAW,UACV,QACA,cACA,GACA,WACA,WACA,0BACA,gBAED,UAAU,oBAAoB,YAC9B,kBAAkB,uBAClB,SAAQ,SAAyB;;;;;;;;wBCnElB,kBAAkB,GAAG,UAAU;;;;;;wBAqB/B,kBAAkB,GAAG,UAAU;;;;;wBAgC/B,wBACf,SAAS,wDACP;;;;;wBAoCa,wBACf,+BACA,mCACE;;;;wBAmHa,qBAAqB;;;;wBAUrB,qBAAqB;;;;;;;;;;wBC1MrB,oBAAoB;;wBASpB,aACf,SAAS,8BACP"}
|
|
@@ -1,3 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { t as StandardSchemaV1 } from "../index-CeEtxDmK.mjs";
|
|
2
|
+
import { t as Construct } from "../Construct-pVadmURD.mjs";
|
|
3
|
+
import { C as OAuthFlow, D as getSecurityScheme, E as createAuthorizer, O as isBuiltInSecurityScheme, S as BuiltInSecuritySchemeId, T as SecurityScheme, _ as RlsContextExtractor, a as EndpointHandler, b as Authorizer, c as EndpointSurface, g as RlsContext, h as RlsConfig, i as EndpointContext, l as HeaderFn, m as RlsBypass, n as CookieFn, o as EndpointOutput, p as RLS_BYPASS, r as Endpoint, s as EndpointSchemas, u as ResponseBuilder, v as ActorExtractor, w as OAuthFlows, x as BUILT_IN_SECURITY_SCHEMES, y as MappedAudit } from "../Endpoint-DVBog_2-.mjs";
|
|
4
|
+
import { n as EndpointBuilder, t as EndpointFactory } from "../EndpointFactory-CrZXVjna.mjs";
|
|
5
|
+
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
6
|
+
import { EventPublisher, MappedEvent } from "@geekmidas/events";
|
|
7
|
+
import { Service, ServiceDiscovery } from "@geekmidas/services";
|
|
8
|
+
import { Context } from "hono";
|
|
9
|
+
import { AuditStorage } from "@geekmidas/audit";
|
|
10
|
+
import { Logger } from "@geekmidas/logger";
|
|
11
|
+
import { InferStandardSchema } from "@geekmidas/schema";
|
|
12
|
+
//#region src/publisher.d.ts
|
|
13
|
+
export declare function publishConstructEvents<T extends EventPublisher<any> | undefined, OutSchema extends StandardSchemaV1 | undefined = undefined, TServiceName extends string = string, TServices extends Service[] = [], TAuditStorageServiceName extends string = string, TAuditStorage extends AuditStorage | undefined = undefined>(construct: Construct<Logger, TServiceName, T, OutSchema, TServices, TAuditStorageServiceName, TAuditStorage>, response: InferStandardSchema<OutSchema>, serviceDiscovery: ServiceDiscovery<any>, logger?: Logger): Promise<void>;
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/endpoints/lazyAccessors.d.ts
|
|
16
|
+
/**
|
|
17
|
+
* Create a lazy header accessor for Hono.
|
|
18
|
+
* Uses `c.req.header(name)` for single lookups (native, case-insensitive).
|
|
19
|
+
* Only calls `c.req.header()` to get all headers when needed.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createHonoHeaders(c: Context): HeaderFn;
|
|
22
|
+
/**
|
|
23
|
+
* Create a lazy cookie accessor for Hono.
|
|
24
|
+
* Uses `getCookie(c, name)` for single lookups (native).
|
|
25
|
+
* Only parses the cookie header when all cookies are requested.
|
|
26
|
+
*/
|
|
27
|
+
export declare function createHonoCookies(c: Context): CookieFn;
|
|
28
|
+
/**
|
|
29
|
+
* Create a lazy header accessor for API Gateway events.
|
|
30
|
+
* Handles case-insensitive lookups.
|
|
31
|
+
*/
|
|
32
|
+
export declare function createApiGatewayHeaders(headers: Record<string, string | undefined> | null | undefined): HeaderFn;
|
|
33
|
+
/**
|
|
34
|
+
* Create a lazy cookie accessor for API Gateway events.
|
|
35
|
+
* Decodes URL-encoded values to match browser behavior.
|
|
36
|
+
*/
|
|
37
|
+
export declare function createApiGatewayCookies(cookies: string[] | undefined, cookieHeader: string | undefined): CookieFn;
|
|
38
|
+
/**
|
|
39
|
+
* Create a no-op header accessor (for minimal endpoints that don't use headers).
|
|
40
|
+
*/
|
|
41
|
+
export declare function createNoopHeaders(): HeaderFn;
|
|
42
|
+
/**
|
|
43
|
+
* Create a no-op cookie accessor (for minimal endpoints that don't use cookies).
|
|
44
|
+
*/
|
|
45
|
+
export declare function createNoopCookies(): CookieFn;
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/endpoints/surfaceEnv.d.ts
|
|
48
|
+
/**
|
|
49
|
+
* The default parser, built once.
|
|
50
|
+
*
|
|
51
|
+
* Once because `Credentials` resolves through `globalThis` and decryption is
|
|
52
|
+
* not free, and because two parsers over the same environment are two caches of
|
|
53
|
+
* the same answer.
|
|
54
|
+
*/
|
|
55
|
+
export declare function defaultEnvParser(): EnvironmentParser<{}>;
|
|
56
|
+
/** The parser for an endpoint, from its surface or the default. */
|
|
57
|
+
export declare function envParserFor(surface: EndpointSurface | undefined): EnvironmentParser<{}>;
|
|
58
|
+
//#endregion
|
|
59
|
+
export { type ActorExtractor, type Authorizer, BUILT_IN_SECURITY_SCHEMES, type BuiltInSecuritySchemeId, Endpoint, EndpointBuilder, type EndpointContext, EndpointFactory, type EndpointHandler, type EndpointOutput, type EndpointSchemas, type MappedAudit, type OAuthFlow, type OAuthFlows, RLS_BYPASS, ResponseBuilder, type RlsBypass, type RlsConfig, type RlsContext, type RlsContextExtractor, type SecurityScheme, createAuthorizer, getSecurityScheme, isBuiltInSecurityScheme };
|
|
60
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/publisher.ts","../../src/endpoints/lazyAccessors.ts","../../src/endpoints/surfaceEnv.ts"],"mappings":";;;;;;;;;;;;wBAgEsB,uBACrB,UAAU,iCACV,kBAAkB,0CAClB,sCACA,kBAAkB,gBAClB,kDACA,sBAAsB,sCAEtB,WAAW,UACV,QACA,cACA,GACA,WACA,WACA,0BACA,gBAED,UAAU,oBAAoB,YAC9B,kBAAkB,uBAClB,SAAQ,SAAyB;;;;;;;;wBCnElB,kBAAkB,GAAG,UAAU;;;;;;wBAqB/B,kBAAkB,GAAG,UAAU;;;;;wBAgC/B,wBACf,SAAS,wDACP;;;;;wBAoCa,wBACf,+BACA,mCACE;;;;wBAmHa,qBAAqB;;;;wBAUrB,qBAAqB;;;;;;;;;;wBC1MrB,oBAAoB;;wBASpB,aACf,SAAS,8BACP"}
|
package/dist/endpoints/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as createAuthorizer, i as BUILT_IN_SECURITY_SCHEMES, n as EndpointBuilder, o as getSecurityScheme, r as RLS_BYPASS, s as isBuiltInSecurityScheme, t as EndpointFactory } from "../EndpointFactory-
|
|
2
|
-
import { n as ResponseBuilder, t as Endpoint } from "../Endpoint-
|
|
1
|
+
import { a as createAuthorizer, i as BUILT_IN_SECURITY_SCHEMES, n as EndpointBuilder, o as getSecurityScheme, r as RLS_BYPASS, s as isBuiltInSecurityScheme, t as EndpointFactory } from "../EndpointFactory-o_15B_ka.mjs";
|
|
2
|
+
import { n as ResponseBuilder, t as Endpoint } from "../Endpoint-BIpXUxNf.mjs";
|
|
3
3
|
import { n as envParserFor, t as defaultEnvParser } from "../surfaceEnv-wMT5QzgZ.mjs";
|
|
4
4
|
import { a as createHonoHeaders, i as createHonoCookies, l as publishConstructEvents, n as createApiGatewayHeaders, o as createNoopCookies, s as createNoopHeaders, t as createApiGatewayCookies } from "../lazyAccessors-BHtcqgz2.mjs";
|
|
5
5
|
export { BUILT_IN_SECURITY_SCHEMES, Endpoint, EndpointBuilder, EndpointFactory, RLS_BYPASS, ResponseBuilder, createApiGatewayCookies, createApiGatewayHeaders, createAuthorizer, createHonoCookies, createHonoHeaders, createNoopCookies, createNoopHeaders, defaultEnvParser, envParserFor, getSecurityScheme, isBuiltInSecurityScheme, publishConstructEvents };
|
package/dist/functions/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_functions = require("../functions-
|
|
2
|
+
const require_functions = require("../functions-VnOTEp74.cjs");
|
|
3
3
|
exports.BaseFunctionBuilder = require_functions.BaseFunctionBuilder;
|
|
4
4
|
exports.Function = require_functions.Function;
|
|
5
5
|
exports.FunctionBuilder = require_functions.FunctionBuilder;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as FunctionHandler, i as FunctionContext, n as BaseFunctionBuilder, r as Function, t as FunctionBuilder } from "../index-
|
|
1
|
+
import { a as FunctionHandler, i as FunctionContext, n as BaseFunctionBuilder, r as Function, t as FunctionBuilder } from "../index-D9gxXK1m.cjs";
|
|
2
2
|
export { BaseFunctionBuilder, Function, FunctionBuilder, type FunctionContext, type FunctionHandler };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as FunctionHandler, i as FunctionContext, n as BaseFunctionBuilder, r as Function, t as FunctionBuilder } from "../index-
|
|
1
|
+
import { a as FunctionHandler, i as FunctionContext, n as BaseFunctionBuilder, r as Function, t as FunctionBuilder } from "../index-Df4DrCZd.mjs";
|
|
2
2
|
export { BaseFunctionBuilder, Function, FunctionBuilder, type FunctionContext, type FunctionHandler };
|
package/dist/functions/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Function, r as BaseFunctionBuilder, t as FunctionBuilder } from "../functions-
|
|
1
|
+
import { n as Function, r as BaseFunctionBuilder, t as FunctionBuilder } from "../functions-faoJOUmr.mjs";
|
|
2
2
|
export { BaseFunctionBuilder, Function, FunctionBuilder };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-y5ARvAq5.cjs");
|
|
2
|
-
const require_Construct = require("./Construct-
|
|
2
|
+
const require_Construct = require("./Construct-yG9Sw-5p.cjs");
|
|
3
3
|
const require_construct_interface = require("./construct-interface.cjs");
|
|
4
4
|
const require_clone = require("./clone-UGJpvQnL.cjs");
|
|
5
5
|
let _geekmidas_schema_parser = require("@geekmidas/schema/parser");
|
|
@@ -2948,4 +2948,4 @@ Object.defineProperty(exports, "require_lodash_uniqby", {
|
|
|
2948
2948
|
}
|
|
2949
2949
|
});
|
|
2950
2950
|
|
|
2951
|
-
//# sourceMappingURL=functions-
|
|
2951
|
+
//# sourceMappingURL=functions-VnOTEp74.cjs.map
|