@classytic/arc 2.40.0 → 2.41.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/{BaseController-BqJtbiUA.mjs → BaseController-DYJRZ0EJ.mjs} +18 -12
- package/dist/{EventTransport-BPOQsEer.d.mts → EventTransport-CbUKDzZZ.d.mts} +25 -0
- package/dist/{EventTransport-BUkTwY_x.mjs → EventTransport-n7qO5Cz3.mjs} +11 -2
- package/dist/{HookSystem-96nzZLmk.mjs → HookSystem-CxvZBo77.mjs} +2 -2
- package/dist/{ResourceRegistry-B9WnuG2Q.mjs → ResourceRegistry-Cu7uTJp9.mjs} +2 -2
- package/dist/{actionPermissions-4OGbe3Hf.mjs → actionPermissions-DPwPWPOV.mjs} +7 -6
- package/dist/audit/index.d.mts +2 -2
- package/dist/audit/index.mjs +10 -3
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.d.mts +2 -2
- package/dist/auth/index.mjs +12 -6
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-D_LFvMlm.mjs → authorizationDecision-2YY_Kaj1.mjs} +2 -2
- package/dist/{base-C-NL2fTi.d.mts → base-CxrV1LmG.d.mts} +10 -0
- package/dist/{buildHandler-BG_CHXqQ.mjs → buildHandler-CUhjGHGZ.mjs} +4 -4
- package/dist/cache/index.d.mts +4 -2
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-Bqcn3Brl.mjs → caching-DsWDjIxx.mjs} +2 -2
- 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-BQ2FbhPB.mjs → constants-BxLgNFF7.mjs} +1 -1
- package/dist/context/index.mjs +36 -11
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.mjs +7 -7
- package/dist/{core-CsZR037F.mjs → core-iNGqYerO.mjs} +3 -3
- package/dist/{createActionRouter-BR93gCKg.mjs → createActionRouter-BBlbPs3k.mjs} +7 -7
- package/dist/{createAggregationRouter-CF40Aw95.mjs → createAggregationRouter-Dv5SuK2x.mjs} +7 -7
- package/dist/{createMcpServer-BVTs2S5G.d.mts → createMcpServer-CbDWkZ1T.d.mts} +1 -1
- package/dist/{defineAggregation-BDA2Tw7v.mjs → defineAggregation-UyeurGkp.mjs} +1 -1
- package/dist/{defineResource-DaIySrQr.mjs → defineResource-DzGT-2LP.mjs} +18 -18
- 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-CZy6n50b.mjs → elevation-BF-vhGxY.mjs} +4 -4
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-By9keRvX.mjs → errorHandler-CIMkCOWm.mjs} +3 -3
- package/dist/{errors-BHD3L8of.mjs → errors-C_YhELhe.mjs} +1 -1
- package/dist/{eventPlugin-DfHaKEWQ.d.mts → eventPlugin-B52abJ8W.d.mts} +1 -1
- package/dist/{eventPlugin-DB26V7uX.mjs → eventPlugin-CmXaPWLv.mjs} +5 -5
- package/dist/events/index.d.mts +4 -4
- package/dist/events/index.mjs +5 -5
- package/dist/events/transports/redis-stream-entry.d.mts +1 -1
- package/dist/events/transports/redis-stream-entry.mjs +15 -6
- package/dist/events/transports/redis.d.mts +1 -1
- package/dist/events/transports/redis.mjs +2 -2
- package/dist/factory/index.d.mts +5 -5
- package/dist/factory/index.mjs +5 -5
- package/dist/{fastify-augmentation-HncZMmze.d.mts → fastify-augmentation-Cq2nHVaW.d.mts} +3 -3
- package/dist/{fields-fA-Dkou5.mjs → fields-BTyPLHK0.mjs} +1 -1
- package/dist/{generate-BSSdtiOy.mjs → generate-D_YmiCNf.mjs} +2 -2
- package/dist/{headers-BFEEshDS.mjs → headers-CNECDE6q.mjs} +2 -2
- package/dist/{health-BlGHjkqZ.mjs → health-CxQzbJmr.mjs} +10 -2
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/idempotency/index.d.mts +1 -1
- package/dist/idempotency/index.mjs +4 -4
- package/dist/idempotency/redis.d.mts +1 -1
- package/dist/idempotency/redis.mjs +1 -1
- package/dist/{index-BtYoMip1.d.mts → index-BHdZD8zK.d.mts} +10 -2
- package/dist/{index-DbMglURO.d.mts → index-CFfLKMH4.d.mts} +1 -1
- package/dist/{index-eyg5WEcy.d.mts → index-CbJiYrfv.d.mts} +1 -1
- package/dist/{index-SCsOJxWB.d.mts → index-D4u76eQW.d.mts} +3 -3
- package/dist/{index-D3sIPcD4.d.mts → index-DHbyPo5j.d.mts} +6 -2
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +11 -11
- package/dist/{init-pl88PHzb.mjs → init-Y2MlSN9n.mjs} +1 -1
- package/dist/integrations/event-gateway.d.mts +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.d.mts +1 -1
- package/dist/integrations/jobs/index.mjs +2 -2
- package/dist/integrations/mcp/index.d.mts +4 -4
- package/dist/integrations/mcp/index.mjs +2 -2
- package/dist/integrations/mcp/testing.d.mts +2 -2
- package/dist/integrations/mcp/testing.mjs +2 -2
- package/dist/integrations/streamline.mjs +3 -3
- package/dist/integrations/webhooks.d.mts +2 -2
- package/dist/integrations/webhooks.mjs +3 -3
- package/dist/integrations/websocket-pushref-redis.d.mts +1 -1
- package/dist/integrations/websocket-pushref-redis.mjs +1 -1
- package/dist/integrations/websocket-redis.mjs +1 -1
- package/dist/integrations/websocket.mjs +12 -1
- package/dist/{interface-DjtFnZxH.mjs → interface-BIpgzbZl.mjs} +1 -1
- package/dist/{jsonBody-Dx6jH_Nb.mjs → jsonBody-Cq9KYl2Z.mjs} +2 -2
- package/dist/{keys-Ds3ekBiu.mjs → keys-Cmv4cBRa.mjs} +1 -1
- package/dist/{loadResources-E5UFlRrT.mjs → loadResources-CblF7xt2.mjs} +2 -2
- package/dist/{loadResourcesFromEntry-C2jrJbWG.mjs → loadResourcesFromEntry-99fIMC3p.mjs} +2 -2
- package/dist/logger/index.mjs +1 -1
- package/dist/{mcpPlugin-D-3OLxNz.mjs → mcpPlugin-xF3Gw-HW.mjs} +15 -15
- package/dist/{memory-CNvjxzB2.mjs → memory-CpDZ9NPw.mjs} +2 -2
- package/dist/{metrics-P37sNV5H.mjs → metrics-BaKnq8ag.mjs} +2 -2
- 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-CNcwCKUJ.mjs → module-BkQEesNQ.mjs} +1 -1
- package/dist/{multipartBody-Bl_gU3Wg.mjs → multipartBody-C92aJ8am.mjs} +1 -1
- package/dist/{openapi-BYrL8zvY.mjs → openapi-C3LFRzPq.mjs} +6 -6
- package/dist/outbox-admin/index.d.mts +2 -2
- package/dist/outbox-admin/index.mjs +4 -4
- package/dist/{outbox-module-CzsKRBvO.d.mts → outbox-module-BHdUnuuK.d.mts} +6 -2
- package/dist/{outbox-module-6DMC_WNu.mjs → outbox-module-dsCyLxXH.mjs} +9 -6
- package/dist/permissions/index.d.mts +2 -2
- package/dist/permissions/index.mjs +5 -5
- package/dist/{permissions-C0GpDsB_.mjs → permissions-DiHXy8Ck.mjs} +12 -6
- package/dist/{pipe-4_XamfxI.mjs → pipe-CBVmUJ-j.mjs} +2 -2
- package/dist/pipeline/index.d.mts +1 -1
- package/dist/pipeline/index.mjs +2 -2
- package/dist/plugins/index.d.mts +6 -36
- package/dist/plugins/index.mjs +33 -22
- package/dist/plugins/response-cache.mjs +9 -2
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-BaQ62hOW.mjs → pluralize-2_U6QZQg.mjs} +1 -1
- package/dist/{preloadResources-BAx5s9EF.mjs → preloadResources-Bbp4QJ8V.mjs} +33 -26
- package/dist/{preloadResources-DVgPCNcD.d.mts → preloadResources-CjS2OfpU.d.mts} +13 -8
- package/dist/presets/filesUpload.d.mts +2 -2
- 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 +38 -1
- package/dist/presets/multiTenant.mjs +24 -6
- package/dist/presets/search.d.mts +2 -2
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-CAaqVVcW.mjs → presets-BdlugYTc.mjs} +4 -4
- package/dist/{projection-qbCOEvsh.mjs → projection-Uvgp-EEj.mjs} +2 -2
- package/dist/{queryCachePlugin-2Pp9w-8D.mjs → queryCachePlugin-B5F09bYr.mjs} +11 -5
- package/dist/{rateLimitKey-umrS6-vu.mjs → rateLimitKey-CK-EU2L8.mjs} +1 -1
- package/dist/{realtime-zzoNLDtj.mjs → realtime-FnnD0n3Z.mjs} +9 -9
- package/dist/{redis-CduhKsJi.d.mts → redis-Bzi1y3F9.d.mts} +10 -2
- package/dist/{redis-stream-DSsPyYzd.d.mts → redis-stream-BPKscsTB.d.mts} +6 -6
- package/dist/{registerRoute-_6zHiz0x.mjs → registerRoute-DRsSHPSM.mjs} +6 -6
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-CEpoRpLP.mjs → registry-D3y8VEJ1.mjs} +2 -2
- package/dist/{renewingLease-B5Grm0pI.mjs → renewingLease-B3VYh5aU.mjs} +1 -1
- package/dist/{replyHelpers-9h-a592u.mjs → replyHelpers-DPHsdw-5.mjs} +2 -2
- package/dist/{requestContext-D4PuGhEw.mjs → requestContext-cSVKnYPk.mjs} +1 -1
- package/dist/{rolldown-runtime-DzE6ikSH.mjs → rolldown-runtime-DjDuyglE.mjs} +1 -1
- package/dist/{runtimeCapabilities-Bo7rSKjm.mjs → runtimeCapabilities-DSA_dH1_.mjs} +31 -5
- package/dist/{schedules-Dm21pqHU.mjs → schedules-BktJb3Y3.mjs} +4 -4
- package/dist/{schemaConverter-DENbixyA.mjs → schemaConverter-BLCSmNbr.mjs} +1 -1
- package/dist/{schemaIR-C2qUNzC6.mjs → schemaIR-K16Bb5BX.mjs} +2 -2
- package/dist/schemas/index.mjs +1 -1
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-CdYxQVxt.mjs → scope-jSxuBTFM.mjs} +4 -4
- package/dist/{simpleEqualityMatcher-Cldubvul.mjs → simpleEqualityMatcher-BiOnyflP.mjs} +1 -1
- package/dist/{sse-DbyXoQun.mjs → sse-CH7Slxc1.mjs} +5 -5
- package/dist/{sseStream-BfZtL5-m.mjs → sseStream-CN-Lh1Tu.mjs} +2 -2
- package/dist/{store-helpers-BfyOd5i6.mjs → store-helpers-9DX9-1j_.mjs} +1 -1
- package/dist/{streaming-CFwCzEvU.mjs → streaming-dvppnxsr.mjs} +1 -1
- package/dist/{subscribe-helpers-KgVEcn8L.mjs → subscribe-helpers-AVYPgqTl.mjs} +2 -2
- package/dist/sync/changelog.mjs +1 -1
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +5 -5
- package/dist/testing/index.mjs +10 -10
- package/dist/testing/outboxStoreContract.mjs +1 -1
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{transactionContext-46KyUADP.mjs → transactionContext-DCWMI6hV.mjs} +1 -1
- package/dist/{typeGuards-t_CVgRXN.mjs → typeGuards-D7tHFdH6.mjs} +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-CNQyOrLk.mjs → types-CDy3-zw1.mjs} +4 -4
- package/dist/{types-9rvxn5Ym.d.mts → types-CWQn9-IC.d.mts} +1 -1
- package/dist/{types-BVlowlm7.d.mts → types-DfVDvkdP.d.mts} +19 -1
- package/dist/usage/index.d.mts +58 -2
- package/dist/usage/index.mjs +55 -4
- package/dist/{userHelpers-DLueLQdQ.mjs → userHelpers-DDMOZ_Pm.mjs} +1 -1
- package/dist/utils/index.d.mts +107 -5
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-CUFBrhq-.mjs → utils-B-zj_b__.mjs} +50 -9
- package/dist/{validate-DV3hRbsz.mjs → validate-R0G_JrnK.mjs} +2 -2
- package/dist/{versioning-P3V6ATyC.d.mts → versioning-D6JIK8Tk.d.mts} +58 -2
- package/dist/{versioning-BXwmj5SD.mjs → versioning-DuVWcu-F.mjs} +3 -3
- package/dist/{workScope-CoGpuzDX.mjs → workScope-BhsWde4k.mjs} +3 -4
- package/package.json +574 -574
- package/skills/arc/SKILL.md +8 -4
- package/skills/arc/references/production.md +94 -9
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { i as versionKey, r as tagVersionKey } from "./keys-
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DjDuyglE.mjs";
|
|
3
|
+
import { i as versionKey, r as tagVersionKey } from "./keys-Cmv4cBRa.mjs";
|
|
4
|
+
import { n as declareRuntimeCapability } from "./runtimeCapabilities-DSA_dH1_.mjs";
|
|
5
|
+
import { t as hasEvents } from "./typeGuards-D7tHFdH6.mjs";
|
|
6
|
+
import { t as MemoryCacheStore } from "./memory-CpDZ9NPw.mjs";
|
|
6
7
|
import fp from "fastify-plugin";
|
|
7
8
|
//#region src/cache/QueryCache.ts
|
|
8
9
|
var QueryCache = class {
|
|
@@ -113,6 +114,11 @@ const queryCachePluginImpl = async (fastify, opts = {}) => {
|
|
|
113
114
|
const ownsStore = opts.store === void 0;
|
|
114
115
|
const store = opts.store ?? new MemoryCacheStore();
|
|
115
116
|
const queryCache = new QueryCache(store);
|
|
117
|
+
declareRuntimeCapability(fastify, {
|
|
118
|
+
subsystem: "cache.query",
|
|
119
|
+
durability: store instanceof MemoryCacheStore ? "memory" : "shared",
|
|
120
|
+
detail: "MemoryCacheStore: entries and version bumps are replica-local"
|
|
121
|
+
});
|
|
116
122
|
const defaults = {
|
|
117
123
|
staleTime: opts.defaults?.staleTime ?? 0,
|
|
118
124
|
gcTime: opts.defaults?.gcTime ?? 60
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DjDuyglE.mjs";
|
|
3
3
|
import { arcLog } from "./logger/index.mjs";
|
|
4
|
-
import { n as evaluateAndApplyPermission } from "./authorizationDecision-
|
|
5
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
6
|
-
import { c as getOrgId } from "./types-
|
|
7
|
-
import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-
|
|
8
|
-
import { t as applyFieldReadPermissions } from "./fields-
|
|
9
|
-
import { a as promoteStreamTokenToHeader } from "./streaming-
|
|
10
|
-
import { t as openSseStream } from "./sseStream-
|
|
4
|
+
import { n as evaluateAndApplyPermission } from "./authorizationDecision-2YY_Kaj1.mjs";
|
|
5
|
+
import { n as getUserRoles } from "./userHelpers-DDMOZ_Pm.mjs";
|
|
6
|
+
import { c as getOrgId } from "./types-CDy3-zw1.mjs";
|
|
7
|
+
import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-BiOnyflP.mjs";
|
|
8
|
+
import { t as applyFieldReadPermissions } from "./fields-BTyPLHK0.mjs";
|
|
9
|
+
import { a as promoteStreamTokenToHeader } from "./streaming-dvppnxsr.mjs";
|
|
10
|
+
import { t as openSseStream } from "./sseStream-CN-Lh1Tu.mjs";
|
|
11
11
|
import fp from "fastify-plugin";
|
|
12
12
|
//#region src/plugins/realtime.ts
|
|
13
13
|
var realtime_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -45,13 +45,21 @@ declare class RedisIdempotencyStore implements IdempotencyStore {
|
|
|
45
45
|
private scanByPrefix;
|
|
46
46
|
close(): Promise<void>;
|
|
47
47
|
}
|
|
48
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Minimal ioredis shape we depend on — keeps this file peer-dep-free.
|
|
50
|
+
*
|
|
51
|
+
* Variadic tails are `unknown[]`, not `(string | number)[]`: ioredis types
|
|
52
|
+
* every command as overloads whose tails mix literal tokens (`'MATCH'`),
|
|
53
|
+
* `Buffer` and an optional callback, and a narrower tail matches NONE of
|
|
54
|
+
* them — a real `Redis` instance then fails to assign (TS2345). Pinned by
|
|
55
|
+
* `tests/types/ioredis-assignability.test.ts`.
|
|
56
|
+
*/
|
|
49
57
|
interface IoredisLike {
|
|
50
58
|
get(key: string): Promise<string | null>;
|
|
51
59
|
set(...args: unknown[]): Promise<string | null>;
|
|
52
60
|
del(...keys: string[]): Promise<number>;
|
|
53
61
|
exists(...keys: string[]): Promise<number>;
|
|
54
|
-
scan(cursor: string | number, ...args:
|
|
62
|
+
scan(cursor: string | number, ...args: unknown[]): Promise<[string, string[]]>;
|
|
55
63
|
eval?(script: string, numKeys: number, ...args: (string | number)[]): Promise<unknown>;
|
|
56
64
|
quit?(): Promise<string>;
|
|
57
65
|
disconnect?(): void;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as EventTransport, i as EventLogger, n as DomainEvent, r as EventHandler } from "./EventTransport-
|
|
2
|
+
import { a as EventTransport, i as EventLogger, n as DomainEvent, r as EventHandler } from "./EventTransport-CbUKDzZZ.mjs";
|
|
3
3
|
//#region src/events/transports/redis-stream.d.ts
|
|
4
4
|
interface RedisStreamLike {
|
|
5
5
|
xadd(key: string, id: string, ...fieldValues: string[]): Promise<string | null>;
|
|
6
|
-
xreadgroup(command: "GROUP", group: string, consumer: string, ...args:
|
|
7
|
-
xack(key: string, group: string, ...ids:
|
|
8
|
-
xgroup(command: string, key: string, group: string, ...args:
|
|
9
|
-
xpending(key: string, group: string, ...args:
|
|
10
|
-
xclaim(key: string, group: string, consumer: string, minIdleTime: number, ...ids:
|
|
6
|
+
xreadgroup(command: "GROUP", group: string, consumer: string, ...args: unknown[]): Promise<Array<[string, Array<[string, string[] | null]>]> | null>;
|
|
7
|
+
xack(key: string, group: string, ...ids: unknown[]): Promise<number>;
|
|
8
|
+
xgroup(command: string, key: string, group: string, ...args: unknown[]): Promise<unknown>;
|
|
9
|
+
xpending(key: string, group: string, ...args: unknown[]): Promise<unknown[]>;
|
|
10
|
+
xclaim(key: string, group: string, consumer: string, minIdleTime: number, ...ids: unknown[]): Promise<unknown[]>;
|
|
11
11
|
xlen(key: string): Promise<number>;
|
|
12
12
|
/**
|
|
13
13
|
* Read a range of entries by id. When present, the DLQ writer uses this
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as evaluateAndApplyPermission } from "./authorizationDecision-
|
|
3
|
-
import { f as createError } from "./errors-
|
|
4
|
-
import { u as getRequestScope } from "./types-
|
|
5
|
-
import { r as deriveHiddenFieldPermissions } from "./fields-
|
|
6
|
-
import { n as requestContext } from "./requestContext-
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as evaluateAndApplyPermission } from "./authorizationDecision-2YY_Kaj1.mjs";
|
|
3
|
+
import { f as createError } from "./errors-C_YhELhe.mjs";
|
|
4
|
+
import { u as getRequestScope } from "./types-CDy3-zw1.mjs";
|
|
5
|
+
import { r as deriveHiddenFieldPermissions } from "./fields-BTyPLHK0.mjs";
|
|
6
|
+
import { n as requestContext } from "./requestContext-cSVKnYPk.mjs";
|
|
7
7
|
//#region src/core/middlewares/arcDecorator.ts
|
|
8
8
|
/**
|
|
9
9
|
* Build the `arcDecorator` preHandler for a resource.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { K as ResolvedTenantPurge, R as RegisterOptions, V as ResourceDefinition, X as CrudRouteKey, k as IntrospectionPluginOptions, p as RegistryEntry, z as ResourceRegistry } from "../index-
|
|
3
|
-
import "../fastify-augmentation-
|
|
2
|
+
import { K as ResolvedTenantPurge, R as RegisterOptions, V as ResourceDefinition, X as CrudRouteKey, k as IntrospectionPluginOptions, p as RegistryEntry, z as ResourceRegistry } from "../index-DHbyPo5j.mjs";
|
|
3
|
+
import "../fastify-augmentation-Cq2nHVaW.mjs";
|
|
4
4
|
import { TenantPurgeProgress, TenantPurgeStrategy } from "@classytic/repo-core/repository";
|
|
5
5
|
import { FastifyPluginAsync } from "fastify";
|
|
6
6
|
//#region src/registry/assertNoTenantData.d.ts
|
package/dist/registry/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as cascadeDeleteForOrganization, c as assertNoTenantData, i as introspectionPlugin_default, n as buildResourceManifestFromRegistry, o as getCascadingResources, r as introspectionPlugin, s as getCascadingResourcesWithMetadata, t as buildResourceManifest } from "../registry-
|
|
3
|
-
import { t as ResourceRegistry } from "../ResourceRegistry-
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as cascadeDeleteForOrganization, c as assertNoTenantData, i as introspectionPlugin_default, n as buildResourceManifestFromRegistry, o as getCascadingResources, r as introspectionPlugin, s as getCascadingResourcesWithMetadata, t as buildResourceManifest } from "../registry-D3y8VEJ1.mjs";
|
|
3
|
+
import { t as ResourceRegistry } from "../ResourceRegistry-Cu7uTJp9.mjs";
|
|
4
4
|
export { ResourceRegistry, assertNoTenantData, buildResourceManifest, buildResourceManifestFromRegistry, cascadeDeleteForOrganization, getCascadingResources, getCascadingResourcesWithMetadata, introspectionPlugin_default as introspectionPlugin, introspectionPlugin as introspectionPluginFn };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CRUD_OPERATIONS } from "./constants-
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "./constants-BxLgNFF7.mjs";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
//#region src/registry/assertNoTenantData.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DjDuyglE.mjs";
|
|
3
3
|
import { toCanonicalList } from "@classytic/repo-core/pagination";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
//#region src/plugins/replyHelpers.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
2
|
//#region src/utils/runtimeCapabilities.ts
|
|
3
3
|
/**
|
|
4
4
|
* `Symbol.for` so declarations from two arc copies in one dependency graph
|
|
@@ -6,6 +6,29 @@
|
|
|
6
6
|
* public `fastify.arc` surface; the audit result is the product, not the list.
|
|
7
7
|
*/
|
|
8
8
|
const ARC_RUNTIME_CAPABILITIES = Symbol.for("arc.runtimeCapabilities");
|
|
9
|
+
/**
|
|
10
|
+
* Seed the registry on the ROOT instance. `createApp` calls this the moment the
|
|
11
|
+
* instance exists, before any registration — and that ordering is load-bearing,
|
|
12
|
+
* not tidiness.
|
|
13
|
+
*
|
|
14
|
+
* A Fastify child (`register` with an un-`fp`-wrapped plugin) is
|
|
15
|
+
* `Object.create(parent)`, so a symbol READ reaches the parent's array through
|
|
16
|
+
* the prototype chain but a symbol WRITE always lands on the child. Created
|
|
17
|
+
* lazily, the first declarant therefore decides where the registry lives: seeded
|
|
18
|
+
* first, every child pushes into the root's one array; declared first from
|
|
19
|
+
* inside an encapsulated child, that child gets an own array the root audit
|
|
20
|
+
* never sees — a silent pass from the mechanism whose entire job is to refuse to
|
|
21
|
+
* boot. Arc's own declarants are all `fp`-wrapped and both host `plugins()` and
|
|
22
|
+
* module `plugins()` receive the root, so nothing internal hit this; a host
|
|
23
|
+
* declaring from inside its own `fastify.register(async (child) => …)` would.
|
|
24
|
+
*
|
|
25
|
+
* Idempotent, and never clobbers an existing array — re-seeding an instance that
|
|
26
|
+
* already collected declarations would discard them.
|
|
27
|
+
*/
|
|
28
|
+
function initRuntimeCapabilityRegistry(fastify) {
|
|
29
|
+
const holder = fastify;
|
|
30
|
+
if (!Object.hasOwn(holder, ARC_RUNTIME_CAPABILITIES)) holder[ARC_RUNTIME_CAPABILITIES] = holder[ARC_RUNTIME_CAPABILITIES] ?? [];
|
|
31
|
+
}
|
|
9
32
|
function registryOf(fastify) {
|
|
10
33
|
const holder = fastify;
|
|
11
34
|
if (!holder[ARC_RUNTIME_CAPABILITIES]) holder[ARC_RUNTIME_CAPABILITIES] = [];
|
|
@@ -13,14 +36,17 @@ function registryOf(fastify) {
|
|
|
13
36
|
}
|
|
14
37
|
/**
|
|
15
38
|
* Declare a runtime capability. Callable from ANY registration context —
|
|
16
|
-
* arc's own plugins, host `plugins()` callbacks, module `plugins` phases
|
|
17
|
-
* which is the point: the audit
|
|
39
|
+
* arc's own plugins, host `plugins()` callbacks, module `plugins` phases,
|
|
40
|
+
* and encapsulated children of any of them — which is the point: the audit
|
|
41
|
+
* sees what the constructor-time guard cannot.
|
|
18
42
|
*/
|
|
19
43
|
function declareRuntimeCapability(fastify, decl) {
|
|
20
44
|
registryOf(fastify).push(decl);
|
|
21
45
|
}
|
|
22
46
|
/**
|
|
23
|
-
* The boot audit. Runs once at the end of `buildApp`, after every declarant
|
|
47
|
+
* The boot audit. Runs once at the end of `buildApp`, after every declarant —
|
|
48
|
+
* on the SAME instance `initRuntimeCapabilityRegistry` seeded, which is what
|
|
49
|
+
* makes declarations from encapsulated children visible here.
|
|
24
50
|
*
|
|
25
51
|
* - `runtime: 'distributed'` + `durability: 'memory'` + not `accepted` →
|
|
26
52
|
* collected and THROWN as one error naming every violator (fixing them one
|
|
@@ -46,4 +72,4 @@ function auditRuntimeCapabilities(fastify, runtime) {
|
|
|
46
72
|
}
|
|
47
73
|
}
|
|
48
74
|
//#endregion
|
|
49
|
-
export { declareRuntimeCapability as n, auditRuntimeCapabilities as t };
|
|
75
|
+
export { declareRuntimeCapability as n, initRuntimeCapabilityRegistry as r, auditRuntimeCapabilities as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { t as runWorkScope } from "./workScope-
|
|
4
|
-
import { t as startRenewingLease } from "./renewingLease-
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DjDuyglE.mjs";
|
|
3
|
+
import { t as runWorkScope } from "./workScope-BhsWde4k.mjs";
|
|
4
|
+
import { t as startRenewingLease } from "./renewingLease-B3VYh5aU.mjs";
|
|
5
5
|
import fp from "fastify-plugin";
|
|
6
6
|
//#region src/plugins/schedules.ts
|
|
7
7
|
var schedules_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { o as toJsonSchema } from "./schemaConverter-
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
|
+
import { o as toJsonSchema } from "./schemaConverter-BLCSmNbr.mjs";
|
|
3
3
|
//#region src/core/schemaIR.ts
|
|
4
4
|
/**
|
|
5
5
|
* Schema IR — one canonical representation, two adapters.
|
package/dist/schemas/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
2
|
import { errorContractSchema, errorDetailSchema } from "@classytic/repo-core/errors";
|
|
3
3
|
import { Type, Type as Type$1 } from "typebox";
|
|
4
4
|
//#region src/schemas/index.ts
|
package/dist/scim/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as parseJsonBody } from "../jsonBody-
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as parseJsonBody } from "../jsonBody-Cq9KYl2Z.mjs";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
//#region src/scim/errors.ts
|
|
5
5
|
var ScimError = class extends Error {
|
package/dist/scope/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { C as isService, D as requireUserId, E as requireTeamId, O as scopeFirstCtx, S as isOrgInScope, T as requireOrgId, _ as getUserRoles, a as getDPoPJkt, b as isElevated, c as getOrgId, d as getScopeContext, f as getScopeContextMap, g as getUserId, h as getTenantFromRequest, i as getClientId, l as getOrgRoles, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, r as getAncestorOrgIds, s as getOrgContext, t as AUTHENTICATED_SCOPE, u as getRequestScope, v as hasOrgAccess, w as requireClientId, x as isMember, y as isAuthenticated } from "../types-
|
|
3
|
-
import { n as elevation_default, t as elevationPlugin } from "../elevation-
|
|
4
|
-
import { t as createTenantKeyGenerator } from "../rateLimitKey-
|
|
5
|
-
import { t as resolveOrgFromHeader } from "../scope-
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
|
+
import { C as isService, D as requireUserId, E as requireTeamId, O as scopeFirstCtx, S as isOrgInScope, T as requireOrgId, _ as getUserRoles, a as getDPoPJkt, b as isElevated, c as getOrgId, d as getScopeContext, f as getScopeContextMap, g as getUserId, h as getTenantFromRequest, i as getClientId, l as getOrgRoles, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, r as getAncestorOrgIds, s as getOrgContext, t as AUTHENTICATED_SCOPE, u as getRequestScope, v as hasOrgAccess, w as requireClientId, x as isMember, y as isAuthenticated } from "../types-CDy3-zw1.mjs";
|
|
3
|
+
import { n as elevation_default, t as elevationPlugin } from "../elevation-BF-vhGxY.mjs";
|
|
4
|
+
import { t as createTenantKeyGenerator } from "../rateLimitKey-CK-EU2L8.mjs";
|
|
5
|
+
import { t as resolveOrgFromHeader } from "../scope-jSxuBTFM.mjs";
|
|
6
6
|
export { AUTHENTICATED_SCOPE, PUBLIC_SCOPE, createTenantKeyGenerator, elevation_default as elevationPlugin, elevationPlugin as elevationPluginFn, getAncestorOrgIds, getClientId, getDPoPJkt, getMandate, getOrgContext, getOrgId, getOrgRoles, getRequestScope, getScopeContext, getScopeContextMap, getServiceScopes, getTeamId, getTenantFromRequest, getUserId, getUserRoles, hasOrgAccess, isAuthenticated, isElevated, isMember, isOrgInScope, isService, requireClientId, requireOrgId, requireTeamId, requireUserId, resolveOrgFromHeader, scopeFirstCtx };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-
|
|
3
|
-
import { n as requireSingleHeaderValue } from "./headers-
|
|
4
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-C_YhELhe.mjs";
|
|
3
|
+
import { n as requireSingleHeaderValue } from "./headers-CNECDE6q.mjs";
|
|
4
|
+
import { n as getUserRoles } from "./userHelpers-DDMOZ_Pm.mjs";
|
|
5
5
|
//#region src/scope/resolveOrgFromHeader.ts
|
|
6
6
|
/**
|
|
7
7
|
* Create a preHandler hook that resolves org scope from a header.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DjDuyglE.mjs";
|
|
3
3
|
import { arcLog } from "./logger/index.mjs";
|
|
4
|
-
import { c as getOrgId, n as PUBLIC_SCOPE } from "./types-
|
|
5
|
-
import { a as promoteStreamTokenToHeader } from "./streaming-
|
|
6
|
-
import { t as openSseStream } from "./sseStream-
|
|
4
|
+
import { c as getOrgId, n as PUBLIC_SCOPE } from "./types-CDy3-zw1.mjs";
|
|
5
|
+
import { a as promoteStreamTokenToHeader } from "./streaming-dvppnxsr.mjs";
|
|
6
|
+
import { t as openSseStream } from "./sseStream-CN-Lh1Tu.mjs";
|
|
7
7
|
import fp from "fastify-plugin";
|
|
8
8
|
//#region src/plugins/sse.ts
|
|
9
9
|
var sse_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as forwardedStreamHeaders } from "./streaming-
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as forwardedStreamHeaders } from "./streaming-dvppnxsr.mjs";
|
|
3
3
|
//#region src/utils/sseStream.ts
|
|
4
4
|
/**
|
|
5
5
|
* Take over the reply socket and open an SSE stream. Call ONLY after every
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as createEvent } from "./EventTransport-
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as createEvent } from "./EventTransport-n7qO5Cz3.mjs";
|
|
3
3
|
//#region src/events/defineEvent.ts
|
|
4
4
|
/**
|
|
5
5
|
* Typed event declarations, a registry for introspection, and `.create()` to
|
package/dist/sync/changelog.mjs
CHANGED
package/dist/testing/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
import { i as RequestScope } from "../types-Ddl9OjmE.mjs";
|
|
3
|
-
import { l as PermissionCheck, t as AnyRecord } from "../base-
|
|
4
|
-
import { V as ResourceDefinition } from "../index-
|
|
5
|
-
import { n as ArcModuleInput, o as ModuleDisposer, s as ModuleSetupContext } from "../types-
|
|
6
|
-
import "../index-
|
|
7
|
-
import { n as preloadResourcesAsync, r as CreateAppOptions, t as preloadResources } from "../preloadResources-
|
|
3
|
+
import { l as PermissionCheck, t as AnyRecord } from "../base-CxrV1LmG.mjs";
|
|
4
|
+
import { V as ResourceDefinition } from "../index-DHbyPo5j.mjs";
|
|
5
|
+
import { n as ArcModuleInput, o as ModuleDisposer, s as ModuleSetupContext } from "../types-DfVDvkdP.mjs";
|
|
6
|
+
import "../index-CFfLKMH4.mjs";
|
|
7
|
+
import { n as preloadResourcesAsync, r as CreateAppOptions, t as preloadResources } from "../preloadResources-CjS2OfpU.mjs";
|
|
8
8
|
import { StorageContractSetup, StorageContractSetupResult, runStorageContract } from "./storageContract.mjs";
|
|
9
9
|
import { StandardRepo } from "@classytic/repo-core/repository";
|
|
10
10
|
import { FastifyInstance, FastifyServerOptions } from "fastify";
|
package/dist/testing/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CRUD_OPERATIONS } from "../constants-
|
|
3
|
-
import { g as getUserId } from "../types-
|
|
4
|
-
import { t as BaseController } from "../BaseController-
|
|
5
|
-
import { t as defineAggregation } from "../defineAggregation-
|
|
6
|
-
import { t as defineResource } from "../defineResource-
|
|
7
|
-
import { E as requireOrgRole } from "../permissions-
|
|
8
|
-
import { a as createApp, n as preloadResourcesAsync, t as preloadResources } from "../preloadResources-
|
|
9
|
-
import { n as getModuleExports } from "../module-
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "../constants-BxLgNFF7.mjs";
|
|
3
|
+
import { g as getUserId } from "../types-CDy3-zw1.mjs";
|
|
4
|
+
import { t as BaseController } from "../BaseController-DYJRZ0EJ.mjs";
|
|
5
|
+
import { t as defineAggregation } from "../defineAggregation-UyeurGkp.mjs";
|
|
6
|
+
import { t as defineResource } from "../defineResource-DzGT-2LP.mjs";
|
|
7
|
+
import { E as requireOrgRole } from "../permissions-DiHXy8Ck.mjs";
|
|
8
|
+
import { a as createApp, n as preloadResourcesAsync, t as preloadResources } from "../preloadResources-Bbp4QJ8V.mjs";
|
|
9
|
+
import { n as getModuleExports } from "../module-BkQEesNQ.mjs";
|
|
10
10
|
import { runStorageContract } from "./storageContract.mjs";
|
|
11
11
|
import Fastify from "fastify";
|
|
12
12
|
import { afterAll, describe, expect, it, vi } from "vitest";
|
|
@@ -1504,7 +1504,7 @@ function pickDefaultAuth(authMode, callerAuth) {
|
|
|
1504
1504
|
};
|
|
1505
1505
|
}
|
|
1506
1506
|
async function createTestApp(options = {}) {
|
|
1507
|
-
const { createApp } = await import("../preloadResources-
|
|
1507
|
+
const { createApp } = await import("../preloadResources-Bbp4QJ8V.mjs").then((n) => n.o);
|
|
1508
1508
|
const { resources = [], db = "in-memory", connectMongoose = false, authMode = "jwt", defaultOrgId, plugins, auth: callerAuth, ...appOptions } = options;
|
|
1509
1509
|
let dbHandle;
|
|
1510
1510
|
let dbUri;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
2
|
import { OutboxOwnershipError } from "@classytic/primitives/outbox";
|
|
3
3
|
import { afterAll, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
|
4
4
|
//#region src/testing/outboxStoreContract.ts
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { i as RequestScope } from "../types-Ddl9OjmE.mjs";
|
|
3
|
-
import { a as UserLike, c as DataPolicy, d as UserBase, i as ObjectId, l as PermissionCheck, n as ArcRequest, o as UserOrganization, r as JWTPayload, s as AuthorizationDecision, t as AnyRecord, u as PermissionContext } from "../base-
|
|
4
|
-
import { $ as OpenApiSchemas, A as RequestIdOptions, An as WriteVerbKey, At as RouteDefinition, C as RequestContext, D as HealthCheck, Dn as MutationWriteContext, Dt as ActionEntry, E as GracefulShutdownOptions, Et as ActionDefinition, F as FastifyWithDecorators, Fn as IControllerResponse, Ft as AuthPluginOptions, G as OnTenantDeleteConfig, H as CrudController, I as MiddlewareHandler, In as IRequestContext, It as Authenticator, J as PresetHook, K as ResolvedTenantPurge, L as RequestWithExtras, Ln as RawRouteHandler, Lt as AuthenticatorContext, M as EventsDecorator, Mn as ControllerLike, Mt as RouteMethod, N as FastifyRequestExtras, Nn as FastifyHandler, Nt as RateLimitConfig, O as HealthOptions, On as ResourceWrites, Ot as ActionHandlerFn, P as FastifyWithAuth, Pn as IController, Pt as AuthHelpers, Q as MiddlewareConfig, Rn as RouteHandler, Rt as JwtContext, S as QueryParserInterface, T as CrudRouterOptions, Tt as ResourceCacheConfig, U as ResourceConfig, W as ResourcePermissions, X as CrudRouteKey, Y as PresetResult, Z as CrudSchemas, _ as ControllerQueryOptions, a as InferAdapterDoc, at as ResourceExtensions, b as ParsedQuery, c as TypedController, d as PaginationResult, et as RouteSchemaOptions, f as IntrospectionData, g as ArcInternalMetadata, h as ResourceMetadata, i as ValidationResult, it as ResourceHooks, j as ArcDecorator, jn as ControllerHandler, jt as RouteMcpConfig, k as IntrospectionPluginOptions, kn as WriteContext, kt as ActionsMap, l as TypedRepository, m as RegistryStats, n as ConfigError, nt as FieldRule, o as InferDocType, ot as EventDefinition, p as RegistryEntry, q as PresetFunction, r as ValidateOptions, rt as ResourceHookContext, s as InferResourceDoc, t as RouteHandlerMethod, tt as ArcFieldRule, u as TypedResourceConfig, v as LookupOption, w as ServiceContext, x as PopulateOption, xn as BaseControllerOptions, y as OwnershipCheck, zt as TokenPair } from "../index-
|
|
3
|
+
import { a as UserLike, c as DataPolicy, d as UserBase, i as ObjectId, l as PermissionCheck, n as ArcRequest, o as UserOrganization, r as JWTPayload, s as AuthorizationDecision, t as AnyRecord, u as PermissionContext } from "../base-CxrV1LmG.mjs";
|
|
4
|
+
import { $ as OpenApiSchemas, A as RequestIdOptions, An as WriteVerbKey, At as RouteDefinition, C as RequestContext, D as HealthCheck, Dn as MutationWriteContext, Dt as ActionEntry, E as GracefulShutdownOptions, Et as ActionDefinition, F as FastifyWithDecorators, Fn as IControllerResponse, Ft as AuthPluginOptions, G as OnTenantDeleteConfig, H as CrudController, I as MiddlewareHandler, In as IRequestContext, It as Authenticator, J as PresetHook, K as ResolvedTenantPurge, L as RequestWithExtras, Ln as RawRouteHandler, Lt as AuthenticatorContext, M as EventsDecorator, Mn as ControllerLike, Mt as RouteMethod, N as FastifyRequestExtras, Nn as FastifyHandler, Nt as RateLimitConfig, O as HealthOptions, On as ResourceWrites, Ot as ActionHandlerFn, P as FastifyWithAuth, Pn as IController, Pt as AuthHelpers, Q as MiddlewareConfig, Rn as RouteHandler, Rt as JwtContext, S as QueryParserInterface, T as CrudRouterOptions, Tt as ResourceCacheConfig, U as ResourceConfig, W as ResourcePermissions, X as CrudRouteKey, Y as PresetResult, Z as CrudSchemas, _ as ControllerQueryOptions, a as InferAdapterDoc, at as ResourceExtensions, b as ParsedQuery, c as TypedController, d as PaginationResult, et as RouteSchemaOptions, f as IntrospectionData, g as ArcInternalMetadata, h as ResourceMetadata, i as ValidationResult, it as ResourceHooks, j as ArcDecorator, jn as ControllerHandler, jt as RouteMcpConfig, k as IntrospectionPluginOptions, kn as WriteContext, kt as ActionsMap, l as TypedRepository, m as RegistryStats, n as ConfigError, nt as FieldRule, o as InferDocType, ot as EventDefinition, p as RegistryEntry, q as PresetFunction, r as ValidateOptions, rt as ResourceHookContext, s as InferResourceDoc, t as RouteHandlerMethod, tt as ArcFieldRule, u as TypedResourceConfig, v as LookupOption, w as ServiceContext, x as PopulateOption, xn as BaseControllerOptions, y as OwnershipCheck, zt as TokenPair } from "../index-DHbyPo5j.mjs";
|
|
5
5
|
import { n as ElevationOptions, t as ElevationEvent } from "../elevation-BXCfVcNG.mjs";
|
|
6
6
|
export type { ActionDefinition, ActionEntry, ActionHandlerFn, ActionsMap, AnyRecord, ArcDecorator, ArcFieldRule, ArcInternalMetadata, ArcRequest, AuthHelpers, AuthPluginOptions, Authenticator, AuthenticatorContext, AuthorizationDecision, BaseControllerOptions, ConfigError, ControllerHandler, ControllerLike, ControllerQueryOptions, CrudController, CrudRouteKey, CrudRouterOptions, CrudSchemas, DataPolicy, ElevationEvent, ElevationOptions, EventDefinition, EventsDecorator, FastifyHandler, FastifyRequestExtras, FastifyWithAuth, FastifyWithDecorators, FieldRule, GracefulShutdownOptions, HealthCheck, HealthOptions, IController, IControllerResponse, IRequestContext, InferAdapterDoc, InferDocType, InferResourceDoc, IntrospectionData, IntrospectionPluginOptions, JWTPayload, JwtContext, LookupOption, MiddlewareConfig, MiddlewareHandler, MutationWriteContext, ObjectId, OnTenantDeleteConfig, OpenApiSchemas, OwnershipCheck, PaginationResult, ParsedQuery, PermissionCheck, PermissionContext, PopulateOption, PresetFunction, PresetHook, PresetResult, QueryParserInterface, RateLimitConfig, RawRouteHandler, RegistryEntry, RegistryStats, RequestContext, RequestIdOptions, RequestScope, RequestWithExtras, ResolvedTenantPurge, ResourceCacheConfig, ResourceConfig, ResourceExtensions, ResourceHookContext, ResourceHooks, ResourceMetadata, ResourcePermissions, ResourceWrites, RouteDefinition, RouteHandler, RouteHandlerMethod, RouteMcpConfig, RouteMethod, RouteSchemaOptions, ServiceContext, TokenPair, TypedController, TypedRepository, TypedResourceConfig, UserBase, UserLike, UserOrganization, ValidateOptions, ValidationResult, WriteContext, WriteVerbKey };
|
package/dist/types/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
2
|
export {};
|
package/dist/types/storage.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
2
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { l as UnauthorizedError, o as OrgRequiredError } from "./errors-
|
|
3
|
-
import { n as requireSingleHeaderValue } from "./headers-
|
|
4
|
-
import { t as getUserId$1 } from "./userHelpers-
|
|
1
|
+
/*! @classytic/arc v2.41.0 | MIT | https://classytic.com */
|
|
2
|
+
import { l as UnauthorizedError, o as OrgRequiredError } from "./errors-C_YhELhe.mjs";
|
|
3
|
+
import { n as requireSingleHeaderValue } from "./headers-CNECDE6q.mjs";
|
|
4
|
+
import { t as getUserId$1 } from "./userHelpers-DDMOZ_Pm.mjs";
|
|
5
5
|
//#region src/scope/types.ts
|
|
6
6
|
/**
|
|
7
7
|
* Request Scope — The One Standard
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { V as ResourceDefinition } from "./index-
|
|
2
|
+
import { V as ResourceDefinition } from "./index-DHbyPo5j.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/integrations/mcp/types.d.ts
|
|
5
5
|
/** Behavioral hints for MCP clients (tool annotations per MCP spec) */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { n as DomainEvent, r as EventHandler } from "./EventTransport-
|
|
2
|
+
import { n as DomainEvent, r as EventHandler } from "./EventTransport-CbUKDzZZ.mjs";
|
|
3
3
|
import { n as ErrorMapper } from "./errorHandler--4rSMMvq.mjs";
|
|
4
4
|
import { FastifyInstance, FastifyPluginAsync } from "fastify";
|
|
5
5
|
import { LockAdapter } from "@classytic/repo-core/lock";
|
|
@@ -90,6 +90,24 @@ interface SchedulesPluginOptions {
|
|
|
90
90
|
* environments), same pattern as `idempotencyPlugin`.
|
|
91
91
|
*/
|
|
92
92
|
enabled?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* States that exactly ONE replica of this deployment arms schedules, so no
|
|
95
|
+
* lock is needed. Same idiom as `eventPlugin, { singleProcess: true }`.
|
|
96
|
+
*
|
|
97
|
+
* Under `runtime: 'distributed'`, schedules with neither `lock` nor this
|
|
98
|
+
* flag FAIL the boot. Without one of them arc cannot tell a deliberately
|
|
99
|
+
* single-armed deployment — the `role: 'scheduler'` process pinned to one
|
|
100
|
+
* replica, which is the recommended topology — from the accidental default,
|
|
101
|
+
* where every replica in a fleet fires every tick. The accidental case is
|
|
102
|
+
* duplicate side effects: two invoices, two dunning emails, two charges.
|
|
103
|
+
* That is a worse failure than the replica-local stores arc already refuses
|
|
104
|
+
* to boot on, so it is held to the same standard rather than warned about.
|
|
105
|
+
*
|
|
106
|
+
* Set it only when the replica count for the process that arms schedules is
|
|
107
|
+
* genuinely one. It is a claim about your deployment, not a silencer — if
|
|
108
|
+
* you scale that deployment past one replica, remove it and pass a `lock`.
|
|
109
|
+
*/
|
|
110
|
+
singleReplica?: boolean;
|
|
93
111
|
/**
|
|
94
112
|
* How long `onClose` waits for in-flight runs before abandoning them.
|
|
95
113
|
* Default: 5000.
|