@classytic/arc 2.44.0 → 2.45.1
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-DZWDsaPa.mjs → EventTransport-4b0noGwa.mjs} +2 -2
- package/dist/{HookSystem-yjEgn7Cm.mjs → HookSystem-4pABQnGn.mjs} +2 -2
- package/dist/{ResourceRegistry-DJxHUpE4.mjs → ResourceRegistry-BBaN_Ne-.mjs} +2 -2
- package/dist/{acquire-BozJ-9yt.mjs → acquire-kiZzy5bX.mjs} +1 -1
- package/dist/{actionPermissions-5N04zBL4.mjs → actionPermissions-BLnbDA6g.mjs} +13 -13
- package/dist/audit/index.mjs +4 -4
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.mjs +10 -11
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-wX3SA9w_.mjs → authorizationDecision-CVlaTjAX.mjs} +4 -4
- package/dist/{boundedMap-DWiKW7lP.mjs → boundedMap-DSy7KkeX.mjs} +1 -1
- package/dist/{buildHandler-Bswu_vNb.mjs → buildHandler-B4IhILv9.mjs} +4 -4
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-Drp68DIS.mjs → caching-DqakP2vY.mjs} +2 -2
- package/dist/{claimed-DYvQoZLv.mjs → claimed-XoiVrWZ2.mjs} +1 -1
- package/dist/cleanup/index.mjs +4 -4
- package/dist/cli/commands/describe.mjs +3 -3
- package/dist/cli/commands/docs.mjs +3 -3
- package/dist/cli/commands/doctor.mjs +1 -1
- package/dist/cli/commands/generate.mjs +2 -2
- package/dist/cli/commands/init.mjs +2 -2
- package/dist/cli/commands/introspect.mjs +2 -2
- package/dist/cli/index.mjs +3 -3
- package/dist/{constants-B2QHb6u6.mjs → constants-CtWkmWn3.mjs} +1 -1
- package/dist/context/index.mjs +5 -5
- package/dist/core/index.mjs +7 -7
- package/dist/{core-COcqo0Cp.mjs → core-Cro2v5a7.mjs} +3 -3
- package/dist/{createActionRouter-zG13rpPJ.mjs → createActionRouter-k-gwiPv6.mjs} +6 -6
- package/dist/{createAggregationRouter-CWRz96Vr.mjs → createAggregationRouter-BqWqhAPG.mjs} +7 -7
- package/dist/{createApp-BGLYtErt.mjs → createApp-Dw7L72Hz.mjs} +28 -28
- package/dist/{defineAggregation--3xguLkk.mjs → defineAggregation-pxbd7BBK.mjs} +1 -1
- package/dist/{defineResource-gUp9ug66.mjs → defineResource-DwgEjLCO.mjs} +7 -7
- package/dist/discovery/index.mjs +1 -1
- package/dist/docs/index.mjs +3 -3
- package/dist/{elevation-BG4gnMsJ.mjs → elevation-B9wF2Z1F.mjs} +5 -5
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-COHw3N1b.mjs → errorHandler-Dr2nG0Ui.mjs} +3 -3
- package/dist/{errors-CW4anJBy.mjs → errors-BtHzrSA6.mjs} +1 -1
- package/dist/{eventPlugin-BweHAVws.mjs → eventPlugin-Dvs7OBw8.mjs} +8 -8
- package/dist/{eventTypes-N4-omQFR.mjs → eventTypes-BVoCTG5c.mjs} +2 -2
- package/dist/events/index.mjs +7 -7
- package/dist/events/transports/redis-stream-entry.mjs +4 -4
- package/dist/events/transports/redis.mjs +2 -2
- package/dist/factory/index.d.mts +1 -1
- package/dist/factory/index.mjs +6 -6
- package/dist/{fields-A5crhsJb.mjs → fields-C1e_7Fwi.mjs} +1 -1
- package/dist/{filter-merge-DGM-GQ1J.mjs → filter-merge-xaiEKtz8.mjs} +1 -1
- package/dist/{generate-BXKo2Gc8.mjs → generate-DJiJMaXN.mjs} +2 -2
- package/dist/{headers-DKZQKL-Z.mjs → headers-Dr-wt6Tr.mjs} +2 -2
- package/dist/{health-CrqUp3sz.mjs → health-BLYn_Hds.mjs} +1 -1
- package/dist/{health-BYAwA6YS.mjs → health-DkkWbJtQ.mjs} +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/idempotency/index.mjs +7 -7
- package/dist/idempotency/redis.mjs +2 -2
- package/dist/{index-BkV55WlV.d.mts → index-uhkUA5-U.d.mts} +1 -1
- package/dist/index.mjs +11 -11
- package/dist/{init-BPzK5Lnr.mjs → init-CW3kJqNW.mjs} +1 -1
- package/dist/integrations/event-gateway.mjs +2 -2
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.mjs +3 -3
- package/dist/integrations/mcp/index.mjs +2 -2
- package/dist/integrations/mcp/testing.mjs +2 -2
- package/dist/integrations/streamline.mjs +3 -3
- package/dist/integrations/webhooks.mjs +3 -3
- package/dist/integrations/websocket-pushref-redis.mjs +1 -1
- package/dist/integrations/websocket-redis.mjs +1 -1
- package/dist/integrations/websocket.mjs +2 -2
- package/dist/{jsonBody-YIq-vGLv.mjs → jsonBody-DPU8yYwA.mjs} +2 -2
- package/dist/{keys-CpoiZ8hU.mjs → keys-Dgn6OYhl.mjs} +1 -1
- package/dist/{loadResources-6jO52-RR.mjs → loadResources-BtKj6P1P.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-MP8xEppu.mjs → loadResourcesFromEntry-Bmq6TnB7.mjs} +2 -2
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-D4V1zGLI.mjs → logger-qQNLlOAU.mjs} +1 -1
- package/dist/{mcpPlugin-srPc7ItN.mjs → mcpPlugin-DDfe8jAP.mjs} +22 -22
- package/dist/{memory-CTa5pOCW.mjs → memory-C0Blueoh.mjs} +3 -3
- package/dist/{metrics-DsZrvnpB.mjs → metrics-DYka72iN.mjs} +3 -3
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module--L0iBIZz.mjs → module-BszSyWbd.mjs} +1 -1
- package/dist/{multipartBody-Cc7eZ9cq.mjs → multipartBody-RHvIkNmc.mjs} +1 -1
- package/dist/{openapi-CMegfsm8.mjs → openapi-BrFPc3Ny.mjs} +6 -6
- package/dist/outbox-admin/index.mjs +5 -5
- package/dist/{outbox-module-Ryk270jd.mjs → outbox-module-DF4Bu_Qa.mjs} +9 -9
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-C5ijIz5Q.mjs → permissions-DN1CWH56.mjs} +9 -9
- package/dist/{pipe-D81zMtWs.mjs → pipe-B8uq865o.mjs} +2 -2
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-CJGMKoui.mjs → plan-DUGfynNg.mjs} +1 -1
- package/dist/{plugin-DALd9dcF.mjs → plugin-ByU3h-bR.mjs} +22 -22
- package/dist/plugins/index.d.mts +2 -2
- package/dist/plugins/index.mjs +17 -17
- package/dist/plugins/response-cache.mjs +4 -4
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-COUNYo3d.mjs → pluralize-Cdya8zYt.mjs} +1 -1
- package/dist/presets/filesUpload.mjs +5 -5
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.mjs +5 -5
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-CONf2Qem.mjs → presets-CCOlKTZw.mjs} +4 -4
- package/dist/{projection-wFoLqdss.mjs → projection-BGty6ie4.mjs} +2 -2
- package/dist/{queryCachePlugin-BATECpyh.mjs → queryCachePlugin-B7itTkWu.mjs} +6 -6
- package/dist/{rateLimitKey-DVEZ_UpV.mjs → rateLimitKey-DBWO59H9.mjs} +1 -1
- package/dist/{realtime-xyubMKSB.mjs → realtime-_59Rlje8.mjs} +11 -11
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-Bdzg-hdm.mjs → registry-uG4wr541.mjs} +2 -2
- package/dist/{renewingLease-BFJxGPuh.mjs → renewingLease-CiU3ZynH.mjs} +1 -1
- package/dist/{replyHelpers-Bnc6lJyy.mjs → replyHelpers-Dr2pnXZg.mjs} +2 -2
- package/dist/{requestContext-C10UeFe5.mjs → requestContext-DBKIdmDi.mjs} +1 -1
- package/dist/{requirement-Bu50QALH.mjs → requirement-DxOaghWD.mjs} +1 -1
- package/dist/{resourceRateLimit-urWPJxrt.mjs → resourceRateLimit-BBdj5yRq.mjs} +2 -2
- package/dist/rolldown-runtime-DpVPUeXF.mjs +15 -0
- package/dist/{routeValidator-DHtpzrzk.mjs → routeValidator-BNTqM1Eh.mjs} +1 -1
- package/dist/{runtimeCapabilities-DIMKMV2G.mjs → runtimeCapabilities-D_3eUO6V.mjs} +1 -1
- package/dist/{schedules-CKTs5ys8.mjs → schedules-CVS7c1nv.mjs} +5 -5
- package/dist/{schemaConverter-BVjkQ5DD.mjs → schemaConverter-BQbg7loK.mjs} +2 -2
- package/dist/{schemaIR-BA0Hb21Y.mjs → schemaIR-CUI3hPQR.mjs} +2 -2
- package/dist/schemas/index.mjs +1 -1
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-DINaj7Ax.mjs → scope-DFXngazv.mjs} +4 -4
- package/dist/{shutdown-LpLMH8T1.mjs → shutdown-BCXCwghd.mjs} +1 -1
- package/dist/{simpleEqualityMatcher-DbwIM1f1.mjs → simpleEqualityMatcher-5jOzYQ_L.mjs} +1 -1
- package/dist/sse-BilBz766.mjs +212 -0
- package/dist/{sseStream-DQChzGTs.mjs → sseStream-BG_uJL6J.mjs} +2 -2
- package/dist/{store-helpers-Coj9RhOZ.mjs → store-helpers-CzLZdVa1.mjs} +1 -1
- package/dist/{streaming-JzB5CAga.mjs → streaming-DgUvMWlv.mjs} +1 -1
- package/dist/{subscriberIdentity-DeyppIif.mjs → subscriberIdentity-EWnIZ-U8.mjs} +1 -1
- package/dist/{tenancy-DxV8OuX2.mjs → tenancy-CVMvO5DH.mjs} +2 -2
- package/dist/{tenantPreparation-CBvvAcAj.mjs → tenantPreparation-DIH-GX4g.mjs} +4 -4
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +1 -1
- package/dist/testing/index.mjs +15 -16
- package/dist/testing/outboxStoreContract.mjs +2 -2
- package/dist/testing/requiredPorts.mjs +2 -2
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{timing-CntavTlR.mjs → timing-q9NITK04.mjs} +1 -1
- package/dist/{transactionContext-orvnGu4F.mjs → transactionContext-NHmhDIOF.mjs} +1 -1
- package/dist/{typeGuards-kEaP_WmO.mjs → typeGuards-CPYR9RCg.mjs} +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-fvO6Ovzx.mjs → types-BI4sbUJ3.mjs} +4 -4
- package/dist/usage/index.mjs +4 -4
- package/dist/{userHelpers-C76zD5pa.mjs → userHelpers-oBTU3a_k.mjs} +1 -1
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-BpkVZ8rB.mjs → utils-BmE8zRrh.mjs} +4 -4
- package/dist/{validate-CWp-lsrm.mjs → validate-Dby08LhR.mjs} +3 -3
- package/dist/{versioning-Bsb51gGT.d.mts → versioning-Bqm_57Qt.d.mts} +23 -1
- package/dist/{versioning-CHhL9P3o.mjs → versioning-P6JMNcJr.mjs} +3 -3
- package/dist/{workScope-n9a7d_lZ.mjs → workScope-BcMLKa3G.mjs} +2 -2
- package/package.json +17 -16
- package/dist/mongodb-memory-server-CHhYSq5y.mjs +0 -35539
- package/dist/mongoose-CYJCLyi-.mjs +0 -67451
- package/dist/node-D8UZv_8c.mjs +0 -41236
- package/dist/rolldown-runtime-MYrLNGnq.mjs +0 -45
- package/dist/sse-BzJFPX_1.mjs +0 -89
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DpVPUeXF.mjs";
|
|
3
|
+
import { t as arcLog } from "./logger-qQNLlOAU.mjs";
|
|
4
|
+
import { g as getUserId, n as PUBLIC_SCOPE } from "./types-BI4sbUJ3.mjs";
|
|
5
|
+
import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-CVMvO5DH.mjs";
|
|
6
|
+
import { a as promoteStreamTokenToHeader } from "./streaming-DgUvMWlv.mjs";
|
|
7
|
+
import { t as openSseStream } from "./sseStream-BG_uJL6J.mjs";
|
|
8
|
+
import fp from "fastify-plugin";
|
|
9
|
+
//#region src/plugins/sse.ts
|
|
10
|
+
var sse_exports = /* @__PURE__ */ __exportAll({
|
|
11
|
+
default: () => sse_default,
|
|
12
|
+
ssePlugin: () => ssePlugin
|
|
13
|
+
});
|
|
14
|
+
const log = arcLog("sse");
|
|
15
|
+
/** Per-registration stats providers behind one `sseStats` decorator. */
|
|
16
|
+
const statsProviders = /* @__PURE__ */ new WeakMap();
|
|
17
|
+
function registerStats(fastify, provider) {
|
|
18
|
+
if (fastify.hasDecorator("sseStats")) {
|
|
19
|
+
statsProviders.get(fastify.sseStats)?.add(provider);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const providers = /* @__PURE__ */ new Set([provider]);
|
|
23
|
+
const sseStats = () => {
|
|
24
|
+
const total = {
|
|
25
|
+
connections: 0,
|
|
26
|
+
keys: 0
|
|
27
|
+
};
|
|
28
|
+
for (const p of providers) {
|
|
29
|
+
const s = p();
|
|
30
|
+
total.connections += s.connections;
|
|
31
|
+
total.keys += s.keys;
|
|
32
|
+
}
|
|
33
|
+
return total;
|
|
34
|
+
};
|
|
35
|
+
statsProviders.set(sseStats, providers);
|
|
36
|
+
fastify.decorate("sseStats", sseStats);
|
|
37
|
+
}
|
|
38
|
+
const serializeEvent = (event) => JSON.stringify({
|
|
39
|
+
type: event.type,
|
|
40
|
+
payload: event.payload,
|
|
41
|
+
meta: {
|
|
42
|
+
id: event.meta.id,
|
|
43
|
+
timestamp: event.meta.timestamp
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const ssePlugin = async (fastify, opts = {}) => {
|
|
47
|
+
const { path = "/events/stream", requireAuth = true, patterns = ["*"], heartbeat = 3e4, orgScoped = true, filter: customFilter, tokenQueryParam = "token", audience: resolveAudience, connectionKey = (request) => getUserId(request.scope ?? PUBLIC_SCOPE) } = opts;
|
|
48
|
+
if (!fastify.hasDecorator("events")) {
|
|
49
|
+
log.warn("Events plugin (arc-events) not registered. SSE plugin will not function. Register eventPlugin before ssePlugin.");
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const activeConnections = /* @__PURE__ */ new Set();
|
|
53
|
+
const connections = /* @__PURE__ */ new Set();
|
|
54
|
+
const byKey = /* @__PURE__ */ new Map();
|
|
55
|
+
const sharedUnsubs = [];
|
|
56
|
+
let sharedSubscription;
|
|
57
|
+
const visibleTo = (conn, event) => (!orgScoped || isEventVisible(event.meta?.organizationId, conn.orgAudience)) && (!customFilter || customFilter(event, conn.request));
|
|
58
|
+
const dispatch = (event) => {
|
|
59
|
+
let keys;
|
|
60
|
+
try {
|
|
61
|
+
keys = resolveAudience?.(event);
|
|
62
|
+
if (keys != null && !Array.isArray(keys)) throw new TypeError("audience must return an array");
|
|
63
|
+
} catch (error) {
|
|
64
|
+
log.error(`audience resolver failed for '${event.type}'; event not delivered`, error);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
let data;
|
|
68
|
+
let filterFailed = false;
|
|
69
|
+
const deliver = (conn) => {
|
|
70
|
+
try {
|
|
71
|
+
if (!visibleTo(conn, event)) return;
|
|
72
|
+
} catch (error) {
|
|
73
|
+
if (!filterFailed) log.error(`filter threw for '${event.type}'`, error);
|
|
74
|
+
filterFailed = true;
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
data ??= serializeEvent(event);
|
|
78
|
+
conn.stream.write(event.type, data);
|
|
79
|
+
};
|
|
80
|
+
if (keys == null) {
|
|
81
|
+
for (const conn of connections) deliver(conn);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
for (const key of new Set(keys)) {
|
|
85
|
+
const set = byKey.get(key);
|
|
86
|
+
if (set) for (const conn of set) deliver(conn);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const ensureSharedSubscription = () => {
|
|
90
|
+
sharedSubscription ??= (async () => {
|
|
91
|
+
for (const pattern of patterns) sharedUnsubs.push(await fastify.events.subscribe(pattern, dispatch));
|
|
92
|
+
})().catch((error) => {
|
|
93
|
+
for (const unsub of sharedUnsubs.splice(0)) unsub();
|
|
94
|
+
sharedSubscription = void 0;
|
|
95
|
+
throw error;
|
|
96
|
+
});
|
|
97
|
+
return sharedSubscription;
|
|
98
|
+
};
|
|
99
|
+
registerStats(fastify, () => resolveAudience ? {
|
|
100
|
+
connections: connections.size,
|
|
101
|
+
keys: byKey.size
|
|
102
|
+
} : {
|
|
103
|
+
connections: activeConnections.size,
|
|
104
|
+
keys: 0
|
|
105
|
+
});
|
|
106
|
+
const routeOpts = {
|
|
107
|
+
method: "GET",
|
|
108
|
+
url: path,
|
|
109
|
+
schema: {
|
|
110
|
+
tags: ["Events"],
|
|
111
|
+
summary: "SSE event stream",
|
|
112
|
+
description: "Server-Sent Events stream for real-time domain events",
|
|
113
|
+
response: { 200: {
|
|
114
|
+
type: "string",
|
|
115
|
+
description: "text/event-stream"
|
|
116
|
+
} }
|
|
117
|
+
},
|
|
118
|
+
handler: async (request, reply) => {
|
|
119
|
+
const stream = openSseStream(request, reply, { heartbeatMs: heartbeat });
|
|
120
|
+
stream.onCleanup(() => activeConnections.delete(stream.close));
|
|
121
|
+
const scope = request.scope ?? PUBLIC_SCOPE;
|
|
122
|
+
const audience = eventAudienceOf(scope);
|
|
123
|
+
if (resolveAudience) {
|
|
124
|
+
const key = connectionKey(request) || void 0;
|
|
125
|
+
const conn = {
|
|
126
|
+
request,
|
|
127
|
+
stream,
|
|
128
|
+
orgAudience: audience,
|
|
129
|
+
key
|
|
130
|
+
};
|
|
131
|
+
let closed = false;
|
|
132
|
+
stream.onCleanup(() => {
|
|
133
|
+
closed = true;
|
|
134
|
+
activeConnections.delete(stream.close);
|
|
135
|
+
connections.delete(conn);
|
|
136
|
+
const set = key === void 0 ? void 0 : byKey.get(key);
|
|
137
|
+
if (set?.delete(conn) && set.size === 0) byKey.delete(key);
|
|
138
|
+
});
|
|
139
|
+
await ensureSharedSubscription();
|
|
140
|
+
if (closed) return;
|
|
141
|
+
connections.add(conn);
|
|
142
|
+
if (key !== void 0) {
|
|
143
|
+
const set = byKey.get(key) ?? /* @__PURE__ */ new Set();
|
|
144
|
+
set.add(conn);
|
|
145
|
+
byKey.set(key, set);
|
|
146
|
+
}
|
|
147
|
+
activeConnections.add(stream.close);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
let closed = false;
|
|
151
|
+
const unsubs = [];
|
|
152
|
+
stream.onCleanup(() => {
|
|
153
|
+
closed = true;
|
|
154
|
+
for (const unsub of unsubs.splice(0)) unsub();
|
|
155
|
+
});
|
|
156
|
+
for (const pattern of patterns) {
|
|
157
|
+
const unsub = await fastify.events.subscribe(pattern, async (event) => {
|
|
158
|
+
if (orgScoped && !isEventVisible(event.meta?.organizationId, audience)) return;
|
|
159
|
+
if (customFilter && !customFilter(event, request)) return;
|
|
160
|
+
const data = JSON.stringify({
|
|
161
|
+
type: event.type,
|
|
162
|
+
payload: event.payload,
|
|
163
|
+
meta: {
|
|
164
|
+
id: event.meta.id,
|
|
165
|
+
timestamp: event.meta.timestamp
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
stream.write(event.type, data);
|
|
169
|
+
});
|
|
170
|
+
if (closed) {
|
|
171
|
+
unsub();
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
unsubs.push(unsub);
|
|
175
|
+
}
|
|
176
|
+
activeConnections.add(stream.close);
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
if (requireAuth) {
|
|
180
|
+
routeOpts.preHandler = (request, reply) => {
|
|
181
|
+
if (tokenQueryParam) promoteStreamTokenToHeader(request, tokenQueryParam);
|
|
182
|
+
const authenticate = fastify.authenticate;
|
|
183
|
+
if (typeof authenticate !== "function") {
|
|
184
|
+
reply.code(401).send({ error: "Unauthorized" });
|
|
185
|
+
return Promise.resolve();
|
|
186
|
+
}
|
|
187
|
+
return authenticate(request, reply);
|
|
188
|
+
};
|
|
189
|
+
fastify.addHook("onReady", async () => {
|
|
190
|
+
if (!fastify.hasDecorator("authenticate")) throw new Error("[arc-sse] requireAuth is true but no `authenticate` decorator was registered by the time the app was ready. Register an auth plugin, or set requireAuth: false.");
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
fastify.route(routeOpts);
|
|
194
|
+
fastify.addHook("onClose", async () => {
|
|
195
|
+
for (const cleanup of activeConnections) cleanup();
|
|
196
|
+
activeConnections.clear();
|
|
197
|
+
for (const unsub of sharedUnsubs.splice(0)) unsub();
|
|
198
|
+
});
|
|
199
|
+
log.debug("Plugin registered", {
|
|
200
|
+
path,
|
|
201
|
+
patterns,
|
|
202
|
+
orgScoped,
|
|
203
|
+
keyed: Boolean(resolveAudience)
|
|
204
|
+
});
|
|
205
|
+
};
|
|
206
|
+
var sse_default = fp(ssePlugin, {
|
|
207
|
+
name: "arc-sse",
|
|
208
|
+
fastify: "5.x",
|
|
209
|
+
dependencies: ["arc-events"]
|
|
210
|
+
});
|
|
211
|
+
//#endregion
|
|
212
|
+
export { sse_exports as n, sse_default as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as forwardedStreamHeaders } from "./streaming-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { n as forwardedStreamHeaders } from "./streaming-DgUvMWlv.mjs";
|
|
3
3
|
//#region src/utils/sseStream.ts
|
|
4
4
|
/**
|
|
5
5
|
* Take over the reply socket and open an SSE stream. Call ONLY after every
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
2
|
//#region src/events/subscriberIdentity.ts
|
|
3
3
|
const SUBSCRIBER_ID = Symbol.for("@classytic/arc/subscriber-id");
|
|
4
4
|
/** Assign a deployment-stable identity for durable per-handler progress; never use an index. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { b as isElevated, c as getOrgId } from "./types-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { b as isElevated, c as getOrgId } from "./types-BI4sbUJ3.mjs";
|
|
3
3
|
//#region src/core/tenancy.ts
|
|
4
4
|
function eventAudienceOf(scope) {
|
|
5
5
|
const tenancy = resolveTenancy({ _scope: scope }, "organizationId");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as conjoinPolicyFilters } from "./filter-merge-
|
|
3
|
-
import { d as createDomainError } from "./errors-
|
|
4
|
-
import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, v as hasOrgAccess } from "./types-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as conjoinPolicyFilters } from "./filter-merge-xaiEKtz8.mjs";
|
|
3
|
+
import { d as createDomainError } from "./errors-BtHzrSA6.mjs";
|
|
4
|
+
import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, v as hasOrgAccess } from "./types-BI4sbUJ3.mjs";
|
|
5
5
|
//#region src/permissions/tenantPreparation.ts
|
|
6
6
|
/** Tenant preparation shared by HTTP middleware and direct transport invocation. */
|
|
7
7
|
const PREPARATION = Symbol.for("arc.tenantPreparation");
|
package/dist/testing/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import { l as PermissionCheck, t as AnyRecord } from "../base-CZyixEQR.mjs";
|
|
|
4
4
|
import { F as ResourceDefinition } from "../index-WH7xgvxS.mjs";
|
|
5
5
|
import { h as ModuleSetupContext, m as ModuleDisposer, o as ArcPorts, p as PortName, r as ArcModuleInput, u as ModuleName } from "../types-BJ-2XqVF.mjs";
|
|
6
6
|
import "../index-CUJvoyw3.mjs";
|
|
7
|
-
import { n as CreateAppOptions } from "../index-
|
|
7
|
+
import { n as CreateAppOptions } from "../index-uhkUA5-U.mjs";
|
|
8
8
|
import { StorageContractSetup, StorageContractSetupResult, runStorageContract } from "./storageContract.mjs";
|
|
9
9
|
import { StandardRepo } from "@classytic/repo-core/repository";
|
|
10
10
|
import { FastifyInstance, FastifyServerOptions } from "fastify";
|
package/dist/testing/index.mjs
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { n as getModuleExports } from "../module--L0iBIZz.mjs";
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "../constants-CtWkmWn3.mjs";
|
|
3
|
+
import { c as BaseController } from "../plugin-ByU3h-bR.mjs";
|
|
4
|
+
import { g as getUserId } from "../types-BI4sbUJ3.mjs";
|
|
5
|
+
import { t as defineAggregation } from "../defineAggregation-pxbd7BBK.mjs";
|
|
6
|
+
import { t as defineResource } from "../defineResource-DwgEjLCO.mjs";
|
|
7
|
+
import { E as requireOrgRole } from "../permissions-DN1CWH56.mjs";
|
|
8
|
+
import { h as asModulePorts, r as createApp } from "../createApp-Dw7L72Hz.mjs";
|
|
9
|
+
import { d as resolveModule, l as isLazyBridge, o as resolveModuleClosure } from "../plan-DUGfynNg.mjs";
|
|
10
|
+
import { n as getModuleExports } from "../module-BszSyWbd.mjs";
|
|
12
11
|
import { runStorageContract } from "./storageContract.mjs";
|
|
13
12
|
import Fastify from "fastify";
|
|
14
13
|
import { afterAll, describe, expect, it, vi } from "vitest";
|
|
@@ -266,13 +265,13 @@ function testActorAuth(defaultActor) {
|
|
|
266
265
|
async function mongoMemoryDatabase(opts) {
|
|
267
266
|
let mms;
|
|
268
267
|
try {
|
|
269
|
-
mms = await import("
|
|
268
|
+
mms = await import("mongodb-memory-server");
|
|
270
269
|
} catch {
|
|
271
270
|
throw new Error("[arc-testing] bootModuleApp's default database is in-memory MongoDB — install 'mongodb-memory-server' + 'mongoose' as devDependencies, or inject your own `database` factory for a different store");
|
|
272
271
|
}
|
|
273
272
|
const server = opts.replset ? await mms.MongoMemoryReplSet.create({ replSet: { count: 1 } }) : await mms.MongoMemoryServer.create();
|
|
274
273
|
const uri = server.getUri();
|
|
275
|
-
const mongoose = (await import("
|
|
274
|
+
const mongoose = (await import("mongoose")).default;
|
|
276
275
|
if (mongoose.connection.readyState !== 0) await mongoose.disconnect();
|
|
277
276
|
await mongoose.connect(uri);
|
|
278
277
|
mongoose.connection.deleteModel(/.*/);
|
|
@@ -1548,7 +1547,7 @@ function scopeRoleGate(...allowed) {
|
|
|
1548
1547
|
*/
|
|
1549
1548
|
async function startInMemoryMongo() {
|
|
1550
1549
|
try {
|
|
1551
|
-
const { MongoMemoryServer } = await import("
|
|
1550
|
+
const { MongoMemoryServer } = await import("mongodb-memory-server");
|
|
1552
1551
|
const mongod = await MongoMemoryServer.create();
|
|
1553
1552
|
return {
|
|
1554
1553
|
uri: mongod.getUri(),
|
|
@@ -1562,7 +1561,7 @@ async function startInMemoryMongo() {
|
|
|
1562
1561
|
}
|
|
1563
1562
|
async function connectMongooseToUri(uri) {
|
|
1564
1563
|
try {
|
|
1565
|
-
const mongoose = (await import("
|
|
1564
|
+
const mongoose = (await import("mongoose")).default;
|
|
1566
1565
|
await mongoose.connect(uri);
|
|
1567
1566
|
return { async disconnect() {
|
|
1568
1567
|
await mongoose.disconnect();
|
|
@@ -1579,7 +1578,7 @@ function pickDefaultAuth(authMode, callerAuth) {
|
|
|
1579
1578
|
};
|
|
1580
1579
|
}
|
|
1581
1580
|
async function createTestApp(options = {}) {
|
|
1582
|
-
const { createApp } = await import("../createApp-
|
|
1581
|
+
const { createApp } = await import("../createApp-Dw7L72Hz.mjs").then((n) => n.i);
|
|
1583
1582
|
const { resources = [], db = "in-memory", connectMongoose = false, authMode = "jwt", defaultOrgId, plugins, auth: callerAuth, ...appOptions } = options;
|
|
1584
1583
|
let dbHandle;
|
|
1585
1584
|
let dbUri;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as claimedAttempts } from "../claimed-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as claimedAttempts } from "../claimed-XoiVrWZ2.mjs";
|
|
3
3
|
import { OutboxConflictError, OutboxOwnershipError } from "@classytic/primitives/outbox";
|
|
4
4
|
import { afterAll, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
|
5
5
|
//#region src/testing/outboxStoreContract.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { c as declareModules, d as resolveModule, i as planModules, r as compositionProblems } from "../plan-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { c as declareModules, d as resolveModule, i as planModules, r as compositionProblems } from "../plan-DUGfynNg.mjs";
|
|
3
3
|
//#region src/testing/requiredPorts.ts
|
|
4
4
|
/**
|
|
5
5
|
* Assert a module declares EXACTLY `ports` as required, and that composing it without any one of
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
//#region src/utils/operationIdentity.ts
|
|
4
4
|
/** Security context included in idempotency identities across transports. */
|
package/dist/types/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
2
|
export {};
|
package/dist/types/storage.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
2
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { l as UnauthorizedError, o as OrgRequiredError } from "./errors-
|
|
3
|
-
import { n as requireSingleHeaderValue } from "./headers-
|
|
4
|
-
import { t as getUserId$1 } from "./userHelpers-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { l as UnauthorizedError, o as OrgRequiredError } from "./errors-BtHzrSA6.mjs";
|
|
3
|
+
import { n as requireSingleHeaderValue } from "./headers-Dr-wt6Tr.mjs";
|
|
4
|
+
import { t as getUserId$1 } from "./userHelpers-oBTU3a_k.mjs";
|
|
5
5
|
//#region src/scope/types.ts
|
|
6
6
|
/**
|
|
7
7
|
* Request Scope — The One Standard
|
package/dist/usage/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ArcError } from "../errors-
|
|
3
|
-
import { c as getOrgId, g as getUserId, i as getClientId } from "../types-
|
|
4
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ArcError } from "../errors-BtHzrSA6.mjs";
|
|
3
|
+
import { c as getOrgId, g as getUserId, i as getClientId } from "../types-BI4sbUJ3.mjs";
|
|
4
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-D_3eUO6V.mjs";
|
|
5
5
|
import { usagePeriod } from "@classytic/repo-core/usage";
|
|
6
6
|
import fp from "fastify-plugin";
|
|
7
7
|
//#region src/usage/requireQuota.ts
|
package/dist/utils/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as OrgAccessDeniedError, c as ServiceUnavailableError, d as createDomainError, f as createError, i as NotFoundError, l as UnauthorizedError, n as ConflictError, o as OrgRequiredError, p as isArcError, r as ForbiddenError, s as RateLimitError, t as ArcError, u as ValidationError } from "../errors-
|
|
3
|
-
import { t as simpleEqualityMatcher } from "../simpleEqualityMatcher-
|
|
4
|
-
import { n as requireSingleHeaderValue, t as getHeader } from "../headers-
|
|
5
|
-
import { n as getUserRoles, r as normalizeRoles, t as getUserId } from "../userHelpers-
|
|
6
|
-
import { C as paginationSchema, D as createQueryParser, E as ArcQueryParser, O as MONGO_DIALECT, S as offsetListResponse, T as responses, _ as errorContractSchema, a as defineCompensation, b as keysetListResponse, c as CircuitBreaker, d as CircuitState, f as createCircuitBreaker, g as deleteResponse, h as bareListResponse, i as defineErrorMapper, k as NEUTRAL_DIALECT, l as CircuitBreakerError, m as aggregateListResponse, n as handleRaw, o as withCompensation, p as createCircuitBreakerRegistry, r as defineGuard, s as RedisCircuitBreakerState, t as createStateMachine, u as CircuitBreakerRegistry, v as getDefaultCrudSchemas, w as queryParams, x as listResponse, y as getListQueryParams } from "../utils-
|
|
7
|
-
import { a as isZodSchema, i as isJsonSchema, n as convertRouteSchema, o as toJsonSchema, t as convertOpenApiSchemas } from "../schemaConverter-
|
|
8
|
-
import { a as promoteStreamTokenToHeader, i as pipeUIMessageStreamToReply, n as forwardedStreamHeaders, r as isReadableStream, t as UI_MESSAGE_STREAM_HEADERS } from "../streaming-
|
|
9
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
10
|
-
import { i as runAdmittedWork, r as registerShutdownParticipant } from "../shutdown-
|
|
11
|
-
import { t as openSseStream } from "../sseStream-
|
|
12
|
-
import { t as hasEvents } from "../typeGuards-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { a as OrgAccessDeniedError, c as ServiceUnavailableError, d as createDomainError, f as createError, i as NotFoundError, l as UnauthorizedError, n as ConflictError, o as OrgRequiredError, p as isArcError, r as ForbiddenError, s as RateLimitError, t as ArcError, u as ValidationError } from "../errors-BtHzrSA6.mjs";
|
|
3
|
+
import { t as simpleEqualityMatcher } from "../simpleEqualityMatcher-5jOzYQ_L.mjs";
|
|
4
|
+
import { n as requireSingleHeaderValue, t as getHeader } from "../headers-Dr-wt6Tr.mjs";
|
|
5
|
+
import { n as getUserRoles, r as normalizeRoles, t as getUserId } from "../userHelpers-oBTU3a_k.mjs";
|
|
6
|
+
import { C as paginationSchema, D as createQueryParser, E as ArcQueryParser, O as MONGO_DIALECT, S as offsetListResponse, T as responses, _ as errorContractSchema, a as defineCompensation, b as keysetListResponse, c as CircuitBreaker, d as CircuitState, f as createCircuitBreaker, g as deleteResponse, h as bareListResponse, i as defineErrorMapper, k as NEUTRAL_DIALECT, l as CircuitBreakerError, m as aggregateListResponse, n as handleRaw, o as withCompensation, p as createCircuitBreakerRegistry, r as defineGuard, s as RedisCircuitBreakerState, t as createStateMachine, u as CircuitBreakerRegistry, v as getDefaultCrudSchemas, w as queryParams, x as listResponse, y as getListQueryParams } from "../utils-BmE8zRrh.mjs";
|
|
7
|
+
import { a as isZodSchema, i as isJsonSchema, n as convertRouteSchema, o as toJsonSchema, t as convertOpenApiSchemas } from "../schemaConverter-BQbg7loK.mjs";
|
|
8
|
+
import { a as promoteStreamTokenToHeader, i as pipeUIMessageStreamToReply, n as forwardedStreamHeaders, r as isReadableStream, t as UI_MESSAGE_STREAM_HEADERS } from "../streaming-DgUvMWlv.mjs";
|
|
9
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-D_3eUO6V.mjs";
|
|
10
|
+
import { i as runAdmittedWork, r as registerShutdownParticipant } from "../shutdown-BCXCwghd.mjs";
|
|
11
|
+
import { t as openSseStream } from "../sseStream-BG_uJL6J.mjs";
|
|
12
|
+
import { t as hasEvents } from "../typeGuards-CPYR9RCg.mjs";
|
|
13
13
|
export { ArcError, ArcQueryParser, CircuitBreaker, CircuitBreakerError, CircuitBreakerRegistry, CircuitState, ConflictError, ForbiddenError, MONGO_DIALECT, NEUTRAL_DIALECT, NotFoundError, OrgAccessDeniedError, OrgRequiredError, RateLimitError, RedisCircuitBreakerState, ServiceUnavailableError, UI_MESSAGE_STREAM_HEADERS, UnauthorizedError, ValidationError, aggregateListResponse, bareListResponse, convertOpenApiSchemas, convertRouteSchema, createCircuitBreaker, createCircuitBreakerRegistry, createDomainError, createError, createQueryParser, createStateMachine, declareRuntimeCapability, defineCompensation, defineErrorMapper, defineGuard, deleteResponse, errorContractSchema, forwardedStreamHeaders, getDefaultCrudSchemas, getHeader, getListQueryParams, getUserId, getUserRoles, handleRaw, hasEvents, isArcError, isJsonSchema, isReadableStream, isZodSchema, keysetListResponse, listResponse, normalizeRoles, offsetListResponse, openSseStream, paginationSchema, pipeUIMessageStreamToReply, promoteStreamTokenToHeader, queryParams, registerShutdownParticipant, requireSingleHeaderValue, responses, runAdmittedWork, simpleEqualityMatcher, toJsonSchema, withCompensation };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { h as RESERVED_QUERY_PARAMS } from "./constants-
|
|
3
|
-
import { t as arcLog } from "./logger-
|
|
4
|
-
import { t as ArcError, u as ValidationError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { h as RESERVED_QUERY_PARAMS } from "./constants-CtWkmWn3.mjs";
|
|
3
|
+
import { t as arcLog } from "./logger-qQNLlOAU.mjs";
|
|
4
|
+
import { t as ArcError, u as ValidationError } from "./errors-BtHzrSA6.mjs";
|
|
5
5
|
import { errorContractSchema as errorContractSchema$1 } from "@classytic/repo-core/errors";
|
|
6
6
|
import { readEnv } from "@classytic/primitives/environment";
|
|
7
7
|
import { OPERATOR_DESCRIPTIONS, URL_OPERATORS, escapeRegex, isQueryGrammarError, readFilterClauses, readPageRequest, readSearch, readSelect, readSort } from "@classytic/repo-core/query-parser";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import { _ as pathTouchesBlocked } from "./plugin-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DpVPUeXF.mjs";
|
|
3
|
+
import { _ as pathTouchesBlocked } from "./plugin-ByU3h-bR.mjs";
|
|
4
4
|
//#region src/core/aggregation/normalize.ts
|
|
5
5
|
/**
|
|
6
6
|
* Framework cap on URL-driven aggregation limits when the host opts
|
|
@@ -119,6 +119,28 @@ interface SSEOptions {
|
|
|
119
119
|
* Set `null` to disable promotion (e.g. cookie-only auth).
|
|
120
120
|
*/
|
|
121
121
|
tokenQueryParam?: string | null;
|
|
122
|
+
/**
|
|
123
|
+
* Keyed delivery: the connection keys (user ids by default) an event is for.
|
|
124
|
+
* Delivery becomes one map lookup per key, and org-scoping + `filter` still run
|
|
125
|
+
* on those connections only. `null`/`undefined` = broadcast through the filter.
|
|
126
|
+
* Each replica resolves it against its own connections. Setting it switches the
|
|
127
|
+
* plugin to one shared subscription per pattern. See wiki/plugins.md.
|
|
128
|
+
*/
|
|
129
|
+
audience?: (event: DomainEvent<unknown>) => readonly string[] | null | undefined;
|
|
130
|
+
/** Key a connection is indexed under for `audience` (default: scope user id; none = broadcasts only). */
|
|
131
|
+
connectionKey?: (request: FastifyRequest) => string | null | undefined;
|
|
132
|
+
}
|
|
133
|
+
/** Live connection gauge, summed across every `ssePlugin` registration on the instance. */
|
|
134
|
+
interface SSEStats {
|
|
135
|
+
/** Open SSE connections. */
|
|
136
|
+
connections: number;
|
|
137
|
+
/** Distinct `connectionKey`s indexed (0 without `audience`). */
|
|
138
|
+
keys: number;
|
|
139
|
+
}
|
|
140
|
+
declare module "fastify" {
|
|
141
|
+
interface FastifyInstance {
|
|
142
|
+
sseStats: () => SSEStats;
|
|
143
|
+
}
|
|
122
144
|
}
|
|
123
145
|
declare const _default$3: FastifyPluginAsync<SSEOptions>;
|
|
124
146
|
//#endregion
|
|
@@ -243,4 +265,4 @@ declare module "fastify" {
|
|
|
243
265
|
}
|
|
244
266
|
declare const _default: FastifyPluginAsync<VersioningOptions>;
|
|
245
267
|
//#endregion
|
|
246
|
-
export {
|
|
268
|
+
export { ShutdownState as _, MetricsOptions as a, RealtimeOptions as c, SSEStats as d, _default$3 as f, GracefulShutdownOptions as g, _default$4 as h, MetricsCollector as i, _default$2 as l, CachingRule as m, _default as n, _default$1 as o, CachingOptions as p, MetricEntry as r, ChangeOperation as s, VersioningOptions as t, SSEOptions as u, _default$5 as v };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import { d as createDomainError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DpVPUeXF.mjs";
|
|
3
|
+
import { d as createDomainError } from "./errors-BtHzrSA6.mjs";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
//#region src/plugins/versioning.ts
|
|
6
6
|
var versioning_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as requestContext } from "./requestContext-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { n as requestContext } from "./requestContext-DBKIdmDi.mjs";
|
|
3
3
|
//#region src/context/workScope.ts
|
|
4
4
|
/** Enter a scope for `fn`, or run it inside the active one. */
|
|
5
5
|
function runWorkScope(seed, fn) {
|