@classytic/arc 2.50.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-B18mcj_M.mjs → EventTransport-DeNze_-C.mjs} +2 -2
- package/dist/{HookSystem-FUBaLTRm.mjs → HookSystem-DTffXM1X.mjs} +2 -2
- package/dist/{ResourceRegistry-C5NM07fZ.mjs → ResourceRegistry-tlqXSZoK.mjs} +2 -2
- package/dist/{acquire-MHCnbDtH.mjs → acquire-7JKEkKnN.mjs} +1 -1
- package/dist/audit/index.mjs +4 -4
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.d.mts +30 -0
- package/dist/auth/index.mjs +172 -32
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/auth/social/index.d.mts +42 -0
- package/dist/auth/social/index.mjs +311 -0
- package/dist/{authorizationDecision-BD8K4jdQ.mjs → authorizationDecision-DKmH4tZ-.mjs} +9 -7
- package/dist/{boundedMap-CuCwos_X.mjs → boundedMap-zxGBpXX0.mjs} +1 -1
- package/dist/{buildHandler-BttjNkTM.mjs → buildHandler-ZDV6LRZ_.mjs} +5 -5
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-CxUQLHfR.mjs → caching-DceUN9Xk.mjs} +2 -2
- package/dist/{claimed-CQ4ZpD8K.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-BZFsZwJh.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-DWA1-5IE.mjs → core-M18RhMqi.mjs} +3 -3
- package/dist/{createActionRouter-fP3l2xVF.mjs → createActionRouter-zXlrwWVs.mjs} +5 -5
- package/dist/{createAggregationRouter-BJZeOmBa.mjs → createAggregationRouter-CN0Da9nC.mjs} +7 -7
- package/dist/{createApp-Db9JRumw.mjs → createApp-BC67ACu4.mjs} +29 -29
- package/dist/{defineAggregation-BskqRz8M.mjs → defineAggregation-DqAGb5oI.mjs} +1 -1
- package/dist/{defineResource-B2vTvKzW.mjs → defineResource-DC5UqkQv.mjs} +8 -8
- package/dist/discovery/index.mjs +1 -1
- package/dist/docs/index.mjs +3 -3
- package/dist/{elevation-XoY0C73T.mjs → elevation-DiXVg98q.mjs} +5 -5
- package/dist/encryption/index.d.mts +26 -1
- package/dist/encryption/index.mjs +56 -6
- package/dist/{errorHandler-BYI-JQMm.mjs → errorHandler-BUTm9P_f.mjs} +3 -3
- package/dist/{errors-3xaK0i9n.mjs → errors-DxpHZBlW.mjs} +1 -1
- package/dist/{eventPlugin-CVQ9ddnL.mjs → eventPlugin-ZsIQPRso.mjs} +8 -8
- package/dist/{eventTypes-UPYg7gW1.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-CxRvCaaZ.mjs → fieldTypes-f-3TZgR3.mjs} +2 -2
- package/dist/{fields-DLFcJiDe.mjs → fields-kCbIDTjA.mjs} +1 -1
- package/dist/{filter-merge-Bvjk_8dV.mjs → filter-merge-UJCgjbZR.mjs} +1 -1
- package/dist/{generate-0OpCUjUv.mjs → generate-CLpmzbJ_.mjs} +2 -2
- package/dist/{headers-BROW65-r.mjs → headers-Bh47h0XH.mjs} +2 -2
- package/dist/{health-Cy6aOg1i.mjs → health-CEpgVAl7.mjs} +1 -1
- package/dist/{health-Cfh-kYI_.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-D7PQcvvL.mjs → init-B43DXBpc.mjs} +22 -22
- 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-C0oREwUc.mjs → jsonBody-CkKs6dA_.mjs} +2 -2
- package/dist/{keys-CGlPoVSn.mjs → keys-DHrHnT0f.mjs} +1 -1
- package/dist/{loadResources-Oi47dogA.mjs → loadResources-CFdzAWQZ.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-BW-LexBz.mjs → loadResourcesFromEntry-DkoSiJsI.mjs} +2 -2
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-BagW7_YA.mjs → logger-DJwz_-Pl.mjs} +1 -1
- package/dist/{mcpPlugin-C6-wFsOX.mjs → mcpPlugin-CA_MDFlS.mjs} +21 -21
- package/dist/{memory-Bl7kv6TS.mjs → memory-B9CFHbA_.mjs} +3 -3
- package/dist/{metrics-CqnMJKrJ.mjs → metrics-DSKv-T9K.mjs} +3 -3
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module-lbEbHUfI.mjs → module-C0JCsnO7.mjs} +17 -2
- package/dist/{multipartBody-CqNezaB3.mjs → multipartBody-Bxz-q6hI.mjs} +1 -1
- package/dist/{observeSend-BjilzlYl.mjs → observeSend-DfNkdGww.mjs} +1 -1
- package/dist/{openapi-DXNbadgd.mjs → openapi-Dmp7Ipsi.mjs} +6 -6
- package/dist/outbox-admin/index.mjs +5 -5
- package/dist/{outbox-module-k5rIszQ4.mjs → outbox-module-vT6PaThj.mjs} +7 -7
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-BJylQopQ.mjs → permissions-Cga6KBOX.mjs} +9 -9
- package/dist/{pipe-D1cq8hET.mjs → pipe-CqPweKdL.mjs} +2 -2
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-iEgaS5_H.mjs → plan-CbDTFbTj.mjs} +1 -1
- package/dist/{plugin-DsLr6L4O.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-CX4ZvwCa.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-D_suT4OY.mjs → presets-D28IABZe.mjs} +4 -4
- package/dist/{projection-CmjGjFih.mjs → projection-aHCtDQQ9.mjs} +2 -2
- package/dist/{purger.types-CZwkTZ7B.mjs → purger.types-CNFmEtFu.mjs} +1 -1
- package/dist/{queryCachePlugin-BDOPEAmH.mjs → queryCachePlugin-CwpEjCwz.mjs} +6 -6
- package/dist/{rateLimitKey-igF1x64n.mjs → rateLimitKey-D9dl3FQn.mjs} +1 -1
- package/dist/{realtime-Cq_ugiWw.mjs → realtime-Dvu8ES2z.mjs} +11 -11
- package/dist/registry/index.d.mts +1 -1
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-DmF9Akvn.mjs → registry-DmxbzW7-.mjs} +2 -2
- package/dist/{relay-DA89IhFt.mjs → relay-CEaCmUfG.mjs} +5 -5
- package/dist/{renewingLease-DBtGUt8T.mjs → renewingLease-g2FjB3im.mjs} +1 -1
- package/dist/{replyHelpers-CUbeUc5q.mjs → replyHelpers-CSByAX_Z.mjs} +2 -2
- package/dist/{requestContext-DO9Qv0gw.mjs → requestContext-yc7MSgmq.mjs} +1 -1
- package/dist/{requirement-C3GaQmkR.mjs → requirement-Dm8njSoC.mjs} +1 -1
- package/dist/{resourceRateLimit-KKn-sFhb.mjs → resourceRateLimit-PQaY3HW1.mjs} +2 -2
- package/dist/{rolldown-runtime-Ck1Tj4Ax.mjs → rolldown-runtime-BBBkGgwA.mjs} +1 -1
- package/dist/{routeValidator-BF7n34xV.mjs → routeValidator-fuG51bQA.mjs} +1 -1
- package/dist/{runtimeCapabilities-D0A4kkrC.mjs → runtimeCapabilities-B8IT7xiQ.mjs} +1 -1
- package/dist/{schedules-CLrQRSTt.mjs → schedules-0-aS4jDV.mjs} +5 -5
- package/dist/{schemaConverter-JEmU21fu.mjs → schemaConverter-Cs3SwP4R.mjs} +2 -2
- package/dist/{schemaIR-wOffQlbq.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-CcTMRd7s.mjs → scope-BWNAlBj0.mjs} +4 -4
- package/dist/{shutdown-BIR-QBYM.mjs → shutdown-Cf-27xsS.mjs} +1 -1
- package/dist/{simpleEqualityMatcher-DqqJqovq.mjs → simpleEqualityMatcher-e-dgJcUO.mjs} +1 -1
- package/dist/{sse-OEuPpgss.mjs → sse-C3bj5qWi.mjs} +7 -7
- package/dist/{sseStream-DknHE2K5.mjs → sseStream-BYZbpFDa.mjs} +2 -2
- package/dist/{store-helpers-D4vtEXt2.mjs → store-helpers-B9HierHY.mjs} +1 -1
- package/dist/{streaming-CcIpcx02.mjs → streaming-EN8NJWxr.mjs} +1 -1
- package/dist/{subscriberIdentity-PO6kimAl.mjs → subscriberIdentity-DSqCh38x.mjs} +1 -1
- package/dist/{tenancy-CH2Kuksc.mjs → tenancy-CAqjGQcQ.mjs} +2 -2
- package/dist/{tenantPreparation-BTGpblQW.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-Dii5X7AP.mjs → timing-CKI_Oyub.mjs} +1 -1
- package/dist/{transactionContext-DMPhYEOt.mjs → transactionContext-D0UZFoSy.mjs} +1 -1
- package/dist/{typeGuards-C1o_XEyp.mjs → typeGuards-CLYkmBLT.mjs} +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-BuV_cFqT.mjs → types-Cunc4shv.mjs} +4 -4
- package/dist/usage/index.mjs +4 -4
- package/dist/{userHelpers-D4m_pLSC.mjs → userHelpers-cT5j1kgp.mjs} +1 -1
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-CxLMXGn5.mjs → utils-DlNkm1dI.mjs} +6 -6
- package/dist/{validate-CZ975J8N.mjs → validate-63QThRoS.mjs} +3 -3
- package/dist/{versioning-B2_8SBZo.mjs → versioning-f2YGmh4i.mjs} +3 -3
- package/dist/{workScope-B3W3r35s.mjs → workScope-DwspXz70.mjs} +2 -2
- package/package.json +17 -12
- package/skills/arc/references/auth-better-auth.md +27 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { d as createDomainError } from "../errors-
|
|
3
|
-
import { n as requireSingleHeaderValue } from "../headers-
|
|
4
|
-
import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "../timing-
|
|
5
|
-
import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "../acquire-
|
|
6
|
-
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-
|
|
7
|
-
import { i as requestRequiresIdempotencyKey, n as idempotencyConfigProblem, r as requestDedupedByHandler, t as declaresIdempotencyFence } from "../requirement-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { d as createDomainError } from "../errors-DxpHZBlW.mjs";
|
|
3
|
+
import { n as requireSingleHeaderValue } from "../headers-Bh47h0XH.mjs";
|
|
4
|
+
import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "../timing-CKI_Oyub.mjs";
|
|
5
|
+
import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "../acquire-7JKEkKnN.mjs";
|
|
6
|
+
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-B9HierHY.mjs";
|
|
7
|
+
import { i as requestRequiresIdempotencyKey, n as idempotencyConfigProblem, r as requestDedupedByHandler, t as declaresIdempotencyFence } from "../requirement-Dm8njSoC.mjs";
|
|
8
8
|
import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
|
|
9
9
|
import { and, eq, exists, gt, lt, or, startsWith } from "@classytic/repo-core/filter";
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as acquireBySteps } from "../acquire-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as acquireBySteps } from "../acquire-7JKEkKnN.mjs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
// src/idempotency/stores/redis.ts
|
|
5
5
|
/**
|
|
@@ -485,4 +485,22 @@ declare function lazyModuleExports<TExports = unknown>(fastify: FastifyInstance,
|
|
|
485
485
|
*/
|
|
486
486
|
declare function lazyRequiredModuleExports<K extends keyof ArcModuleRegistry>(fastify: FastifyInstance, name: K): () => ArcModuleRegistry[K];
|
|
487
487
|
declare function lazyRequiredModuleExports<TExports = unknown>(fastify: FastifyInstance, name: string): () => TExports;
|
|
488
|
-
|
|
488
|
+
/** A sibling module's export for a seam built at COMPOSITION, before any app exists. See `moduleHandleRef`. */
|
|
489
|
+
interface ModuleHandleRef<T> {
|
|
490
|
+
/** Call from the consumer's `plugins` arm: records the booting app. */
|
|
491
|
+
readonly plugins: (fastify: FastifyInstance) => undefined;
|
|
492
|
+
/** The sibling's export; throws by name when read before the consumer's app booted. */
|
|
493
|
+
readonly get: () => T;
|
|
494
|
+
/** The sibling's export, or `undefined` when it is not composed (an OPTIONAL sibling, no edge). */
|
|
495
|
+
readonly find: () => T | undefined;
|
|
496
|
+
/** Whether the recording module's app booted; `false` when that module is not composed. */
|
|
497
|
+
readonly booted: () => boolean;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* A handle for seams a module builds at composition but calls at request or event time: spread `plugins`
|
|
501
|
+
* into the consumer and call `get()` from the seam. Declare a required sibling in the consumer's `dependsOn`.
|
|
502
|
+
* Pinned by tests/factory/module-handle-ref.test.ts.
|
|
503
|
+
*/
|
|
504
|
+
declare function moduleHandleRef<K extends keyof ArcModuleRegistry>(name: K): ModuleHandleRef<ArcModuleRegistry[K]>;
|
|
505
|
+
declare function moduleHandleRef<TExports = unknown>(name: string): ModuleHandleRef<TExports>;
|
|
506
|
+
export { renderModuleGraph as $, extendModule as A, ModuleGraphAnalysis as B, assertComposable as C, orderModules as D, resolveModuleClosure as E, CrudSurface as F, ModuleKind as G, ModuleGraphMode as H, DerivedPublishes as I, analyzeModuleGraph as J, SkippedBridge as K, DurabilityFacts as L, AsyncApiCatalogEntry as M, AsyncApiInfo as N, subscribeModuleEventHandlers as O, toAsyncApi as P, eventTopology as Q, HandlerDurabilityFact as R, PlanModulesOptions as S, planModules as T, ModuleGraphNode as U, ModuleGraphIssue as V, ModuleGraphOptions as W, crudEventsOf as X, buildModuleGraph as Y, dependentsOf as Z, createRelayNudge as _, hasModuleExports as a, CompositionProblem as b, moduleHandleRef as c, getModuleState as d, verifyEventDurability as et, hasModule as f, RelayOption as g, RelayNudge as h, getOptionalModuleExports as i, collectModuleWorkflows as j, ModuleExtension as k, ModuleState as l, resolveModule as m, defineModule as n, lazyModuleExports as o, resolveContribution as p, activateBridges as q, getModuleExports as r, lazyRequiredModuleExports as s, ModuleHandleRef as t, verifyModuleGraph as tt, getModuleResources as u, withRelayNudge as v, compositionProblems as w, ModulePlan as x, ClosureNode as y, ModuleGraph as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import "./fastify-augmentation-
|
|
2
|
+
import "./fastify-augmentation-CPReFhZ1.mjs";
|
|
3
3
|
import { A as RequestWithExtras, F as ResourceDefinition, I as CrudController, L as ResourceConfig, O as FastifyWithDecorators, Un as IControllerResponse, Wn as IRequestContext, X as RouteSchemaOptions, Z as ArcFieldRule, g as RequestContext, k as MiddlewareHandler, kt as RouteMcpConfig, ot as AggregationConfig, v as CrudRouterOptions, wt as ActionDefinition } from "./index-DLCcLUQT.mjs";
|
|
4
4
|
import { l as PermissionCheck, t as AnyRecord } from "./base-HXNgPQww.mjs";
|
|
5
5
|
import { i as RequestScope } from "./types-DnkIALZ8.mjs";
|
|
@@ -4,7 +4,7 @@ import { a as MetricsOptions, c as RealtimeOptions, f as CachingOptions, h as Gr
|
|
|
4
4
|
import { t as EventPluginOptions } from "./eventPlugin-BY38F6yK.mjs";
|
|
5
5
|
import { r as QueryCachePluginOptions } from "./queryCachePlugin-DrQNnGws.mjs";
|
|
6
6
|
import { t as ErrorHandlerOptions } from "./errorHandler-B9r88jZV.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { W as ModuleGraphOptions } from "./index-CSbDhif4.mjs";
|
|
8
8
|
import { r as CacheStore } from "./interface-WR1U0K7t.mjs";
|
|
9
9
|
import { a as EventTransport } from "./EventTransport-CYEoCJGe.mjs";
|
|
10
10
|
import { i as IdempotencyStore } from "./interface-BmExzQRD.mjs";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { c as DataPolicy, d as UserBase, l as PermissionCheck, n as ArcRequest, o as UserOrganization, r as JWTPayload, s as AuthorizationDecision, t as AnyRecord, u as PermissionContext } from "./base-HXNgPQww.mjs";
|
|
3
|
-
import "./fastify-augmentation-
|
|
3
|
+
import "./fastify-augmentation-CPReFhZ1.mjs";
|
|
4
4
|
import { a as applyFieldReadPermissions, n as FieldPermissionMap, o as applyFieldWritePermissions, s as fields, t as FieldPermission } from "./fields-JTkrtO-r.mjs";
|
|
5
|
-
import { $ as MAX_SEARCH_LENGTH, A as ResourceSeams, B as DEFAULT_ID_FIELD, C as getControllerScope, G as DEFAULT_UPDATE_METHOD, H as DEFAULT_MAX_LIMIT, J as HOOK_PHASES, L as defineAggregation, M as mergeResourceConfig, O as defineResourceVariants, P as defineAction, Q as MAX_REGEX_LENGTH, R as CRUD_OPERATIONS, 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, et as MUTATION_OPERATIONS, g as NativePolicyFilter, j as SeamedResourceConfig, k as AdapterLike, nt as RESERVED_QUERY_PARAMS, q as HOOK_OPERATIONS, rt as SYSTEM_FIELDS, tt as MutationOperation, z as CrudOperation } from "./index-
|
|
5
|
+
import { $ as MAX_SEARCH_LENGTH, A as ResourceSeams, B as DEFAULT_ID_FIELD, C as getControllerScope, G as DEFAULT_UPDATE_METHOD, H as DEFAULT_MAX_LIMIT, J as HOOK_PHASES, L as defineAggregation, M as mergeResourceConfig, O as defineResourceVariants, P as defineAction, Q as MAX_REGEX_LENGTH, R as CRUD_OPERATIONS, 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, et as MUTATION_OPERATIONS, g as NativePolicyFilter, j as SeamedResourceConfig, k as AdapterLike, nt as RESERVED_QUERY_PARAMS, q as HOOK_OPERATIONS, rt as SYSTEM_FIELDS, tt as MutationOperation, z as CrudOperation } from "./index-DCH08eqQ.mjs";
|
|
6
6
|
import { A as RequestWithExtras, An as ControllerConstructionOptions, Bn as ControllerLike, Bt as SoftDeleteMixin, C as RequestIdOptions, Cn as ArcCreateResult, D as FastifyWithAuth, Dn as ArcUpdateResult, E as FastifyRequestExtras, En as ArcListResult, F as ResourceDefinition, Fn as MutationWriteContext, G as CrudRouteKey, Gn as RawRouteHandler, Gt as BulkExt, H as PresetFunction, Hn as IController, Ht as TreeMixin, I as CrudController, In as ResourceWrites, J as MiddlewareConfig, K as CrudSchemas, Kn as RouteHandler, Kt as BulkMixin, L as ResourceConfig, Ln as WriteContext, Nt as AuthPluginOptions, O as FastifyWithDecorators, On as BaseControllerOptions, P as defineResource, Q as FieldRule, Rn as WriteVerbKey, Rt as BaseController, S as IntrospectionPluginOptions, Tn as ArcGetResult, Un as IControllerResponse, Ut as SlugExt, Vt as TreeExt, W as PresetResult, Wn as IRequestContext, Wt as SlugMixin, X as RouteSchemaOptions, _ as ServiceContext, a as IntrospectionData, at as AggregationCacheConfig, b as HealthCheck, c as ResourceMetadata, ct as AggregationIndexHint, dt as AggregationRateLimit, f as OwnershipCheck, ft as AggregationsMap, g as RequestContext, h as QueryParserInterface, i as PaginationResult, it as AggMeasureShorthand, jn as ListResult, jt as RateLimitConfig, kn as ControllerConfigurableOptions, l as ArcInternalMetadata, lt as AggregationMaterializedContext, n as InferDocType, nt as EventDefinition, o as RegistryEntry, ot as AggregationConfig, qt as BaseCrudController, r as InferResourceDoc, rt as AggMeasureInput, s as RegistryStats, st as AggregationDateRangeRequirement, t as InferAdapterDoc, ut as AggregationMaterializedResult, v as CrudRouterOptions, wn as ArcDeleteResult, x as HealthOptions, y as GracefulShutdownOptions, zt as SoftDeleteExt } from "./index-DLCcLUQT.mjs";
|
|
7
7
|
import { C as requireScopeContext, G as createDynamicPermissionMatrix, H as DynamicPermissionMatrix, J as PublicPolicy, K as createOrgPermissions, Q as anyOf, S as requireOrgRole, T as requireTeamMembership, U as DynamicPermissionMatrixConfig, Y as allOf, Z as allowPublic, _ as publicRead, at as requireRoles, b as requireOrgInScope, d as adminOnly, et as denyAll, f as authenticated, g as presets_d_exports, m as ownerWithAdminBypass, nt as requireAuth, p as fullPublic, q as AllowPublicOptions, rt as requireOwnership, st as when, v as publicReadAdminWrite, w as requireServiceScope, x as requireOrgMembership, y as readOnly } from "./index-CMNpMBtW.mjs";
|
|
8
8
|
import { a as NotFoundError, d as ValidationError, f as createDomainError, i as ForbiddenError, t as ArcError, u as UnauthorizedError } from "./errors-DTo0me1o.mjs";
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { E as nativePolicyFilter, _ as BaseCrudController, f as BaseController, g as BulkMixin, h as SlugMixin, m as SoftDeleteMixin, p as TreeMixin } from "./plugin-
|
|
3
|
-
import { a as defineResourceVariants, o as mergeResourceConfig, s as defineAction } from "./core-
|
|
4
|
-
import { t as defineAggregation } from "./defineAggregation-
|
|
5
|
-
import { a as ResourceDefinition, t as defineResource } from "./defineResource-
|
|
6
|
-
import { E as getControllerScope } from "./schemaIR-
|
|
7
|
-
import { a as DEFAULT_SORT, 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-
|
|
8
|
-
import { B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, I as anyOf, N as allOf, O as requireServiceScope, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, a as adminOnly, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, k as requireTeamMembership, o as authenticated, p as readOnly, s as fullPublic, u as presets_exports, w as requireOrgInScope } from "./permissions-
|
|
9
|
-
import { i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "./fields-
|
|
10
|
-
import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { E as nativePolicyFilter, _ as BaseCrudController, f as BaseController, g as BulkMixin, h as SlugMixin, m as SoftDeleteMixin, p as TreeMixin } from "./plugin-8Z1khbAI.mjs";
|
|
3
|
+
import { a as defineResourceVariants, o as mergeResourceConfig, s as defineAction } from "./core-M18RhMqi.mjs";
|
|
4
|
+
import { t as defineAggregation } from "./defineAggregation-DqAGb5oI.mjs";
|
|
5
|
+
import { a as ResourceDefinition, t as defineResource } from "./defineResource-DC5UqkQv.mjs";
|
|
6
|
+
import { E as getControllerScope } from "./schemaIR-By8XiNeE.mjs";
|
|
7
|
+
import { a as DEFAULT_SORT, 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";
|
|
8
|
+
import { B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, I as anyOf, N as allOf, O as requireServiceScope, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, a as adminOnly, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, k as requireTeamMembership, o as authenticated, p as readOnly, s as fullPublic, u as presets_exports, w as requireOrgInScope } from "./permissions-Cga6KBOX.mjs";
|
|
9
|
+
import { i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "./fields-kCbIDTjA.mjs";
|
|
10
|
+
import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-DxpHZBlW.mjs";
|
|
11
11
|
// src/index.ts
|
|
12
|
-
const version = "2.
|
|
12
|
+
const version = "2.52.0";
|
|
13
13
|
export { ArcError, BaseController, BaseCrudController, BulkMixin, CRUD_OPERATIONS, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, ForbiddenError, HOOK_OPERATIONS, HOOK_PHASES, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, NotFoundError, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, SlugMixin, SoftDeleteMixin, TreeMixin, UnauthorizedError, ValidationError, adminOnly, allOf, allowPublic, anyOf, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, createDomainError, createDynamicPermissionMatrix, createOrgPermissions, defineAction, defineAggregation, defineResource, defineResourceVariants, denyAll, fields, fullPublic, getControllerScope, mergeResourceConfig, nativePolicyFilter, ownerWithAdminBypass, presets_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, version, when };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
2
|
import * as fs from "node:fs/promises";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
@@ -700,7 +700,10 @@ import { mongodbAdapter } from '@better-auth/mongo-adapter';` : "";
|
|
|
700
700
|
].filter(Boolean).join("\n");
|
|
701
701
|
const dbAdapter = useMongo ? config.typescript ? `database: mongodbAdapter(mongoose.connection.getClient().db() as never),` : `database: mongodbAdapter(mongoose.connection.getClient().db()),` : `// Configure your database adapter here
|
|
702
702
|
// See: https://www.better-auth.com/docs/concepts/database`;
|
|
703
|
-
const
|
|
703
|
+
const pluginUsage = `
|
|
704
|
+
plugins: [
|
|
705
|
+
${[
|
|
706
|
+
` socialAuth({ providers: social.providers }),`,
|
|
704
707
|
useBearer ? ` bearer(),` : "",
|
|
705
708
|
useApiKey ? ` apiKey({
|
|
706
709
|
enableMetadata: true,
|
|
@@ -711,11 +714,8 @@ import { mongodbAdapter } from '@better-auth/mongo-adapter';` : "";
|
|
|
711
714
|
creatorRole: 'owner',
|
|
712
715
|
teams: { enabled: true },
|
|
713
716
|
}),` : ""
|
|
714
|
-
].filter(Boolean)
|
|
715
|
-
|
|
716
|
-
plugins: [
|
|
717
|
-
${pluginEntries.join("\n")}
|
|
718
|
-
],` : "";
|
|
717
|
+
].filter(Boolean).join("\n")}
|
|
718
|
+
],`;
|
|
719
719
|
const stubPluginsList = [useOrg ? `'organization'` : ""].filter(Boolean).join(", ");
|
|
720
720
|
const stubExtras = useApiKey ? `, extraCollections: ['apikey']` : "";
|
|
721
721
|
return `/**
|
|
@@ -737,6 +737,7 @@ ${[
|
|
|
737
737
|
pluginImports,
|
|
738
738
|
stubsImport
|
|
739
739
|
].filter(Boolean).join("\n")}
|
|
740
|
+
import { defineSocialProviders, socialAuth } from '@classytic/arc/auth/social';
|
|
740
741
|
import config from '#config/index.js';
|
|
741
742
|
|
|
742
743
|
// Factory keeps the CONCRETE betterAuth({...}) instantiation as the source
|
|
@@ -745,6 +746,9 @@ import config from '#config/index.js';
|
|
|
745
746
|
// typecheck because Better Auth's \`Auth<T>\` is generic over the exact
|
|
746
747
|
// options object.
|
|
747
748
|
function createAuth() {
|
|
749
|
+
// Throws at boot naming any missing credential of an enabled provider.
|
|
750
|
+
const social = defineSocialProviders({ enabled: process.env.SOCIAL_PROVIDERS ?? '' });
|
|
751
|
+
|
|
748
752
|
return betterAuth({
|
|
749
753
|
secret: config.betterAuth.secret,
|
|
750
754
|
baseURL: process.env.BETTER_AUTH_URL || \`http://localhost:\${config.server.port}\`,
|
|
@@ -768,18 +772,9 @@ ${config.tenant === "multi" ? `
|
|
|
768
772
|
minPasswordLength: 6,
|
|
769
773
|
},
|
|
770
774
|
|
|
771
|
-
//
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
socialProviders: {
|
|
775
|
-
google: {
|
|
776
|
-
clientId: process.env.GOOGLE_CLIENT_ID,
|
|
777
|
-
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
|
|
778
|
-
},
|
|
779
|
-
},
|
|
780
|
-
}
|
|
781
|
-
: {}),
|
|
782
|
-
${orgPluginUsage}
|
|
775
|
+
// Social sign-in: SOCIAL_PROVIDERS=google,github enables providers (see .env.example).
|
|
776
|
+
socialProviders: social.socialProviders,
|
|
777
|
+
${pluginUsage}
|
|
783
778
|
session: {
|
|
784
779
|
cookieCache: {
|
|
785
780
|
enabled: true,
|
|
@@ -787,7 +782,7 @@ ${orgPluginUsage}
|
|
|
787
782
|
},
|
|
788
783
|
},
|
|
789
784
|
|
|
790
|
-
trustedOrigins: [config.frontend.url],
|
|
785
|
+
trustedOrigins: [config.frontend.url, ...social.trustedOrigins],
|
|
791
786
|
|
|
792
787
|
rateLimit: {
|
|
793
788
|
enabled: process.env.NODE_ENV === 'production',
|
|
@@ -1441,9 +1436,13 @@ NODE_ENV=development
|
|
|
1441
1436
|
BETTER_AUTH_SECRET=your-32-character-minimum-secret-here
|
|
1442
1437
|
FRONTEND_URL=http://localhost:3000
|
|
1443
1438
|
|
|
1444
|
-
#
|
|
1439
|
+
# Social sign-in: providers to enable (google, github, apple, facebook), comma-separated.
|
|
1440
|
+
# Each enabled provider needs its credentials; boot fails naming any that are missing.
|
|
1441
|
+
# Provider console redirect URI: <BETTER_AUTH_URL>/api/auth/callback/<provider>
|
|
1442
|
+
SOCIAL_PROVIDERS=
|
|
1445
1443
|
# GOOGLE_CLIENT_ID=
|
|
1446
1444
|
# GOOGLE_CLIENT_SECRET=
|
|
1445
|
+
# GOOGLE_ID_TOKEN_AUDIENCES= # native/mobile client ids accepted on id-token sign-in
|
|
1447
1446
|
`;
|
|
1448
1447
|
else content += `
|
|
1449
1448
|
# JWT
|
|
@@ -1480,7 +1479,8 @@ HOST=0.0.0.0
|
|
|
1480
1479
|
BETTER_AUTH_SECRET=dev-secret-change-in-production-min-32-chars
|
|
1481
1480
|
FRONTEND_URL=http://localhost:3000
|
|
1482
1481
|
|
|
1483
|
-
#
|
|
1482
|
+
# Social sign-in (e.g. SOCIAL_PROVIDERS=google, then set its credentials)
|
|
1483
|
+
SOCIAL_PROVIDERS=
|
|
1484
1484
|
GOOGLE_CLIENT_ID=
|
|
1485
1485
|
GOOGLE_CLIENT_SECRET=
|
|
1486
1486
|
`;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
2
|
import fp from "fastify-plugin";
|
|
3
3
|
// src/integrations/event-gateway.ts
|
|
4
4
|
const eventGatewayPluginImpl = async (fastify, opts = {}) => {
|
|
5
5
|
const { auth = true, orgScoped, roomPolicy, maxMessageBytes, maxSubscriptionsPerClient, authenticate } = opts;
|
|
6
6
|
if (auth && !authenticate && !fastify.hasDecorator("authenticate")) throw new Error("[arc-event-gateway] auth is true but fastify.authenticate is not registered. Register an auth plugin first, provide a custom authenticate function, or set auth: false.");
|
|
7
7
|
if (opts.sse !== false) {
|
|
8
|
-
const { default: ssePlugin } = await import("../sse-
|
|
8
|
+
const { default: ssePlugin } = await import("../sse-C3bj5qWi.mjs").then((n) => n.n);
|
|
9
9
|
await fastify.register(ssePlugin, {
|
|
10
10
|
path: opts.sse?.path ?? "/events/stream",
|
|
11
11
|
requireAuth: auth,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
2
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as evaluateAndApplyPermission } from "../../authorizationDecision-
|
|
3
|
-
import { i as runAdmittedWork, r as registerShutdownParticipant } from "../../shutdown-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as evaluateAndApplyPermission } from "../../authorizationDecision-DKmH4tZ-.mjs";
|
|
3
|
+
import { i as runAdmittedWork, r as registerShutdownParticipant } from "../../shutdown-Cf-27xsS.mjs";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
// src/integrations/jobs/execution.ts
|
|
6
6
|
async function executeTimedHandler(options) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { _ as createMcpServer, a as isZodTypeSchema, c as defaultCrudDescription, d as mcpHandlerAdapter, f as permissionDeniedResult, g as buildRequestContext, h as toCallToolSuccess, i as resourceToTools, l as resolveCrudDescription, m as toCallToolResult, n as filterResourcesForMcp, o as toolInputShape, p as toCallToolError, r as mcpPlugin, s as fieldRulesToZod, u as invokeController, v as resolveToolCollisions } from "../../mcpPlugin-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { _ as createMcpServer, a as isZodTypeSchema, c as defaultCrudDescription, d as mcpHandlerAdapter, f as permissionDeniedResult, g as buildRequestContext, h as toCallToolSuccess, i as resourceToTools, l as resolveCrudDescription, m as toCallToolResult, n as filterResourcesForMcp, o as toolInputShape, p as toCallToolError, r as mcpPlugin, s as fieldRulesToZod, u as invokeController, v as resolveToolCollisions } from "../../mcpPlugin-CA_MDFlS.mjs";
|
|
3
3
|
// src/integrations/mcp/defineTool.ts
|
|
4
4
|
/**
|
|
5
5
|
* Define a type-safe MCP tool.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { _ as createMcpServer, i as resourceToTools, n as filterResourcesForMcp, t as MCP_PROTOCOL_VERSION } from "../../mcpPlugin-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { _ as createMcpServer, i as resourceToTools, n as filterResourcesForMcp, t as MCP_PROTOCOL_VERSION } from "../../mcpPlugin-CA_MDFlS.mjs";
|
|
3
3
|
// src/integrations/mcp/testing.ts
|
|
4
4
|
/**
|
|
5
5
|
* Connect a 2026-07-28 client to an already-built `McpServer`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { f as createError, i as NotFoundError, r as ForbiddenError } from "../errors-
|
|
3
|
-
import { a as promoteStreamTokenToHeader, n as forwardedStreamHeaders } from "../streaming-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { f as createError, i as NotFoundError, r as ForbiddenError } from "../errors-DxpHZBlW.mjs";
|
|
3
|
+
import { a as promoteStreamTokenToHeader, n as forwardedStreamHeaders } from "../streaming-EN8NJWxr.mjs";
|
|
4
4
|
import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
|
|
5
5
|
import fp from "fastify-plugin";
|
|
6
6
|
// src/integrations/streamline.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as exponentialBackoff } from "../relay-
|
|
3
|
-
import { t as createOutboxModule } from "../outbox-module-
|
|
4
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as exponentialBackoff } from "../relay-CEaCmUfG.mjs";
|
|
3
|
+
import { t as createOutboxModule } from "../outbox-module-vT6PaThj.mjs";
|
|
4
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-B8IT7xiQ.mjs";
|
|
5
5
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
6
6
|
import fp from "fastify-plugin";
|
|
7
7
|
import { createChildEvent, matchEventPattern } from "@classytic/primitives/events";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-B8IT7xiQ.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import sjson from "secure-json-parse";
|
|
5
5
|
import fp from "fastify-plugin";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ArcError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ArcError } from "./errors-DxpHZBlW.mjs";
|
|
3
3
|
import sjson from "secure-json-parse";
|
|
4
4
|
// src/utils/jsonBody.ts
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { t as arcLog } from "./logger-
|
|
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
4
|
import { readdir } from "node:fs/promises";
|
|
5
5
|
import { dirname, join, resolve } from "node:path";
|
|
6
6
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ResourceRegistry } from "./ResourceRegistry-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ResourceRegistry } from "./ResourceRegistry-tlqXSZoK.mjs";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
// src/cli/utils/loadResourcesFromEntry.ts
|
package/dist/logger/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
export { t as arcLog, n as configureArcLogger, r as createPinoWriter, i as runWithArcLogger } from "../logger-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
export { t as arcLog, n as configureArcLogger, r as createPinoWriter, i as runWithArcLogger } from "../logger-DJwz_-Pl.mjs";
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as resourceRateLimitWindowMs, i as resolveResourceRateLimiter, t as createMemoryResourceRateLimiter } from "./resourceRateLimit-
|
|
3
|
-
import { n as declareRuntimeCapability } from "./runtimeCapabilities-
|
|
4
|
-
import { n as evictToSize, r as touch, t as assertCapacity } from "./boundedMap-
|
|
5
|
-
import { i as NotFoundError, p as isArcError, t as ArcError } from "./errors-
|
|
6
|
-
import { a as resolveActionPermission, i as shouldRejectAdditionalProperties, n as normalizeSchemaIR, p as resolvePipelineSteps, t as actionSchemaIR } from "./schemaIR-
|
|
7
|
-
import { n as fieldTypesFromOpenApiSchemas } from "./fieldTypes-
|
|
8
|
-
import { f as BaseController, n as normalizeActionsToRouterConfig, r as resolveActionTargetFence } from "./plugin-
|
|
9
|
-
import { a as withoutTenantInjection, r as prepareTenantContext } from "./tenantPreparation-
|
|
10
|
-
import { b as isElevated, c as getOrgId, g as getUserId, x as isMember } from "./types-
|
|
11
|
-
import { t as pluralize } from "./pluralize-
|
|
12
|
-
import { t as buildRequestScopeProjection } from "./projection-
|
|
13
|
-
import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "./acquire-
|
|
14
|
-
import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "./timing-
|
|
15
|
-
import { t as arcLog } from "./logger-
|
|
16
|
-
import { r as evaluatePermissionDecision } from "./authorizationDecision-
|
|
17
|
-
import { a as resolveEffectiveRoles, t as applyFieldReadPermissions } from "./fields-
|
|
18
|
-
import { n as executeAggregation } from "./buildHandler-
|
|
19
|
-
import { n as validateAggregations } from "./validate-
|
|
20
|
-
import { o as toJsonSchema } from "./schemaConverter-
|
|
21
|
-
import { t as executePipeline } from "./pipe-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as resourceRateLimitWindowMs, i as resolveResourceRateLimiter, t as createMemoryResourceRateLimiter } from "./resourceRateLimit-PQaY3HW1.mjs";
|
|
3
|
+
import { n as declareRuntimeCapability } from "./runtimeCapabilities-B8IT7xiQ.mjs";
|
|
4
|
+
import { n as evictToSize, r as touch, t as assertCapacity } from "./boundedMap-zxGBpXX0.mjs";
|
|
5
|
+
import { i as NotFoundError, p as isArcError, t as ArcError } from "./errors-DxpHZBlW.mjs";
|
|
6
|
+
import { a as resolveActionPermission, i as shouldRejectAdditionalProperties, n as normalizeSchemaIR, p as resolvePipelineSteps, t as actionSchemaIR } from "./schemaIR-By8XiNeE.mjs";
|
|
7
|
+
import { n as fieldTypesFromOpenApiSchemas } from "./fieldTypes-f-3TZgR3.mjs";
|
|
8
|
+
import { f as BaseController, n as normalizeActionsToRouterConfig, r as resolveActionTargetFence } from "./plugin-8Z1khbAI.mjs";
|
|
9
|
+
import { a as withoutTenantInjection, r as prepareTenantContext } from "./tenantPreparation-CVBWarqs.mjs";
|
|
10
|
+
import { b as isElevated, c as getOrgId, g as getUserId, x as isMember } from "./types-Cunc4shv.mjs";
|
|
11
|
+
import { t as pluralize } from "./pluralize-D4vcPLVs.mjs";
|
|
12
|
+
import { t as buildRequestScopeProjection } from "./projection-aHCtDQQ9.mjs";
|
|
13
|
+
import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "./acquire-7JKEkKnN.mjs";
|
|
14
|
+
import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "./timing-CKI_Oyub.mjs";
|
|
15
|
+
import { t as arcLog } from "./logger-DJwz_-Pl.mjs";
|
|
16
|
+
import { r as evaluatePermissionDecision } from "./authorizationDecision-DKmH4tZ-.mjs";
|
|
17
|
+
import { a as resolveEffectiveRoles, t as applyFieldReadPermissions } from "./fields-kCbIDTjA.mjs";
|
|
18
|
+
import { n as executeAggregation } from "./buildHandler-ZDV6LRZ_.mjs";
|
|
19
|
+
import { n as validateAggregations } from "./validate-63QThRoS.mjs";
|
|
20
|
+
import { o as toJsonSchema } from "./schemaConverter-Cs3SwP4R.mjs";
|
|
21
|
+
import { t as executePipeline } from "./pipe-CqPweKdL.mjs";
|
|
22
22
|
import { ARC_ERROR_CODES, isHttpError, toErrorContract } from "@classytic/repo-core/errors";
|
|
23
23
|
import { createHash, randomUUID } from "node:crypto";
|
|
24
24
|
import fp from "fastify-plugin";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { n as evictToSize } from "./boundedMap-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-BBBkGgwA.mjs";
|
|
3
|
+
import { n as evictToSize } from "./boundedMap-zxGBpXX0.mjs";
|
|
4
4
|
// src/cache/memory.ts
|
|
5
5
|
var memory_exports = /* @__PURE__ */ __exportAll({ MemoryCacheStore: () => MemoryCacheStore });
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { a as MetricHistogram, i as DURATION_BUCKETS_SECONDS, o as MetricSeries, s as renderMetricSample } from "./health-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-BBBkGgwA.mjs";
|
|
3
|
+
import { a as MetricHistogram, i as DURATION_BUCKETS_SECONDS, o as MetricSeries, s as renderMetricSample } from "./health-W4S2yFBL.mjs";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
// src/plugins/metrics.ts
|
|
6
6
|
var metrics_exports = /* @__PURE__ */ __exportAll({ default: () => metrics_default });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CRUD_OPERATIONS } from "../constants-
|
|
3
|
-
import { t as multipartBody } from "../multipartBody-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "../constants-Ca2IQFy2.mjs";
|
|
3
|
+
import { t as multipartBody } from "../multipartBody-Bxz-q6hI.mjs";
|
|
4
4
|
// src/middleware/middleware.ts
|
|
5
5
|
/**
|
|
6
6
|
* Named Middleware — Priority-based, conditional middleware execution.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as startRenewingLease } from "../renewingLease-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as startRenewingLease } from "../renewingLease-g2FjB3im.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
// src/migrations/index.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
2
|
// src/factory/module/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* Identity helper for authoring a typed module — mirrors `defineResource`.
|
|
@@ -74,4 +74,19 @@ Composed modules: ${composed.length ? composed.join(", ") : "(none)"}.`);
|
|
|
74
74
|
return resolved;
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
function moduleHandleRef(name) {
|
|
78
|
+
let app;
|
|
79
|
+
const booted = () => {
|
|
80
|
+
if (!app) throw new Error(`[arc] module handle "${name}" was read before the consuming module's app booted`);
|
|
81
|
+
return app;
|
|
82
|
+
};
|
|
83
|
+
return {
|
|
84
|
+
plugins: (fastify) => {
|
|
85
|
+
app = fastify;
|
|
86
|
+
},
|
|
87
|
+
get: () => getModuleExports(booted(), name),
|
|
88
|
+
find: () => getOptionalModuleExports(booted(), name),
|
|
89
|
+
booted: () => app !== void 0
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export { lazyModuleExports as a, hasModuleExports as i, getModuleExports as n, lazyRequiredModuleExports as o, getOptionalModuleExports as r, moduleHandleRef as s, defineModule as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
2
|
// src/utils/observeSend.ts
|
|
3
3
|
/** Run `fn`, reporting whether it called `reply.send` (or the reply is already sent). */
|
|
4
4
|
async function runObservingSend(reply, fn) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
3
|
-
import { a as resolveActionPermission } from "./schemaIR-
|
|
4
|
-
import { t as buildActionBodySchema } from "./createActionRouter-
|
|
5
|
-
import { t as pluralize } from "./pluralize-
|
|
6
|
-
import { n as convertRouteSchema } from "./schemaConverter-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as getUserRoles } from "./userHelpers-cT5j1kgp.mjs";
|
|
3
|
+
import { a as resolveActionPermission } from "./schemaIR-By8XiNeE.mjs";
|
|
4
|
+
import { t as buildActionBodySchema } from "./createActionRouter-zXlrwWVs.mjs";
|
|
5
|
+
import { t as pluralize } from "./pluralize-D4vcPLVs.mjs";
|
|
6
|
+
import { n as convertRouteSchema } from "./schemaConverter-Cs3SwP4R.mjs";
|
|
7
7
|
import fp from "fastify-plugin";
|
|
8
8
|
// src/docs/openapi/canonical-schemas.ts
|
|
9
9
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as defineResource } from "../defineResource-
|
|
3
|
-
import { r as readOutboxHealth } from "../health-
|
|
4
|
-
import { n as getModuleExports, t as defineModule } from "../module-
|
|
5
|
-
import { i as NotFoundError, u as ValidationError } from "../errors-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as defineResource } from "../defineResource-DC5UqkQv.mjs";
|
|
3
|
+
import { r as readOutboxHealth } from "../health-CEpgVAl7.mjs";
|
|
4
|
+
import { n as getModuleExports, t as defineModule } from "../module-C0JCsnO7.mjs";
|
|
5
|
+
import { i as NotFoundError, u as ValidationError } from "../errors-DxpHZBlW.mjs";
|
|
6
6
|
// src/outbox-admin/module.ts
|
|
7
7
|
/**
|
|
8
8
|
* Strip the domain payload and the stack unless explicitly opted in.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as requestContext } from "./requestContext-
|
|
3
|
-
import { t as transactionContext } from "./transactionContext-
|
|
4
|
-
import { i as resolveEventTransport } from "./EventTransport-
|
|
5
|
-
import { t as emitObserved } from "./eventPlugin-
|
|
6
|
-
import { n as canReportHealth, r as readOutboxHealth } from "./health-
|
|
7
|
-
import { t as EventOutbox } from "./relay-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as requestContext } from "./requestContext-yc7MSgmq.mjs";
|
|
3
|
+
import { t as transactionContext } from "./transactionContext-D0UZFoSy.mjs";
|
|
4
|
+
import { i as resolveEventTransport } from "./EventTransport-DeNze_-C.mjs";
|
|
5
|
+
import { t as emitObserved } from "./eventPlugin-ZsIQPRso.mjs";
|
|
6
|
+
import { n as canReportHealth, r as readOutboxHealth } from "./health-CEpgVAl7.mjs";
|
|
7
|
+
import { t as EventOutbox } from "./relay-CEaCmUfG.mjs";
|
|
8
8
|
import { randomBytes } from "node:crypto";
|
|
9
9
|
import { hostname } from "node:os";
|
|
10
10
|
// src/events/outbox-module.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as conjoinPolicyFilters } from "../filter-merge-
|
|
3
|
-
import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-
|
|
4
|
-
import { a as resolveEffectiveRoles, i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "../fields-
|
|
5
|
-
import { i as normalizeToDecision, r as evaluatePermissionDecision, t as applyAuthorizationDecision } from "../authorizationDecision-
|
|
6
|
-
import { i as resolveResourceRateLimiter, t as createMemoryResourceRateLimiter } from "../resourceRateLimit-
|
|
7
|
-
import { A as requireAgentScope, B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, H as requirePlatformRole, I as anyOf, K as scopeOf, L as deny, M as requireMandate, N as allOf, O as requireServiceScope, P as allow, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, W as roles, _ as requireGrant, a as adminOnly, b as describePermissionMap, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, g as modeSatisfies, h as GRANT_MODES, i as introspectRegistry, j as requireDPoP, k as requireTeamMembership, l as permissionMatrix, m as createRoleHierarchy, n as introspectCheck, o as authenticated, p as readOnly, r as introspectModule, s as fullPublic, t as buildPermissionMatrix, u as presets_exports, v as collectPublicSurface, w as requireOrgInScope, x as explainAccess, y as describePermission, z as not } from "../permissions-
|
|
1
|
+
/*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as conjoinPolicyFilters } from "../filter-merge-UJCgjbZR.mjs";
|
|
3
|
+
import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-cT5j1kgp.mjs";
|
|
4
|
+
import { a as resolveEffectiveRoles, i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "../fields-kCbIDTjA.mjs";
|
|
5
|
+
import { i as normalizeToDecision, r as evaluatePermissionDecision, t as applyAuthorizationDecision } from "../authorizationDecision-DKmH4tZ-.mjs";
|
|
6
|
+
import { i as resolveResourceRateLimiter, t as createMemoryResourceRateLimiter } from "../resourceRateLimit-PQaY3HW1.mjs";
|
|
7
|
+
import { A as requireAgentScope, B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, H as requirePlatformRole, I as anyOf, K as scopeOf, L as deny, M as requireMandate, N as allOf, O as requireServiceScope, P as allow, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, W as roles, _ as requireGrant, a as adminOnly, b as describePermissionMap, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, g as modeSatisfies, h as GRANT_MODES, i as introspectRegistry, j as requireDPoP, k as requireTeamMembership, l as permissionMatrix, m as createRoleHierarchy, n as introspectCheck, o as authenticated, p as readOnly, r as introspectModule, s as fullPublic, t as buildPermissionMatrix, u as presets_exports, v as collectPublicSurface, w as requireOrgInScope, x as explainAccess, y as describePermission, z as not } from "../permissions-Cga6KBOX.mjs";
|
|
8
8
|
export { GRANT_MODES, adminOnly, allOf, allow, allowPublic, anyOf, applyAuthorizationDecision, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, buildPermissionMatrix, collectPublicSurface, conjoinPolicyFilters, createDynamicPermissionMatrix, createMemoryResourceRateLimiter, createOrgPermissions, createRoleHierarchy, deny, denyAll, describePermission, describePermissionMap, evaluatePermissionDecision, explainAccess, fields, fullPublic, getUserRoles, introspectCheck, introspectModule, introspectRegistry, modeSatisfies, normalizeRoles, normalizeToDecision, not, ownerWithAdminBypass, permissionMatrix, presets_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAgentScope, requireAuth, requireDPoP, requireGrant, requireMandate, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requirePlatformRole, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, resolveEffectiveRoles, resolveResourceRateLimiter, roles, scopeOf, when };
|