@classytic/arc 2.49.0 → 2.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{EventTransport-DbHZK230.mjs → EventTransport-B18mcj_M.mjs} +2 -2
- package/dist/{HookSystem-DMoeJ6Do.mjs → HookSystem-FUBaLTRm.mjs} +2 -2
- package/dist/{ResourceRegistry-CP-iTcKy.mjs → ResourceRegistry-C5NM07fZ.mjs} +2 -2
- package/dist/{acquire-CB0va87C.mjs → acquire-MHCnbDtH.mjs} +1 -1
- package/dist/audit/index.mjs +4 -4
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.mjs +7 -7
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-DHO94aV2.mjs → authorizationDecision-BD8K4jdQ.mjs} +4 -4
- package/dist/{boundedMap-C51EUUOm.mjs → boundedMap-CuCwos_X.mjs} +1 -1
- package/dist/{buildHandler-9DuwEKvr.mjs → buildHandler-BttjNkTM.mjs} +5 -5
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-COTX3sDa.mjs → caching-CxUQLHfR.mjs} +2 -2
- package/dist/{claimed-C7T1nHlo.mjs → claimed-CQ4ZpD8K.mjs} +1 -1
- package/dist/cleanup/index.mjs +4 -4
- package/dist/cli/commands/describe.mjs +3 -3
- package/dist/cli/commands/docs.mjs +3 -3
- package/dist/cli/commands/doctor.mjs +1 -1
- package/dist/cli/commands/generate.mjs +2 -2
- package/dist/cli/commands/init.mjs +2 -2
- package/dist/cli/commands/introspect.mjs +2 -2
- package/dist/cli/index.mjs +3 -3
- package/dist/{constants-DOnfMd7i.mjs → constants-BZFsZwJh.mjs} +1 -1
- package/dist/context/index.mjs +5 -5
- package/dist/core/index.mjs +7 -7
- package/dist/{core-BoEdFDDw.mjs → core-DWA1-5IE.mjs} +3 -3
- package/dist/{createActionRouter-CpTn15dm.mjs → createActionRouter-fP3l2xVF.mjs} +5 -5
- package/dist/{createAggregationRouter-CD_Hydp0.mjs → createAggregationRouter-BJZeOmBa.mjs} +7 -7
- package/dist/{createApp-Be6XTGD9.mjs → createApp-Db9JRumw.mjs} +29 -29
- package/dist/{defineAggregation-BI5pRb8c.mjs → defineAggregation-BskqRz8M.mjs} +1 -1
- package/dist/{defineResource-BAzNu5Um.mjs → defineResource-B2vTvKzW.mjs} +8 -8
- package/dist/discovery/index.mjs +1 -1
- package/dist/docs/index.mjs +3 -3
- package/dist/{elevation-DupGuM41.mjs → elevation-XoY0C73T.mjs} +5 -5
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-DA03vRqp.mjs → errorHandler-BYI-JQMm.mjs} +3 -3
- package/dist/{errors-BpYV859Y.mjs → errors-3xaK0i9n.mjs} +1 -1
- package/dist/{eventPlugin-D7LYtYzL.mjs → eventPlugin-CVQ9ddnL.mjs} +8 -8
- package/dist/{eventTypes-BqA-N-Uz.mjs → eventTypes-UPYg7gW1.mjs} +2 -2
- package/dist/events/index.mjs +8 -8
- package/dist/events/transports/redis-stream-entry.mjs +4 -4
- package/dist/events/transports/redis.mjs +2 -2
- package/dist/factory/index.mjs +6 -6
- package/dist/{fieldTypes-EFWxCkZ5.mjs → fieldTypes-CxRvCaaZ.mjs} +2 -2
- package/dist/{fields-CT1Erg7o.mjs → fields-DLFcJiDe.mjs} +1 -1
- package/dist/{filter-merge-B1eJ1pMx.mjs → filter-merge-Bvjk_8dV.mjs} +1 -1
- package/dist/{generate-Cr0ULavs.mjs → generate-0OpCUjUv.mjs} +2 -2
- package/dist/{headers-D4bncIOf.mjs → headers-BROW65-r.mjs} +2 -2
- package/dist/{health-BoFxrkJE.mjs → health-Cfh-kYI_.mjs} +1 -1
- package/dist/{health-DN_pUVMX.mjs → health-Cy6aOg1i.mjs} +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/http-cache/index.mjs +4 -4
- package/dist/http-cache/purgers/cloudflare.mjs +2 -2
- package/dist/http-cache/purgers/fastly.mjs +2 -2
- package/dist/http-cache/testing/index.mjs +1 -1
- package/dist/idempotency/index.mjs +7 -7
- package/dist/idempotency/redis.mjs +2 -2
- package/dist/index.mjs +11 -11
- package/dist/{init-C4a24wD2.mjs → init-D7PQcvvL.mjs} +1 -1
- package/dist/integrations/event-gateway.mjs +2 -2
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.mjs +3 -3
- package/dist/integrations/mcp/index.mjs +2 -2
- package/dist/integrations/mcp/testing.mjs +2 -2
- package/dist/integrations/streamline.mjs +3 -3
- package/dist/integrations/webhooks.mjs +4 -4
- package/dist/integrations/websocket-pushref-redis.mjs +1 -1
- package/dist/integrations/websocket-redis.mjs +1 -1
- package/dist/integrations/websocket.mjs +2 -2
- package/dist/{jsonBody-DoTt5BS6.mjs → jsonBody-C0oREwUc.mjs} +2 -2
- package/dist/{keys--l9n7aOC.mjs → keys-CGlPoVSn.mjs} +1 -1
- package/dist/{loadResources-rygByIQA.mjs → loadResources-Oi47dogA.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-ItNBIQ5w.mjs → loadResourcesFromEntry-BW-LexBz.mjs} +2 -2
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-UbknHqHy.mjs → logger-BagW7_YA.mjs} +1 -1
- package/dist/{mcpPlugin-CTkk4RP8.mjs → mcpPlugin-C6-wFsOX.mjs} +21 -21
- package/dist/{memory-C47xVsjX.mjs → memory-Bl7kv6TS.mjs} +3 -3
- package/dist/{metrics-TJyAb1Xk.mjs → metrics-CqnMJKrJ.mjs} +3 -3
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module-CWiqsXnh.mjs → module-lbEbHUfI.mjs} +1 -1
- package/dist/{multipartBody-BdG1qbn1.mjs → multipartBody-CqNezaB3.mjs} +1 -1
- package/dist/{observeSend-DrA3ADFN.mjs → observeSend-BjilzlYl.mjs} +1 -1
- package/dist/{openapi-D6MAbYpv.mjs → openapi-DXNbadgd.mjs} +6 -6
- package/dist/outbox-admin/index.mjs +5 -5
- package/dist/{outbox-module-D5QABFQW.mjs → outbox-module-k5rIszQ4.mjs} +7 -7
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-CFsmdYUt.mjs → permissions-BJylQopQ.mjs} +9 -9
- package/dist/{pipe-B_05AgGt.mjs → pipe-D1cq8hET.mjs} +2 -2
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-BnlNJhrj.mjs → plan-iEgaS5_H.mjs} +1 -1
- package/dist/{plugin-CrMPYbdj.mjs → plugin-DsLr6L4O.mjs} +24 -24
- package/dist/plugins/index.mjs +18 -18
- package/dist/plugins/response-cache.mjs +4 -4
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-oVIxJ4CY.mjs → pluralize-CX4ZvwCa.mjs} +1 -1
- package/dist/presets/filesUpload.mjs +5 -5
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.mjs +5 -5
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-CUd3L7v6.mjs → presets-D_suT4OY.mjs} +4 -4
- package/dist/{projection-DowJlIto.mjs → projection-CmjGjFih.mjs} +2 -2
- package/dist/{purger.types-BjKy8869.mjs → purger.types-CZwkTZ7B.mjs} +1 -1
- package/dist/{queryCachePlugin-BvB3k_Fh.mjs → queryCachePlugin-BDOPEAmH.mjs} +6 -6
- package/dist/{rateLimitKey-56nH1cWN.mjs → rateLimitKey-igF1x64n.mjs} +1 -1
- package/dist/{realtime-DXGBPtYK.mjs → realtime-Cq_ugiWw.mjs} +67 -11
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-Biz-6sEZ.mjs → registry-DmF9Akvn.mjs} +2 -2
- package/dist/{relay-DEIoMntZ.mjs → relay-DA89IhFt.mjs} +5 -5
- package/dist/{renewingLease-BCJpW9-u.mjs → renewingLease-DBtGUt8T.mjs} +1 -1
- package/dist/{replyHelpers-DliJNb0-.mjs → replyHelpers-CUbeUc5q.mjs} +2 -2
- package/dist/{requestContext-tUgLt9Ky.mjs → requestContext-DO9Qv0gw.mjs} +1 -1
- package/dist/{requirement-0l2DApiQ.mjs → requirement-C3GaQmkR.mjs} +1 -1
- package/dist/{resourceRateLimit-iSXF8rLH.mjs → resourceRateLimit-KKn-sFhb.mjs} +2 -2
- package/dist/{rolldown-runtime-gKJR3o-6.mjs → rolldown-runtime-Ck1Tj4Ax.mjs} +1 -1
- package/dist/{routeValidator-xNYA4rr1.mjs → routeValidator-BF7n34xV.mjs} +1 -1
- package/dist/{runtimeCapabilities-BQK-GrYe.mjs → runtimeCapabilities-D0A4kkrC.mjs} +1 -1
- package/dist/{schedules-D9iMVFhF.mjs → schedules-CLrQRSTt.mjs} +5 -5
- package/dist/{schemaConverter-cIh4oX9a.mjs → schemaConverter-JEmU21fu.mjs} +2 -2
- package/dist/{schemaIR-BsY4y9VP.mjs → schemaIR-wOffQlbq.mjs} +14 -14
- package/dist/schemas/index.mjs +1 -1
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-QyhM9w8z.mjs → scope-CcTMRd7s.mjs} +4 -4
- package/dist/{shutdown-BM7Q0h4B.mjs → shutdown-BIR-QBYM.mjs} +1 -1
- package/dist/{streamFrames-B3ZJfI02.mjs → simpleEqualityMatcher-DqqJqovq.mjs} +2 -19
- package/dist/{sse-ofvlcTQQ.mjs → sse-OEuPpgss.mjs} +7 -7
- package/dist/{sseStream-BxQW7hPq.mjs → sseStream-DknHE2K5.mjs} +2 -2
- package/dist/{store-helpers-_FRhHDyv.mjs → store-helpers-D4vtEXt2.mjs} +1 -1
- package/dist/{streaming-HZr63UiM.mjs → streaming-CcIpcx02.mjs} +1 -1
- package/dist/{subscriberIdentity-DSgnoT_D.mjs → subscriberIdentity-PO6kimAl.mjs} +1 -1
- package/dist/{tenancy-_ukT0oBt.mjs → tenancy-CH2Kuksc.mjs} +2 -2
- package/dist/{tenantPreparation-DSlQI53c.mjs → tenantPreparation-BTGpblQW.mjs} +4 -4
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.mjs +11 -11
- package/dist/testing/outboxStoreContract.mjs +2 -2
- package/dist/testing/requiredPorts.mjs +2 -2
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{timing-Z8p-Zlw1.mjs → timing-Dii5X7AP.mjs} +1 -1
- package/dist/{transactionContext-DBbSTfY3.mjs → transactionContext-DMPhYEOt.mjs} +1 -1
- package/dist/{typeGuards-_6nNQqgq.mjs → typeGuards-C1o_XEyp.mjs} +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-CrOlZ4rY.mjs → types-BuV_cFqT.mjs} +4 -4
- package/dist/usage/index.mjs +4 -4
- package/dist/{userHelpers-CBKx3XJN.mjs → userHelpers-D4m_pLSC.mjs} +1 -1
- package/dist/utils/index.d.mts +2 -48
- package/dist/utils/index.mjs +13 -13
- package/dist/{utils--HE8R8sH.mjs → utils-CxLMXGn5.mjs} +7 -7
- package/dist/{validate-BUeE2MLR.mjs → validate-CZ975J8N.mjs} +3 -3
- package/dist/{versioning-qYgqwOhL.mjs → versioning-B2_8SBZo.mjs} +3 -3
- package/dist/{workScope-C-1QHNmV.mjs → workScope-B3W3r35s.mjs} +2 -2
- package/package.json +3 -3
- package/skills/arc/references/api-reference.md +1 -1
- package/skills/arc/references/production-realtime.md +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
2
|
// src/utils/simpleEqualityMatcher.ts
|
|
3
3
|
/**
|
|
4
4
|
* `simpleEqualityMatcher` — a minimal, dialect-agnostic flat-key equality
|
|
@@ -39,21 +39,4 @@ function simpleEqualityMatcher(item, filters) {
|
|
|
39
39
|
}
|
|
40
40
|
return true;
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* SSE control-frame vocabulary shared by every arc stream and `@classytic/arc-next/sse`.
|
|
45
|
-
*
|
|
46
|
-
* Kept apart from `replayStream.ts` so a feed that only names the frames
|
|
47
|
-
* (`realtimePlugin`) does not pull the replay hub, and `node:crypto`, into its chunk.
|
|
48
|
-
*/
|
|
49
|
-
/**
|
|
50
|
-
* SSE control frame names. The same literals ship from `@classytic/arc-next/sse`;
|
|
51
|
-
* a test in each package pins them.
|
|
52
|
-
*/
|
|
53
|
-
const STREAM_FRAMES = {
|
|
54
|
-
READY: "ready",
|
|
55
|
-
RESYNC: "resync",
|
|
56
|
-
REVOKED: "revoked",
|
|
57
|
-
RETRY: "retry"
|
|
58
|
-
};
|
|
59
|
-
export { simpleEqualityMatcher as n, STREAM_FRAMES as t };
|
|
42
|
+
export { simpleEqualityMatcher as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-
|
|
4
|
-
import { t as arcLog } from "./logger-
|
|
5
|
-
import { g as getUserId, n as PUBLIC_SCOPE } from "./types-
|
|
6
|
-
import { a as registerSseStats, r as openSseStream } from "./sseStream-
|
|
7
|
-
import { a as promoteStreamTokenToHeader } from "./streaming-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Ck1Tj4Ax.mjs";
|
|
3
|
+
import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-CH2Kuksc.mjs";
|
|
4
|
+
import { t as arcLog } from "./logger-BagW7_YA.mjs";
|
|
5
|
+
import { g as getUserId, n as PUBLIC_SCOPE } from "./types-BuV_cFqT.mjs";
|
|
6
|
+
import { a as registerSseStats, r as openSseStream } from "./sseStream-DknHE2K5.mjs";
|
|
7
|
+
import { a as promoteStreamTokenToHeader } from "./streaming-CcIpcx02.mjs";
|
|
8
8
|
import fp from "fastify-plugin";
|
|
9
9
|
// src/plugins/sse.ts
|
|
10
10
|
var sse_exports = /* @__PURE__ */ __exportAll({ default: () => sse_default });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as forwardedStreamHeaders } from "./streaming-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as forwardedStreamHeaders } from "./streaming-CcIpcx02.mjs";
|
|
3
3
|
// src/utils/sseStats.ts
|
|
4
4
|
/** Per-instance stats providers behind one `sseStats` decorator. */
|
|
5
5
|
const statsProviders = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
2
|
// src/events/subscriberIdentity.ts
|
|
3
3
|
const SUBSCRIBER_ID = Symbol.for("@classytic/arc/subscriber-id");
|
|
4
4
|
/** Assign a deployment-stable identity for durable per-handler progress; never use an index. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { b as isElevated, c as getOrgId } from "./types-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { b as isElevated, c as getOrgId } from "./types-BuV_cFqT.mjs";
|
|
3
3
|
// src/core/tenancy.ts
|
|
4
4
|
function eventAudienceOf(scope) {
|
|
5
5
|
const tenancy = resolveTenancy({ _scope: scope }, "organizationId");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as conjoinPolicyFilters } from "./filter-merge-
|
|
3
|
-
import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, v as hasOrgAccess } from "./types-
|
|
4
|
-
import { d as createDomainError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as conjoinPolicyFilters } from "./filter-merge-Bvjk_8dV.mjs";
|
|
3
|
+
import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, v as hasOrgAccess } from "./types-BuV_cFqT.mjs";
|
|
4
|
+
import { d as createDomainError } from "./errors-3xaK0i9n.mjs";
|
|
5
5
|
// src/permissions/tenantPreparation.ts
|
|
6
6
|
/** Tenant preparation shared by HTTP middleware and direct transport invocation. */
|
|
7
7
|
const PREPARATION = Symbol.for("arc.tenantPreparation");
|
package/dist/testing/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { d as resolveModule, l as isLazyBridge, o as resolveModuleClosure } from "../plan-
|
|
3
|
-
import { h as asModulePorts, r as createApp } from "../createApp-
|
|
4
|
-
import { n as getModuleExports } from "../module-
|
|
5
|
-
import { g as getUserId } from "../types-
|
|
6
|
-
import { t as defineAggregation } from "../defineAggregation-
|
|
7
|
-
import { f as BaseController } from "../plugin-
|
|
8
|
-
import { t as defineResource } from "../defineResource-
|
|
9
|
-
import { t as CRUD_OPERATIONS } from "../constants-
|
|
10
|
-
import { E as requireOrgRole } from "../permissions-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { d as resolveModule, l as isLazyBridge, o as resolveModuleClosure } from "../plan-iEgaS5_H.mjs";
|
|
3
|
+
import { h as asModulePorts, r as createApp } from "../createApp-Db9JRumw.mjs";
|
|
4
|
+
import { n as getModuleExports } from "../module-lbEbHUfI.mjs";
|
|
5
|
+
import { g as getUserId } from "../types-BuV_cFqT.mjs";
|
|
6
|
+
import { t as defineAggregation } from "../defineAggregation-BskqRz8M.mjs";
|
|
7
|
+
import { f as BaseController } from "../plugin-DsLr6L4O.mjs";
|
|
8
|
+
import { t as defineResource } from "../defineResource-B2vTvKzW.mjs";
|
|
9
|
+
import { t as CRUD_OPERATIONS } from "../constants-BZFsZwJh.mjs";
|
|
10
|
+
import { E as requireOrgRole } from "../permissions-BJylQopQ.mjs";
|
|
11
11
|
import { runStorageContract } from "./storageContract.mjs";
|
|
12
12
|
import Fastify from "fastify";
|
|
13
13
|
import { mkdir, mkdtemp, readFile, readdir, rm, stat } from "node:fs/promises";
|
|
@@ -1873,7 +1873,7 @@ function pickDefaultAuth(authMode, callerAuth) {
|
|
|
1873
1873
|
};
|
|
1874
1874
|
}
|
|
1875
1875
|
async function createTestApp(options = {}) {
|
|
1876
|
-
const { createApp } = await import("../createApp-
|
|
1876
|
+
const { createApp } = await import("../createApp-Db9JRumw.mjs").then((n) => n.i);
|
|
1877
1877
|
const { resources = [], db = "in-memory", connectMongoose = false, authMode = "jwt", defaultOrgId, plugins, auth: callerAuth, ...appOptions } = options;
|
|
1878
1878
|
let dbHandle;
|
|
1879
1879
|
let dbUri;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as claimedAttempts } from "../claimed-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as claimedAttempts } from "../claimed-CQ4ZpD8K.mjs";
|
|
3
3
|
import { OutboxConflictError, OutboxOwnershipError } from "@classytic/primitives/outbox";
|
|
4
4
|
import { afterAll, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
|
5
5
|
// src/testing/outboxStoreContract.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { c as declareModules, d as resolveModule, i as planModules, r as compositionProblems } from "../plan-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { c as declareModules, d as resolveModule, i as planModules, r as compositionProblems } from "../plan-iEgaS5_H.mjs";
|
|
3
3
|
// src/testing/requiredPorts.ts
|
|
4
4
|
/**
|
|
5
5
|
* Assert a module declares EXACTLY `ports` as required, and that composing it without any one of
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
// src/utils/operationIdentity.ts
|
|
4
4
|
/** Security context included in idempotency identities across transports. */
|
package/dist/types/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.50.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.50.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.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { l as UnauthorizedError, o as OrgRequiredError } from "./errors-3xaK0i9n.mjs";
|
|
3
|
+
import { n as requireSingleHeaderValue } from "./headers-BROW65-r.mjs";
|
|
4
|
+
import { t as getUserId$1 } from "./userHelpers-D4m_pLSC.mjs";
|
|
5
5
|
// src/scope/types.ts
|
|
6
6
|
/**
|
|
7
7
|
* Request Scope — The One Standard
|
package/dist/usage/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ArcError } from "../errors-
|
|
3
|
-
import { c as getOrgId, g as getUserId, i as getClientId } from "../types-
|
|
4
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ArcError } from "../errors-3xaK0i9n.mjs";
|
|
3
|
+
import { c as getOrgId, g as getUserId, i as getClientId } from "../types-BuV_cFqT.mjs";
|
|
4
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-D0A4kkrC.mjs";
|
|
5
5
|
import { usagePeriod } from "@classytic/repo-core/usage";
|
|
6
6
|
import fp from "fastify-plugin";
|
|
7
7
|
// src/usage/requireQuota.ts
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -7,8 +7,8 @@ import { a as SSE_DEFAULT_DRAIN_TIMEOUT_MS, c as SseStreamOptions, i as register
|
|
|
7
7
|
import { f as getUserId, m as normalizeRoles, p as getUserRoles, t as AnyRecord } from "../base-HXNgPQww.mjs";
|
|
8
8
|
import { errorContractSchema } from "@classytic/repo-core/errors";
|
|
9
9
|
import { FilterClause } from "@classytic/repo-core/query-parser";
|
|
10
|
-
import { FastifyInstance, FastifyReply, FastifyRequest, RouteHandlerMethod } from "fastify";
|
|
11
10
|
import { ChangeEntry, ChangeLogStore, ChangesSinceOptions } from "@classytic/repo-core/sync";
|
|
11
|
+
import { FastifyInstance, FastifyReply, FastifyRequest, RouteHandlerMethod } from "fastify";
|
|
12
12
|
export declare const CircuitState: {
|
|
13
13
|
readonly CLOSED: "CLOSED";
|
|
14
14
|
readonly OPEN: "OPEN";
|
|
@@ -585,52 +585,6 @@ export declare class ArcQueryParser implements QueryParserInterface {
|
|
|
585
585
|
}
|
|
586
586
|
/** Create a new ArcQueryParser instance. */
|
|
587
587
|
export declare function createQueryParser(options?: ArcQueryParserOptions): ArcQueryParser;
|
|
588
|
-
/**
|
|
589
|
-
* SSE control-frame vocabulary shared by every arc stream and `@classytic/arc-next/sse`.
|
|
590
|
-
*
|
|
591
|
-
* Kept apart from `replayStream.ts` so a feed that only names the frames
|
|
592
|
-
* (`realtimePlugin`) does not pull the replay hub, and `node:crypto`, into its chunk.
|
|
593
|
-
*/
|
|
594
|
-
/**
|
|
595
|
-
* SSE control frame names. The same literals ship from `@classytic/arc-next/sse`;
|
|
596
|
-
* a test in each package pins them.
|
|
597
|
-
*/
|
|
598
|
-
export declare const STREAM_FRAMES: {
|
|
599
|
-
readonly READY: "ready";
|
|
600
|
-
readonly RESYNC: "resync";
|
|
601
|
-
readonly REVOKED: "revoked";
|
|
602
|
-
readonly RETRY: "retry";
|
|
603
|
-
};
|
|
604
|
-
type StreamFrameName = (typeof STREAM_FRAMES)[keyof typeof STREAM_FRAMES];
|
|
605
|
-
type ResyncReason = "cursor_expired" | "gap_too_large" | "cursor_invalid";
|
|
606
|
-
/**
|
|
607
|
-
* `event: ready` (no `id:`). The first frame on every connection. `cursor` is
|
|
608
|
-
* present only on a replayable stream (the replay hub always sends it).
|
|
609
|
-
* `realtimePlugin` keeps its `resources` and `operations` fields next to these.
|
|
610
|
-
*/
|
|
611
|
-
interface ReadyFrame {
|
|
612
|
-
cursor?: string;
|
|
613
|
-
resumed: boolean;
|
|
614
|
-
}
|
|
615
|
-
/** `event: resync` (no `id:`). The gap could not be replayed: reload the snapshot, then continue from `cursor`. */
|
|
616
|
-
interface ResyncFrame {
|
|
617
|
-
cursor: string;
|
|
618
|
-
reason: ResyncReason;
|
|
619
|
-
}
|
|
620
|
-
/** `event: revoked` (no `id:`). Access ended; the server closes the stream right after this frame. */
|
|
621
|
-
interface RevokedFrame {
|
|
622
|
-
reason: string;
|
|
623
|
-
}
|
|
624
|
-
/**
|
|
625
|
-
* `event: retry` (no `id:`). NOT final: the server closes right after, and the client
|
|
626
|
-
* should reconnect at once (no backoff) with its `Last-Event-ID`, so the stream is
|
|
627
|
-
* authorized afresh. Sent by the replay hub's `revalidate` (`{ close: 'retry' }` or
|
|
628
|
-
* `maxConsecutiveFailures`). A client that does not know the frame still reconnects
|
|
629
|
-
* with its normal backoff, so the frame is safe to send to older clients.
|
|
630
|
-
*/
|
|
631
|
-
interface RetryFrame {
|
|
632
|
-
reason: string;
|
|
633
|
-
}
|
|
634
588
|
/**
|
|
635
589
|
* Identity keys a revoke matches on, e.g. `{ userId }`, `{ sessionId }`, `{ deviceId }`.
|
|
636
590
|
* Values are compared as strings (`String(value)`), so an ObjectId or a number
|
|
@@ -1674,4 +1628,4 @@ interface EventsDecorator {
|
|
|
1674
1628
|
export declare function hasEvents(instance: FastifyInstance): instance is FastifyInstance & {
|
|
1675
1629
|
events: EventsDecorator;
|
|
1676
1630
|
};
|
|
1677
|
-
export { type AnyAsyncFn, ArcError, type ArcHeaders, type ArcQueryParserOptions, type CircuitBreakerOptions, type CircuitBreakerRedisLike, type CircuitBreakerSharedState, type CircuitBreakerStats, type CompensationDefinition, type CompensationError, type CompensationHooks, type CompensationResult, type CompensationStep, ConflictError, type ErrorOptions, type EventsDecorator, type FilterDialect, ForbiddenError, type Guard, type GuardConfig, type JsonSchema, type JsonSchemaTarget, NotFoundError, OrgAccessDeniedError, OrgRequiredError, type PipeUIMessageStreamOptions, RateLimitError, type
|
|
1631
|
+
export { type AnyAsyncFn, ArcError, type ArcHeaders, type ArcQueryParserOptions, type CircuitBreakerOptions, type CircuitBreakerRedisLike, type CircuitBreakerSharedState, type CircuitBreakerStats, type CompensationDefinition, type CompensationError, type CompensationHooks, type CompensationResult, type CompensationStep, ConflictError, type ErrorOptions, type EventsDecorator, type FilterDialect, ForbiddenError, type Guard, type GuardConfig, type JsonSchema, type JsonSchemaTarget, NotFoundError, OrgAccessDeniedError, OrgRequiredError, type PipeUIMessageStreamOptions, RateLimitError, type RedisCircuitBreakerStateOptions, type ReplayCloseVerdict, type ReplayHub, type ReplayHubOptions, type ReplayHubStats, type ReplayHubTimers, type ReplayReadScope, type ReplaySubscription, type RevokeTarget, type RuntimeCapabilityDeclaration, type SSEStats, SSE_DEFAULT_DRAIN_TIMEOUT_MS, SSE_DEFAULT_MAX_BUFFERED_BYTES, type SchemaIo, ServiceUnavailableError, type ShutdownParticipant, type SseConnectionGauge, type SseStream, type SseStreamOptions, type StateMachine, type TransitionConfig, UnauthorizedError, type UnconvertibleMode, ValidationError, createDomainError, createError, createSseConnectionGauge, errorContractSchema, getHeader, getUserId, getUserRoles, isArcError, normalizeRoles, openSseStream, registerSseStats, requireSingleHeaderValue };
|
package/dist/utils/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as OrgAccessDeniedError, c as ServiceUnavailableError, d as createDomainError, f as createError, i as NotFoundError, l as UnauthorizedError, n as ConflictError, o as OrgRequiredError, p as isArcError, r as ForbiddenError, s as RateLimitError, t as ArcError, u as ValidationError } from "../errors-
|
|
3
|
-
import {
|
|
4
|
-
import { n as requireSingleHeaderValue, t as getHeader } from "../headers-
|
|
5
|
-
import { n as getUserRoles, r as normalizeRoles, t as getUserId } from "../userHelpers-
|
|
6
|
-
import { A as MONGO_DIALECT, C as listResponse, D as responses, E as queryParams, O as ArcQueryParser, S as keysetListResponse, T as paginationSchema, _ as bareListResponse, a as defineGuard, b as getDefaultCrudSchemas, c as withCompensation, d as CircuitBreakerError, f as CircuitBreakerRegistry, g as aggregateListResponse, h as createCircuitBreakerRegistry, i as handleRaw, j as NEUTRAL_DIALECT, k as createQueryParser, l as RedisCircuitBreakerState, m as createCircuitBreaker, n as createReplayHub, o as defineErrorMapper, p as CircuitState, r as lastEventIdOf, s as defineCompensation, t as createStateMachine, u as CircuitBreaker, v as deleteResponse, w as offsetListResponse, x as getListQueryParams, y as errorContractSchema } from "../utils
|
|
7
|
-
import { a as isZodSchema, i as isJsonSchema, n as convertRouteSchema, o as toJsonSchema, t as convertOpenApiSchemas } from "../schemaConverter-
|
|
8
|
-
import { a as promoteStreamTokenToHeader, i as pipeUIMessageStreamToReply, n as forwardedStreamHeaders, r as isReadableStream, t as UI_MESSAGE_STREAM_HEADERS } from "../streaming-
|
|
9
|
-
import { a as registerSseStats, i as createSseConnectionGauge, n as SSE_DEFAULT_MAX_BUFFERED_BYTES, r as openSseStream, t as SSE_DEFAULT_DRAIN_TIMEOUT_MS } from "../sseStream-
|
|
10
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
11
|
-
import { i as runAdmittedWork, r as registerShutdownParticipant } from "../shutdown-
|
|
12
|
-
import { t as hasEvents } from "../typeGuards-
|
|
13
|
-
export { ArcError, ArcQueryParser, CircuitBreaker, CircuitBreakerError, CircuitBreakerRegistry, CircuitState, ConflictError, ForbiddenError, MONGO_DIALECT, NEUTRAL_DIALECT, NotFoundError, OrgAccessDeniedError, OrgRequiredError, RateLimitError, RedisCircuitBreakerState, SSE_DEFAULT_DRAIN_TIMEOUT_MS, SSE_DEFAULT_MAX_BUFFERED_BYTES,
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as OrgAccessDeniedError, c as ServiceUnavailableError, d as createDomainError, f as createError, i as NotFoundError, l as UnauthorizedError, n as ConflictError, o as OrgRequiredError, p as isArcError, r as ForbiddenError, s as RateLimitError, t as ArcError, u as ValidationError } from "../errors-3xaK0i9n.mjs";
|
|
3
|
+
import { t as simpleEqualityMatcher } from "../simpleEqualityMatcher-DqqJqovq.mjs";
|
|
4
|
+
import { n as requireSingleHeaderValue, t as getHeader } from "../headers-BROW65-r.mjs";
|
|
5
|
+
import { n as getUserRoles, r as normalizeRoles, t as getUserId } from "../userHelpers-D4m_pLSC.mjs";
|
|
6
|
+
import { A as MONGO_DIALECT, C as listResponse, D as responses, E as queryParams, O as ArcQueryParser, S as keysetListResponse, T as paginationSchema, _ as bareListResponse, a as defineGuard, b as getDefaultCrudSchemas, c as withCompensation, d as CircuitBreakerError, f as CircuitBreakerRegistry, g as aggregateListResponse, h as createCircuitBreakerRegistry, i as handleRaw, j as NEUTRAL_DIALECT, k as createQueryParser, l as RedisCircuitBreakerState, m as createCircuitBreaker, n as createReplayHub, o as defineErrorMapper, p as CircuitState, r as lastEventIdOf, s as defineCompensation, t as createStateMachine, u as CircuitBreaker, v as deleteResponse, w as offsetListResponse, x as getListQueryParams, y as errorContractSchema } from "../utils-CxLMXGn5.mjs";
|
|
7
|
+
import { a as isZodSchema, i as isJsonSchema, n as convertRouteSchema, o as toJsonSchema, t as convertOpenApiSchemas } from "../schemaConverter-JEmU21fu.mjs";
|
|
8
|
+
import { a as promoteStreamTokenToHeader, i as pipeUIMessageStreamToReply, n as forwardedStreamHeaders, r as isReadableStream, t as UI_MESSAGE_STREAM_HEADERS } from "../streaming-CcIpcx02.mjs";
|
|
9
|
+
import { a as registerSseStats, i as createSseConnectionGauge, n as SSE_DEFAULT_MAX_BUFFERED_BYTES, r as openSseStream, t as SSE_DEFAULT_DRAIN_TIMEOUT_MS } from "../sseStream-DknHE2K5.mjs";
|
|
10
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-D0A4kkrC.mjs";
|
|
11
|
+
import { i as runAdmittedWork, r as registerShutdownParticipant } from "../shutdown-BIR-QBYM.mjs";
|
|
12
|
+
import { t as hasEvents } from "../typeGuards-C1o_XEyp.mjs";
|
|
13
|
+
export { ArcError, ArcQueryParser, CircuitBreaker, CircuitBreakerError, CircuitBreakerRegistry, CircuitState, ConflictError, ForbiddenError, MONGO_DIALECT, NEUTRAL_DIALECT, NotFoundError, OrgAccessDeniedError, OrgRequiredError, RateLimitError, RedisCircuitBreakerState, SSE_DEFAULT_DRAIN_TIMEOUT_MS, SSE_DEFAULT_MAX_BUFFERED_BYTES, ServiceUnavailableError, UI_MESSAGE_STREAM_HEADERS, UnauthorizedError, ValidationError, aggregateListResponse, bareListResponse, convertOpenApiSchemas, convertRouteSchema, createCircuitBreaker, createCircuitBreakerRegistry, createDomainError, createError, createQueryParser, createReplayHub, createSseConnectionGauge, createStateMachine, declareRuntimeCapability, defineCompensation, defineErrorMapper, defineGuard, deleteResponse, errorContractSchema, forwardedStreamHeaders, getDefaultCrudSchemas, getHeader, getListQueryParams, getUserId, getUserRoles, handleRaw, hasEvents, isArcError, isJsonSchema, isReadableStream, isZodSchema, keysetListResponse, lastEventIdOf, listResponse, normalizeRoles, offsetListResponse, openSseStream, paginationSchema, pipeUIMessageStreamToReply, promoteStreamTokenToHeader, queryParams, registerShutdownParticipant, registerSseStats, requireSingleHeaderValue, responses, runAdmittedWork, simpleEqualityMatcher, toJsonSchema, withCompensation };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ArcError, u as ValidationError } from "./errors-
|
|
3
|
-
import { t as runObservingSend } from "./observeSend-
|
|
4
|
-
import { h as RESERVED_QUERY_PARAMS } from "./constants-
|
|
5
|
-
import { t as arcLog } from "./logger-
|
|
6
|
-
import { a as registerSseStats } from "./sseStream-
|
|
7
|
-
import { t as STREAM_FRAMES } from "./streamFrames-B3ZJfI02.mjs";
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ArcError, u as ValidationError } from "./errors-3xaK0i9n.mjs";
|
|
3
|
+
import { t as runObservingSend } from "./observeSend-BjilzlYl.mjs";
|
|
4
|
+
import { h as RESERVED_QUERY_PARAMS } from "./constants-BZFsZwJh.mjs";
|
|
5
|
+
import { t as arcLog } from "./logger-BagW7_YA.mjs";
|
|
6
|
+
import { a as registerSseStats } from "./sseStream-DknHE2K5.mjs";
|
|
8
7
|
import { errorContractSchema as errorContractSchema$1 } from "@classytic/repo-core/errors";
|
|
9
8
|
import { readEnv } from "@classytic/primitives/environment";
|
|
10
9
|
import { OPERATOR_DESCRIPTIONS, URL_OPERATORS, escapeRegex, isQueryGrammarError, readFilterClauses, readPageRequest, readSearch, readSelect, readSort } from "@classytic/repo-core/query-parser";
|
|
11
10
|
import { createCipheriv, createDecipheriv, hkdfSync, randomBytes } from "node:crypto";
|
|
11
|
+
import { STREAM_FRAMES } from "@classytic/repo-core/sync";
|
|
12
12
|
// src/utils/filter-dialect.ts
|
|
13
13
|
/**
|
|
14
14
|
* Filter dialects — what `ArcQueryParser` EMITS. Reading a URL (keys, operators, coercion,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { x as pathTouchesBlocked } from "./plugin-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Ck1Tj4Ax.mjs";
|
|
3
|
+
import { x as pathTouchesBlocked } from "./plugin-DsLr6L4O.mjs";
|
|
4
4
|
// src/core/aggregation/normalize.ts
|
|
5
5
|
/**
|
|
6
6
|
* Framework cap on URL-driven aggregation limits when the host opts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { d as createDomainError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Ck1Tj4Ax.mjs";
|
|
3
|
+
import { d as createDomainError } from "./errors-3xaK0i9n.mjs";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
// src/plugins/versioning.ts
|
|
6
6
|
var versioning_exports = /* @__PURE__ */ __exportAll({ default: () => versioning_default });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as requestContext } from "./requestContext-
|
|
1
|
+
/*! @classytic/arc v2.50.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as requestContext } from "./requestContext-DO9Qv0gw.mjs";
|
|
3
3
|
// src/context/workScope.ts
|
|
4
4
|
/** Enter a scope for `fn`, or run it inside the active one. */
|
|
5
5
|
function runWorkScope(seed, fn) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@classytic/arc",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.50.0",
|
|
4
4
|
"description": "Resource-oriented backend framework for Fastify - clean, minimal, powerful, tree-shakable",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
},
|
|
380
380
|
"peerDependencies": {
|
|
381
381
|
"@classytic/primitives": ">=0.36.0",
|
|
382
|
-
"@classytic/repo-core": ">=0.
|
|
382
|
+
"@classytic/repo-core": ">=0.38.0",
|
|
383
383
|
"@classytic/streamline": ">=2.12.0",
|
|
384
384
|
"@fastify/cors": ">=11.0.0",
|
|
385
385
|
"@fastify/helmet": ">=13.0.0",
|
|
@@ -516,7 +516,7 @@
|
|
|
516
516
|
"@classytic/mongokit": "^3.44.0",
|
|
517
517
|
"@classytic/pgkit": "^0.1.1",
|
|
518
518
|
"@classytic/primitives": "^0.36.0",
|
|
519
|
-
"@classytic/repo-core": "^0.
|
|
519
|
+
"@classytic/repo-core": "^0.38.0",
|
|
520
520
|
"@classytic/sqlitekit": "^0.13.0",
|
|
521
521
|
"@classytic/streamline": "^2.12.0",
|
|
522
522
|
"@electric-sql/pglite": "^0.5.15",
|
|
@@ -25,7 +25,7 @@ Import only from these subpaths (tree-shaken, no deep imports). Authoritative li
|
|
|
25
25
|
| `/context`, `/logger` | `requestContext`, `transactionContext`, `runWorkScope`; `arcLog`, `configureArcLogger` |
|
|
26
26
|
| `/registry`, `/discovery`, `/docs` | `ResourceRegistry`, `introspectionPlugin`; `discoverResources`; `openApiPlugin`, `scalarPlugin`, `buildOpenApiSpec` |
|
|
27
27
|
| `/schemas` | `Type`, `ArcListResponse`, `ArcErrorResponse`, `ArcPaginationQuery` |
|
|
28
|
-
| `/utils` | `createStateMachine`, `CircuitBreaker`, `withCompensation`, `defineGuard`, `declareRuntimeCapability`, `createQueryParser`, `ArcQueryParser`, `createError`, `pipeUIMessageStreamToReply`, `openSseStream`, `createReplayHub`, `lastEventIdOf`, `
|
|
28
|
+
| `/utils` | `createStateMachine`, `CircuitBreaker`, `withCompensation`, `defineGuard`, `declareRuntimeCapability`, `createQueryParser`, `ArcQueryParser`, `createError`, `pipeUIMessageStreamToReply`, `openSseStream`, `createReplayHub`, `lastEventIdOf`, `registerSseStats`, `createSseConnectionGauge`, `listResponse`, `errorContractSchema`, error classes |
|
|
29
29
|
| `/migrations` | `defineMigration`, `MigrationRunner`, `MigrationRegistry`, `MongoMigrationStore` |
|
|
30
30
|
| `/cleanup` | `createDataCleanupModule`, `createCleanupService`, `createCleanupRegistry`, `recipeFromSteps` |
|
|
31
31
|
| `/encryption` | `encryptionPlugin`, `encryptField`, `decryptField`, `createStaticKeyProvider` |
|
|
@@ -68,7 +68,7 @@ await app.events.subscribe('alert.*', () => hub.notify()); // the bus only WAK
|
|
|
68
68
|
await hub.attach(openSseStream(req, reply), ctx, lastEventIdOf(req));
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
- Frames: `ready {cursor, resumed}` first, then the replay or one `resync {cursor, reason}`, then live (`id:` = cursor). `revoked {reason}` then close (final). `retry {reason}` then close (not final: reconnect now). Names: `STREAM_FRAMES
|
|
71
|
+
- Frames: `ready {cursor, resumed}` first, then the replay or one `resync {cursor, reason}`, then live (`id:` = cursor). `revoked {reason}` then close (final). `retry {reason}` then close (not final: reconnect now). Names: `STREAM_FRAMES` from `@classytic/repo-core/sync` (the contract owner; `@classytic/arc-next/sse` reads the same one).
|
|
72
72
|
- `openSseStream` waits for `drain` (`maxBufferedBytes` 1 MiB, `drainTimeoutMs` 10 s; `0` bytes = old fail-fast); the hub paces a replay on `needsDrain`/`drain()`, so a large resume is not cut.
|
|
73
73
|
- A live entry the replay already sent goes out once. Entries hidden by `toFrame` are followed by an id-only frame, so the client cursor keeps up.
|
|
74
74
|
- Gap over `maxReplay` (500) → `gap_too_large`; `CursorExpiredError` → `cursor_expired`; invalid or ahead → `cursor_invalid`. Other store errors close with no frame.
|