@classytic/arc 2.43.0 → 2.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{EventTransport-tzA7CAB4.mjs → EventTransport-DZWDsaPa.mjs} +2 -2
- package/dist/{HookSystem-B6UaKRbF.mjs → HookSystem-yjEgn7Cm.mjs} +2 -2
- package/dist/{ResourceRegistry-CuCARu2B.mjs → ResourceRegistry-DJxHUpE4.mjs} +2 -2
- package/dist/acquire-BozJ-9yt.mjs +35 -0
- package/dist/{actionPermissions-BotX1YOa.mjs → actionPermissions-5N04zBL4.mjs} +13 -17
- package/dist/audit/index.d.mts +6 -6
- package/dist/audit/index.mjs +4 -4
- package/dist/auth/audit.d.mts +8 -8
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.d.mts +5 -5
- package/dist/auth/index.mjs +11 -8
- package/dist/auth/redis-session.d.mts +4 -5
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-DQYrkl5f.mjs → authorizationDecision-wX3SA9w_.mjs} +4 -4
- package/dist/{boundedMap-BULzfXYU.mjs → boundedMap-DWiKW7lP.mjs} +1 -1
- package/dist/{buildHandler-CRQ8EcX5.mjs → buildHandler-Bswu_vNb.mjs} +4 -4
- package/dist/cache/index.d.mts +9 -9
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-Cc2M1DwO.mjs → caching-Drp68DIS.mjs} +2 -2
- package/dist/{claimed-B10RTfkM.mjs → claimed-DYvQoZLv.mjs} +1 -1
- package/dist/cleanup/index.d.mts +14 -14
- package/dist/cleanup/index.mjs +4 -4
- package/dist/cli/commands/describe.d.mts +5 -5
- package/dist/cli/commands/describe.mjs +3 -3
- package/dist/cli/commands/docs.d.mts +2 -3
- package/dist/cli/commands/docs.mjs +3 -3
- package/dist/cli/commands/doctor.d.mts +2 -3
- package/dist/cli/commands/doctor.mjs +1 -1
- package/dist/cli/commands/generate.mjs +2 -3
- package/dist/cli/commands/init.mjs +2 -3
- package/dist/cli/commands/introspect.d.mts +2 -3
- package/dist/cli/commands/introspect.mjs +2 -2
- package/dist/cli/index.mjs +3 -3
- package/dist/{constants-Cu7Mx7_U.mjs → constants-B2QHb6u6.mjs} +1 -1
- package/dist/context/index.d.mts +9 -9
- package/dist/context/index.mjs +5 -5
- package/dist/core/index.d.mts +3 -3
- package/dist/core/index.mjs +8 -8
- package/dist/{core-Cb0LjccA.mjs → core-COcqo0Cp.mjs} +13 -4
- package/dist/{createActionRouter-xjqonMRO.mjs → createActionRouter-zG13rpPJ.mjs} +18 -8
- package/dist/{createAggregationRouter-zRYWw_5D.mjs → createAggregationRouter-CWRz96Vr.mjs} +7 -7
- package/dist/{createApp-D-953ZAq.mjs → createApp-BGLYtErt.mjs} +34 -32
- package/dist/{createMcpServer-C9cxS8zt.d.mts → createMcpServer-DSztofa9.d.mts} +1 -1
- package/dist/{defineAggregation-Bm8RjMbq.mjs → defineAggregation--3xguLkk.mjs} +1 -1
- package/dist/{defineResource-DIC7JZGU.mjs → defineResource-gUp9ug66.mjs} +7 -7
- package/dist/discovery/index.d.mts +6 -7
- package/dist/discovery/index.mjs +1 -1
- package/dist/docs/index.d.mts +3 -3
- package/dist/docs/index.mjs +3 -3
- package/dist/{elevation-DG8SrLN-.mjs → elevation-BG4gnMsJ.mjs} +5 -5
- package/dist/encryption/index.d.mts +5 -5
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-BnfDviL1.mjs → errorHandler-COHw3N1b.mjs} +3 -3
- package/dist/{errors-CtrywMHP.mjs → errors-CW4anJBy.mjs} +1 -1
- package/dist/{eventPlugin-Q6BhzHzs.mjs → eventPlugin-BweHAVws.mjs} +8 -8
- package/dist/{eventTypes-Cdhm6ZlV.mjs → eventTypes-N4-omQFR.mjs} +2 -2
- package/dist/events/index.d.mts +14 -14
- package/dist/events/index.mjs +7 -7
- package/dist/events/transports/redis-stream-entry.mjs +4 -4
- package/dist/events/transports/redis.d.mts +4 -5
- package/dist/events/transports/redis.mjs +2 -2
- package/dist/factory/index.d.mts +16 -16
- package/dist/factory/index.mjs +6 -6
- package/dist/{fastify-augmentation-DhUJ-mvo.d.mts → fastify-augmentation-DRlCIWE9.d.mts} +2 -2
- package/dist/{fields-ToPYpMqS.mjs → fields-A5crhsJb.mjs} +1 -1
- package/dist/{filter-merge-IpGywvym.mjs → filter-merge-DGM-GQ1J.mjs} +1 -1
- package/dist/{generate-DRTkLlIl.mjs → generate-BXKo2Gc8.mjs} +2 -2
- package/dist/{headers-BbkIF6vA.mjs → headers-DKZQKL-Z.mjs} +2 -2
- package/dist/{health-D-Ft6JM6.mjs → health-BYAwA6YS.mjs} +1 -1
- package/dist/{health-DqbsG-_w.mjs → health-CrqUp3sz.mjs} +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -3
- package/dist/idempotency/index.d.mts +8 -6
- package/dist/idempotency/index.mjs +108 -46
- package/dist/idempotency/redis.d.mts +1 -1
- package/dist/idempotency/redis.mjs +30 -2
- package/dist/{index-CRoPtISf.d.mts → index-Beg3aNnK.d.mts} +3 -31
- package/dist/{index-C8zVGYsk.d.mts → index-BkV55WlV.d.mts} +3 -3
- package/dist/{index-JdbZAIsm.d.mts → index-CUJvoyw3.d.mts} +1 -1
- package/dist/{index-mqaqZNpe.d.mts → index-WH7xgvxS.d.mts} +52 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +11 -11
- package/dist/{init-B_oUYDXI.mjs → init-BPzK5Lnr.mjs} +1 -1
- package/dist/integrations/event-gateway.d.mts +3 -4
- package/dist/integrations/event-gateway.mjs +2 -2
- package/dist/integrations/index.d.mts +1 -1
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.mjs +3 -3
- package/dist/integrations/mcp/index.d.mts +36 -36
- package/dist/integrations/mcp/index.mjs +2 -2
- package/dist/integrations/mcp/testing.d.mts +8 -9
- package/dist/integrations/mcp/testing.mjs +2 -2
- package/dist/integrations/streamline.d.mts +12 -13
- package/dist/integrations/streamline.mjs +18 -4
- package/dist/integrations/webhooks.d.mts +23 -23
- package/dist/integrations/webhooks.mjs +3 -3
- package/dist/integrations/websocket-pushref-redis.d.mts +4 -5
- package/dist/integrations/websocket-pushref-redis.mjs +1 -1
- package/dist/integrations/websocket-redis.d.mts +4 -5
- package/dist/integrations/websocket-redis.mjs +1 -1
- package/dist/integrations/websocket.mjs +2 -2
- package/dist/{interface-C0395yUN.d.mts → interface-JJzwH4Ro.d.mts} +22 -2
- package/dist/{jsonBody-B4YVGcql.mjs → jsonBody-YIq-vGLv.mjs} +2 -2
- package/dist/{keys-B2KtgMLJ.mjs → keys-CpoiZ8hU.mjs} +1 -1
- package/dist/{loadResources-Dn4lalw2.mjs → loadResources-6jO52-RR.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-3sLYbuse.mjs → loadResourcesFromEntry-MP8xEppu.mjs} +2 -2
- package/dist/logger/index.d.mts +9 -10
- package/dist/logger/index.mjs +2 -3
- package/dist/{logger-DXjfIqjV.mjs → logger-D4V1zGLI.mjs} +1 -1
- package/dist/{mcpPlugin-C08HalN5.mjs → mcpPlugin-srPc7ItN.mjs} +42 -29
- package/dist/{memory-9Cp7611C.mjs → memory-CTa5pOCW.mjs} +3 -3
- package/dist/{metrics-CWI11eRu.mjs → metrics-DsZrvnpB.mjs} +3 -3
- package/dist/middleware/index.d.mts +5 -5
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.d.mts +13 -13
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module-BSvOQC7E.mjs → module--L0iBIZz.mjs} +1 -1
- package/dist/mongodb-memory-server-CHhYSq5y.mjs +35539 -0
- package/dist/mongoose-CYJCLyi-.mjs +67451 -0
- package/dist/{multiTenant-cY0FkDiA.d.mts → multiTenant-CAtYlW6H.d.mts} +1 -1
- package/dist/{multipartBody-CXM2a-Dy.mjs → multipartBody-Cc7eZ9cq.mjs} +1 -1
- package/dist/node-D8UZv_8c.mjs +41236 -0
- package/dist/{openapi-DT_G4VhY.mjs → openapi-CMegfsm8.mjs} +6 -6
- package/dist/outbox-admin/index.d.mts +2 -2
- package/dist/outbox-admin/index.mjs +5 -5
- package/dist/{outbox-module-Bjgzl6tg.mjs → outbox-module-Ryk270jd.mjs} +9 -9
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-Cm0uYHvd.mjs → permissions-C5ijIz5Q.mjs} +9 -9
- package/dist/{pipe-BqeGT6UO.mjs → pipe-D81zMtWs.mjs} +2 -2
- package/dist/pipeline/index.d.mts +7 -7
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-FVR6LP59.mjs → plan-CJGMKoui.mjs} +1 -1
- package/dist/{plugin-BccET1tL.mjs → plugin-DALd9dcF.mjs} +39 -27
- package/dist/plugins/index.d.mts +7 -7
- package/dist/plugins/index.mjs +17 -17
- package/dist/plugins/response-cache.d.mts +5 -6
- package/dist/plugins/response-cache.mjs +4 -4
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-CVIOcgMF.mjs → pluralize-COUNYo3d.mjs} +1 -1
- package/dist/presets/filesUpload.d.mts +7 -7
- package/dist/presets/filesUpload.mjs +5 -5
- package/dist/presets/index.d.mts +14 -14
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.d.mts +1 -1
- package/dist/presets/multiTenant.mjs +5 -5
- package/dist/presets/search.d.mts +8 -9
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-Cpvj6fGO.mjs → presets-CONf2Qem.mjs} +4 -4
- package/dist/{projection-Ce4aQhQk.mjs → projection-wFoLqdss.mjs} +2 -2
- package/dist/{queryCachePlugin-CFWNH8aT.mjs → queryCachePlugin-BATECpyh.mjs} +6 -6
- package/dist/{rateLimitKey-C4O-kPm0.mjs → rateLimitKey-DVEZ_UpV.mjs} +1 -1
- package/dist/{realtime-DmPE9S54.mjs → realtime-xyubMKSB.mjs} +11 -11
- package/dist/{redis-vLvtcGy_.d.mts → redis-BDgv9Glw.d.mts} +5 -1
- package/dist/registry/index.d.mts +9 -9
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-Bcz9G1bh.mjs → registry-Bdzg-hdm.mjs} +5 -4
- package/dist/{renewingLease-qODa7KJQ.mjs → renewingLease-BFJxGPuh.mjs} +1 -1
- package/dist/{replyHelpers-CG_VtVgS.mjs → replyHelpers-Bnc6lJyy.mjs} +2 -2
- package/dist/{requestContext-Dsu9P1bV.mjs → requestContext-C10UeFe5.mjs} +1 -1
- package/dist/{requirement-KDdoRcOP.mjs → requirement-Bu50QALH.mjs} +1 -1
- package/dist/{resourceRateLimit-dSjVr1pk.mjs → resourceRateLimit-urWPJxrt.mjs} +2 -2
- package/dist/rolldown-runtime-MYrLNGnq.mjs +45 -0
- package/dist/{routeValidator-D36SW8qt.mjs → routeValidator-DHtpzrzk.mjs} +1 -1
- package/dist/{runtimeCapabilities-0tccjRlj.mjs → runtimeCapabilities-DIMKMV2G.mjs} +1 -1
- package/dist/{schedules-C-OpmHBq.mjs → schedules-CKTs5ys8.mjs} +5 -5
- package/dist/{schemaConverter-BORek3O-.mjs → schemaConverter-BVjkQ5DD.mjs} +2 -2
- package/dist/{schemaIR-C7Vbp71I.mjs → schemaIR-BA0Hb21Y.mjs} +2 -2
- package/dist/schemas/index.d.mts +10 -10
- package/dist/schemas/index.mjs +1 -1
- package/dist/scim/index.d.mts +13 -13
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.d.mts +3 -3
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-DQthe88b.mjs → scope-DINaj7Ax.mjs} +4 -4
- package/dist/{shutdown-MqA81z_P.mjs → shutdown-LpLMH8T1.mjs} +1 -1
- package/dist/{simpleEqualityMatcher-auW8QjXN.mjs → simpleEqualityMatcher-DbwIM1f1.mjs} +1 -1
- package/dist/{sse-CYzQBVFe.mjs → sse-BzJFPX_1.mjs} +7 -7
- package/dist/{sseStream-B5_Afiqn.mjs → sseStream-DQChzGTs.mjs} +2 -2
- package/dist/{store-helpers-BOzk-CuX.mjs → store-helpers-Coj9RhOZ.mjs} +1 -1
- package/dist/{streaming-DjTQhZrN.mjs → streaming-JzB5CAga.mjs} +1 -1
- package/dist/{subscriberIdentity-CW39uA8G.mjs → subscriberIdentity-DeyppIif.mjs} +1 -1
- package/dist/{tenancy--ed9eH_z.mjs → tenancy-DxV8OuX2.mjs} +2 -2
- package/dist/{tenantPreparation-BKon6Yox.mjs → tenantPreparation-CBvvAcAj.mjs} +4 -4
- package/dist/testing/cleanupStoreContract.d.mts +4 -5
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +35 -35
- package/dist/testing/index.mjs +16 -15
- package/dist/testing/outboxStoreContract.d.mts +4 -5
- package/dist/testing/outboxStoreContract.mjs +2 -2
- package/dist/testing/requiredPorts.d.mts +4 -5
- package/dist/testing/requiredPorts.mjs +2 -2
- package/dist/testing/storageContract.d.mts +4 -5
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{timing-qczZ0YC-.mjs → timing-CntavTlR.mjs} +1 -1
- package/dist/{transactionContext-DjFkrNG6.mjs → transactionContext-orvnGu4F.mjs} +1 -1
- package/dist/{typeGuards-CySF12G-.mjs → typeGuards-kEaP_WmO.mjs} +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-B4Aq4Sdj.d.mts → types-D3Ixsh00.d.mts} +1 -1
- package/dist/{types-Bk9NOgOC.mjs → types-fvO6Ovzx.mjs} +4 -4
- package/dist/usage/index.d.mts +4 -4
- package/dist/usage/index.mjs +4 -4
- package/dist/{userHelpers-aklawRaK.mjs → userHelpers-C76zD5pa.mjs} +1 -1
- package/dist/utils/index.d.mts +47 -47
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-ec1oTo1n.mjs → utils-BpkVZ8rB.mjs} +4 -4
- package/dist/{validate-9yzHC1e2.mjs → validate-CWp-lsrm.mjs} +3 -3
- package/dist/{versioning-fhhWHV74.mjs → versioning-CHhL9P3o.mjs} +3 -3
- package/dist/{workScope-zpPyge4t.mjs → workScope-n9a7d_lZ.mjs} +2 -2
- package/package.json +45 -51
- package/dist/rolldown-runtime-D1w9Y1VJ.mjs +0 -15
|
@@ -24,7 +24,7 @@ declare const _default: FastifyPluginAsync<EncryptionOptions>;
|
|
|
24
24
|
* instead.
|
|
25
25
|
*/
|
|
26
26
|
/** Encrypt a UTF-8 string into the `arc.v1` field envelope. */
|
|
27
|
-
declare function encryptField(plaintext: string, kid: string, key: unknown): string;
|
|
27
|
+
export declare function encryptField(plaintext: string, kid: string, key: unknown): string;
|
|
28
28
|
/** Parsed envelope header — exposes `kid` for key resolution before decrypt. */
|
|
29
29
|
interface ParsedFieldEnvelope {
|
|
30
30
|
readonly kid: string;
|
|
@@ -33,9 +33,9 @@ interface ParsedFieldEnvelope {
|
|
|
33
33
|
readonly tag: Buffer;
|
|
34
34
|
}
|
|
35
35
|
/** Returns the parsed envelope, or `null` when the token isn't `arc.v1`. */
|
|
36
|
-
declare function parseFieldEnvelope(token: string): ParsedFieldEnvelope | null;
|
|
36
|
+
export declare function parseFieldEnvelope(token: string): ParsedFieldEnvelope | null;
|
|
37
37
|
/** Decrypt a parsed `arc.v1` envelope with the resolved key. Throws on tamper. */
|
|
38
|
-
declare function decryptField(envelope: ParsedFieldEnvelope, key: unknown): string;
|
|
38
|
+
export declare function decryptField(envelope: ParsedFieldEnvelope, key: unknown): string;
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/encryption/keyProvider.d.ts
|
|
41
41
|
interface StaticKeyProviderOptions {
|
|
@@ -76,6 +76,6 @@ interface StaticKeyProviderOptions {
|
|
|
76
76
|
* });
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
|
-
declare function createStaticKeyProvider(options: StaticKeyProviderOptions): KeyProvider;
|
|
79
|
+
export declare function createStaticKeyProvider(options: StaticKeyProviderOptions): KeyProvider;
|
|
80
80
|
//#endregion
|
|
81
|
-
export { type ActiveKey, type EncryptionDirective, type EncryptionMode, type EncryptionOptions, type JweAlg, type JweEnc, type KeyContext, type KeyMaterial, type KeyProvider, type ParsedFieldEnvelope, type StaticKeyProviderOptions,
|
|
81
|
+
export { type ActiveKey, type EncryptionDirective, type EncryptionMode, type EncryptionOptions, type JweAlg, type JweEnc, type KeyContext, type KeyMaterial, type KeyProvider, type ParsedFieldEnvelope, type StaticKeyProviderOptions, _default as default, encryptionPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ArcError } from "../errors-
|
|
3
|
-
import { t as parseJsonBody } from "../jsonBody-
|
|
1
|
+
/*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ArcError } from "../errors-CW4anJBy.mjs";
|
|
3
|
+
import { t as parseJsonBody } from "../jsonBody-YIq-vGLv.mjs";
|
|
4
4
|
import { createCipheriv, createDecipheriv, randomBytes } from "node:crypto";
|
|
5
5
|
import fp from "fastify-plugin";
|
|
6
6
|
//#region src/encryption/fieldCipher.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import { m as statusToArcCode, p as isArcError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as __exportAll } from "./rolldown-runtime-MYrLNGnq.mjs";
|
|
3
|
+
import { m as statusToArcCode, p as isArcError } from "./errors-CW4anJBy.mjs";
|
|
4
4
|
import { isHttpError, toErrorContract } from "@classytic/repo-core/errors";
|
|
5
5
|
import { isProductionEnv } from "@classytic/primitives/environment";
|
|
6
6
|
import fp from "fastify-plugin";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import { t as arcLog } from "./logger-
|
|
4
|
-
import { d as createDomainError } from "./errors-
|
|
5
|
-
import { n as requestContext } from "./requestContext-
|
|
6
|
-
import { i as runAdmittedWork, n as isAdmittedWork, r as registerShutdownParticipant } from "./shutdown-
|
|
7
|
-
import { n as MemoryEventTransport, r as createEvent, t as ARC_EVENT_TRANSPORT } from "./EventTransport-
|
|
8
|
-
import { n as preserveSubscriberIdentity } from "./subscriberIdentity-
|
|
1
|
+
/*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as __exportAll } from "./rolldown-runtime-MYrLNGnq.mjs";
|
|
3
|
+
import { t as arcLog } from "./logger-D4V1zGLI.mjs";
|
|
4
|
+
import { d as createDomainError } from "./errors-CW4anJBy.mjs";
|
|
5
|
+
import { n as requestContext } from "./requestContext-C10UeFe5.mjs";
|
|
6
|
+
import { i as runAdmittedWork, n as isAdmittedWork, r as registerShutdownParticipant } from "./shutdown-LpLMH8T1.mjs";
|
|
7
|
+
import { n as MemoryEventTransport, r as createEvent, t as ARC_EVENT_TRANSPORT } from "./EventTransport-DZWDsaPa.mjs";
|
|
8
|
+
import { n as preserveSubscriberIdentity } from "./subscriberIdentity-DeyppIif.mjs";
|
|
9
9
|
import { isProductionEnv } from "@classytic/primitives/environment";
|
|
10
10
|
import fp from "fastify-plugin";
|
|
11
11
|
import { NonDurablePublishError } from "@classytic/primitives/durable-events";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as createEvent } from "./EventTransport-
|
|
1
|
+
/*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as createEvent } from "./EventTransport-DZWDsaPa.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { durableEventMeta } from "@classytic/primitives/durable-events";
|
|
5
5
|
//#region src/events/defineEvent.ts
|
package/dist/events/index.d.mts
CHANGED
|
@@ -26,7 +26,7 @@ import { RepositoryLike } from "@classytic/repo-core/adapter";
|
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
28
|
/** Suffixes for auto-emitted CRUD events */
|
|
29
|
-
declare const CRUD_EVENT_SUFFIXES: readonly ["created", "updated", "deleted"];
|
|
29
|
+
export declare const CRUD_EVENT_SUFFIXES: readonly ["created", "updated", "deleted"];
|
|
30
30
|
/** Type for CRUD event suffixes */
|
|
31
31
|
type CrudEventSuffix = (typeof CRUD_EVENT_SUFFIXES)[number];
|
|
32
32
|
/**
|
|
@@ -38,9 +38,9 @@ type CrudEventSuffix = (typeof CRUD_EVENT_SUFFIXES)[number];
|
|
|
38
38
|
* crudEventType('order', 'deleted') // 'order.deleted'
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
|
-
declare function crudEventType(resource: string, suffix: CrudEventSuffix): string;
|
|
41
|
+
export declare function crudEventType(resource: string, suffix: CrudEventSuffix): string;
|
|
42
42
|
/** Arc framework lifecycle events — emitted automatically by the framework */
|
|
43
|
-
declare const ARC_LIFECYCLE_EVENTS: Readonly<{
|
|
43
|
+
export declare const ARC_LIFECYCLE_EVENTS: Readonly<{
|
|
44
44
|
/** Emitted when a resource plugin is registered */
|
|
45
45
|
readonly RESOURCE_REGISTERED: "arc.resource.registered";
|
|
46
46
|
/** Emitted when Arc is fully ready (all resources registered, onReady fired) */
|
|
@@ -49,7 +49,7 @@ declare const ARC_LIFECYCLE_EVENTS: Readonly<{
|
|
|
49
49
|
/** Type for Arc lifecycle event names */
|
|
50
50
|
type ArcLifecycleEvent = (typeof ARC_LIFECYCLE_EVENTS)[keyof typeof ARC_LIFECYCLE_EVENTS];
|
|
51
51
|
/** Cache-specific event types for observability and external triggers */
|
|
52
|
-
declare const CACHE_EVENTS: Readonly<{
|
|
52
|
+
export declare const CACHE_EVENTS: Readonly<{
|
|
53
53
|
/** Emitted when a resource's cache version is bumped */
|
|
54
54
|
readonly VERSION_BUMPED: "arc.cache.version.bumped";
|
|
55
55
|
/** Emitted when a tag version is bumped */
|
|
@@ -75,8 +75,8 @@ interface InboxHandlerContext {
|
|
|
75
75
|
}
|
|
76
76
|
type InboxHandler<T> = (event: DomainEvent<T>, context: InboxHandlerContext) => Promise<void>;
|
|
77
77
|
/** The claim operation every inbox row is filed under. */
|
|
78
|
-
declare const EVENT_INBOX_OPERATION = "event-inbox";
|
|
79
|
-
declare function withInbox<T = unknown>(name: string, handler: InboxHandler<T>, options: InboxOptions): EventHandler<T>;
|
|
78
|
+
export declare const EVENT_INBOX_OPERATION = "event-inbox";
|
|
79
|
+
export declare function withInbox<T = unknown>(name: string, handler: InboxHandler<T>, options: InboxOptions): EventHandler<T>;
|
|
80
80
|
//#endregion
|
|
81
81
|
//#region src/events/outbox/backoff.d.ts
|
|
82
82
|
/**
|
|
@@ -134,7 +134,7 @@ interface ExponentialBackoffOptions {
|
|
|
134
134
|
* // attempt=10 → capped at 10_000ms
|
|
135
135
|
* ```
|
|
136
136
|
*/
|
|
137
|
-
declare function exponentialBackoff(options: ExponentialBackoffOptions): Date;
|
|
137
|
+
export declare function exponentialBackoff(options: ExponentialBackoffOptions): Date;
|
|
138
138
|
//#endregion
|
|
139
139
|
//#region src/events/repository-outbox-adapter.d.ts
|
|
140
140
|
interface RepositoryOutboxStoreOptions {
|
|
@@ -164,7 +164,7 @@ interface RepositoryOutboxStoreOptions {
|
|
|
164
164
|
* quietly does nothing and reports success.
|
|
165
165
|
*/
|
|
166
166
|
type RepositoryOutboxStore = OutboxStore & Required<Pick<OutboxStore, "fail" | "getDeadLettered" | "purge" | "requeue" | "countByStatus" | "oldestPendingAgeMs">>;
|
|
167
|
-
declare function repositoryAsOutboxStore(repository: RepositoryLike, options?: RepositoryOutboxStoreOptions): RepositoryOutboxStore;
|
|
167
|
+
export declare function repositoryAsOutboxStore(repository: RepositoryLike, options?: RepositoryOutboxStoreOptions): RepositoryOutboxStore;
|
|
168
168
|
//#endregion
|
|
169
169
|
//#region src/events/subscribe-helpers.d.ts
|
|
170
170
|
/**
|
|
@@ -244,7 +244,7 @@ interface WrapWithSchemaOptions<_T> {
|
|
|
244
244
|
* );
|
|
245
245
|
* ```
|
|
246
246
|
*/
|
|
247
|
-
declare function wrapWithSchema<T>(definition: EventDefinitionOutput<T>, handler: EventHandler<T>, options?: WrapWithSchemaOptions<T>): EventHandler<unknown>;
|
|
247
|
+
export declare function wrapWithSchema<T>(definition: EventDefinitionOutput<T>, handler: EventHandler<T>, options?: WrapWithSchemaOptions<T>): EventHandler<unknown>;
|
|
248
248
|
/**
|
|
249
249
|
* Convenience: validate + subscribe in one call. Equivalent to
|
|
250
250
|
* `fastify.events.subscribe(definition.name, wrapWithSchema(definition, handler, options))`.
|
|
@@ -266,7 +266,7 @@ declare function wrapWithSchema<T>(definition: EventDefinitionOutput<T>, handler
|
|
|
266
266
|
* );
|
|
267
267
|
* ```
|
|
268
268
|
*/
|
|
269
|
-
declare function subscribeWithSchema<T>(fastify: FastifyEventBus, definition: EventDefinitionOutput<T>, handler: EventHandler<T>, options?: WrapWithSchemaOptions<T>): Promise<() => void>;
|
|
269
|
+
export declare function subscribeWithSchema<T>(fastify: FastifyEventBus, definition: EventDefinitionOutput<T>, handler: EventHandler<T>, options?: WrapWithSchemaOptions<T>): Promise<() => void>;
|
|
270
270
|
interface WrapWithBoundaryOptions {
|
|
271
271
|
/**
|
|
272
272
|
* Called when the handler throws. Default behaviour: log the error with
|
|
@@ -306,14 +306,14 @@ interface WrapWithBoundaryOptions {
|
|
|
306
306
|
* );
|
|
307
307
|
* ```
|
|
308
308
|
*/
|
|
309
|
-
declare function wrapWithBoundary(handler: EventHandler, options?: WrapWithBoundaryOptions): EventHandler;
|
|
309
|
+
export declare function wrapWithBoundary(handler: EventHandler, options?: WrapWithBoundaryOptions): EventHandler;
|
|
310
310
|
/**
|
|
311
311
|
* Convenience: subscribe + error-boundary in one call. Equivalent to
|
|
312
312
|
* `fastify.events.subscribe(pattern, wrapWithBoundary(handler, options))`.
|
|
313
313
|
*
|
|
314
314
|
* Returns the unsubscribe function from the underlying transport.
|
|
315
315
|
*/
|
|
316
|
-
declare function subscribeWithBoundary(fastify: FastifyEventBus, pattern: string, handler: EventHandler, options?: WrapWithBoundaryOptions): Promise<() => void>;
|
|
316
|
+
export declare function subscribeWithBoundary(fastify: FastifyEventBus, pattern: string, handler: EventHandler, options?: WrapWithBoundaryOptions): Promise<() => void>;
|
|
317
317
|
/**
|
|
318
318
|
* Structural type — accepts anything with the `events.subscribe` method,
|
|
319
319
|
* including `FastifyInstance` (declaration-merged in `eventPlugin.ts`) and
|
|
@@ -327,6 +327,6 @@ interface FastifyEventBus {
|
|
|
327
327
|
//#endregion
|
|
328
328
|
//#region src/events/subscriberIdentity.d.ts
|
|
329
329
|
/** Assign a deployment-stable identity for durable per-handler progress; never use an index. */
|
|
330
|
-
declare function withSubscriberId<T>(id: string, handler: EventHandler<T>): EventHandler<T>;
|
|
330
|
+
export declare function withSubscriberId<T>(id: string, handler: EventHandler<T>): EventHandler<T>;
|
|
331
331
|
//#endregion
|
|
332
|
-
export {
|
|
332
|
+
export { type ArcLifecycleEvent, type CacheEvent, type CrudEventSuffix, type CustomValidator, DEFAULT_RELAY_LAG_UNHEALTHY_MS, type EventDefinitionInput, type EventDefinitionOutput, EventOutbox, type EventOutboxOptions, type EventPluginOptions, type EventRegistry, type EventRegistryOptions, type EventSchema, type ExponentialBackoffOptions, type FastifyEventBus, type InboxHandler, type InboxHandlerContext, type InboxOptions, MemoryEventTransport, type MemoryEventTransportOptions, MemoryOutboxStore, type OutboxDrainResult, type OutboxHealth, type OutboxHealthStore, type OutboxModuleExports, type OutboxModuleOptions, type OutboxRelayErrorHandler, type OutboxRelayErrorKind, type PayloadOf, type RedisEventTransportOptions, type RedisLike, type RedisStreamLike, type RedisStreamTransportOptions, type RelayResult, type RepositoryOutboxStore, type RepositoryOutboxStoreOptions, type RetryOptions, type ValidationResult, type WrapWithBoundaryOptions, type WrapWithSchemaOptions, createDeadLetterPublisher, createEventRegistry, createOutboxModule, defineEvent, eventPlugin, readOutboxHealth, withRetry };
|
package/dist/events/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as MemoryEventTransport } from "../EventTransport-
|
|
3
|
-
import { a as crudEventType, d as createEventRegistry, f as defineEvent, i as CRUD_EVENT_SUFFIXES, l as wrapWithBoundary, n as CACHE_EVENTS, o as subscribeWithBoundary, s as subscribeWithSchema, t as ARC_LIFECYCLE_EVENTS, u as wrapWithSchema } from "../eventTypes-
|
|
4
|
-
import { r as withSubscriberId } from "../subscriberIdentity-
|
|
5
|
-
import { a as withRetry, i as createDeadLetterPublisher, n as eventPlugin } from "../eventPlugin-
|
|
6
|
-
import { r as readOutboxHealth, t as DEFAULT_RELAY_LAG_UNHEALTHY_MS } from "../health-
|
|
7
|
-
import { i as exponentialBackoff, n as EventOutbox, r as repositoryAsOutboxStore, t as createOutboxModule } from "../outbox-module-
|
|
1
|
+
/*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as MemoryEventTransport } from "../EventTransport-DZWDsaPa.mjs";
|
|
3
|
+
import { a as crudEventType, d as createEventRegistry, f as defineEvent, i as CRUD_EVENT_SUFFIXES, l as wrapWithBoundary, n as CACHE_EVENTS, o as subscribeWithBoundary, s as subscribeWithSchema, t as ARC_LIFECYCLE_EVENTS, u as wrapWithSchema } from "../eventTypes-N4-omQFR.mjs";
|
|
4
|
+
import { r as withSubscriberId } from "../subscriberIdentity-DeyppIif.mjs";
|
|
5
|
+
import { a as withRetry, i as createDeadLetterPublisher, n as eventPlugin } from "../eventPlugin-BweHAVws.mjs";
|
|
6
|
+
import { r as readOutboxHealth, t as DEFAULT_RELAY_LAG_UNHEALTHY_MS } from "../health-BYAwA6YS.mjs";
|
|
7
|
+
import { i as exponentialBackoff, n as EventOutbox, r as repositoryAsOutboxStore, t as createOutboxModule } from "../outbox-module-Ryk270jd.mjs";
|
|
8
8
|
import { fingerprintRequest, runIdempotent } from "@classytic/repo-core/idempotency";
|
|
9
9
|
import { MemoryOutboxStore } from "@classytic/primitives/memory-outbox";
|
|
10
10
|
//#region src/events/inbox.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as evictToSize } from "../../boundedMap-
|
|
3
|
-
import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-
|
|
4
|
-
import { t as getSubscriberId } from "../../subscriberIdentity-
|
|
1
|
+
/*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as evictToSize } from "../../boundedMap-DWiKW7lP.mjs";
|
|
3
|
+
import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-n9a7d_lZ.mjs";
|
|
4
|
+
import { t as getSubscriberId } from "../../subscriberIdentity-DeyppIif.mjs";
|
|
5
5
|
import sjson from "secure-json-parse";
|
|
6
6
|
import { createEventRouter } from "@classytic/primitives/events";
|
|
7
7
|
//#region src/events/transports/redis-stream.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { a as EventTransport, i as EventLogger, n as DomainEvent, r as EventHandler } from "../../EventTransport-CiicKz2Z.mjs";
|
|
3
3
|
//#region src/events/transports/redis.d.ts
|
|
4
|
-
interface RedisLike {
|
|
4
|
+
export interface RedisLike {
|
|
5
5
|
publish(channel: string, message: string): Promise<number>;
|
|
6
6
|
subscribe(...channels: string[]): Promise<unknown>;
|
|
7
7
|
psubscribe(...patterns: string[]): Promise<unknown>;
|
|
@@ -9,7 +9,7 @@ interface RedisLike {
|
|
|
9
9
|
duplicate(): RedisLike;
|
|
10
10
|
quit(): Promise<unknown>;
|
|
11
11
|
}
|
|
12
|
-
interface RedisEventTransportOptions {
|
|
12
|
+
export interface RedisEventTransportOptions {
|
|
13
13
|
/**
|
|
14
14
|
* Redis channel prefix for all events.
|
|
15
15
|
* Events are published to `<channel>:<event.type>`.
|
|
@@ -28,7 +28,7 @@ interface RedisEventTransportOptions {
|
|
|
28
28
|
*/
|
|
29
29
|
logger?: EventLogger;
|
|
30
30
|
}
|
|
31
|
-
declare class RedisEventTransport implements EventTransport {
|
|
31
|
+
export declare class RedisEventTransport implements EventTransport {
|
|
32
32
|
readonly name = "redis";
|
|
33
33
|
/** Publish-side client (the original client or a duplicate). */
|
|
34
34
|
private pub;
|
|
@@ -72,5 +72,4 @@ declare class RedisEventTransport implements EventTransport {
|
|
|
72
72
|
*/
|
|
73
73
|
private isGlob;
|
|
74
74
|
}
|
|
75
|
-
//#endregion
|
|
76
|
-
export { RedisEventTransport, RedisEventTransportOptions, RedisLike };
|
|
75
|
+
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-
|
|
1
|
+
/*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-n9a7d_lZ.mjs";
|
|
3
3
|
import sjson from "secure-json-parse";
|
|
4
4
|
//#region src/events/transports/redis.ts
|
|
5
5
|
/**
|
package/dist/factory/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { _ as ResourceLike, a as ArcPortRegistry, c as LazyBridge, d as ModulePorts, f as ModuleRequirements, g as LoadResourcesOptions, h as ModuleSetupContext, i as ArcModuleRegistry, l as ModuleContribution, m as ModuleDisposer, n as ArcModule, o as ArcPorts, p as PortName, r as ArcModuleInput, s as EventHandlerDefinition, t as ArcCompositionConfig, u as ModuleName, v as ResourceModule, w as HealthCheck, y as loadResources } from "../types-BJ-2XqVF.mjs";
|
|
3
|
-
import { $ as verifyModuleGraph, A as AsyncApiCatalogEntry, B as ModuleGraphMode, C as planModules, D as ModuleExtension, E as subscribeModuleEventHandlers, F as DurabilityFacts, G as activateBridges, H as ModuleGraphOptions, I as HandlerDurabilityFact, J as crudEventsOf, K as analyzeModuleGraph, L as ModuleGraph, M as toAsyncApi, N as CrudSurface, O as extendModule, P as DerivedPublishes, Q as verifyEventDurability, R as ModuleGraphAnalysis, S as compositionProblems, T as orderModules, U as ModuleKind, V as ModuleGraphNode, W as SkippedBridge, X as eventTopology, Y as dependentsOf, Z as renderModuleGraph, _ as ClosureNode, a as lazyModuleExports, b as PlanModulesOptions, c as getModuleResources, d as resolveContribution, f as resolveModule, g as withRelayNudge, h as createRelayNudge, i as hasModuleExports, j as AsyncApiInfo, k as collectModuleWorkflows, l as getModuleState, m as RelayOption, n as getModuleExports, o as lazyRequiredModuleExports, p as RelayNudge, q as buildModuleGraph, r as getOptionalModuleExports, s as ModuleState, t as defineModule, u as hasModule, v as CompositionProblem, w as resolveModuleClosure, x as assertComposable, y as ModulePlan, z as ModuleGraphIssue } from "../index-
|
|
4
|
-
import { a as ResolvedModuleDescriptor, o as ResolvedModuleLifecycle, s as ResolvedResourceDescriptor } from "../fastify-augmentation-
|
|
5
|
-
import { a as UnderPressureOptions, c as CustomAuthenticatorOption, i as RawBodyOptions, l as CustomPluginAuthOption, n as CreateAppOptions, o as AuthOption, r as MultipartOptions, s as BetterAuthOption, t as BootDisposer, u as JwtAuthOption } from "../index-
|
|
3
|
+
import { $ as verifyModuleGraph, A as AsyncApiCatalogEntry, B as ModuleGraphMode, C as planModules, D as ModuleExtension, E as subscribeModuleEventHandlers, F as DurabilityFacts, G as activateBridges, H as ModuleGraphOptions, I as HandlerDurabilityFact, J as crudEventsOf, K as analyzeModuleGraph, L as ModuleGraph, M as toAsyncApi, N as CrudSurface, O as extendModule, P as DerivedPublishes, Q as verifyEventDurability, R as ModuleGraphAnalysis, S as compositionProblems, T as orderModules, U as ModuleKind, V as ModuleGraphNode, W as SkippedBridge, X as eventTopology, Y as dependentsOf, Z as renderModuleGraph, _ as ClosureNode, a as lazyModuleExports, b as PlanModulesOptions, c as getModuleResources, d as resolveContribution, f as resolveModule, g as withRelayNudge, h as createRelayNudge, i as hasModuleExports, j as AsyncApiInfo, k as collectModuleWorkflows, l as getModuleState, m as RelayOption, n as getModuleExports, o as lazyRequiredModuleExports, p as RelayNudge, q as buildModuleGraph, r as getOptionalModuleExports, s as ModuleState, t as defineModule, u as hasModule, v as CompositionProblem, w as resolveModuleClosure, x as assertComposable, y as ModulePlan, z as ModuleGraphIssue } from "../index-CUJvoyw3.mjs";
|
|
4
|
+
import { a as ResolvedModuleDescriptor, o as ResolvedModuleLifecycle, s as ResolvedResourceDescriptor } from "../fastify-augmentation-DRlCIWE9.mjs";
|
|
5
|
+
import { a as UnderPressureOptions, c as CustomAuthenticatorOption, i as RawBodyOptions, l as CustomPluginAuthOption, n as CreateAppOptions, o as AuthOption, r as MultipartOptions, s as BetterAuthOption, t as BootDisposer, u as JwtAuthOption } from "../index-BkV55WlV.mjs";
|
|
6
6
|
import { FastifyInstance, FastifyServerOptions } from "fastify";
|
|
7
7
|
//#region src/factory/createApp.d.ts
|
|
8
8
|
/**
|
|
@@ -11,7 +11,7 @@ import { FastifyInstance, FastifyServerOptions } from "fastify";
|
|
|
11
11
|
* `logger.redact`. Opt out with `logger: { redact: [] }`; an explicit
|
|
12
12
|
* `redact` always wins.
|
|
13
13
|
*/
|
|
14
|
-
declare const DEFAULT_LOGGER_REDACT_PATHS: readonly ["req.headers.authorization", 'req.headers["x-api-key"]', 'req.headers["x-internal-api-key"]', 'req.headers["x-device-token"]', "req.headers.cookie", 'req.headers["set-cookie"]', 'res.headers["set-cookie"]', "*.password", "*.passwordHash", "*.token", "*.accessToken", "*.refreshToken", "*.secret", "*.apiKey"];
|
|
14
|
+
export declare const DEFAULT_LOGGER_REDACT_PATHS: readonly ["req.headers.authorization", 'req.headers["x-api-key"]', 'req.headers["x-internal-api-key"]', 'req.headers["x-device-token"]', "req.headers.cookie", 'req.headers["set-cookie"]', 'res.headers["set-cookie"]', "*.password", "*.passwordHash", "*.token", "*.accessToken", "*.refreshToken", "*.secret", "*.apiKey"];
|
|
15
15
|
/**
|
|
16
16
|
* Create a production-ready Fastify application with Arc framework.
|
|
17
17
|
*
|
|
@@ -34,11 +34,11 @@ declare const DEFAULT_LOGGER_REDACT_PATHS: readonly ["req.headers.authorization"
|
|
|
34
34
|
* **Boot is all-or-nothing.** If any phase throws, the partially-built
|
|
35
35
|
* instance is closed before the error propagates — see the wrapper below.
|
|
36
36
|
*/
|
|
37
|
-
declare function createApp(options: CreateAppOptions): Promise<FastifyInstance>;
|
|
37
|
+
export declare function createApp(options: CreateAppOptions): Promise<FastifyInstance>;
|
|
38
38
|
/**
|
|
39
39
|
* Quick factory for common scenarios
|
|
40
40
|
*/
|
|
41
|
-
declare const ArcFactory: {
|
|
41
|
+
export declare const ArcFactory: {
|
|
42
42
|
production(options: Omit<CreateAppOptions, "preset">): Promise<FastifyInstance>;
|
|
43
43
|
development(options: Omit<CreateAppOptions, "preset">): Promise<FastifyInstance>;
|
|
44
44
|
testing(options: Omit<CreateAppOptions, "preset">): Promise<FastifyInstance>;
|
|
@@ -65,7 +65,7 @@ interface ArcWorker {
|
|
|
65
65
|
/** Close app → module onClose (reverse) → app onClose. Idempotent. */
|
|
66
66
|
close(): Promise<void>;
|
|
67
67
|
}
|
|
68
|
-
declare function createWorker(options: CreateAppOptions, workerOptions?: CreateWorkerOptions): Promise<ArcWorker>;
|
|
68
|
+
export declare function createWorker(options: CreateAppOptions, workerOptions?: CreateWorkerOptions): Promise<ArcWorker>;
|
|
69
69
|
//#endregion
|
|
70
70
|
//#region src/factory/edge.d.ts
|
|
71
71
|
interface FetchHandlerOptions {
|
|
@@ -101,7 +101,7 @@ interface FetchHandlerOptions {
|
|
|
101
101
|
* (protobuf, images, non-UTF-8 charsets) survive intact — the
|
|
102
102
|
* content-type parser decides how to decode, same as a real socket.
|
|
103
103
|
*/
|
|
104
|
-
declare function toFetchHandler(app: FastifyInstance, options?: FetchHandlerOptions): (request: Request) => Promise<Response>;
|
|
104
|
+
export declare function toFetchHandler(app: FastifyInstance, options?: FetchHandlerOptions): (request: Request) => Promise<Response>;
|
|
105
105
|
//#endregion
|
|
106
106
|
//#region src/factory/preloadResources.d.ts
|
|
107
107
|
/** Eager glob result: `{ '/path/to/file.ts': resourceModule }` */
|
|
@@ -117,28 +117,28 @@ type LazyGlobResult = Record<string, () => Promise<unknown>>;
|
|
|
117
117
|
*
|
|
118
118
|
* Throws if any module doesn't yield a valid `ResourceLike`.
|
|
119
119
|
*/
|
|
120
|
-
declare function preloadResources(globResult: EagerGlobResult): ResourceLike[];
|
|
120
|
+
export declare function preloadResources(globResult: EagerGlobResult): ResourceLike[];
|
|
121
121
|
/**
|
|
122
122
|
* Normalize a lazy `import.meta.glob` result into a `Promise<ResourceLike[]>`.
|
|
123
123
|
*
|
|
124
124
|
* Use this when resources depend on prior bootstrap (e.g., engine init) and
|
|
125
125
|
* cannot be evaluated at import time of the preload file.
|
|
126
126
|
*/
|
|
127
|
-
declare function preloadResourcesAsync(globResult: LazyGlobResult): Promise<ResourceLike[]>;
|
|
127
|
+
export declare function preloadResourcesAsync(globResult: LazyGlobResult): Promise<ResourceLike[]>;
|
|
128
128
|
//#endregion
|
|
129
129
|
//#region src/factory/presets.d.ts
|
|
130
130
|
/**
|
|
131
131
|
* Production preset - strict security, performance optimized
|
|
132
132
|
*/
|
|
133
|
-
declare const productionPreset: Partial<CreateAppOptions>;
|
|
133
|
+
export declare const productionPreset: Partial<CreateAppOptions>;
|
|
134
134
|
/**
|
|
135
135
|
* Development preset - relaxed security, verbose logging
|
|
136
136
|
*/
|
|
137
|
-
declare const developmentPreset: Partial<CreateAppOptions>;
|
|
137
|
+
export declare const developmentPreset: Partial<CreateAppOptions>;
|
|
138
138
|
/**
|
|
139
139
|
* Testing preset - minimal setup, fast startup
|
|
140
140
|
*/
|
|
141
|
-
declare const testingPreset: Partial<CreateAppOptions>;
|
|
141
|
+
export declare const testingPreset: Partial<CreateAppOptions>;
|
|
142
142
|
/**
|
|
143
143
|
* Edge/Serverless preset — minimal cold-start overhead
|
|
144
144
|
*
|
|
@@ -164,7 +164,7 @@ declare const testingPreset: Partial<CreateAppOptions>;
|
|
|
164
164
|
* modern edge runtimes with Node.js compat flags. No TCP server is needed
|
|
165
165
|
* when using `toFetchHandler()` (routes through Fastify's `.inject()`).
|
|
166
166
|
*/
|
|
167
|
-
declare const edgePreset: Partial<CreateAppOptions>;
|
|
168
|
-
declare function getPreset(name: "production" | "development" | "testing" | "edge" | "worker"): Partial<CreateAppOptions>;
|
|
167
|
+
export declare const edgePreset: Partial<CreateAppOptions>;
|
|
168
|
+
export declare function getPreset(name: "production" | "development" | "testing" | "edge" | "worker"): Partial<CreateAppOptions>;
|
|
169
169
|
//#endregion
|
|
170
|
-
export { type ArcCompositionConfig,
|
|
170
|
+
export { type ArcCompositionConfig, type ArcModule, type ArcModuleInput, type ArcModuleRegistry, type ArcPortRegistry, type ArcPorts, type ArcWorker, type AsyncApiCatalogEntry, type AsyncApiInfo, type AuthOption, type BetterAuthOption, type BootDisposer, type ClosureNode, type CompositionProblem, type CreateAppOptions, type CreateWorkerOptions, type CrudSurface, type CustomAuthenticatorOption, type CustomPluginAuthOption, type DerivedPublishes, type DurabilityFacts, type EagerGlobResult, type EventHandlerDefinition, type FetchHandlerOptions, type HandlerDurabilityFact, type JwtAuthOption, type LazyBridge, type LazyGlobResult, type LoadResourcesOptions, type ModuleContribution, type ModuleDisposer, type ModuleExtension, type ModuleGraph, type ModuleGraphAnalysis, type ModuleGraphIssue, type ModuleGraphMode, type ModuleGraphNode, type ModuleGraphOptions, type ModuleKind, type ModuleName, type ModulePlan, type ModulePorts, type ModuleRequirements, type ModuleSetupContext, type ModuleState, type MultipartOptions, type PlanModulesOptions, type PortName, type RawBodyOptions, type RelayNudge, type RelayOption, type ResolvedModuleDescriptor, type ResolvedModuleLifecycle, type ResolvedResourceDescriptor, type ResourceLike, type ResourceModule, type SkippedBridge, type UnderPressureOptions, type WorkerHealthOptions, activateBridges, analyzeModuleGraph, assertComposable, buildModuleGraph, collectModuleWorkflows, compositionProblems, createRelayNudge, crudEventsOf, defineModule, dependentsOf, eventTopology, extendModule, getModuleExports, getModuleResources, getModuleState, getOptionalModuleExports, hasModule, hasModuleExports, lazyModuleExports, lazyRequiredModuleExports, loadResources, orderModules, planModules, renderModuleGraph, resolveContribution, resolveModule, resolveModuleClosure, subscribeModuleEventHandlers, toAsyncApi, verifyEventDurability, verifyModuleGraph, withRelayNudge };
|
package/dist/factory/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as mergeHealthChecks, t as healthPlugin } from "../health-
|
|
3
|
-
import { a as developmentPreset, c as productionPreset, d as getModuleResources, f as getModuleState, g as collectModuleWorkflows, l as testingPreset, m as subscribeModuleEventHandlers, n as DEFAULT_LOGGER_REDACT_PATHS, o as edgePreset, p as hasModule, r as createApp, s as getPreset, t as ArcFactory, u as workerPreset } from "../createApp-
|
|
4
|
-
import { _ as dependentsOf, b as verifyEventDurability, d as resolveModule, g as crudEventsOf, h as buildModuleGraph, i as planModules, m as analyzeModuleGraph, o as resolveModuleClosure, p as activateBridges, r as compositionProblems, s as orderModules, t as assertComposable, u as resolveContribution, v as eventTopology, x as verifyModuleGraph, y as renderModuleGraph } from "../plan-
|
|
5
|
-
import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, t as defineModule } from "../module
|
|
6
|
-
import { t as loadResources } from "../loadResources-
|
|
1
|
+
/*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as mergeHealthChecks, t as healthPlugin } from "../health-CrqUp3sz.mjs";
|
|
3
|
+
import { a as developmentPreset, c as productionPreset, d as getModuleResources, f as getModuleState, g as collectModuleWorkflows, l as testingPreset, m as subscribeModuleEventHandlers, n as DEFAULT_LOGGER_REDACT_PATHS, o as edgePreset, p as hasModule, r as createApp, s as getPreset, t as ArcFactory, u as workerPreset } from "../createApp-BGLYtErt.mjs";
|
|
4
|
+
import { _ as dependentsOf, b as verifyEventDurability, d as resolveModule, g as crudEventsOf, h as buildModuleGraph, i as planModules, m as analyzeModuleGraph, o as resolveModuleClosure, p as activateBridges, r as compositionProblems, s as orderModules, t as assertComposable, u as resolveContribution, v as eventTopology, x as verifyModuleGraph, y as renderModuleGraph } from "../plan-CJGMKoui.mjs";
|
|
5
|
+
import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, t as defineModule } from "../module--L0iBIZz.mjs";
|
|
6
|
+
import { t as loadResources } from "../loadResources-6jO52-RR.mjs";
|
|
7
7
|
//#region src/factory/module/asyncapi.ts
|
|
8
8
|
/**
|
|
9
9
|
* The module graph as an AsyncAPI 3.0 document — one channel per event (addressed by the event
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import { M as ResourceRegistry,
|
|
2
|
+
import { M as ResourceRegistry, dn as HookSystem } from "./index-WH7xgvxS.mjs";
|
|
3
3
|
import { t as ExternalOpenApiPaths } from "./externalPaths-CmGOxOtD.mjs";
|
|
4
4
|
import { b as ScheduleDefinition, i as ArcModuleRegistry, n as ArcModule, w as HealthCheck } from "./types-BJ-2XqVF.mjs";
|
|
5
|
-
import { L as ModuleGraph, s as ModuleState } from "./index-
|
|
5
|
+
import { L as ModuleGraph, s as ModuleState } from "./index-CUJvoyw3.mjs";
|
|
6
6
|
import { FastifyPluginAsync } from "fastify";
|
|
7
7
|
//#region src/factory/module/descriptor.d.ts
|
|
8
8
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as pluralize } from "./pluralize-
|
|
1
|
+
/*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as pluralize } from "./pluralize-COUNYo3d.mjs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
5
|
//#region src/cli/commands/generate/name-helpers.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { u as ValidationError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
|
|
2
|
+
import { u as ValidationError } from "./errors-CW4anJBy.mjs";
|
|
3
3
|
//#region src/utils/headers.ts
|
|
4
4
|
/**
|
|
5
5
|
* Canonical header typing + accessor.
|
package/dist/hooks/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { _n as beforeDelete, an as DefineHookOptions, bn as defineHook, cn as HookOperation, dn as HookSystem, fn as HookSystemOptions, gn as beforeCreate, hn as afterUpdate, in as AroundHookHandler, ln as HookPhase, mn as afterDelete, on as HookContext, pn as afterCreate, sn as HookHandler, un as HookRegistration, vn as beforeUpdate, yn as createHookSystem } from "../index-WH7xgvxS.mjs";
|
|
3
3
|
export { type AroundHookHandler, type DefineHookOptions, type HookContext, type HookHandler, type HookOperation, type HookPhase, type HookRegistration, HookSystem, type HookSystemOptions, afterCreate, afterDelete, afterUpdate, beforeCreate, beforeDelete, beforeUpdate, createHookSystem, defineHook };
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
|
|
3
|
-
export { HookSystem, afterCreate, afterDelete, afterUpdate, beforeCreate, beforeDelete, beforeUpdate, createHookSystem, defineHook };
|
|
1
|
+
/*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
|
|
2
|
+
export { t as HookSystem, n as afterCreate, r as afterDelete, i as afterUpdate, a as beforeCreate, o as beforeDelete, s as beforeUpdate, c as createHookSystem, l as defineHook } from "../HookSystem-yjEgn7Cm.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { t as RouteIdempotencyConfig } from "../requirement-CbiLdQ1n.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { i as RedisIdempotencyStoreOptions, n as RedisClient } from "../redis-
|
|
3
|
+
import { a as createIdempotencyResult, i as IdempotencyStore, n as IdempotencyLock, r as IdempotencyResult, t as IdempotencyAcquisition } from "../interface-JJzwH4Ro.mjs";
|
|
4
|
+
import { i as RedisIdempotencyStoreOptions, n as RedisClient } from "../redis-BDgv9Glw.mjs";
|
|
5
5
|
import { FastifyPluginAsync } from "fastify";
|
|
6
6
|
import { RepositoryLike } from "@classytic/repo-core/adapter";
|
|
7
7
|
//#region src/idempotency/idempotencyPlugin.d.ts
|
|
@@ -154,11 +154,11 @@ declare const _default: FastifyPluginAsync<IdempotencyPluginOptions>;
|
|
|
154
154
|
* filters on it are never stripped — see `idempotencyPlugin`'s
|
|
155
155
|
* `repository` option docs.
|
|
156
156
|
*/
|
|
157
|
-
declare class IdempotencyStoreMisconfiguredError extends Error {
|
|
157
|
+
export declare class IdempotencyStoreMisconfiguredError extends Error {
|
|
158
158
|
readonly code = "IDEMPOTENCY_STORE_MISCONFIGURED";
|
|
159
159
|
constructor(operation: string, expectedKey: string, actualKey: unknown);
|
|
160
160
|
}
|
|
161
|
-
declare function repositoryAsIdempotencyStore(repository: RepositoryLike, defaultTtlMs: number): IdempotencyStore;
|
|
161
|
+
export declare function repositoryAsIdempotencyStore(repository: RepositoryLike, defaultTtlMs: number): IdempotencyStore;
|
|
162
162
|
//#endregion
|
|
163
163
|
//#region src/idempotency/stores/memory.d.ts
|
|
164
164
|
interface MemoryIdempotencyStoreOptions {
|
|
@@ -169,8 +169,9 @@ interface MemoryIdempotencyStoreOptions {
|
|
|
169
169
|
/** Maximum entries before oldest are evicted (default: 10000) */
|
|
170
170
|
maxEntries?: number;
|
|
171
171
|
}
|
|
172
|
-
declare class MemoryIdempotencyStore implements IdempotencyStore {
|
|
172
|
+
export declare class MemoryIdempotencyStore implements IdempotencyStore {
|
|
173
173
|
readonly name = "memory";
|
|
174
|
+
readonly completionReleasesLock = true;
|
|
174
175
|
private results;
|
|
175
176
|
private locks;
|
|
176
177
|
private ttlMs;
|
|
@@ -181,6 +182,7 @@ declare class MemoryIdempotencyStore implements IdempotencyStore {
|
|
|
181
182
|
set(key: string, result: Omit<IdempotencyResult, "key">): Promise<void>;
|
|
182
183
|
private writeResult;
|
|
183
184
|
setIfLocked(key: string, requestId: string, result: Omit<IdempotencyResult, "key">): Promise<boolean>;
|
|
185
|
+
acquire(key: string, requestId: string, lockTtlMs: number): Promise<IdempotencyAcquisition>;
|
|
184
186
|
tryLock(key: string, requestId: string, ttlMs: number): Promise<boolean>;
|
|
185
187
|
unlock(key: string, requestId: string): Promise<void>;
|
|
186
188
|
isLocked(key: string): Promise<boolean>;
|
|
@@ -197,4 +199,4 @@ declare class MemoryIdempotencyStore implements IdempotencyStore {
|
|
|
197
199
|
private evictOldest;
|
|
198
200
|
}
|
|
199
201
|
//#endregion
|
|
200
|
-
export { type IdempotencyLock, type IdempotencyPluginOptions, type IdempotencyResult, type IdempotencyStore,
|
|
202
|
+
export { type IdempotencyAcquisition, type IdempotencyLock, type IdempotencyPluginOptions, type IdempotencyResult, type IdempotencyStore, type MemoryIdempotencyStoreOptions, type RedisClient, type RedisIdempotencyStoreOptions, createIdempotencyResult, _default as idempotencyPlugin };
|