@classytic/arc 2.37.1 → 2.38.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-Chkf0Aiw.mjs → BaseController-CYaDvmOB.mjs} +11 -11
- package/dist/{EventTransport-BEVP50ka.d.mts → EventTransport-Cx60_s-6.d.mts} +37 -0
- package/dist/{EventTransport-CFdtK25P.mjs → EventTransport-Gq7JWbWw.mjs} +39 -7
- package/dist/{HookSystem-Csy31WS-.mjs → HookSystem-C0ikzqQf.mjs} +2 -2
- package/dist/{ResourceRegistry-OQA13slI.mjs → ResourceRegistry-DPcX--zk.mjs} +2 -2
- package/dist/{actionPermissions-DGGqqSIV.mjs → actionPermissions-jlFZ1it4.mjs} +6 -6
- package/dist/audit/index.d.mts +1 -1
- package/dist/audit/index.mjs +2 -2
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.d.mts +1 -1
- package/dist/auth/index.mjs +6 -6
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-BzZi2bsf.mjs → authorizationDecision-BP8GHtjc.mjs} +2 -2
- package/dist/{buildHandler-CIz0NsGS.mjs → buildHandler-DjXOqIvX.mjs} +4 -4
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-DldVgnC9.mjs → caching-a3ZEcJJs.mjs} +2 -2
- package/dist/cleanup/index.d.mts +2 -2
- package/dist/cleanup/index.mjs +4 -4
- package/dist/cli/commands/describe.d.mts +1 -1
- 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-DDKf25s4.mjs → constants-BONghE1Y.mjs} +1 -1
- package/dist/context/index.mjs +3 -3
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.mjs +7 -7
- package/dist/{core-uHQonaHf.mjs → core-8She7FgF.mjs} +3 -3
- package/dist/{createActionRouter-C22Xn11N.mjs → createActionRouter-Bqi6Bhhx.mjs} +7 -7
- package/dist/{createAggregationRouter-DgyksLHH.mjs → createAggregationRouter-BsYO7ktd.mjs} +7 -7
- package/dist/{defineAggregation-B1m-45Fe.mjs → defineAggregation-0KBvqEEC.mjs} +1 -1
- package/dist/{defineResource-DS3Uj2-8.mjs → defineResource-BMdyRelW.mjs} +18 -18
- package/dist/discovery/index.mjs +1 -1
- package/dist/docs/index.d.mts +1 -1
- package/dist/docs/index.mjs +3 -3
- package/dist/{elevation-9X0lGzTQ.mjs → elevation-C6woysGC.mjs} +4 -4
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-BmEGKyO9.mjs → errorHandler-BdmIWPba.mjs} +3 -3
- package/dist/{errors-CbxCF9M0.mjs → errors-2ExmOgIJ.mjs} +1 -1
- package/dist/{eventPlugin-B47sfCJ8.d.mts → eventPlugin-DFvHa4Nf.d.mts} +10 -1
- package/dist/{eventPlugin-B1ahehZH.mjs → eventPlugin-DJwpGMzx.mjs} +6 -6
- package/dist/events/index.d.mts +4 -4
- package/dist/events/index.mjs +5 -5
- package/dist/events/transports/redis-stream-entry.d.mts +1 -1
- package/dist/events/transports/redis-stream-entry.mjs +1 -1
- package/dist/events/transports/redis.d.mts +1 -1
- package/dist/events/transports/redis.mjs +1 -1
- package/dist/factory/index.d.mts +4 -4
- package/dist/factory/index.mjs +5 -5
- package/dist/{fastify-augmentation-CRsNNhuo.d.mts → fastify-augmentation-jYA2oHyL.d.mts} +3 -3
- package/dist/{fields-f_MdWDl_.mjs → fields-Cha2QCKH.mjs} +37 -2
- package/dist/{generate-DxWn-XnM.mjs → generate-BUP4Oydg.mjs} +2 -2
- package/dist/{headers-DivLPMHe.mjs → headers-DeXNifVj.mjs} +2 -2
- package/dist/{health-W_BjgWf0.mjs → health-Bh0N_FLk.mjs} +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/idempotency/index.mjs +4 -4
- package/dist/idempotency/redis.mjs +1 -1
- package/dist/{index-BqRfP1kT.d.mts → index-B78WZom8.d.mts} +1 -1
- package/dist/{index-CEmPspAB.d.mts → index-BRoDtjek.d.mts} +2 -2
- package/dist/{index-DCxxRwLC.d.mts → index-D2uIUSQk.d.mts} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +11 -11
- package/dist/{init-BJ6fdYnp.mjs → init-Dg_Am2o_.mjs} +1 -1
- package/dist/integrations/event-gateway.d.mts +1 -1
- 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 +2 -2
- package/dist/integrations/mcp/index.d.mts +2 -2
- package/dist/integrations/mcp/index.mjs +2 -2
- package/dist/integrations/mcp/testing.d.mts +1 -1
- package/dist/integrations/mcp/testing.mjs +2 -2
- package/dist/integrations/streamline.mjs +3 -3
- package/dist/integrations/webhooks.d.mts +2 -2
- 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 +1 -1
- package/dist/{interface-DeLndJ8G.mjs → interface-DYPVscCU.mjs} +1 -1
- package/dist/{jsonBody-kApktjTc.mjs → jsonBody-DVui0uJl.mjs} +2 -2
- package/dist/{keys-B1MgfDWi.mjs → keys-BSuxGS-B.mjs} +1 -1
- package/dist/{loadResources-ma-Aaxp1.mjs → loadResources-CNd1DWnK.mjs} +2 -2
- package/dist/{loadResourcesFromEntry-xszlyXTs.mjs → loadResourcesFromEntry-DNj8cpiY.mjs} +2 -2
- package/dist/logger/index.mjs +1 -1
- package/dist/{mcpPlugin-97HuFA46.mjs → mcpPlugin-KWsezMx7.mjs} +15 -15
- package/dist/{memory-DvASzOn3.mjs → memory-BiPVaCPg.mjs} +2 -2
- package/dist/{metrics-Dx-nkDE5.mjs → metrics-CsWaIVTa.mjs} +2 -2
- package/dist/middleware/index.d.mts +1 -1
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module-CNKk_twm.mjs → module-BQXHxMEk.mjs} +1 -1
- package/dist/{multipartBody-TDaYOHGZ.mjs → multipartBody-u6VrS_iH.mjs} +1 -1
- package/dist/{openapi-473gZ-8x.mjs → openapi-Dxc8RLy_.mjs} +6 -6
- package/dist/outbox-admin/index.d.mts +1 -1
- package/dist/outbox-admin/index.mjs +4 -4
- package/dist/{outbox-module-BbdaMyqy.d.mts → outbox-module-CQXu_O6o.d.mts} +2 -2
- package/dist/{outbox-module-DOAmyXOb.mjs → outbox-module-DyIqA5vo.mjs} +4 -4
- package/dist/permissions/index.mjs +5 -5
- package/dist/{permissions-DnAc6zoZ.mjs → permissions-H7Zcb82Z.mjs} +6 -6
- package/dist/{pipe-BoV-z4db.mjs → pipe-SunhEaZ6.mjs} +2 -2
- package/dist/pipeline/index.d.mts +1 -1
- package/dist/pipeline/index.mjs +2 -2
- package/dist/plugins/index.d.mts +4 -4
- 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-BiU5ocWw.mjs → pluralize-Da7IT_qJ.mjs} +1 -1
- package/dist/{preloadResources-DHkyk3QN.d.mts → preloadResources-BbBkNkqK.d.mts} +6 -6
- package/dist/{preloadResources-DJ7Lli0a.mjs → preloadResources-DlhH81py.mjs} +21 -21
- package/dist/presets/filesUpload.d.mts +1 -1
- package/dist/presets/filesUpload.mjs +5 -5
- package/dist/presets/index.d.mts +1 -1
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.d.mts +1 -1
- package/dist/presets/multiTenant.mjs +3 -3
- package/dist/presets/search.d.mts +1 -1
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-BMxH-Bb7.mjs → presets-CNyfaxGL.mjs} +4 -4
- package/dist/{projection-CRCM5S9T.mjs → projection-DSfEoooA.mjs} +2 -2
- package/dist/{queryCachePlugin-Cl3zLG7g.mjs → queryCachePlugin-oTsmVyEQ.mjs} +5 -5
- package/dist/{rateLimitKey-D4_rjP1K.mjs → rateLimitKey-CewdR-m6.mjs} +1 -1
- package/dist/{realtime-BWuHi-UI.mjs → realtime-CPmjjgqd.mjs} +9 -9
- package/dist/{redis-stream-mwLWlfHG.d.mts → redis-stream-eh0eOtjh.d.mts} +1 -1
- package/dist/{registerRoute-mvm6zY2H.mjs → registerRoute-XvcI_3sh.mjs} +10 -6
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-3maEt__c.mjs → registry-UFEJQN8R.mjs} +2 -2
- package/dist/{renewingLease-C1-GAUpr.mjs → renewingLease-DuRGVOMe.mjs} +1 -1
- package/dist/{replyHelpers-DVcUoled.mjs → replyHelpers-BHebarf0.mjs} +2 -2
- package/dist/{requestContext-KzIdSmN2.mjs → requestContext-DpmntRZy.mjs} +1 -1
- package/dist/{rolldown-runtime-NVzJrC-o.mjs → rolldown-runtime-Add2L50I.mjs} +1 -1
- package/dist/{runtimeCapabilities-OrGatf7r.mjs → runtimeCapabilities-D793Pxci.mjs} +1 -1
- package/dist/{schedules-DeRI03eo.mjs → schedules-DthM8Qag.mjs} +3 -3
- package/dist/{schemaConverter-cXTayNOW.mjs → schemaConverter-Db-MMsH6.mjs} +1 -1
- package/dist/{schemaIR-Cc9ZPVs2.mjs → schemaIR-CIXShch7.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-C2r7_WGs.mjs → scope-D03sk17n.mjs} +4 -4
- package/dist/{simpleEqualityMatcher-Cr1F8jKZ.mjs → simpleEqualityMatcher-B7qVjQBv.mjs} +1 -1
- package/dist/{sse-BmZCVRGH.mjs → sse-D4MYqkic.mjs} +5 -5
- package/dist/{sseStream-nNPqvOeK.mjs → sseStream-BuMNPR6r.mjs} +2 -2
- package/dist/{store-helpers-C1r3-6M0.mjs → store-helpers-CIF4RG8s.mjs} +1 -1
- package/dist/{streaming-BxZDlH01.mjs → streaming-DkpW1HwJ.mjs} +1 -1
- package/dist/{subscribe-helpers-Dca7Fcz2.mjs → subscribe-helpers-CBZOi6pk.mjs} +2 -2
- package/dist/sync/changelog.mjs +1 -1
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +4 -4
- package/dist/testing/index.mjs +10 -10
- package/dist/testing/outboxStoreContract.mjs +1 -1
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{transactionContext-6F7Gkbxg.mjs → transactionContext-DMmvcfdo.mjs} +1 -1
- package/dist/{typeGuards-BrXgbFi-.mjs → typeGuards-DHTnEs5X.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-BMa2EPtv.d.mts → types-BRU-Kd3t.d.mts} +1 -1
- package/dist/{types-khJmBErP.mjs → types-BqLyyH0o.mjs} +4 -4
- package/dist/{types-rzNprqbE.d.mts → types-LQFwC37d.d.mts} +1 -1
- package/dist/usage/index.mjs +0 -0
- package/dist/{userHelpers-Bi97zMEl.mjs → userHelpers-CXySQFRg.mjs} +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.mjs +11 -11
- package/dist/{utils-WlLDIKuw.mjs → utils-BbGG8XNT.mjs} +3 -3
- package/dist/{validate-pMke_boy.mjs → validate-CidSeUrx.mjs} +2 -2
- package/dist/{versioning-DEs-_hFi.d.mts → versioning-B843jOYX.d.mts} +1 -1
- package/dist/{versioning-CFK3c04-.mjs → versioning-C2r0eOZ4.mjs} +3 -3
- package/package.json +5 -5
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { h as SYSTEM_FIELDS, o as DEFAULT_TENANT_FIELD } from "./constants-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { h as SYSTEM_FIELDS, o as DEFAULT_TENANT_FIELD } from "./constants-BONghE1Y.mjs";
|
|
3
3
|
import { arcLog } from "./logger/index.mjs";
|
|
4
|
-
import { a as conjoinPolicyFilters } from "./authorizationDecision-
|
|
5
|
-
import { d as createDomainError, f as createError, i as NotFoundError, p as isArcError, r as ForbiddenError } from "./errors-
|
|
6
|
-
import { n as getUserRoles, t as getUserId } from "./userHelpers-
|
|
7
|
-
import { b as isElevated, c as getOrgId, n as PUBLIC_SCOPE, x as isMember } from "./types-
|
|
8
|
-
import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-
|
|
9
|
-
import { t as buildQueryKey } from "./keys-
|
|
10
|
-
import { t as transactionContext } from "./transactionContext-
|
|
11
|
-
import { A as scheduleBackground, E as ArcQueryParser } from "./utils-
|
|
12
|
-
import {
|
|
4
|
+
import { a as conjoinPolicyFilters } from "./authorizationDecision-BP8GHtjc.mjs";
|
|
5
|
+
import { d as createDomainError, f as createError, i as NotFoundError, p as isArcError, r as ForbiddenError } from "./errors-2ExmOgIJ.mjs";
|
|
6
|
+
import { n as getUserRoles, t as getUserId } from "./userHelpers-CXySQFRg.mjs";
|
|
7
|
+
import { b as isElevated, c as getOrgId, n as PUBLIC_SCOPE, x as isMember } from "./types-BqLyyH0o.mjs";
|
|
8
|
+
import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-B7qVjQBv.mjs";
|
|
9
|
+
import { t as buildQueryKey } from "./keys-BSuxGS-B.mjs";
|
|
10
|
+
import { t as transactionContext } from "./transactionContext-DMmvcfdo.mjs";
|
|
11
|
+
import { A as scheduleBackground, E as ArcQueryParser } from "./utils-BbGG8XNT.mjs";
|
|
12
|
+
import { a as resolveEffectiveRoles, n as applyFieldWritePermissions } from "./fields-Cha2QCKH.mjs";
|
|
13
13
|
import { policyRecordToFilter } from "@classytic/repo-core/filter";
|
|
14
14
|
import { retryingTransaction } from "@classytic/repo-core/repository";
|
|
15
15
|
import { isProductionEnv } from "@classytic/primitives/environment";
|
|
@@ -19,6 +19,41 @@ interface MemoryEventTransportOptions {
|
|
|
19
19
|
* handlers must be idempotent. Every handler runs before the rejection.
|
|
20
20
|
*/
|
|
21
21
|
onHandlerError?: "log" | "throw";
|
|
22
|
+
/**
|
|
23
|
+
* Whether independent subscribers run one at a time or together.
|
|
24
|
+
*
|
|
25
|
+
* - `'sequential'` (default) — handler N+1 starts after handler N settles.
|
|
26
|
+
* - `'parallel'` — all matching handlers start together; `publish()` resolves
|
|
27
|
+
* when the last settles.
|
|
28
|
+
*
|
|
29
|
+
* Same delivery and the same failure semantics either way: every handler
|
|
30
|
+
* still receives the event, every failure is still collected, and `'throw'`
|
|
31
|
+
* still rejects with one `AggregateError` after all of them have run.
|
|
32
|
+
*
|
|
33
|
+
* **Opting in requires an AUDIT, not an assumption.** Every other transport
|
|
34
|
+
* in this package runs matching handlers sequentially in registration order
|
|
35
|
+
* (`redis-stream.ts` states it outright; `redis.ts` implements it), so an app
|
|
36
|
+
* relying on that order is relying on documented behaviour — switching this
|
|
37
|
+
* on is what breaks it, and swapping to a broker would not have surfaced it.
|
|
38
|
+
* Confirm no subscriber reads another subscriber's write before enabling.
|
|
39
|
+
*
|
|
40
|
+
* Measured on one order placement: 6 subscribers, each spending most of its
|
|
41
|
+
* time on its own round trips, cost 2.8s sequentially — the length of the
|
|
42
|
+
* QUEUE, not of the work.
|
|
43
|
+
*/
|
|
44
|
+
handlerDispatch?: "sequential" | "parallel";
|
|
45
|
+
/**
|
|
46
|
+
* Cap on handlers running at once under `'parallel'`. Default: unlimited.
|
|
47
|
+
*
|
|
48
|
+
* Sequential dispatch was an accidental per-publish rate limiter on whatever
|
|
49
|
+
* pool the handlers share; removing it converts a latency problem into a
|
|
50
|
+
* saturation one when several publishes overlap. `RedisStreamTransport`
|
|
51
|
+
* exposes `processingConcurrency` for the same reason — this is its peer, so
|
|
52
|
+
* an operator has a dial rather than only "queued" or "all at once".
|
|
53
|
+
*
|
|
54
|
+
* Ignored under `'sequential'`, which is already a concurrency of 1.
|
|
55
|
+
*/
|
|
56
|
+
handlerConcurrency?: number;
|
|
22
57
|
}
|
|
23
58
|
/**
|
|
24
59
|
* In-memory event transport (default).
|
|
@@ -32,6 +67,8 @@ declare class MemoryEventTransport implements EventTransport {
|
|
|
32
67
|
private handlers;
|
|
33
68
|
private logger;
|
|
34
69
|
private onHandlerError;
|
|
70
|
+
private handlerDispatch;
|
|
71
|
+
private handlerConcurrency;
|
|
35
72
|
constructor(options?: MemoryEventTransportOptions);
|
|
36
73
|
publish(event: DomainEvent): Promise<void>;
|
|
37
74
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
2
|
import { createEvent, matchEventPattern } from "@classytic/primitives/events";
|
|
3
3
|
//#region src/events/EventTransport.ts
|
|
4
4
|
/**
|
|
@@ -79,20 +79,52 @@ var MemoryEventTransport = class {
|
|
|
79
79
|
handlers = /* @__PURE__ */ new Map();
|
|
80
80
|
logger;
|
|
81
81
|
onHandlerError;
|
|
82
|
+
handlerDispatch;
|
|
83
|
+
handlerConcurrency;
|
|
82
84
|
constructor(options) {
|
|
83
85
|
this.logger = options?.logger ?? console;
|
|
84
86
|
this.onHandlerError = options?.onHandlerError ?? "log";
|
|
87
|
+
this.handlerDispatch = options?.handlerDispatch ?? "sequential";
|
|
88
|
+
const cap = options?.handlerConcurrency;
|
|
89
|
+
if (cap !== void 0 && (!Number.isInteger(cap) || cap < 1)) throw new TypeError(`MemoryEventTransport: handlerConcurrency must be a positive integer, received ${String(cap)}`);
|
|
90
|
+
this.handlerConcurrency = cap ?? Number.POSITIVE_INFINITY;
|
|
85
91
|
}
|
|
86
92
|
async publish(event) {
|
|
87
93
|
const allHandlers = /* @__PURE__ */ new Set();
|
|
88
94
|
for (const [pattern, handlers] of this.handlers) if (matchEventPattern(pattern, event.type)) for (const h of handlers) allHandlers.add(h);
|
|
89
95
|
const failures = [];
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
const run = async (handler) => {
|
|
97
|
+
try {
|
|
98
|
+
await handler(event);
|
|
99
|
+
} catch (err) {
|
|
100
|
+
failures.push(err);
|
|
101
|
+
try {
|
|
102
|
+
this.logger.error(`[EventTransport] Handler error for ${event.type}:`, err);
|
|
103
|
+
} catch {}
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
if (this.handlerDispatch === "parallel") {
|
|
107
|
+
/**
|
|
108
|
+
* `allSettled`, not `all`. Correctness must not rest on `run` never
|
|
109
|
+
* rejecting: `all` short-circuits on the first rejection and resolves
|
|
110
|
+
* `publish()` while the other handlers are still in flight — detached
|
|
111
|
+
* work racing the outbox relay's redelivery of the same event. `run` is
|
|
112
|
+
* written not to reject, and `allSettled` means the next person to add a
|
|
113
|
+
* timeout or a metric to it cannot silently break that.
|
|
114
|
+
*/
|
|
115
|
+
const pending = [...allHandlers];
|
|
116
|
+
if (this.handlerConcurrency >= pending.length) await Promise.allSettled(pending.map(run));
|
|
117
|
+
else {
|
|
118
|
+
let next = 0;
|
|
119
|
+
const worker = async () => {
|
|
120
|
+
while (next < pending.length) {
|
|
121
|
+
const handler = pending[next++];
|
|
122
|
+
if (handler) await run(handler);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
await Promise.allSettled(Array.from({ length: this.handlerConcurrency }, worker));
|
|
126
|
+
}
|
|
127
|
+
} else for (const handler of allHandlers) await run(handler);
|
|
96
128
|
/**
|
|
97
129
|
* Rejecting is what lets an OUTBOX see the failure. With this transport,
|
|
98
130
|
* `publish()` IS the handling — synchronous and in-process — so resolving
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as buildRequestScopeProjection } from "./projection-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as buildRequestScopeProjection } from "./projection-DSfEoooA.mjs";
|
|
3
3
|
//#region src/hooks/HookSystem.ts
|
|
4
4
|
/**
|
|
5
5
|
* Hook System
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import "./constants-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import "./constants-BONghE1Y.mjs";
|
|
3
3
|
//#region src/registry/ResourceRegistry.ts
|
|
4
4
|
/**
|
|
5
5
|
* Resource Registry
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
3
|
-
import { b as isElevated, n as PUBLIC_SCOPE, x as isMember } from "./types-
|
|
4
|
-
import {
|
|
5
|
-
import { t as buildRequestScopeProjection } from "./projection-
|
|
6
|
-
import { t as executePipeline } from "./pipe-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as getUserRoles } from "./userHelpers-CXySQFRg.mjs";
|
|
3
|
+
import { b as isElevated, n as PUBLIC_SCOPE, x as isMember } from "./types-BqLyyH0o.mjs";
|
|
4
|
+
import { a as resolveEffectiveRoles, t as applyFieldReadPermissions } from "./fields-Cha2QCKH.mjs";
|
|
5
|
+
import { t as buildRequestScopeProjection } from "./projection-DSfEoooA.mjs";
|
|
6
|
+
import { t as executePipeline } from "./pipe-SunhEaZ6.mjs";
|
|
7
7
|
import { isPaginatedResult, toCanonicalList } from "@classytic/repo-core/pagination";
|
|
8
8
|
//#region src/core/fastifyAdapter.ts
|
|
9
9
|
/** Type guard for Mongoose-like documents with toObject() */
|
package/dist/audit/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { d as UserBase } from "../base-C-NL2fTi.mjs";
|
|
3
|
-
import "../index-
|
|
3
|
+
import "../index-B78WZom8.mjs";
|
|
4
4
|
import { FastifyPluginAsync } from "fastify";
|
|
5
5
|
import { RepositoryLike } from "@classytic/repo-core/adapter";
|
|
6
6
|
//#region src/audit/stores/interface.d.ts
|
package/dist/audit/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as transactionContext } from "../transactionContext-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as transactionContext } from "../transactionContext-DMmvcfdo.mjs";
|
|
3
3
|
import { and, anyOf, eq, gte, lt, lte } from "@classytic/repo-core/filter";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
//#region src/audit/repository-audit-adapter.ts
|
package/dist/auth/audit.mjs
CHANGED
package/dist/auth/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { l as PermissionCheck } from "../base-C-NL2fTi.mjs";
|
|
3
|
-
import { Ft as AuthPluginOptions, Pt as AuthHelpers } from "../index-
|
|
3
|
+
import { Ft as AuthPluginOptions, Pt as AuthHelpers } from "../index-B78WZom8.mjs";
|
|
4
4
|
import { t as ExternalOpenApiPaths } from "../externalPaths-CmGOxOtD.mjs";
|
|
5
5
|
import { a as SessionManagerOptions, c as createSessionManager, i as SessionData, n as MemorySessionStoreOptions, o as SessionManagerResult, r as SessionCookieOptions, s as SessionStore, t as MemorySessionStore } from "../sessionManager-qimlKV0P.mjs";
|
|
6
6
|
import { FastifyPluginAsync, FastifyReply as FastifyReply$1, FastifyRequest } from "fastify";
|
package/dist/auth/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-
|
|
3
|
-
import { n as requireSingleHeaderValue } from "../headers-
|
|
4
|
-
import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-
|
|
5
|
-
import { o as toJsonSchema } from "../schemaConverter-
|
|
6
|
-
import { E as requireOrgRole, T as requireOrgMembership, k as requireTeamMembership } from "../permissions-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-2ExmOgIJ.mjs";
|
|
3
|
+
import { n as requireSingleHeaderValue } from "../headers-DeXNifVj.mjs";
|
|
4
|
+
import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-CXySQFRg.mjs";
|
|
5
|
+
import { o as toJsonSchema } from "../schemaConverter-Db-MMsH6.mjs";
|
|
6
|
+
import { E as requireOrgRole, T as requireOrgMembership, k as requireTeamMembership } from "../permissions-H7Zcb82Z.mjs";
|
|
7
7
|
import { isProductionEnv } from "@classytic/primitives/environment";
|
|
8
8
|
import { createHmac, randomUUID, timingSafeEqual } from "node:crypto";
|
|
9
9
|
import fp from "fastify-plugin";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
2
|
import { arcLog } from "./logger/index.mjs";
|
|
3
|
-
import { t as ArcError } from "./errors-
|
|
3
|
+
import { t as ArcError } from "./errors-2ExmOgIJ.mjs";
|
|
4
4
|
//#region src/permissions/filter-merge.ts
|
|
5
5
|
/**
|
|
6
6
|
* Policy-filter composition — logical AND, never last-writer-wins.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as conjoinPolicyFilters } from "./authorizationDecision-
|
|
3
|
-
import { g as toRepositoryFilter } from "./BaseController-
|
|
4
|
-
import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as conjoinPolicyFilters } from "./authorizationDecision-BP8GHtjc.mjs";
|
|
3
|
+
import { g as toRepositoryFilter } from "./BaseController-CYaDvmOB.mjs";
|
|
4
|
+
import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-CidSeUrx.mjs";
|
|
5
5
|
//#region src/core/aggregation/buildHandler.ts
|
|
6
6
|
/**
|
|
7
7
|
* Framework-agnostic aggregation execution. Runs safety guards,
|
package/dist/cache/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-
|
|
3
|
-
import { t as MemoryCacheStore } from "../memory-
|
|
4
|
-
import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-BSuxGS-B.mjs";
|
|
3
|
+
import { t as MemoryCacheStore } from "../memory-BiPVaCPg.mjs";
|
|
4
|
+
import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-oTsmVyEQ.mjs";
|
|
5
5
|
//#region src/cache/redis.ts
|
|
6
6
|
/**
|
|
7
7
|
* Redis-backed cache store.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Add2L50I.mjs";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
//#region src/plugins/caching.ts
|
|
5
5
|
var caching_exports = /* @__PURE__ */ __exportAll({
|
package/dist/cleanup/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { L as RequestWithExtras } from "../index-
|
|
2
|
+
import { L as RequestWithExtras } from "../index-B78WZom8.mjs";
|
|
3
3
|
import { A as CleanupStepResult, B as VerificationResult, C as CleanupResult, D as CleanupRunStore, E as CleanupRunStatus, F as PurgeEvidence, I as PurgeResourceResult, L as PurgeStrategyKind, M as CleanupWriteFence, N as DEFAULT_CLEANUP_LIMITS, O as CleanupRunTransitionPatch, P as PurgeActor, R as PurgeVerificationSummary, S as CleanupRecipe, T as CleanupRunCreateResult, _ as CleanupPermissions, a as CleanupEvidenceStore, b as CleanupPlanItem, c as CleanupInput, d as CleanupLease, f as CleanupLimits, g as CleanupPermissionCheck, h as CleanupOutcomeStatus, i as CleanupContext, j as CleanupStepRunStatus, k as CleanupStepProgress, l as CleanupJob, m as CleanupManifest, n as CLEANUP_TERMINAL_STATUSES, o as CleanupExecutionContext, p as CleanupLogger, r as CleanupCancelRequest, s as CleanupFinalizationPayload, t as Availability, u as CleanupJobQueue, v as CleanupPlan, w as CleanupRun, x as CleanupProgressSummary, y as CleanupPlanDraft, z as VerificationCheck } from "../types-DVLddu2q.mjs";
|
|
4
|
-
import { t as ArcModule } from "../types-
|
|
4
|
+
import { t as ArcModule } from "../types-BRU-Kd3t.mjs";
|
|
5
5
|
import { PurgeStrategyKind as PurgeStrategyKind$1 } from "@classytic/primitives/retention";
|
|
6
6
|
import { canonicalJson } from "@classytic/primitives/canonical";
|
|
7
7
|
import { CleanupStep } from "@classytic/repo-core/cleanup";
|
package/dist/cleanup/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { g as getUserId } from "../types-
|
|
3
|
-
import { t as defineResource } from "../defineResource-
|
|
4
|
-
import { t as defineModule } from "../module-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { g as getUserId } from "../types-BqLyyH0o.mjs";
|
|
3
|
+
import { t as defineResource } from "../defineResource-BMdyRelW.mjs";
|
|
4
|
+
import { t as defineModule } from "../module-BQXHxMEk.mjs";
|
|
5
5
|
import { createPurgeEvidence } from "@classytic/primitives/retention";
|
|
6
6
|
import { canonicalJson, sha256Hex } from "@classytic/primitives/canonical";
|
|
7
7
|
//#region src/cleanup/errors.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { Nt as RateLimitConfig, V as ResourceDefinition, et as RouteSchemaOptions } from "../../index-
|
|
2
|
+
import { Nt as RateLimitConfig, V as ResourceDefinition, et as RouteSchemaOptions } from "../../index-B78WZom8.mjs";
|
|
3
3
|
//#region src/cli/commands/describe.d.ts
|
|
4
4
|
interface DescribedResource {
|
|
5
5
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CRUD_OPERATIONS } from "../../constants-
|
|
3
|
-
import { n as stringifyMeasureMap } from "../../ResourceRegistry-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "../../constants-BONghE1Y.mjs";
|
|
3
|
+
import { n as stringifyMeasureMap } from "../../ResourceRegistry-DPcX--zk.mjs";
|
|
4
4
|
import { resolve } from "node:path";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
//#region src/cli/commands/describe.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as buildOpenApiSpec } from "../../openapi-
|
|
3
|
-
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as buildOpenApiSpec } from "../../openapi-Dxc8RLy_.mjs";
|
|
3
|
+
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-DNj8cpiY.mjs";
|
|
4
4
|
import { dirname, resolve } from "node:path";
|
|
5
5
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
6
6
|
//#region src/cli/commands/docs.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
2
|
import { dirname, join, parse, resolve } from "node:path";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
//#region src/cli/commands/doctor.ts
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as generate } from "../../generate-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as generate } from "../../generate-BUP4Oydg.mjs";
|
|
3
3
|
export { generate };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as init } from "../../init-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as init } from "../../init-Dg_Am2o_.mjs";
|
|
3
3
|
export { init };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-DNj8cpiY.mjs";
|
|
3
3
|
//#region src/cli/commands/introspect.ts
|
|
4
4
|
function describePermission(value) {
|
|
5
5
|
if (!value) return "none";
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
2
|
import { describe } from "./commands/describe.mjs";
|
|
3
3
|
import { exportDocs } from "./commands/docs.mjs";
|
|
4
4
|
import { doctor } from "./commands/doctor.mjs";
|
|
5
|
-
import { t as generate } from "../generate-
|
|
6
|
-
import { t as init } from "../init-
|
|
5
|
+
import { t as generate } from "../generate-BUP4Oydg.mjs";
|
|
6
|
+
import { t as init } from "../init-Dg_Am2o_.mjs";
|
|
7
7
|
import { introspect } from "./commands/introspect.mjs";
|
|
8
8
|
export { describe, doctor, exportDocs, generate, init, introspect };
|
package/dist/context/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as transactionContext } from "../transactionContext-
|
|
3
|
-
import { n as requestContext, t as getTraceHeaders } from "../requestContext-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as transactionContext } from "../transactionContext-DMmvcfdo.mjs";
|
|
3
|
+
import { n as requestContext, t as getTraceHeaders } from "../requestContext-DpmntRZy.mjs";
|
|
4
4
|
//#region src/context/requestScopedCache.ts
|
|
5
5
|
/**
|
|
6
6
|
* The slot the per-request store hangs off. Underscore-prefixed to sit apart
|
package/dist/core/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
import { $t as AccessControlConfig, B as defineResource, Bt as BaseController, Cn as ControllerConstructionOptions, En as BodySanitizerConfig, Gt as SlugExt, Ht as SoftDeleteMixin, Jt as BulkMixin, Kt as SlugMixin, Qt as AccessControl, Sn as ControllerConfigurableOptions, Tn as BodySanitizer, Ut as TreeExt, V as ResourceDefinition, Vt as SoftDeleteExt, Wt as TreeMixin, Xt as QueryResolver, Yt as BaseCrudController, Zt as QueryResolverConfig, ct as AggMeasureShorthand, dt as AggregationDateRangeRequirement, ft as AggregationIndexHint, gt as AggregationsMap, ht as AggregationRateLimit, lt as AggregationCacheConfig, mt as AggregationMaterializedResult, pt as AggregationMaterializedContext, qt as BulkExt, st as AggMeasureInput, ut as AggregationConfig, wn as ListResult, xn as BaseControllerOptions } from "../index-
|
|
3
|
-
import { A as CRUD_OPERATIONS, B as HookOperation, C as SeamedResourceConfig, D as createCrudRouter, E as defineAction, F as DEFAULT_SORT, G as MUTATION_OPERATIONS, H as MAX_FILTER_DEPTH, I as DEFAULT_TENANT_FIELD, J as SYSTEM_FIELDS, K as MutationOperation, L as DEFAULT_UPDATE_METHOD, M as DEFAULT_ID_FIELD, N as DEFAULT_LIMIT, O as createPermissionMiddleware, P as DEFAULT_MAX_LIMIT, R as HOOK_OPERATIONS, S as ResourceSeams, T as DefineActionConfig, U as MAX_REGEX_LENGTH, V as HookPhase, W as MAX_SEARCH_LENGTH, _ as getEntityId, a as formatValidationErrors, b as defineResourceVariants, c as nativePolicyFilter, d as createCrudHandlers, f as createFastifyHandler, g as sendControllerResponse, h as getControllerScope, i as assertValidConfig, j as CrudOperation, k as defineAggregation, l as collectReadBlockedFields, m as getControllerContext, n as ValidateOptions, o as validateResourceConfig, p as createRequestContext, q as RESERVED_QUERY_PARAMS, r as ValidationResult, s as NativePolicyFilter, t as ConfigError, u as isFieldReadable, v as getEntityIdField, w as mergeResourceConfig, x as AdapterLike, y as getEntityQuery, z as HOOK_PHASES } from "../index-
|
|
2
|
+
import { $t as AccessControlConfig, B as defineResource, Bt as BaseController, Cn as ControllerConstructionOptions, En as BodySanitizerConfig, Gt as SlugExt, Ht as SoftDeleteMixin, Jt as BulkMixin, Kt as SlugMixin, Qt as AccessControl, Sn as ControllerConfigurableOptions, Tn as BodySanitizer, Ut as TreeExt, V as ResourceDefinition, Vt as SoftDeleteExt, Wt as TreeMixin, Xt as QueryResolver, Yt as BaseCrudController, Zt as QueryResolverConfig, ct as AggMeasureShorthand, dt as AggregationDateRangeRequirement, ft as AggregationIndexHint, gt as AggregationsMap, ht as AggregationRateLimit, lt as AggregationCacheConfig, mt as AggregationMaterializedResult, pt as AggregationMaterializedContext, qt as BulkExt, st as AggMeasureInput, ut as AggregationConfig, wn as ListResult, xn as BaseControllerOptions } from "../index-B78WZom8.mjs";
|
|
3
|
+
import { A as CRUD_OPERATIONS, B as HookOperation, C as SeamedResourceConfig, D as createCrudRouter, E as defineAction, F as DEFAULT_SORT, G as MUTATION_OPERATIONS, H as MAX_FILTER_DEPTH, I as DEFAULT_TENANT_FIELD, J as SYSTEM_FIELDS, K as MutationOperation, L as DEFAULT_UPDATE_METHOD, M as DEFAULT_ID_FIELD, N as DEFAULT_LIMIT, O as createPermissionMiddleware, P as DEFAULT_MAX_LIMIT, R as HOOK_OPERATIONS, S as ResourceSeams, T as DefineActionConfig, U as MAX_REGEX_LENGTH, V as HookPhase, W as MAX_SEARCH_LENGTH, _ as getEntityId, a as formatValidationErrors, b as defineResourceVariants, c as nativePolicyFilter, d as createCrudHandlers, f as createFastifyHandler, g as sendControllerResponse, h as getControllerScope, i as assertValidConfig, j as CrudOperation, k as defineAggregation, l as collectReadBlockedFields, m as getControllerContext, n as ValidateOptions, o as validateResourceConfig, p as createRequestContext, q as RESERVED_QUERY_PARAMS, r as ValidationResult, s as NativePolicyFilter, t as ConfigError, u as isFieldReadable, v as getEntityIdField, w as mergeResourceConfig, x as AdapterLike, y as getEntityQuery, z as HOOK_PHASES } from "../index-BRoDtjek.mjs";
|
|
4
4
|
export { AccessControl, type AccessControlConfig, type AdapterLike, type AggMeasureInput, type AggMeasureShorthand, type AggregationCacheConfig, type AggregationConfig, type AggregationDateRangeRequirement, type AggregationIndexHint, type AggregationMaterializedContext, type AggregationMaterializedResult, type AggregationRateLimit, type AggregationsMap, BaseController, type BaseControllerOptions, BaseCrudController, BodySanitizer, type BodySanitizerConfig, type BulkExt, BulkMixin, CRUD_OPERATIONS, type ConfigError, type ControllerConfigurableOptions, type ControllerConstructionOptions, CrudOperation, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, type DefineActionConfig, HOOK_OPERATIONS, HOOK_PHASES, HookOperation, HookPhase, type ListResult, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, MutationOperation, type NativePolicyFilter, QueryResolver, type QueryResolverConfig, RESERVED_QUERY_PARAMS, ResourceDefinition, type ResourceSeams, SYSTEM_FIELDS, type SeamedResourceConfig, type SlugExt, SlugMixin, type SoftDeleteExt, SoftDeleteMixin, type TreeExt, TreeMixin, type ValidateOptions, type ValidationResult, assertValidConfig, collectReadBlockedFields, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineAction, defineAggregation, defineResource, defineResourceVariants, formatValidationErrors, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, mergeResourceConfig, nativePolicyFilter, sendControllerResponse, validateResourceConfig };
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as DEFAULT_SORT, c as HOOK_OPERATIONS, d as MAX_REGEX_LENGTH, f as MAX_SEARCH_LENGTH, h as SYSTEM_FIELDS, i as DEFAULT_MAX_LIMIT, l as HOOK_PHASES, m as RESERVED_QUERY_PARAMS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MUTATION_OPERATIONS, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as MAX_FILTER_DEPTH } from "../constants-
|
|
3
|
-
import { a as BulkMixin, c as collectReadBlockedFields, f as BodySanitizer, h as nativePolicyFilter, i as SlugMixin, l as isFieldReadable, m as AccessControl, n as TreeMixin, o as BaseCrudController, r as SoftDeleteMixin, s as QueryResolver, t as BaseController } from "../BaseController-
|
|
4
|
-
import { t as defineAggregation } from "../defineAggregation-
|
|
5
|
-
import { a as createCrudHandlers, c as getControllerContext, l as getControllerScope, o as createFastifyHandler, s as createRequestContext, u as sendControllerResponse } from "../actionPermissions-
|
|
6
|
-
import { a as ResourceDefinition, i as validateResourceConfig, n as assertValidConfig, o as createCrudRouter, r as formatValidationErrors, s as createPermissionMiddleware, t as defineResource } from "../defineResource-
|
|
7
|
-
import { a as mergeResourceConfig, i as defineResourceVariants, n as getEntityIdField, o as defineAction, r as getEntityQuery, t as getEntityId } from "../core-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as DEFAULT_SORT, c as HOOK_OPERATIONS, d as MAX_REGEX_LENGTH, f as MAX_SEARCH_LENGTH, h as SYSTEM_FIELDS, i as DEFAULT_MAX_LIMIT, l as HOOK_PHASES, m as RESERVED_QUERY_PARAMS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MUTATION_OPERATIONS, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as MAX_FILTER_DEPTH } from "../constants-BONghE1Y.mjs";
|
|
3
|
+
import { a as BulkMixin, c as collectReadBlockedFields, f as BodySanitizer, h as nativePolicyFilter, i as SlugMixin, l as isFieldReadable, m as AccessControl, n as TreeMixin, o as BaseCrudController, r as SoftDeleteMixin, s as QueryResolver, t as BaseController } from "../BaseController-CYaDvmOB.mjs";
|
|
4
|
+
import { t as defineAggregation } from "../defineAggregation-0KBvqEEC.mjs";
|
|
5
|
+
import { a as createCrudHandlers, c as getControllerContext, l as getControllerScope, o as createFastifyHandler, s as createRequestContext, u as sendControllerResponse } from "../actionPermissions-jlFZ1it4.mjs";
|
|
6
|
+
import { a as ResourceDefinition, i as validateResourceConfig, n as assertValidConfig, o as createCrudRouter, r as formatValidationErrors, s as createPermissionMiddleware, t as defineResource } from "../defineResource-BMdyRelW.mjs";
|
|
7
|
+
import { a as mergeResourceConfig, i as defineResourceVariants, n as getEntityIdField, o as defineAction, r as getEntityQuery, t as getEntityId } from "../core-8She7FgF.mjs";
|
|
8
8
|
export { AccessControl, BaseController, BaseCrudController, BodySanitizer, BulkMixin, CRUD_OPERATIONS, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, HOOK_OPERATIONS, HOOK_PHASES, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, QueryResolver, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, SlugMixin, SoftDeleteMixin, TreeMixin, assertValidConfig, collectReadBlockedFields, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineAction, defineAggregation, defineResource, defineResourceVariants, formatValidationErrors, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, mergeResourceConfig, nativePolicyFilter, sendControllerResponse, validateResourceConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import "./constants-
|
|
3
|
-
import { t as defineResource } from "./defineResource-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import "./constants-BONghE1Y.mjs";
|
|
3
|
+
import { t as defineResource } from "./defineResource-BMdyRelW.mjs";
|
|
4
4
|
//#region src/core/defineAction.ts
|
|
5
5
|
/**
|
|
6
6
|
* Build an `ActionDefinition` with a typed handler. The literal schema
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import "./constants-
|
|
4
|
-
import { f as createError } from "./errors-
|
|
5
|
-
import { i as resolvePipelineSteps, n as buildActionPipelineHandler, u as sendControllerResponse } from "./actionPermissions-
|
|
6
|
-
import { a as selectPluginMw, c as buildRouteHooks, f as buildAuthMiddlewareForPermissions, i as resolveRouterPluginMw, n as buildRateLimitConfig, o as buildActionPermissionMw, p as buildArcDecorator, r as buildRouteConfig, t as tryRegisterRoute, u as routeHookOptions } from "./registerRoute-
|
|
7
|
-
import { n as schemaIRToJsonSchemaBranch, t as normalizeSchemaIR } from "./schemaIR-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Add2L50I.mjs";
|
|
3
|
+
import "./constants-BONghE1Y.mjs";
|
|
4
|
+
import { f as createError } from "./errors-2ExmOgIJ.mjs";
|
|
5
|
+
import { i as resolvePipelineSteps, n as buildActionPipelineHandler, u as sendControllerResponse } from "./actionPermissions-jlFZ1it4.mjs";
|
|
6
|
+
import { a as selectPluginMw, c as buildRouteHooks, f as buildAuthMiddlewareForPermissions, i as resolveRouterPluginMw, n as buildRateLimitConfig, o as buildActionPermissionMw, p as buildArcDecorator, r as buildRouteConfig, t as tryRegisterRoute, u as routeHookOptions } from "./registerRoute-XvcI_3sh.mjs";
|
|
7
|
+
import { n as schemaIRToJsonSchemaBranch, t as normalizeSchemaIR } from "./schemaIR-CIXShch7.mjs";
|
|
8
8
|
//#region src/core/createActionRouter.ts
|
|
9
9
|
var createActionRouter_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
buildActionBodySchema: () => buildActionBodySchema,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as evaluateAndApplyPermission } from "./authorizationDecision-
|
|
3
|
-
import { f as createError } from "./errors-
|
|
4
|
-
import { u as getRequestScope } from "./types-
|
|
5
|
-
import { a as selectPluginMw, c as buildRouteHooks, d as buildAuthMiddleware, i as resolveRouterPluginMw, n as buildRateLimitConfig, p as buildArcDecorator, u as routeHookOptions } from "./registerRoute-
|
|
6
|
-
import { n as validateAggregations } from "./validate-
|
|
7
|
-
import { t as buildAggregationHandler } from "./buildHandler-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as evaluateAndApplyPermission } from "./authorizationDecision-BP8GHtjc.mjs";
|
|
3
|
+
import { f as createError } from "./errors-2ExmOgIJ.mjs";
|
|
4
|
+
import { u as getRequestScope } from "./types-BqLyyH0o.mjs";
|
|
5
|
+
import { a as selectPluginMw, c as buildRouteHooks, d as buildAuthMiddleware, i as resolveRouterPluginMw, n as buildRateLimitConfig, p as buildArcDecorator, u as routeHookOptions } from "./registerRoute-XvcI_3sh.mjs";
|
|
6
|
+
import { n as validateAggregations } from "./validate-CidSeUrx.mjs";
|
|
7
|
+
import { t as buildAggregationHandler } from "./buildHandler-DjXOqIvX.mjs";
|
|
8
8
|
//#region src/core/aggregation/createAggregationRouter.ts
|
|
9
9
|
/**
|
|
10
10
|
* Register one Fastify route per aggregation. No-op when the map is
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { p as MUTATION_OPERATIONS, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS } from "./constants-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { p as MUTATION_OPERATIONS, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS } from "./constants-BONghE1Y.mjs";
|
|
3
3
|
import { arcLog } from "./logger/index.mjs";
|
|
4
|
-
import { r as ForbiddenError } from "./errors-
|
|
5
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
6
|
-
import { b as isElevated, n as PUBLIC_SCOPE, x as isMember } from "./types-
|
|
7
|
-
import { d as isWriteVerbCapable, p as DEFAULT_FIELD_WRITE_DENIAL_POLICY, t as BaseController, u as detectOverriddenWriteSlots } from "./BaseController-
|
|
8
|
-
import { v as getDefaultCrudSchemas } from "./utils-
|
|
9
|
-
import {
|
|
10
|
-
import { n as convertRouteSchema, r as ensureSchemaConverter, t as convertOpenApiSchemas } from "./schemaConverter-
|
|
11
|
-
import { i as pipeUIMessageStreamToReply, r as isReadableStream } from "./streaming-
|
|
12
|
-
import { a as createCrudHandlers, i as resolvePipelineSteps, o as createFastifyHandler, r as buildPipelineHandler, s as createRequestContext, t as resolveActionPermission } from "./actionPermissions-
|
|
13
|
-
import { a as selectPluginMw, c as buildRouteHooks, d as buildAuthMiddleware, i as resolveRouterPluginMw, l as resolveRoutePreHandlers, n as buildRateLimitConfig, p as buildArcDecorator, r as buildRouteConfig, s as buildCrudPermissionMw, t as tryRegisterRoute, u as routeHookOptions } from "./registerRoute-
|
|
14
|
-
import { t as hasEvents } from "./typeGuards-
|
|
15
|
-
import { B as requireAuth } from "./permissions-
|
|
16
|
-
import { r as getAvailablePresets, t as applyPresets } from "./presets-
|
|
17
|
-
import { t as pluralize } from "./pluralize-
|
|
4
|
+
import { r as ForbiddenError } from "./errors-2ExmOgIJ.mjs";
|
|
5
|
+
import { n as getUserRoles } from "./userHelpers-CXySQFRg.mjs";
|
|
6
|
+
import { b as isElevated, n as PUBLIC_SCOPE, x as isMember } from "./types-BqLyyH0o.mjs";
|
|
7
|
+
import { d as isWriteVerbCapable, p as DEFAULT_FIELD_WRITE_DENIAL_POLICY, t as BaseController, u as detectOverriddenWriteSlots } from "./BaseController-CYaDvmOB.mjs";
|
|
8
|
+
import { v as getDefaultCrudSchemas } from "./utils-BbGG8XNT.mjs";
|
|
9
|
+
import { a as resolveEffectiveRoles, n as applyFieldWritePermissions } from "./fields-Cha2QCKH.mjs";
|
|
10
|
+
import { n as convertRouteSchema, r as ensureSchemaConverter, t as convertOpenApiSchemas } from "./schemaConverter-Db-MMsH6.mjs";
|
|
11
|
+
import { i as pipeUIMessageStreamToReply, r as isReadableStream } from "./streaming-DkpW1HwJ.mjs";
|
|
12
|
+
import { a as createCrudHandlers, i as resolvePipelineSteps, o as createFastifyHandler, r as buildPipelineHandler, s as createRequestContext, t as resolveActionPermission } from "./actionPermissions-jlFZ1it4.mjs";
|
|
13
|
+
import { a as selectPluginMw, c as buildRouteHooks, d as buildAuthMiddleware, i as resolveRouterPluginMw, l as resolveRoutePreHandlers, n as buildRateLimitConfig, p as buildArcDecorator, r as buildRouteConfig, s as buildCrudPermissionMw, t as tryRegisterRoute, u as routeHookOptions } from "./registerRoute-XvcI_3sh.mjs";
|
|
14
|
+
import { t as hasEvents } from "./typeGuards-DHTnEs5X.mjs";
|
|
15
|
+
import { B as requireAuth } from "./permissions-H7Zcb82Z.mjs";
|
|
16
|
+
import { r as getAvailablePresets, t as applyPresets } from "./presets-CNyfaxGL.mjs";
|
|
17
|
+
import { t as pluralize } from "./pluralize-Da7IT_qJ.mjs";
|
|
18
18
|
import { isReadOnlyRepo } from "@classytic/repo-core/repository";
|
|
19
19
|
//#region src/core/middlewares/fieldWrite.ts
|
|
20
20
|
/**
|
|
@@ -1425,7 +1425,7 @@ function buildResourcePlugin(resource) {
|
|
|
1425
1425
|
extensions: resource.extensions
|
|
1426
1426
|
});
|
|
1427
1427
|
if (resource.actions && Object.keys(resource.actions).length > 0) {
|
|
1428
|
-
const { createActionRouter } = await import("./createActionRouter-
|
|
1428
|
+
const { createActionRouter } = await import("./createActionRouter-Bqi6Bhhx.mjs").then((n) => n.n);
|
|
1429
1429
|
createActionRouter(typedInstance, {
|
|
1430
1430
|
...normalizeActionsToRouterConfig(resource.actions, resource.actionPermissions, resource.tag, resource.permissions, resource.name, typedInstance.log),
|
|
1431
1431
|
resourceName: resource.name,
|
|
@@ -1440,7 +1440,7 @@ function buildResourcePlugin(resource) {
|
|
|
1440
1440
|
});
|
|
1441
1441
|
}
|
|
1442
1442
|
if (resource.aggregations && Object.keys(resource.aggregations).length > 0) {
|
|
1443
|
-
const [{ createAggregationRouter }, { adapterSupportsAggregate, ArcAggregationConfigError }] = await Promise.all([import("./createAggregationRouter-
|
|
1443
|
+
const [{ createAggregationRouter }, { adapterSupportsAggregate, ArcAggregationConfigError }] = await Promise.all([import("./createAggregationRouter-BsYO7ktd.mjs"), import("./validate-CidSeUrx.mjs").then((n) => n.r)]);
|
|
1444
1444
|
const repoForAgg = resource.controller?.repository ?? resource.repository;
|
|
1445
1445
|
if (!adapterSupportsAggregate(repoForAgg)) {
|
|
1446
1446
|
const undispatchable = Object.entries(resource.aggregations).filter(([, cfg]) => !cfg.materialized).map(([name]) => name);
|
package/dist/discovery/index.mjs
CHANGED
package/dist/docs/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { p as RegistryEntry } from "../index-
|
|
2
|
+
import { p as RegistryEntry } from "../index-B78WZom8.mjs";
|
|
3
3
|
import { t as ExternalOpenApiPaths } from "../externalPaths-CmGOxOtD.mjs";
|
|
4
4
|
import { FastifyPluginAsync } from "fastify";
|
|
5
5
|
//#region src/docs/openapi/types.d.ts
|
package/dist/docs/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as getUserRoles } from "../userHelpers-
|
|
3
|
-
import { n as openApiPlugin, r as openapi_default, t as buildOpenApiSpec } from "../openapi-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as getUserRoles } from "../userHelpers-CXySQFRg.mjs";
|
|
3
|
+
import { n as openApiPlugin, r as openapi_default, t as buildOpenApiSpec } from "../openapi-Dxc8RLy_.mjs";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
//#region src/docs/scalar.ts
|
|
6
6
|
const scalarPlugin = async (fastify, opts = {}) => {
|