@classytic/arc 2.44.0 → 2.45.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{EventTransport-DZWDsaPa.mjs → EventTransport-4b0noGwa.mjs} +2 -2
- package/dist/{HookSystem-yjEgn7Cm.mjs → HookSystem-4pABQnGn.mjs} +2 -2
- package/dist/{ResourceRegistry-DJxHUpE4.mjs → ResourceRegistry-BBaN_Ne-.mjs} +2 -2
- package/dist/{acquire-BozJ-9yt.mjs → acquire-kiZzy5bX.mjs} +1 -1
- package/dist/{actionPermissions-5N04zBL4.mjs → actionPermissions-BLnbDA6g.mjs} +13 -13
- package/dist/audit/index.mjs +4 -4
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.mjs +10 -11
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-wX3SA9w_.mjs → authorizationDecision-CVlaTjAX.mjs} +4 -4
- package/dist/{boundedMap-DWiKW7lP.mjs → boundedMap-DSy7KkeX.mjs} +1 -1
- package/dist/{buildHandler-Bswu_vNb.mjs → buildHandler-B4IhILv9.mjs} +4 -4
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-Drp68DIS.mjs → caching-DqakP2vY.mjs} +2 -2
- package/dist/{claimed-DYvQoZLv.mjs → claimed-XoiVrWZ2.mjs} +1 -1
- package/dist/cleanup/index.mjs +4 -4
- package/dist/cli/commands/describe.mjs +3 -3
- package/dist/cli/commands/docs.mjs +3 -3
- package/dist/cli/commands/doctor.mjs +1 -1
- package/dist/cli/commands/generate.mjs +2 -2
- package/dist/cli/commands/init.mjs +2 -2
- package/dist/cli/commands/introspect.mjs +2 -2
- package/dist/cli/index.mjs +3 -3
- package/dist/{constants-B2QHb6u6.mjs → constants-CtWkmWn3.mjs} +1 -1
- package/dist/context/index.mjs +5 -5
- package/dist/core/index.mjs +7 -7
- package/dist/{core-COcqo0Cp.mjs → core-Cro2v5a7.mjs} +3 -3
- package/dist/{createActionRouter-zG13rpPJ.mjs → createActionRouter-k-gwiPv6.mjs} +6 -6
- package/dist/{createAggregationRouter-CWRz96Vr.mjs → createAggregationRouter-BqWqhAPG.mjs} +7 -7
- package/dist/{createApp-BGLYtErt.mjs → createApp-Dw7L72Hz.mjs} +28 -28
- package/dist/{defineAggregation--3xguLkk.mjs → defineAggregation-pxbd7BBK.mjs} +1 -1
- package/dist/{defineResource-gUp9ug66.mjs → defineResource-DwgEjLCO.mjs} +7 -7
- package/dist/discovery/index.mjs +1 -1
- package/dist/docs/index.mjs +3 -3
- package/dist/{elevation-BG4gnMsJ.mjs → elevation-B9wF2Z1F.mjs} +5 -5
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-COHw3N1b.mjs → errorHandler-Dr2nG0Ui.mjs} +3 -3
- package/dist/{errors-CW4anJBy.mjs → errors-BtHzrSA6.mjs} +1 -1
- package/dist/{eventPlugin-BweHAVws.mjs → eventPlugin-Dvs7OBw8.mjs} +8 -8
- package/dist/{eventTypes-N4-omQFR.mjs → eventTypes-BVoCTG5c.mjs} +2 -2
- package/dist/events/index.mjs +7 -7
- package/dist/events/transports/redis-stream-entry.mjs +4 -4
- package/dist/events/transports/redis.mjs +2 -2
- package/dist/factory/index.d.mts +1 -1
- package/dist/factory/index.mjs +6 -6
- package/dist/{fields-A5crhsJb.mjs → fields-C1e_7Fwi.mjs} +1 -1
- package/dist/{filter-merge-DGM-GQ1J.mjs → filter-merge-xaiEKtz8.mjs} +1 -1
- package/dist/{generate-BXKo2Gc8.mjs → generate-DJiJMaXN.mjs} +2 -2
- package/dist/{headers-DKZQKL-Z.mjs → headers-Dr-wt6Tr.mjs} +2 -2
- package/dist/{health-CrqUp3sz.mjs → health-BLYn_Hds.mjs} +1 -1
- package/dist/{health-BYAwA6YS.mjs → health-DkkWbJtQ.mjs} +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/idempotency/index.mjs +7 -7
- package/dist/idempotency/redis.mjs +2 -2
- package/dist/{index-BkV55WlV.d.mts → index-uhkUA5-U.d.mts} +1 -1
- package/dist/index.mjs +11 -11
- package/dist/{init-BPzK5Lnr.mjs → init-CW3kJqNW.mjs} +1 -1
- package/dist/integrations/event-gateway.mjs +2 -2
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.mjs +3 -3
- package/dist/integrations/mcp/index.mjs +2 -2
- package/dist/integrations/mcp/testing.mjs +2 -2
- package/dist/integrations/streamline.mjs +3 -3
- package/dist/integrations/webhooks.mjs +3 -3
- package/dist/integrations/websocket-pushref-redis.mjs +1 -1
- package/dist/integrations/websocket-redis.mjs +1 -1
- package/dist/integrations/websocket.mjs +2 -2
- package/dist/{jsonBody-YIq-vGLv.mjs → jsonBody-DPU8yYwA.mjs} +2 -2
- package/dist/{keys-CpoiZ8hU.mjs → keys-Dgn6OYhl.mjs} +1 -1
- package/dist/{loadResources-6jO52-RR.mjs → loadResources-BtKj6P1P.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-MP8xEppu.mjs → loadResourcesFromEntry-Bmq6TnB7.mjs} +2 -2
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-D4V1zGLI.mjs → logger-qQNLlOAU.mjs} +1 -1
- package/dist/{mcpPlugin-srPc7ItN.mjs → mcpPlugin-DDfe8jAP.mjs} +22 -22
- package/dist/{memory-CTa5pOCW.mjs → memory-C0Blueoh.mjs} +3 -3
- package/dist/{metrics-DsZrvnpB.mjs → metrics-DYka72iN.mjs} +3 -3
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module--L0iBIZz.mjs → module-BszSyWbd.mjs} +1 -1
- package/dist/{multipartBody-Cc7eZ9cq.mjs → multipartBody-RHvIkNmc.mjs} +1 -1
- package/dist/{openapi-CMegfsm8.mjs → openapi-BrFPc3Ny.mjs} +6 -6
- package/dist/outbox-admin/index.mjs +5 -5
- package/dist/{outbox-module-Ryk270jd.mjs → outbox-module-DF4Bu_Qa.mjs} +9 -9
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-C5ijIz5Q.mjs → permissions-DN1CWH56.mjs} +9 -9
- package/dist/{pipe-D81zMtWs.mjs → pipe-B8uq865o.mjs} +2 -2
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-CJGMKoui.mjs → plan-DUGfynNg.mjs} +1 -1
- package/dist/{plugin-DALd9dcF.mjs → plugin-ByU3h-bR.mjs} +22 -22
- package/dist/plugins/index.d.mts +2 -2
- package/dist/plugins/index.mjs +17 -17
- package/dist/plugins/response-cache.mjs +4 -4
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-COUNYo3d.mjs → pluralize-Cdya8zYt.mjs} +1 -1
- package/dist/presets/filesUpload.mjs +5 -5
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.mjs +5 -5
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-CONf2Qem.mjs → presets-CCOlKTZw.mjs} +4 -4
- package/dist/{projection-wFoLqdss.mjs → projection-BGty6ie4.mjs} +2 -2
- package/dist/{queryCachePlugin-BATECpyh.mjs → queryCachePlugin-B7itTkWu.mjs} +6 -6
- package/dist/{rateLimitKey-DVEZ_UpV.mjs → rateLimitKey-DBWO59H9.mjs} +1 -1
- package/dist/{realtime-xyubMKSB.mjs → realtime-_59Rlje8.mjs} +11 -11
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-Bdzg-hdm.mjs → registry-uG4wr541.mjs} +2 -2
- package/dist/{renewingLease-BFJxGPuh.mjs → renewingLease-CiU3ZynH.mjs} +1 -1
- package/dist/{replyHelpers-Bnc6lJyy.mjs → replyHelpers-Dr2pnXZg.mjs} +2 -2
- package/dist/{requestContext-C10UeFe5.mjs → requestContext-DBKIdmDi.mjs} +1 -1
- package/dist/{requirement-Bu50QALH.mjs → requirement-DxOaghWD.mjs} +1 -1
- package/dist/{resourceRateLimit-urWPJxrt.mjs → resourceRateLimit-BBdj5yRq.mjs} +2 -2
- package/dist/rolldown-runtime-DpVPUeXF.mjs +15 -0
- package/dist/{routeValidator-DHtpzrzk.mjs → routeValidator-BNTqM1Eh.mjs} +1 -1
- package/dist/{runtimeCapabilities-DIMKMV2G.mjs → runtimeCapabilities-D_3eUO6V.mjs} +1 -1
- package/dist/{schedules-CKTs5ys8.mjs → schedules-CVS7c1nv.mjs} +5 -5
- package/dist/{schemaConverter-BVjkQ5DD.mjs → schemaConverter-BQbg7loK.mjs} +2 -2
- package/dist/{schemaIR-BA0Hb21Y.mjs → schemaIR-CUI3hPQR.mjs} +2 -2
- package/dist/schemas/index.mjs +1 -1
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-DINaj7Ax.mjs → scope-DFXngazv.mjs} +4 -4
- package/dist/{shutdown-LpLMH8T1.mjs → shutdown-BCXCwghd.mjs} +1 -1
- package/dist/{simpleEqualityMatcher-DbwIM1f1.mjs → simpleEqualityMatcher-5jOzYQ_L.mjs} +1 -1
- package/dist/sse-BilBz766.mjs +212 -0
- package/dist/{sseStream-DQChzGTs.mjs → sseStream-BG_uJL6J.mjs} +2 -2
- package/dist/{store-helpers-Coj9RhOZ.mjs → store-helpers-CzLZdVa1.mjs} +1 -1
- package/dist/{streaming-JzB5CAga.mjs → streaming-DgUvMWlv.mjs} +1 -1
- package/dist/{subscriberIdentity-DeyppIif.mjs → subscriberIdentity-EWnIZ-U8.mjs} +1 -1
- package/dist/{tenancy-DxV8OuX2.mjs → tenancy-CVMvO5DH.mjs} +2 -2
- package/dist/{tenantPreparation-CBvvAcAj.mjs → tenantPreparation-DIH-GX4g.mjs} +4 -4
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +1 -1
- package/dist/testing/index.mjs +15 -16
- package/dist/testing/outboxStoreContract.mjs +2 -2
- package/dist/testing/requiredPorts.mjs +2 -2
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{timing-CntavTlR.mjs → timing-q9NITK04.mjs} +1 -1
- package/dist/{transactionContext-orvnGu4F.mjs → transactionContext-NHmhDIOF.mjs} +1 -1
- package/dist/{typeGuards-kEaP_WmO.mjs → typeGuards-CPYR9RCg.mjs} +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-fvO6Ovzx.mjs → types-BI4sbUJ3.mjs} +4 -4
- package/dist/usage/index.mjs +4 -4
- package/dist/{userHelpers-C76zD5pa.mjs → userHelpers-oBTU3a_k.mjs} +1 -1
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-BpkVZ8rB.mjs → utils-BmE8zRrh.mjs} +4 -4
- package/dist/{validate-CWp-lsrm.mjs → validate-Dby08LhR.mjs} +3 -3
- package/dist/{versioning-Bsb51gGT.d.mts → versioning-Bqm_57Qt.d.mts} +23 -1
- package/dist/{versioning-CHhL9P3o.mjs → versioning-P6JMNcJr.mjs} +3 -3
- package/dist/{workScope-n9a7d_lZ.mjs → workScope-BcMLKa3G.mjs} +2 -2
- package/package.json +17 -16
- package/dist/mongodb-memory-server-CHhYSq5y.mjs +0 -35539
- package/dist/mongoose-CYJCLyi-.mjs +0 -67451
- package/dist/node-D8UZv_8c.mjs +0 -41236
- package/dist/rolldown-runtime-MYrLNGnq.mjs +0 -45
- package/dist/sse-BzJFPX_1.mjs +0 -89
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as workSeedFromEvent, t as runWorkScope } from "./workScope-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { r as workSeedFromEvent, t as runWorkScope } from "./workScope-BcMLKa3G.mjs";
|
|
3
3
|
import { createEvent, createEventRouter } from "@classytic/primitives/events";
|
|
4
4
|
//#region src/events/EventTransport.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as buildRequestScopeProjection } from "./projection-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as buildRequestScopeProjection } from "./projection-BGty6ie4.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.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import "./constants-CtWkmWn3.mjs";
|
|
3
3
|
//#region src/registry/ResourceRegistry.ts
|
|
4
4
|
/**
|
|
5
5
|
* Resource Registry
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
2
|
//#region src/idempotency/acquire.ts
|
|
3
3
|
async function acquireIdempotencyKey(store, key, requestId, lockTtlMs) {
|
|
4
4
|
if (typeof store.acquire === "function") return store.acquire(key, requestId, lockTtlMs);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { f as createError } from "./errors-
|
|
3
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
4
|
-
import { b as isElevated, n as PUBLIC_SCOPE, u as getRequestScope, x as isMember } from "./types-
|
|
5
|
-
import { a as resolveEffectiveRoles, r as deriveHiddenFieldPermissions, t as applyFieldReadPermissions } from "./fields-
|
|
6
|
-
import { t as buildRequestScopeProjection } from "./projection-
|
|
7
|
-
import { n as requestContext } from "./requestContext-
|
|
8
|
-
import { n as isTenantPreparation } from "./tenantPreparation-
|
|
9
|
-
import { n as evaluateAndApplyPermission } from "./authorizationDecision-
|
|
10
|
-
import { t as executePipeline } from "./pipe-
|
|
11
|
-
import { n as idempotencyConfigProblem, t as declaresIdempotencyFence } from "./requirement-
|
|
12
|
-
import { i as resolveResourceRateLimiter, r as recordUnenforcedRateLimit } from "./resourceRateLimit-
|
|
13
|
-
import { n as arcRouteValidatorCompiler } from "./routeValidator-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { f as createError } from "./errors-BtHzrSA6.mjs";
|
|
3
|
+
import { n as getUserRoles } from "./userHelpers-oBTU3a_k.mjs";
|
|
4
|
+
import { b as isElevated, n as PUBLIC_SCOPE, u as getRequestScope, x as isMember } from "./types-BI4sbUJ3.mjs";
|
|
5
|
+
import { a as resolveEffectiveRoles, r as deriveHiddenFieldPermissions, t as applyFieldReadPermissions } from "./fields-C1e_7Fwi.mjs";
|
|
6
|
+
import { t as buildRequestScopeProjection } from "./projection-BGty6ie4.mjs";
|
|
7
|
+
import { n as requestContext } from "./requestContext-DBKIdmDi.mjs";
|
|
8
|
+
import { n as isTenantPreparation } from "./tenantPreparation-DIH-GX4g.mjs";
|
|
9
|
+
import { n as evaluateAndApplyPermission } from "./authorizationDecision-CVlaTjAX.mjs";
|
|
10
|
+
import { t as executePipeline } from "./pipe-B8uq865o.mjs";
|
|
11
|
+
import { n as idempotencyConfigProblem, t as declaresIdempotencyFence } from "./requirement-DxOaghWD.mjs";
|
|
12
|
+
import { i as resolveResourceRateLimiter, r as recordUnenforcedRateLimit } from "./resourceRateLimit-BBdj5yRq.mjs";
|
|
13
|
+
import { n as arcRouteValidatorCompiler } from "./routeValidator-BNTqM1Eh.mjs";
|
|
14
14
|
import { isPaginatedResult, toCanonicalList } from "@classytic/repo-core/pagination";
|
|
15
15
|
//#region src/core/fastifyAdapter.ts
|
|
16
16
|
/** Type guard for Mongoose-like documents with toObject() */
|
package/dist/audit/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { g as getUserId, i as getClientId } from "../types-
|
|
3
|
-
import { t as transactionContext } from "../transactionContext-
|
|
4
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { g as getUserId, i as getClientId } from "../types-BI4sbUJ3.mjs";
|
|
3
|
+
import { t as transactionContext } from "../transactionContext-NHmhDIOF.mjs";
|
|
4
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-D_3eUO6V.mjs";
|
|
5
5
|
import { and, anyOf, eq, gte, lt, lte } from "@classytic/repo-core/filter";
|
|
6
6
|
import fp from "fastify-plugin";
|
|
7
7
|
//#region src/audit/repository-audit-adapter.ts
|
package/dist/auth/audit.mjs
CHANGED
package/dist/auth/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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 { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
7
|
-
import { E as requireOrgRole, T as requireOrgMembership, k as requireTeamMembership } from "../permissions-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-BtHzrSA6.mjs";
|
|
3
|
+
import { n as requireSingleHeaderValue } from "../headers-Dr-wt6Tr.mjs";
|
|
4
|
+
import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-oBTU3a_k.mjs";
|
|
5
|
+
import { o as toJsonSchema } from "../schemaConverter-BQbg7loK.mjs";
|
|
6
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-D_3eUO6V.mjs";
|
|
7
|
+
import { E as requireOrgRole, T as requireOrgMembership, k as requireTeamMembership } from "../permissions-DN1CWH56.mjs";
|
|
8
8
|
import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
|
|
9
9
|
import { isProductionEnv } from "@classytic/primitives/environment";
|
|
10
10
|
import { createHmac, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -664,8 +664,7 @@ async function getActiveMemberRoles(auth, headers) {
|
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
666
|
/**
|
|
667
|
-
* Resolve
|
|
668
|
-
* `activeOrganizationId` (e.g. API-key auth via `x-organization-id`).
|
|
667
|
+
* Resolve membership for the explicitly selected organization.
|
|
669
668
|
*/
|
|
670
669
|
async function getMemberRolesByOrg(auth, headers, organizationId) {
|
|
671
670
|
const fn = pickApiMethod(auth, "getActiveMemberRole", "organization");
|
|
@@ -775,11 +774,11 @@ function createBetterAuthAdapter(options) {
|
|
|
775
774
|
* other.
|
|
776
775
|
*/
|
|
777
776
|
const resolveMemberScope = async (headers, session, requestedOrgId, userId, userRoles) => {
|
|
778
|
-
const activeOrgId = session?.activeOrganizationId
|
|
777
|
+
const activeOrgId = requestedOrgId || session?.activeOrganizationId;
|
|
779
778
|
if (!activeOrgId) return void 0;
|
|
780
779
|
let orgRoles = null;
|
|
781
780
|
if (!skipMemberLookup) {
|
|
782
|
-
if (session?.activeOrganizationId) orgRoles = await getActiveMemberRoles(auth, headers);
|
|
781
|
+
if (session?.activeOrganizationId === activeOrgId) orgRoles = await getActiveMemberRoles(auth, headers);
|
|
783
782
|
if (!orgRoles) orgRoles = await getMemberRolesByOrg(auth, headers, activeOrgId);
|
|
784
783
|
}
|
|
785
784
|
if (resolveOrgRoles && userId) orgRoles = await resolveOrgRoles({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as arcLog } from "./logger-
|
|
3
|
-
import { t as conjoinPolicyFilters } from "./filter-merge-
|
|
4
|
-
import { t as ArcError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as arcLog } from "./logger-qQNLlOAU.mjs";
|
|
3
|
+
import { t as conjoinPolicyFilters } from "./filter-merge-xaiEKtz8.mjs";
|
|
4
|
+
import { t as ArcError } from "./errors-BtHzrSA6.mjs";
|
|
5
5
|
//#region src/permissions/authorizationDecision.ts
|
|
6
6
|
const log = arcLog("permissions:enforce");
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as conjoinPolicyFilters } from "./filter-merge-
|
|
3
|
-
import { C as toRepositoryFilter } from "./plugin-
|
|
4
|
-
import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as conjoinPolicyFilters } from "./filter-merge-xaiEKtz8.mjs";
|
|
3
|
+
import { C as toRepositoryFilter } from "./plugin-ByU3h-bR.mjs";
|
|
4
|
+
import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-Dby08LhR.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.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-Dgn6OYhl.mjs";
|
|
3
|
+
import { t as MemoryCacheStore } from "../memory-C0Blueoh.mjs";
|
|
4
|
+
import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-B7itTkWu.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 {
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DpVPUeXF.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.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.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { g as getUserId } from "../types-BI4sbUJ3.mjs";
|
|
3
|
+
import { t as defineResource } from "../defineResource-DwgEjLCO.mjs";
|
|
4
|
+
import { t as defineModule } from "../module-BszSyWbd.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,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.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "../../constants-CtWkmWn3.mjs";
|
|
3
|
+
import { n as stringifyMeasureMap } from "../../ResourceRegistry-BBaN_Ne-.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.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as buildOpenApiSpec } from "../../openapi-BrFPc3Ny.mjs";
|
|
3
|
+
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-Bmq6TnB7.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.45.1 | 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,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
export { t as generate } from "../../generate-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
export { t as generate } from "../../generate-DJiJMaXN.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
export { t as init } from "../../init-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
export { t as init } from "../../init-CW3kJqNW.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-Bmq6TnB7.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.45.1 | 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-DJiJMaXN.mjs";
|
|
6
|
+
import { t as init } from "../init-CW3kJqNW.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,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as transactionContext } from "../transactionContext-
|
|
3
|
-
import { n as requestContext, t as getTraceHeaders } from "../requestContext-
|
|
4
|
-
import { n as evictToSize, r as touch } from "../boundedMap-
|
|
5
|
-
import { n as scopedValue, r as workSeedFromEvent, t as runWorkScope } from "../workScope-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as transactionContext } from "../transactionContext-NHmhDIOF.mjs";
|
|
3
|
+
import { n as requestContext, t as getTraceHeaders } from "../requestContext-DBKIdmDi.mjs";
|
|
4
|
+
import { n as evictToSize, r as touch } from "../boundedMap-DSy7KkeX.mjs";
|
|
5
|
+
import { n as scopedValue, r as workSeedFromEvent, t as runWorkScope } from "../workScope-BcMLKa3G.mjs";
|
|
6
6
|
//#region src/context/requestScopedCache.ts
|
|
7
7
|
/** The memo slot the per-scope store hangs off. */
|
|
8
8
|
const SLOT = Symbol.for("arc.requestScopedCache");
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as DEFAULT_SORT, c as DEFAULT_VERSION_FIELD, d as MAX_FILTER_DEPTH, f as MAX_REGEX_LENGTH, g as SYSTEM_FIELDS, h as RESERVED_QUERY_PARAMS, i as DEFAULT_MAX_LIMIT, l as HOOK_OPERATIONS, m as MUTATION_OPERATIONS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MAX_SEARCH_LENGTH, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as HOOK_PHASES } from "../constants-
|
|
3
|
-
import { S as nativePolicyFilter, b as BodySanitizer, c as BaseController, d as SlugMixin, f as BulkMixin, g as isFieldReadable, h as collectReadBlockedFields, l as TreeMixin, m as QueryResolver, o as createCrudRouter, p as BaseCrudController, s as createPermissionMiddleware, u as SoftDeleteMixin, x as AccessControl } from "../plugin-
|
|
4
|
-
import { t as defineAggregation } from "../defineAggregation
|
|
5
|
-
import { C as sendControllerResponse, S as getControllerScope, b as createRequestContext, x as getControllerContext, y as createFastifyHandler } from "../actionPermissions-
|
|
6
|
-
import { a as defineResourceVariants, i as getEntityQuery, n as getEntityId, o as mergeResourceConfig, r as getEntityIdField, s as defineAction, t as getActionTarget } from "../core-
|
|
7
|
-
import { a as ResourceDefinition, i as validateResourceConfig, n as assertValidConfig, r as formatValidationErrors, t as defineResource } from "../defineResource-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { a as DEFAULT_SORT, c as DEFAULT_VERSION_FIELD, d as MAX_FILTER_DEPTH, f as MAX_REGEX_LENGTH, g as SYSTEM_FIELDS, h as RESERVED_QUERY_PARAMS, i as DEFAULT_MAX_LIMIT, l as HOOK_OPERATIONS, m as MUTATION_OPERATIONS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MAX_SEARCH_LENGTH, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as HOOK_PHASES } from "../constants-CtWkmWn3.mjs";
|
|
3
|
+
import { S as nativePolicyFilter, b as BodySanitizer, c as BaseController, d as SlugMixin, f as BulkMixin, g as isFieldReadable, h as collectReadBlockedFields, l as TreeMixin, m as QueryResolver, o as createCrudRouter, p as BaseCrudController, s as createPermissionMiddleware, u as SoftDeleteMixin, x as AccessControl } from "../plugin-ByU3h-bR.mjs";
|
|
4
|
+
import { t as defineAggregation } from "../defineAggregation-pxbd7BBK.mjs";
|
|
5
|
+
import { C as sendControllerResponse, S as getControllerScope, b as createRequestContext, x as getControllerContext, y as createFastifyHandler } from "../actionPermissions-BLnbDA6g.mjs";
|
|
6
|
+
import { a as defineResourceVariants, i as getEntityQuery, n as getEntityId, o as mergeResourceConfig, r as getEntityIdField, s as defineAction, t as getActionTarget } from "../core-Cro2v5a7.mjs";
|
|
7
|
+
import { a as ResourceDefinition, i as validateResourceConfig, n as assertValidConfig, r as formatValidationErrors, t as defineResource } from "../defineResource-DwgEjLCO.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, DEFAULT_VERSION_FIELD, 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, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineAction, defineAggregation, defineResource, defineResourceVariants, formatValidationErrors, getActionTarget, 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.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import "./constants-CtWkmWn3.mjs";
|
|
3
|
+
import { t as defineResource } from "./defineResource-DwgEjLCO.mjs";
|
|
4
4
|
//#region src/core/defineAction.ts
|
|
5
5
|
/**
|
|
6
6
|
* Build an `ActionDefinition` with a typed handler. The literal schema
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import "./constants-
|
|
4
|
-
import { f as createError, i as NotFoundError, u as ValidationError } from "./errors-
|
|
5
|
-
import { C as sendControllerResponse, _ as buildArcDecorator, a as resolveRouterPluginMw, f as buildRouteHooks, g as buildAuthMiddlewareForPermissions, i as buildRouteConfig, l as resolvePipelineSteps, m as routeHookOptions, n as tryRegisterRoute, o as selectPluginMw, r as buildRateLimitConfig, s as buildActionPipelineHandler, u as buildActionPermissionMw } from "./actionPermissions-
|
|
6
|
-
import { n as schemaIRToJsonSchemaBranch, t as normalizeSchemaIR } from "./schemaIR-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DpVPUeXF.mjs";
|
|
3
|
+
import "./constants-CtWkmWn3.mjs";
|
|
4
|
+
import { f as createError, i as NotFoundError, u as ValidationError } from "./errors-BtHzrSA6.mjs";
|
|
5
|
+
import { C as sendControllerResponse, _ as buildArcDecorator, a as resolveRouterPluginMw, f as buildRouteHooks, g as buildAuthMiddlewareForPermissions, i as buildRouteConfig, l as resolvePipelineSteps, m as routeHookOptions, n as tryRegisterRoute, o as selectPluginMw, r as buildRateLimitConfig, s as buildActionPipelineHandler, u as buildActionPermissionMw } from "./actionPermissions-BLnbDA6g.mjs";
|
|
6
|
+
import { n as schemaIRToJsonSchemaBranch, t as normalizeSchemaIR } from "./schemaIR-CUI3hPQR.mjs";
|
|
7
7
|
//#region src/core/createActionRouter.ts
|
|
8
8
|
var createActionRouter_exports = /* @__PURE__ */ __exportAll({
|
|
9
9
|
buildActionBodySchema: () => buildActionBodySchema,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { f as createError } from "./errors-
|
|
3
|
-
import { u as getRequestScope } from "./types-
|
|
4
|
-
import { _ as buildArcDecorator, a as resolveRouterPluginMw, f as buildRouteHooks, h as buildAuthMiddleware, m as routeHookOptions, n as tryRegisterRoute, o as selectPluginMw, r as buildRateLimitConfig } from "./actionPermissions-
|
|
5
|
-
import { n as evaluateAndApplyPermission } from "./authorizationDecision-
|
|
6
|
-
import { n as validateAggregations } from "./validate-
|
|
7
|
-
import { t as buildAggregationHandler } from "./buildHandler-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { f as createError } from "./errors-BtHzrSA6.mjs";
|
|
3
|
+
import { u as getRequestScope } from "./types-BI4sbUJ3.mjs";
|
|
4
|
+
import { _ as buildArcDecorator, a as resolveRouterPluginMw, f as buildRouteHooks, h as buildAuthMiddleware, m as routeHookOptions, n as tryRegisterRoute, o as selectPluginMw, r as buildRateLimitConfig } from "./actionPermissions-BLnbDA6g.mjs";
|
|
5
|
+
import { n as evaluateAndApplyPermission } from "./authorizationDecision-CVlaTjAX.mjs";
|
|
6
|
+
import { n as validateAggregations } from "./validate-Dby08LhR.mjs";
|
|
7
|
+
import { t as buildAggregationHandler } from "./buildHandler-B4IhILv9.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,18 +1,18 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import { a as enterArcLoggerScope, i as runWithArcLogger, n as configureArcLogger, r as createPinoWriter, t as arcLog } from "./logger-
|
|
4
|
-
import { n as PUBLIC_SCOPE } from "./types-
|
|
5
|
-
import { r as initRuntimeCapabilityRegistry, t as auditRuntimeCapabilities } from "./runtimeCapabilities-
|
|
6
|
-
import { a as runShutdown, t as initShutdownRegistry } from "./shutdown-
|
|
7
|
-
import { n as isScopeAwareKeyGenerator, t as createTenantKeyGenerator } from "./rateLimitKey-
|
|
8
|
-
import { i as resolveResourceRateLimiter, n as markRateLimitingDisabled } from "./resourceRateLimit-
|
|
9
|
-
import { r as markArcRootValidator, t as arcAjvCustomOptions } from "./routeValidator-
|
|
10
|
-
import { c as createRequestIdGenerator, r as mergeHealthChecks } from "./health-
|
|
11
|
-
import { t as parseJsonBody } from "./jsonBody-
|
|
12
|
-
import { a as portsForModule, b as verifyEventDurability, f as resolveModuleArm, g as crudEventsOf, h as buildModuleGraph, m as analyzeModuleGraph, n as composeModules, x as verifyModuleGraph } from "./plan-
|
|
13
|
-
import { c as wrapWithAttribution, f as defineEvent, l as wrapWithBoundary, r as CRUD_EVENT_SCHEMA } from "./eventTypes-
|
|
14
|
-
import { r as withSubscriberId } from "./subscriberIdentity-
|
|
15
|
-
import { r as getOptionalModuleExports } from "./module
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DpVPUeXF.mjs";
|
|
3
|
+
import { a as enterArcLoggerScope, i as runWithArcLogger, n as configureArcLogger, r as createPinoWriter, t as arcLog } from "./logger-qQNLlOAU.mjs";
|
|
4
|
+
import { n as PUBLIC_SCOPE } from "./types-BI4sbUJ3.mjs";
|
|
5
|
+
import { r as initRuntimeCapabilityRegistry, t as auditRuntimeCapabilities } from "./runtimeCapabilities-D_3eUO6V.mjs";
|
|
6
|
+
import { a as runShutdown, t as initShutdownRegistry } from "./shutdown-BCXCwghd.mjs";
|
|
7
|
+
import { n as isScopeAwareKeyGenerator, t as createTenantKeyGenerator } from "./rateLimitKey-DBWO59H9.mjs";
|
|
8
|
+
import { i as resolveResourceRateLimiter, n as markRateLimitingDisabled } from "./resourceRateLimit-BBdj5yRq.mjs";
|
|
9
|
+
import { r as markArcRootValidator, t as arcAjvCustomOptions } from "./routeValidator-BNTqM1Eh.mjs";
|
|
10
|
+
import { c as createRequestIdGenerator, r as mergeHealthChecks } from "./health-BLYn_Hds.mjs";
|
|
11
|
+
import { t as parseJsonBody } from "./jsonBody-DPU8yYwA.mjs";
|
|
12
|
+
import { a as portsForModule, b as verifyEventDurability, f as resolveModuleArm, g as crudEventsOf, h as buildModuleGraph, m as analyzeModuleGraph, n as composeModules, x as verifyModuleGraph } from "./plan-DUGfynNg.mjs";
|
|
13
|
+
import { c as wrapWithAttribution, f as defineEvent, l as wrapWithBoundary, r as CRUD_EVENT_SCHEMA } from "./eventTypes-BVoCTG5c.mjs";
|
|
14
|
+
import { r as withSubscriberId } from "./subscriberIdentity-EWnIZ-U8.mjs";
|
|
15
|
+
import { r as getOptionalModuleExports } from "./module-BszSyWbd.mjs";
|
|
16
16
|
import { isProductionEnv, readEnv } from "@classytic/primitives/environment";
|
|
17
17
|
import Fastify from "fastify";
|
|
18
18
|
import qs from "qs";
|
|
@@ -774,7 +774,7 @@ async function registerArcCore(fastify, config, trackPlugin) {
|
|
|
774
774
|
await fastify.register(arcCorePlugin, { emitEvents: config.arcPlugins?.emitEvents !== false });
|
|
775
775
|
trackPlugin("arc-core");
|
|
776
776
|
if (config.arcPlugins?.events !== false) {
|
|
777
|
-
const { default: eventPlugin } = await import("./eventPlugin-
|
|
777
|
+
const { default: eventPlugin } = await import("./eventPlugin-Dvs7OBw8.mjs").then((n) => n.r);
|
|
778
778
|
const eventOpts = typeof config.arcPlugins?.events === "object" ? config.arcPlugins.events : {};
|
|
779
779
|
await fastify.register(eventPlugin, {
|
|
780
780
|
/**
|
|
@@ -829,15 +829,15 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules, moduleH
|
|
|
829
829
|
trackPlugin("arc-graceful-shutdown", shutdownOpts);
|
|
830
830
|
}
|
|
831
831
|
if (config.arcPlugins?.caching) {
|
|
832
|
-
const { default: cachingPlugin } = await import("./caching-
|
|
832
|
+
const { default: cachingPlugin } = await import("./caching-DqakP2vY.mjs").then((n) => n.n);
|
|
833
833
|
const opts = config.arcPlugins.caching === true ? {} : config.arcPlugins.caching;
|
|
834
834
|
await fastify.register(cachingPlugin, opts);
|
|
835
835
|
trackPlugin("arc-caching", opts);
|
|
836
836
|
}
|
|
837
837
|
if (config.arcPlugins?.queryCache) {
|
|
838
|
-
const { queryCachePlugin } = await import("./queryCachePlugin-
|
|
838
|
+
const { queryCachePlugin } = await import("./queryCachePlugin-B7itTkWu.mjs").then((n) => n.n);
|
|
839
839
|
const opts = config.arcPlugins.queryCache === true ? {} : config.arcPlugins.queryCache;
|
|
840
|
-
const store = config.stores?.queryCache ?? new (await (import("./memory-
|
|
840
|
+
const store = config.stores?.queryCache ?? new (await (import("./memory-C0Blueoh.mjs").then((n) => n.n))).MemoryCacheStore();
|
|
841
841
|
await fastify.register(queryCachePlugin, {
|
|
842
842
|
store,
|
|
843
843
|
...opts
|
|
@@ -847,7 +847,7 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules, moduleH
|
|
|
847
847
|
if (config.arcPlugins?.sse) {
|
|
848
848
|
if (config.arcPlugins?.events === false) fastify.log.warn("SSE plugin requires events plugin (arcPlugins.events). SSE disabled.");
|
|
849
849
|
else {
|
|
850
|
-
const { default: ssePlugin } = await import("./sse-
|
|
850
|
+
const { default: ssePlugin } = await import("./sse-BilBz766.mjs").then((n) => n.n);
|
|
851
851
|
const opts = config.arcPlugins.sse === true ? {} : config.arcPlugins.sse;
|
|
852
852
|
await fastify.register(ssePlugin, opts);
|
|
853
853
|
trackPlugin("arc-sse", opts);
|
|
@@ -856,20 +856,20 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules, moduleH
|
|
|
856
856
|
if (config.arcPlugins?.realtime) {
|
|
857
857
|
if (config.arcPlugins?.events === false) fastify.log.warn("Realtime plugin requires events plugin (arcPlugins.events). Realtime disabled.");
|
|
858
858
|
else {
|
|
859
|
-
const { default: realtimePlugin } = await import("./realtime-
|
|
859
|
+
const { default: realtimePlugin } = await import("./realtime-_59Rlje8.mjs").then((n) => n.n);
|
|
860
860
|
const opts = config.arcPlugins.realtime === true ? {} : config.arcPlugins.realtime;
|
|
861
861
|
await fastify.register(realtimePlugin, opts);
|
|
862
862
|
trackPlugin("arc-realtime", opts);
|
|
863
863
|
}
|
|
864
864
|
}
|
|
865
865
|
if (config.arcPlugins?.metrics) {
|
|
866
|
-
const { default: metricsPlugin } = await import("./metrics-
|
|
866
|
+
const { default: metricsPlugin } = await import("./metrics-DYka72iN.mjs").then((n) => n.n);
|
|
867
867
|
const opts = config.arcPlugins.metrics === true ? {} : config.arcPlugins.metrics;
|
|
868
868
|
await fastify.register(metricsPlugin, opts);
|
|
869
869
|
trackPlugin("arc-metrics", opts);
|
|
870
870
|
}
|
|
871
871
|
if (config.arcPlugins?.versioning) {
|
|
872
|
-
const { default: versioningPlugin } = await import("./versioning-
|
|
872
|
+
const { default: versioningPlugin } = await import("./versioning-P6JMNcJr.mjs").then((n) => n.n);
|
|
873
873
|
await fastify.register(versioningPlugin, config.arcPlugins.versioning);
|
|
874
874
|
trackPlugin("arc-versioning", config.arcPlugins.versioning);
|
|
875
875
|
}
|
|
@@ -946,7 +946,7 @@ async function registerAuth(fastify, config, trackPlugin) {
|
|
|
946
946
|
*/
|
|
947
947
|
async function registerElevation(fastify, config, trackPlugin) {
|
|
948
948
|
if (!config.elevation) return;
|
|
949
|
-
const { elevationPlugin } = await import("./elevation-
|
|
949
|
+
const { elevationPlugin } = await import("./elevation-B9wF2Z1F.mjs").then((n) => n.n);
|
|
950
950
|
await fastify.register(elevationPlugin, config.elevation);
|
|
951
951
|
trackPlugin("arc-elevation", config.elevation);
|
|
952
952
|
fastify.log.debug("Elevation plugin enabled");
|
|
@@ -961,7 +961,7 @@ async function registerElevation(fastify, config, trackPlugin) {
|
|
|
961
961
|
*/
|
|
962
962
|
async function registerErrorHandler(fastify, config, trackPlugin, moduleErrorMappers) {
|
|
963
963
|
if (config.errorHandler === false) return;
|
|
964
|
-
const { errorHandlerPlugin } = await import("./errorHandler-
|
|
964
|
+
const { errorHandlerPlugin } = await import("./errorHandler-Dr2nG0Ui.mjs").then((n) => n.r);
|
|
965
965
|
/**
|
|
966
966
|
* DISCLOSURE DEFAULTS MERGE — they used to be REPLACED, and that was two bugs.
|
|
967
967
|
*
|
|
@@ -1180,7 +1180,7 @@ async function registerResources(fastify, config, preResolvedModules, skippedBri
|
|
|
1180
1180
|
let discoveryPath;
|
|
1181
1181
|
let discoveryYieldedZero = false;
|
|
1182
1182
|
if (resolvedResources === void 0 && config.resourceDir) {
|
|
1183
|
-
const { loadResources } = await import("./loadResources-
|
|
1183
|
+
const { loadResources } = await import("./loadResources-BtKj6P1P.mjs").then((n) => n.n);
|
|
1184
1184
|
const { resolve, dirname } = await import("node:path");
|
|
1185
1185
|
const { fileURLToPath } = await import("node:url");
|
|
1186
1186
|
const rawDir = config.resourceDir;
|
|
@@ -1305,7 +1305,7 @@ Resources supplied by "${m.name}": ${provided}.`);
|
|
|
1305
1305
|
if (fastify.hasDecorator("getScheduleStats")) throw new Error("[arc] modules declare scheduledJobs but schedulesPlugin was already registered manually. Configure their runner through arcPlugins.schedules so Arc can compose one schedule table.");
|
|
1306
1306
|
const frozenJobs = Object.freeze(scheduledJobs.map((job) => Object.freeze({ ...job })));
|
|
1307
1307
|
const scheduleOptions = typeof config.arcPlugins?.schedules === "object" ? config.arcPlugins.schedules : {};
|
|
1308
|
-
const { default: schedulesPlugin } = await import("./schedules-
|
|
1308
|
+
const { default: schedulesPlugin } = await import("./schedules-CVS7c1nv.mjs").then((n) => n.n);
|
|
1309
1309
|
await fastify.register(schedulesPlugin, {
|
|
1310
1310
|
...scheduleOptions,
|
|
1311
1311
|
schedules: frozenJobs
|
|
@@ -2011,7 +2011,7 @@ async function buildApp(options, loggerScope, onInstance, onBootDisposer) {
|
|
|
2011
2011
|
await registerErrorHandler(fastify, config, trackPlugin, moduleErrorMappers);
|
|
2012
2012
|
await registerResources(fastify, config, resolvedModules, skippedBridges);
|
|
2013
2013
|
if (config.replyHelpers) {
|
|
2014
|
-
const { replyHelpersPlugin } = await import("./replyHelpers-
|
|
2014
|
+
const { replyHelpersPlugin } = await import("./replyHelpers-Dr2pnXZg.mjs").then((n) => n.n);
|
|
2015
2015
|
await fastify.register(replyHelpersPlugin);
|
|
2016
2016
|
}
|
|
2017
2017
|
if (config.serializeBigInt) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { m as MUTATION_OPERATIONS, t as CRUD_OPERATIONS } from "./constants-
|
|
3
|
-
import { t as arcLog } from "./logger-
|
|
4
|
-
import { a as autoInjectTenantFieldRules, c as BaseController, i as resolveOpenApiSchemas, t as buildResourcePlugin, v as detectOverriddenWriteSlots, y as isWriteVerbCapable } from "./plugin-
|
|
5
|
-
import { B as requireAuth } from "./permissions-
|
|
6
|
-
import { n as getAvailablePresets, t as applyPresets } from "./presets-
|
|
7
|
-
import { t as pluralize } from "./pluralize-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { m as MUTATION_OPERATIONS, t as CRUD_OPERATIONS } from "./constants-CtWkmWn3.mjs";
|
|
3
|
+
import { t as arcLog } from "./logger-qQNLlOAU.mjs";
|
|
4
|
+
import { a as autoInjectTenantFieldRules, c as BaseController, i as resolveOpenApiSchemas, t as buildResourcePlugin, v as detectOverriddenWriteSlots, y as isWriteVerbCapable } from "./plugin-ByU3h-bR.mjs";
|
|
5
|
+
import { B as requireAuth } from "./permissions-DN1CWH56.mjs";
|
|
6
|
+
import { n as getAvailablePresets, t as applyPresets } from "./presets-CCOlKTZw.mjs";
|
|
7
|
+
import { t as pluralize } from "./pluralize-Cdya8zYt.mjs";
|
|
8
8
|
import { isReadOnlyRepo } from "@classytic/repo-core/repository";
|
|
9
9
|
import { readEnv } from "@classytic/primitives/environment";
|
|
10
10
|
//#region src/core/defineResource/writeVerbs.ts
|
package/dist/discovery/index.mjs
CHANGED
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 openapi_default, t as buildOpenApiSpec } from "../openapi-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { n as getUserRoles } from "../userHelpers-oBTU3a_k.mjs";
|
|
3
|
+
import { n as openapi_default, t as buildOpenApiSpec } from "../openapi-BrFPc3Ny.mjs";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
//#region src/docs/scalar.ts
|
|
6
6
|
const scalarPlugin = async (fastify, opts = {}) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import { t as arcLog } from "./logger-
|
|
4
|
-
import { n as requireSingleHeaderValue } from "./headers-
|
|
5
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DpVPUeXF.mjs";
|
|
3
|
+
import { t as arcLog } from "./logger-qQNLlOAU.mjs";
|
|
4
|
+
import { n as requireSingleHeaderValue } from "./headers-Dr-wt6Tr.mjs";
|
|
5
|
+
import { n as getUserRoles } from "./userHelpers-oBTU3a_k.mjs";
|
|
6
6
|
import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
|
|
7
7
|
import fp from "fastify-plugin";
|
|
8
8
|
//#region src/scope/elevation.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ArcError } from "../errors-
|
|
3
|
-
import { t as parseJsonBody } from "../jsonBody-
|
|
1
|
+
/*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ArcError } from "../errors-BtHzrSA6.mjs";
|
|
3
|
+
import { t as parseJsonBody } from "../jsonBody-DPU8yYwA.mjs";
|
|
4
4
|
import { createCipheriv, createDecipheriv, randomBytes } from "node:crypto";
|
|
5
5
|
import fp from "fastify-plugin";
|
|
6
6
|
//#region src/encryption/fieldCipher.ts
|