@classytic/arc 2.47.0 → 2.49.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-BHKy4_Bi.mjs → EventTransport-DbHZK230.mjs} +2 -2
- package/dist/{HookSystem-CAIDVoKC.mjs → HookSystem-DMoeJ6Do.mjs} +2 -2
- package/dist/{QueryCache-DdvrGG8Q.d.mts → QueryCache-BE47tmlO.d.mts} +36 -1
- package/dist/{ResourceRegistry-23Ml6FNe.mjs → ResourceRegistry-CP-iTcKy.mjs} +2 -2
- package/dist/{acquire-DoFX06fm.mjs → acquire-CB0va87C.mjs} +1 -1
- package/dist/audit/index.d.mts +1 -1
- package/dist/audit/index.mjs +4 -4
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.d.mts +2 -2
- package/dist/auth/index.mjs +53 -15
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-DYiubkYw.mjs → authorizationDecision-DHO94aV2.mjs} +4 -4
- package/dist/{boundedMap-CtdzpJ3X.mjs → boundedMap-C51EUUOm.mjs} +1 -1
- package/dist/{buildHandler-CARdmPNo.mjs → buildHandler-9DuwEKvr.mjs} +23 -16
- package/dist/cache/index.d.mts +2 -2
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-QRiryDLs.mjs → caching-COTX3sDa.mjs} +3 -6
- package/dist/{claimed-BLecr1j3.mjs → claimed-C7T1nHlo.mjs} +1 -1
- package/dist/cleanup/index.d.mts +2 -2
- package/dist/cleanup/index.mjs +4 -4
- package/dist/cli/commands/describe.d.mts +1 -1
- package/dist/cli/commands/describe.mjs +3 -3
- package/dist/cli/commands/docs.mjs +3 -3
- package/dist/cli/commands/doctor.mjs +1 -1
- package/dist/cli/commands/generate.mjs +2 -2
- package/dist/cli/commands/init.mjs +2 -2
- package/dist/cli/commands/introspect.mjs +2 -2
- package/dist/cli/index.mjs +3 -3
- package/dist/{constants-Cx7BcnHT.mjs → constants-DOnfMd7i.mjs} +1 -1
- package/dist/context/index.mjs +5 -5
- package/dist/core/index.d.mts +3 -3
- package/dist/core/index.mjs +7 -7
- package/dist/{core-0WyMuo0f.mjs → core-BoEdFDDw.mjs} +3 -3
- package/dist/{createActionRouter-mLAGbpDV.mjs → createActionRouter-CpTn15dm.mjs} +54 -18
- package/dist/{createAggregationRouter-BEAjn3dA.mjs → createAggregationRouter-CD_Hydp0.mjs} +13 -11
- package/dist/{createApp-QDP4vYWH.mjs → createApp-Be6XTGD9.mjs} +332 -40
- package/dist/{createMcpServer-DzXHX0SO.d.mts → createMcpServer-CS2KOVP6.d.mts} +9 -10
- package/dist/{defineAggregation-CFNfvz-C.mjs → defineAggregation-BI5pRb8c.mjs} +1 -1
- package/dist/{defineResource-BROJmhzJ.mjs → defineResource-BAzNu5Um.mjs} +8 -8
- package/dist/discovery/index.mjs +1 -1
- package/dist/docs/index.d.mts +1 -1
- package/dist/docs/index.mjs +3 -3
- package/dist/{elevation-DrXeEWWk.mjs → elevation-DupGuM41.mjs} +6 -9
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-BiBXtxj4.mjs → errorHandler-DA03vRqp.mjs} +4 -7
- package/dist/{errors-DnrUChAy.mjs → errors-BpYV859Y.mjs} +1 -1
- package/dist/{eventPlugin-BhKLUe7H.mjs → eventPlugin-D7LYtYzL.mjs} +9 -13
- package/dist/{eventTypes-CCIRGakw.mjs → eventTypes-BqA-N-Uz.mjs} +2 -2
- package/dist/events/index.d.mts +18 -5
- package/dist/events/index.mjs +8 -8
- package/dist/events/transports/redis-stream-entry.mjs +4 -4
- package/dist/events/transports/redis.d.mts +35 -0
- package/dist/events/transports/redis.mjs +87 -11
- package/dist/factory/index.d.mts +4 -4
- package/dist/factory/index.mjs +6 -6
- package/dist/{fastify-augmentation-bzkWPt1f.d.mts → fastify-augmentation-baQc3MaO.d.mts} +2 -2
- package/dist/fieldTypes-EFWxCkZ5.mjs +80 -0
- package/dist/{fields-CYdpcV73.mjs → fields-CT1Erg7o.mjs} +1 -1
- package/dist/{filter-merge-6kasezRH.mjs → filter-merge-B1eJ1pMx.mjs} +1 -1
- package/dist/{generate-DUkcbc4r.mjs → generate-Cr0ULavs.mjs} +2 -2
- package/dist/{headers-KxhrKevA.mjs → headers-D4bncIOf.mjs} +2 -2
- package/dist/{health-jkYNdobJ.mjs → health-BoFxrkJE.mjs} +1 -1
- package/dist/{health-CRJg3IIq.mjs → health-DN_pUVMX.mjs} +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/http-cache/index.d.mts +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.d.mts +1 -1
- package/dist/idempotency/index.mjs +10 -8
- package/dist/idempotency/redis.mjs +2 -2
- package/dist/{index-B5i9-vuP.d.mts → index-CMNpMBtW.d.mts} +1 -1
- package/dist/{index-BxZS-8So.d.mts → index-DKM2p5w5.d.mts} +48 -23
- package/dist/{index-Cy2-QffW.d.mts → index-DLCcLUQT.d.mts} +69 -6
- package/dist/{index-DFCCQ9AE.d.mts → index-DexdFs1a.d.mts} +1 -1
- package/dist/{index-D1X_C_qz.d.mts → index-Dhrks-hM.d.mts} +60 -10
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +11 -11
- package/dist/{init-CACwpktI.mjs → init-C4a24wD2.mjs} +1 -1
- package/dist/integrations/event-gateway.mjs +2 -2
- package/dist/integrations/index.d.mts +2 -2
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.mjs +3 -3
- package/dist/integrations/mcp/index.d.mts +6 -38
- package/dist/integrations/mcp/index.mjs +2 -2
- package/dist/integrations/mcp/testing.d.mts +11 -15
- package/dist/integrations/mcp/testing.mjs +22 -42
- package/dist/integrations/streamline.mjs +3 -3
- package/dist/integrations/webhooks.d.mts +1 -1
- 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-CzDBkCme.mjs → jsonBody-DoTt5BS6.mjs} +2 -2
- package/dist/{keys-Cbwf6r1B.mjs → keys--l9n7aOC.mjs} +1 -1
- package/dist/{loadResources-Kr6vuljv.mjs → loadResources-rygByIQA.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-D2e0qoDR.mjs → loadResourcesFromEntry-ItNBIQ5w.mjs} +2 -2
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-C110X5Yz.mjs → logger-UbknHqHy.mjs} +1 -1
- package/dist/{mcpPlugin-4lIPr9OJ.mjs → mcpPlugin-CTkk4RP8.mjs} +218 -378
- package/dist/{memory-D9qkhXiB.mjs → memory-C47xVsjX.mjs} +3 -3
- package/dist/{metrics-B-qrrWfI.mjs → metrics-TJyAb1Xk.mjs} +4 -7
- package/dist/middleware/index.d.mts +1 -1
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module-BD8xHgrz.mjs → module-CWiqsXnh.mjs} +1 -1
- package/dist/{multiTenant-KZj8j1uJ.d.mts → multiTenant-QtDzxx_K.d.mts} +1 -1
- package/dist/{multipartBody-qU7KCn1l.mjs → multipartBody-BdG1qbn1.mjs} +1 -1
- package/dist/{observeSend-BnPtTotW.mjs → observeSend-DrA3ADFN.mjs} +1 -1
- package/dist/{openapi-DoVa5SVP.mjs → openapi-D6MAbYpv.mjs} +7 -7
- package/dist/outbox-admin/index.d.mts +1 -1
- package/dist/outbox-admin/index.mjs +5 -5
- package/dist/{outbox-module-DyITEIop.mjs → outbox-module-D5QABFQW.mjs} +197 -28
- package/dist/{outbox-module-5Mnwcycy.d.mts → outbox-module-DzW6zwWJ.d.mts} +103 -10
- package/dist/permissions/index.d.mts +2 -2
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-BBy4bOGi.mjs → permissions-CFsmdYUt.mjs} +9 -9
- package/dist/{pipe-BOm2o4UA.mjs → pipe-B_05AgGt.mjs} +2 -2
- package/dist/pipeline/index.d.mts +1 -1
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-DDIGwuxr.mjs → plan-BnlNJhrj.mjs} +1 -1
- package/dist/{plugin-Bn4D_0XK.mjs → plugin-CrMPYbdj.mjs} +94 -50
- package/dist/plugins/index.d.mts +6 -5
- package/dist/plugins/index.mjs +19 -18
- package/dist/plugins/response-cache.mjs +4 -4
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-ClEjcKlG.mjs → pluralize-oVIxJ4CY.mjs} +1 -1
- package/dist/presets/filesUpload.d.mts +1 -1
- package/dist/presets/filesUpload.mjs +5 -5
- package/dist/presets/index.d.mts +2 -2
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.d.mts +1 -1
- package/dist/presets/multiTenant.mjs +5 -5
- package/dist/presets/search.d.mts +1 -1
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-DK2jh5YR.mjs → presets-CUd3L7v6.mjs} +4 -4
- package/dist/{projection-BHH-sXyS.mjs → projection-DowJlIto.mjs} +2 -2
- package/dist/{purger.types-2wNJK_89.mjs → purger.types-BjKy8869.mjs} +1 -1
- package/dist/{queryCachePlugin-Ckqe98AM.mjs → queryCachePlugin-BvB3k_Fh.mjs} +114 -14
- package/dist/{queryCachePlugin-DYQUyeJ9.d.mts → queryCachePlugin-DrQNnGws.d.mts} +1 -1
- package/dist/{rateLimitKey-CWAjlqcN.mjs → rateLimitKey-56nH1cWN.mjs} +1 -1
- package/dist/{realtime-BIJi9USY.mjs → realtime-DXGBPtYK.mjs} +19 -22
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-y9ZA-R_J.mjs → registry-Biz-6sEZ.mjs} +2 -2
- package/dist/{relay-BNrC1CEP.mjs → relay-DEIoMntZ.mjs} +200 -99
- package/dist/{renewingLease-CS43br5E.mjs → renewingLease-BCJpW9-u.mjs} +1 -1
- package/dist/{replyHelpers-oZDzakGb.mjs → replyHelpers-DliJNb0-.mjs} +2 -2
- package/dist/{requestContext-fWb_YaV2.mjs → requestContext-tUgLt9Ky.mjs} +1 -1
- package/dist/{requirement--2hWyyHi.mjs → requirement-0l2DApiQ.mjs} +1 -1
- package/dist/{resourceRateLimit-DCWglD7V.d.mts → resourceRateLimit-BPiESPtG.d.mts} +4 -0
- package/dist/{resourceRateLimit-1WbcyMZY.mjs → resourceRateLimit-iSXF8rLH.mjs} +19 -4
- package/dist/{rolldown-runtime-yH2lHMo_.mjs → rolldown-runtime-gKJR3o-6.mjs} +1 -1
- package/dist/{routeValidator-BSlRIA5c.mjs → routeValidator-xNYA4rr1.mjs} +47 -5
- package/dist/{runtimeCapabilities-CYCEtU1W.mjs → runtimeCapabilities-BQK-GrYe.mjs} +1 -1
- package/dist/{schedules-B5WGlYIT.mjs → schedules-D9iMVFhF.mjs} +6 -9
- package/dist/{schemaConverter-DtNvts-6.mjs → schemaConverter-cIh4oX9a.mjs} +2 -2
- package/dist/{actionPermissions-DXrlWHHK.mjs → schemaIR-BsY4y9VP.mjs} +184 -16
- package/dist/schemas/index.mjs +1 -1
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.d.mts +1 -1
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-BwVLSyNG.mjs → scope-QyhM9w8z.mjs} +4 -4
- package/dist/{shutdown-BJiJN7FT.mjs → shutdown-BM7Q0h4B.mjs} +1 -1
- package/dist/{sse-B_50llZu.mjs → sse-ofvlcTQQ.mjs} +9 -35
- package/dist/sseStats-DQqNN385.d.mts +112 -0
- package/dist/sseStream-BxQW7hPq.mjs +166 -0
- package/dist/{store-helpers-D-n5cwy5.mjs → store-helpers-_FRhHDyv.mjs} +1 -1
- package/dist/{simpleEqualityMatcher-DGRLq-1k.mjs → streamFrames-B3ZJfI02.mjs} +19 -2
- package/dist/{streaming-Dcgqa-hH.mjs → streaming-HZr63UiM.mjs} +1 -1
- package/dist/{subscriberIdentity-C9KhIXTF.mjs → subscriberIdentity-DSgnoT_D.mjs} +1 -1
- package/dist/{tenancy-COrhjPRZ.mjs → tenancy-_ukT0oBt.mjs} +2 -2
- package/dist/{tenantPreparation-BElWHytd.mjs → tenantPreparation-DSlQI53c.mjs} +4 -4
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +4 -4
- package/dist/testing/index.mjs +324 -17
- package/dist/testing/outboxStoreContract.mjs +2 -2
- package/dist/testing/requiredPorts.mjs +2 -2
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{timing-CaxKbRk_.mjs → timing-Z8p-Zlw1.mjs} +1 -1
- package/dist/{transactionContext-8qKON0Nk.mjs → transactionContext-DBbSTfY3.mjs} +1 -1
- package/dist/{typeGuards-DVjVSsXO.mjs → typeGuards-_6nNQqgq.mjs} +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-DeLiuaNv.d.mts → types-B4E0sc6D.d.mts} +20 -31
- package/dist/{types-DZHqOuJE.mjs → types-CrOlZ4rY.mjs} +4 -4
- package/dist/usage/index.d.mts +1 -1
- package/dist/usage/index.mjs +7 -7
- package/dist/{userHelpers-_eGj6kf0.mjs → userHelpers-CBKx3XJN.mjs} +1 -1
- package/dist/utils/index.d.mts +239 -34
- package/dist/utils/index.mjs +13 -13
- package/dist/{utils-Dd6MWpye.mjs → utils--HE8R8sH.mjs} +761 -8
- package/dist/{validate-BaF5wd0x.mjs → validate-BUeE2MLR.mjs} +3 -3
- package/dist/{versioning-S18y2-0C.d.mts → versioning-B07RgD27.d.mts} +2 -13
- package/dist/{versioning-DyV7mwtK.mjs → versioning-qYgqwOhL.mjs} +4 -7
- package/dist/{workScope-CmCBUmPR.mjs → workScope-C-1QHNmV.mjs} +2 -2
- package/llms.txt +2 -2
- package/package.json +42 -50
- package/skills/arc/references/api-reference.md +2 -2
- package/skills/arc/references/auth-better-auth.md +1 -0
- package/skills/arc/references/events-outbox.md +7 -4
- package/skills/arc/references/events.md +2 -2
- package/skills/arc/references/mcp-custom-tools.md +1 -1
- package/skills/arc/references/mcp-setup.md +11 -10
- package/skills/arc/references/mcp-testing.md +3 -3
- package/skills/arc/references/production-api.md +4 -0
- package/skills/arc/references/production-boot.md +2 -0
- package/skills/arc/references/production-idempotency.md +1 -1
- package/skills/arc/references/production-realtime.md +28 -2
- package/skills/arc/references/validation.md +4 -0
- package/skills/arc/references/writes-hooks-errors.md +1 -0
- package/dist/schemaIR-uS_RHqa3.mjs +0 -108
- package/dist/sseStream-BjSo9Ult.mjs +0 -57
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as workSeedFromEvent, t as runWorkScope } from "./workScope-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as workSeedFromEvent, t as runWorkScope } from "./workScope-C-1QHNmV.mjs";
|
|
3
3
|
import { createEvent as createEvent$1, createEventRouter } from "@classytic/primitives/events";
|
|
4
4
|
// src/events/EventTransport.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as buildRequestScopeProjection } from "./projection-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as buildRequestScopeProjection } from "./projection-DowJlIto.mjs";
|
|
3
3
|
// src/hooks/HookSystem.ts
|
|
4
4
|
/**
|
|
5
5
|
* Hook System
|
|
@@ -34,9 +34,25 @@ type CacheResult<T> = {
|
|
|
34
34
|
status: "fresh" | "stale";
|
|
35
35
|
data: T;
|
|
36
36
|
};
|
|
37
|
+
/** `QueryCache` options. */
|
|
38
|
+
interface QueryCacheOptions {
|
|
39
|
+
/**
|
|
40
|
+
* Called once per store outage (the first failed operation after a success) with the
|
|
41
|
+
* error and the operation. While the store fails, reads miss (the source answers), writes
|
|
42
|
+
* are skipped, and invalidations are remembered and replayed when it answers again.
|
|
43
|
+
*/
|
|
44
|
+
onStoreError?: (err: unknown, operation: string) => void;
|
|
45
|
+
}
|
|
37
46
|
declare class QueryCache {
|
|
38
47
|
private readonly store;
|
|
39
|
-
|
|
48
|
+
private readonly onStoreError;
|
|
49
|
+
/** Entry deletes the store refused: read as a miss here until replayed. */
|
|
50
|
+
private readonly pendingDeletes;
|
|
51
|
+
/** Version keys whose bump the store refused: bumped once each when it answers again. */
|
|
52
|
+
private readonly pendingBumps;
|
|
53
|
+
private failing;
|
|
54
|
+
private flushing;
|
|
55
|
+
constructor(store: CacheStore, options?: QueryCacheOptions);
|
|
40
56
|
get<T>(key: string): Promise<CacheResult<T>>;
|
|
41
57
|
set<T>(key: string, data: T, config: QueryCacheConfig): Promise<void>;
|
|
42
58
|
invalidate(key: string): Promise<void>;
|
|
@@ -48,6 +64,14 @@ declare class QueryCache {
|
|
|
48
64
|
getTagVersion(tag: string): Promise<number>;
|
|
49
65
|
/** Bump tag version — orphans all cached queries tagged with this tag */
|
|
50
66
|
bumpTagVersion(tag: string): Promise<void>;
|
|
67
|
+
/** The store is failing, or holds invalidations it refused: reads go to the source. */
|
|
68
|
+
get degraded(): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* A version the store cannot give is 0: entries are not read while it fails either, and
|
|
71
|
+
* a version bump it refused is replayed before any version is read again (`recovered`),
|
|
72
|
+
* so an entry cached before the outage is never served past an invalidation.
|
|
73
|
+
*/
|
|
74
|
+
private readVersion;
|
|
51
75
|
/**
|
|
52
76
|
* Version-bump semantics:
|
|
53
77
|
*
|
|
@@ -69,7 +93,18 @@ declare class QueryCache {
|
|
|
69
93
|
* outlive that reset and entry TTLs are minutes-scale (staleTime +
|
|
70
94
|
* gcTime). The read-modify-write fallback uses plain `set`, which
|
|
71
95
|
* refreshes the TTL per bump — strictly longer-lived, equally safe.
|
|
96
|
+
*
|
|
97
|
+
* A bump the store refuses is remembered and replayed once it answers.
|
|
72
98
|
*/
|
|
73
99
|
private bumpVersion;
|
|
100
|
+
private rawBump;
|
|
101
|
+
/**
|
|
102
|
+
* Replay refused invalidations before a read; `false` while the store still refuses a
|
|
103
|
+
* version bump (the caller then answers from the source). One replay at a time.
|
|
104
|
+
*/
|
|
105
|
+
private recovered;
|
|
106
|
+
private flush;
|
|
107
|
+
private ok;
|
|
108
|
+
private failed;
|
|
74
109
|
}
|
|
75
110
|
export { QueryCacheConfig as a, QueryCache as i, CacheResult as n, CacheStatus as r, CacheEnvelope as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
2
|
// src/idempotency/acquire.ts
|
|
3
3
|
async function acquireIdempotencyKey(store, key, requestId, lockTtlMs) {
|
|
4
4
|
if (typeof store.acquire === "function") return store.acquire(key, requestId, lockTtlMs);
|
package/dist/audit/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { d as UserBase } from "../base-HXNgPQww.mjs";
|
|
3
|
-
import "../index-
|
|
3
|
+
import "../index-DLCcLUQT.mjs";
|
|
4
4
|
import { FastifyPluginAsync } from "fastify";
|
|
5
5
|
import { RepositoryLike } from "@classytic/repo-core/adapter";
|
|
6
6
|
type AuditAction = "create" | "update" | "delete" | "restore" | "custom";
|
package/dist/audit/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as transactionContext } from "../transactionContext-DBbSTfY3.mjs";
|
|
3
|
+
import { g as getUserId, i as getClientId } from "../types-CrOlZ4rY.mjs";
|
|
4
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-BQK-GrYe.mjs";
|
|
5
5
|
import { and, anyOf, eq, gte, lt, lte } from "@classytic/repo-core/filter";
|
|
6
6
|
import fp from "fastify-plugin";
|
|
7
7
|
// src/audit/repository-audit-adapter.ts
|
package/dist/auth/audit.mjs
CHANGED
package/dist/auth/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { Mt as AuthHelpers, Nt as AuthPluginOptions } from "../index-DLCcLUQT.mjs";
|
|
3
3
|
import { l as PermissionCheck } from "../base-HXNgPQww.mjs";
|
|
4
|
-
import { At as AuthHelpers, jt as AuthPluginOptions } from "../index-Cy2-QffW.mjs";
|
|
5
4
|
import { t as ExternalOpenApiPaths } from "../externalPaths-BOqdq5wr.mjs";
|
|
5
|
+
import { i as RequestScope } from "../types-DnkIALZ8.mjs";
|
|
6
6
|
import { a as SessionManagerOptions, c as createSessionManager, i as SessionData, n as MemorySessionStoreOptions, o as SessionManagerResult, r as SessionCookieOptions, s as SessionStore, t as MemorySessionStore } from "../sessionManager-CdvDF04x.mjs";
|
|
7
7
|
import { FastifyPluginAsync, FastifyReply as FastifyReply$1, FastifyRequest } from "fastify";
|
|
8
8
|
declare module "fastify" {
|
package/dist/auth/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-CBKx3XJN.mjs";
|
|
3
|
+
import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-BpYV859Y.mjs";
|
|
4
|
+
import { E as requireOrgRole, T as requireOrgMembership, k as requireTeamMembership } from "../permissions-CFsmdYUt.mjs";
|
|
5
|
+
import { n as requireSingleHeaderValue } from "../headers-D4bncIOf.mjs";
|
|
6
|
+
import { o as toJsonSchema } from "../schemaConverter-cIh4oX9a.mjs";
|
|
7
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-BQK-GrYe.mjs";
|
|
8
8
|
import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
|
|
9
9
|
import { isProductionEnv } from "@classytic/primitives/environment";
|
|
10
10
|
import { createHmac, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -608,19 +608,57 @@ function toFetchRequest(request) {
|
|
|
608
608
|
*
|
|
609
609
|
* Transfers status code, all response headers, and the body.
|
|
610
610
|
* Handles both buffered (JSON) and streaming (SSE) responses.
|
|
611
|
+
*
|
|
612
|
+
* A buffered JSON error (status >= 400, body a plain object) gains arc's
|
|
613
|
+
* envelope fields when absent: `status` and `correlationId` (`request.id`),
|
|
614
|
+
* the same two the error handler stamps on arc's own refusals. Anything else
|
|
615
|
+
* is passed through byte-identical.
|
|
611
616
|
*/
|
|
612
|
-
async function sendFetchResponse(response, reply) {
|
|
617
|
+
async function sendFetchResponse(response, reply, request) {
|
|
613
618
|
reply.status(response.status);
|
|
619
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
620
|
+
const streamed = response.body !== null && (contentType.includes("text/event-stream") || contentType.includes("application/octet-stream"));
|
|
621
|
+
let body;
|
|
622
|
+
let rewritten = false;
|
|
623
|
+
if (!streamed) {
|
|
624
|
+
body = await response.text();
|
|
625
|
+
const enveloped = request ? withErrorEnvelope(body, response.status, contentType, request.id) : void 0;
|
|
626
|
+
if (enveloped !== void 0) {
|
|
627
|
+
body = enveloped;
|
|
628
|
+
rewritten = true;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
614
631
|
response.headers.forEach((value, key) => {
|
|
615
|
-
|
|
632
|
+
const lower = key.toLowerCase();
|
|
633
|
+
if (lower === "transfer-encoding") return;
|
|
634
|
+
if (rewritten && lower === "content-length") return;
|
|
616
635
|
reply.header(key, value);
|
|
617
636
|
});
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
637
|
+
await reply.send(streamed ? response.body : body);
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* The enveloped JSON text for a Better Auth error body, or `undefined` to
|
|
641
|
+
* send the original bytes (not an error, not JSON, not a plain object, or
|
|
642
|
+
* nothing to add).
|
|
643
|
+
*/
|
|
644
|
+
function withErrorEnvelope(text, status, contentType, correlationId) {
|
|
645
|
+
if (status < 400 || !contentType.toLowerCase().includes("json")) return void 0;
|
|
646
|
+
let parsed;
|
|
647
|
+
try {
|
|
648
|
+
parsed = JSON.parse(text);
|
|
649
|
+
} catch {
|
|
650
|
+
return;
|
|
623
651
|
}
|
|
652
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return void 0;
|
|
653
|
+
const obj = parsed;
|
|
654
|
+
const addStatus = obj.status === void 0;
|
|
655
|
+
const addCorrelation = obj.correlationId === void 0 && correlationId !== void 0;
|
|
656
|
+
if (!addStatus && !addCorrelation) return void 0;
|
|
657
|
+
return JSON.stringify({
|
|
658
|
+
...obj,
|
|
659
|
+
...addStatus ? { status } : {},
|
|
660
|
+
...addCorrelation ? { correlationId } : {}
|
|
661
|
+
});
|
|
624
662
|
}
|
|
625
663
|
/**
|
|
626
664
|
* Resolve the current session via `auth.api.getSession`. Throws
|
|
@@ -914,7 +952,7 @@ function createBetterAuthAdapter(options) {
|
|
|
914
952
|
fastify.all(`${normalizedBase}/*`, routeOpts, async (request, reply) => {
|
|
915
953
|
try {
|
|
916
954
|
const fetchRequest = toFetchRequest(request);
|
|
917
|
-
await sendFetchResponse(await auth.handler(fetchRequest), reply);
|
|
955
|
+
await sendFetchResponse(await auth.handler(fetchRequest), reply, request);
|
|
918
956
|
} catch (err) {
|
|
919
957
|
throw new ArcError("Authentication service error", {
|
|
920
958
|
code: ARC_ERROR_CODES.AUTH_SERVICE_ERROR,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as arcLog } from "./logger-
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as arcLog } from "./logger-UbknHqHy.mjs";
|
|
3
|
+
import { t as ArcError } from "./errors-BpYV859Y.mjs";
|
|
4
|
+
import { t as conjoinPolicyFilters } from "./filter-merge-B1eJ1pMx.mjs";
|
|
5
5
|
// src/permissions/authorizationDecision.ts
|
|
6
6
|
const log = arcLog("permissions:enforce");
|
|
7
7
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as conjoinPolicyFilters } from "./filter-merge-
|
|
3
|
-
import { D as toRepositoryFilter } from "./plugin-
|
|
4
|
-
import { i as
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as conjoinPolicyFilters } from "./filter-merge-B1eJ1pMx.mjs";
|
|
3
|
+
import { D as toRepositoryFilter } from "./plugin-CrMPYbdj.mjs";
|
|
4
|
+
import { i as guessDate, t as coerceByType } from "./fieldTypes-EFWxCkZ5.mjs";
|
|
5
|
+
import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-BUeE2MLR.mjs";
|
|
5
6
|
// src/core/aggregation/buildHandler.ts
|
|
6
7
|
/**
|
|
7
8
|
* Framework-agnostic aggregation execution. Runs safety guards,
|
|
@@ -27,7 +28,11 @@ async function executeAggregation(normalized, deps, ctx) {
|
|
|
27
28
|
status: 400,
|
|
28
29
|
body: guardError
|
|
29
30
|
};
|
|
30
|
-
const
|
|
31
|
+
const fieldTypes = config.fieldTypes || deps.fieldTypes ? {
|
|
32
|
+
...deps.fieldTypes,
|
|
33
|
+
...config.fieldTypes
|
|
34
|
+
} : void 0;
|
|
35
|
+
const callerFilter = conjoinPolicyFilters(extractCallerFilter(query, fieldTypes), policyFilter);
|
|
31
36
|
const aggReq = compileAggRequest(normalized, callerFilter, tenantOptions, query);
|
|
32
37
|
if (config.materialized) {
|
|
33
38
|
const matCtx = {
|
|
@@ -225,20 +230,19 @@ function toOperandList(value) {
|
|
|
225
230
|
if (typeof value === "string") return value.split(",").map((v) => v.trim()).filter((v) => v.length > 0);
|
|
226
231
|
return [value];
|
|
227
232
|
}
|
|
228
|
-
const ISO_DATE_RE = /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:?\d{2})?)?$/;
|
|
229
|
-
function tryCoerceDate(v) {
|
|
230
|
-
if (typeof v !== "string" || !ISO_DATE_RE.test(v)) return v;
|
|
231
|
-
const d = new Date(v);
|
|
232
|
-
return Number.isNaN(d.getTime()) ? v : d;
|
|
233
|
-
}
|
|
234
233
|
/**
|
|
235
234
|
* Translate a qs-parsed nested-operator object (`{ field: { gte, lte } }`)
|
|
236
235
|
* into Mongo-shape (`{ field: { $gte: Date, $lte: Date } }`). Only fires
|
|
237
236
|
* when EVERY key is a known shorthand operator — leaves user-data
|
|
238
237
|
* objects untouched so callers can still equality-match on a stored
|
|
239
238
|
* sub-document.
|
|
239
|
+
*
|
|
240
|
+
* With a declared `type` for the field, comparison operands (`eq`, `ne`, ranges, each `in` /
|
|
241
|
+
* `nin` item) are coerced by that type (`coerceByType`). Without one, only range operands are
|
|
242
|
+
* touched, by the legacy ISO-date shape guess.
|
|
240
243
|
*/
|
|
241
|
-
function expandShorthandOperators(value) {
|
|
244
|
+
function expandShorthandOperators(value, type) {
|
|
245
|
+
if (type && typeof value === "string") return coerceByType(value, type);
|
|
242
246
|
if (!value || typeof value !== "object" || Array.isArray(value)) return value;
|
|
243
247
|
const nested = value;
|
|
244
248
|
const keys = Object.keys(nested);
|
|
@@ -248,8 +252,11 @@ function expandShorthandOperators(value) {
|
|
|
248
252
|
for (const [op, opVal] of Object.entries(nested)) {
|
|
249
253
|
const mongoOp = OPERATOR_SHORTHAND[op];
|
|
250
254
|
if (!mongoOp) continue;
|
|
251
|
-
if (SHORTHAND_RANGE_OPS.has(op)) expanded[mongoOp] =
|
|
252
|
-
else if (SHORTHAND_LIST_OPS.has(op))
|
|
255
|
+
if (SHORTHAND_RANGE_OPS.has(op)) expanded[mongoOp] = type ? coerceByType(opVal, type) : guessDate(opVal);
|
|
256
|
+
else if (SHORTHAND_LIST_OPS.has(op)) {
|
|
257
|
+
const list = toOperandList(opVal);
|
|
258
|
+
expanded[mongoOp] = type ? list.map((v) => coerceByType(v, type)) : list;
|
|
259
|
+
} else if (type && (op === "eq" || op === "ne")) expanded[mongoOp] = coerceByType(opVal, type);
|
|
253
260
|
else expanded[mongoOp] = opVal;
|
|
254
261
|
}
|
|
255
262
|
return expanded;
|
|
@@ -265,7 +272,7 @@ function expandShorthandOperators(value) {
|
|
|
265
272
|
* The resulting record is shallow-merged into the AggRequest filter
|
|
266
273
|
* via `compileAggRequest`.
|
|
267
274
|
*/
|
|
268
|
-
function extractCallerFilter(query) {
|
|
275
|
+
function extractCallerFilter(query, fieldTypes) {
|
|
269
276
|
const out = {};
|
|
270
277
|
const reserved = /* @__PURE__ */ new Set([
|
|
271
278
|
"page",
|
|
@@ -282,7 +289,7 @@ function extractCallerFilter(query) {
|
|
|
282
289
|
for (const [key, value] of Object.entries(query)) {
|
|
283
290
|
if (reserved.has(key)) continue;
|
|
284
291
|
if (value === void 0 || value === "") continue;
|
|
285
|
-
out[key] = expandShorthandOperators(value);
|
|
292
|
+
out[key] = expandShorthandOperators(value, fieldTypes?.[key]);
|
|
286
293
|
}
|
|
287
294
|
return out;
|
|
288
295
|
}
|
package/dist/cache/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { n as CacheStats, r as CacheStore, t as CacheLogger } from "../interface-WR1U0K7t.mjs";
|
|
3
|
-
import { a as QueryCacheConfig, i as QueryCache, n as CacheResult, r as CacheStatus, t as CacheEnvelope } from "../QueryCache-
|
|
4
|
-
import { i as queryCachePlugin, n as QueryCacheDefaults, r as QueryCachePluginOptions, t as CrossResourceRule } from "../queryCachePlugin-
|
|
3
|
+
import { a as QueryCacheConfig, i as QueryCache, n as CacheResult, r as CacheStatus, t as CacheEnvelope } from "../QueryCache-BE47tmlO.mjs";
|
|
4
|
+
import { i as queryCachePlugin, n as QueryCacheDefaults, r as QueryCachePluginOptions, t as CrossResourceRule } from "../queryCachePlugin-DrQNnGws.mjs";
|
|
5
5
|
import { n as UpstashKeyValueCommands, t as IoredisKeyValueCommands } from "../redisShapes-CqBXTn_s.mjs";
|
|
6
6
|
/**
|
|
7
7
|
* Cache Key Utilities
|
package/dist/cache/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys
|
|
3
|
-
import { t as MemoryCacheStore } from "../memory-
|
|
4
|
-
import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys--l9n7aOC.mjs";
|
|
3
|
+
import { t as MemoryCacheStore } from "../memory-C47xVsjX.mjs";
|
|
4
|
+
import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-BvB3k_Fh.mjs";
|
|
5
5
|
// src/cache/redis.ts
|
|
6
6
|
/**
|
|
7
7
|
* Redis-backed cache store.
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-gKJR3o-6.mjs";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
// src/plugins/caching.ts
|
|
5
|
-
var caching_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
-
cachingPlugin: () => cachingPlugin,
|
|
7
|
-
default: () => caching_default
|
|
8
|
-
});
|
|
5
|
+
var caching_exports = /* @__PURE__ */ __exportAll({ default: () => caching_default });
|
|
9
6
|
const FNV_OFFSET = 2166136261;
|
|
10
7
|
const FNV_PRIME = 16777619;
|
|
11
8
|
/** Fast non-cryptographic hash for ETag generation */
|
package/dist/cleanup/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import { l as PermissionCheck } from "../base-HXNgPQww.mjs";
|
|
3
|
-
import { A as RequestWithExtras } from "../index-Cy2-QffW.mjs";
|
|
4
2
|
import { A as CleanupStepResult, B as VerificationResult, C as CleanupResult, D as CleanupRunStore, E as CleanupRunStatus, F as PurgeEvidence, I as PurgeResourceResult, L as PurgeStrategyKind, M as CleanupWriteFence, N as DEFAULT_CLEANUP_LIMITS, O as CleanupRunTransitionPatch, P as PurgeActor, R as PurgeVerificationSummary, S as CleanupRecipe, T as CleanupRunCreateResult, _ as CleanupPermissions, a as CleanupEvidenceStore, b as CleanupPlanItem, c as CleanupInput, d as CleanupLease, f as CleanupLimits, g as CleanupPermissionCheck, h as CleanupOutcomeStatus, i as CleanupContext, j as CleanupStepRunStatus, k as CleanupStepProgress, l as CleanupJob, m as CleanupManifest, n as CLEANUP_TERMINAL_STATUSES, o as CleanupExecutionContext, p as CleanupLogger, r as CleanupCancelRequest, s as CleanupFinalizationPayload, t as Availability, u as CleanupJobQueue, v as CleanupPlan, w as CleanupRun, x as CleanupProgressSummary, y as CleanupPlanDraft, z as VerificationCheck } from "../types-C0YJAiL0.mjs";
|
|
5
3
|
import { n as ArcModule } from "../types-BeEJm-DV.mjs";
|
|
4
|
+
import { l as PermissionCheck } from "../base-HXNgPQww.mjs";
|
|
5
|
+
import { A as RequestWithExtras } from "../index-DLCcLUQT.mjs";
|
|
6
6
|
import { PurgeStrategyKind as PurgeStrategyKind$1 } from "@classytic/primitives/retention";
|
|
7
7
|
import { CleanupStep } from "@classytic/repo-core/cleanup";
|
|
8
8
|
/** Metadata + steps for {@link recipeFromSteps}. */
|
package/dist/cleanup/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as defineResource } from "../defineResource-BAzNu5Um.mjs";
|
|
3
|
+
import { t as defineModule } from "../module-CWiqsXnh.mjs";
|
|
4
|
+
import { g as getUserId } from "../types-CrOlZ4rY.mjs";
|
|
5
5
|
import { createPurgeEvidence } from "@classytic/primitives/retention";
|
|
6
6
|
import { canonicalJson, sha256Hex } from "@classytic/primitives/canonical";
|
|
7
7
|
// src/cleanup/errors.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { F as ResourceDefinition, X as RouteSchemaOptions,
|
|
2
|
+
import { F as ResourceDefinition, X as RouteSchemaOptions, jt as RateLimitConfig } from "../../index-DLCcLUQT.mjs";
|
|
3
3
|
export interface DescribedResource {
|
|
4
4
|
name: string;
|
|
5
5
|
displayName: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CRUD_OPERATIONS } from "../../constants-
|
|
3
|
-
import { n as stringifyMeasureMap } from "../../ResourceRegistry-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "../../constants-DOnfMd7i.mjs";
|
|
3
|
+
import { n as stringifyMeasureMap } from "../../ResourceRegistry-CP-iTcKy.mjs";
|
|
4
4
|
import { resolve } from "node:path";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
// src/cli/commands/describe.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as buildOpenApiSpec } from "../../openapi-
|
|
3
|
-
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as buildOpenApiSpec } from "../../openapi-D6MAbYpv.mjs";
|
|
3
|
+
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-ItNBIQ5w.mjs";
|
|
4
4
|
import { dirname, resolve } from "node:path";
|
|
5
5
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
6
6
|
// src/cli/commands/docs.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
export { t as generate } from "../../generate-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
export { t as generate } from "../../generate-Cr0ULavs.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
export { t as init } from "../../init-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
export { t as init } from "../../init-C4a24wD2.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-ItNBIQ5w.mjs";
|
|
3
3
|
// src/cli/commands/introspect.ts
|
|
4
4
|
function describePermission(value) {
|
|
5
5
|
if (!value) return "none";
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
2
|
import { describe } from "./commands/describe.mjs";
|
|
3
3
|
import { exportDocs } from "./commands/docs.mjs";
|
|
4
4
|
import { doctor } from "./commands/doctor.mjs";
|
|
5
|
-
import { t as generate } from "../generate-
|
|
6
|
-
import { t as init } from "../init-
|
|
5
|
+
import { t as generate } from "../generate-Cr0ULavs.mjs";
|
|
6
|
+
import { t as init } from "../init-C4a24wD2.mjs";
|
|
7
7
|
import { introspect } from "./commands/introspect.mjs";
|
|
8
8
|
export { describe, doctor, exportDocs, generate, init, introspect };
|
package/dist/context/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as
|
|
3
|
-
import { n as
|
|
4
|
-
import { n as
|
|
5
|
-
import {
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as requestContext, t as getTraceHeaders } from "../requestContext-tUgLt9Ky.mjs";
|
|
3
|
+
import { n as evictToSize, r as touch } from "../boundedMap-C51EUUOm.mjs";
|
|
4
|
+
import { n as scopedValue, r as workSeedFromEvent, t as runWorkScope } from "../workScope-C-1QHNmV.mjs";
|
|
5
|
+
import { t as transactionContext } from "../transactionContext-DBbSTfY3.mjs";
|
|
6
6
|
// src/context/requestScopedCache.ts
|
|
7
7
|
/** The memo slot the per-scope store hangs off. */
|
|
8
8
|
const SLOT = Symbol.for("arc.requestScopedCache");
|
package/dist/core/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
import { $t as
|
|
3
|
-
import { $ as
|
|
4
|
-
export { AccessControl, type AccessControlConfig, type AccessControlRepository, type ActionTargetCheck, type AdapterLike, type AggMeasureInput, type AggMeasureShorthand, type AggregationCacheConfig, type AggregationConfig, type AggregationDateRangeRequirement, type AggregationIndexHint, type AggregationMaterializedContext, type AggregationMaterializedResult, type AggregationRateLimit, type AggregationsMap, BaseController, type BaseControllerOptions, BaseCrudController, BodySanitizer, type BodySanitizerConfig, type BulkExt, BulkMixin, CRUD_OPERATIONS, type ConfigError, type ControllerConfigurableOptions, type ControllerConstructionOptions, CrudOperation, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, DEFAULT_VERSION_FIELD, type DefineActionConfig, type FetchDenialReason, type FetchResult, HOOK_OPERATIONS, HOOK_PHASES, HookOperation, HookPhase, type InputSchema, type ListResult, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, type MixinConstructor, MutationOperation, type NativePolicyFilter, QueryResolver, type QueryResolverConfig, RESERVED_QUERY_PARAMS, ResourceDefinition, type ResourceSeams, type RouteInputSlots, SYSTEM_FIELDS, type SeamedResourceConfig, type SlugExt, SlugMixin, type SoftDeleteExt, SoftDeleteMixin, type TreeExt, TreeMixin, type ValidateOptions, type ValidationResult, type VariantOverride, type VariantsMap, type VariantsResult, assertValidConfig, collectReadBlockedFields, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, crudInput, defineAction, defineAggregation, defineResource, defineResourceVariants, formatValidationErrors, getActionTarget, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, mergeResourceConfig, nativePolicyFilter, noPayloadSchema, parsed, routeInput, sendControllerResponse, validateResourceConfig };
|
|
2
|
+
import { $t as getEntityIdField, An as ControllerConstructionOptions, Bt as SoftDeleteMixin, F as ResourceDefinition, Gt as BulkExt, Ht as TreeMixin, Jt as QueryResolver, Kt as BulkMixin, Mn as MixinConstructor, Nn as BodySanitizer, On as BaseControllerOptions, P as defineResource, Pn as BodySanitizerConfig, Qt as getEntityId, Rt as BaseController, Ut as SlugExt, Vt as TreeExt, Wt as SlugMixin, Xt as ActionTargetCheck, Yt as QueryResolverConfig, Zt as getActionTarget, an as FetchResult, at as AggregationCacheConfig, ct as AggregationIndexHint, dt as AggregationRateLimit, en as getEntityQuery, ft as AggregationsMap, in as FetchDenialReason, it as AggMeasureShorthand, jn as ListResult, kn as ControllerConfigurableOptions, lt as AggregationMaterializedContext, mt as AggregationFieldTypes, nn as AccessControlConfig, ot as AggregationConfig, pt as AggregationFieldType, qt as BaseCrudController, rn as AccessControlRepository, rt as AggMeasureInput, st as AggregationDateRangeRequirement, tn as AccessControl, ut as AggregationMaterializedResult, zt as SoftDeleteExt } from "../index-DLCcLUQT.mjs";
|
|
3
|
+
import { $ as MAX_SEARCH_LENGTH, A as ResourceSeams, B as DEFAULT_ID_FIELD, C as getControllerScope, D as VariantsResult, E as VariantsMap, F as createCrudRouter, G as DEFAULT_UPDATE_METHOD, H as DEFAULT_MAX_LIMIT, I as createPermissionMiddleware, J as HOOK_PHASES, K as DEFAULT_VERSION_FIELD, L as defineAggregation, M as mergeResourceConfig, N as DefineActionConfig, O as defineResourceVariants, P as defineAction, Q as MAX_REGEX_LENGTH, R as CRUD_OPERATIONS, S as getControllerContext, T as VariantOverride, U as DEFAULT_SORT, V as DEFAULT_LIMIT, W as DEFAULT_TENANT_FIELD, X as HookPhase, Y as HookOperation, Z as MAX_FILTER_DEPTH, _ as nativePolicyFilter, a as formatValidationErrors, b as createFastifyHandler, c as InputSchema, d as RouteInputSlots, et as MUTATION_OPERATIONS, f as crudInput, g as NativePolicyFilter, h as routeInput, i as assertValidConfig, j as SeamedResourceConfig, k as AdapterLike, l as RouteInputIssue, m as parsed, n as ValidateOptions, nt as RESERVED_QUERY_PARAMS, o as validateResourceConfig, p as noPayloadSchema, q as HOOK_OPERATIONS, r as ValidationResult, rt as SYSTEM_FIELDS, s as CrudInput, t as ConfigError, tt as MutationOperation, u as RouteInputOptions, v as collectReadBlockedFields, w as sendControllerResponse, x as createRequestContext, y as isFieldReadable, z as CrudOperation } from "../index-DKM2p5w5.mjs";
|
|
4
|
+
export { AccessControl, type AccessControlConfig, type AccessControlRepository, type ActionTargetCheck, type AdapterLike, type AggMeasureInput, type AggMeasureShorthand, type AggregationCacheConfig, type AggregationConfig, type AggregationDateRangeRequirement, type AggregationFieldType, type AggregationFieldTypes, type AggregationIndexHint, type AggregationMaterializedContext, type AggregationMaterializedResult, type AggregationRateLimit, type AggregationsMap, BaseController, type BaseControllerOptions, BaseCrudController, BodySanitizer, type BodySanitizerConfig, type BulkExt, BulkMixin, CRUD_OPERATIONS, type ConfigError, type ControllerConfigurableOptions, type ControllerConstructionOptions, type CrudInput, CrudOperation, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, DEFAULT_VERSION_FIELD, type DefineActionConfig, type FetchDenialReason, type FetchResult, HOOK_OPERATIONS, HOOK_PHASES, HookOperation, HookPhase, type InputSchema, type ListResult, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, type MixinConstructor, MutationOperation, type NativePolicyFilter, QueryResolver, type QueryResolverConfig, RESERVED_QUERY_PARAMS, ResourceDefinition, type ResourceSeams, type RouteInputIssue, type RouteInputOptions, type RouteInputSlots, SYSTEM_FIELDS, type SeamedResourceConfig, type SlugExt, SlugMixin, type SoftDeleteExt, SoftDeleteMixin, type TreeExt, TreeMixin, type ValidateOptions, type ValidationResult, type VariantOverride, type VariantsMap, type VariantsResult, assertValidConfig, collectReadBlockedFields, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, crudInput, defineAction, defineAggregation, defineResource, defineResourceVariants, formatValidationErrors, getActionTarget, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, mergeResourceConfig, nativePolicyFilter, noPayloadSchema, parsed, routeInput, sendControllerResponse, validateResourceConfig };
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as DEFAULT_SORT, c as DEFAULT_VERSION_FIELD, d as MAX_FILTER_DEPTH, f as MAX_REGEX_LENGTH, g as SYSTEM_FIELDS, h as RESERVED_QUERY_PARAMS, i as DEFAULT_MAX_LIMIT, l as HOOK_OPERATIONS, m as MUTATION_OPERATIONS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MAX_SEARCH_LENGTH, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as HOOK_PHASES } from "../constants-
|
|
3
|
-
import { E as nativePolicyFilter, T as AccessControl, _ as BaseCrudController, a as crudInput, b as isFieldReadable, c as routeInput, d as createPermissionMiddleware, f as BaseController, g as BulkMixin, h as SlugMixin, m as SoftDeleteMixin, o as noPayloadSchema, p as TreeMixin, s as parsed, u as createCrudRouter, v as QueryResolver, w as BodySanitizer, y as collectReadBlockedFields } from "../plugin-
|
|
4
|
-
import { t as defineAggregation } from "../defineAggregation-
|
|
5
|
-
import { C as
|
|
6
|
-
import { a as defineResourceVariants, i as getEntityQuery, n as getEntityId, o as mergeResourceConfig, r as getEntityIdField, s as defineAction, t as getActionTarget } from "../core-
|
|
7
|
-
import { a as ResourceDefinition, i as validateResourceConfig, n as assertValidConfig, r as formatValidationErrors, t as defineResource } from "../defineResource-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as DEFAULT_SORT, c as DEFAULT_VERSION_FIELD, d as MAX_FILTER_DEPTH, f as MAX_REGEX_LENGTH, g as SYSTEM_FIELDS, h as RESERVED_QUERY_PARAMS, i as DEFAULT_MAX_LIMIT, l as HOOK_OPERATIONS, m as MUTATION_OPERATIONS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MAX_SEARCH_LENGTH, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as HOOK_PHASES } from "../constants-DOnfMd7i.mjs";
|
|
3
|
+
import { E as nativePolicyFilter, T as AccessControl, _ as BaseCrudController, a as crudInput, b as isFieldReadable, c as routeInput, d as createPermissionMiddleware, f as BaseController, g as BulkMixin, h as SlugMixin, m as SoftDeleteMixin, o as noPayloadSchema, p as TreeMixin, s as parsed, u as createCrudRouter, v as QueryResolver, w as BodySanitizer, y as collectReadBlockedFields } from "../plugin-CrMPYbdj.mjs";
|
|
4
|
+
import { t as defineAggregation } from "../defineAggregation-BI5pRb8c.mjs";
|
|
5
|
+
import { C as createFastifyHandler, D as sendControllerResponse, E as getControllerScope, T as getControllerContext, w as createRequestContext } from "../schemaIR-BsY4y9VP.mjs";
|
|
6
|
+
import { a as defineResourceVariants, i as getEntityQuery, n as getEntityId, o as mergeResourceConfig, r as getEntityIdField, s as defineAction, t as getActionTarget } from "../core-BoEdFDDw.mjs";
|
|
7
|
+
import { a as ResourceDefinition, i as validateResourceConfig, n as assertValidConfig, r as formatValidationErrors, t as defineResource } from "../defineResource-BAzNu5Um.mjs";
|
|
8
8
|
export { AccessControl, BaseController, BaseCrudController, BodySanitizer, BulkMixin, CRUD_OPERATIONS, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, DEFAULT_VERSION_FIELD, HOOK_OPERATIONS, HOOK_PHASES, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, QueryResolver, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, SlugMixin, SoftDeleteMixin, TreeMixin, assertValidConfig, collectReadBlockedFields, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, crudInput, defineAction, defineAggregation, defineResource, defineResourceVariants, formatValidationErrors, getActionTarget, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, mergeResourceConfig, nativePolicyFilter, noPayloadSchema, parsed, routeInput, sendControllerResponse, validateResourceConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import "./constants-
|
|
3
|
-
import { t as defineResource } from "./defineResource-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import "./constants-DOnfMd7i.mjs";
|
|
3
|
+
import { t as defineResource } from "./defineResource-BAzNu5Um.mjs";
|
|
4
4
|
// src/core/defineAction.ts
|
|
5
5
|
/**
|
|
6
6
|
* Build an `ActionDefinition` with a typed handler. The literal schema
|