@classytic/arc 2.49.0 → 2.50.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-DbHZK230.mjs → EventTransport-B18mcj_M.mjs} +2 -2
- package/dist/{HookSystem-DMoeJ6Do.mjs → HookSystem-FUBaLTRm.mjs} +2 -2
- package/dist/{ResourceRegistry-CP-iTcKy.mjs → ResourceRegistry-C5NM07fZ.mjs} +2 -2
- package/dist/{acquire-CB0va87C.mjs → acquire-MHCnbDtH.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/{authorizationDecision-DHO94aV2.mjs → authorizationDecision-BD8K4jdQ.mjs} +4 -4
- package/dist/{boundedMap-C51EUUOm.mjs → boundedMap-CuCwos_X.mjs} +1 -1
- package/dist/{buildHandler-9DuwEKvr.mjs → buildHandler-BttjNkTM.mjs} +5 -5
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-COTX3sDa.mjs → caching-CxUQLHfR.mjs} +2 -2
- package/dist/{claimed-C7T1nHlo.mjs → claimed-CQ4ZpD8K.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-DOnfMd7i.mjs → constants-BZFsZwJh.mjs} +1 -1
- package/dist/context/index.mjs +5 -5
- package/dist/core/index.mjs +7 -7
- package/dist/{core-BoEdFDDw.mjs → core-DWA1-5IE.mjs} +3 -3
- package/dist/{createActionRouter-CpTn15dm.mjs → createActionRouter-fP3l2xVF.mjs} +5 -5
- package/dist/{createAggregationRouter-CD_Hydp0.mjs → createAggregationRouter-BJZeOmBa.mjs} +7 -7
- package/dist/{createApp-Be6XTGD9.mjs → createApp-Db9JRumw.mjs} +29 -29
- package/dist/{defineAggregation-BI5pRb8c.mjs → defineAggregation-BskqRz8M.mjs} +1 -1
- package/dist/{defineResource-BAzNu5Um.mjs → defineResource-B2vTvKzW.mjs} +8 -8
- package/dist/discovery/index.mjs +1 -1
- package/dist/docs/index.mjs +3 -3
- package/dist/{elevation-DupGuM41.mjs → elevation-XoY0C73T.mjs} +5 -5
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-DA03vRqp.mjs → errorHandler-BYI-JQMm.mjs} +3 -3
- package/dist/{errors-BpYV859Y.mjs → errors-3xaK0i9n.mjs} +1 -1
- package/dist/{eventPlugin-D7LYtYzL.mjs → eventPlugin-CVQ9ddnL.mjs} +8 -8
- package/dist/{eventTypes-BqA-N-Uz.mjs → eventTypes-UPYg7gW1.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.mjs +6 -6
- package/dist/{fieldTypes-EFWxCkZ5.mjs → fieldTypes-CxRvCaaZ.mjs} +2 -2
- package/dist/{fields-CT1Erg7o.mjs → fields-DLFcJiDe.mjs} +1 -1
- package/dist/{filter-merge-B1eJ1pMx.mjs → filter-merge-Bvjk_8dV.mjs} +1 -1
- package/dist/{generate-Cr0ULavs.mjs → generate-0OpCUjUv.mjs} +2 -2
- package/dist/{headers-D4bncIOf.mjs → headers-BROW65-r.mjs} +2 -2
- package/dist/{health-BoFxrkJE.mjs → health-Cfh-kYI_.mjs} +1 -1
- package/dist/{health-DN_pUVMX.mjs → health-Cy6aOg1i.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.mjs +11 -11
- package/dist/{init-C4a24wD2.mjs → init-D7PQcvvL.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-DoTt5BS6.mjs → jsonBody-C0oREwUc.mjs} +2 -2
- package/dist/{keys--l9n7aOC.mjs → keys-CGlPoVSn.mjs} +1 -1
- package/dist/{loadResources-rygByIQA.mjs → loadResources-Oi47dogA.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-ItNBIQ5w.mjs → loadResourcesFromEntry-BW-LexBz.mjs} +2 -2
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-UbknHqHy.mjs → logger-BagW7_YA.mjs} +1 -1
- package/dist/{mcpPlugin-CTkk4RP8.mjs → mcpPlugin-C6-wFsOX.mjs} +21 -21
- package/dist/{memory-C47xVsjX.mjs → memory-Bl7kv6TS.mjs} +3 -3
- package/dist/{metrics-TJyAb1Xk.mjs → metrics-CqnMJKrJ.mjs} +3 -3
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module-CWiqsXnh.mjs → module-lbEbHUfI.mjs} +1 -1
- package/dist/{multipartBody-BdG1qbn1.mjs → multipartBody-CqNezaB3.mjs} +1 -1
- package/dist/{observeSend-DrA3ADFN.mjs → observeSend-BjilzlYl.mjs} +1 -1
- package/dist/{openapi-D6MAbYpv.mjs → openapi-DXNbadgd.mjs} +6 -6
- package/dist/outbox-admin/index.mjs +5 -5
- package/dist/{outbox-module-D5QABFQW.mjs → outbox-module-k5rIszQ4.mjs} +7 -7
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-CFsmdYUt.mjs → permissions-BJylQopQ.mjs} +9 -9
- package/dist/{pipe-B_05AgGt.mjs → pipe-D1cq8hET.mjs} +2 -2
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-BnlNJhrj.mjs → plan-iEgaS5_H.mjs} +1 -1
- package/dist/{plugin-CrMPYbdj.mjs → plugin-DsLr6L4O.mjs} +24 -24
- 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-oVIxJ4CY.mjs → pluralize-CX4ZvwCa.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-CUd3L7v6.mjs → presets-D_suT4OY.mjs} +4 -4
- package/dist/{projection-DowJlIto.mjs → projection-CmjGjFih.mjs} +2 -2
- package/dist/{purger.types-BjKy8869.mjs → purger.types-CZwkTZ7B.mjs} +1 -1
- package/dist/{queryCachePlugin-BvB3k_Fh.mjs → queryCachePlugin-BDOPEAmH.mjs} +6 -6
- package/dist/{rateLimitKey-56nH1cWN.mjs → rateLimitKey-igF1x64n.mjs} +1 -1
- package/dist/{realtime-DXGBPtYK.mjs → realtime-Cq_ugiWw.mjs} +67 -11
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-Biz-6sEZ.mjs → registry-DmF9Akvn.mjs} +2 -2
- package/dist/{relay-DEIoMntZ.mjs → relay-DA89IhFt.mjs} +5 -5
- package/dist/{renewingLease-BCJpW9-u.mjs → renewingLease-DBtGUt8T.mjs} +1 -1
- package/dist/{replyHelpers-DliJNb0-.mjs → replyHelpers-CUbeUc5q.mjs} +2 -2
- package/dist/{requestContext-tUgLt9Ky.mjs → requestContext-DO9Qv0gw.mjs} +1 -1
- package/dist/{requirement-0l2DApiQ.mjs → requirement-C3GaQmkR.mjs} +1 -1
- package/dist/{resourceRateLimit-iSXF8rLH.mjs → resourceRateLimit-KKn-sFhb.mjs} +2 -2
- package/dist/{rolldown-runtime-gKJR3o-6.mjs → rolldown-runtime-Ck1Tj4Ax.mjs} +1 -1
- package/dist/{routeValidator-xNYA4rr1.mjs → routeValidator-BF7n34xV.mjs} +1 -1
- package/dist/{runtimeCapabilities-BQK-GrYe.mjs → runtimeCapabilities-D0A4kkrC.mjs} +1 -1
- package/dist/{schedules-D9iMVFhF.mjs → schedules-CLrQRSTt.mjs} +5 -5
- package/dist/{schemaConverter-cIh4oX9a.mjs → schemaConverter-JEmU21fu.mjs} +2 -2
- package/dist/{schemaIR-BsY4y9VP.mjs → schemaIR-wOffQlbq.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-QyhM9w8z.mjs → scope-CcTMRd7s.mjs} +4 -4
- package/dist/{shutdown-BM7Q0h4B.mjs → shutdown-BIR-QBYM.mjs} +1 -1
- package/dist/{streamFrames-B3ZJfI02.mjs → simpleEqualityMatcher-DqqJqovq.mjs} +2 -19
- package/dist/{sse-ofvlcTQQ.mjs → sse-OEuPpgss.mjs} +7 -7
- package/dist/{sseStream-BxQW7hPq.mjs → sseStream-DknHE2K5.mjs} +2 -2
- package/dist/{store-helpers-_FRhHDyv.mjs → store-helpers-D4vtEXt2.mjs} +1 -1
- package/dist/{streaming-HZr63UiM.mjs → streaming-CcIpcx02.mjs} +1 -1
- package/dist/{subscriberIdentity-DSgnoT_D.mjs → subscriberIdentity-PO6kimAl.mjs} +1 -1
- package/dist/{tenancy-_ukT0oBt.mjs → tenancy-CH2Kuksc.mjs} +2 -2
- package/dist/{tenantPreparation-DSlQI53c.mjs → tenantPreparation-BTGpblQW.mjs} +4 -4
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- 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-Z8p-Zlw1.mjs → timing-Dii5X7AP.mjs} +1 -1
- package/dist/{transactionContext-DBbSTfY3.mjs → transactionContext-DMPhYEOt.mjs} +1 -1
- package/dist/{typeGuards-_6nNQqgq.mjs → typeGuards-C1o_XEyp.mjs} +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-CrOlZ4rY.mjs → types-BuV_cFqT.mjs} +4 -4
- package/dist/usage/index.mjs +4 -4
- package/dist/{userHelpers-CBKx3XJN.mjs → userHelpers-D4m_pLSC.mjs} +1 -1
- package/dist/utils/index.d.mts +2 -48
- package/dist/utils/index.mjs +13 -13
- package/dist/{utils--HE8R8sH.mjs → utils-CxLMXGn5.mjs} +7 -7
- package/dist/{validate-BUeE2MLR.mjs → validate-CZ975J8N.mjs} +3 -3
- package/dist/{versioning-qYgqwOhL.mjs → versioning-B2_8SBZo.mjs} +3 -3
- package/dist/{workScope-C-1QHNmV.mjs → workScope-B3W3r35s.mjs} +2 -2
- package/package.json +3 -3
- package/skills/arc/references/api-reference.md +1 -1
- package/skills/arc/references/production-realtime.md +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { C as isService, S as isOrgInScope, a as getDPoPJkt, b as isElevated, d as getScopeContext, f as getScopeContextMap, g as getUserId, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, u as getRequestScope, v as hasOrgAccess, x as isMember } from "./types-
|
|
4
|
-
import { i as normalizeToDecision } from "./authorizationDecision-
|
|
5
|
-
import { t as conjoinPolicyFilters } from "./filter-merge-
|
|
6
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
7
|
-
import { t as MemoryCacheStore } from "./memory-
|
|
8
|
-
import { t as arcLog } from "./logger-
|
|
9
|
-
import { n as declareRuntimeCapability } from "./runtimeCapabilities-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Ck1Tj4Ax.mjs";
|
|
3
|
+
import { C as isService, S as isOrgInScope, a as getDPoPJkt, b as isElevated, d as getScopeContext, f as getScopeContextMap, g as getUserId, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, u as getRequestScope, v as hasOrgAccess, x as isMember } from "./types-BuV_cFqT.mjs";
|
|
4
|
+
import { i as normalizeToDecision } from "./authorizationDecision-BD8K4jdQ.mjs";
|
|
5
|
+
import { t as conjoinPolicyFilters } from "./filter-merge-Bvjk_8dV.mjs";
|
|
6
|
+
import { n as getUserRoles } from "./userHelpers-D4m_pLSC.mjs";
|
|
7
|
+
import { t as MemoryCacheStore } from "./memory-Bl7kv6TS.mjs";
|
|
8
|
+
import { t as arcLog } from "./logger-BagW7_YA.mjs";
|
|
9
|
+
import { n as declareRuntimeCapability } from "./runtimeCapabilities-D0A4kkrC.mjs";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
11
|
// src/permissions/context.ts
|
|
12
12
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as ForbiddenError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as ForbiddenError } from "./errors-3xaK0i9n.mjs";
|
|
3
3
|
// src/pipeline/pipe.ts
|
|
4
4
|
/**
|
|
5
5
|
* Compose pipeline steps into an ordered array.
|
package/dist/pipeline/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as pipe, t as executePipeline } from "../pipe-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as pipe, t as executePipeline } from "../pipe-D1cq8hET.mjs";
|
|
3
3
|
// src/pipeline/guard.ts
|
|
4
4
|
/**
|
|
5
5
|
* Create a named guard.
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { g as SYSTEM_FIELDS, o as DEFAULT_TENANT_FIELD, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS } from "./constants-
|
|
3
|
-
import { t as arcLog } from "./logger-
|
|
4
|
-
import { t as conjoinPolicyFilters } from "./filter-merge-
|
|
5
|
-
import { d as createDomainError, f as createError, i as NotFoundError, p as isArcError, r as ForbiddenError, u as ValidationError } from "./errors-
|
|
6
|
-
import {
|
|
7
|
-
import { n as requireSingleHeaderValue } from "./headers-
|
|
8
|
-
import { n as getUserRoles, t as getUserId } from "./userHelpers-
|
|
9
|
-
import { b as isElevated, c as getOrgId, n as PUBLIC_SCOPE, x as isMember } from "./types-
|
|
10
|
-
import { r as resolveTenancy } from "./tenancy-
|
|
11
|
-
import { t as buildQueryKey } from "./keys
|
|
12
|
-
import { t as transactionContext } from "./transactionContext-
|
|
13
|
-
import { a as resolveEffectiveRoles, n as applyFieldWritePermissions } from "./fields-
|
|
14
|
-
import { O as ArcQueryParser, b as getDefaultCrudSchemas } from "./utils
|
|
15
|
-
import { n as convertRouteSchema, r as ensureSchemaConverter, t as convertOpenApiSchemas } from "./schemaConverter-
|
|
16
|
-
import { i as pipeUIMessageStreamToReply, r as isReadableStream } from "./streaming-
|
|
17
|
-
import { C as createFastifyHandler, S as createCrudHandlers, _ as resolveRoutePreHandlers, a as resolveActionPermission, c as buildRouteConfig, f as buildPipelineHandler, g as buildRouteHooks, h as buildCrudPermissionMw, l as resolveRouterPluginMw, n as normalizeSchemaIR, o as tryRegisterRoute, p as resolvePipelineSteps, s as buildRateLimitConfig, u as selectPluginMw, v as routeHookOptions, w as createRequestContext, x as buildArcDecorator, y as buildAuthMiddleware } from "./schemaIR-
|
|
18
|
-
import { a as withoutTenantInjection } from "./tenantPreparation-
|
|
19
|
-
import { t as hasEvents } from "./typeGuards-
|
|
20
|
-
import { n as idempotencyConfigProblem } from "./requirement-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { g as SYSTEM_FIELDS, o as DEFAULT_TENANT_FIELD, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS } from "./constants-BZFsZwJh.mjs";
|
|
3
|
+
import { t as arcLog } from "./logger-BagW7_YA.mjs";
|
|
4
|
+
import { t as conjoinPolicyFilters } from "./filter-merge-Bvjk_8dV.mjs";
|
|
5
|
+
import { d as createDomainError, f as createError, i as NotFoundError, p as isArcError, r as ForbiddenError, u as ValidationError } from "./errors-3xaK0i9n.mjs";
|
|
6
|
+
import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-DqqJqovq.mjs";
|
|
7
|
+
import { n as requireSingleHeaderValue } from "./headers-BROW65-r.mjs";
|
|
8
|
+
import { n as getUserRoles, t as getUserId } from "./userHelpers-D4m_pLSC.mjs";
|
|
9
|
+
import { b as isElevated, c as getOrgId, n as PUBLIC_SCOPE, x as isMember } from "./types-BuV_cFqT.mjs";
|
|
10
|
+
import { r as resolveTenancy } from "./tenancy-CH2Kuksc.mjs";
|
|
11
|
+
import { t as buildQueryKey } from "./keys-CGlPoVSn.mjs";
|
|
12
|
+
import { t as transactionContext } from "./transactionContext-DMPhYEOt.mjs";
|
|
13
|
+
import { a as resolveEffectiveRoles, n as applyFieldWritePermissions } from "./fields-DLFcJiDe.mjs";
|
|
14
|
+
import { O as ArcQueryParser, b as getDefaultCrudSchemas } from "./utils-CxLMXGn5.mjs";
|
|
15
|
+
import { n as convertRouteSchema, r as ensureSchemaConverter, t as convertOpenApiSchemas } from "./schemaConverter-JEmU21fu.mjs";
|
|
16
|
+
import { i as pipeUIMessageStreamToReply, r as isReadableStream } from "./streaming-CcIpcx02.mjs";
|
|
17
|
+
import { C as createFastifyHandler, S as createCrudHandlers, _ as resolveRoutePreHandlers, a as resolveActionPermission, c as buildRouteConfig, f as buildPipelineHandler, g as buildRouteHooks, h as buildCrudPermissionMw, l as resolveRouterPluginMw, n as normalizeSchemaIR, o as tryRegisterRoute, p as resolvePipelineSteps, s as buildRateLimitConfig, u as selectPluginMw, v as routeHookOptions, w as createRequestContext, x as buildArcDecorator, y as buildAuthMiddleware } from "./schemaIR-wOffQlbq.mjs";
|
|
18
|
+
import { a as withoutTenantInjection } from "./tenantPreparation-BTGpblQW.mjs";
|
|
19
|
+
import { t as hasEvents } from "./typeGuards-C1o_XEyp.mjs";
|
|
20
|
+
import { n as idempotencyConfigProblem } from "./requirement-C3GaQmkR.mjs";
|
|
21
21
|
import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
|
|
22
22
|
import { policyRecordToFilter } from "@classytic/repo-core/filter";
|
|
23
23
|
import { retryingTransaction } from "@classytic/repo-core/repository";
|
|
@@ -3216,7 +3216,7 @@ function buildResourcePlugin(resource) {
|
|
|
3216
3216
|
extensions: resource.extensions
|
|
3217
3217
|
});
|
|
3218
3218
|
if (resource.actions && Object.keys(resource.actions).length > 0) {
|
|
3219
|
-
const { createActionRouter } = await import("./createActionRouter-
|
|
3219
|
+
const { createActionRouter } = await import("./createActionRouter-fP3l2xVF.mjs").then((n) => n.n);
|
|
3220
3220
|
const actionConfig = normalizeActionsToRouterConfig(resource.actions, resource.actionPermissions, resource.tag, resource.permissions, resource.name, typedInstance.log);
|
|
3221
3221
|
const actionTarget = resolveActionTargetFence(resource, actionConfig);
|
|
3222
3222
|
createActionRouter(typedInstance, {
|
|
@@ -3237,9 +3237,9 @@ function buildResourcePlugin(resource) {
|
|
|
3237
3237
|
}
|
|
3238
3238
|
if (resource.aggregations && Object.keys(resource.aggregations).length > 0) {
|
|
3239
3239
|
const [{ createAggregationRouter }, { adapterSupportsAggregate, ArcAggregationConfigError }, { fieldTypesFromOpenApiSchemas }] = await Promise.all([
|
|
3240
|
-
import("./createAggregationRouter-
|
|
3241
|
-
import("./validate-
|
|
3242
|
-
import("./fieldTypes-
|
|
3240
|
+
import("./createAggregationRouter-BJZeOmBa.mjs"),
|
|
3241
|
+
import("./validate-CZ975J8N.mjs").then((n) => n.r),
|
|
3242
|
+
import("./fieldTypes-CxRvCaaZ.mjs").then((n) => n.r)
|
|
3243
3243
|
]);
|
|
3244
3244
|
const repoForAgg = resource.controller?.repository ?? resource.repository;
|
|
3245
3245
|
if (!adapterSupportsAggregate(repoForAgg)) {
|
package/dist/plugins/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { m as MUTATION_OPERATIONS } from "../constants-
|
|
3
|
-
import { n as requestContext } from "../requestContext-
|
|
4
|
-
import { t as HookSystem } from "../HookSystem-
|
|
5
|
-
import { t as ResourceRegistry } from "../ResourceRegistry-
|
|
6
|
-
import { c as getOrgId } from "../types-
|
|
7
|
-
import { t as hasEvents } from "../typeGuards-
|
|
8
|
-
import { a as registerSseStats, i as createSseConnectionGauge } from "../sseStream-
|
|
9
|
-
import { t as caching_default } from "../caching-
|
|
10
|
-
import { i as createMemoryDailyLedger, r as createDailyGate, t as schedules_default } from "../schedules-
|
|
11
|
-
import { n as errorHandlerPlugin, t as defaultIsDuplicateKeyError } from "../errorHandler-
|
|
12
|
-
import { c as createRequestIdGenerator, l as requestId_default, n as health_default, u as sanitizeRequestId } from "../health-
|
|
13
|
-
import { t as metrics_default } from "../metrics-
|
|
14
|
-
import { t as arcLog } from "../logger-
|
|
15
|
-
import { t as realtime_default } from "../realtime-
|
|
16
|
-
import { t as replyHelpersPlugin } from "../replyHelpers-
|
|
17
|
-
import { t as sse_default } from "../sse-
|
|
18
|
-
import { t as versioning_default } from "../versioning-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { m as MUTATION_OPERATIONS } from "../constants-BZFsZwJh.mjs";
|
|
3
|
+
import { n as requestContext } from "../requestContext-DO9Qv0gw.mjs";
|
|
4
|
+
import { t as HookSystem } from "../HookSystem-FUBaLTRm.mjs";
|
|
5
|
+
import { t as ResourceRegistry } from "../ResourceRegistry-C5NM07fZ.mjs";
|
|
6
|
+
import { c as getOrgId } from "../types-BuV_cFqT.mjs";
|
|
7
|
+
import { t as hasEvents } from "../typeGuards-C1o_XEyp.mjs";
|
|
8
|
+
import { a as registerSseStats, i as createSseConnectionGauge } from "../sseStream-DknHE2K5.mjs";
|
|
9
|
+
import { t as caching_default } from "../caching-CxUQLHfR.mjs";
|
|
10
|
+
import { i as createMemoryDailyLedger, r as createDailyGate, t as schedules_default } from "../schedules-CLrQRSTt.mjs";
|
|
11
|
+
import { n as errorHandlerPlugin, t as defaultIsDuplicateKeyError } from "../errorHandler-BYI-JQMm.mjs";
|
|
12
|
+
import { c as createRequestIdGenerator, l as requestId_default, n as health_default, u as sanitizeRequestId } from "../health-Cfh-kYI_.mjs";
|
|
13
|
+
import { t as metrics_default } from "../metrics-CqnMJKrJ.mjs";
|
|
14
|
+
import { t as arcLog } from "../logger-BagW7_YA.mjs";
|
|
15
|
+
import { t as realtime_default } from "../realtime-Cq_ugiWw.mjs";
|
|
16
|
+
import { t as replyHelpersPlugin } from "../replyHelpers-CUbeUc5q.mjs";
|
|
17
|
+
import { t as sse_default } from "../sse-OEuPpgss.mjs";
|
|
18
|
+
import { t as versioning_default } from "../versioning-B2_8SBZo.mjs";
|
|
19
19
|
import fp from "fastify-plugin";
|
|
20
20
|
import { performance as performance$1 } from "node:perf_hooks";
|
|
21
21
|
// src/core/arcCorePlugin.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as evictToSize, r as touch, t as assertCapacity } from "../boundedMap-
|
|
3
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
4
|
-
import { t as hasEvents } from "../typeGuards-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as evictToSize, r as touch, t as assertCapacity } from "../boundedMap-CuCwos_X.mjs";
|
|
3
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-D0A4kkrC.mjs";
|
|
4
|
+
import { t as hasEvents } from "../typeGuards-C1o_XEyp.mjs";
|
|
5
5
|
import fp from "fastify-plugin";
|
|
6
6
|
// src/plugins/response-cache.ts
|
|
7
7
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
// src/plugins/tracing.ts
|
|
@@ -59,7 +59,7 @@ try {
|
|
|
59
59
|
function createTracerProvider(options) {
|
|
60
60
|
if (!isAvailable || !NodeTracerProvider || !BatchSpanProcessor || !OTLPTraceExporter) return null;
|
|
61
61
|
const { serviceName = "@classytic/arc", serviceVersion, exporterUrl = "http://localhost:4318/v1/traces" } = options;
|
|
62
|
-
const resolvedVersion = serviceVersion ?? "2.
|
|
62
|
+
const resolvedVersion = serviceVersion ?? "2.50.0";
|
|
63
63
|
const exporter = new OTLPTraceExporter({ url: exporterUrl });
|
|
64
64
|
const provider = new NodeTracerProvider({ resource: { attributes: {
|
|
65
65
|
"service.name": serviceName,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as multipartBody } from "../multipartBody-
|
|
3
|
-
import { B as requireAuth, F as allowPublic } from "../permissions-
|
|
4
|
-
import { c as getOrgId, g as getUserId } from "../types-
|
|
5
|
-
import { i as NotFoundError, u as ValidationError } from "../errors-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as multipartBody } from "../multipartBody-CqNezaB3.mjs";
|
|
3
|
+
import { B as requireAuth, F as allowPublic } from "../permissions-BJylQopQ.mjs";
|
|
4
|
+
import { c as getOrgId, g as getUserId } from "../types-BuV_cFqT.mjs";
|
|
5
|
+
import { i as NotFoundError, u as ValidationError } from "../errors-3xaK0i9n.mjs";
|
|
6
6
|
// src/presets/filesUpload.ts
|
|
7
7
|
const DEFAULT_FIELD_NAME = "file";
|
|
8
8
|
const DEFAULT_MAX_FILE_SIZE = 10485760;
|
package/dist/presets/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as treePreset, c as ownedByUserPreset, i as registerPreset, l as bulkPreset, n as getAvailablePresets, o as softDeletePreset, r as getPreset, s as slugLookupPreset, t as applyPresets, u as auditedPreset } from "../presets-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as treePreset, c as ownedByUserPreset, i as registerPreset, l as bulkPreset, n as getAvailablePresets, o as softDeletePreset, r as getPreset, s as slugLookupPreset, t as applyPresets, u as auditedPreset } from "../presets-D_suT4OY.mjs";
|
|
3
3
|
import { filesUploadPreset } from "./filesUpload.mjs";
|
|
4
4
|
import { multiTenantPreset } from "./multiTenant.mjs";
|
|
5
5
|
import { searchPreset } from "./search.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import "../constants-
|
|
3
|
-
import { i as tagTenantPreparation, t as applyTenantPreparation } from "../tenantPreparation-
|
|
4
|
-
import { u as getRequestScope } from "../types-
|
|
5
|
-
import { t as ArcError } from "../errors-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import "../constants-BZFsZwJh.mjs";
|
|
3
|
+
import { i as tagTenantPreparation, t as applyTenantPreparation } from "../tenantPreparation-BTGpblQW.mjs";
|
|
4
|
+
import { u as getRequestScope } from "../types-BuV_cFqT.mjs";
|
|
5
|
+
import { t as ArcError } from "../errors-3xaK0i9n.mjs";
|
|
6
6
|
// src/presets/multiTenant.ts
|
|
7
7
|
function createTenantMiddleware(specs, mode) {
|
|
8
8
|
const preparation = {
|
package/dist/presets/search.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { B as requireAuth, F as allowPublic } from "../permissions-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { B as requireAuth, F as allowPublic } from "../permissions-BJylQopQ.mjs";
|
|
3
3
|
// src/presets/search.ts
|
|
4
4
|
const BUILTINS = [
|
|
5
5
|
{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { B as requireAuth, F as allowPublic, U as requireRoles } from "./permissions-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { B as requireAuth, F as allowPublic, U as requireRoles } from "./permissions-BJylQopQ.mjs";
|
|
3
3
|
import { multiTenantPreset } from "./presets/multiTenant.mjs";
|
|
4
|
-
import { b as isElevated, n as PUBLIC_SCOPE } from "./types-
|
|
5
|
-
import { l as UnauthorizedError } from "./errors-
|
|
4
|
+
import { b as isElevated, n as PUBLIC_SCOPE } from "./types-BuV_cFqT.mjs";
|
|
5
|
+
import { l as UnauthorizedError } from "./errors-3xaK0i9n.mjs";
|
|
6
6
|
// src/presets/audited.ts
|
|
7
7
|
/**
|
|
8
8
|
* Audited preset - adds createdBy/updatedBy tracking
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { c as getOrgId, f as getScopeContextMap, g as getUserId, m as getTeamId, x as isMember } from "./types-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { c as getOrgId, f as getScopeContextMap, g as getUserId, m as getTeamId, x as isMember } from "./types-BuV_cFqT.mjs";
|
|
3
3
|
// src/scope/projection.ts
|
|
4
4
|
/**
|
|
5
5
|
* Compute the request-scope projection. Returns `undefined` when no
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
2
|
// src/http-cache/purgers/purger.types.ts
|
|
3
3
|
/** A purge the CDN refused or never answered: a closed code plus the provider's own codes, never a credential. */
|
|
4
4
|
var CachePurgeError = class extends Error {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { n as declareRuntimeCapability } from "./runtimeCapabilities-
|
|
4
|
-
import { t as hasEvents } from "./typeGuards-
|
|
5
|
-
import { t as MemoryCacheStore } from "./memory-
|
|
6
|
-
import { i as versionKey, r as tagVersionKey } from "./keys
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Ck1Tj4Ax.mjs";
|
|
3
|
+
import { n as declareRuntimeCapability } from "./runtimeCapabilities-D0A4kkrC.mjs";
|
|
4
|
+
import { t as hasEvents } from "./typeGuards-C1o_XEyp.mjs";
|
|
5
|
+
import { t as MemoryCacheStore } from "./memory-Bl7kv6TS.mjs";
|
|
6
|
+
import { i as versionKey, r as tagVersionKey } from "./keys-CGlPoVSn.mjs";
|
|
7
7
|
import fp from "fastify-plugin";
|
|
8
8
|
// src/cache/QueryCache.ts
|
|
9
9
|
const MISS = Object.freeze({
|
|
@@ -1,16 +1,72 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { n as arcRouteValidatorCompiler } from "./routeValidator-
|
|
4
|
-
import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-
|
|
5
|
-
import { t as arcLog } from "./logger-
|
|
6
|
-
import { n as evaluateAndApplyPermission } from "./authorizationDecision-
|
|
7
|
-
import { t as applyFieldReadPermissions } from "./fields-
|
|
8
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
9
|
-
import {
|
|
10
|
-
import { a as registerSseStats, r as openSseStream } from "./sseStream-
|
|
11
|
-
import { a as promoteStreamTokenToHeader } from "./streaming-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Ck1Tj4Ax.mjs";
|
|
3
|
+
import { n as arcRouteValidatorCompiler } from "./routeValidator-BF7n34xV.mjs";
|
|
4
|
+
import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-CH2Kuksc.mjs";
|
|
5
|
+
import { t as arcLog } from "./logger-BagW7_YA.mjs";
|
|
6
|
+
import { n as evaluateAndApplyPermission } from "./authorizationDecision-BD8K4jdQ.mjs";
|
|
7
|
+
import { t as applyFieldReadPermissions } from "./fields-DLFcJiDe.mjs";
|
|
8
|
+
import { n as getUserRoles } from "./userHelpers-D4m_pLSC.mjs";
|
|
9
|
+
import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-DqqJqovq.mjs";
|
|
10
|
+
import { a as registerSseStats, r as openSseStream } from "./sseStream-DknHE2K5.mjs";
|
|
11
|
+
import { a as promoteStreamTokenToHeader } from "./streaming-CcIpcx02.mjs";
|
|
12
|
+
import { STREAM_FRAMES } from "@classytic/repo-core/sync";
|
|
12
13
|
import fp from "fastify-plugin";
|
|
13
14
|
// src/plugins/realtime.ts
|
|
15
|
+
/**
|
|
16
|
+
* Realtime Plugin — permission-aware resource change subscriptions.
|
|
17
|
+
*
|
|
18
|
+
* `GET /realtime/:resource` (`:resource` = the resource NAME — the
|
|
19
|
+
* singular registry key, same identity MCP tools and introspection use,
|
|
20
|
+
* NOT the pluralized route prefix) streams that resource's CRUD events
|
|
21
|
+
* (`{resource}.created/.updated/.deleted`, emitted by arc's own event
|
|
22
|
+
* bridge) over SSE, gated and filtered by the SAME machinery that guards
|
|
23
|
+
* the REST routes:
|
|
24
|
+
*
|
|
25
|
+
* 1. CONNECT gate — the resource's `list` permission runs once; its row
|
|
26
|
+
* filters (`_policyFilters`) are snapshotted for the connection.
|
|
27
|
+
* 2. PER-EVENT filtering — matched against that snapshot IN PROCESS
|
|
28
|
+
* (adapter `matchesFilter`, else `simpleEqualityMatcher`). No per-event
|
|
29
|
+
* DB round-trip.
|
|
30
|
+
* 3. TENANT guard — an event carrying `organizationId` reaches only
|
|
31
|
+
* matching scopes, fail-closed for org-less callers, unless the resource
|
|
32
|
+
* set `tenantField: false`.
|
|
33
|
+
* 4. FIELD masking — per subscriber roles, so gated fields never hit the wire.
|
|
34
|
+
*
|
|
35
|
+
* FAIL-CLOSED: operator-shaped filters (`$or`/`$in`, e.g. from `requireGrant`)
|
|
36
|
+
* with no adapter `matchesFilter` REJECT the subscription at connect (501 +
|
|
37
|
+
* hint) rather than delivering unfiltered rows. Unmatchable events are dropped.
|
|
38
|
+
*
|
|
39
|
+
* MULTIPLEXING: `?resources=a,b,c` carries N feeds on one connection (cap
|
|
40
|
+
* {@link MAX_MULTIPLEX_RESOURCES}). Each is authorized independently with an
|
|
41
|
+
* ISOLATED snapshot; any denial rejects the whole subscription.
|
|
42
|
+
*
|
|
43
|
+
* `<resource>.left` is emitted when an update moves a record OUT of a
|
|
44
|
+
* subscriber's filter, so the client can drop a now-invisible row. Entering
|
|
45
|
+
* needs no frame — the `updated` frame carries the record.
|
|
46
|
+
*
|
|
47
|
+
* STALENESS: filters snapshot at connect, so revoked permissions persist until
|
|
48
|
+
* reconnect. The feed force-closes at the token's `exp`; `maxConnectionMs`
|
|
49
|
+
* bounds session/cookie auth that has none.
|
|
50
|
+
*
|
|
51
|
+
* NON-GOALS: no replay/resume (a change NOTIFIER, not an event store — use the
|
|
52
|
+
* outbox for guaranteed delivery, or `createReplayHub` from `@classytic/arc/utils`
|
|
53
|
+
* for a resumable custom stream over a repo-core `ChangeLogStore`); filters
|
|
54
|
+
* must be CONCRETE at connect, since a rule referencing a row absent from the payload cannot be evaluated in
|
|
55
|
+
* process; no presence/broadcast (`app.events` + sse cover that); no payload
|
|
56
|
+
* E2EE (TLS + field masking is the posture). Delivery is per-instance and
|
|
57
|
+
* follows the transport's semantics.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const app = await createApp({
|
|
62
|
+
* arcPlugins: { realtime: true }, // or { path, heartbeat, resources: [...] }
|
|
63
|
+
* resources: [orderResource],
|
|
64
|
+
* });
|
|
65
|
+
* // Browser:
|
|
66
|
+
* new EventSource(`/realtime/order?token=${jwt}`) // resource NAME
|
|
67
|
+
* .addEventListener('order.updated', (e) => render(JSON.parse(e.data)));
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
14
70
|
var realtime_exports = /* @__PURE__ */ __exportAll({ default: () => realtime_default });
|
|
15
71
|
const log = arcLog("realtime");
|
|
16
72
|
const CHANGE_OPERATIONS = [
|
package/dist/registry/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as getCascadingResources, i as cascadeDeleteForOrganization, n as buildResourceManifestFromRegistry, o as getCascadingResourcesWithMetadata, r as introspectionPlugin_default, s as assertNoTenantData, t as buildResourceManifest } from "../registry-
|
|
3
|
-
import { t as ResourceRegistry } from "../ResourceRegistry-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as getCascadingResources, i as cascadeDeleteForOrganization, n as buildResourceManifestFromRegistry, o as getCascadingResourcesWithMetadata, r as introspectionPlugin_default, s as assertNoTenantData, t as buildResourceManifest } from "../registry-DmF9Akvn.mjs";
|
|
3
|
+
import { t as ResourceRegistry } from "../ResourceRegistry-C5NM07fZ.mjs";
|
|
4
4
|
export { ResourceRegistry, assertNoTenantData, buildResourceManifest, buildResourceManifestFromRegistry, cascadeDeleteForOrganization, getCascadingResources, getCascadingResourcesWithMetadata, introspectionPlugin_default as introspectionPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CRUD_OPERATIONS } from "./constants-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "./constants-BZFsZwJh.mjs";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
// src/registry/assertNoTenantData.ts
|
|
5
5
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as arcLog } from "./logger-
|
|
3
|
-
import { n as evictToSize, r as touch } from "./boundedMap-
|
|
4
|
-
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "./store-helpers-
|
|
5
|
-
import { t as claimedAttempts } from "./claimed-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as arcLog } from "./logger-BagW7_YA.mjs";
|
|
3
|
+
import { n as evictToSize, r as touch } from "./boundedMap-CuCwos_X.mjs";
|
|
4
|
+
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "./store-helpers-D4vtEXt2.mjs";
|
|
5
|
+
import { t as claimedAttempts } from "./claimed-CQ4ZpD8K.mjs";
|
|
6
6
|
import { and, anyOf, eq, lte, ne, or } from "@classytic/repo-core/filter";
|
|
7
7
|
import { InvalidOutboxEventError, OutboxConflictError, OutboxOwnershipError, outboxPayloadFingerprint } from "@classytic/primitives/outbox";
|
|
8
8
|
import { update } from "@classytic/repo-core/update";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Ck1Tj4Ax.mjs";
|
|
3
3
|
import { toCanonicalList } from "@classytic/repo-core/pagination";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
// src/plugins/replyHelpers.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
2
|
// src/idempotency/requirement.ts
|
|
3
3
|
/** What is wrong with a route's idempotency declaration, or `undefined` when it is sound. */
|
|
4
4
|
function idempotencyConfigProblem(config) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as createTenantKeyGenerator } from "./rateLimitKey-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as createTenantKeyGenerator } from "./rateLimitKey-igF1x64n.mjs";
|
|
3
3
|
// src/permissions/resourceRateLimit.ts
|
|
4
4
|
function decision(allowed, max, remaining, ttlSeconds) {
|
|
5
5
|
const reset = Math.max(1, ttlSeconds);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { t as runWorkScope } from "./workScope-
|
|
4
|
-
import { t as startRenewingLease } from "./renewingLease-
|
|
5
|
-
import { a as runShutdown, i as runAdmittedWork, r as registerShutdownParticipant } from "./shutdown-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Ck1Tj4Ax.mjs";
|
|
3
|
+
import { t as runWorkScope } from "./workScope-B3W3r35s.mjs";
|
|
4
|
+
import { t as startRenewingLease } from "./renewingLease-DBtGUt8T.mjs";
|
|
5
|
+
import { a as runShutdown, i as runAdmittedWork, r as registerShutdownParticipant } from "./shutdown-BIR-QBYM.mjs";
|
|
6
6
|
import fp from "fastify-plugin";
|
|
7
7
|
import { civilDateOf, civilDateToInstant, isValidTimeZone, localTimeParts } from "@classytic/primitives/timezone";
|
|
8
8
|
// src/plugins/dailyGate.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as arcLog } from "./logger-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as arcLog } from "./logger-BagW7_YA.mjs";
|
|
3
3
|
// src/utils/schemaConverter.ts
|
|
4
4
|
/**
|
|
5
5
|
* Schema Converter — Detect-First, Convert-Only-When-Needed
|
|
@@ -1,17 +1,17 @@
|
|
|
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 { o as toJsonSchema } from "./schemaConverter-
|
|
7
|
-
import { t as buildRequestScopeProjection } from "./projection-
|
|
8
|
-
import { n as requestContext } from "./requestContext-
|
|
9
|
-
import { n as isTenantPreparation } from "./tenantPreparation-
|
|
10
|
-
import { n as evaluateAndApplyPermission } from "./authorizationDecision-
|
|
11
|
-
import { t as executePipeline } from "./pipe-
|
|
12
|
-
import { n as idempotencyConfigProblem, t as declaresIdempotencyFence } from "./requirement-
|
|
13
|
-
import { i as resolveResourceRateLimiter, r as recordUnenforcedRateLimit } from "./resourceRateLimit-
|
|
14
|
-
import { n as arcRouteValidatorCompiler } from "./routeValidator-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { f as createError } from "./errors-3xaK0i9n.mjs";
|
|
3
|
+
import { n as getUserRoles } from "./userHelpers-D4m_pLSC.mjs";
|
|
4
|
+
import { b as isElevated, n as PUBLIC_SCOPE, u as getRequestScope, x as isMember } from "./types-BuV_cFqT.mjs";
|
|
5
|
+
import { a as resolveEffectiveRoles, r as deriveHiddenFieldPermissions, t as applyFieldReadPermissions } from "./fields-DLFcJiDe.mjs";
|
|
6
|
+
import { o as toJsonSchema } from "./schemaConverter-JEmU21fu.mjs";
|
|
7
|
+
import { t as buildRequestScopeProjection } from "./projection-CmjGjFih.mjs";
|
|
8
|
+
import { n as requestContext } from "./requestContext-DO9Qv0gw.mjs";
|
|
9
|
+
import { n as isTenantPreparation } from "./tenantPreparation-BTGpblQW.mjs";
|
|
10
|
+
import { n as evaluateAndApplyPermission } from "./authorizationDecision-BD8K4jdQ.mjs";
|
|
11
|
+
import { t as executePipeline } from "./pipe-D1cq8hET.mjs";
|
|
12
|
+
import { n as idempotencyConfigProblem, t as declaresIdempotencyFence } from "./requirement-C3GaQmkR.mjs";
|
|
13
|
+
import { i as resolveResourceRateLimiter, r as recordUnenforcedRateLimit } from "./resourceRateLimit-KKn-sFhb.mjs";
|
|
14
|
+
import { n as arcRouteValidatorCompiler } from "./routeValidator-BF7n34xV.mjs";
|
|
15
15
|
import { isPaginatedResult, toCanonicalList } from "@classytic/repo-core/pagination";
|
|
16
16
|
// src/core/fastifyAdapter.ts
|
|
17
17
|
/** Type guard for Mongoose-like documents with toObject() */
|
package/dist/schemas/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
2
|
import { errorContractSchema, errorDetailSchema } from "@classytic/repo-core/errors";
|
|
3
3
|
import { Type, Type as Type$1 } from "typebox";
|
|
4
4
|
// src/schemas/index.ts
|
package/dist/scim/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as parseJsonBody } from "../jsonBody-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as parseJsonBody } from "../jsonBody-C0oREwUc.mjs";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
// src/scim/errors.ts
|
|
5
5
|
var ScimError = class extends Error {
|
package/dist/scope/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { C as isService, D as requireUserId, E as requireTeamId, O as scopeFirstCtx, S as isOrgInScope, T as requireOrgId, _ as getUserRoles, a as getDPoPJkt, b as isElevated, c as getOrgId, d as getScopeContext, f as getScopeContextMap, g as getUserId, h as getTenantFromRequest, i as getClientId, l as getOrgRoles, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, r as getAncestorOrgIds, s as getOrgContext, t as AUTHENTICATED_SCOPE, u as getRequestScope, v as hasOrgAccess, w as requireClientId, x as isMember, y as isAuthenticated } from "../types-
|
|
3
|
-
import { t as createTenantKeyGenerator } from "../rateLimitKey-
|
|
4
|
-
import { t as elevation_default } from "../elevation-
|
|
5
|
-
import { t as resolveOrgFromHeader } from "../scope-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { C as isService, D as requireUserId, E as requireTeamId, O as scopeFirstCtx, S as isOrgInScope, T as requireOrgId, _ as getUserRoles, a as getDPoPJkt, b as isElevated, c as getOrgId, d as getScopeContext, f as getScopeContextMap, g as getUserId, h as getTenantFromRequest, i as getClientId, l as getOrgRoles, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, r as getAncestorOrgIds, s as getOrgContext, t as AUTHENTICATED_SCOPE, u as getRequestScope, v as hasOrgAccess, w as requireClientId, x as isMember, y as isAuthenticated } from "../types-BuV_cFqT.mjs";
|
|
3
|
+
import { t as createTenantKeyGenerator } from "../rateLimitKey-igF1x64n.mjs";
|
|
4
|
+
import { t as elevation_default } from "../elevation-XoY0C73T.mjs";
|
|
5
|
+
import { t as resolveOrgFromHeader } from "../scope-CcTMRd7s.mjs";
|
|
6
6
|
export { AUTHENTICATED_SCOPE, PUBLIC_SCOPE, createTenantKeyGenerator, elevation_default as elevationPlugin, getAncestorOrgIds, getClientId, getDPoPJkt, getMandate, getOrgContext, getOrgId, getOrgRoles, getRequestScope, getScopeContext, getScopeContextMap, getServiceScopes, getTeamId, getTenantFromRequest, getUserId, getUserRoles, hasOrgAccess, isAuthenticated, isElevated, isMember, isOrgInScope, isService, requireClientId, requireOrgId, requireTeamId, requireUserId, resolveOrgFromHeader, scopeFirstCtx };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-
|
|
3
|
-
import { n as requireSingleHeaderValue } from "./headers-
|
|
4
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-3xaK0i9n.mjs";
|
|
3
|
+
import { n as requireSingleHeaderValue } from "./headers-BROW65-r.mjs";
|
|
4
|
+
import { n as getUserRoles } from "./userHelpers-D4m_pLSC.mjs";
|
|
5
5
|
// src/scope/resolveOrgFromHeader.ts
|
|
6
6
|
/**
|
|
7
7
|
* Create a preHandler hook that resolves org scope from a header.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
3
|
// src/utils/shutdown.ts
|
|
4
4
|
/** Stop admissions across every runtime before draining work and disposing domain engines. */
|