@classytic/arc 2.52.0 → 2.53.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/README.md +2 -1
- package/dist/{EventTransport-DeNze_-C.mjs → EventTransport-B3jTKMQH.mjs} +2 -2
- package/dist/{HookSystem-DTffXM1X.mjs → HookSystem-DNwxV463.mjs} +2 -2
- package/dist/{ResourceRegistry-tlqXSZoK.mjs → ResourceRegistry-Ck7RFodL.mjs} +2 -2
- package/dist/{acquire-7JKEkKnN.mjs → acquire-DkLruwhL.mjs} +1 -1
- package/dist/audit/index.d.mts +1 -1
- package/dist/audit/index.mjs +4 -4
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.d.mts +1 -1
- package/dist/auth/index.mjs +7 -7
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/auth/social/index.mjs +1 -1
- package/dist/{authorizationDecision-DKmH4tZ-.mjs → authorizationDecision-gB5-bHDp.mjs} +5 -5
- package/dist/bootError-BT3z3cvX.mjs +38 -0
- package/dist/{boundedMap-zxGBpXX0.mjs → boundedMap-Ddw2yGb2.mjs} +1 -1
- package/dist/{buildHandler-ZDV6LRZ_.mjs → buildHandler-B8IDGmhD.mjs} +5 -5
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-DceUN9Xk.mjs → caching-BitJDAY0.mjs} +2 -2
- package/dist/{claimed-DsP5Hi_f.mjs → claimed-CM_-lFHX.mjs} +1 -1
- package/dist/cleanup/index.d.mts +2 -2
- package/dist/cleanup/index.mjs +4 -4
- package/dist/cli/commands/describe.d.mts +18 -1
- package/dist/cli/commands/describe.mjs +39 -7
- package/dist/cli/commands/docs.mjs +3 -3
- package/dist/cli/commands/doctor.d.mts +3 -1
- package/dist/cli/commands/doctor.mjs +135 -22
- 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-Ca2IQFy2.mjs → constants-D9EiaO5s.mjs} +1 -1
- package/dist/context/index.d.mts +5 -2
- 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-M18RhMqi.mjs → core-B_06Fcn0.mjs} +3 -3
- package/dist/{createActionRouter-zXlrwWVs.mjs → createActionRouter-DtxUXOCI.mjs} +5 -5
- package/dist/{createAggregationRouter-CN0Da9nC.mjs → createAggregationRouter-BMiKyDoW.mjs} +7 -7
- package/dist/{createApp-BC67ACu4.mjs → createApp-CEdGZtkP.mjs} +207 -44
- package/dist/{createMcpServer-CS2KOVP6.d.mts → createMcpServer-Bk3ls5jS.d.mts} +1 -1
- package/dist/{defineAggregation-DqAGb5oI.mjs → defineAggregation-DUsrGcsm.mjs} +1 -1
- package/dist/{defineResource-DC5UqkQv.mjs → defineResource-q8TsJpOm.mjs} +92 -36
- package/dist/deprecation-DX625dth.mjs +27 -0
- 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-DiXVg98q.mjs → elevation-NJ3908pJ.mjs} +5 -5
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-BUTm9P_f.mjs → errorHandler-Ke6PGvF7.mjs} +7 -4
- package/dist/{errors-DxpHZBlW.mjs → errors-Ukhmfmmx.mjs} +1 -1
- package/dist/{eventPlugin-BY38F6yK.d.mts → eventPlugin-BeJasppx.d.mts} +7 -18
- package/dist/{eventPlugin-ZsIQPRso.mjs → eventPlugin-DTKAgSvb.mjs} +10 -8
- package/dist/{eventTypes-D-pFtqT1.mjs → eventTypes-DpDQtyR6.mjs} +2 -2
- package/dist/events/index.d.mts +2 -2
- package/dist/events/index.mjs +8 -8
- package/dist/events/transports/redis-stream-entry.mjs +4 -4
- package/dist/events/transports/redis.mjs +2 -2
- package/dist/factory/index.d.mts +28 -5
- package/dist/factory/index.mjs +12 -7
- package/dist/{fastify-augmentation-CPReFhZ1.d.mts → fastify-augmentation-DjxuSRG4.d.mts} +4 -3
- package/dist/{fieldTypes-f-3TZgR3.mjs → fieldTypes-BtFpQO6I.mjs} +2 -2
- package/dist/{fields-kCbIDTjA.mjs → fields-B7fuROWK.mjs} +1 -1
- package/dist/{filter-merge-UJCgjbZR.mjs → filter-merge-BuzZ-r9z.mjs} +1 -1
- package/dist/{generate-CLpmzbJ_.mjs → generate-c4F39pk1.mjs} +4 -4
- package/dist/{headers-Bh47h0XH.mjs → headers-Ib7BDgRI.mjs} +2 -2
- package/dist/{health-CEpgVAl7.mjs → health-22T82HAa.mjs} +1 -1
- package/dist/health-skjSwNaC.d.mts +36 -0
- package/dist/hooks/index.d.mts +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.d.mts +7 -1
- package/dist/idempotency/index.mjs +9 -7
- package/dist/idempotency/redis.mjs +2 -2
- package/dist/{index-CMNpMBtW.d.mts → index-BzUyno-u.d.mts} +14 -5
- package/dist/{index-yXXCsKl7.d.mts → index-CXqYFGoH.d.mts} +13 -4
- package/dist/{index-CSbDhif4.d.mts → index-CaBFPmnu.d.mts} +10 -6
- package/dist/{index-DCH08eqQ.d.mts → index-DWn0o4U7.d.mts} +2 -2
- package/dist/{index-DLCcLUQT.d.mts → index-DtHACefu.d.mts} +109 -116
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +12 -12
- package/dist/{init-B43DXBpc.mjs → init-XY5slyuS.mjs} +3 -3
- 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 +9 -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 +1 -1
- package/dist/integrations/webhooks.mjs +4 -4
- package/dist/integrations/websocket-pushref-redis.mjs +1 -1
- package/dist/integrations/websocket-redis.mjs +1 -1
- package/dist/integrations/websocket.mjs +2 -2
- package/dist/invariants-COekUeoh.mjs +120 -0
- package/dist/{jsonBody-CkKs6dA_.mjs → jsonBody-BNlcGUnb.mjs} +2 -2
- package/dist/{keys-DHrHnT0f.mjs → keys-DwvXJwUX.mjs} +1 -1
- package/dist/{loadResources-CFdzAWQZ.mjs → loadResources-izEeQLO_.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-DkoSiJsI.mjs → loadResourcesFromEntry-CijqjbHE.mjs} +2 -2
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-DJwz_-Pl.mjs → logger-DdMS0XC_.mjs} +1 -1
- package/dist/{mcpPlugin-CA_MDFlS.mjs → mcpPlugin-D0tSZqKk.mjs} +24 -22
- package/dist/{memory-B9CFHbA_.mjs → memory-Ay0haw9n.mjs} +3 -3
- package/dist/{metrics-DSKv-T9K.mjs → metrics-Bpgf4UL6.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-C0JCsnO7.mjs → module-BLrTmMyk.mjs} +1 -1
- package/dist/{multiTenant-QtDzxx_K.d.mts → multiTenant-Cf0Ye-Wu.d.mts} +1 -1
- package/dist/{multipartBody-Bxz-q6hI.mjs → multipartBody-L2gr96df.mjs} +1 -1
- package/dist/{observeSend-DfNkdGww.mjs → observeSend-B7FEdk_g.mjs} +1 -1
- package/dist/{openapi-Dmp7Ipsi.mjs → openapi-COrL_33P.mjs} +6 -6
- package/dist/outbox-admin/index.d.mts +1 -1
- package/dist/outbox-admin/index.mjs +6 -6
- package/dist/{outbox-module-vT6PaThj.mjs → outbox-module-BY2HtnjU.mjs} +7 -7
- package/dist/{outbox-module-DzW6zwWJ.d.mts → outbox-module-C1QWMloZ.d.mts} +5 -8
- package/dist/permissions/index.d.mts +2 -2
- package/dist/permissions/index.mjs +8 -8
- package/dist/{permissions-Cga6KBOX.mjs → permissions-CEyeDHtT.mjs} +36 -17
- package/dist/{pipe-CqPweKdL.mjs → pipe-DIAr91at.mjs} +2 -2
- package/dist/pipeline/index.d.mts +1 -1
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-CbDTFbTj.mjs → plan-BhKHIkFl.mjs} +75 -20
- package/dist/{plugin-8Z1khbAI.mjs → plugin-D6hrdx-j.mjs} +72 -38
- package/dist/plugins/index.d.mts +4 -3
- package/dist/plugins/index.mjs +18 -18
- package/dist/plugins/response-cache.mjs +4 -4
- package/dist/plugins/tracing-entry.mjs +177 -85
- package/dist/{pluralize-D4vcPLVs.mjs → pluralize-CJKgYkVc.mjs} +1 -1
- package/dist/presetPermission-2pcRVYRG.mjs +23 -0
- package/dist/presets/filesUpload.d.mts +4 -2
- package/dist/presets/filesUpload.mjs +11 -6
- package/dist/presets/index.d.mts +6 -4
- 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 +2 -2
- package/dist/presets/search.mjs +54 -38
- package/dist/{presets-D28IABZe.mjs → presets-st11ePNn.mjs} +150 -41
- package/dist/{projection-aHCtDQQ9.mjs → projection-B4rqiJTi.mjs} +2 -2
- package/dist/{purger.types-CNFmEtFu.mjs → purger.types-BcHeAhY_.mjs} +1 -1
- package/dist/{queryCachePlugin-CwpEjCwz.mjs → queryCachePlugin-BgSc2bga.mjs} +6 -6
- package/dist/rateLimitKey-DLGdeFd2.mjs +138 -0
- package/dist/{realtime-Dvu8ES2z.mjs → realtime-CpYpIFsm.mjs} +11 -11
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-DmxbzW7-.mjs → registry-BQsdAlZ_.mjs} +2 -2
- package/dist/{relay-CEaCmUfG.mjs → relay-CmT3gtkP.mjs} +11 -12
- package/dist/{renewingLease-g2FjB3im.mjs → renewingLease-DaoP0K-e.mjs} +1 -1
- package/dist/{replyHelpers-CSByAX_Z.mjs → replyHelpers-SiLr1wK4.mjs} +2 -2
- package/dist/{requestContext-yc7MSgmq.mjs → requestContext-B-TjFpWt.mjs} +8 -3
- package/dist/{health-W4S2yFBL.mjs → requestId-ClcKoWLq.mjs} +154 -116
- package/dist/{requirement-Dm8njSoC.mjs → requirement-BygDzjDS.mjs} +1 -1
- package/dist/{resourceRateLimit-PQaY3HW1.mjs → resourceRateLimit-DdIYis3m.mjs} +2 -2
- package/dist/{rolldown-runtime-BBBkGgwA.mjs → rolldown-runtime-Cy6j0m8_.mjs} +1 -1
- package/dist/{routeValidator-fuG51bQA.mjs → routeValidator-Bn-x2gaJ.mjs} +1 -1
- package/dist/{runtimeCapabilities-B8IT7xiQ.mjs → runtimeCapabilities-DY20Pibh.mjs} +7 -2
- package/dist/{schedules-0-aS4jDV.mjs → schedules-CwqC0Mp0.mjs} +5 -5
- package/dist/{schemaConverter-Cs3SwP4R.mjs → schemaConverter-XoLKVpzG.mjs} +2 -2
- package/dist/{schemaIR-By8XiNeE.mjs → schemaIR-DP7mMj7c.mjs} +16 -16
- package/dist/schemas/index.mjs +1 -1
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.d.mts +6 -2
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-BWNAlBj0.mjs → scope-B0vgM2Zw.mjs} +4 -4
- package/dist/{shutdown-Cf-27xsS.mjs → shutdown-C76Hn-Th.mjs} +1 -1
- package/dist/{simpleEqualityMatcher-e-dgJcUO.mjs → simpleEqualityMatcher-Qbl-11cE.mjs} +1 -1
- package/dist/{sse-C3bj5qWi.mjs → sse-eyb8lNuI.mjs} +7 -7
- package/dist/{sseStream-BYZbpFDa.mjs → sseStream-BsBesrfw.mjs} +2 -2
- package/dist/{store-helpers-B9HierHY.mjs → store-helpers-D1yIVa91.mjs} +1 -1
- package/dist/{streaming-EN8NJWxr.mjs → streaming-DKziqs1Z.mjs} +1 -1
- package/dist/{subscriberIdentity-DSqCh38x.mjs → subscriberIdentity-DpdSQMQq.mjs} +1 -1
- package/dist/{tenancy-CAqjGQcQ.mjs → tenancy-YuRYsOPr.mjs} +2 -2
- package/dist/{tenantPreparation-CVBWarqs.mjs → tenantPreparation-Bk8ouRB3.mjs} +17 -5
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +4 -4
- package/dist/testing/index.mjs +11 -11
- package/dist/testing/outboxStoreContract.mjs +2 -2
- package/dist/testing/requiredPorts.d.mts +1 -1
- package/dist/testing/requiredPorts.mjs +2 -2
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{timing-CKI_Oyub.mjs → timing-BtIDIdQz.mjs} +1 -1
- package/dist/{transactionContext-D0UZFoSy.mjs → transactionContext-BsQ5ortM.mjs} +1 -1
- package/dist/{typeGuards-CLYkmBLT.mjs → typeGuards-Cr2_zEW0.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-BeEJm-DV.d.mts → types-CQhHTZXs.d.mts} +48 -35
- package/dist/{types-B4E0sc6D.d.mts → types-DWFgq8EP.d.mts} +1 -1
- package/dist/{types-Cunc4shv.mjs → types-ZvdR7MVa.mjs} +4 -4
- package/dist/usage/index.mjs +4 -4
- package/dist/{userHelpers-cT5j1kgp.mjs → userHelpers-CwpEK36a.mjs} +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-DlNkm1dI.mjs → utils-CnrfcYMq.mjs} +6 -6
- package/dist/{validate-63QThRoS.mjs → validate-BTQBh-Dr.mjs} +3 -3
- package/dist/{versioning-f2YGmh4i.mjs → versioning-DiLykI6U.mjs} +3 -3
- package/dist/{workScope-DwspXz70.mjs → workScope-C3tPz_Gt.mjs} +2 -2
- package/package.json +34 -9
- package/skills/arc/SKILL.md +5 -5
- package/skills/arc/references/api-reference.md +1 -1
- package/skills/arc/references/boot.md +17 -2
- package/skills/arc/references/events.md +0 -1
- package/skills/arc/references/mcp-setup.md +3 -2
- package/skills/arc/references/multi-tenancy.md +1 -1
- package/skills/arc/references/production-api.md +19 -12
- package/skills/arc/references/production-audit.md +1 -1
- package/skills/arc/references/production-boot.md +3 -3
- package/skills/arc/references/production-idempotency.md +2 -2
- package/skills/arc/references/production-observability.md +14 -2
- package/skills/arc/references/production-reliability.md +1 -1
- package/skills/arc/references/querying.md +1 -2
- package/skills/arc/references/resources.md +8 -6
- package/skills/arc/references/testing.md +1 -1
- package/skills/arc-code-review/references/arc-cheatsheet.md +1 -1
- package/skills/arc-code-review/references/recipe-scope-permissions.md +1 -1
- package/skills/arc-module-publishing/references/resource-assembly.md +2 -2
- package/dist/rateLimitKey-D9dl3FQn.mjs +0 -40
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import { M as ResourceRegistry,
|
|
2
|
+
import { M as ResourceRegistry, mn as HookSystem } from "./index-DtHACefu.mjs";
|
|
3
|
+
import { t as HealthCheck } from "./health-skjSwNaC.mjs";
|
|
3
4
|
import { t as ExternalOpenApiPaths } from "./externalPaths-BOqdq5wr.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { l as ModuleState, z as ModuleGraph } from "./index-
|
|
5
|
+
import { i as ArcModuleRegistry, n as ArcModule, w as ScheduleDefinition } from "./types-CQhHTZXs.mjs";
|
|
6
|
+
import { l as ModuleState, z as ModuleGraph } from "./index-CaBFPmnu.mjs";
|
|
6
7
|
import { FastifyPluginAsync } from "fastify";
|
|
7
8
|
/**
|
|
8
9
|
* Resolved module introspection — what a module ACTUALLY composed to.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Cy6j0m8_.mjs";
|
|
3
3
|
// src/core/aggregation/fieldTypes.ts
|
|
4
4
|
var fieldTypes_exports = /* @__PURE__ */ __exportAll({
|
|
5
5
|
coerceByType: () => coerceByType,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as pluralize } from "./pluralize-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as pluralize } from "./pluralize-CJKgYkVc.mjs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
5
|
// src/cli/commands/generate/name-helpers.ts
|
|
@@ -374,7 +374,7 @@ const ${camel}Resource = defineResource${ts ? `<I${name}>` : ""}({
|
|
|
374
374
|
|
|
375
375
|
// 2.16 — declarative CRUD allow-list (positive form). Uncomment to
|
|
376
376
|
// restrict the surface; a future arc CRUD op won't silently leak in
|
|
377
|
-
// because every op is opt-in.
|
|
377
|
+
// because every op is opt-in.
|
|
378
378
|
// crud: { list: true, get: true },
|
|
379
379
|
|
|
380
380
|
permissions: {
|
|
@@ -425,7 +425,7 @@ const ${camel}Resource = defineResource${ts ? `<I${name}>` : ""}({
|
|
|
425
425
|
|
|
426
426
|
// 2.16 — declarative CRUD allow-list (positive form). Uncomment to
|
|
427
427
|
// restrict the surface; a future arc CRUD op won't silently leak in
|
|
428
|
-
// because every op is opt-in.
|
|
428
|
+
// because every op is opt-in.
|
|
429
429
|
// crud: { list: true, get: true },
|
|
430
430
|
|
|
431
431
|
permissions: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { u as ValidationError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { u as ValidationError } from "./errors-Ukhmfmmx.mjs";
|
|
3
3
|
// src/utils/headers.ts
|
|
4
4
|
/**
|
|
5
5
|
* Canonical header typing + accessor.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
import { FastifyPluginAsync } from "fastify";
|
|
3
|
+
interface HealthCheck {
|
|
4
|
+
/** Name of the dependency */
|
|
5
|
+
name: string;
|
|
6
|
+
/**
|
|
7
|
+
* Function that returns true if healthy, false otherwise.
|
|
8
|
+
*
|
|
9
|
+
* Receives an `AbortSignal` aborted when the check's timeout elapses —
|
|
10
|
+
* pass it to fetch/driver calls so a stalled dependency probe actually
|
|
11
|
+
* STOPS instead of accumulating an abandoned operation per readiness
|
|
12
|
+
* poll. Ignoring the parameter is fine (back-compat): the timeout still
|
|
13
|
+
* bounds how long the PROBE waits, just not the underlying work.
|
|
14
|
+
*/
|
|
15
|
+
check: (signal?: AbortSignal) => Promise<boolean> | boolean;
|
|
16
|
+
/** Optional timeout in ms (default: 5000) */
|
|
17
|
+
timeout?: number;
|
|
18
|
+
/** Whether this check is critical for readiness (default: true) */
|
|
19
|
+
critical?: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface HealthOptions {
|
|
22
|
+
/** Route prefix (default: '/_health') */
|
|
23
|
+
prefix?: string;
|
|
24
|
+
/** Health check dependencies */
|
|
25
|
+
checks?: readonly HealthCheck[];
|
|
26
|
+
/** Enable metrics endpoint (default: false) */
|
|
27
|
+
metrics?: boolean;
|
|
28
|
+
/** Custom metrics collector function */
|
|
29
|
+
metricsCollector?: () => Promise<string> | string;
|
|
30
|
+
/** Version info to include in responses */
|
|
31
|
+
version?: string;
|
|
32
|
+
/** Collect HTTP request metrics (default: true if metrics enabled) */
|
|
33
|
+
collectHttpMetrics?: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare const _default: FastifyPluginAsync<HealthOptions>;
|
|
36
|
+
export { HealthOptions as n, _default as r, HealthCheck as t };
|
package/dist/hooks/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { Cn as defineHook, Sn as createHookSystem, _n as afterDelete, bn as beforeDelete, cn as DefineHookOptions, dn as HookOperation, fn as HookPhase, gn as afterCreate, hn as HookSystemOptions, ln as HookContext, mn as HookSystem, pn as HookRegistration, sn as AroundHookHandler, un as HookHandler, vn as afterUpdate, xn as beforeUpdate, yn as beforeCreate } from "../index-DtHACefu.mjs";
|
|
3
3
|
export { type AroundHookHandler, type DefineHookOptions, type HookContext, type HookHandler, type HookOperation, type HookPhase, type HookRegistration, HookSystem, type HookSystemOptions, afterCreate, afterDelete, afterUpdate, beforeCreate, beforeDelete, beforeUpdate, createHookSystem, defineHook };
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
export { t as HookSystem, n as afterCreate, r as afterDelete, i as afterUpdate, a as beforeCreate, o as beforeDelete, s as beforeUpdate, c as createHookSystem, l as defineHook } from "../HookSystem-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
export { t as HookSystem, n as afterCreate, r as afterDelete, i as afterUpdate, a as beforeCreate, o as beforeDelete, s as beforeUpdate, c as createHookSystem, l as defineHook } from "../HookSystem-DNwxV463.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as chunkTags, t as CachePurgeError } from "../purger.types-
|
|
3
|
-
import { t as hasEvents } from "../typeGuards-
|
|
4
|
-
import { r as exponentialBackoff, t as EventOutbox } from "../relay-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as chunkTags, t as CachePurgeError } from "../purger.types-BcHeAhY_.mjs";
|
|
3
|
+
import { t as hasEvents } from "../typeGuards-Cr2_zEW0.mjs";
|
|
4
|
+
import { r as exponentialBackoff, t as EventOutbox } from "../relay-CmT3gtkP.mjs";
|
|
5
5
|
import fp from "fastify-plugin";
|
|
6
6
|
import { createEvent } from "@classytic/primitives/events";
|
|
7
7
|
// src/http-cache/invalidation/delivery.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CachePurgeError } from "../../purger.types-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CachePurgeError } from "../../purger.types-BcHeAhY_.mjs";
|
|
3
3
|
// src/http-cache/purgers/cloudflare.ts
|
|
4
4
|
/**
|
|
5
5
|
* Cloudflare purge-by-tag (`Cache-Tag`). Needs an API token scoped to Zone > Cache Purge only.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CachePurgeError } from "../../purger.types-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CachePurgeError } from "../../purger.types-BcHeAhY_.mjs";
|
|
3
3
|
// src/http-cache/purgers/fastly.ts
|
|
4
4
|
/**
|
|
5
5
|
* Fastly surrogate-key purge, with soft purge (`Fastly-Soft-Purge: 1`). Responses must carry the tags in
|
|
@@ -67,7 +67,13 @@ interface IdempotencyPluginOptions {
|
|
|
67
67
|
* remain as the runtime backstop.
|
|
68
68
|
*/
|
|
69
69
|
selfCheck?: boolean;
|
|
70
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Migration escape for legacy custom stores without atomic completion fencing.
|
|
72
|
+
*
|
|
73
|
+
* @deprecated Implement `setIfLocked` (atomic fenced completion) on the custom
|
|
74
|
+
* store; the built-in stores already do. Warns once per process; removed in
|
|
75
|
+
* the next minor.
|
|
76
|
+
*/
|
|
71
77
|
allowUnfencedCompletion?: boolean;
|
|
72
78
|
}
|
|
73
79
|
declare module "fastify" {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
import { n as
|
|
6
|
-
import { n as
|
|
7
|
-
import {
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as warnDeprecated } from "../deprecation-DX625dth.mjs";
|
|
3
|
+
import { d as createDomainError } from "../errors-Ukhmfmmx.mjs";
|
|
4
|
+
import { n as requireSingleHeaderValue } from "../headers-Ib7BDgRI.mjs";
|
|
5
|
+
import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "../timing-BtIDIdQz.mjs";
|
|
6
|
+
import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "../acquire-DkLruwhL.mjs";
|
|
7
|
+
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-D1yIVa91.mjs";
|
|
8
|
+
import { i as requestRequiresIdempotencyKey, n as idempotencyConfigProblem, r as requestDedupedByHandler, t as declaresIdempotencyFence } from "../requirement-BygDzjDS.mjs";
|
|
8
9
|
import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
|
|
9
10
|
import { and, eq, exists, gt, lt, or, startsWith } from "@classytic/repo-core/filter";
|
|
10
11
|
import { createHash } from "node:crypto";
|
|
@@ -413,6 +414,7 @@ const idempotencyPlugin = async (fastify, opts = {}) => {
|
|
|
413
414
|
* (host-owned) is never touched.
|
|
414
415
|
*/
|
|
415
416
|
const ownsStore = !explicitStore;
|
|
417
|
+
if (opts.allowUnfencedCompletion !== void 0) warnDeprecated("The idempotencyPlugin `allowUnfencedCompletion` option", "Implement atomic `setIfLocked` completion fencing on the custom store.");
|
|
416
418
|
if (enabled && (typeof store.setIfLocked !== "function" || store.supportsFencedCompletion === false)) {
|
|
417
419
|
if (!opts.allowUnfencedCompletion) throw new Error("[arc idempotency] Store must implement atomic setIfLocked completion fencing. Upgrade the store or explicitly allowUnfencedCompletion during migration.");
|
|
418
420
|
fastify.log.warn("Idempotency completion is unfenced: an expired request can overwrite another owner's response. Upgrade the custom store's setIfLocked implementation.");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as acquireBySteps } from "../acquire-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as acquireBySteps } from "../acquire-DkLruwhL.mjs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
// src/idempotency/stores/redis.ts
|
|
5
5
|
/**
|
|
@@ -360,9 +360,10 @@ declare function requireRoles(roles: readonly string[], options?: {
|
|
|
360
360
|
*/
|
|
361
361
|
declare function requirePlatformRole(...args: string[] | [readonly string[]]): PermissionCheck;
|
|
362
362
|
/**
|
|
363
|
-
* Short-form alias of `requireRoles()
|
|
364
|
-
*
|
|
365
|
-
*
|
|
363
|
+
* Short-form alias of `requireRoles()` — checks platform AND org roles.
|
|
364
|
+
*
|
|
365
|
+
* @deprecated Use `requireRoles(...)`. Warns once per process; removed in the
|
|
366
|
+
* next minor.
|
|
366
367
|
*/
|
|
367
368
|
declare function roles(...args: string[] | [readonly string[]]): PermissionCheck;
|
|
368
369
|
/**
|
|
@@ -1046,7 +1047,7 @@ declare function fullPublic<TDoc = Record<string, unknown>>(overrides?: Permissi
|
|
|
1046
1047
|
* Writes carry an explicit `denyAll` check — an omitted CRUD permission
|
|
1047
1048
|
* mounts the route with NO gate (public-by-omission), so leaving
|
|
1048
1049
|
* create/update/delete undefined here would expose unauthenticated writes.
|
|
1049
|
-
* Hosts that disable write routes entirely (`
|
|
1050
|
+
* Hosts that disable write routes entirely (`crud: { list: true, get: true }`) are unaffected.
|
|
1050
1051
|
*/
|
|
1051
1052
|
declare function readOnly<TDoc = Record<string, unknown>>(overrides?: PermissionOverrides<TDoc>): ResourcePermissions<TDoc>;
|
|
1052
1053
|
/**
|
|
@@ -1136,4 +1137,12 @@ declare function introspectModule(mod: Record<string, unknown>): Record<string,
|
|
|
1136
1137
|
/** Every live resource's ACTUAL gates, keyed by arc resource name. */
|
|
1137
1138
|
declare function introspectRegistry(registry: PermissionMatrixRegistry): Record<string, Record<string, PermissionEntry>>;
|
|
1138
1139
|
declare function buildPermissionMatrix(options?: PermissionMatrixOptions): PermissionMatrix;
|
|
1139
|
-
|
|
1140
|
+
/**
|
|
1141
|
+
* Namespace alias for the preset bundles.
|
|
1142
|
+
*
|
|
1143
|
+
* @deprecated Import the preset itself: `import { publicRead } from
|
|
1144
|
+
* '@classytic/arc/permissions'` then `permissions: publicRead()`. Warns once per
|
|
1145
|
+
* process; removed in the next minor.
|
|
1146
|
+
*/
|
|
1147
|
+
declare const permissions: typeof presets_d_exports;
|
|
1148
|
+
export { deny as $, GrantResolution as A, explainAccess as B, requireScopeContext as C, createRoleHierarchy as D, RoleHierarchy as E, AccessExplanation as F, createDynamicPermissionMatrix as G, DynamicPermissionMatrix as H, PermissionRequirement as I, PublicPolicy as J, createOrgPermissions as K, collectPublicSurface as L, modeSatisfies as M, requireGrant as N, GRANT_MODES as O, conjoinPolicyFilters as P, anyOf as Q, describePermission as R, requireOrgRole as S, requireTeamMembership as T, DynamicPermissionMatrixConfig as U, ConnectEventsOptions as V, PermissionEventBus as W, allow as X, allOf as Y, allowPublic as Z, publicRead as _, requireMandate as _t, PermissionMatrixOptions as a, requireRoles as at, requireOrgInScope as b, introspectCheck as c, scopeOf as ct, PermissionOverrides as d, evaluatePermissionDecision as dt, denyAll as et, adminOnly as f, normalizeToDecision as ft, permissionMatrix as g, requireDPoP as gt, ownerWithAdminBypass as h, requireAgentScope as ht, PermissionMatrix as i, requirePlatformRole as it, RequireGrantOptions as j, GrantMode as k, introspectModule as l, PermissionCheckReturn as lt, fullPublic as m, RequireMandateOptions as mt, PermissionEntry as n, requireAuth as nt, PermissionMatrixRegistry as o, roles as ot, authenticated as p, RequireAgentScopeOptions as pt, AllowPublicOptions as q, PermissionEntryType as r, requireOwnership as rt, buildPermissionMatrix as s, when as st, permissions as t, not as tt, introspectRegistry as u, applyAuthorizationDecision as ut, publicReadAdminWrite as v, requireServiceScope as w, requireOrgMembership as x, readOnly as y, describePermissionMap as z };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { n as HealthOptions } from "./health-skjSwNaC.mjs";
|
|
3
3
|
import { a as MetricsOptions, c as RealtimeOptions, f as CachingOptions, h as GracefulShutdownOptions, t as VersioningOptions, u as SSEOptions } from "./versioning-B07RgD27.mjs";
|
|
4
|
-
import { t as EventPluginOptions } from "./eventPlugin-
|
|
4
|
+
import { t as EventPluginOptions } from "./eventPlugin-BeJasppx.mjs";
|
|
5
|
+
import { D as SchedulesPluginOptions, b as ResourceLike, o as ArcPorts, r as ArcModuleInput } from "./types-CQhHTZXs.mjs";
|
|
5
6
|
import { r as QueryCachePluginOptions } from "./queryCachePlugin-DrQNnGws.mjs";
|
|
6
7
|
import { t as ErrorHandlerOptions } from "./errorHandler-B9r88jZV.mjs";
|
|
7
|
-
import { W as ModuleGraphOptions } from "./index-
|
|
8
|
+
import { W as ModuleGraphOptions } from "./index-CaBFPmnu.mjs";
|
|
8
9
|
import { r as CacheStore } from "./interface-WR1U0K7t.mjs";
|
|
9
10
|
import { a as EventTransport } from "./EventTransport-CYEoCJGe.mjs";
|
|
10
11
|
import { i as IdempotencyStore } from "./interface-BmExzQRD.mjs";
|
|
11
12
|
import { n as ElevationOptions } from "./elevation-DPD0hcU-.mjs";
|
|
12
13
|
import { t as ExternalOpenApiPaths } from "./externalPaths-BOqdq5wr.mjs";
|
|
13
|
-
import {
|
|
14
|
+
import { Ft as Authenticator } from "./index-DtHACefu.mjs";
|
|
14
15
|
import { FastifyInstance, FastifyPluginAsync, FastifyReply, FastifyRequest, FastifyServerOptions } from "fastify";
|
|
15
16
|
import { ServerOptions } from "node:http";
|
|
16
17
|
/**
|
|
@@ -349,6 +350,14 @@ type RateLimitOpts = Record<string, unknown> & {
|
|
|
349
350
|
* of user traffic — session heartbeat, webhooks, health probes.
|
|
350
351
|
*/
|
|
351
352
|
skipPaths?: string[];
|
|
353
|
+
/**
|
|
354
|
+
* Early per-IP ceiling that rides alongside arc's DEFAULT key (per signed-in user, per
|
|
355
|
+
* IP when anonymous, at `preHandler`). Counted at `onRequest`, before auth and body
|
|
356
|
+
* parsing, so floods and unmatched routes are still bounded. Default
|
|
357
|
+
* `max(2000, 20 × max)` per `timeWindow`. A number sets it; `false` drops it. Ignored
|
|
358
|
+
* when the host supplies `keyGenerator` or `plan` (no ceiling is added then).
|
|
359
|
+
*/
|
|
360
|
+
ipCeiling?: number | false;
|
|
352
361
|
/**
|
|
353
362
|
* Plan-aware limits (2.22) — resolve the caller's plan per request and
|
|
354
363
|
* apply that plan's ceiling instead of the global `max`:
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { d as ModuleFacts, g as PortName, i as ArcModuleRegistry, n as ArcModule, o as ArcPorts, p as ModuleName, r as ArcModuleInput, u as ModuleContribution, v as ModuleSetupContext } from "./types-CQhHTZXs.mjs";
|
|
3
|
+
import "./health-skjSwNaC.mjs";
|
|
4
|
+
import { F as ResourceDefinition } from "./index-DtHACefu.mjs";
|
|
4
5
|
import { FastifyInstance } from "fastify";
|
|
5
6
|
type ModuleKind = "domain" | "bridge" | "platform" | "aggregator";
|
|
6
7
|
/** How strictly the event graph is checked at boot. */
|
|
@@ -243,6 +244,8 @@ interface CompositionProblem {
|
|
|
243
244
|
/** The missing module or port, or the duplicated name. */
|
|
244
245
|
readonly target: string;
|
|
245
246
|
readonly message: string;
|
|
247
|
+
/** One line: what to change. */
|
|
248
|
+
readonly fix: string;
|
|
246
249
|
}
|
|
247
250
|
/**
|
|
248
251
|
* Every problem in an ACTIVE module list (bridges already activated): duplicate names,
|
|
@@ -250,7 +253,7 @@ interface CompositionProblem {
|
|
|
250
253
|
* `orderModules`' to report, with their path.
|
|
251
254
|
*/
|
|
252
255
|
declare function compositionProblems(modules: readonly Pick<ArcModule, "name" | "dependsOn" | "requires">[], ports?: ArcPorts): CompositionProblem[];
|
|
253
|
-
/** Throw ONE
|
|
256
|
+
/** Throw ONE `ArcBootError` listing every composition problem, or return. */
|
|
254
257
|
declare function assertComposable(modules: readonly Pick<ArcModule, "name" | "dependsOn" | "requires">[], ports?: ArcPorts): void;
|
|
255
258
|
/** What `createApp` would compose — without booting anything or loading a lazy bridge. */
|
|
256
259
|
interface ModulePlan {
|
|
@@ -266,8 +269,9 @@ interface PlanModulesOptions {
|
|
|
266
269
|
readonly ports?: ArcPorts;
|
|
267
270
|
}
|
|
268
271
|
/**
|
|
269
|
-
* Dry-run a composition: resolve inputs, activate bridges, order, check requirements
|
|
270
|
-
* functions `createApp` calls, so the plan fails where boot would and
|
|
272
|
+
* Dry-run a composition: resolve inputs, activate bridges, order, check requirements and module
|
|
273
|
+
* invariants — the same functions `createApp` calls, so the plan fails where boot would and
|
|
274
|
+
* orders as boot would.
|
|
271
275
|
*
|
|
272
276
|
* Thunks ARE invoked (their result is the module); a `LazyBridge` is decided on its declaration
|
|
273
277
|
* and never loaded.
|
|
@@ -368,7 +372,7 @@ declare function getModuleResources(fastify: FastifyInstance, name: string): Res
|
|
|
368
372
|
* });
|
|
369
373
|
* ```
|
|
370
374
|
*/
|
|
371
|
-
declare function defineModule<TExports = unknown, const TPorts extends PortName = never, const TOptionalPorts extends PortName = never>(module: ArcModule<TExports, TPorts, TOptionalPorts>): ArcModule<TExports, TPorts, TOptionalPorts>;
|
|
375
|
+
declare function defineModule<TExports = unknown, const TPorts extends PortName = never, const TOptionalPorts extends PortName = never, TFacts extends ModuleFacts = ModuleFacts>(module: ArcModule<TExports, TPorts, TOptionalPorts, TFacts>): ArcModule<TExports, TPorts, TOptionalPorts, TFacts>;
|
|
372
376
|
/**
|
|
373
377
|
* Typed accessor for a module's public export (its `bootstrap` return value),
|
|
374
378
|
* recorded at `fastify.arc.modules[name]`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import "./fastify-augmentation-
|
|
3
|
-
import { A as RequestWithExtras, F as ResourceDefinition, I as CrudController, L as ResourceConfig, O as FastifyWithDecorators,
|
|
2
|
+
import "./fastify-augmentation-DjxuSRG4.mjs";
|
|
3
|
+
import { A as RequestWithExtras, At as RouteMcpConfig, F as ResourceDefinition, Gn as IRequestContext, I as CrudController, L as ResourceConfig, O as FastifyWithDecorators, Q as ArcFieldRule, Tt as ActionDefinition, Wn as IControllerResponse, Z as RouteSchemaOptions, g as RequestContext, k as MiddlewareHandler, st as AggregationConfig, v as CrudRouterOptions } from "./index-DtHACefu.mjs";
|
|
4
4
|
import { l as PermissionCheck, t as AnyRecord } from "./base-HXNgPQww.mjs";
|
|
5
5
|
import { i as RequestScope } from "./types-DnkIALZ8.mjs";
|
|
6
6
|
import { Filter } from "@classytic/repo-core/filter";
|