@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,11 +1,13 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { n as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { d as createPresetControllerHandle, n as getAvailablePresets, t as applyPresets } from "./presets-st11ePNn.mjs";
|
|
3
|
+
import { t as arcLog } from "./logger-DdMS0XC_.mjs";
|
|
4
|
+
import { C as isWriteVerbCapable, S as detectOverriddenWriteSlots, f as BaseController, i as resolveOpenApiSchemas, l as autoInjectTenantFieldRules, t as buildResourcePlugin } from "./plugin-D6hrdx-j.mjs";
|
|
5
|
+
import { m as MUTATION_OPERATIONS, t as CRUD_OPERATIONS } from "./constants-D9EiaO5s.mjs";
|
|
6
|
+
import { n as warnDeprecated } from "./deprecation-DX625dth.mjs";
|
|
7
|
+
import { B as requireAuth, F as allowPublic } from "./permissions-CEyeDHtT.mjs";
|
|
8
|
+
import { n as unresolvedPresetPermission } from "./presetPermission-2pcRVYRG.mjs";
|
|
9
|
+
import { t as pluralize } from "./pluralize-CJKgYkVc.mjs";
|
|
10
|
+
import { a as isZodSchema, i as isJsonSchema } from "./schemaConverter-XoLKVpzG.mjs";
|
|
9
11
|
import { isReadOnlyRepo } from "@classytic/repo-core/repository";
|
|
10
12
|
import { readEnv } from "@classytic/primitives/environment";
|
|
11
13
|
// src/core/defineResource/writeVerbs.ts
|
|
@@ -94,7 +96,7 @@ function resolveOrAutoCreateController(resolvedConfig, adapter, repository, hasC
|
|
|
94
96
|
if (repository && isReadOnlyRepo(repository)) {
|
|
95
97
|
const disabled = new Set(resolvedConfig.disabledRoutes ?? []);
|
|
96
98
|
const enabledWrites = READ_ONLY_REFUSED_ROUTES.filter((op) => !resolvedConfig.disableDefaultRoutes && !disabled.has(op));
|
|
97
|
-
if (enabledWrites.length > 0) throw new Error(`Resource "${resolvedConfig.name}" mounts write routes (${enabledWrites.join(", ")}) over a READ-ONLY repository — its rows are owned by another component that enforces invariants generic CRUD would bypass (Better Auth hashes passwords, revokes sessions, and cascades org membership on every write it performs). Disable the write routes (\`
|
|
99
|
+
if (enabledWrites.length > 0) throw new Error(`Resource "${resolvedConfig.name}" mounts write routes (${enabledWrites.join(", ")}) over a READ-ONLY repository — its rows are owned by another component that enforces invariants generic CRUD would bypass (Better Auth hashes passwords, revokes sessions, and cascades org membership on every write it performs). Disable the write routes (\`crud: { list: true, get: true }\`), or if raw writes are genuinely required, build the repository with the kit's explicit \`unsafeWritable: true\` opt-in.`);
|
|
98
100
|
}
|
|
99
101
|
if (userController) {
|
|
100
102
|
bindControllerResourceName(userController, resolvedConfig.name);
|
|
@@ -249,6 +251,26 @@ function assertTransactionCapability(repository, resourceName) {
|
|
|
249
251
|
if (!capabilities || capabilities.transactions === true) return;
|
|
250
252
|
throw new Error(`Resource "${resourceName}" declares \`transactional: true\` but its repository reports \`capabilities.transactions: ${String(capabilities.transactions)}\` — this deployment cannot run transactions (standalone MongoDB, D1, or a topology arc could not confirm). \`withTransaction\` exists but every call would fail at BEGIN. Point at a replica set / transactional backend, or remove the flag. Checked at REGISTRATION, so a connection opened in \`beforeBoot()\` is already live by now.`);
|
|
251
253
|
}
|
|
254
|
+
// src/core/defineResource/deprecations.ts
|
|
255
|
+
/**
|
|
256
|
+
* Phase 0 side channel — warn (once per process) about deprecated config
|
|
257
|
+
* spellings. Reads the CALLER's config, never the normalised copy: Phase 0
|
|
258
|
+
* itself produces `disabledRoutes` / `disableDefaultRoutes` from `crud` and
|
|
259
|
+
* `customRoutesOnly`, so arc never triggers a warning here. Routes a preset adds
|
|
260
|
+
* are checked where presets merge (`warnDeprecatedPresetRoutes` in `presets/`).
|
|
261
|
+
*/
|
|
262
|
+
const FUNCTION_HANDLER_FIX = "Use a function `handler: (ctx) => controller.method(ctx)` (arc pipeline + MCP tool); `rawHandler` takes a function for streams, raw-body webhooks, files and redirects.";
|
|
263
|
+
function warnDeprecatedConfig(config) {
|
|
264
|
+
const name = config.name;
|
|
265
|
+
if (config.disableDefaultRoutes !== void 0) warnDeprecated("`disableDefaultRoutes`", `Use \`crud: false\` (first seen on resource '${name}').`);
|
|
266
|
+
if (config.disabledRoutes !== void 0) warnDeprecated("`disabledRoutes`", `Use the \`crud\` allow-list: \`disabledRoutes: ['delete']\` becomes \`crud: { list: true, get: true, create: true, update: true }\` (first seen on resource '${name}').`);
|
|
267
|
+
for (const route of config.routes ?? []) {
|
|
268
|
+
const where = `(first seen on ${route.method} ${route.path} of resource '${name}')`;
|
|
269
|
+
if (typeof route.handler === "string") warnDeprecated("A string route `handler`", `${FUNCTION_HANDLER_FIX} ${where}`);
|
|
270
|
+
if (route.controllerMethod !== void 0) warnDeprecated("Route `controllerMethod`", `${FUNCTION_HANDLER_FIX} ${where}`);
|
|
271
|
+
if (typeof route.rawHandler === "string") warnDeprecated("A string route `rawHandler`", "Pass the function: `rawHandler: (request, reply) => controller.method(request, reply)`. " + where);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
252
274
|
// src/core/defineResource/hooks.ts
|
|
253
275
|
/**
|
|
254
276
|
* Combined entry-point for Phase 6. Pushes preset-collected hooks
|
|
@@ -518,15 +540,17 @@ function resolveCrudAllowList(config) {
|
|
|
518
540
|
* shape — `defineResource()` only ever consults `resolvedConfig`,
|
|
519
541
|
* never the raw user input, after this phase runs.
|
|
520
542
|
*/
|
|
543
|
+
const PRESET_ROUTE_PUBLIC_BY_OMISSION = "preset-route-public-by-omission";
|
|
521
544
|
/**
|
|
522
545
|
* Run the Phase 3 pipeline: clone → apply presets → infer tenant
|
|
523
546
|
* field → auto-inject system-managed rules. Returns the resolved
|
|
524
|
-
* `InternalResourceConfig` that every later phase consumes.
|
|
547
|
+
* `InternalResourceConfig` that every later phase consumes. `controller` is the
|
|
548
|
+
* handle preset `routes(permissions, controller)` builders receive; Phase 4 binds it.
|
|
525
549
|
*/
|
|
526
|
-
function applyPresetsAndAutoInject(config) {
|
|
550
|
+
function applyPresetsAndAutoInject(config, controller) {
|
|
527
551
|
const originalPresets = (config.presets ?? []).map((p) => typeof p === "string" ? p : p.name);
|
|
528
552
|
const declaredKeys = new Set(Object.keys(config).filter((k) => config[k] !== void 0));
|
|
529
|
-
const resolvedConfig = config.presets?.length ? applyPresets(config, config.presets) : { ...config };
|
|
553
|
+
const resolvedConfig = config.presets?.length ? applyPresets(config, config.presets, controller) : { ...config };
|
|
530
554
|
resolvedConfig._appliedPresets = originalPresets;
|
|
531
555
|
resolvedConfig._declaredKeys = declaredKeys;
|
|
532
556
|
inferTenantFieldFromAdapter(resolvedConfig);
|
|
@@ -577,6 +601,32 @@ function computeHasCrudRoutes(config) {
|
|
|
577
601
|
const disabled = new Set(config.disabledRoutes ?? []);
|
|
578
602
|
return !config.disableDefaultRoutes && CRUD_OPERATIONS.some((op) => !disabled.has(op));
|
|
579
603
|
}
|
|
604
|
+
/**
|
|
605
|
+
* Preset routes whose permission resolved to nothing (no preset option, no resource
|
|
606
|
+
* permission to inherit; see `presetPermission`). The CRUD-read ladder: `error` under
|
|
607
|
+
* `strict`; otherwise `info`, and the route is mounted public (`allowPublic()`), as an
|
|
608
|
+
* ungated CRUD read is. Rewrites `config.routes` (a fresh array owned by `resolvedConfig`).
|
|
609
|
+
*/
|
|
610
|
+
function resolvePresetRoutePermissions(config, strict = false) {
|
|
611
|
+
const diagnostics = [];
|
|
612
|
+
const routes = config.routes?.map((route) => {
|
|
613
|
+
const unresolved = unresolvedPresetPermission(route.permissions);
|
|
614
|
+
if (!unresolved) return route;
|
|
615
|
+
const { preset, inherits, option } = unresolved;
|
|
616
|
+
const where = `${route.method} ${route.path}`;
|
|
617
|
+
diagnostics.push({
|
|
618
|
+
severity: strict ? "error" : "info",
|
|
619
|
+
code: PRESET_ROUTE_PUBLIC_BY_OMISSION,
|
|
620
|
+
message: `[Arc] Resource '${config.name}': preset '${preset}' route ${where} has no permission (it inherits permissions.${inherits}, which is not set).\n` + (strict ? "strictPermissions is on and an ungated READ is fatal. State intent explicitly:\n" : "It is mounted WITHOUT auth. State intent explicitly:\n") + ` permissions: { ${inherits}: allowPublic(), ... } // intentionally public\n permissions: { ${inherits}: requireAuth(), ... } // or requireRoles([...])` + (option ? `\n ${option} // this route only` : "")
|
|
621
|
+
});
|
|
622
|
+
return strict ? route : {
|
|
623
|
+
...route,
|
|
624
|
+
permissions: allowPublic()
|
|
625
|
+
};
|
|
626
|
+
});
|
|
627
|
+
if (routes && !strict && diagnostics.length > 0) config.routes = routes;
|
|
628
|
+
return diagnostics;
|
|
629
|
+
}
|
|
580
630
|
const WRITE_OPERATIONS = /* @__PURE__ */ new Set([
|
|
581
631
|
"create",
|
|
582
632
|
"update",
|
|
@@ -595,18 +645,15 @@ const WRITE_OPERATIONS = /* @__PURE__ */ new Set([
|
|
|
595
645
|
* wiring, ...) count as gates and don't false-positive.
|
|
596
646
|
*
|
|
597
647
|
* Severity ladder:
|
|
598
|
-
* - `error` when
|
|
599
|
-
*
|
|
600
|
-
*
|
|
601
|
-
*
|
|
602
|
-
*
|
|
603
|
-
*
|
|
604
|
-
* - `info` when only reads are ungated — public catalogs
|
|
605
|
-
* (`referenceData: true`) are a legitimate shape, but the host should
|
|
606
|
-
* still state intent with `permissions.fullPublic()` / `allowPublic()`.
|
|
648
|
+
* - `error` when ANY enabled op is ungated AND `strict` is on — the resource
|
|
649
|
+
* fails boot (`defineResource()` throws). An ungated read is as fatal as an
|
|
650
|
+
* ungated write: a public catalog states it with `allowPublic()`, so an
|
|
651
|
+
* accidental public read never ships.
|
|
652
|
+
* - `warn` (strict off) when an enabled WRITE op is ungated.
|
|
653
|
+
* - `info` (strict off) when only reads are ungated.
|
|
607
654
|
*
|
|
608
|
-
* `strict`
|
|
609
|
-
* `ARC_STRICT_PERMISSIONS` env
|
|
655
|
+
* The caller resolves `strict` (resource `strictPermissions`, else the
|
|
656
|
+
* `ARC_STRICT_PERMISSIONS` env, which is on unless set to false).
|
|
610
657
|
*/
|
|
611
658
|
function collectUngatedCrudDiagnostics(config, strict = false) {
|
|
612
659
|
if (config.disableDefaultRoutes) return [];
|
|
@@ -614,13 +661,15 @@ function collectUngatedCrudDiagnostics(config, strict = false) {
|
|
|
614
661
|
const permissions = config.permissions ?? {};
|
|
615
662
|
const ungated = CRUD_OPERATIONS.filter((op) => !disabled.has(op) && typeof permissions[op] !== "function");
|
|
616
663
|
if (ungated.length === 0) return [];
|
|
617
|
-
const
|
|
664
|
+
const hasUngatedWrite = ungated.some((op) => WRITE_OPERATIONS.has(op));
|
|
665
|
+
const severity = strict ? "error" : hasUngatedWrite ? "warn" : "info";
|
|
666
|
+
const ungatedReads = ungated.filter((op) => !WRITE_OPERATIONS.has(op));
|
|
618
667
|
return [{
|
|
619
668
|
severity,
|
|
620
669
|
code: "crud-public-by-omission",
|
|
621
|
-
message: `[Arc] Resource '${config.name}' mounts ${ungated.length} CRUD route(s) with no permission gate: ${ungated.join(", ")}.\n` + (severity === "error" ?
|
|
622
|
-
permissions:
|
|
623
|
-
permissions: { ${ungated[0]}: requireAuth(), ... } // per-operation` + (severity === "warn" ? "\nRecommended in production: ARC_STRICT_PERMISSIONS=true (or `strictPermissions: true` on the resource) makes an ungated WRITE fail the boot instead of shipping.
|
|
670
|
+
message: `[Arc] Resource '${config.name}' mounts ${ungated.length} CRUD route(s) with no permission gate: ${ungated.join(", ")}.\n` + (severity === "error" ? `strictPermissions is on and an ungated ${hasUngatedWrite ? "WRITE" : "READ"} is fatal. State intent explicitly:\n` : "An omitted permission mounts the route WITHOUT auth. State intent explicitly:\n") + (ungatedReads.length > 0 ? ` permissions: { ${ungatedReads.map((op) => `${op}: allowPublic()`).join(", ")}, ... } // intentionally public reads\n` : "") + ` permissions: fullPublic() // every op intentionally public
|
|
671
|
+
permissions: authenticated() // require auth on every op
|
|
672
|
+
permissions: { ${ungated[0]}: requireAuth(), ... } // per-operation` + (severity === "warn" ? "\nRecommended in production: ARC_STRICT_PERMISSIONS=true (or `strictPermissions: true` on the resource) makes an ungated WRITE fail the boot instead of shipping. Strict permissions is the default; this resource or app has switched it off." : "")
|
|
624
673
|
}];
|
|
625
674
|
}
|
|
626
675
|
// src/registry/resolveTenantPurge.ts
|
|
@@ -1072,15 +1121,15 @@ function validateResourceConfig(config, options = {}) {
|
|
|
1072
1121
|
});
|
|
1073
1122
|
if (declared.length > 0 && config.disableDefaultRoutes) errors.push({
|
|
1074
1123
|
field: "writes",
|
|
1075
|
-
message: `Resource declares write verb(s) [${declared.join(", ")}] but \`
|
|
1076
|
-
suggestion: "
|
|
1124
|
+
message: `Resource declares write verb(s) [${declared.join(", ")}] but \`crud: false\` means no CRUD slot will call them`,
|
|
1125
|
+
suggestion: "Allow the slots in `crud` so they mount, or move the command into a custom route / action and remove `writes`"
|
|
1077
1126
|
});
|
|
1078
1127
|
else if (declared.length > 0) {
|
|
1079
1128
|
const notMounted = declared.filter((op) => disabledRoutes.has(op));
|
|
1080
1129
|
if (notMounted.length > 0) errors.push({
|
|
1081
1130
|
field: "writes",
|
|
1082
1131
|
message: `Write verb(s) [${notMounted.join(", ")}] are declared but those CRUD slots are disabled, so the verbs can never run`,
|
|
1083
|
-
suggestion: `
|
|
1132
|
+
suggestion: `Allow [${notMounted.join(", ")}] in \`crud\`, or delete the matching \`writes\` entr(ies) — a command nothing calls is decoration`
|
|
1084
1133
|
});
|
|
1085
1134
|
}
|
|
1086
1135
|
}
|
|
@@ -1191,7 +1240,7 @@ function validatePresetOptions(preset, warnings) {
|
|
|
1191
1240
|
* Without this check, a custom `POST /` on the same prefix as auto-CRUD's
|
|
1192
1241
|
* `create` boots fine through `defineResource()` and only blows up at
|
|
1193
1242
|
* `app.register()` time with Fastify's opaque `FST_ERR_DUPLICATED_ROUTE`.
|
|
1194
|
-
* That error doesn't mention `
|
|
1243
|
+
* That error doesn't mention `crud` and doesn't distinguish
|
|
1195
1244
|
* "you collided with auto-CRUD" from "you collided with yourself" — so
|
|
1196
1245
|
* the consumer has to grep arc's source to discover the fix.
|
|
1197
1246
|
*
|
|
@@ -1244,7 +1293,7 @@ function validateRouteCrudCollisions(config, errors) {
|
|
|
1244
1293
|
errors.push({
|
|
1245
1294
|
field: `routes[${i}]`,
|
|
1246
1295
|
message: `Route ${route.method} ${route.path} collides with auto-CRUD "${crud.op}"`,
|
|
1247
|
-
suggestion: `
|
|
1296
|
+
suggestion: `Leave "${crud.op}" out of the \`crud\` allow-list (\`crud: { ${CRUD_OPERATIONS.filter((op) => op !== crud.op && !disabled.has(op)).map((op) => `${op}: true`).join(", ")} }\`) to suppress the auto-CRUD route, or move your custom handler to a different path. Set \`crud: false\` to disable all auto-CRUD on this resource.`
|
|
1248
1297
|
});
|
|
1249
1298
|
}
|
|
1250
1299
|
}
|
|
@@ -1278,8 +1327,8 @@ function validateRoutes(routes, errors) {
|
|
|
1278
1327
|
const routeWithRefs = route;
|
|
1279
1328
|
if (!route.handler && !route.rawHandler && typeof routeWithRefs.controllerMethod !== "function") errors.push({
|
|
1280
1329
|
field: `routes[${i}].handler`,
|
|
1281
|
-
message: "Route must declare
|
|
1282
|
-
suggestion: "
|
|
1330
|
+
message: "Route must declare a function `handler` (arc pipeline) or a function `rawHandler` (Fastify-native)",
|
|
1331
|
+
suggestion: "Call the controller from a function handler: `handler: (ctx) => controller.method(ctx)`."
|
|
1283
1332
|
});
|
|
1284
1333
|
if (route.handler && route.rawHandler) errors.push({
|
|
1285
1334
|
field: `routes[${i}].rawHandler`,
|
|
@@ -1588,22 +1637,28 @@ function validateActionsShape(config) {
|
|
|
1588
1637
|
* ```
|
|
1589
1638
|
*/
|
|
1590
1639
|
function defineResource(config) {
|
|
1640
|
+
warnDeprecatedConfig(config);
|
|
1591
1641
|
const normalisedConfig = normalizeResourceConfig(config);
|
|
1592
1642
|
let diagnostics = [];
|
|
1593
1643
|
if (!normalisedConfig.skipValidation) diagnostics = validateDefineResourceConfig(normalisedConfig);
|
|
1594
1644
|
else validateSecurityInvariants(normalisedConfig);
|
|
1595
1645
|
const repository = normalisedConfig.adapter?.repository;
|
|
1596
1646
|
const configWithId = resolveIdField(normalisedConfig, repository);
|
|
1597
|
-
const
|
|
1647
|
+
const presetController = createPresetControllerHandle(configWithId.name);
|
|
1648
|
+
const resolvedConfig = applyPresetsAndAutoInject(configWithId, presetController.controller);
|
|
1598
1649
|
const hasCrudRoutes = computeHasCrudRoutes(resolvedConfig);
|
|
1599
1650
|
const strict = resolvedConfig.strictPermissions ?? readEnv(process.env).bool("ARC_STRICT_PERMISSIONS", true);
|
|
1600
1651
|
diagnostics = diagnostics.concat(collectUngatedCrudDiagnostics(resolvedConfig, strict));
|
|
1652
|
+
diagnostics = diagnostics.concat(resolvePresetRoutePermissions(resolvedConfig, strict));
|
|
1601
1653
|
diagnostics = diagnostics.concat(collectSchemaSlotDiagnostics(resolvedConfig, resolvedConfig.strictSchemas ?? readEnv(process.env).bool("ARC_STRICT_SCHEMAS", false)));
|
|
1602
1654
|
const fatal = diagnostics.filter((d) => d.severity === "error");
|
|
1603
|
-
if (fatal.length > 0) throw new Error(fatal.map((d) => d.message).join("\n\n"));
|
|
1655
|
+
if (fatal.length > 0) throw Object.assign(new Error(fatal.map((d) => d.message).join("\n\n")), { code: fatal[0]?.code });
|
|
1604
1656
|
const narrowedConfig = resolvedConfig;
|
|
1605
1657
|
const narrowedAdapter = configWithId.adapter;
|
|
1606
1658
|
const controller = resolveOrAutoCreateController(narrowedConfig, narrowedAdapter, repository, hasCrudRoutes);
|
|
1659
|
+
presetController.bind(controller);
|
|
1660
|
+
const verifyPresetRoutes = () => presetController.verify(resolvedConfig.routes ?? []);
|
|
1661
|
+
if (!normalisedConfig.skipValidation) verifyPresetRoutes();
|
|
1607
1662
|
const resource = new ResourceDefinition({
|
|
1608
1663
|
...resolvedConfig,
|
|
1609
1664
|
adapter: configWithId.adapter,
|
|
@@ -1616,6 +1671,7 @@ function defineResource(config) {
|
|
|
1616
1671
|
if (registryMeta) resource._registryMeta = registryMeta;
|
|
1617
1672
|
}
|
|
1618
1673
|
const deferred = [];
|
|
1674
|
+
if (normalisedConfig.skipValidation) deferred.push(verifyPresetRoutes);
|
|
1619
1675
|
if (resolvedConfig.transactional === true) {
|
|
1620
1676
|
const name = resolvedConfig.name;
|
|
1621
1677
|
deferred.push(() => assertTransactionCapability(repository, name));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as arcLog } from "./logger-DdMS0XC_.mjs";
|
|
3
|
+
// src/logger/deprecation.ts
|
|
4
|
+
/**
|
|
5
|
+
* One warning per deprecated spelling per process. Keyed by the spelling, not
|
|
6
|
+
* the call site: a host with 80 string handlers needs one line naming the
|
|
7
|
+
* replacement, not 80. Goes through `arcLog`, so `ARC_SUPPRESS_WARNINGS` and
|
|
8
|
+
* the app's pino writer apply.
|
|
9
|
+
*/
|
|
10
|
+
const warned = /* @__PURE__ */ new Set();
|
|
11
|
+
function warnDeprecated(key, message) {
|
|
12
|
+
if (warned.has(key)) return;
|
|
13
|
+
warned.add(key);
|
|
14
|
+
arcLog("deprecated").warn(`${key} is deprecated and will be removed in the next minor. ${message}`);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Wrap a namespace object so reading one of ITS members warns once. Probes for
|
|
18
|
+
* members it does not have (`then`, symbols) stay silent, so awaiting or
|
|
19
|
+
* tagging the object never emits a false warning.
|
|
20
|
+
*/
|
|
21
|
+
function deprecatedNamespace(target, key, message) {
|
|
22
|
+
return new Proxy(target, { get(t, property, receiver) {
|
|
23
|
+
if (typeof property === "string" && Object.hasOwn(t, property)) warnDeprecated(key, message);
|
|
24
|
+
return Reflect.get(t, property, receiver);
|
|
25
|
+
} });
|
|
26
|
+
}
|
|
27
|
+
export { warnDeprecated as n, deprecatedNamespace as t };
|
package/dist/discovery/index.mjs
CHANGED
package/dist/docs/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { t as ExternalOpenApiPaths } from "../externalPaths-BOqdq5wr.mjs";
|
|
3
|
-
import { o as RegistryEntry } from "../index-
|
|
3
|
+
import { o as RegistryEntry } from "../index-DtHACefu.mjs";
|
|
4
4
|
import { FastifyPluginAsync } from "fastify";
|
|
5
5
|
/**
|
|
6
6
|
* OpenAPI 3.0 type primitives used by arc's spec emitter.
|
package/dist/docs/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as openapi_default, t as buildOpenApiSpec } from "../openapi-
|
|
3
|
-
import { n as getUserRoles } from "../userHelpers-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as openapi_default, t as buildOpenApiSpec } from "../openapi-COrL_33P.mjs";
|
|
3
|
+
import { n as getUserRoles } from "../userHelpers-CwpEK36a.mjs";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
// src/docs/scalar.ts
|
|
6
6
|
const scalarPlugin = async (fastify, opts = {}) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { t as arcLog } from "./logger-
|
|
4
|
-
import { n as requireSingleHeaderValue } from "./headers-
|
|
5
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Cy6j0m8_.mjs";
|
|
3
|
+
import { t as arcLog } from "./logger-DdMS0XC_.mjs";
|
|
4
|
+
import { n as requireSingleHeaderValue } from "./headers-Ib7BDgRI.mjs";
|
|
5
|
+
import { n as getUserRoles } from "./userHelpers-CwpEK36a.mjs";
|
|
6
6
|
import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
|
|
7
7
|
import fp from "fastify-plugin";
|
|
8
8
|
// src/scope/elevation.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ArcError } from "../errors-
|
|
3
|
-
import { t as parseJsonBody } from "../jsonBody-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ArcError } from "../errors-Ukhmfmmx.mjs";
|
|
3
|
+
import { t as parseJsonBody } from "../jsonBody-BNlcGUnb.mjs";
|
|
4
4
|
import { createCipheriv, createDecipheriv, randomBytes } from "node:crypto";
|
|
5
5
|
import fp from "fastify-plugin";
|
|
6
6
|
// src/encryption/fieldCipher.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { m as statusToArcCode, p as isArcError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Cy6j0m8_.mjs";
|
|
3
|
+
import { m as statusToArcCode, p as isArcError } from "./errors-Ukhmfmmx.mjs";
|
|
4
4
|
import { isHttpError, toErrorContract } from "@classytic/repo-core/errors";
|
|
5
5
|
import { isProductionEnv } from "@classytic/primitives/environment";
|
|
6
6
|
import fp from "fastify-plugin";
|
|
@@ -165,7 +165,10 @@ async function errorHandlerPluginFn(fastify, options = {}) {
|
|
|
165
165
|
const deliberateUnavailable = status === 503 && wire.code !== "arc.internal_error";
|
|
166
166
|
if (status >= 500 && !deliberateUnavailable) request.log.error({
|
|
167
167
|
err: error,
|
|
168
|
-
status
|
|
168
|
+
status,
|
|
169
|
+
code: wire.code,
|
|
170
|
+
route: request.routeOptions?.url,
|
|
171
|
+
method: request.method
|
|
169
172
|
}, "Server error");
|
|
170
173
|
else if (deliberateUnavailable) request.log.warn({
|
|
171
174
|
code: wire.code,
|
|
@@ -319,7 +319,7 @@ interface EventPluginOptions {
|
|
|
319
319
|
*
|
|
320
320
|
* **Important:** With `failOpen: true` (default), a transport outage will
|
|
321
321
|
* silently drop events while requests continue succeeding. Pair with the
|
|
322
|
-
* `onPublishError` callback to monitor failures, or use
|
|
322
|
+
* `onPublishError` callback to monitor failures, or use the outbox for
|
|
323
323
|
* at-least-once delivery guarantees.
|
|
324
324
|
*
|
|
325
325
|
* Never applies to a type the `registry` declares `durability: 'durable'`: the facade
|
|
@@ -327,24 +327,13 @@ interface EventPluginOptions {
|
|
|
327
327
|
*/
|
|
328
328
|
failOpen?: boolean;
|
|
329
329
|
/**
|
|
330
|
-
*
|
|
331
|
-
*
|
|
330
|
+
* Write-ahead hook called BEFORE the transport publish, with an optional
|
|
331
|
+
* acknowledge() AFTER a successful publish. NOT at-least-once on its own:
|
|
332
|
+
* nothing replays a saved-but-unpublished row.
|
|
332
333
|
*
|
|
333
|
-
*
|
|
334
|
-
*
|
|
335
|
-
*
|
|
336
|
-
* For at-least-once you must EITHER:
|
|
337
|
-
*
|
|
338
|
-
* 1. Run a relay loop yourself (read unacknowledged WAL rows on boot,
|
|
339
|
-
* republish, ack on success), or
|
|
340
|
-
* 2. Use `EventOutbox` ([./outbox.ts]) — `outbox.relay()` is the
|
|
341
|
-
* production-grade at-least-once primitive with claim/lease,
|
|
342
|
-
* retry/DLQ, multi-worker safety, and `repository`-backed durable
|
|
343
|
-
* storage. New code should prefer `EventOutbox` over `wal`.
|
|
344
|
-
*
|
|
345
|
-
* The `wal` slot is kept for hosts that want to integrate with custom
|
|
346
|
-
* write-ahead infrastructure (Kafka producer transactions, S3 batch
|
|
347
|
-
* archives, debug audit logs) without arc's outbox claim/lease semantics.
|
|
334
|
+
* @deprecated Use the outbox (`createOutboxModule` / `EventOutbox`), which
|
|
335
|
+
* has claim/lease, retry/DLQ and a relay loop. Warns once per process;
|
|
336
|
+
* removed in the next minor.
|
|
348
337
|
*/
|
|
349
338
|
wal?: {
|
|
350
339
|
save: (event: DomainEvent) => Promise<void>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { n as requestContext } from "./requestContext-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { n as
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Cy6j0m8_.mjs";
|
|
3
|
+
import { n as requestContext } from "./requestContext-B-TjFpWt.mjs";
|
|
4
|
+
import { n as warnDeprecated } from "./deprecation-DX625dth.mjs";
|
|
5
|
+
import { t as arcLog } from "./logger-DdMS0XC_.mjs";
|
|
6
|
+
import { d as createDomainError } from "./errors-Ukhmfmmx.mjs";
|
|
7
|
+
import { i as runAdmittedWork, n as isAdmittedWork, r as registerShutdownParticipant } from "./shutdown-C76Hn-Th.mjs";
|
|
8
|
+
import { n as MemoryEventTransport, r as createEvent, t as ARC_EVENT_TRANSPORT } from "./EventTransport-B3jTKMQH.mjs";
|
|
9
|
+
import { n as preserveSubscriberIdentity } from "./subscriberIdentity-DpdSQMQq.mjs";
|
|
9
10
|
import { isProductionEnv } from "@classytic/primitives/environment";
|
|
10
11
|
import fp from "fastify-plugin";
|
|
11
12
|
import { NonDurablePublishError } from "@classytic/primitives/durable-events";
|
|
@@ -162,6 +163,7 @@ const eventPlugin = async (fastify, opts = {}) => {
|
|
|
162
163
|
*/
|
|
163
164
|
const ownsTransport = opts.transport === void 0;
|
|
164
165
|
const { transport = new MemoryEventTransport(opts.memoryTransport), singleProcess = false, logEvents = false, failOpen = true, retry: retryOpts, deadLetterQueue: dlqOpts, wal, onPublish, onPublishError, registry, validateMode: rawValidateMode, warnOnDuplicate: rawWarnOnDuplicate } = opts;
|
|
166
|
+
if (wal) warnDeprecated("The eventPlugin `wal` option", "Use the outbox (`createOutboxModule` / `EventOutbox`) for at-least-once delivery.");
|
|
165
167
|
/** A host telemetry callback — isolated like an observer, so it can never change delivery. */
|
|
166
168
|
const notify = (hook, run, eventType) => {
|
|
167
169
|
try {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as createEvent } from "./EventTransport-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as createEvent } from "./EventTransport-B3jTKMQH.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { durableEventMeta } from "@classytic/primitives/durable-events";
|
|
5
5
|
// src/events/defineEvent.ts
|
package/dist/events/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as withRetry, c as EventDefinitionOutput, d as EventSchema, f as ValidationResult, i as createDeadLetterPublisher, l as EventRegistry, m as defineEvent, n as eventPlugin, o as CustomValidator, p as createEventRegistry, r as RetryOptions, s as EventDefinitionInput, t as EventPluginOptions, u as EventRegistryOptions } from "../eventPlugin-
|
|
2
|
+
import { a as withRetry, c as EventDefinitionOutput, d as EventSchema, f as ValidationResult, i as createDeadLetterPublisher, l as EventRegistry, m as defineEvent, n as eventPlugin, o as CustomValidator, p as createEventRegistry, r as RetryOptions, s as EventDefinitionInput, t as EventPluginOptions, u as EventRegistryOptions } from "../eventPlugin-BeJasppx.mjs";
|
|
3
3
|
import { i as EventLogger, n as DomainEvent, o as MemoryEventTransport, r as EventHandler, s as MemoryEventTransportOptions } from "../EventTransport-CYEoCJGe.mjs";
|
|
4
|
-
import { a as createOutboxModule, c as EventOutboxOptions, d as RelayBatchOptions, f as RelayResult, g as readOutboxHealth, h as OutboxHealthStore, i as OutboxModuleOptions, l as OutboxRelayErrorHandler, m as OutboxHealth, n as OutboxDrainResult, o as MemoryOutboxStore, p as DEFAULT_RELAY_LAG_UNHEALTHY_MS, r as OutboxModuleExports, s as EventOutbox, t as OutboxDrainRequest, u as OutboxRelayErrorKind } from "../outbox-module-
|
|
4
|
+
import { a as createOutboxModule, c as EventOutboxOptions, d as RelayBatchOptions, f as RelayResult, g as readOutboxHealth, h as OutboxHealthStore, i as OutboxModuleOptions, l as OutboxRelayErrorHandler, m as OutboxHealth, n as OutboxDrainResult, o as MemoryOutboxStore, p as DEFAULT_RELAY_LAG_UNHEALTHY_MS, r as OutboxModuleExports, s as EventOutbox, t as OutboxDrainRequest, u as OutboxRelayErrorKind } from "../outbox-module-C1QWMloZ.mjs";
|
|
5
5
|
import { RedisEventTransportOptions, RedisLike } from "./transports/redis.mjs";
|
|
6
6
|
import { r as RedisStreamTransportOptions, t as RedisStreamLike } from "../redis-stream-CS1N9dwM.mjs";
|
|
7
7
|
import { OutboxStore } from "@classytic/primitives/outbox";
|
package/dist/events/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as crudEventType, d as createEventRegistry, f as defineEvent, i as CRUD_EVENT_SUFFIXES, l as wrapWithBoundary, n as CACHE_EVENTS, o as subscribeWithBoundary, s as subscribeWithSchema, t as ARC_LIFECYCLE_EVENTS, u as wrapWithSchema } from "../eventTypes-
|
|
3
|
-
import { n as MemoryEventTransport } from "../EventTransport-
|
|
4
|
-
import { a as withRetry, i as createDeadLetterPublisher, n as eventPlugin } from "../eventPlugin-
|
|
5
|
-
import { r as withSubscriberId } from "../subscriberIdentity-
|
|
6
|
-
import { r as readOutboxHealth, t as DEFAULT_RELAY_LAG_UNHEALTHY_MS } from "../health-
|
|
7
|
-
import { t as createOutboxModule } from "../outbox-module-
|
|
8
|
-
import { n as repositoryAsOutboxStore, r as exponentialBackoff, t as EventOutbox } from "../relay-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as crudEventType, d as createEventRegistry, f as defineEvent, i as CRUD_EVENT_SUFFIXES, l as wrapWithBoundary, n as CACHE_EVENTS, o as subscribeWithBoundary, s as subscribeWithSchema, t as ARC_LIFECYCLE_EVENTS, u as wrapWithSchema } from "../eventTypes-DpDQtyR6.mjs";
|
|
3
|
+
import { n as MemoryEventTransport } from "../EventTransport-B3jTKMQH.mjs";
|
|
4
|
+
import { a as withRetry, i as createDeadLetterPublisher, n as eventPlugin } from "../eventPlugin-DTKAgSvb.mjs";
|
|
5
|
+
import { r as withSubscriberId } from "../subscriberIdentity-DpdSQMQq.mjs";
|
|
6
|
+
import { r as readOutboxHealth, t as DEFAULT_RELAY_LAG_UNHEALTHY_MS } from "../health-22T82HAa.mjs";
|
|
7
|
+
import { t as createOutboxModule } from "../outbox-module-BY2HtnjU.mjs";
|
|
8
|
+
import { n as repositoryAsOutboxStore, r as exponentialBackoff, t as EventOutbox } from "../relay-CmT3gtkP.mjs";
|
|
9
9
|
import { fingerprintRequest, runIdempotent } from "@classytic/repo-core/idempotency";
|
|
10
10
|
import { MemoryOutboxStore } from "@classytic/primitives/memory-outbox";
|
|
11
11
|
// src/events/inbox.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as evictToSize } from "../../boundedMap-
|
|
3
|
-
import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-
|
|
4
|
-
import { t as getSubscriberId } from "../../subscriberIdentity-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as evictToSize } from "../../boundedMap-Ddw2yGb2.mjs";
|
|
3
|
+
import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-C3tPz_Gt.mjs";
|
|
4
|
+
import { t as getSubscriberId } from "../../subscriberIdentity-DpdSQMQq.mjs";
|
|
5
5
|
import sjson from "secure-json-parse";
|
|
6
6
|
import { createEventRouter } from "@classytic/primitives/events";
|
|
7
7
|
// src/events/transports/redis-stream.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-C3tPz_Gt.mjs";
|
|
3
3
|
import sjson from "secure-json-parse";
|
|
4
4
|
// src/events/transports/redis.ts
|
|
5
5
|
/**
|
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 ModuleHandleRef, 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 };
|
|
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, moduleHandleRef, 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 };
|