@classytic/arc 2.31.0 → 2.32.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/{BaseController-De7GqHck.mjs → BaseController-Dk34dxhI.mjs} +16 -13
- package/dist/{EventTransport-9mlTgqzE.mjs → EventTransport-BV10D0oG.mjs} +1 -1
- package/dist/{HookSystem-BcmPyq5I.mjs → HookSystem-vimw5D7Z.mjs} +2 -2
- package/dist/{ResourceRegistry-qq0mn2s9.mjs → ResourceRegistry-BVr7PgA0.mjs} +17 -15
- package/dist/{actionPermissions-BE5NwaQk.mjs → actionPermissions-Dti7ebyv.mjs} +1 -1
- package/dist/audit/index.mjs +2 -2
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.mjs +11 -10
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-ChvUQGG1.mjs → authorizationDecision-__T3EJDA.mjs} +2 -2
- package/dist/{buildHandler-CDrCJzmB.mjs → buildHandler-Dn7rzUJo.mjs} +6 -5
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-BFHA6Scf.mjs → caching-DFJqHyFs.mjs} +2 -2
- package/dist/cleanup/index.d.mts +36 -14
- package/dist/cleanup/index.mjs +45 -29
- package/dist/cli/commands/describe.mjs +4 -6
- 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-D3Dv4LAV.mjs → constants-J99LGTJI.mjs} +1 -1
- package/dist/context/index.mjs +3 -3
- package/dist/core/index.d.mts +1 -1
- package/dist/core/index.mjs +7 -7
- package/dist/{core-BGpIxINN.mjs → core-BwwmNSp7.mjs} +3 -3
- package/dist/{createActionRouter-CDXEdasl.mjs → createActionRouter-DkJZWo0m.mjs} +14 -11
- package/dist/{createAggregationRouter-KrQDzx-k.mjs → createAggregationRouter-B1exOVD8.mjs} +10 -8
- package/dist/{createApp-Df89BEni.mjs → createApp-Bv0m-Q6_.mjs} +182 -61
- package/dist/{defineAggregation-DbPPS8RI.mjs → defineAggregation-gX4No1gt.mjs} +1 -1
- package/dist/{defineResource-Bv6EtN1x.mjs → defineResource-XFPPUu2c.mjs} +41 -32
- package/dist/discovery/index.mjs +1 -1
- package/dist/docs/index.mjs +3 -3
- package/dist/{elevation-D2l1mh4g.mjs → elevation-DNXXxgjl.mjs} +4 -4
- package/dist/encryption/index.mjs +5 -4
- package/dist/{errorHandler-C5NeD6bT.mjs → errorHandler-B2AZUJUj.mjs} +3 -3
- package/dist/{errors-Cj42AntO.mjs → errors-Bh1KK5ps.mjs} +1 -1
- package/dist/{eventPlugin-CkffEihm.mjs → eventPlugin-Dk_TyXeE.mjs} +8 -7
- package/dist/events/index.d.mts +108 -41
- package/dist/events/index.mjs +166 -142
- package/dist/events/transports/redis-stream-entry.mjs +14 -10
- package/dist/events/transports/redis.mjs +1 -1
- package/dist/factory/index.d.mts +5 -5
- package/dist/factory/index.mjs +131 -8
- package/dist/fastify-augmentation-BppG5bMT.d.mts +179 -0
- package/dist/{fields-CB5Cuzk9.mjs → fields-DEi65pGj.mjs} +6 -11
- package/dist/{generate-EcA6ui4i.mjs → generate-CRSG0jTv.mjs} +2 -2
- package/dist/{headers-3zvE0rM3.mjs → headers-BXjQYbeC.mjs} +2 -2
- package/dist/{health-DjZYjM7H.mjs → health-5XnTa2uo.mjs} +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/idempotency/index.mjs +8 -6
- package/dist/idempotency/redis.mjs +1 -1
- package/dist/{index-Bc2ox8_U.d.mts → index-DXlHwvuE.d.mts} +1 -1
- package/dist/{index-CFThn1K9.d.mts → index-ZWhLTp_s.d.mts} +70 -4
- package/dist/{index-CEJNZFtX.d.mts → index-zq6VrjaB.d.mts} +70 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +11 -11
- package/dist/{init-BEiNZBsJ.mjs → init-BbfP8aky.mjs} +7 -5
- 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 +1 -1
- package/dist/integrations/websocket-pushref-redis.mjs +1 -1
- package/dist/integrations/websocket-redis.mjs +1 -1
- package/dist/integrations/websocket.mjs +38 -35
- package/dist/{interface-DYzM0q-u.mjs → interface-BP4IJCBO.mjs} +1 -1
- package/dist/{jsonBody-BYbLDi5D.mjs → jsonBody-DDSR2HFl.mjs} +2 -2
- package/dist/{keys-C0_pa1tY.mjs → keys-B-HBTGXl.mjs} +1 -1
- package/dist/{loadResources-yawi9tAE.mjs → loadResources-DisEAmkm.mjs} +4 -3
- package/dist/{loadResourcesFromEntry-BAjYZonx.mjs → loadResourcesFromEntry-D1MJp13f.mjs} +2 -2
- package/dist/logger/index.mjs +1 -1
- package/dist/{mcpPlugin-B_es0hiF.mjs → mcpPlugin-CpfVpKHE.mjs} +32 -31
- package/dist/{memory-DR6wpa9F.mjs → memory-DsuWnj4T.mjs} +5 -5
- package/dist/{metrics-CUdw_wLB.mjs → metrics-DdQL8syd.mjs} +2 -2
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.mjs +3 -3
- package/dist/{module-0pFJA6YW.mjs → module-Br81am6m.mjs} +1 -1
- package/dist/{multipartBody-wOgj_fnj.mjs → multipartBody-BnkBLN7v.mjs} +3 -3
- package/dist/{openapi-B2L4js1v.mjs → openapi-DIRzvxC0.mjs} +6 -6
- package/dist/outbox-admin/index.d.mts +85 -0
- package/dist/outbox-admin/index.mjs +115 -0
- package/dist/permissions/index.d.mts +2 -2
- package/dist/permissions/index.mjs +6 -6
- package/dist/{permissions-L--QDAir.mjs → permissions-Dl_m0NCe.mjs} +101 -8
- package/dist/{pipe-DRDNsI2T.mjs → pipe-ELHCP3zj.mjs} +3 -5
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{pipeline-UPQFatit.mjs → pipeline-CPA-jx0M.mjs} +17 -15
- package/dist/plugins/index.d.mts +2 -2
- package/dist/plugins/index.mjs +16 -16
- package/dist/plugins/response-cache.mjs +2 -2
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-O0FZgESl.mjs → pluralize-C2ZkKbsn.mjs} +1 -1
- package/dist/{preloadResources-Dz6BjzM6.mjs → preloadResources-CDs87fTw.mjs} +1 -1
- package/dist/{preloadResources-CyoJMSiO.d.mts → preloadResources-T1hmlTEZ.d.mts} +2 -2
- package/dist/presets/filesUpload.mjs +6 -6
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.mjs +3 -3
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-C4-g4_4P.mjs → presets-Dntd_pUO.mjs} +6 -5
- package/dist/{projection-BHw6xlOQ.mjs → projection-CjHhM5W1.mjs} +2 -2
- package/dist/{queryCachePlugin-BZr8v46E.mjs → queryCachePlugin-Dhps-Ldt.mjs} +6 -6
- package/dist/{rateLimit-CMPY5Qms.mjs → rateLimit-C7mmAGs3.mjs} +2 -2
- package/dist/{rateLimitKey-Dn5JNmkj.mjs → rateLimitKey-CccEFBfk.mjs} +1 -1
- package/dist/{realtime-C5NoxWFY.mjs → realtime-DVvVZZFz.mjs} +10 -10
- package/dist/{registerRoute-CBN84fc7.mjs → registerRoute-B_QrjYZS.mjs} +10 -8
- package/dist/registry/index.d.mts +1 -1
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-4213U4zb.mjs → registry-DqUmzA9W.mjs} +2 -2
- package/dist/{renewingLease-Dll8mGgc.mjs → renewingLease-BpP9wwj7.mjs} +1 -1
- package/dist/{replyHelpers-DIiZKGUt.mjs → replyHelpers-DS-P0b32.mjs} +2 -2
- package/dist/{repositoryFilter-f9eAfq_l.mjs → repositoryFilter-DotlxG3L.mjs} +1 -1
- package/dist/{requestContext-2TxXOJ7T.mjs → requestContext-B6vQF-sy.mjs} +1 -1
- package/dist/{rolldown-runtime-CUsjNX9R.mjs → rolldown-runtime-BhflRrBs.mjs} +1 -1
- package/dist/{schedules-DdtlICTf.mjs → schedules-C2Q3uv2d.mjs} +3 -3
- package/dist/{schemaConverter-D--wdJM-.mjs → schemaConverter-Crjvczi_.mjs} +1 -1
- package/dist/{schemaIR-Bm2enbnh.mjs → schemaIR-CnyKK_1j.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-DHx5Fous.mjs → scope-afz_Ieek.mjs} +4 -4
- package/dist/{simpleEqualityMatcher-DjQJ7FKA.mjs → simpleEqualityMatcher-C4KiMWUa.mjs} +1 -1
- package/dist/{sse-CUTo9y0X.mjs → sse-B9P4Y-UI.mjs} +7 -6
- package/dist/{sseStream-B_5XcVVd.mjs → sseStream-B3zb_d1h.mjs} +2 -2
- package/dist/{store-helpers-D1MP_gRG.mjs → store-helpers-DmEMHlPQ.mjs} +1 -1
- package/dist/{streaming-PSZwi8JV.mjs → streaming-DPZdQmDz.mjs} +1 -1
- package/dist/{subscribe-helpers-C0Tb2aUp.mjs → subscribe-helpers-sp5xTDVA.mjs} +2 -2
- package/dist/sync/changelog.mjs +1 -1
- package/dist/testing/cleanupStoreContract.mjs +10 -6
- package/dist/testing/index.d.mts +31 -4
- package/dist/testing/index.mjs +97 -39
- package/dist/testing/outboxStoreContract.d.mts +11 -2
- package/dist/testing/outboxStoreContract.mjs +110 -21
- package/dist/testing/storageContract.mjs +11 -6
- package/dist/{transactionContext-dAfBVUrk.mjs → transactionContext-BvLKvOIL.mjs} +1 -1
- package/dist/{typeGuards-B0ryPo3I.mjs → typeGuards-B_5-hKjJ.mjs} +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-CBgvkp8O.d.mts → types-CT5vu6M0.d.mts} +87 -11
- package/dist/{types-Cys0ko9Z.mjs → types-DXYX7dIR.mjs} +4 -4
- package/dist/usage/index.mjs +0 -0
- package/dist/{userHelpers-ChYJ6CdK.mjs → userHelpers-BNsOXzOd.mjs} +1 -1
- package/dist/utils/index.mjs +10 -10
- package/dist/{utils-vL8BrDE2.mjs → utils-BtOha_Sp.mjs} +3 -3
- package/dist/{validate-_KbifpHF.mjs → validate-PMCPR9El.mjs} +2 -2
- package/dist/{versioning-CHDTor3P.mjs → versioning-CKv2jz_U.mjs} +4 -4
- package/package.json +23 -13
- package/dist/fastify-augmentation-zh0_AYHa.d.mts +0 -85
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { f as createError, i as NotFoundError, r as ForbiddenError } from "../errors-
|
|
3
|
-
import { a as promoteStreamTokenToHeader, n as forwardedStreamHeaders } from "../streaming-
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { f as createError, i as NotFoundError, r as ForbiddenError } from "../errors-Bh1KK5ps.mjs";
|
|
3
|
+
import { a as promoteStreamTokenToHeader, n as forwardedStreamHeaders } from "../streaming-DPZdQmDz.mjs";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
//#region src/integrations/streamline.ts
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import sjson from "secure-json-parse";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
@@ -334,19 +334,21 @@ var MemoryPushRefStore = class {
|
|
|
334
334
|
}
|
|
335
335
|
async claim(args) {
|
|
336
336
|
const existing = this.entries.get(args.pushRef);
|
|
337
|
-
if (existing)
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
337
|
+
if (existing) {
|
|
338
|
+
if (!existing.active && existing.expiresAt <= args.now) this.entries.delete(args.pushRef);
|
|
339
|
+
else {
|
|
340
|
+
if (existing.principal !== args.principal) return { outcome: "rejected" };
|
|
341
|
+
const supersededActive = existing.active === true;
|
|
342
|
+
existing.active = true;
|
|
343
|
+
existing.expiresAt = args.now + args.ttlMs;
|
|
344
|
+
existing.generation = (existing.generation ?? 0) + 1;
|
|
345
|
+
this.entries.set(args.pushRef, existing);
|
|
346
|
+
return {
|
|
347
|
+
outcome: "resumed",
|
|
348
|
+
entry: existing,
|
|
349
|
+
supersededActive
|
|
350
|
+
};
|
|
351
|
+
}
|
|
350
352
|
}
|
|
351
353
|
if (this.entries.size >= args.maxEntries && !this.evictOldestInactive()) return { outcome: "rejected" };
|
|
352
354
|
const fresh = args.mintFresh();
|
|
@@ -1053,9 +1055,7 @@ async function handleConnection(ctx, socket, request) {
|
|
|
1053
1055
|
}));
|
|
1054
1056
|
break;
|
|
1055
1057
|
}
|
|
1056
|
-
default:
|
|
1057
|
-
await options.onMessage?.(client, msg);
|
|
1058
|
-
break;
|
|
1058
|
+
default: await options.onMessage?.(client, msg);
|
|
1059
1059
|
}
|
|
1060
1060
|
});
|
|
1061
1061
|
socket.on("close", async () => {
|
|
@@ -1137,10 +1137,12 @@ function registerStatsRoute(fastify, rooms, path, expose) {
|
|
|
1137
1137
|
fastify.get(`${path}/stats`, async () => rooms.getStats());
|
|
1138
1138
|
return;
|
|
1139
1139
|
}
|
|
1140
|
-
if (expose === "authenticated")
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1140
|
+
if (expose === "authenticated") {
|
|
1141
|
+
if (fastify.hasDecorator("authenticate")) {
|
|
1142
|
+
const authenticate = fastify.authenticate;
|
|
1143
|
+
fastify.get(`${path}/stats`, { preHandler: authenticate }, async () => rooms.getStats());
|
|
1144
|
+
} else fastify.log.warn("arc-websocket: exposeStats is \"authenticated\" but fastify.authenticate is not registered — stats endpoint skipped");
|
|
1145
|
+
}
|
|
1144
1146
|
}
|
|
1145
1147
|
//#endregion
|
|
1146
1148
|
//#region src/integrations/websocket/outbound-truncate.ts
|
|
@@ -1164,7 +1166,7 @@ function registerStatsRoute(fastify, rooms, path, expose) {
|
|
|
1164
1166
|
* instance, eliminating module state.
|
|
1165
1167
|
*/
|
|
1166
1168
|
/** 5 MiB default — same as n8n's `relayViaPubSub` ceiling. */
|
|
1167
|
-
const DEFAULT_MAX_OUTBOUND_BYTES =
|
|
1169
|
+
const DEFAULT_MAX_OUTBOUND_BYTES = 5242880;
|
|
1168
1170
|
/**
|
|
1169
1171
|
* Returns either the original payload (when within `max`) or a
|
|
1170
1172
|
* placeholder JSON string (when oversize). The placeholder carries the
|
|
@@ -1207,7 +1209,7 @@ function createTruncator(max = DEFAULT_MAX_OUTBOUND_BYTES) {
|
|
|
1207
1209
|
* other instances fan out to their local sockets.
|
|
1208
1210
|
*/
|
|
1209
1211
|
/** Drop fan-out to a client whose outbound buffer exceeds this threshold. */
|
|
1210
|
-
const WS_BACKPRESSURE_LIMIT =
|
|
1212
|
+
const WS_BACKPRESSURE_LIMIT = 262144;
|
|
1211
1213
|
var RoomManager = class {
|
|
1212
1214
|
rooms = /* @__PURE__ */ new Map();
|
|
1213
1215
|
clients = /* @__PURE__ */ new Map();
|
|
@@ -1426,18 +1428,19 @@ var RoomManager = class {
|
|
|
1426
1428
|
if (client.socket.readyState !== 1) return false;
|
|
1427
1429
|
const queue = client.queue;
|
|
1428
1430
|
if (queue) {
|
|
1429
|
-
if (cls === "critical")
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1431
|
+
if (cls === "critical") {
|
|
1432
|
+
if (client.envelope) try {
|
|
1433
|
+
const parsed = JSON.parse(message);
|
|
1434
|
+
queue.send(client.envelope.wrap(parsed));
|
|
1435
|
+
if (this.registry) safeAsync(this.registry.persist(client.pushRef, client.generation), this.logger, "registry.persist", {
|
|
1436
|
+
pushRef: client.pushRef,
|
|
1437
|
+
generation: client.generation
|
|
1438
|
+
});
|
|
1439
|
+
} catch {
|
|
1440
|
+
queue.send(message);
|
|
1441
|
+
}
|
|
1442
|
+
else queue.send(message);
|
|
1443
|
+
} else queue.sendRealtime(message, coalesceKey);
|
|
1441
1444
|
return true;
|
|
1442
1445
|
}
|
|
1443
1446
|
if ((client.socket.bufferedAmount ?? 0) > WS_BACKPRESSURE_LIMIT) return false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ArcError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ArcError } from "./errors-Bh1KK5ps.mjs";
|
|
3
3
|
import sjson from "secure-json-parse";
|
|
4
4
|
//#region src/utils/jsonBody.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-BhflRrBs.mjs";
|
|
3
3
|
import { arcLog } from "./logger/index.mjs";
|
|
4
4
|
import { readdir } from "node:fs/promises";
|
|
5
5
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -61,7 +61,8 @@ var loadResources_exports = /* @__PURE__ */ __exportAll({ loadResources: () => l
|
|
|
61
61
|
*/
|
|
62
62
|
async function loadResources(dir, options = {}) {
|
|
63
63
|
const { suffix = ".resource", recursive = true, exclude, include, filter } = options;
|
|
64
|
-
const
|
|
64
|
+
const resolvedDir = dir.startsWith("file://") ? dirname(fileURLToPath(dir)) : dir;
|
|
65
|
+
const absDir = resolve(resolvedDir);
|
|
65
66
|
const discovered = await collectFiles(absDir, new RegExp(`${escapeRegex(suffix)}\\.(ts|js|mts|mjs)$`), recursive);
|
|
66
67
|
discovered.sort();
|
|
67
68
|
const files = filter ? discovered.filter((f) => filter(f)) : discovered;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ResourceRegistry } from "./ResourceRegistry-
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ResourceRegistry } from "./ResourceRegistry-BVr7PgA0.mjs";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
//#region src/cli/utils/loadResourcesFromEntry.ts
|
package/dist/logger/index.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as evaluatePermissionDecision } from "./authorizationDecision-
|
|
3
|
-
import { p as isArcError, t as ArcError } from "./errors-
|
|
4
|
-
import { n as requireSingleHeaderValue } from "./headers-
|
|
5
|
-
import { b as isElevated, c as getOrgId, g as getUserId, x as isMember } from "./types-
|
|
6
|
-
import { t as BaseController } from "./BaseController-
|
|
7
|
-
import { i as resolveEffectiveRoles, t as applyFieldReadPermissions } from "./fields-
|
|
8
|
-
import { t as executePipeline } from "./pipe-
|
|
9
|
-
import { t as buildRequestScopeProjection } from "./projection-
|
|
10
|
-
import { r as resolvePipelineSteps } from "./pipeline-
|
|
11
|
-
import { n as validateAggregations } from "./validate-
|
|
12
|
-
import { n as executeAggregation } from "./buildHandler-
|
|
13
|
-
import { t as pluralize } from "./pluralize-
|
|
14
|
-
import { t as resolveActionPermission } from "./actionPermissions-
|
|
15
|
-
import { t as createIdempotencyResult } from "./interface-
|
|
16
|
-
import { r as shouldRejectAdditionalProperties, t as normalizeSchemaIR } from "./schemaIR-
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as evaluatePermissionDecision } from "./authorizationDecision-__T3EJDA.mjs";
|
|
3
|
+
import { p as isArcError, t as ArcError } from "./errors-Bh1KK5ps.mjs";
|
|
4
|
+
import { n as requireSingleHeaderValue } from "./headers-BXjQYbeC.mjs";
|
|
5
|
+
import { b as isElevated, c as getOrgId, g as getUserId, x as isMember } from "./types-DXYX7dIR.mjs";
|
|
6
|
+
import { t as BaseController } from "./BaseController-Dk34dxhI.mjs";
|
|
7
|
+
import { i as resolveEffectiveRoles, t as applyFieldReadPermissions } from "./fields-DEi65pGj.mjs";
|
|
8
|
+
import { t as executePipeline } from "./pipe-ELHCP3zj.mjs";
|
|
9
|
+
import { t as buildRequestScopeProjection } from "./projection-CjHhM5W1.mjs";
|
|
10
|
+
import { r as resolvePipelineSteps } from "./pipeline-CPA-jx0M.mjs";
|
|
11
|
+
import { n as validateAggregations } from "./validate-PMCPR9El.mjs";
|
|
12
|
+
import { n as executeAggregation } from "./buildHandler-Dn7rzUJo.mjs";
|
|
13
|
+
import { t as pluralize } from "./pluralize-C2ZkKbsn.mjs";
|
|
14
|
+
import { t as resolveActionPermission } from "./actionPermissions-Dti7ebyv.mjs";
|
|
15
|
+
import { t as createIdempotencyResult } from "./interface-BP4IJCBO.mjs";
|
|
16
|
+
import { r as shouldRejectAdditionalProperties, t as normalizeSchemaIR } from "./schemaIR-CnyKK_1j.mjs";
|
|
17
17
|
import { isHttpError, toErrorContract } from "@classytic/repo-core/errors";
|
|
18
18
|
import { createHash, randomUUID } from "node:crypto";
|
|
19
19
|
import fp from "fastify-plugin";
|
|
@@ -367,12 +367,13 @@ function buildScope(auth) {
|
|
|
367
367
|
*/
|
|
368
368
|
async function evaluatePermission(check, session, resource, action, input) {
|
|
369
369
|
if (!check) return null;
|
|
370
|
+
const user = session ? {
|
|
371
|
+
id: session.userId,
|
|
372
|
+
_id: session.userId,
|
|
373
|
+
...session
|
|
374
|
+
} : null;
|
|
370
375
|
return evaluatePermissionDecision(check, {
|
|
371
|
-
user
|
|
372
|
-
id: session.userId,
|
|
373
|
-
_id: session.userId,
|
|
374
|
-
...session
|
|
375
|
-
} : null,
|
|
376
|
+
user,
|
|
376
377
|
scope: buildScope(session),
|
|
377
378
|
resource,
|
|
378
379
|
action,
|
|
@@ -465,13 +466,14 @@ function toCallToolSuccess(value) {
|
|
|
465
466
|
*/
|
|
466
467
|
function toCallToolError(input) {
|
|
467
468
|
let contract;
|
|
468
|
-
if (input instanceof Error)
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
469
|
+
if (input instanceof Error) {
|
|
470
|
+
if (isArcError(input) || isHttpError(input)) contract = toErrorContract(input);
|
|
471
|
+
else contract = {
|
|
472
|
+
code: "arc.internal_error",
|
|
473
|
+
message: input.message || "Internal Server Error",
|
|
474
|
+
status: 500
|
|
475
|
+
};
|
|
476
|
+
} else contract = {
|
|
475
477
|
code: input.code,
|
|
476
478
|
message: input.message,
|
|
477
479
|
...input.status !== void 0 ? { status: input.status } : {},
|
|
@@ -588,7 +590,7 @@ function invocationFingerprint(resourceName, actionName, input, session) {
|
|
|
588
590
|
return `mcp:${resourceName}:${actionName}:${createHash("sha256").update(JSON.stringify(sortKeys(input))).digest("hex").substring(0, 16)}:u=${session?.userId ?? session?.clientId ?? "anon"}`;
|
|
589
591
|
}
|
|
590
592
|
/** TTLs matching the HTTP idempotency plugin's defaults. */
|
|
591
|
-
const MCP_IDEMPOTENCY_TTL_MS =
|
|
593
|
+
const MCP_IDEMPOTENCY_TTL_MS = 864e5;
|
|
592
594
|
const MCP_IDEMPOTENCY_LOCK_MS = 1e4;
|
|
593
595
|
/**
|
|
594
596
|
* Invoke a controller method through the MCP synthetic-context path.
|
|
@@ -1434,7 +1436,6 @@ function jsonSchemaPropertyToZod(prop) {
|
|
|
1434
1436
|
case "array": return applyDescription(arrayToZod(prop), prop);
|
|
1435
1437
|
case "object": return applyDescription(objectToZod(prop), prop);
|
|
1436
1438
|
case "null": continue;
|
|
1437
|
-
default: break;
|
|
1438
1439
|
}
|
|
1439
1440
|
return applyDescription(z.unknown(), prop);
|
|
1440
1441
|
}
|
|
@@ -2061,7 +2062,7 @@ function getOps(r, override) {
|
|
|
2061
2062
|
}
|
|
2062
2063
|
//#endregion
|
|
2063
2064
|
//#region src/integrations/mcp/sessionCache.ts
|
|
2064
|
-
const DEFAULT_TTL_MS =
|
|
2065
|
+
const DEFAULT_TTL_MS = 18e5;
|
|
2065
2066
|
const DEFAULT_MAX_SESSIONS = 1e3;
|
|
2066
2067
|
var McpSessionCache = class {
|
|
2067
2068
|
sessions = /* @__PURE__ */ new Map();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-BhflRrBs.mjs";
|
|
3
3
|
//#region src/cache/memory.ts
|
|
4
4
|
var memory_exports = /* @__PURE__ */ __exportAll({ MemoryCacheStore: () => MemoryCacheStore });
|
|
5
5
|
/**
|
|
@@ -26,11 +26,11 @@ var MemoryCacheStore = class {
|
|
|
26
26
|
constructor(options = {}) {
|
|
27
27
|
this.defaultTtlSeconds = options.defaultTtlSeconds ?? 60;
|
|
28
28
|
this.maxEntries = clamp(options.maxEntries ?? 1e3, 1, 1e5);
|
|
29
|
-
this.maxEntryBytes = clamp(options.maxEntryBytes ??
|
|
30
|
-
this.maxMemoryBytes = options.maxMemoryBytes ??
|
|
29
|
+
this.maxEntryBytes = clamp(options.maxEntryBytes ?? 262144, 1024, 10485760);
|
|
30
|
+
this.maxMemoryBytes = options.maxMemoryBytes ?? 52428800;
|
|
31
31
|
this.evictionWatermark = clamp(options.evictionWatermark ?? .9, .5, 1);
|
|
32
32
|
this.logger = options.logger ?? console;
|
|
33
|
-
const cleanupIntervalMs = clamp(options.cleanupIntervalMs ?? 3e4, 1e3,
|
|
33
|
+
const cleanupIntervalMs = clamp(options.cleanupIntervalMs ?? 3e4, 1e3, 6e5);
|
|
34
34
|
this.cleanupTimer = setInterval(() => this.cleanupExpired(), cleanupIntervalMs);
|
|
35
35
|
if (this.cleanupTimer.unref) this.cleanupTimer.unref();
|
|
36
36
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-BhflRrBs.mjs";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
//#region src/plugins/metrics.ts
|
|
5
5
|
var metrics_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CRUD_OPERATIONS } from "../constants-
|
|
3
|
-
import { t as multipartBody } from "../multipartBody-
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "../constants-J99LGTJI.mjs";
|
|
3
|
+
import { t as multipartBody } from "../multipartBody-BnkBLN7v.mjs";
|
|
4
4
|
//#region src/middleware/middleware.ts
|
|
5
5
|
/**
|
|
6
6
|
* Named Middleware — Priority-based, conditional middleware execution.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as startRenewingLease } from "../renewingLease-
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as startRenewingLease } from "../renewingLease-BpP9wwj7.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/migrations/index.ts
|
|
5
5
|
/**
|
|
@@ -88,7 +88,7 @@ var MongoMigrationStore = class {
|
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
90
|
const MIGRATION_LOCK_NAME = "arc:migrations";
|
|
91
|
-
const DEFAULT_LOCK_LEASE_MS =
|
|
91
|
+
const DEFAULT_LOCK_LEASE_MS = 6e5;
|
|
92
92
|
/**
|
|
93
93
|
* Source checksum for drift detection — SHA-256 over the migration's
|
|
94
94
|
* `up`/`down` source. Stable for a given build; a transpile-target change
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
2
|
import sjson from "secure-json-parse";
|
|
3
3
|
//#region src/middleware/multipartBody.ts
|
|
4
|
-
const DEFAULT_MAX_FILE_SIZE =
|
|
4
|
+
const DEFAULT_MAX_FILE_SIZE = 10485760;
|
|
5
5
|
const DEFAULT_MAX_FILES = 5;
|
|
6
|
-
const DEFAULT_MAX_TOTAL_BYTES =
|
|
6
|
+
const DEFAULT_MAX_TOTAL_BYTES = 26214400;
|
|
7
7
|
const DEFAULT_FILES_KEY = "_files";
|
|
8
8
|
/**
|
|
9
9
|
* Build a matcher for MIME allow-lists that supports exact (e.g. `image/png`),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
3
|
-
import { n as convertRouteSchema } from "./schemaConverter-
|
|
4
|
-
import { t as pluralize } from "./pluralize-
|
|
5
|
-
import { t as resolveActionPermission } from "./actionPermissions-
|
|
6
|
-
import { t as buildActionBodySchema } from "./createActionRouter-
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as getUserRoles } from "./userHelpers-BNsOXzOd.mjs";
|
|
3
|
+
import { n as convertRouteSchema } from "./schemaConverter-Crjvczi_.mjs";
|
|
4
|
+
import { t as pluralize } from "./pluralize-C2ZkKbsn.mjs";
|
|
5
|
+
import { t as resolveActionPermission } from "./actionPermissions-Dti7ebyv.mjs";
|
|
6
|
+
import { t as buildActionBodySchema } from "./createActionRouter-DkJZWo0m.mjs";
|
|
7
7
|
import fp from "fastify-plugin";
|
|
8
8
|
//#region src/docs/openapi/canonical-schemas.ts
|
|
9
9
|
/**
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
|
|
2
|
+
import { r as PermissionCheck } from "../types-B7XeLEgK.mjs";
|
|
3
|
+
import { t as ArcModule } from "../types-CT5vu6M0.mjs";
|
|
4
|
+
import { OutboxStore } from "@classytic/primitives/outbox";
|
|
5
|
+
//#region src/outbox-admin/module.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* A store that can answer an operator's questions.
|
|
8
|
+
*
|
|
9
|
+
* Only the four reads this surface actually performs are required — `fail` and
|
|
10
|
+
* `purge` belong to the relay and retention, not here.
|
|
11
|
+
*/
|
|
12
|
+
type OutboxAdminStore = OutboxStore & Required<Pick<OutboxStore, "getDeadLettered" | "requeue" | "countByStatus" | "oldestPendingAgeMs">>;
|
|
13
|
+
interface OutboxAdminPermissions {
|
|
14
|
+
/**
|
|
15
|
+
* Reading health and the dead-letter list.
|
|
16
|
+
*
|
|
17
|
+
* MUST be platform-only — see `allowUnverifiedOperatorPermission`.
|
|
18
|
+
*/
|
|
19
|
+
view: PermissionCheck;
|
|
20
|
+
/**
|
|
21
|
+
* Replaying a dead-lettered event. Defaults to `view` when omitted — but
|
|
22
|
+
* replay RE-DELIVERS an event that already failed five times, so a
|
|
23
|
+
* deployment that separates read access from operational action should gate
|
|
24
|
+
* it distinctly. Also platform-only.
|
|
25
|
+
*/
|
|
26
|
+
replay?: PermissionCheck;
|
|
27
|
+
}
|
|
28
|
+
interface OutboxAdminModuleDeps {
|
|
29
|
+
store: OutboxAdminStore;
|
|
30
|
+
permissions: OutboxAdminPermissions;
|
|
31
|
+
/** Route prefix. Default `/admin/outbox`. */
|
|
32
|
+
prefix?: string;
|
|
33
|
+
/** Module name. Default `outbox-admin`. */
|
|
34
|
+
moduleName?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Name the outbox module was composed under, used to resolve the relay and
|
|
37
|
+
* declared as a `dependsOn` edge. Default `outbox`.
|
|
38
|
+
*/
|
|
39
|
+
outboxModuleName?: string;
|
|
40
|
+
/** Resource names this module supersedes. */
|
|
41
|
+
owns?: readonly string[];
|
|
42
|
+
/** Cap on `?limit`. Default 500 — a dead-letter list is for triage, not export. */
|
|
43
|
+
maxDeadLetterLimit?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Accept gates arc cannot prove are platform-only.
|
|
46
|
+
*
|
|
47
|
+
* By default both gates must carry `_platformOnly` (i.e. come from
|
|
48
|
+
* `requirePlatformRole`), and boot FAILS otherwise. The reason is the same
|
|
49
|
+
* one that hardened `integrations/jobs` in 2.31: these routes are global by
|
|
50
|
+
* construction. `getDeadLettered(limit)` takes no filter and an outbox row
|
|
51
|
+
* carries no tenant identity, so there is nothing to scope by. A gate that
|
|
52
|
+
* grants per organization therefore READS as scoped while serving everyone —
|
|
53
|
+
* `requireOrgRole('manager')` would let org A's manager read org B's failed
|
|
54
|
+
* events. Neither returns a policy, so no per-request check can tell a real
|
|
55
|
+
* operator gate from an org one.
|
|
56
|
+
*
|
|
57
|
+
* Set this only for a custom check you have verified consults platform
|
|
58
|
+
* identity alone.
|
|
59
|
+
*/
|
|
60
|
+
allowUnverifiedOperatorPermission?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Include each dead-lettered event's domain PAYLOAD in the listing.
|
|
63
|
+
* Default `false`.
|
|
64
|
+
*
|
|
65
|
+
* The payload is the original event body — in an ERP that is order totals,
|
|
66
|
+
* customer records and payment references. Triage needs the id, the event
|
|
67
|
+
* name, the attempt count and why it failed; it does not need the contents.
|
|
68
|
+
* Opt in only where the surface is genuinely platform-operator-only and you
|
|
69
|
+
* accept that the response carries business data.
|
|
70
|
+
*/
|
|
71
|
+
exposePayload?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Include the failure STACK TRACE alongside the error message.
|
|
74
|
+
* Default `false` — a stack names internal paths and framework versions.
|
|
75
|
+
*/
|
|
76
|
+
exposeStack?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Pending-event age (ms) past which the outbox reports unhealthy even with an
|
|
79
|
+
* empty dead-letter queue. Default 5 minutes.
|
|
80
|
+
*/
|
|
81
|
+
relayLagUnhealthyMs?: number;
|
|
82
|
+
}
|
|
83
|
+
declare function createOutboxAdminModule(deps: OutboxAdminModuleDeps): ArcModule<void>;
|
|
84
|
+
//#endregion
|
|
85
|
+
export { type OutboxAdminModuleDeps, type OutboxAdminPermissions, type OutboxAdminStore, createOutboxAdminModule };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { i as NotFoundError, u as ValidationError } from "../errors-Bh1KK5ps.mjs";
|
|
3
|
+
import { t as defineResource } from "../defineResource-XFPPUu2c.mjs";
|
|
4
|
+
import { n as getModuleExports, t as defineModule } from "../module-Br81am6m.mjs";
|
|
5
|
+
//#region src/outbox-admin/module.ts
|
|
6
|
+
/**
|
|
7
|
+
* Strip the domain payload and the stack unless explicitly opted in.
|
|
8
|
+
*
|
|
9
|
+
* Triage is answered by WHICH event failed, HOW MANY times, WHEN and WHY. The
|
|
10
|
+
* payload answers none of those and carries the business record; the stack
|
|
11
|
+
* names internal paths. Both are off by default, on the same reasoning that
|
|
12
|
+
* made `exposeResult` / `exposeFailureReason` opt-in for jobs.
|
|
13
|
+
*/
|
|
14
|
+
function redactDeadLettered(e, opts) {
|
|
15
|
+
return {
|
|
16
|
+
event: {
|
|
17
|
+
type: e.event.type,
|
|
18
|
+
meta: e.event.meta,
|
|
19
|
+
...opts.exposePayload ? { payload: e.event.payload } : {}
|
|
20
|
+
},
|
|
21
|
+
error: {
|
|
22
|
+
message: e.error.message,
|
|
23
|
+
...e.error.code !== void 0 ? { code: e.error.code } : {},
|
|
24
|
+
...opts.exposeStack && e.error.stack !== void 0 ? { stack: e.error.stack } : {}
|
|
25
|
+
},
|
|
26
|
+
attempts: e.attempts,
|
|
27
|
+
firstFailedAt: e.firstFailedAt,
|
|
28
|
+
lastFailedAt: e.lastFailedAt,
|
|
29
|
+
...e.handlerName !== void 0 ? { handlerName: e.handlerName } : {}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function createOutboxAdminModule(deps) {
|
|
33
|
+
const moduleName = deps.moduleName ?? "outbox-admin";
|
|
34
|
+
const outboxModuleName = deps.outboxModuleName ?? "outbox";
|
|
35
|
+
const maxLimit = deps.maxDeadLetterLimit ?? 500;
|
|
36
|
+
const view = deps.permissions.view;
|
|
37
|
+
const replay = deps.permissions.replay ?? deps.permissions.view;
|
|
38
|
+
const lagUnhealthyMs = deps.relayLagUnhealthyMs ?? 3e5;
|
|
39
|
+
if (!deps.allowUnverifiedOperatorPermission) {
|
|
40
|
+
for (const [label, gate] of [["view", view], ["replay", replay]]) if (!gate._platformOnly) throw new Error(`[arc/outbox-admin] permissions.${label} must be platform-only. These routes are global (an outbox row carries no tenant identity and getDeadLettered takes no filter), so an org-role gate would let a member of one organization read another's failed events and their payloads. Use requirePlatformRole('platform-ops') — or requireRoles([...], { includeOrgRoles: false }) with allowUnverifiedOperatorPermission: true if you have verified the check yourself.`);
|
|
41
|
+
}
|
|
42
|
+
const resource = defineResource({
|
|
43
|
+
name: moduleName,
|
|
44
|
+
displayName: "Outbox Admin",
|
|
45
|
+
tag: "Operations",
|
|
46
|
+
prefix: deps.prefix ?? "/admin/outbox",
|
|
47
|
+
customRoutesOnly: true,
|
|
48
|
+
routes: [
|
|
49
|
+
{
|
|
50
|
+
method: "GET",
|
|
51
|
+
path: "/health",
|
|
52
|
+
summary: "Outbox health — pending, dead-letter and relay lag",
|
|
53
|
+
permissions: view,
|
|
54
|
+
rawHandler: async (_req, reply) => {
|
|
55
|
+
const [pending, deadLetter, relayLagMs] = await Promise.all([
|
|
56
|
+
deps.store.countByStatus("pending"),
|
|
57
|
+
deps.store.countByStatus("dead_letter"),
|
|
58
|
+
deps.store.oldestPendingAgeMs()
|
|
59
|
+
]);
|
|
60
|
+
const healthy = deadLetter === 0 && (relayLagMs === null || relayLagMs < lagUnhealthyMs);
|
|
61
|
+
return reply.send({
|
|
62
|
+
pending,
|
|
63
|
+
deadLetter,
|
|
64
|
+
relayLagMs,
|
|
65
|
+
healthy
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
method: "GET",
|
|
71
|
+
path: "/dead-letter",
|
|
72
|
+
summary: "List dead-lettered events with their errors",
|
|
73
|
+
permissions: view,
|
|
74
|
+
rawHandler: async (req, reply) => {
|
|
75
|
+
const raw = req.query?.limit;
|
|
76
|
+
const parsed = Number(raw ?? 100);
|
|
77
|
+
const limit = Math.min(Math.max(Number.isFinite(parsed) ? parsed : 100, 1), maxLimit);
|
|
78
|
+
const events = await deps.store.getDeadLettered(limit);
|
|
79
|
+
return reply.send({
|
|
80
|
+
count: events.length,
|
|
81
|
+
limit,
|
|
82
|
+
events: events.map((e) => redactDeadLettered(e, deps))
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
method: "POST",
|
|
88
|
+
path: "/dead-letter/:id/replay",
|
|
89
|
+
summary: "Requeue a dead-lettered event and drain the relay",
|
|
90
|
+
permissions: replay,
|
|
91
|
+
rawHandler: async (req, reply) => {
|
|
92
|
+
const eventId = req.params?.id;
|
|
93
|
+
if (!eventId) throw new ValidationError("event id is required");
|
|
94
|
+
if (!await deps.store.requeue(eventId)) throw new NotFoundError(`Dead-lettered event "${eventId}" — not found, or not currently dead-lettered`);
|
|
95
|
+
const { relay } = getModuleExports(req.server, outboxModuleName);
|
|
96
|
+
const relayDelivered = await relay.relay();
|
|
97
|
+
return reply.send({
|
|
98
|
+
eventId,
|
|
99
|
+
requeued: true,
|
|
100
|
+
relayDelivered,
|
|
101
|
+
note: "relayDelivered counts the entire drained batch, not this event alone"
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
});
|
|
107
|
+
return defineModule({
|
|
108
|
+
name: moduleName,
|
|
109
|
+
dependsOn: [outboxModuleName],
|
|
110
|
+
...deps.owns ? { owns: [...deps.owns] } : {},
|
|
111
|
+
resources: () => [resource]
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
115
|
+
export { createOutboxAdminModule };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import { a as UserBase, c as normalizeRoles, i as PermissionContext, n as DataPolicy, r as PermissionCheck, s as getUserRoles, t as AuthorizationDecision } from "../types-B7XeLEgK.mjs";
|
|
3
3
|
import { a as applyFieldWritePermissions, i as applyFieldReadPermissions, n as FieldPermissionMap, o as fields, r as FieldPermissionType, s as resolveEffectiveRoles, t as FieldPermission } from "../fields-I_EeRWND.mjs";
|
|
4
|
-
import { $ as
|
|
5
|
-
export { type AccessExplanation, type AuthorizationDecision, type ConnectEventsOptions, type DataPolicy, type DynamicPermissionMatrix, type DynamicPermissionMatrixConfig, type FieldPermission, type FieldPermissionMap, type FieldPermissionType, GRANT_MODES, type GrantMode, type GrantResolution, type PermissionCheck, type PermissionCheckReturn, type PermissionContext, type PermissionEventBus, type PermissionRequirement, type RequireAgentScopeOptions, type RequireGrantOptions, type RequireMandateOptions, type RoleHierarchy, type UserBase, adminOnly, allOf, allow, allowPublic, anyOf, applyAuthorizationDecision, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, collectPublicSurface, conjoinPolicyFilters, createDynamicPermissionMatrix, createOrgPermissions, createRoleHierarchy, deny, denyAll, describePermission, describePermissionMap, evaluatePermissionDecision, explainAccess, fields, fullPublic, getUserRoles, modeSatisfies, normalizeRoles, normalizeToDecision, not, ownerWithAdminBypass, permissionMatrix, presets_d_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAgentScope, requireAuth, requireDPoP, requireGrant, requireMandate, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requirePlatformRole, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, resolveEffectiveRoles, roles, scopeOf, when };
|
|
4
|
+
import { $ as requireAuth, A as RequireGrantOptions, B as ConnectEventsOptions, C as requireServiceScope, D as GRANT_MODES, E as createRoleHierarchy, F as PermissionRequirement, G as createOrgPermissions, H as DynamicPermissionMatrixConfig, I as collectPublicSurface, J as allowPublic, K as allOf, L as describePermission, M as requireGrant, N as conjoinPolicyFilters, O as GrantMode, P as AccessExplanation, Q as not, R as describePermissionMap, S as requireScopeContext, T as RoleHierarchy, U as PermissionEventBus, V as DynamicPermissionMatrix, W as createDynamicPermissionMatrix, X as deny, Y as anyOf, Z as denyAll, _ as publicReadAdminWrite, a as PermissionMatrixRegistry, at as scopeOf, b as requireOrgMembership, c as introspectModule, ct as evaluatePermissionDecision, d as authenticated, dt as RequireMandateOptions, et as requireOwnership, f as fullPublic, ft as requireAgentScope, g as publicRead, h as presets_d_exports, i as PermissionMatrixOptions, it as when, j as modeSatisfies, k as GrantResolution, l as introspectRegistry, lt as normalizeToDecision, m as permissionMatrix, mt as requireMandate, n as PermissionEntryType, nt as requireRoles, o as buildPermissionMatrix, ot as PermissionCheckReturn, p as ownerWithAdminBypass, pt as requireDPoP, q as allow, r as PermissionMatrix, rt as roles, s as introspectCheck, st as applyAuthorizationDecision, t as PermissionEntry, tt as requirePlatformRole, u as adminOnly, ut as RequireAgentScopeOptions, v as readOnly, w as requireTeamMembership, x as requireOrgRole, y as requireOrgInScope, z as explainAccess } from "../index-zq6VrjaB.mjs";
|
|
5
|
+
export { type AccessExplanation, type AuthorizationDecision, type ConnectEventsOptions, type DataPolicy, type DynamicPermissionMatrix, type DynamicPermissionMatrixConfig, type FieldPermission, type FieldPermissionMap, type FieldPermissionType, GRANT_MODES, type GrantMode, type GrantResolution, type PermissionCheck, type PermissionCheckReturn, type PermissionContext, type PermissionEntry, type PermissionEntryType, type PermissionEventBus, type PermissionMatrix, type PermissionMatrixOptions, type PermissionMatrixRegistry, type PermissionRequirement, type RequireAgentScopeOptions, type RequireGrantOptions, type RequireMandateOptions, type RoleHierarchy, type UserBase, adminOnly, allOf, allow, allowPublic, anyOf, applyAuthorizationDecision, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, buildPermissionMatrix, collectPublicSurface, conjoinPolicyFilters, createDynamicPermissionMatrix, createOrgPermissions, createRoleHierarchy, deny, denyAll, describePermission, describePermissionMap, evaluatePermissionDecision, explainAccess, fields, fullPublic, getUserRoles, introspectCheck, introspectModule, introspectRegistry, modeSatisfies, normalizeRoles, normalizeToDecision, not, ownerWithAdminBypass, permissionMatrix, presets_d_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAgentScope, requireAuth, requireDPoP, requireGrant, requireMandate, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requirePlatformRole, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, resolveEffectiveRoles, roles, scopeOf, when };
|