@classytic/arc 2.46.0 → 2.48.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-DNgD9NP4.mjs → EventTransport-BWwg5YAU.mjs} +4 -4
- package/dist/{HookSystem-DRbPzEcP.mjs → HookSystem-B9x-Y_k7.mjs} +2 -2
- package/dist/{ResourceRegistry-Douk51fa.mjs → ResourceRegistry-BcvEJoZd.mjs} +2 -2
- package/dist/{acquire-RbtvDg9s.mjs → acquire-D2yj6Zzl.mjs} +1 -1
- package/dist/{actionPermissions-De0AJ7hm.mjs → actionPermissions-Dha8sAz2.mjs} +13 -13
- 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 +1 -1
- package/dist/auth/index.mjs +7 -7
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-DeZMrHcm.mjs → authorizationDecision-BZSJcPNE.mjs} +4 -4
- package/dist/{boundedMap-2WBh3gM9.mjs → boundedMap-o2KZDCWy.mjs} +1 -1
- package/dist/{buildHandler-DxVOOBpw.mjs → buildHandler-G3k59KY2.mjs} +4 -4
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-BYRwYrUo.mjs → caching-CJIDPZOv.mjs} +2 -2
- package/dist/{claimed-DYlELdnm.mjs → claimed-D0A43wjT.mjs} +1 -1
- package/dist/cleanup/index.d.mts +1 -1
- 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-CHZMUwBW.mjs → constants-D-faL5SX.mjs} +1 -1
- package/dist/context/index.mjs +5 -5
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.mjs +7 -7
- package/dist/{core-D9rS2BxO.mjs → core-NSu1peyq.mjs} +3 -3
- package/dist/{createActionRouter-0qkCRzTL.mjs → createActionRouter-DTSVv1VK.mjs} +6 -6
- package/dist/{createAggregationRouter-CUf5Esd9.mjs → createAggregationRouter-zEasm-ax.mjs} +7 -7
- package/dist/{createApp-DZIXfDKD.mjs → createApp-CjqhkX1x.mjs} +29 -29
- package/dist/{createMcpServer-DeVpqQF-.d.mts → createMcpServer-hSFeqRUb.d.mts} +9 -10
- package/dist/{defineAggregation-bmKQ4NmC.mjs → defineAggregation-DH2L6_v9.mjs} +1 -1
- package/dist/{defineResource-CGmdmGwh.mjs → defineResource-zYCrhNaN.mjs} +10 -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-CzhqAyVN.mjs → elevation-z--rFcZ5.mjs} +5 -5
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-dFyGOEoB.mjs → errorHandler-3_3oN-Uc.mjs} +3 -3
- package/dist/{errors-BY8vzlP4.mjs → errors-DyY48oRi.mjs} +1 -1
- package/dist/{eventPlugin-eMhAPtQA.mjs → eventPlugin-Co9sABCg.mjs} +8 -8
- package/dist/{eventTypes-Do2KYeJx.mjs → eventTypes-HmAFyJmJ.mjs} +2 -2
- package/dist/events/index.d.mts +2 -2
- package/dist/events/index.mjs +8 -7
- package/dist/events/transports/redis-stream-entry.mjs +4 -4
- package/dist/events/transports/redis.mjs +2 -2
- package/dist/factory/index.d.mts +3 -3
- package/dist/factory/index.mjs +6 -6
- package/dist/{fastify-augmentation-Dtn0IIRn.d.mts → fastify-augmentation-bzkWPt1f.d.mts} +2 -2
- package/dist/{fields-LnbCcvsw.mjs → fields-rfsl26Ov.mjs} +1 -1
- package/dist/{filter-merge-BAWi019Q.mjs → filter-merge-8glLr7Dk.mjs} +1 -1
- package/dist/{generate-oXoDnpJf.mjs → generate-BOfBueRt.mjs} +2 -2
- package/dist/{headers-DBd3Qheo.mjs → headers-CHSOqpcY.mjs} +2 -2
- package/dist/{health-BlJu9GXS.mjs → health-DHvAIVmM.mjs} +1 -1
- package/dist/{health-Dp-3EC9o.mjs → health-ezwTHQh2.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 +211 -0
- package/dist/http-cache/index.mjs +605 -0
- package/dist/http-cache/purgers/cloudflare.d.mts +13 -0
- package/dist/http-cache/purgers/cloudflare.mjs +46 -0
- package/dist/http-cache/purgers/fastly.d.mts +12 -0
- package/dist/http-cache/purgers/fastly.mjs +47 -0
- package/dist/http-cache/testing/index.d.mts +68 -0
- package/dist/http-cache/testing/index.mjs +168 -0
- package/dist/idempotency/index.mjs +8 -8
- package/dist/idempotency/redis.mjs +2 -2
- package/dist/{index-BTxzJ_MN.d.mts → index-BxZS-8So.d.mts} +2 -2
- package/dist/{index-DyJFTJLA.d.mts → index-Cy2-QffW.d.mts} +9 -0
- package/dist/{index-CUdaoCYt.d.mts → index-D1X_C_qz.d.mts} +2 -2
- package/dist/{index-Bqfo8hLz.d.mts → index-DFCCQ9AE.d.mts} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +11 -11
- package/dist/{init-BOaNkLYb.mjs → init-MoE3eZNR.mjs} +1 -1
- package/dist/integrations/event-gateway.mjs +2 -2
- package/dist/integrations/index.d.mts +1 -1
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.mjs +3 -3
- package/dist/integrations/mcp/index.d.mts +4 -36
- 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 -3
- 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-DpRpKR_K.mjs → jsonBody-DZGiCawf.mjs} +2 -2
- package/dist/{keys-FBz6Ull-.mjs → keys-CrMOZuk6.mjs} +1 -1
- package/dist/{loadResources-Bx1sKPnF.mjs → loadResources-CVQvYUhN.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-b_jcqbxh.mjs → loadResourcesFromEntry-D0naccV2.mjs} +2 -2
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-CbFcIEBZ.mjs → logger-VyMcSmVG.mjs} +1 -1
- package/dist/{mcpPlugin-yix548XX.mjs → mcpPlugin-DQACaqVu.mjs} +210 -373
- package/dist/{memory-Bgw5dn8N.mjs → memory-Lpfu8Hga.mjs} +3 -3
- package/dist/{metrics-CZDQWVjS.mjs → metrics-DjVj1sg5.mjs} +3 -3
- 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-Dsc_nKL5.mjs → module-BqPJpZ_L.mjs} +1 -1
- package/dist/{multiTenant-XCxAUlru.d.mts → multiTenant-KZj8j1uJ.d.mts} +1 -1
- package/dist/{multipartBody-B85ek8Kj.mjs → multipartBody-BNgNv7r0.mjs} +1 -1
- package/dist/{observeSend-BK-JN1jK.mjs → observeSend-BKJHibJz.mjs} +1 -1
- package/dist/{openapi-Co7hl073.mjs → openapi-T90KrPR6.mjs} +6 -6
- package/dist/outbox-admin/index.mjs +5 -5
- package/dist/{outbox-module-XvUThpqn.d.mts → outbox-module-5Mnwcycy.d.mts} +1 -1
- package/dist/outbox-module-C874VgBr.mjs +297 -0
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-A1oKtpiC.mjs → permissions-R9T2G1PH.mjs} +9 -9
- package/dist/{pipe-Czpw9U2n.mjs → pipe-DzqbsZy-.mjs} +2 -2
- package/dist/pipeline/index.d.mts +1 -1
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-KVseuBCL.mjs → plan-C0gkeABY.mjs} +1 -1
- package/dist/{plugin-DTWt_8C3.mjs → plugin-BJcVOX5r.mjs} +48 -24
- package/dist/plugins/index.d.mts +2 -2
- package/dist/plugins/index.mjs +17 -17
- package/dist/plugins/response-cache.mjs +4 -4
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-msB9X3yw.mjs → pluralize-CrCpyoZs.mjs} +1 -1
- package/dist/policy.types-DPqToKG1.d.mts +50 -0
- 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-qKCehiJM.mjs → presets-CNDvNYsz.mjs} +4 -4
- package/dist/{projection-ClBqtsIw.mjs → projection-CIUe8b59.mjs} +2 -2
- package/dist/purger.types-DvPp4-yd.d.mts +26 -0
- package/dist/purger.types-f83fTzGy.mjs +24 -0
- package/dist/{queryCachePlugin-3gJj5Rbz.mjs → queryCachePlugin-B2jpwFcv.mjs} +6 -6
- package/dist/{rateLimitKey-Kro---xl.mjs → rateLimitKey-BWx-qep0.mjs} +1 -1
- package/dist/{realtime-Ber8uJN2.mjs → realtime-D2tqi3d2.mjs} +11 -11
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-BA-_vFYk.mjs → registry-Dl0k6UXy.mjs} +2 -2
- package/dist/{outbox-module-mg9kDYkd.mjs → relay-ZYvS4xyW.mjs} +5 -299
- package/dist/{renewingLease-CMY8YOcc.mjs → renewingLease-DT4yLb29.mjs} +1 -1
- package/dist/{replyHelpers-DK9P_XSz.mjs → replyHelpers-BJFN5AW7.mjs} +2 -2
- package/dist/{requestContext-GYO_0gEw.mjs → requestContext-Ct5la-SA.mjs} +1 -1
- package/dist/{requirement-DeNjZIH3.mjs → requirement-CxDxjB6V.mjs} +1 -1
- package/dist/{resourceRateLimit-tHLbrtWc.mjs → resourceRateLimit-D1oH2obv.mjs} +2 -2
- package/dist/{rolldown-runtime-Kv1fZdLg.mjs → rolldown-runtime-BdTN42uL.mjs} +1 -1
- package/dist/{routeValidator-C_H5NanI.mjs → routeValidator-DclDl5WJ.mjs} +1 -1
- package/dist/{runtimeCapabilities-DWqbxkyw.mjs → runtimeCapabilities-ClWr60El.mjs} +1 -1
- package/dist/{schedules-eO_RzhCU.mjs → schedules-gVkRcs-9.mjs} +5 -5
- package/dist/{schemaConverter-DBJrPZN4.mjs → schemaConverter-CIwB5wPO.mjs} +2 -2
- package/dist/{schemaIR-CEScKT2v.mjs → schemaIR-A0IoD05P.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-B-Sm9m_E.mjs → scope-VMZhdkbT.mjs} +4 -4
- package/dist/{shutdown-DzLFbe27.mjs → shutdown-Bi19vH0z.mjs} +1 -1
- package/dist/{simpleEqualityMatcher-DOJhwQ8g.mjs → simpleEqualityMatcher-CaCS09fh.mjs} +1 -1
- package/dist/{sse-2972pVwV.mjs → sse-BqM359f1.mjs} +7 -7
- package/dist/{sseStream-AWLEeNV-.mjs → sseStream-qSa-F2Qm.mjs} +2 -2
- package/dist/{store-helpers-VzjgVTkM.mjs → store-helpers-rx-F2ZGR.mjs} +1 -1
- package/dist/{streaming-DvraWW6x.mjs → streaming-CPChx3A7.mjs} +1 -1
- package/dist/{subscriberIdentity-Bya56jsg.mjs → subscriberIdentity-CYNYw8p_.mjs} +1 -1
- package/dist/{tenancy-DSa_0hhw.mjs → tenancy-BoWImS3K.mjs} +2 -2
- package/dist/{tenantPreparation-BrpkQre3.mjs → tenantPreparation-oqKCZQZM.mjs} +4 -4
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +3 -3
- 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-6rQTuCwg.mjs → timing-Dsteq59c.mjs} +1 -1
- package/dist/{transactionContext-DaxYUEgH.mjs → transactionContext-C1OgH-hW.mjs} +1 -1
- package/dist/{typeGuards-UKnX8wPX.mjs → typeGuards-DNlpASzd.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-BYEb_dLW.d.mts → types-DduBiYaI.d.mts} +19 -30
- package/dist/{types-CuGjhn83.mjs → types-HFFSwF_K.mjs} +4 -4
- package/dist/usage/index.mjs +4 -4
- package/dist/{userHelpers-oX5_mOVs.mjs → userHelpers-N-k-8dNF.mjs} +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-CjjGOT4E.mjs → utils-C7w_RVlx.mjs} +5 -5
- package/dist/{validate-4RlTKOJb.mjs → validate-Brr4b_fH.mjs} +3 -3
- package/dist/{versioning-Dk2-19La.mjs → versioning-CE5kdWOY.mjs} +3 -3
- package/dist/{workScope-DoBsoVo4.mjs → workScope-A3XBpYTa.mjs} +2 -2
- package/package.json +47 -27
- 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/dist/plugins/index.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { m as MUTATION_OPERATIONS } from "../constants-
|
|
3
|
-
import { t as arcLog } from "../logger-
|
|
4
|
-
import { c as getOrgId } from "../types-
|
|
5
|
-
import { n as requestContext } from "../requestContext-
|
|
6
|
-
import { t as hasEvents } from "../typeGuards-
|
|
7
|
-
import { t as HookSystem } from "../HookSystem-
|
|
8
|
-
import { t as ResourceRegistry } from "../ResourceRegistry-
|
|
9
|
-
import { c as createRequestIdGenerator, l as requestId_default, n as health_default, u as sanitizeRequestId } from "../health-
|
|
10
|
-
import { t as caching_default } from "../caching-
|
|
11
|
-
import { i as createMemoryDailyLedger, r as createDailyGate, t as schedules_default } from "../schedules-
|
|
12
|
-
import { n as errorHandlerPlugin, t as defaultIsDuplicateKeyError } from "../errorHandler-
|
|
13
|
-
import { t as metrics_default } from "../metrics-
|
|
14
|
-
import { t as realtime_default } from "../realtime-
|
|
15
|
-
import { t as replyHelpersPlugin } from "../replyHelpers-
|
|
16
|
-
import { t as sse_default } from "../sse-
|
|
17
|
-
import { t as versioning_default } from "../versioning-
|
|
1
|
+
/*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
|
|
2
|
+
import { m as MUTATION_OPERATIONS } from "../constants-D-faL5SX.mjs";
|
|
3
|
+
import { t as arcLog } from "../logger-VyMcSmVG.mjs";
|
|
4
|
+
import { c as getOrgId } from "../types-HFFSwF_K.mjs";
|
|
5
|
+
import { n as requestContext } from "../requestContext-Ct5la-SA.mjs";
|
|
6
|
+
import { t as hasEvents } from "../typeGuards-DNlpASzd.mjs";
|
|
7
|
+
import { t as HookSystem } from "../HookSystem-B9x-Y_k7.mjs";
|
|
8
|
+
import { t as ResourceRegistry } from "../ResourceRegistry-BcvEJoZd.mjs";
|
|
9
|
+
import { c as createRequestIdGenerator, l as requestId_default, n as health_default, u as sanitizeRequestId } from "../health-ezwTHQh2.mjs";
|
|
10
|
+
import { t as caching_default } from "../caching-CJIDPZOv.mjs";
|
|
11
|
+
import { i as createMemoryDailyLedger, r as createDailyGate, t as schedules_default } from "../schedules-gVkRcs-9.mjs";
|
|
12
|
+
import { n as errorHandlerPlugin, t as defaultIsDuplicateKeyError } from "../errorHandler-3_3oN-Uc.mjs";
|
|
13
|
+
import { t as metrics_default } from "../metrics-DjVj1sg5.mjs";
|
|
14
|
+
import { t as realtime_default } from "../realtime-D2tqi3d2.mjs";
|
|
15
|
+
import { t as replyHelpersPlugin } from "../replyHelpers-BJFN5AW7.mjs";
|
|
16
|
+
import { t as sse_default } from "../sse-BqM359f1.mjs";
|
|
17
|
+
import { t as versioning_default } from "../versioning-CE5kdWOY.mjs";
|
|
18
18
|
import fp from "fastify-plugin";
|
|
19
19
|
import { performance as performance$1 } from "node:perf_hooks";
|
|
20
20
|
// src/core/arcCorePlugin.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
3
|
-
import { t as hasEvents } from "../typeGuards-
|
|
4
|
-
import { n as evictToSize, r as touch, t as assertCapacity } from "../boundedMap-
|
|
1
|
+
/*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-ClWr60El.mjs";
|
|
3
|
+
import { t as hasEvents } from "../typeGuards-DNlpASzd.mjs";
|
|
4
|
+
import { n as evictToSize, r as touch, t as assertCapacity } from "../boundedMap-o2KZDCWy.mjs";
|
|
5
5
|
import fp from "fastify-plugin";
|
|
6
6
|
// src/plugins/response-cache.ts
|
|
7
7
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
// src/plugins/tracing.ts
|
|
@@ -59,7 +59,7 @@ try {
|
|
|
59
59
|
function createTracerProvider(options) {
|
|
60
60
|
if (!isAvailable || !NodeTracerProvider || !BatchSpanProcessor || !OTLPTraceExporter) return null;
|
|
61
61
|
const { serviceName = "@classytic/arc", serviceVersion, exporterUrl = "http://localhost:4318/v1/traces" } = options;
|
|
62
|
-
const resolvedVersion = serviceVersion ?? "2.
|
|
62
|
+
const resolvedVersion = serviceVersion ?? "2.48.0";
|
|
63
63
|
const exporter = new OTLPTraceExporter({ url: exporterUrl });
|
|
64
64
|
const provider = new NodeTracerProvider({ resource: { attributes: {
|
|
65
65
|
"service.name": serviceName,
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
|
|
2
|
+
import { FastifyRequest } from "fastify";
|
|
3
|
+
/** Tags for one response: a fixed list, or computed from the request and the reply body. */
|
|
4
|
+
type TagSpec = readonly string[] | ((request: FastifyRequest, body: unknown) => readonly string[] | undefined);
|
|
5
|
+
/** How one route may be cached. Seconds throughout. */
|
|
6
|
+
interface HttpCachePolicy {
|
|
7
|
+
/** Shared-cache (CDN) TTL. Must be > 0. */
|
|
8
|
+
cdn: number;
|
|
9
|
+
/** Browser TTL. A browser copy cannot be purged, so keep it short. Default 0. */
|
|
10
|
+
browser?: number;
|
|
11
|
+
/** Serve a stale copy while one request refreshes it (RFC 5861). CDN only. */
|
|
12
|
+
staleWhileRevalidate?: number;
|
|
13
|
+
/** Serve the last good copy while the origin errors (RFC 5861). Browser and CDN. */
|
|
14
|
+
staleIfError?: number;
|
|
15
|
+
/** Purge tags carried by the response, in addition to any derived ones. */
|
|
16
|
+
tags?: TagSpec;
|
|
17
|
+
}
|
|
18
|
+
/** A path-prefix rule, for routes that cannot carry `config`. */
|
|
19
|
+
interface HttpCacheRule extends HttpCachePolicy {
|
|
20
|
+
/** Path prefix, matched against the URL path without its query string. */
|
|
21
|
+
match: string;
|
|
22
|
+
}
|
|
23
|
+
/** Extra tags for one document: added to the derived `<resource>` / `<resource>:<id>`. */
|
|
24
|
+
type DocumentTags = (doc: unknown) => readonly string[] | undefined;
|
|
25
|
+
/** `defineResource({ httpCache })`: one policy per read operation; tags and purges derived from the resource. */
|
|
26
|
+
interface ResourceHttpCacheConfig {
|
|
27
|
+
list?: HttpCachePolicy;
|
|
28
|
+
get?: HttpCachePolicy;
|
|
29
|
+
tags?: {
|
|
30
|
+
extra?: DocumentTags;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/** What arc puts in a CRUD route's `config.httpCache` for a resource that declared `httpCache`. */
|
|
34
|
+
interface RouteHttpCacheConfig extends HttpCachePolicy {
|
|
35
|
+
resource?: {
|
|
36
|
+
name: string;
|
|
37
|
+
op: "list" | "get";
|
|
38
|
+
extra?: DocumentTags;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
type PrivacyReason = `header:${string}` | `cookie:${string}` | `scope:${string}` | "classifier";
|
|
42
|
+
type PrivacyDecision = {
|
|
43
|
+
private: false;
|
|
44
|
+
} | {
|
|
45
|
+
private: true;
|
|
46
|
+
reason: PrivacyReason;
|
|
47
|
+
};
|
|
48
|
+
/** Why a response on an opted-in route was not made public. */
|
|
49
|
+
type NonCacheableReason = PrivacyReason | "status" | "set-cookie";
|
|
50
|
+
export { PrivacyDecision as a, RouteHttpCacheConfig as c, NonCacheableReason as i, TagSpec as l, HttpCachePolicy as n, PrivacyReason as o, HttpCacheRule as r, ResourceHttpCacheConfig as s, DocumentTags as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { i as RequestScope } from "../types-DnkIALZ8.mjs";
|
|
3
3
|
import { l as PermissionCheck } from "../base-HXNgPQww.mjs";
|
|
4
|
-
import { W as PresetResult } from "../index-
|
|
4
|
+
import { W as PresetResult } from "../index-Cy2-QffW.mjs";
|
|
5
5
|
import { a as StorageReadResult, i as StorageReadRange, n as StorageContext, o as StorageUploadInput, r as StorageFile, t as Storage } from "../storage-odC5MNKN.mjs";
|
|
6
6
|
export interface FilesUploadPresetRoutes {
|
|
7
7
|
upload?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { i as NotFoundError, u as ValidationError } from "../errors-
|
|
3
|
-
import { c as getOrgId, g as getUserId } from "../types-
|
|
4
|
-
import { B as requireAuth, F as allowPublic } from "../permissions-
|
|
5
|
-
import { t as multipartBody } from "../multipartBody-
|
|
1
|
+
/*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
|
|
2
|
+
import { i as NotFoundError, u as ValidationError } from "../errors-DyY48oRi.mjs";
|
|
3
|
+
import { c as getOrgId, g as getUserId } from "../types-HFFSwF_K.mjs";
|
|
4
|
+
import { B as requireAuth, F as allowPublic } from "../permissions-R9T2G1PH.mjs";
|
|
5
|
+
import { t as multipartBody } from "../multipartBody-BNgNv7r0.mjs";
|
|
6
6
|
// src/presets/filesUpload.ts
|
|
7
7
|
const DEFAULT_FIELD_NAME = "file";
|
|
8
8
|
const DEFAULT_MAX_FILE_SIZE = 10485760;
|
package/dist/presets/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { t as AnyRecord } from "../base-HXNgPQww.mjs";
|
|
3
|
-
import { Hn as IRequestContext, L as ResourceConfig, Vn as IControllerResponse, W as PresetResult, i as PaginationResult } from "../index-
|
|
3
|
+
import { Hn as IRequestContext, L as ResourceConfig, Vn as IControllerResponse, W as PresetResult, i as PaginationResult } from "../index-Cy2-QffW.mjs";
|
|
4
4
|
import { FilesUploadPresetOptions, FilesUploadPresetPermissions, FilesUploadPresetRoutes, filesUploadPreset } from "./filesUpload.mjs";
|
|
5
|
-
import { n as multiTenantPreset, r as TenantFieldSpec, t as MultiTenantOptions } from "../multiTenant-
|
|
5
|
+
import { n as multiTenantPreset, r as TenantFieldSpec, t as MultiTenantOptions } from "../multiTenant-KZj8j1uJ.mjs";
|
|
6
6
|
import { SearchHandler, SearchPresetOptions, SearchRouteConfig, searchPreset } from "./search.mjs";
|
|
7
7
|
interface AuditedPresetOptions {
|
|
8
8
|
/** Field name for creator (default: 'createdBy') */
|
package/dist/presets/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as treePreset, c as ownedByUserPreset, i as registerPreset, l as bulkPreset, n as getAvailablePresets, o as softDeletePreset, r as getPreset, s as slugLookupPreset, t as applyPresets, u as auditedPreset } from "../presets-
|
|
1
|
+
/*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as treePreset, c as ownedByUserPreset, i as registerPreset, l as bulkPreset, n as getAvailablePresets, o as softDeletePreset, r as getPreset, s as slugLookupPreset, t as applyPresets, u as auditedPreset } from "../presets-CNDvNYsz.mjs";
|
|
3
3
|
import { filesUploadPreset } from "./filesUpload.mjs";
|
|
4
4
|
import { multiTenantPreset } from "./multiTenant.mjs";
|
|
5
5
|
import { searchPreset } from "./search.mjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { n as multiTenantPreset, r as TenantFieldSpec, t as MultiTenantOptions } from "../multiTenant-
|
|
2
|
+
import { n as multiTenantPreset, r as TenantFieldSpec, t as MultiTenantOptions } from "../multiTenant-KZj8j1uJ.mjs";
|
|
3
3
|
export { MultiTenantOptions, type TenantFieldSpec, multiTenantPreset };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import "../constants-
|
|
3
|
-
import { t as ArcError } from "../errors-
|
|
4
|
-
import { u as getRequestScope } from "../types-
|
|
5
|
-
import { i as tagTenantPreparation, t as applyTenantPreparation } from "../tenantPreparation-
|
|
1
|
+
/*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
|
|
2
|
+
import "../constants-D-faL5SX.mjs";
|
|
3
|
+
import { t as ArcError } from "../errors-DyY48oRi.mjs";
|
|
4
|
+
import { u as getRequestScope } from "../types-HFFSwF_K.mjs";
|
|
5
|
+
import { i as tagTenantPreparation, t as applyTenantPreparation } from "../tenantPreparation-oqKCZQZM.mjs";
|
|
6
6
|
// src/presets/multiTenant.ts
|
|
7
7
|
function createTenantMiddleware(specs, mode) {
|
|
8
8
|
const preparation = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { l as PermissionCheck } from "../base-HXNgPQww.mjs";
|
|
3
|
-
import { Dt as RouteMcpConfig, Et as RouteDefinition, Ln as ControllerHandler, W as PresetResult } from "../index-
|
|
3
|
+
import { Dt as RouteMcpConfig, Et as RouteDefinition, Ln as ControllerHandler, W as PresetResult } from "../index-Cy2-QffW.mjs";
|
|
4
4
|
/**
|
|
5
5
|
* Search Preset — backend-agnostic search / vector / embed routes
|
|
6
6
|
*
|
package/dist/presets/search.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { B as requireAuth, F as allowPublic } from "../permissions-
|
|
1
|
+
/*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
|
|
2
|
+
import { B as requireAuth, F as allowPublic } from "../permissions-R9T2G1PH.mjs";
|
|
3
3
|
// src/presets/search.ts
|
|
4
4
|
const BUILTINS = [
|
|
5
5
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { l as UnauthorizedError } from "./errors-
|
|
3
|
-
import { b as isElevated, n as PUBLIC_SCOPE } from "./types-
|
|
4
|
-
import { B as requireAuth, F as allowPublic, U as requireRoles } from "./permissions-
|
|
1
|
+
/*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
|
|
2
|
+
import { l as UnauthorizedError } from "./errors-DyY48oRi.mjs";
|
|
3
|
+
import { b as isElevated, n as PUBLIC_SCOPE } from "./types-HFFSwF_K.mjs";
|
|
4
|
+
import { B as requireAuth, F as allowPublic, U as requireRoles } from "./permissions-R9T2G1PH.mjs";
|
|
5
5
|
import { multiTenantPreset } from "./presets/multiTenant.mjs";
|
|
6
6
|
// src/presets/audited.ts
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { c as getOrgId, f as getScopeContextMap, g as getUserId, m as getTeamId, x as isMember } from "./types-
|
|
1
|
+
/*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
|
|
2
|
+
import { c as getOrgId, f as getScopeContextMap, g as getUserId, m as getTeamId, x as isMember } from "./types-HFFSwF_K.mjs";
|
|
3
3
|
// src/scope/projection.ts
|
|
4
4
|
/**
|
|
5
5
|
* Compute the request-scope projection. Returns `undefined` when no
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
/** `hard` evicts; `soft` marks stale so the next visitor gets the old copy while one request refreshes it. */
|
|
3
|
+
type PurgeMode = "hard" | "soft";
|
|
4
|
+
interface PurgerCapabilities {
|
|
5
|
+
/** The vendor can mark content stale instead of evicting it. Absent: soft purges are sent hard. */
|
|
6
|
+
readonly softPurge?: boolean;
|
|
7
|
+
/** Tags per call. arc splits larger batches; each chunk is delivered (and retried) on its own. */
|
|
8
|
+
readonly maxTagsPerCall?: number;
|
|
9
|
+
}
|
|
10
|
+
/** Purges cached responses by tag. Throws on failure: arc logs, counts, and (durably) retries. */
|
|
11
|
+
interface CachePurger {
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly capabilities?: PurgerCapabilities;
|
|
14
|
+
purgeTags(tags: readonly string[], options: {
|
|
15
|
+
mode: PurgeMode;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
/** A purge the CDN refused or never answered: a closed code plus the provider's own codes, never a credential. */
|
|
19
|
+
declare class CachePurgeError extends Error {
|
|
20
|
+
readonly code = "http_cache.purge_failed";
|
|
21
|
+
readonly purger: string;
|
|
22
|
+
readonly status: number | undefined;
|
|
23
|
+
readonly providerCodes: readonly (number | string)[];
|
|
24
|
+
constructor(purger: string, message: string, status?: number, providerCodes?: readonly (number | string)[]);
|
|
25
|
+
}
|
|
26
|
+
export { PurgerCapabilities as i, CachePurger as n, PurgeMode as r, CachePurgeError as t };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
|
|
2
|
+
// src/http-cache/purgers/purger.types.ts
|
|
3
|
+
/** A purge the CDN refused or never answered: a closed code plus the provider's own codes, never a credential. */
|
|
4
|
+
var CachePurgeError = class extends Error {
|
|
5
|
+
code = "http_cache.purge_failed";
|
|
6
|
+
purger;
|
|
7
|
+
status;
|
|
8
|
+
providerCodes;
|
|
9
|
+
constructor(purger, message, status, providerCodes = []) {
|
|
10
|
+
super(message);
|
|
11
|
+
this.name = "CachePurgeError";
|
|
12
|
+
this.purger = purger;
|
|
13
|
+
this.status = status;
|
|
14
|
+
this.providerCodes = providerCodes;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
/** Split tags into calls of at most `size`. */
|
|
18
|
+
function chunkTags(tags, size) {
|
|
19
|
+
if (!size || size >= tags.length) return [[...tags]];
|
|
20
|
+
const out = [];
|
|
21
|
+
for (let i = 0; i < tags.length; i += size) out.push(tags.slice(i, i + size));
|
|
22
|
+
return out;
|
|
23
|
+
}
|
|
24
|
+
export { chunkTags as n, CachePurgeError as t };
|
|
@@ -1,9 +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 { n as declareRuntimeCapability } from "./runtimeCapabilities-
|
|
5
|
-
import { t as hasEvents } from "./typeGuards-
|
|
6
|
-
import { t as MemoryCacheStore } from "./memory-
|
|
1
|
+
/*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-BdTN42uL.mjs";
|
|
3
|
+
import { i as versionKey, r as tagVersionKey } from "./keys-CrMOZuk6.mjs";
|
|
4
|
+
import { n as declareRuntimeCapability } from "./runtimeCapabilities-ClWr60El.mjs";
|
|
5
|
+
import { t as hasEvents } from "./typeGuards-DNlpASzd.mjs";
|
|
6
|
+
import { t as MemoryCacheStore } from "./memory-Lpfu8Hga.mjs";
|
|
7
7
|
import fp from "fastify-plugin";
|
|
8
8
|
// src/cache/QueryCache.ts
|
|
9
9
|
const MISS = Object.freeze({
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { t as arcLog } from "./logger-
|
|
4
|
-
import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-
|
|
5
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
6
|
-
import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-
|
|
7
|
-
import { t as applyFieldReadPermissions } from "./fields-
|
|
8
|
-
import { a as promoteStreamTokenToHeader } from "./streaming-
|
|
9
|
-
import { n as evaluateAndApplyPermission } from "./authorizationDecision-
|
|
10
|
-
import { t as openSseStream } from "./sseStream-
|
|
11
|
-
import { n as arcRouteValidatorCompiler } from "./routeValidator-
|
|
1
|
+
/*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-BdTN42uL.mjs";
|
|
3
|
+
import { t as arcLog } from "./logger-VyMcSmVG.mjs";
|
|
4
|
+
import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-CaCS09fh.mjs";
|
|
5
|
+
import { n as getUserRoles } from "./userHelpers-N-k-8dNF.mjs";
|
|
6
|
+
import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-BoWImS3K.mjs";
|
|
7
|
+
import { t as applyFieldReadPermissions } from "./fields-rfsl26Ov.mjs";
|
|
8
|
+
import { a as promoteStreamTokenToHeader } from "./streaming-CPChx3A7.mjs";
|
|
9
|
+
import { n as evaluateAndApplyPermission } from "./authorizationDecision-BZSJcPNE.mjs";
|
|
10
|
+
import { t as openSseStream } from "./sseStream-qSa-F2Qm.mjs";
|
|
11
|
+
import { n as arcRouteValidatorCompiler } from "./routeValidator-DclDl5WJ.mjs";
|
|
12
12
|
import fp from "fastify-plugin";
|
|
13
13
|
// src/plugins/realtime.ts
|
|
14
14
|
var realtime_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { F as ResourceDefinition, G as CrudRouteKey, M as ResourceRegistry, N as RouteRow, S as IntrospectionPluginOptions, V as ResolvedTenantPurge, j as RegisterOptions, o as RegistryEntry } from "../index-
|
|
3
|
-
import "../fastify-augmentation-
|
|
2
|
+
import { F as ResourceDefinition, G as CrudRouteKey, M as ResourceRegistry, N as RouteRow, S as IntrospectionPluginOptions, V as ResolvedTenantPurge, j as RegisterOptions, o as RegistryEntry } from "../index-Cy2-QffW.mjs";
|
|
3
|
+
import "../fastify-augmentation-bzkWPt1f.mjs";
|
|
4
4
|
import { TenantPurgeProgress, TenantPurgeStrategy } from "@classytic/repo-core/repository";
|
|
5
5
|
import { FastifyPluginAsync } from "fastify";
|
|
6
6
|
interface AssertNoTenantDataOptions {
|
package/dist/registry/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as getCascadingResources, i as cascadeDeleteForOrganization, n as buildResourceManifestFromRegistry, o as getCascadingResourcesWithMetadata, r as introspectionPlugin_default, s as assertNoTenantData, t as buildResourceManifest } from "../registry-
|
|
3
|
-
import { t as ResourceRegistry } from "../ResourceRegistry-
|
|
1
|
+
/*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as getCascadingResources, i as cascadeDeleteForOrganization, n as buildResourceManifestFromRegistry, o as getCascadingResourcesWithMetadata, r as introspectionPlugin_default, s as assertNoTenantData, t as buildResourceManifest } from "../registry-Dl0k6UXy.mjs";
|
|
3
|
+
import { t as ResourceRegistry } from "../ResourceRegistry-BcvEJoZd.mjs";
|
|
4
4
|
export { ResourceRegistry, assertNoTenantData, buildResourceManifest, buildResourceManifestFromRegistry, cascadeDeleteForOrganization, getCascadingResources, getCascadingResourcesWithMetadata, introspectionPlugin_default as introspectionPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CRUD_OPERATIONS } from "./constants-
|
|
1
|
+
/*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "./constants-D-faL5SX.mjs";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
// src/registry/assertNoTenantData.ts
|
|
5
5
|
/**
|