@classytic/arc 2.51.0 → 2.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{EventTransport-K7Q9WPjm.mjs → EventTransport-DeNze_-C.mjs} +2 -2
- package/dist/{HookSystem-DBAu9uNT.mjs → HookSystem-DTffXM1X.mjs} +2 -2
- package/dist/{ResourceRegistry-BelzCRMy.mjs → ResourceRegistry-tlqXSZoK.mjs} +2 -2
- package/dist/{acquire-B0zhfGSm.mjs → acquire-7JKEkKnN.mjs} +1 -1
- package/dist/audit/index.mjs +4 -4
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.mjs +7 -7
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/auth/social/index.mjs +1 -1
- package/dist/{authorizationDecision-Dxj_cy6N.mjs → authorizationDecision-DKmH4tZ-.mjs} +9 -7
- package/dist/{boundedMap-DOBai-H3.mjs → boundedMap-zxGBpXX0.mjs} +1 -1
- package/dist/{buildHandler-Dyl8P9j0.mjs → buildHandler-ZDV6LRZ_.mjs} +5 -5
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-CUmaNL8Y.mjs → caching-DceUN9Xk.mjs} +2 -2
- package/dist/{claimed-DJPk4VZr.mjs → claimed-DsP5Hi_f.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-DH41jnNT.mjs → constants-Ca2IQFy2.mjs} +1 -1
- package/dist/context/index.mjs +5 -5
- package/dist/core/index.d.mts +1 -1
- package/dist/core/index.mjs +7 -7
- package/dist/{core-DPmRWlpx.mjs → core-M18RhMqi.mjs} +3 -3
- package/dist/{createActionRouter-B1xhER6i.mjs → createActionRouter-zXlrwWVs.mjs} +5 -5
- package/dist/{createAggregationRouter-CNntJL-z.mjs → createAggregationRouter-CN0Da9nC.mjs} +7 -7
- package/dist/{createApp-DpG26bCu.mjs → createApp-BC67ACu4.mjs} +29 -29
- package/dist/{defineAggregation-rI3EbZUg.mjs → defineAggregation-DqAGb5oI.mjs} +1 -1
- package/dist/{defineResource-5DcG_wlI.mjs → defineResource-DC5UqkQv.mjs} +8 -8
- package/dist/discovery/index.mjs +1 -1
- package/dist/docs/index.mjs +3 -3
- package/dist/{elevation-XFu7J3aj.mjs → elevation-DiXVg98q.mjs} +5 -5
- package/dist/encryption/index.d.mts +26 -1
- package/dist/encryption/index.mjs +56 -6
- package/dist/{errorHandler-xDVUWOMu.mjs → errorHandler-BUTm9P_f.mjs} +3 -3
- package/dist/{errors-KBZ3tQk5.mjs → errors-DxpHZBlW.mjs} +1 -1
- package/dist/{eventPlugin-C4lNj2Dw.mjs → eventPlugin-ZsIQPRso.mjs} +8 -8
- package/dist/{eventTypes-DZRoUAdk.mjs → eventTypes-D-pFtqT1.mjs} +2 -2
- package/dist/events/index.mjs +8 -8
- package/dist/events/transports/redis-stream-entry.mjs +4 -4
- package/dist/events/transports/redis.mjs +2 -2
- package/dist/factory/index.d.mts +4 -4
- package/dist/factory/index.mjs +7 -7
- package/dist/{fastify-augmentation-baQc3MaO.d.mts → fastify-augmentation-CPReFhZ1.d.mts} +1 -1
- package/dist/{fieldTypes-DrXUW1jc.mjs → fieldTypes-f-3TZgR3.mjs} +2 -2
- package/dist/{fields-C5J8WTd2.mjs → fields-kCbIDTjA.mjs} +1 -1
- package/dist/{filter-merge-DTjYoDrj.mjs → filter-merge-UJCgjbZR.mjs} +1 -1
- package/dist/{generate-SA8oMlLB.mjs → generate-CLpmzbJ_.mjs} +2 -2
- package/dist/{headers-D5wrBLOk.mjs → headers-Bh47h0XH.mjs} +2 -2
- package/dist/{health-BLal039H.mjs → health-CEpgVAl7.mjs} +1 -1
- package/dist/{health-vEo3fni4.mjs → health-W4S2yFBL.mjs} +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/http-cache/index.mjs +4 -4
- package/dist/http-cache/purgers/cloudflare.mjs +2 -2
- package/dist/http-cache/purgers/fastly.mjs +2 -2
- package/dist/http-cache/testing/index.mjs +1 -1
- package/dist/idempotency/index.mjs +7 -7
- package/dist/idempotency/redis.mjs +2 -2
- package/dist/{index-DexdFs1a.d.mts → index-CSbDhif4.d.mts} +19 -1
- package/dist/{index-DKM2p5w5.d.mts → index-DCH08eqQ.d.mts} +1 -1
- package/dist/{index-Dhrks-hM.d.mts → index-yXXCsKl7.d.mts} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +11 -11
- package/dist/{init-DeKHaNZn.mjs → init-B43DXBpc.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 +4 -4
- 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-rDPGT5A9.mjs → jsonBody-CkKs6dA_.mjs} +2 -2
- package/dist/{keys-t7i-lJ2r.mjs → keys-DHrHnT0f.mjs} +1 -1
- package/dist/{loadResources-CcupAVJH.mjs → loadResources-CFdzAWQZ.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-BpjYlaoj.mjs → loadResourcesFromEntry-DkoSiJsI.mjs} +2 -2
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-IL7Btm-N.mjs → logger-DJwz_-Pl.mjs} +1 -1
- package/dist/{mcpPlugin-BsdH7Vot.mjs → mcpPlugin-CA_MDFlS.mjs} +21 -21
- package/dist/{memory-Dkp6ZD3F.mjs → memory-B9CFHbA_.mjs} +3 -3
- package/dist/{metrics-CDPqgdKr.mjs → metrics-DSKv-T9K.mjs} +3 -3
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module-KFxT1Iuk.mjs → module-C0JCsnO7.mjs} +17 -2
- package/dist/{multipartBody-BHktuarE.mjs → multipartBody-Bxz-q6hI.mjs} +1 -1
- package/dist/{observeSend-CY-sLanc.mjs → observeSend-DfNkdGww.mjs} +1 -1
- package/dist/{openapi-DbeXiy2v.mjs → openapi-Dmp7Ipsi.mjs} +6 -6
- package/dist/outbox-admin/index.mjs +5 -5
- package/dist/{outbox-module-BWqkTE8-.mjs → outbox-module-vT6PaThj.mjs} +7 -7
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-e5YMrFbm.mjs → permissions-Cga6KBOX.mjs} +9 -9
- package/dist/{pipe-CMnKfdF4.mjs → pipe-CqPweKdL.mjs} +2 -2
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-BvLJGm3U.mjs → plan-CbDTFbTj.mjs} +1 -1
- package/dist/{plugin-DYmu8uT4.mjs → plugin-8Z1khbAI.mjs} +24 -24
- package/dist/plugins/index.d.mts +1 -1
- package/dist/plugins/index.mjs +18 -18
- package/dist/plugins/response-cache.mjs +4 -4
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-ClwfBdIx.mjs → pluralize-D4vcPLVs.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-DX_lPabi.mjs → presets-D28IABZe.mjs} +4 -4
- package/dist/{projection-DnZiFPPE.mjs → projection-aHCtDQQ9.mjs} +2 -2
- package/dist/{purger.types-BEzTVDOU.mjs → purger.types-CNFmEtFu.mjs} +1 -1
- package/dist/{queryCachePlugin-C57-Nj-g.mjs → queryCachePlugin-CwpEjCwz.mjs} +6 -6
- package/dist/{rateLimitKey-B1RxyGt3.mjs → rateLimitKey-D9dl3FQn.mjs} +1 -1
- package/dist/{realtime-C-VIoXMg.mjs → realtime-Dvu8ES2z.mjs} +11 -11
- package/dist/registry/index.d.mts +1 -1
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-DbQvODPH.mjs → registry-DmxbzW7-.mjs} +2 -2
- package/dist/{relay-B61seKq1.mjs → relay-CEaCmUfG.mjs} +5 -5
- package/dist/{renewingLease-Dp7wmzNN.mjs → renewingLease-g2FjB3im.mjs} +1 -1
- package/dist/{replyHelpers-CHii_jIO.mjs → replyHelpers-CSByAX_Z.mjs} +2 -2
- package/dist/{requestContext-C_mbAm8o.mjs → requestContext-yc7MSgmq.mjs} +1 -1
- package/dist/{requirement-C8OsWLYp.mjs → requirement-Dm8njSoC.mjs} +1 -1
- package/dist/{resourceRateLimit-DhbQZjE2.mjs → resourceRateLimit-PQaY3HW1.mjs} +2 -2
- package/dist/{rolldown-runtime-HTi8KV7V.mjs → rolldown-runtime-BBBkGgwA.mjs} +1 -1
- package/dist/{routeValidator-DnQ2BGnH.mjs → routeValidator-fuG51bQA.mjs} +1 -1
- package/dist/{runtimeCapabilities-G9QXHov1.mjs → runtimeCapabilities-B8IT7xiQ.mjs} +1 -1
- package/dist/{schedules-DAthT5O3.mjs → schedules-0-aS4jDV.mjs} +5 -5
- package/dist/{schemaConverter-BOt_ed78.mjs → schemaConverter-Cs3SwP4R.mjs} +2 -2
- package/dist/{schemaIR-MZVVj6Cw.mjs → schemaIR-By8XiNeE.mjs} +14 -14
- package/dist/schemas/index.mjs +1 -1
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-btg-225w.mjs → scope-BWNAlBj0.mjs} +4 -4
- package/dist/{shutdown-Dfy8La90.mjs → shutdown-Cf-27xsS.mjs} +1 -1
- package/dist/{simpleEqualityMatcher-D5dOqbbj.mjs → simpleEqualityMatcher-e-dgJcUO.mjs} +1 -1
- package/dist/{sse-DivxX1m6.mjs → sse-C3bj5qWi.mjs} +7 -7
- package/dist/{sseStream-hQxQjvre.mjs → sseStream-BYZbpFDa.mjs} +2 -2
- package/dist/{store-helpers-DfqfssAw.mjs → store-helpers-B9HierHY.mjs} +1 -1
- package/dist/{streaming-CQiOktsh.mjs → streaming-EN8NJWxr.mjs} +1 -1
- package/dist/{subscriberIdentity-Bf8VLqA7.mjs → subscriberIdentity-DSqCh38x.mjs} +1 -1
- package/dist/{tenancy-Btmaf1MB.mjs → tenancy-CAqjGQcQ.mjs} +2 -2
- package/dist/{tenantPreparation-4e3qyb6q.mjs → tenantPreparation-CVBWarqs.mjs} +4 -4
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +2 -2
- package/dist/testing/index.mjs +11 -11
- package/dist/testing/outboxStoreContract.mjs +2 -2
- package/dist/testing/requiredPorts.mjs +2 -2
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{timing-DXx0IWyi.mjs → timing-CKI_Oyub.mjs} +1 -1
- package/dist/{transactionContext-DperjON1.mjs → transactionContext-D0UZFoSy.mjs} +1 -1
- package/dist/{typeGuards-eoQLIOh6.mjs → typeGuards-CLYkmBLT.mjs} +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-CcpISJe8.mjs → types-Cunc4shv.mjs} +4 -4
- package/dist/usage/index.mjs +4 -4
- package/dist/{userHelpers-Cp5zqlEN.mjs → userHelpers-cT5j1kgp.mjs} +1 -1
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-dKN-_315.mjs → utils-DlNkm1dI.mjs} +6 -6
- package/dist/{validate-BZHaAdgy.mjs → validate-63QThRoS.mjs} +3 -3
- package/dist/{versioning-CPLP0VbB.mjs → versioning-f2YGmh4i.mjs} +3 -3
- package/dist/{workScope-BI72KXsI.mjs → workScope-DwspXz70.mjs} +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as workSeedFromEvent, t as runWorkScope } from "./workScope-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as workSeedFromEvent, t as runWorkScope } from "./workScope-DwspXz70.mjs";
|
|
3
3
|
import { createEvent as createEvent$1, createEventRouter } from "@classytic/primitives/events";
|
|
4
4
|
// 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.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as buildRequestScopeProjection } from "./projection-aHCtDQQ9.mjs";
|
|
3
3
|
// src/hooks/HookSystem.ts
|
|
4
4
|
/**
|
|
5
5
|
* Hook System
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
2
|
// 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);
|
package/dist/audit/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as transactionContext } from "../transactionContext-
|
|
3
|
-
import { g as getUserId, i as getClientId } from "../types-
|
|
4
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as transactionContext } from "../transactionContext-D0UZFoSy.mjs";
|
|
3
|
+
import { g as getUserId, i as getClientId } from "../types-Cunc4shv.mjs";
|
|
4
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-B8IT7xiQ.mjs";
|
|
5
5
|
import { and, anyOf, eq, gte, lt, lte } from "@classytic/repo-core/filter";
|
|
6
6
|
import fp from "fastify-plugin";
|
|
7
7
|
// 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 { n as getUserRoles, r as normalizeRoles } from "../userHelpers-
|
|
3
|
-
import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-
|
|
4
|
-
import { E as requireOrgRole, T as requireOrgMembership, k as requireTeamMembership } from "../permissions-
|
|
5
|
-
import { n as requireSingleHeaderValue } from "../headers-
|
|
6
|
-
import { o as toJsonSchema } from "../schemaConverter-
|
|
7
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-cT5j1kgp.mjs";
|
|
3
|
+
import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-DxpHZBlW.mjs";
|
|
4
|
+
import { E as requireOrgRole, T as requireOrgMembership, k as requireTeamMembership } from "../permissions-Cga6KBOX.mjs";
|
|
5
|
+
import { n as requireSingleHeaderValue } from "../headers-Bh47h0XH.mjs";
|
|
6
|
+
import { o as toJsonSchema } from "../schemaConverter-Cs3SwP4R.mjs";
|
|
7
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-B8IT7xiQ.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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
2
|
import { createHash, randomBytes, timingSafeEqual } from "node:crypto";
|
|
3
3
|
import { APIError, createAuthEndpoint, createAuthMiddleware, getOAuthState } from "better-auth/api";
|
|
4
4
|
import { makeSignature } from "better-auth/crypto";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as arcLog } from "./logger-
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as arcLog } from "./logger-DJwz_-Pl.mjs";
|
|
3
|
+
import { n as PUBLIC_SCOPE, y as isAuthenticated } from "./types-Cunc4shv.mjs";
|
|
4
|
+
import { t as ArcError } from "./errors-DxpHZBlW.mjs";
|
|
5
|
+
import { t as conjoinPolicyFilters } from "./filter-merge-UJCgjbZR.mjs";
|
|
5
6
|
// src/permissions/authorizationDecision.ts
|
|
6
7
|
const log = arcLog("permissions:enforce");
|
|
7
8
|
/**
|
|
@@ -158,11 +159,12 @@ async function evaluateAndApplyPermission(check, context, request, reply, opts)
|
|
|
158
159
|
}
|
|
159
160
|
const { decision } = outcome;
|
|
160
161
|
if (decision.effect !== "allow") {
|
|
161
|
-
const
|
|
162
|
+
const authenticated = context.user != null || isAuthenticated(request.scope ?? PUBLIC_SCOPE);
|
|
163
|
+
const defaultMsg = opts?.defaultDenialMessage?.(context.user) ?? (authenticated ? "Permission denied" : "Authentication required");
|
|
162
164
|
const reason = decision.reason && decision.reason.length <= MAX_DENIAL_REASON_LENGTH ? decision.reason : defaultMsg;
|
|
163
|
-
const status =
|
|
165
|
+
const status = authenticated ? 403 : 401;
|
|
164
166
|
reply.code(status).send({
|
|
165
|
-
code:
|
|
167
|
+
code: authenticated ? "arc.forbidden" : "arc.unauthorized",
|
|
166
168
|
message: reason,
|
|
167
169
|
status
|
|
168
170
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as conjoinPolicyFilters } from "./filter-merge-
|
|
3
|
-
import { D as toRepositoryFilter } from "./plugin-
|
|
4
|
-
import { i as guessDate, t as coerceByType } from "./fieldTypes-
|
|
5
|
-
import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as conjoinPolicyFilters } from "./filter-merge-UJCgjbZR.mjs";
|
|
3
|
+
import { D as toRepositoryFilter } from "./plugin-8Z1khbAI.mjs";
|
|
4
|
+
import { i as guessDate, t as coerceByType } from "./fieldTypes-f-3TZgR3.mjs";
|
|
5
|
+
import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-63QThRoS.mjs";
|
|
6
6
|
// src/core/aggregation/buildHandler.ts
|
|
7
7
|
/**
|
|
8
8
|
* 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.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-DHrHnT0f.mjs";
|
|
3
|
+
import { t as MemoryCacheStore } from "../memory-B9CFHbA_.mjs";
|
|
4
|
+
import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-CwpEjCwz.mjs";
|
|
5
5
|
// 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.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-BBBkGgwA.mjs";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
// src/plugins/caching.ts
|
|
5
5
|
var caching_exports = /* @__PURE__ */ __exportAll({ default: () => caching_default });
|
package/dist/cleanup/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as defineResource } from "../defineResource-
|
|
3
|
-
import { t as defineModule } from "../module-
|
|
4
|
-
import { g as getUserId } from "../types-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as defineResource } from "../defineResource-DC5UqkQv.mjs";
|
|
3
|
+
import { t as defineModule } from "../module-C0JCsnO7.mjs";
|
|
4
|
+
import { g as getUserId } from "../types-Cunc4shv.mjs";
|
|
5
5
|
import { createPurgeEvidence } from "@classytic/primitives/retention";
|
|
6
6
|
import { canonicalJson, sha256Hex } from "@classytic/primitives/canonical";
|
|
7
7
|
// 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.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "../../constants-Ca2IQFy2.mjs";
|
|
3
|
+
import { n as stringifyMeasureMap } from "../../ResourceRegistry-tlqXSZoK.mjs";
|
|
4
4
|
import { resolve } from "node:path";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
// 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.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as buildOpenApiSpec } from "../../openapi-Dmp7Ipsi.mjs";
|
|
3
|
+
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-DkoSiJsI.mjs";
|
|
4
4
|
import { dirname, resolve } from "node:path";
|
|
5
5
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
6
6
|
// src/cli/commands/docs.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
export { t as generate } from "../../generate-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
export { t as generate } from "../../generate-CLpmzbJ_.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
export { t as init } from "../../init-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
export { t as init } from "../../init-B43DXBpc.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-DkoSiJsI.mjs";
|
|
3
3
|
// 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.52.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-CLpmzbJ_.mjs";
|
|
6
|
+
import { t as init } from "../init-B43DXBpc.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 { n as requestContext, t as getTraceHeaders } from "../requestContext-
|
|
3
|
-
import { n as evictToSize, r as touch } from "../boundedMap-
|
|
4
|
-
import { n as scopedValue, r as workSeedFromEvent, t as runWorkScope } from "../workScope-
|
|
5
|
-
import { t as transactionContext } from "../transactionContext-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as requestContext, t as getTraceHeaders } from "../requestContext-yc7MSgmq.mjs";
|
|
3
|
+
import { n as evictToSize, r as touch } from "../boundedMap-zxGBpXX0.mjs";
|
|
4
|
+
import { n as scopedValue, r as workSeedFromEvent, t as runWorkScope } from "../workScope-DwspXz70.mjs";
|
|
5
|
+
import { t as transactionContext } from "../transactionContext-D0UZFoSy.mjs";
|
|
6
6
|
// 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.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
2
|
import { $t as getEntityIdField, An as ControllerConstructionOptions, Bt as SoftDeleteMixin, F as ResourceDefinition, Gt as BulkExt, Ht as TreeMixin, Jt as QueryResolver, Kt as BulkMixin, Mn as MixinConstructor, Nn as BodySanitizer, On as BaseControllerOptions, P as defineResource, Pn as BodySanitizerConfig, Qt as getEntityId, Rt as BaseController, Ut as SlugExt, Vt as TreeExt, Wt as SlugMixin, Xt as ActionTargetCheck, Yt as QueryResolverConfig, Zt as getActionTarget, an as FetchResult, at as AggregationCacheConfig, ct as AggregationIndexHint, dt as AggregationRateLimit, en as getEntityQuery, ft as AggregationsMap, in as FetchDenialReason, it as AggMeasureShorthand, jn as ListResult, kn as ControllerConfigurableOptions, lt as AggregationMaterializedContext, mt as AggregationFieldTypes, nn as AccessControlConfig, ot as AggregationConfig, pt as AggregationFieldType, qt as BaseCrudController, rn as AccessControlRepository, rt as AggMeasureInput, st as AggregationDateRangeRequirement, tn as AccessControl, ut as AggregationMaterializedResult, zt as SoftDeleteExt } from "../index-DLCcLUQT.mjs";
|
|
3
|
-
import { $ as MAX_SEARCH_LENGTH, A as ResourceSeams, B as DEFAULT_ID_FIELD, C as getControllerScope, D as VariantsResult, E as VariantsMap, F as createCrudRouter, G as DEFAULT_UPDATE_METHOD, H as DEFAULT_MAX_LIMIT, I as createPermissionMiddleware, J as HOOK_PHASES, K as DEFAULT_VERSION_FIELD, L as defineAggregation, M as mergeResourceConfig, N as DefineActionConfig, O as defineResourceVariants, P as defineAction, Q as MAX_REGEX_LENGTH, R as CRUD_OPERATIONS, S as getControllerContext, T as VariantOverride, U as DEFAULT_SORT, V as DEFAULT_LIMIT, W as DEFAULT_TENANT_FIELD, X as HookPhase, Y as HookOperation, Z as MAX_FILTER_DEPTH, _ as nativePolicyFilter, a as formatValidationErrors, b as createFastifyHandler, c as InputSchema, d as RouteInputSlots, et as MUTATION_OPERATIONS, f as crudInput, g as NativePolicyFilter, h as routeInput, i as assertValidConfig, j as SeamedResourceConfig, k as AdapterLike, l as RouteInputIssue, m as parsed, n as ValidateOptions, nt as RESERVED_QUERY_PARAMS, o as validateResourceConfig, p as noPayloadSchema, q as HOOK_OPERATIONS, r as ValidationResult, rt as SYSTEM_FIELDS, s as CrudInput, t as ConfigError, tt as MutationOperation, u as RouteInputOptions, v as collectReadBlockedFields, w as sendControllerResponse, x as createRequestContext, y as isFieldReadable, z as CrudOperation } from "../index-
|
|
3
|
+
import { $ as MAX_SEARCH_LENGTH, A as ResourceSeams, B as DEFAULT_ID_FIELD, C as getControllerScope, D as VariantsResult, E as VariantsMap, F as createCrudRouter, G as DEFAULT_UPDATE_METHOD, H as DEFAULT_MAX_LIMIT, I as createPermissionMiddleware, J as HOOK_PHASES, K as DEFAULT_VERSION_FIELD, L as defineAggregation, M as mergeResourceConfig, N as DefineActionConfig, O as defineResourceVariants, P as defineAction, Q as MAX_REGEX_LENGTH, R as CRUD_OPERATIONS, S as getControllerContext, T as VariantOverride, U as DEFAULT_SORT, V as DEFAULT_LIMIT, W as DEFAULT_TENANT_FIELD, X as HookPhase, Y as HookOperation, Z as MAX_FILTER_DEPTH, _ as nativePolicyFilter, a as formatValidationErrors, b as createFastifyHandler, c as InputSchema, d as RouteInputSlots, et as MUTATION_OPERATIONS, f as crudInput, g as NativePolicyFilter, h as routeInput, i as assertValidConfig, j as SeamedResourceConfig, k as AdapterLike, l as RouteInputIssue, m as parsed, n as ValidateOptions, nt as RESERVED_QUERY_PARAMS, o as validateResourceConfig, p as noPayloadSchema, q as HOOK_OPERATIONS, r as ValidationResult, rt as SYSTEM_FIELDS, s as CrudInput, t as ConfigError, tt as MutationOperation, u as RouteInputOptions, v as collectReadBlockedFields, w as sendControllerResponse, x as createRequestContext, y as isFieldReadable, z as CrudOperation } from "../index-DCH08eqQ.mjs";
|
|
4
4
|
export { AccessControl, type AccessControlConfig, type AccessControlRepository, type ActionTargetCheck, type AdapterLike, type AggMeasureInput, type AggMeasureShorthand, type AggregationCacheConfig, type AggregationConfig, type AggregationDateRangeRequirement, type AggregationFieldType, type AggregationFieldTypes, 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, type CrudInput, CrudOperation, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, DEFAULT_VERSION_FIELD, type DefineActionConfig, type FetchDenialReason, type FetchResult, HOOK_OPERATIONS, HOOK_PHASES, HookOperation, HookPhase, type InputSchema, type ListResult, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, type MixinConstructor, MutationOperation, type NativePolicyFilter, QueryResolver, type QueryResolverConfig, RESERVED_QUERY_PARAMS, ResourceDefinition, type ResourceSeams, type RouteInputIssue, type RouteInputOptions, type RouteInputSlots, SYSTEM_FIELDS, type SeamedResourceConfig, type SlugExt, SlugMixin, type SoftDeleteExt, SoftDeleteMixin, type TreeExt, TreeMixin, type ValidateOptions, type ValidationResult, type VariantOverride, type VariantsMap, type VariantsResult, assertValidConfig, collectReadBlockedFields, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, crudInput, defineAction, defineAggregation, defineResource, defineResourceVariants, formatValidationErrors, getActionTarget, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, mergeResourceConfig, nativePolicyFilter, noPayloadSchema, parsed, routeInput, sendControllerResponse, validateResourceConfig };
|
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 { E as nativePolicyFilter, T as AccessControl, _ as BaseCrudController, a as crudInput, b as isFieldReadable, c as routeInput, d as createPermissionMiddleware, f as BaseController, g as BulkMixin, h as SlugMixin, m as SoftDeleteMixin, o as noPayloadSchema, p as TreeMixin, s as parsed, u as createCrudRouter, v as QueryResolver, w as BodySanitizer, y as collectReadBlockedFields } from "../plugin-
|
|
4
|
-
import { t as defineAggregation } from "../defineAggregation-
|
|
5
|
-
import { C as createFastifyHandler, D as sendControllerResponse, E as getControllerScope, T as getControllerContext, w as createRequestContext } from "../schemaIR-
|
|
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.52.0 | 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-Ca2IQFy2.mjs";
|
|
3
|
+
import { E as nativePolicyFilter, T as AccessControl, _ as BaseCrudController, a as crudInput, b as isFieldReadable, c as routeInput, d as createPermissionMiddleware, f as BaseController, g as BulkMixin, h as SlugMixin, m as SoftDeleteMixin, o as noPayloadSchema, p as TreeMixin, s as parsed, u as createCrudRouter, v as QueryResolver, w as BodySanitizer, y as collectReadBlockedFields } from "../plugin-8Z1khbAI.mjs";
|
|
4
|
+
import { t as defineAggregation } from "../defineAggregation-DqAGb5oI.mjs";
|
|
5
|
+
import { C as createFastifyHandler, D as sendControllerResponse, E as getControllerScope, T as getControllerContext, w as createRequestContext } from "../schemaIR-By8XiNeE.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-M18RhMqi.mjs";
|
|
7
|
+
import { a as ResourceDefinition, i as validateResourceConfig, n as assertValidConfig, r as formatValidationErrors, t as defineResource } from "../defineResource-DC5UqkQv.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, crudInput, defineAction, defineAggregation, defineResource, defineResourceVariants, formatValidationErrors, getActionTarget, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, mergeResourceConfig, nativePolicyFilter, noPayloadSchema, parsed, routeInput, sendControllerResponse, validateResourceConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import "./constants-
|
|
3
|
-
import { t as defineResource } from "./defineResource-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import "./constants-Ca2IQFy2.mjs";
|
|
3
|
+
import { t as defineResource } from "./defineResource-DC5UqkQv.mjs";
|
|
4
4
|
// src/core/defineAction.ts
|
|
5
5
|
/**
|
|
6
6
|
* Build an `ActionDefinition` with a typed handler. The literal schema
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import "./constants-
|
|
4
|
-
import { f as createError, i as NotFoundError, u as ValidationError } from "./errors-
|
|
5
|
-
import { D as sendControllerResponse, b as buildAuthMiddlewareForPermissions, c as buildRouteConfig, d as buildActionPipelineHandler, g as buildRouteHooks, l as resolveRouterPluginMw, m as buildActionPermissionMw, o as tryRegisterRoute, p as resolvePipelineSteps, r as schemaIRToJsonSchemaBranch, s as buildRateLimitConfig, t as actionSchemaIR, u as selectPluginMw, v as routeHookOptions, x as buildArcDecorator } from "./schemaIR-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-BBBkGgwA.mjs";
|
|
3
|
+
import "./constants-Ca2IQFy2.mjs";
|
|
4
|
+
import { f as createError, i as NotFoundError, u as ValidationError } from "./errors-DxpHZBlW.mjs";
|
|
5
|
+
import { D as sendControllerResponse, b as buildAuthMiddlewareForPermissions, c as buildRouteConfig, d as buildActionPipelineHandler, g as buildRouteHooks, l as resolveRouterPluginMw, m as buildActionPermissionMw, o as tryRegisterRoute, p as resolvePipelineSteps, r as schemaIRToJsonSchemaBranch, s as buildRateLimitConfig, t as actionSchemaIR, u as selectPluginMw, v as routeHookOptions, x as buildArcDecorator } from "./schemaIR-By8XiNeE.mjs";
|
|
6
6
|
// src/core/createActionRouter.ts
|
|
7
7
|
var createActionRouter_exports = /* @__PURE__ */ __exportAll({ createActionRouter: () => createActionRouter });
|
|
8
8
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as evaluateAndApplyPermission } from "./authorizationDecision-
|
|
3
|
-
import { u as getRequestScope } from "./types-
|
|
4
|
-
import { f as createError } from "./errors-
|
|
5
|
-
import { g as buildRouteHooks, l as resolveRouterPluginMw, o as tryRegisterRoute, s as buildRateLimitConfig, u as selectPluginMw, v as routeHookOptions, x as buildArcDecorator, y as buildAuthMiddleware } from "./schemaIR-
|
|
6
|
-
import { t as buildAggregationHandler } from "./buildHandler-
|
|
7
|
-
import { n as validateAggregations } from "./validate-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as evaluateAndApplyPermission } from "./authorizationDecision-DKmH4tZ-.mjs";
|
|
3
|
+
import { u as getRequestScope } from "./types-Cunc4shv.mjs";
|
|
4
|
+
import { f as createError } from "./errors-DxpHZBlW.mjs";
|
|
5
|
+
import { g as buildRouteHooks, l as resolveRouterPluginMw, o as tryRegisterRoute, s as buildRateLimitConfig, u as selectPluginMw, v as routeHookOptions, x as buildArcDecorator, y as buildAuthMiddleware } from "./schemaIR-By8XiNeE.mjs";
|
|
6
|
+
import { t as buildAggregationHandler } from "./buildHandler-ZDV6LRZ_.mjs";
|
|
7
|
+
import { n as validateAggregations } from "./validate-63QThRoS.mjs";
|
|
8
8
|
// src/core/aggregation/createAggregationRouter.ts
|
|
9
9
|
/**
|
|
10
10
|
* Register one Fastify route per aggregation. No-op when the map is
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
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 { t as runObservingSend } from "./observeSend-
|
|
6
|
-
import { r as initRuntimeCapabilityRegistry, t as auditRuntimeCapabilities } from "./runtimeCapabilities-
|
|
7
|
-
import { a as runShutdown, t as initShutdownRegistry } from "./shutdown-
|
|
8
|
-
import { n as isScopeAwareKeyGenerator, t as createTenantKeyGenerator } from "./rateLimitKey-
|
|
9
|
-
import { i as resolveResourceRateLimiter, n as markRateLimitingDisabled } from "./resourceRateLimit-
|
|
10
|
-
import { i as markArcRootValidator, r as arcValidatorBuilder, t as arcAjvCustomOptions } from "./routeValidator-
|
|
11
|
-
import { c as createRequestIdGenerator, r as mergeHealthChecks } from "./health-
|
|
12
|
-
import { t as parseJsonBody } from "./jsonBody-
|
|
13
|
-
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-
|
|
14
|
-
import { c as wrapWithAttribution, f as defineEvent, l as wrapWithBoundary, r as CRUD_EVENT_SCHEMA } from "./eventTypes-
|
|
15
|
-
import { r as withSubscriberId } from "./subscriberIdentity-
|
|
16
|
-
import { r as getOptionalModuleExports } from "./module-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-BBBkGgwA.mjs";
|
|
3
|
+
import { a as enterArcLoggerScope, i as runWithArcLogger, n as configureArcLogger, r as createPinoWriter, t as arcLog } from "./logger-DJwz_-Pl.mjs";
|
|
4
|
+
import { n as PUBLIC_SCOPE } from "./types-Cunc4shv.mjs";
|
|
5
|
+
import { t as runObservingSend } from "./observeSend-DfNkdGww.mjs";
|
|
6
|
+
import { r as initRuntimeCapabilityRegistry, t as auditRuntimeCapabilities } from "./runtimeCapabilities-B8IT7xiQ.mjs";
|
|
7
|
+
import { a as runShutdown, t as initShutdownRegistry } from "./shutdown-Cf-27xsS.mjs";
|
|
8
|
+
import { n as isScopeAwareKeyGenerator, t as createTenantKeyGenerator } from "./rateLimitKey-D9dl3FQn.mjs";
|
|
9
|
+
import { i as resolveResourceRateLimiter, n as markRateLimitingDisabled } from "./resourceRateLimit-PQaY3HW1.mjs";
|
|
10
|
+
import { i as markArcRootValidator, r as arcValidatorBuilder, t as arcAjvCustomOptions } from "./routeValidator-fuG51bQA.mjs";
|
|
11
|
+
import { c as createRequestIdGenerator, r as mergeHealthChecks } from "./health-W4S2yFBL.mjs";
|
|
12
|
+
import { t as parseJsonBody } from "./jsonBody-CkKs6dA_.mjs";
|
|
13
|
+
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-CbDTFbTj.mjs";
|
|
14
|
+
import { c as wrapWithAttribution, f as defineEvent, l as wrapWithBoundary, r as CRUD_EVENT_SCHEMA } from "./eventTypes-D-pFtqT1.mjs";
|
|
15
|
+
import { r as withSubscriberId } from "./subscriberIdentity-DSqCh38x.mjs";
|
|
16
|
+
import { r as getOptionalModuleExports } from "./module-C0JCsnO7.mjs";
|
|
17
17
|
import { isProductionEnv, readEnv } from "@classytic/primitives/environment";
|
|
18
18
|
import Fastify from "fastify";
|
|
19
19
|
import qs from "qs";
|
|
@@ -766,7 +766,7 @@ async function registerArcCore(fastify, config, trackPlugin) {
|
|
|
766
766
|
await fastify.register(arcCorePlugin, { emitEvents: config.arcPlugins?.emitEvents !== false });
|
|
767
767
|
trackPlugin("arc-core");
|
|
768
768
|
if (config.arcPlugins?.events !== false) {
|
|
769
|
-
const { default: eventPlugin } = await import("./eventPlugin-
|
|
769
|
+
const { default: eventPlugin } = await import("./eventPlugin-ZsIQPRso.mjs").then((n) => n.r);
|
|
770
770
|
const eventOpts = typeof config.arcPlugins?.events === "object" ? config.arcPlugins.events : {};
|
|
771
771
|
await fastify.register(eventPlugin, {
|
|
772
772
|
/**
|
|
@@ -821,15 +821,15 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules, moduleH
|
|
|
821
821
|
trackPlugin("arc-graceful-shutdown", shutdownOpts);
|
|
822
822
|
}
|
|
823
823
|
if (config.arcPlugins?.caching) {
|
|
824
|
-
const { default: cachingPlugin } = await import("./caching-
|
|
824
|
+
const { default: cachingPlugin } = await import("./caching-DceUN9Xk.mjs").then((n) => n.n);
|
|
825
825
|
const opts = config.arcPlugins.caching === true ? {} : config.arcPlugins.caching;
|
|
826
826
|
await fastify.register(cachingPlugin, opts);
|
|
827
827
|
trackPlugin("arc-caching", opts);
|
|
828
828
|
}
|
|
829
829
|
if (config.arcPlugins?.queryCache) {
|
|
830
|
-
const { queryCachePlugin } = await import("./queryCachePlugin-
|
|
830
|
+
const { queryCachePlugin } = await import("./queryCachePlugin-CwpEjCwz.mjs").then((n) => n.n);
|
|
831
831
|
const opts = config.arcPlugins.queryCache === true ? {} : config.arcPlugins.queryCache;
|
|
832
|
-
const store = config.stores?.queryCache ?? new (await (import("./memory-
|
|
832
|
+
const store = config.stores?.queryCache ?? new (await (import("./memory-B9CFHbA_.mjs").then((n) => n.n))).MemoryCacheStore();
|
|
833
833
|
await fastify.register(queryCachePlugin, {
|
|
834
834
|
store,
|
|
835
835
|
...opts
|
|
@@ -839,7 +839,7 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules, moduleH
|
|
|
839
839
|
if (config.arcPlugins?.sse) {
|
|
840
840
|
if (config.arcPlugins?.events === false) fastify.log.warn("SSE plugin requires events plugin (arcPlugins.events). SSE disabled.");
|
|
841
841
|
else {
|
|
842
|
-
const { default: ssePlugin } = await import("./sse-
|
|
842
|
+
const { default: ssePlugin } = await import("./sse-C3bj5qWi.mjs").then((n) => n.n);
|
|
843
843
|
const opts = config.arcPlugins.sse === true ? {} : config.arcPlugins.sse;
|
|
844
844
|
await fastify.register(ssePlugin, opts);
|
|
845
845
|
trackPlugin("arc-sse", opts);
|
|
@@ -848,20 +848,20 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules, moduleH
|
|
|
848
848
|
if (config.arcPlugins?.realtime) {
|
|
849
849
|
if (config.arcPlugins?.events === false) fastify.log.warn("Realtime plugin requires events plugin (arcPlugins.events). Realtime disabled.");
|
|
850
850
|
else {
|
|
851
|
-
const { default: realtimePlugin } = await import("./realtime-
|
|
851
|
+
const { default: realtimePlugin } = await import("./realtime-Dvu8ES2z.mjs").then((n) => n.n);
|
|
852
852
|
const opts = config.arcPlugins.realtime === true ? {} : config.arcPlugins.realtime;
|
|
853
853
|
await fastify.register(realtimePlugin, opts);
|
|
854
854
|
trackPlugin("arc-realtime", opts);
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
857
|
if (config.arcPlugins?.metrics) {
|
|
858
|
-
const { default: metricsPlugin } = await import("./metrics-
|
|
858
|
+
const { default: metricsPlugin } = await import("./metrics-DSKv-T9K.mjs").then((n) => n.n);
|
|
859
859
|
const opts = config.arcPlugins.metrics === true ? {} : config.arcPlugins.metrics;
|
|
860
860
|
await fastify.register(metricsPlugin, opts);
|
|
861
861
|
trackPlugin("arc-metrics", opts);
|
|
862
862
|
}
|
|
863
863
|
if (config.arcPlugins?.versioning) {
|
|
864
|
-
const { default: versioningPlugin } = await import("./versioning-
|
|
864
|
+
const { default: versioningPlugin } = await import("./versioning-f2YGmh4i.mjs").then((n) => n.n);
|
|
865
865
|
await fastify.register(versioningPlugin, config.arcPlugins.versioning);
|
|
866
866
|
trackPlugin("arc-versioning", config.arcPlugins.versioning);
|
|
867
867
|
}
|
|
@@ -938,7 +938,7 @@ async function registerAuth(fastify, config, trackPlugin) {
|
|
|
938
938
|
*/
|
|
939
939
|
async function registerElevation(fastify, config, trackPlugin) {
|
|
940
940
|
if (!config.elevation) return;
|
|
941
|
-
const { elevationPlugin } = await import("./elevation-
|
|
941
|
+
const { elevationPlugin } = await import("./elevation-DiXVg98q.mjs").then((n) => n.n);
|
|
942
942
|
await fastify.register(elevationPlugin, config.elevation);
|
|
943
943
|
trackPlugin("arc-elevation", config.elevation);
|
|
944
944
|
fastify.log.debug("Elevation plugin enabled");
|
|
@@ -953,7 +953,7 @@ async function registerElevation(fastify, config, trackPlugin) {
|
|
|
953
953
|
*/
|
|
954
954
|
async function registerErrorHandler(fastify, config, trackPlugin, moduleErrorMappers) {
|
|
955
955
|
if (config.errorHandler === false) return;
|
|
956
|
-
const { errorHandlerPlugin } = await import("./errorHandler-
|
|
956
|
+
const { errorHandlerPlugin } = await import("./errorHandler-BUTm9P_f.mjs").then((n) => n.r);
|
|
957
957
|
/**
|
|
958
958
|
* DISCLOSURE DEFAULTS MERGE — they used to be REPLACED, and that was two bugs.
|
|
959
959
|
*
|
|
@@ -1172,7 +1172,7 @@ async function registerResources(fastify, config, preResolvedModules, skippedBri
|
|
|
1172
1172
|
let discoveryPath;
|
|
1173
1173
|
let discoveryYieldedZero = false;
|
|
1174
1174
|
if (resolvedResources === void 0 && config.resourceDir) {
|
|
1175
|
-
const { loadResources } = await import("./loadResources-
|
|
1175
|
+
const { loadResources } = await import("./loadResources-CFdzAWQZ.mjs").then((n) => n.n);
|
|
1176
1176
|
const { resolve, dirname } = await import("node:path");
|
|
1177
1177
|
const { fileURLToPath } = await import("node:url");
|
|
1178
1178
|
const rawDir = config.resourceDir;
|
|
@@ -1297,7 +1297,7 @@ Resources supplied by "${m.name}": ${provided}.`);
|
|
|
1297
1297
|
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.");
|
|
1298
1298
|
const frozenJobs = Object.freeze(scheduledJobs.map((job) => Object.freeze({ ...job })));
|
|
1299
1299
|
const scheduleOptions = typeof config.arcPlugins?.schedules === "object" ? config.arcPlugins.schedules : {};
|
|
1300
|
-
const { default: schedulesPlugin } = await import("./schedules-
|
|
1300
|
+
const { default: schedulesPlugin } = await import("./schedules-0-aS4jDV.mjs").then((n) => n.n);
|
|
1301
1301
|
await fastify.register(schedulesPlugin, {
|
|
1302
1302
|
...scheduleOptions,
|
|
1303
1303
|
schedules: frozenJobs
|
|
@@ -2291,7 +2291,7 @@ async function buildApp(options, loggerScope, onInstance, onBootDisposer) {
|
|
|
2291
2291
|
await registerErrorHandler(fastify, config, trackPlugin, moduleErrorMappers);
|
|
2292
2292
|
await registerResources(fastify, config, resolvedModules, skippedBridges);
|
|
2293
2293
|
if (config.replyHelpers) {
|
|
2294
|
-
const { replyHelpersPlugin } = await import("./replyHelpers-
|
|
2294
|
+
const { replyHelpersPlugin } = await import("./replyHelpers-CSByAX_Z.mjs").then((n) => n.n);
|
|
2295
2295
|
await fastify.register(replyHelpersPlugin);
|
|
2296
2296
|
}
|
|
2297
2297
|
if (config.serializeBigInt) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as arcLog } from "./logger-
|
|
3
|
-
import { C as isWriteVerbCapable, S as detectOverriddenWriteSlots, f as BaseController, i as resolveOpenApiSchemas, l as autoInjectTenantFieldRules, t as buildResourcePlugin } from "./plugin-
|
|
4
|
-
import { m as MUTATION_OPERATIONS, t as CRUD_OPERATIONS } from "./constants-
|
|
5
|
-
import { B as requireAuth } from "./permissions-
|
|
6
|
-
import { n as getAvailablePresets, t as applyPresets } from "./presets-
|
|
7
|
-
import { t as pluralize } from "./pluralize-
|
|
8
|
-
import { a as isZodSchema, i as isJsonSchema } from "./schemaConverter-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as arcLog } from "./logger-DJwz_-Pl.mjs";
|
|
3
|
+
import { C as isWriteVerbCapable, S as detectOverriddenWriteSlots, f as BaseController, i as resolveOpenApiSchemas, l as autoInjectTenantFieldRules, t as buildResourcePlugin } from "./plugin-8Z1khbAI.mjs";
|
|
4
|
+
import { m as MUTATION_OPERATIONS, t as CRUD_OPERATIONS } from "./constants-Ca2IQFy2.mjs";
|
|
5
|
+
import { B as requireAuth } from "./permissions-Cga6KBOX.mjs";
|
|
6
|
+
import { n as getAvailablePresets, t as applyPresets } from "./presets-D28IABZe.mjs";
|
|
7
|
+
import { t as pluralize } from "./pluralize-D4vcPLVs.mjs";
|
|
8
|
+
import { a as isZodSchema, i as isJsonSchema } from "./schemaConverter-Cs3SwP4R.mjs";
|
|
9
9
|
import { isReadOnlyRepo } from "@classytic/repo-core/repository";
|
|
10
10
|
import { readEnv } from "@classytic/primitives/environment";
|
|
11
11
|
// 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 openapi_default, t as buildOpenApiSpec } from "../openapi-
|
|
3
|
-
import { n as getUserRoles } from "../userHelpers-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as openapi_default, t as buildOpenApiSpec } from "../openapi-Dmp7Ipsi.mjs";
|
|
3
|
+
import { n as getUserRoles } from "../userHelpers-cT5j1kgp.mjs";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
// src/docs/scalar.ts
|
|
6
6
|
const scalarPlugin = async (fastify, opts = {}) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
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.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-BBBkGgwA.mjs";
|
|
3
|
+
import { t as arcLog } from "./logger-DJwz_-Pl.mjs";
|
|
4
|
+
import { n as requireSingleHeaderValue } from "./headers-Bh47h0XH.mjs";
|
|
5
|
+
import { n as getUserRoles } from "./userHelpers-cT5j1kgp.mjs";
|
|
6
6
|
import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
|
|
7
7
|
import fp from "fastify-plugin";
|
|
8
8
|
// src/scope/elevation.ts
|