@classytic/arc 2.51.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-K7Q9WPjm.mjs → EventTransport-B3jTKMQH.mjs} +2 -2
- package/dist/{HookSystem-DBAu9uNT.mjs → HookSystem-DNwxV463.mjs} +2 -2
- package/dist/{ResourceRegistry-BelzCRMy.mjs → ResourceRegistry-Ck7RFodL.mjs} +2 -2
- package/dist/{acquire-B0zhfGSm.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-Dxj_cy6N.mjs → authorizationDecision-gB5-bHDp.mjs} +9 -7
- package/dist/bootError-BT3z3cvX.mjs +38 -0
- package/dist/{boundedMap-DOBai-H3.mjs → boundedMap-Ddw2yGb2.mjs} +1 -1
- package/dist/{buildHandler-Dyl8P9j0.mjs → buildHandler-B8IDGmhD.mjs} +5 -5
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-CUmaNL8Y.mjs → caching-BitJDAY0.mjs} +2 -2
- package/dist/{claimed-DJPk4VZr.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-DH41jnNT.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-DPmRWlpx.mjs → core-B_06Fcn0.mjs} +3 -3
- package/dist/{createActionRouter-B1xhER6i.mjs → createActionRouter-DtxUXOCI.mjs} +5 -5
- package/dist/{createAggregationRouter-CNntJL-z.mjs → createAggregationRouter-BMiKyDoW.mjs} +7 -7
- package/dist/{createApp-DpG26bCu.mjs → createApp-CEdGZtkP.mjs} +207 -44
- package/dist/{createMcpServer-CS2KOVP6.d.mts → createMcpServer-Bk3ls5jS.d.mts} +1 -1
- package/dist/{defineAggregation-rI3EbZUg.mjs → defineAggregation-DUsrGcsm.mjs} +1 -1
- package/dist/{defineResource-5DcG_wlI.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-XFu7J3aj.mjs → elevation-NJ3908pJ.mjs} +5 -5
- package/dist/encryption/index.d.mts +26 -1
- package/dist/encryption/index.mjs +56 -6
- package/dist/{errorHandler-xDVUWOMu.mjs → errorHandler-Ke6PGvF7.mjs} +7 -4
- package/dist/{errors-KBZ3tQk5.mjs → errors-Ukhmfmmx.mjs} +1 -1
- package/dist/{eventPlugin-BY38F6yK.d.mts → eventPlugin-BeJasppx.d.mts} +7 -18
- package/dist/{eventPlugin-C4lNj2Dw.mjs → eventPlugin-DTKAgSvb.mjs} +10 -8
- package/dist/{eventTypes-DZRoUAdk.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-baQc3MaO.d.mts → fastify-augmentation-DjxuSRG4.d.mts} +4 -3
- package/dist/{fieldTypes-DrXUW1jc.mjs → fieldTypes-BtFpQO6I.mjs} +2 -2
- package/dist/{fields-C5J8WTd2.mjs → fields-B7fuROWK.mjs} +1 -1
- package/dist/{filter-merge-DTjYoDrj.mjs → filter-merge-BuzZ-r9z.mjs} +1 -1
- package/dist/{generate-SA8oMlLB.mjs → generate-c4F39pk1.mjs} +4 -4
- package/dist/{headers-D5wrBLOk.mjs → headers-Ib7BDgRI.mjs} +2 -2
- package/dist/{health-BLal039H.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-Dhrks-hM.d.mts → index-CXqYFGoH.d.mts} +13 -4
- package/dist/{index-DexdFs1a.d.mts → index-CaBFPmnu.d.mts} +29 -7
- package/dist/{index-DKM2p5w5.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-DeKHaNZn.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-rDPGT5A9.mjs → jsonBody-BNlcGUnb.mjs} +2 -2
- package/dist/{keys-t7i-lJ2r.mjs → keys-DwvXJwUX.mjs} +1 -1
- package/dist/{loadResources-CcupAVJH.mjs → loadResources-izEeQLO_.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-BpjYlaoj.mjs → loadResourcesFromEntry-CijqjbHE.mjs} +2 -2
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-IL7Btm-N.mjs → logger-DdMS0XC_.mjs} +1 -1
- package/dist/{mcpPlugin-BsdH7Vot.mjs → mcpPlugin-D0tSZqKk.mjs} +24 -22
- package/dist/{memory-Dkp6ZD3F.mjs → memory-Ay0haw9n.mjs} +3 -3
- package/dist/{metrics-CDPqgdKr.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-KFxT1Iuk.mjs → module-BLrTmMyk.mjs} +17 -2
- package/dist/{multiTenant-QtDzxx_K.d.mts → multiTenant-Cf0Ye-Wu.d.mts} +1 -1
- package/dist/{multipartBody-BHktuarE.mjs → multipartBody-L2gr96df.mjs} +1 -1
- package/dist/{observeSend-CY-sLanc.mjs → observeSend-B7FEdk_g.mjs} +1 -1
- package/dist/{openapi-DbeXiy2v.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-BWqkTE8-.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-e5YMrFbm.mjs → permissions-CEyeDHtT.mjs} +36 -17
- package/dist/{pipe-CMnKfdF4.mjs → pipe-DIAr91at.mjs} +2 -2
- package/dist/pipeline/index.d.mts +1 -1
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-BvLJGm3U.mjs → plan-BhKHIkFl.mjs} +75 -20
- package/dist/{plugin-DYmu8uT4.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-ClwfBdIx.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-DX_lPabi.mjs → presets-st11ePNn.mjs} +150 -41
- package/dist/{projection-DnZiFPPE.mjs → projection-B4rqiJTi.mjs} +2 -2
- package/dist/{purger.types-BEzTVDOU.mjs → purger.types-BcHeAhY_.mjs} +1 -1
- package/dist/{queryCachePlugin-C57-Nj-g.mjs → queryCachePlugin-BgSc2bga.mjs} +6 -6
- package/dist/rateLimitKey-DLGdeFd2.mjs +138 -0
- package/dist/{realtime-C-VIoXMg.mjs → realtime-CpYpIFsm.mjs} +11 -11
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-DbQvODPH.mjs → registry-BQsdAlZ_.mjs} +2 -2
- package/dist/{relay-B61seKq1.mjs → relay-CmT3gtkP.mjs} +11 -12
- package/dist/{renewingLease-Dp7wmzNN.mjs → renewingLease-DaoP0K-e.mjs} +1 -1
- package/dist/{replyHelpers-CHii_jIO.mjs → replyHelpers-SiLr1wK4.mjs} +2 -2
- package/dist/{requestContext-C_mbAm8o.mjs → requestContext-B-TjFpWt.mjs} +8 -3
- package/dist/{health-vEo3fni4.mjs → requestId-ClcKoWLq.mjs} +154 -116
- package/dist/{requirement-C8OsWLYp.mjs → requirement-BygDzjDS.mjs} +1 -1
- package/dist/{resourceRateLimit-DhbQZjE2.mjs → resourceRateLimit-DdIYis3m.mjs} +2 -2
- package/dist/{rolldown-runtime-HTi8KV7V.mjs → rolldown-runtime-Cy6j0m8_.mjs} +1 -1
- package/dist/{routeValidator-DnQ2BGnH.mjs → routeValidator-Bn-x2gaJ.mjs} +1 -1
- package/dist/{runtimeCapabilities-G9QXHov1.mjs → runtimeCapabilities-DY20Pibh.mjs} +7 -2
- package/dist/{schedules-DAthT5O3.mjs → schedules-CwqC0Mp0.mjs} +5 -5
- package/dist/{schemaConverter-BOt_ed78.mjs → schemaConverter-XoLKVpzG.mjs} +2 -2
- package/dist/{schemaIR-MZVVj6Cw.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-btg-225w.mjs → scope-B0vgM2Zw.mjs} +4 -4
- package/dist/{shutdown-Dfy8La90.mjs → shutdown-C76Hn-Th.mjs} +1 -1
- package/dist/{simpleEqualityMatcher-D5dOqbbj.mjs → simpleEqualityMatcher-Qbl-11cE.mjs} +1 -1
- package/dist/{sse-DivxX1m6.mjs → sse-eyb8lNuI.mjs} +7 -7
- package/dist/{sseStream-hQxQjvre.mjs → sseStream-BsBesrfw.mjs} +2 -2
- package/dist/{store-helpers-DfqfssAw.mjs → store-helpers-D1yIVa91.mjs} +1 -1
- package/dist/{streaming-CQiOktsh.mjs → streaming-DKziqs1Z.mjs} +1 -1
- package/dist/{subscriberIdentity-Bf8VLqA7.mjs → subscriberIdentity-DpdSQMQq.mjs} +1 -1
- package/dist/{tenancy-Btmaf1MB.mjs → tenancy-YuRYsOPr.mjs} +2 -2
- package/dist/{tenantPreparation-4e3qyb6q.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-DXx0IWyi.mjs → timing-BtIDIdQz.mjs} +1 -1
- package/dist/{transactionContext-DperjON1.mjs → transactionContext-BsQ5ortM.mjs} +1 -1
- package/dist/{typeGuards-eoQLIOh6.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-CcpISJe8.mjs → types-ZvdR7MVa.mjs} +4 -4
- package/dist/usage/index.mjs +4 -4
- package/dist/{userHelpers-Cp5zqlEN.mjs → userHelpers-CwpEK36a.mjs} +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-dKN-_315.mjs → utils-CnrfcYMq.mjs} +6 -6
- package/dist/{validate-BZHaAdgy.mjs → validate-BTQBh-Dr.mjs} +3 -3
- package/dist/{versioning-CPLP0VbB.mjs → versioning-DiLykI6U.mjs} +3 -3
- package/dist/{workScope-BI72KXsI.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-B1RxyGt3.mjs +0 -40
package/dist/factory/index.d.mts
CHANGED
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as ResolvedModuleDescriptor, o as ResolvedModuleLifecycle, s as ResolvedResourceDescriptor } from "../fastify-augmentation-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { a as ResolvedModuleDescriptor, o as ResolvedModuleLifecycle, s as ResolvedResourceDescriptor } from "../fastify-augmentation-DjxuSRG4.mjs";
|
|
3
|
+
import { t as ArcError } from "../errors-DTo0me1o.mjs";
|
|
4
|
+
import { a as RawBodyOptions, c as BetterAuthOption, d as JwtAuthOption, i as MultipartOptions, l as CustomAuthenticatorOption, n as CreateAppHttpOptions, o as UnderPressureOptions, r as CreateAppOptions, s as AuthOption, t as BootDisposer, u as CustomPluginAuthOption } from "../index-CXqYFGoH.mjs";
|
|
5
|
+
import { t as HealthCheck } from "../health-skjSwNaC.mjs";
|
|
6
|
+
import { S as loadResources, _ as ModuleDisposer, a as ArcPortRegistry, b as ResourceLike, c as EventHandlerDefinition, d as ModuleFacts, f as ModuleInvariant, g as PortName, h as ModuleRequirements, i as ArcModuleRegistry, l as LazyBridge, m as ModulePorts, n as ArcModule, o as ArcPorts, p as ModuleName, r as ArcModuleInput, s as ComposedModuleFacts, t as ArcCompositionConfig, u as ModuleContribution, v as ModuleSetupContext, x as ResourceModule, y as LoadResourcesOptions } from "../types-CQhHTZXs.mjs";
|
|
7
|
+
import { $ as renderModuleGraph, A as extendModule, B as ModuleGraphAnalysis, C as assertComposable, D as orderModules, E as resolveModuleClosure, F as CrudSurface, G as ModuleKind, H as ModuleGraphMode, I as DerivedPublishes, J as analyzeModuleGraph, K as SkippedBridge, L as DurabilityFacts, M as AsyncApiCatalogEntry, N as AsyncApiInfo, O as subscribeModuleEventHandlers, P as toAsyncApi, Q as eventTopology, R as HandlerDurabilityFact, S as PlanModulesOptions, T as planModules, U as ModuleGraphNode, V as ModuleGraphIssue, W as ModuleGraphOptions, X as crudEventsOf, Y as buildModuleGraph, Z as dependentsOf, _ as createRelayNudge, a as hasModuleExports, b as CompositionProblem, c as moduleHandleRef, d as getModuleState, et as verifyEventDurability, f as hasModule, g as RelayOption, h as RelayNudge, i as getOptionalModuleExports, j as collectModuleWorkflows, k as ModuleExtension, l as ModuleState, m as resolveModule, n as defineModule, o as lazyModuleExports, p as resolveContribution, q as activateBridges, r as getModuleExports, s as lazyRequiredModuleExports, t as ModuleHandleRef, tt as verifyModuleGraph, u as getModuleResources, v as withRelayNudge, w as compositionProblems, x as ModulePlan, y as ClosureNode, z as ModuleGraph } from "../index-CaBFPmnu.mjs";
|
|
6
8
|
import { FastifyInstance, FastifyServerOptions } from "fastify";
|
|
9
|
+
/** One reason the app cannot boot. */
|
|
10
|
+
interface BootProblem {
|
|
11
|
+
/** Stable identifier — match on this, never on `message`. */
|
|
12
|
+
readonly code: string;
|
|
13
|
+
/** What is wrong, already naming the module / key / subsystem involved. */
|
|
14
|
+
readonly message: string;
|
|
15
|
+
/** One line: what to change. */
|
|
16
|
+
readonly fix: string;
|
|
17
|
+
/** The module this problem belongs to, when it belongs to one. */
|
|
18
|
+
readonly module?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Thrown by `createApp` for a configuration that cannot boot. `problems` lists
|
|
22
|
+
* every failure found; `code` is the single problem's code, or `boot-failed`
|
|
23
|
+
* when there are several.
|
|
24
|
+
*/
|
|
25
|
+
export declare class ArcBootError extends ArcError {
|
|
26
|
+
name: string;
|
|
27
|
+
readonly problems: readonly BootProblem[];
|
|
28
|
+
constructor(message: string, problems: readonly BootProblem[]);
|
|
29
|
+
}
|
|
7
30
|
/**
|
|
8
31
|
* Default pino redact paths (auth/cookie/API-key headers, nested
|
|
9
32
|
* password/token/secret fields), applied only when the host supplies no
|
|
@@ -157,4 +180,4 @@ export declare const testingPreset: Partial<CreateAppOptions>;
|
|
|
157
180
|
*/
|
|
158
181
|
export declare const edgePreset: Partial<CreateAppOptions>;
|
|
159
182
|
export declare function getPreset(name: "production" | "development" | "testing" | "edge" | "worker"): Partial<CreateAppOptions>;
|
|
160
|
-
export { type ArcCompositionConfig, type ArcModule, type ArcModuleInput, type ArcModuleRegistry, type ArcPortRegistry, type ArcPorts, type ArcWorker, type AsyncApiCatalogEntry, type AsyncApiInfo, type AuthOption, type BetterAuthOption, type BootDisposer, type ClosureNode, type CompositionProblem, type CreateAppHttpOptions, type CreateAppOptions, type CreateWorkerOptions, type CrudSurface, type CustomAuthenticatorOption, type CustomPluginAuthOption, type DerivedPublishes, type DurabilityFacts, type EagerGlobResult, type EventHandlerDefinition, type FetchHandlerOptions, type HandlerDurabilityFact, type JwtAuthOption, type LazyBridge, type LazyGlobResult, type LoadResourcesOptions, type ModuleContribution, type ModuleDisposer, type ModuleExtension, type ModuleGraph, type ModuleGraphAnalysis, type ModuleGraphIssue, type ModuleGraphMode, type ModuleGraphNode, type ModuleGraphOptions, type ModuleKind, type ModuleName, type ModulePlan, type ModulePorts, type ModuleRequirements, type ModuleSetupContext, type ModuleState, type MultipartOptions, type PlanModulesOptions, type PortName, type RawBodyOptions, type RelayNudge, type RelayOption, type ResolvedModuleDescriptor, type ResolvedModuleLifecycle, type ResolvedResourceDescriptor, type ResourceLike, type ResourceModule, type SkippedBridge, type UnderPressureOptions, type WorkerHealthOptions, activateBridges, analyzeModuleGraph, assertComposable, buildModuleGraph, collectModuleWorkflows, compositionProblems, createRelayNudge, crudEventsOf, defineModule, dependentsOf, eventTopology, extendModule, getModuleExports, getModuleResources, getModuleState, getOptionalModuleExports, hasModule, hasModuleExports, lazyModuleExports, lazyRequiredModuleExports, loadResources, orderModules, planModules, renderModuleGraph, resolveContribution, resolveModule, resolveModuleClosure, subscribeModuleEventHandlers, toAsyncApi, verifyEventDurability, verifyModuleGraph, withRelayNudge };
|
|
183
|
+
export { type ArcCompositionConfig, type ArcModule, type ArcModuleInput, type ArcModuleRegistry, type ArcPortRegistry, type ArcPorts, type ArcWorker, type AsyncApiCatalogEntry, type AsyncApiInfo, type AuthOption, type BetterAuthOption, type BootDisposer, type BootProblem, type ClosureNode, type ComposedModuleFacts, type CompositionProblem, type CreateAppHttpOptions, type CreateAppOptions, type CreateWorkerOptions, type CrudSurface, type CustomAuthenticatorOption, type CustomPluginAuthOption, type DerivedPublishes, type DurabilityFacts, type EagerGlobResult, type EventHandlerDefinition, type FetchHandlerOptions, type HandlerDurabilityFact, type JwtAuthOption, type LazyBridge, type LazyGlobResult, type LoadResourcesOptions, type ModuleContribution, type ModuleDisposer, type ModuleExtension, type ModuleFacts, type ModuleGraph, type ModuleGraphAnalysis, type ModuleGraphIssue, type ModuleGraphMode, type ModuleGraphNode, type ModuleGraphOptions, type ModuleHandleRef, type ModuleInvariant, type ModuleKind, type ModuleName, type ModulePlan, type ModulePorts, type ModuleRequirements, type ModuleSetupContext, type ModuleState, type MultipartOptions, type PlanModulesOptions, type PortName, type RawBodyOptions, type RelayNudge, type RelayOption, type ResolvedModuleDescriptor, type ResolvedModuleLifecycle, type ResolvedResourceDescriptor, type ResourceLike, type ResourceModule, type SkippedBridge, type UnderPressureOptions, type WorkerHealthOptions, activateBridges, analyzeModuleGraph, assertComposable, buildModuleGraph, collectModuleWorkflows, compositionProblems, createRelayNudge, crudEventsOf, defineModule, dependentsOf, eventTopology, extendModule, getModuleExports, getModuleResources, getModuleState, getOptionalModuleExports, hasModule, hasModuleExports, lazyModuleExports, lazyRequiredModuleExports, loadResources, moduleHandleRef, orderModules, planModules, renderModuleGraph, resolveContribution, resolveModule, resolveModuleClosure, subscribeModuleEventHandlers, toAsyncApi, verifyEventDurability, verifyModuleGraph, withRelayNudge };
|
package/dist/factory/index.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import { r as
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ArcBootError } from "../bootError-BT3z3cvX.mjs";
|
|
3
|
+
import { a as developmentPreset, c as productionPreset, d as getModuleResources, f as getModuleState, g as collectModuleWorkflows, l as testingPreset, m as subscribeModuleEventHandlers, n as DEFAULT_LOGGER_REDACT_PATHS, o as edgePreset, p as hasModule, r as createApp, s as getPreset, t as ArcFactory, u as workerPreset } from "../createApp-CEdGZtkP.mjs";
|
|
4
|
+
import { i as healthPlugin, o as logBootHealthSummary, s as mergeHealthChecks } from "../requestId-ClcKoWLq.mjs";
|
|
5
|
+
import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, s as moduleHandleRef, t as defineModule } from "../module-BLrTmMyk.mjs";
|
|
6
|
+
import { t as loadResources } from "../loadResources-izEeQLO_.mjs";
|
|
7
|
+
import { _ as dependentsOf, b as verifyEventDurability, d as resolveModule, g as crudEventsOf, h as buildModuleGraph, i as planModules, m as analyzeModuleGraph, o as resolveModuleClosure, p as activateBridges, r as compositionProblems, s as orderModules, t as assertComposable, u as resolveContribution, v as eventTopology, x as verifyModuleGraph, y as renderModuleGraph } from "../plan-BhKHIkFl.mjs";
|
|
7
8
|
// src/factory/module/asyncapi.ts
|
|
8
9
|
/**
|
|
9
10
|
* The module graph as an AsyncAPI 3.0 document — one channel per event (addressed by the event
|
|
@@ -286,6 +287,10 @@ async function createWorker(options, workerOptions = {}) {
|
|
|
286
287
|
...sharedHealth,
|
|
287
288
|
checks: mergedChecks
|
|
288
289
|
});
|
|
290
|
+
app.addHook("onReady", (done) => {
|
|
291
|
+
logBootHealthSummary(app.log, mergedChecks);
|
|
292
|
+
done();
|
|
293
|
+
});
|
|
289
294
|
await app.listen({
|
|
290
295
|
port,
|
|
291
296
|
host
|
|
@@ -418,4 +423,4 @@ function pickResource(value) {
|
|
|
418
423
|
];
|
|
419
424
|
for (const c of candidates) if (c && typeof c === "object" && typeof c.toPlugin === "function") return c;
|
|
420
425
|
}
|
|
421
|
-
export { ArcFactory, DEFAULT_LOGGER_REDACT_PATHS, activateBridges, analyzeModuleGraph, assertComposable, buildModuleGraph, collectModuleWorkflows, compositionProblems, createApp, createRelayNudge, createWorker, crudEventsOf, defineModule, dependentsOf, developmentPreset, edgePreset, eventTopology, extendModule, getModuleExports, getModuleResources, getModuleState, getOptionalModuleExports, getPreset, hasModule, hasModuleExports, lazyModuleExports, lazyRequiredModuleExports, loadResources, orderModules, planModules, preloadResources, preloadResourcesAsync, productionPreset, renderModuleGraph, resolveContribution, resolveModule, resolveModuleClosure, subscribeModuleEventHandlers, testingPreset, toAsyncApi, toFetchHandler, verifyEventDurability, verifyModuleGraph, withRelayNudge };
|
|
426
|
+
export { ArcBootError, ArcFactory, DEFAULT_LOGGER_REDACT_PATHS, activateBridges, analyzeModuleGraph, assertComposable, buildModuleGraph, collectModuleWorkflows, compositionProblems, createApp, createRelayNudge, createWorker, crudEventsOf, defineModule, dependentsOf, developmentPreset, edgePreset, eventTopology, extendModule, getModuleExports, getModuleResources, getModuleState, getOptionalModuleExports, getPreset, hasModule, hasModuleExports, lazyModuleExports, lazyRequiredModuleExports, loadResources, moduleHandleRef, orderModules, planModules, preloadResources, preloadResourcesAsync, productionPreset, renderModuleGraph, resolveContribution, resolveModule, resolveModuleClosure, subscribeModuleEventHandlers, testingPreset, toAsyncApi, toFetchHandler, verifyEventDurability, verifyModuleGraph, withRelayNudge };
|
|
@@ -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 {
|
|
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 {
|
|
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]`.
|
|
@@ -485,4 +489,22 @@ declare function lazyModuleExports<TExports = unknown>(fastify: FastifyInstance,
|
|
|
485
489
|
*/
|
|
486
490
|
declare function lazyRequiredModuleExports<K extends keyof ArcModuleRegistry>(fastify: FastifyInstance, name: K): () => ArcModuleRegistry[K];
|
|
487
491
|
declare function lazyRequiredModuleExports<TExports = unknown>(fastify: FastifyInstance, name: string): () => TExports;
|
|
488
|
-
|
|
492
|
+
/** A sibling module's export for a seam built at COMPOSITION, before any app exists. See `moduleHandleRef`. */
|
|
493
|
+
interface ModuleHandleRef<T> {
|
|
494
|
+
/** Call from the consumer's `plugins` arm: records the booting app. */
|
|
495
|
+
readonly plugins: (fastify: FastifyInstance) => undefined;
|
|
496
|
+
/** The sibling's export; throws by name when read before the consumer's app booted. */
|
|
497
|
+
readonly get: () => T;
|
|
498
|
+
/** The sibling's export, or `undefined` when it is not composed (an OPTIONAL sibling, no edge). */
|
|
499
|
+
readonly find: () => T | undefined;
|
|
500
|
+
/** Whether the recording module's app booted; `false` when that module is not composed. */
|
|
501
|
+
readonly booted: () => boolean;
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* A handle for seams a module builds at composition but calls at request or event time: spread `plugins`
|
|
505
|
+
* into the consumer and call `get()` from the seam. Declare a required sibling in the consumer's `dependsOn`.
|
|
506
|
+
* Pinned by tests/factory/module-handle-ref.test.ts.
|
|
507
|
+
*/
|
|
508
|
+
declare function moduleHandleRef<K extends keyof ArcModuleRegistry>(name: K): ModuleHandleRef<ArcModuleRegistry[K]>;
|
|
509
|
+
declare function moduleHandleRef<TExports = unknown>(name: string): ModuleHandleRef<TExports>;
|
|
510
|
+
export { renderModuleGraph as $, extendModule as A, ModuleGraphAnalysis as B, assertComposable as C, orderModules as D, resolveModuleClosure as E, CrudSurface as F, ModuleKind as G, ModuleGraphMode as H, DerivedPublishes as I, analyzeModuleGraph as J, SkippedBridge as K, DurabilityFacts as L, AsyncApiCatalogEntry as M, AsyncApiInfo as N, subscribeModuleEventHandlers as O, toAsyncApi as P, eventTopology as Q, HandlerDurabilityFact as R, PlanModulesOptions as S, planModules as T, ModuleGraphNode as U, ModuleGraphIssue as V, ModuleGraphOptions as W, crudEventsOf as X, buildModuleGraph as Y, dependentsOf as Z, createRelayNudge as _, hasModuleExports as a, CompositionProblem as b, moduleHandleRef as c, getModuleState as d, verifyEventDurability as et, hasModule as f, RelayOption as g, RelayNudge as h, getOptionalModuleExports as i, collectModuleWorkflows as j, ModuleExtension as k, ModuleState as l, resolveModule as m, defineModule as n, lazyModuleExports as o, resolveContribution as p, activateBridges as q, getModuleExports as r, lazyRequiredModuleExports as s, ModuleHandleRef as t, verifyModuleGraph as tt, getModuleResources as u, withRelayNudge as v, compositionProblems as w, ModulePlan as x, ClosureNode as y, ModuleGraph as z };
|
|
@@ -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";
|