@classytic/arc 2.33.0 → 2.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BaseController-CaQC5EXX.mjs → BaseController-C-pofd0v.mjs} +131 -16
- package/dist/{EventTransport-tq4CEB-q.mjs → EventTransport-BrPeGUil.mjs} +1 -1
- package/dist/{HookSystem-DqXkMXkB.mjs → HookSystem-LlPm3Anm.mjs} +6 -4
- package/dist/{ResourceRegistry-DoALUlOO.mjs → ResourceRegistry-yuD1Ra53.mjs} +2 -2
- package/dist/{pipeline-q69DZzgG.mjs → actionPermissions-LFuOra7W.mjs} +30 -7
- package/dist/audit/index.d.mts +2 -2
- package/dist/audit/index.mjs +2 -2
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.d.mts +2 -2
- package/dist/auth/index.mjs +6 -6
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-B3mP_QTy.mjs → authorizationDecision-DYXBBgtg.mjs} +6 -2
- package/dist/{base-Csjc2oF-.d.mts → base-GZU3LlzP.d.mts} +1 -1
- package/dist/{buildHandler-DLE9xX-V.mjs → buildHandler-Do9aMIvL.mjs} +4 -4
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-BcGmvnHh.mjs → caching-cN5X9VEL.mjs} +2 -2
- package/dist/cleanup/index.d.mts +2 -2
- package/dist/cleanup/index.mjs +4 -4
- package/dist/cli/commands/describe.d.mts +1 -1
- package/dist/cli/commands/describe.mjs +3 -3
- package/dist/cli/commands/docs.mjs +3 -3
- package/dist/cli/commands/doctor.mjs +1 -1
- package/dist/cli/commands/generate.mjs +2 -2
- package/dist/cli/commands/init.mjs +2 -2
- package/dist/cli/commands/introspect.mjs +2 -2
- package/dist/cli/index.mjs +3 -3
- package/dist/{constants-BxCoxmiN.mjs → constants-BhzLXCfN.mjs} +1 -1
- package/dist/context/index.d.mts +16 -1
- package/dist/context/index.mjs +64 -4
- package/dist/core/index.d.mts +3 -3
- package/dist/core/index.mjs +8 -8
- package/dist/{core-dxhcHhUD.mjs → core-DdEvmmkY.mjs} +3 -3
- package/dist/{createActionRouter-DVpoA0do.mjs → createActionRouter-EYWgd0ly.mjs} +27 -64
- package/dist/{createAggregationRouter-B_B48JZ-.mjs → createAggregationRouter-ByOK9Iev.mjs} +7 -7
- package/dist/defineAggregation-DoIijIFq.mjs +25 -0
- package/dist/{defineResource-DR9vsUYy.mjs → defineResource-BOrGeocE.mjs} +62 -66
- 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-B0tlY8y1.mjs → elevation-tGIAldco.mjs} +4 -4
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-C7xBqHsI.mjs → errorHandler-BbQ1nQdk.mjs} +3 -3
- package/dist/{errors-Cd_yy7aW.mjs → errors-CLid6atr.mjs} +1 -1
- package/dist/{eventPlugin-DSNEZWfV.d.mts → eventPlugin-B47sfCJ8.d.mts} +1 -1
- package/dist/{eventPlugin-Dar8qRaj.mjs → eventPlugin-ClPn5kjn.mjs} +5 -5
- package/dist/events/index.d.mts +2 -2
- package/dist/events/index.mjs +5 -5
- package/dist/events/transports/redis-stream-entry.mjs +1 -1
- package/dist/events/transports/redis.mjs +1 -1
- package/dist/factory/index.d.mts +5 -5
- package/dist/factory/index.mjs +5 -6
- package/dist/{fastify-augmentation-DVsTAy6X.d.mts → fastify-augmentation-CMMTL3cj.d.mts} +3 -3
- package/dist/{fields-CojeUkS4.mjs → fields-UtpiJO5R.mjs} +1 -1
- package/dist/{generate-DiB0nHPR.mjs → generate-BoAVy3_b.mjs} +2 -2
- package/dist/{headers-CveNO9gR.mjs → headers-DODWf7aC.mjs} +2 -2
- package/dist/{health-CasG2A28.mjs → health-_Zs3R_Sb.mjs} +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/idempotency/index.mjs +23 -58
- package/dist/idempotency/redis.mjs +1 -1
- package/dist/{index-C5NnMEKF.d.mts → index-C50BUxKs.d.mts} +1 -1
- package/dist/{index-BcR2bFZQ.d.mts → index-C5K78SXo.d.mts} +33 -105
- package/dist/{index-ugr1tQlW.d.mts → index-CJCcbADG.d.mts} +1 -1
- package/dist/{index-B-DvUzsr.d.mts → index-K7auNNW0.d.mts} +2 -2
- package/dist/{index-Brin0ODU.d.mts → index-h-mTgMqy.d.mts} +21 -31
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +12 -12
- package/dist/{init-mdJ-v4Xp.mjs → init-Ce4R0ZGK.mjs} +1 -1
- package/dist/integrations/event-gateway.mjs +2 -2
- package/dist/integrations/index.d.mts +2 -2
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.d.mts +1 -1
- package/dist/integrations/jobs/index.mjs +2 -2
- package/dist/integrations/mcp/index.d.mts +4 -4
- package/dist/integrations/mcp/index.mjs +2 -2
- package/dist/integrations/mcp/testing.d.mts +1 -1
- package/dist/integrations/mcp/testing.mjs +3 -3
- package/dist/integrations/streamline.mjs +3 -3
- package/dist/integrations/webhooks.d.mts +1 -1
- package/dist/integrations/webhooks.mjs +11 -24
- package/dist/integrations/websocket-pushref-redis.mjs +1 -1
- package/dist/integrations/websocket-redis.mjs +1 -1
- package/dist/integrations/websocket.mjs +1 -1
- package/dist/{interface-DznJrm9R.mjs → interface-my7sxjw5.mjs} +1 -1
- package/dist/{jsonBody-CfGH-GxO.mjs → jsonBody-CVKA7C5m.mjs} +2 -2
- package/dist/{keys-WeKvY1dE.mjs → keys-GlU7XpmG.mjs} +1 -1
- package/dist/{loadResources-Bj-aSsXi.mjs → loadResources-DdQb0qgV.mjs} +2 -2
- package/dist/{loadResourcesFromEntry-DwaxNcE2.mjs → loadResourcesFromEntry-s6aGs6-0.mjs} +2 -2
- package/dist/logger/index.d.mts +23 -4
- package/dist/logger/index.mjs +50 -7
- package/dist/{mcpPlugin-aJg5TqHi.mjs → mcpPlugin-DkzZ7Nfx.mjs} +15 -16
- package/dist/{memory-qYSB7rMQ.mjs → memory-BwedEXau.mjs} +2 -2
- package/dist/{metrics-D7uchLjN.mjs → metrics-5LNPvL3P.mjs} +2 -2
- package/dist/middleware/index.d.mts +1 -1
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.mjs +7 -4
- package/dist/{module-CwKsgZXp.mjs → module-Bh5OC7ww.mjs} +1 -1
- package/dist/{multipartBody-4w-S3-PU.mjs → multipartBody-DjilSDAT.mjs} +1 -1
- package/dist/{openapi-BN5cQaO2.mjs → openapi-ItLH12_L.mjs} +6 -6
- package/dist/outbox-admin/index.d.mts +2 -2
- package/dist/outbox-admin/index.mjs +4 -4
- package/dist/{outbox-module-CXB79bvt.mjs → outbox-module-SGIZz6oS.mjs} +14 -5
- package/dist/{outbox-module-D-VFq37T.d.mts → outbox-module-b1TyDGGi.d.mts} +40 -3
- package/dist/permissions/index.d.mts +2 -2
- package/dist/permissions/index.mjs +5 -5
- package/dist/{permissions-BAfwgBxc.mjs → permissions-CpSBlFXZ.mjs} +6 -6
- package/dist/{pipe-BzzoEhHj.mjs → pipe-DNOuCfAs.mjs} +2 -2
- package/dist/pipeline/index.d.mts +1 -1
- package/dist/pipeline/index.mjs +2 -2
- package/dist/plugins/index.d.mts +92 -7
- package/dist/plugins/index.mjs +168 -17
- package/dist/plugins/response-cache.mjs +2 -2
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-B7xf8qZF.mjs → pluralize-DGAQQKL8.mjs} +1 -1
- package/dist/{preloadResources-g07ldtzh.d.mts → preloadResources--ZtY9pe9.d.mts} +54 -270
- package/dist/{createApp-CLGegqiG.mjs → preloadResources-DYMzmUk1.mjs} +112 -31
- package/dist/presets/filesUpload.d.mts +3 -3
- package/dist/presets/filesUpload.mjs +5 -5
- package/dist/presets/index.d.mts +2 -2
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.d.mts +1 -1
- package/dist/presets/multiTenant.mjs +3 -3
- package/dist/presets/search.d.mts +9 -47
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-D-h0uWtP.mjs → presets-Bi0Z6Iq8.mjs} +4 -4
- package/dist/{projection-BKM0Ui-s.mjs → projection-aevMua7Q.mjs} +2 -2
- package/dist/{queryCachePlugin-DhsZ0ZIc.mjs → queryCachePlugin-BI7Z88Cx.mjs} +5 -5
- package/dist/{rateLimitKey-XngqVNEV.mjs → rateLimitKey-pyevMUVf.mjs} +1 -1
- package/dist/{realtime-CTkv3O59.mjs → realtime-Cfl2bVjj.mjs} +9 -9
- package/dist/{rateLimit-D4-ASwsI.mjs → registerRoute-u1opU66a.mjs} +114 -3
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-CLxCR5LF.mjs → registry-B4sf9Rfm.mjs} +15 -56
- package/dist/{renewingLease-BnWtbA2U.mjs → renewingLease-5ESPMxp0.mjs} +14 -2
- package/dist/{replyHelpers-BSBVCwL3.mjs → replyHelpers-2jfmMnnV.mjs} +2 -2
- package/dist/{requestContext-uYE35JxI.mjs → requestContext-DzOUGNdY.mjs} +1 -1
- package/dist/{rolldown-runtime-DNg-KNCk.mjs → rolldown-runtime-CEvvVXTC.mjs} +1 -1
- package/dist/{runtimeCapabilities-Dm88DaTW.mjs → runtimeCapabilities-BagWc3TI.mjs} +1 -1
- package/dist/{schedules-CAcZgia0.mjs → schedules-BLpZLWGF.mjs} +6 -4
- package/dist/{schemaConverter-XH1RZRyu.mjs → schemaConverter-D2_bHGil.mjs} +19 -32
- package/dist/{schemaIR-CDvclAew.mjs → schemaIR-s3-ouZmP.mjs} +2 -2
- package/dist/schemas/index.mjs +1 -1
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.d.mts +1 -1
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-BaWcqBvr.mjs → scope-DgepeCv6.mjs} +4 -4
- package/dist/simpleEqualityMatcher-BO-sFTQf.mjs +43 -0
- package/dist/{sse-Cf0jUHsh.mjs → sse-DUIP1XH6.mjs} +5 -5
- package/dist/{sseStream-Bvpi-UXQ.mjs → sseStream-ByFGyIVr.mjs} +2 -2
- package/dist/{store-helpers-B88p99Z2.mjs → store-helpers-kIJCY0wI.mjs} +1 -1
- package/dist/{streaming-DsT1B5zJ.mjs → streaming-DOpZVht6.mjs} +1 -1
- package/dist/{subscribe-helpers-CLIOHsOK.mjs → subscribe-helpers-Dh2BnzJf.mjs} +12 -46
- package/dist/sync/changelog.mjs +1 -1
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +6 -6
- package/dist/testing/index.mjs +10 -11
- package/dist/testing/outboxStoreContract.mjs +1 -1
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{transactionContext-BYtWnwAS.mjs → transactionContext-BTZzEcRo.mjs} +1 -1
- package/dist/{typeGuards-jjKJDN13.mjs → typeGuards-B-_jqaMi.mjs} +1 -1
- package/dist/types/index.d.mts +3 -3
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-BcTumAz_.d.mts → types-DDD5RKTu.d.mts} +30 -87
- package/dist/{types-BfC83KsP.d.mts → types-DSvHH0uR.d.mts} +1 -1
- package/dist/{types-ChuShpCP.d.mts → types-Ddl9OjmE.d.mts} +18 -121
- package/dist/{types-CoqIRrkY.mjs → types-GY4kATJb.mjs} +10 -53
- package/dist/usage/index.d.mts +2 -2
- package/dist/usage/index.mjs +0 -0
- package/dist/{userHelpers-CWF5pbZD.mjs → userHelpers-AKcB4V03.mjs} +1 -1
- package/dist/utils/index.d.mts +16 -42
- package/dist/utils/index.mjs +11 -11
- package/dist/{utils-h1V_sT-t.mjs → utils-CBK9HQOI.mjs} +3 -3
- package/dist/{validate-CdQlz52F.mjs → validate-dosAIvQU.mjs} +2 -2
- package/dist/{versioning-rZbyLVD-.mjs → versioning-BbTs4pwM.mjs} +3 -3
- package/package.json +8 -8
- package/skills/arc/SKILL.md +9 -9
- package/skills/arc/references/api-reference.md +1 -1
- package/dist/actionPermissions-CUeCmpUd.mjs +0 -25
- package/dist/defineAggregation-Nv-DwfOf.mjs +0 -48
- package/dist/preloadResources-BkyqeTDz.mjs +0 -46
- package/dist/registerRoute-DNnd3vkz.mjs +0 -113
- package/dist/repositoryFilter-DKny7PDn.mjs +0 -45
- package/dist/simpleEqualityMatcher-Se8VrsaP.mjs +0 -69
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { c as McpAuthResult, u as McpPluginOptions } from "../../types-
|
|
2
|
+
import { c as McpAuthResult, u as McpPluginOptions } from "../../types-DSvHH0uR.mjs";
|
|
3
3
|
//#region src/integrations/mcp/testing.d.ts
|
|
4
4
|
interface TestMcpClientOptions {
|
|
5
5
|
/** MCP plugin options (resources, overrides, etc.) — same as mcpPlugin config */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { m as createMcpServer, r as resourceToTools, t as filterResourcesForMcp } from "../../mcpPlugin-
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { m as createMcpServer, r as resourceToTools, t as filterResourcesForMcp } from "../../mcpPlugin-DkzZ7Nfx.mjs";
|
|
3
3
|
//#region src/integrations/mcp/testing.ts
|
|
4
4
|
/**
|
|
5
5
|
* @classytic/arc/mcp/testing — MCP Test Utilities
|
|
@@ -50,7 +50,7 @@ async function createTestMcpClient(options = {}) {
|
|
|
50
50
|
resources: [],
|
|
51
51
|
...options.pluginOptions
|
|
52
52
|
};
|
|
53
|
-
const auth = options.auth
|
|
53
|
+
const auth = options.auth === void 0 ? { userId: "test-user" } : options.auth;
|
|
54
54
|
const serverName = options.serverName ?? "test-mcp";
|
|
55
55
|
const overrides = pluginOpts.overrides ?? {};
|
|
56
56
|
const tools = filterResourcesForMcp(pluginOpts.resources ?? [], {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { f as createError, i as NotFoundError, r as ForbiddenError } from "../errors-
|
|
3
|
-
import { a as promoteStreamTokenToHeader, n as forwardedStreamHeaders } from "../streaming-
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { f as createError, i as NotFoundError, r as ForbiddenError } from "../errors-CLid6atr.mjs";
|
|
3
|
+
import { a as promoteStreamTokenToHeader, n as forwardedStreamHeaders } from "../streaming-DOpZVht6.mjs";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
//#region src/integrations/streamline.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { a as EventTransport, n as DomainEvent } from "../EventTransport-BEVP50ka.mjs";
|
|
3
|
-
import { n as OutboxModuleOptions, r as createOutboxModule } from "../outbox-module-
|
|
3
|
+
import { n as OutboxModuleOptions, r as createOutboxModule } from "../outbox-module-b1TyDGGi.mjs";
|
|
4
4
|
import { FastifyPluginAsync } from "fastify";
|
|
5
5
|
import { OutboxFailurePolicy, OutboxStore } from "@classytic/primitives/outbox";
|
|
6
6
|
//#region src/integrations/webhooks.d.ts
|
|
@@ -1,37 +1,24 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
3
|
-
import { i as exponentialBackoff, t as createOutboxModule } from "../outbox-module-
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-BagWc3TI.mjs";
|
|
3
|
+
import { i as exponentialBackoff, t as createOutboxModule } from "../outbox-module-SGIZz6oS.mjs";
|
|
4
4
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
5
5
|
import fp from "fastify-plugin";
|
|
6
6
|
import { createChildEvent } from "@classytic/primitives/events";
|
|
7
7
|
//#region src/integrations/webhooks.ts
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Outbound webhooks — auto-dispatch arc events to registered endpoints with
|
|
10
|
+
* HMAC-SHA256 signing, delivery logging, and a pluggable `WebhookStore`.
|
|
10
11
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* This is a SEPARATE subpath import — only loaded when explicitly used:
|
|
16
|
-
* import { webhookPlugin } from '@classytic/arc/integrations/webhooks';
|
|
12
|
+
* A separate subpath, loaded only when used:
|
|
13
|
+
* `@classytic/arc/integrations/webhooks`. For at-least-once delivery use
|
|
14
|
+
* `durable: { store }` / `createDurableWebhookModule` — the in-process retry
|
|
15
|
+
* is explicitly best-effort.
|
|
17
16
|
*
|
|
18
17
|
* @example
|
|
19
18
|
* ```typescript
|
|
20
|
-
* import { webhookPlugin } from '@classytic/arc/integrations/webhooks';
|
|
21
|
-
*
|
|
22
19
|
* await fastify.register(webhookPlugin);
|
|
23
|
-
*
|
|
24
|
-
* //
|
|
25
|
-
* app.webhooks.register({
|
|
26
|
-
* id: 'wh-1',
|
|
27
|
-
* url: 'https://customer.com/webhook',
|
|
28
|
-
* events: ['order.created', 'order.shipped'],
|
|
29
|
-
* secret: 'whsec_abc123',
|
|
30
|
-
* });
|
|
31
|
-
*
|
|
32
|
-
* // Events auto-dispatch — no manual wiring needed
|
|
33
|
-
* await app.events.publish('order.created', { orderId: '123' });
|
|
34
|
-
* // → POST https://customer.com/webhook with HMAC signature
|
|
20
|
+
* app.webhooks.register({ id: 'wh-1', url, events: ['order.created'], secret });
|
|
21
|
+
* await app.events.publish('order.created', { orderId: '123' }); // → signed POST
|
|
35
22
|
* ```
|
|
36
23
|
*/
|
|
37
24
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ArcError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ArcError } from "./errors-CLid6atr.mjs";
|
|
3
3
|
import sjson from "secure-json-parse";
|
|
4
4
|
//#region src/utils/jsonBody.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-CEvvVXTC.mjs";
|
|
3
3
|
import { arcLog } from "./logger/index.mjs";
|
|
4
4
|
import { readdir } from "node:fs/promises";
|
|
5
5
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ResourceRegistry } from "./ResourceRegistry-
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ResourceRegistry } from "./ResourceRegistry-yuD1Ra53.mjs";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
//#region src/cli/utils/loadResourcesFromEntry.ts
|
package/dist/logger/index.d.mts
CHANGED
|
@@ -54,10 +54,29 @@ interface ArcLogger {
|
|
|
54
54
|
error: (...args: unknown[]) => void;
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* Run `fn` with `options` as the active logger config.
|
|
58
58
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
59
|
+
* `options` is held BY REFERENCE deliberately: `createApp` enters the scope
|
|
60
|
+
* before Fastify exists, then fills in the pino writer once `fastify.log` is
|
|
61
|
+
* constructed. Copying here would freeze the pre-Fastify view and send every
|
|
62
|
+
* post-construction boot warning to the console instead of the app's logger.
|
|
63
|
+
*/
|
|
64
|
+
declare function runWithArcLogger<T>(options: ArcLoggerOptions, fn: () => T): T;
|
|
65
|
+
/**
|
|
66
|
+
* Enter `options` for the remainder of the current async context.
|
|
67
|
+
*
|
|
68
|
+
* For Fastify's `onRequest` hook, where `run(store, done)` wraps the rest of
|
|
69
|
+
* the request lifecycle. Outside a hook, prefer {@link runWithArcLogger}.
|
|
70
|
+
*/
|
|
71
|
+
declare function enterArcLoggerScope(options: ArcLoggerOptions, done: () => void): void;
|
|
72
|
+
/**
|
|
73
|
+
* Configure the PROCESS-GLOBAL Arc logger — the fallback used outside any app.
|
|
74
|
+
*
|
|
75
|
+
* `createApp` no longer routes its writer through here; each app carries its
|
|
76
|
+
* own scoped options (see {@link runWithArcLogger}) so two apps in one process
|
|
77
|
+
* cannot overwrite each other's. This remains the way to configure arcLog for
|
|
78
|
+
* standalone use — `defineResource()` at module import, CLI commands, and any
|
|
79
|
+
* code running before or outside a `createApp` boot.
|
|
61
80
|
*/
|
|
62
81
|
declare function configureArcLogger(options: ArcLoggerOptions): void;
|
|
63
82
|
/**
|
|
@@ -104,4 +123,4 @@ interface PinoLike {
|
|
|
104
123
|
*/
|
|
105
124
|
declare function createPinoWriter(logger: PinoLike): ArcLogWriter;
|
|
106
125
|
//#endregion
|
|
107
|
-
export { ArcLogWriter, ArcLogger, ArcLoggerOptions, PinoLike, arcLog, configureArcLogger, createPinoWriter };
|
|
126
|
+
export { ArcLogWriter, ArcLogger, ArcLoggerOptions, PinoLike, arcLog, configureArcLogger, createPinoWriter, enterArcLoggerScope, runWithArcLogger };
|
package/dist/logger/index.mjs
CHANGED
|
@@ -1,11 +1,54 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
3
|
//#region src/logger/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* Per-app logger options, resolved from the async context.
|
|
6
|
+
*
|
|
7
|
+
* The process-global below is a FALLBACK, not the source of truth. It used to
|
|
8
|
+
* be both, and `configureArcLogger` overwrote it on every boot — so the
|
|
9
|
+
* last-created app owned the writer for every app in the process. One app's
|
|
10
|
+
* framework warnings then surfaced through another app's transports, level,
|
|
11
|
+
* and redaction config. Fine for one-app-per-process; wrong for multi-app test
|
|
12
|
+
* files and for serverless containers that reuse a warm process across apps.
|
|
13
|
+
*
|
|
14
|
+
* Follows the same shape as `requestContext`: the scope is entered once and
|
|
15
|
+
* wraps everything downstream, so the 23 `arcLog()` call sites keep their
|
|
16
|
+
* zero-argument signature and resolve correctly without threading a logger.
|
|
17
|
+
*/
|
|
18
|
+
const scope = new AsyncLocalStorage();
|
|
3
19
|
let globalOptions = {};
|
|
20
|
+
/** Active options: the app's if we're inside one, else the process fallback. */
|
|
21
|
+
function resolveOptions() {
|
|
22
|
+
return scope.getStore() ?? globalOptions;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Run `fn` with `options` as the active logger config.
|
|
26
|
+
*
|
|
27
|
+
* `options` is held BY REFERENCE deliberately: `createApp` enters the scope
|
|
28
|
+
* before Fastify exists, then fills in the pino writer once `fastify.log` is
|
|
29
|
+
* constructed. Copying here would freeze the pre-Fastify view and send every
|
|
30
|
+
* post-construction boot warning to the console instead of the app's logger.
|
|
31
|
+
*/
|
|
32
|
+
function runWithArcLogger(options, fn) {
|
|
33
|
+
return scope.run(options, fn);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Enter `options` for the remainder of the current async context.
|
|
37
|
+
*
|
|
38
|
+
* For Fastify's `onRequest` hook, where `run(store, done)` wraps the rest of
|
|
39
|
+
* the request lifecycle. Outside a hook, prefer {@link runWithArcLogger}.
|
|
40
|
+
*/
|
|
41
|
+
function enterArcLoggerScope(options, done) {
|
|
42
|
+
scope.run(options, done);
|
|
43
|
+
}
|
|
4
44
|
/**
|
|
5
|
-
* Configure the Arc logger
|
|
45
|
+
* Configure the PROCESS-GLOBAL Arc logger — the fallback used outside any app.
|
|
6
46
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
47
|
+
* `createApp` no longer routes its writer through here; each app carries its
|
|
48
|
+
* own scoped options (see {@link runWithArcLogger}) so two apps in one process
|
|
49
|
+
* cannot overwrite each other's. This remains the way to configure arcLog for
|
|
50
|
+
* standalone use — `defineResource()` at module import, CLI commands, and any
|
|
51
|
+
* code running before or outside a `createApp` boot.
|
|
9
52
|
*/
|
|
10
53
|
function configureArcLogger(options) {
|
|
11
54
|
globalOptions = { ...options };
|
|
@@ -84,10 +127,10 @@ function createPinoWriter(logger) {
|
|
|
84
127
|
};
|
|
85
128
|
}
|
|
86
129
|
function getWriter() {
|
|
87
|
-
return
|
|
130
|
+
return resolveOptions().writer ?? console;
|
|
88
131
|
}
|
|
89
132
|
function isDebugEnabled(module) {
|
|
90
|
-
const configDebug =
|
|
133
|
+
const configDebug = resolveOptions().debug;
|
|
91
134
|
if (configDebug !== void 0 && configDebug !== false) return matchesModule(configDebug, module);
|
|
92
135
|
const envDebug = typeof process !== "undefined" ? process.env?.ARC_DEBUG : void 0;
|
|
93
136
|
if (envDebug) return matchesModule(envDebug, module);
|
|
@@ -107,4 +150,4 @@ function isSuppressed() {
|
|
|
107
150
|
return env === "1" || env === "true";
|
|
108
151
|
}
|
|
109
152
|
//#endregion
|
|
110
|
-
export { arcLog, configureArcLogger, createPinoWriter };
|
|
153
|
+
export { arcLog, configureArcLogger, createPinoWriter, enterArcLoggerScope, runWithArcLogger };
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as evaluatePermissionDecision } from "./authorizationDecision-
|
|
3
|
-
import { p as isArcError, t as ArcError } from "./errors-
|
|
4
|
-
import { n as requireSingleHeaderValue } from "./headers-
|
|
5
|
-
import { b as isElevated, c as getOrgId, g as getUserId, x as isMember } from "./types-
|
|
6
|
-
import { t as BaseController } from "./BaseController-
|
|
7
|
-
import { i as resolveEffectiveRoles, t as applyFieldReadPermissions } from "./fields-
|
|
8
|
-
import { t as executePipeline } from "./pipe-
|
|
9
|
-
import { t as buildRequestScopeProjection } from "./projection-
|
|
10
|
-
import {
|
|
11
|
-
import { n as validateAggregations } from "./validate-
|
|
12
|
-
import { n as executeAggregation } from "./buildHandler-
|
|
13
|
-
import { t as pluralize } from "./pluralize-
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { r as shouldRejectAdditionalProperties, t as normalizeSchemaIR } from "./schemaIR-CDvclAew.mjs";
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as evaluatePermissionDecision } from "./authorizationDecision-DYXBBgtg.mjs";
|
|
3
|
+
import { p as isArcError, t as ArcError } from "./errors-CLid6atr.mjs";
|
|
4
|
+
import { n as requireSingleHeaderValue } from "./headers-DODWf7aC.mjs";
|
|
5
|
+
import { b as isElevated, c as getOrgId, g as getUserId, x as isMember } from "./types-GY4kATJb.mjs";
|
|
6
|
+
import { t as BaseController } from "./BaseController-C-pofd0v.mjs";
|
|
7
|
+
import { i as resolveEffectiveRoles, t as applyFieldReadPermissions } from "./fields-UtpiJO5R.mjs";
|
|
8
|
+
import { t as executePipeline } from "./pipe-DNOuCfAs.mjs";
|
|
9
|
+
import { t as buildRequestScopeProjection } from "./projection-aevMua7Q.mjs";
|
|
10
|
+
import { i as resolvePipelineSteps, t as resolveActionPermission } from "./actionPermissions-LFuOra7W.mjs";
|
|
11
|
+
import { n as validateAggregations } from "./validate-dosAIvQU.mjs";
|
|
12
|
+
import { n as executeAggregation } from "./buildHandler-Do9aMIvL.mjs";
|
|
13
|
+
import { t as pluralize } from "./pluralize-DGAQQKL8.mjs";
|
|
14
|
+
import { t as createIdempotencyResult } from "./interface-my7sxjw5.mjs";
|
|
15
|
+
import { r as shouldRejectAdditionalProperties, t as normalizeSchemaIR } from "./schemaIR-s3-ouZmP.mjs";
|
|
17
16
|
import { isHttpError, toErrorContract } from "@classytic/repo-core/errors";
|
|
18
17
|
import { createHash, randomUUID } from "node:crypto";
|
|
19
18
|
import fp from "fastify-plugin";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-CEvvVXTC.mjs";
|
|
3
3
|
//#region src/cache/memory.ts
|
|
4
4
|
var memory_exports = /* @__PURE__ */ __exportAll({ MemoryCacheStore: () => MemoryCacheStore });
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-CEvvVXTC.mjs";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
//#region src/plugins/metrics.ts
|
|
5
5
|
var metrics_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { I as MiddlewareHandler, L as RequestWithExtras, Q as MiddlewareConfig } from "../index-
|
|
2
|
+
import { I as MiddlewareHandler, L as RequestWithExtras, Q as MiddlewareConfig } from "../index-C5K78SXo.mjs";
|
|
3
3
|
import { RouteHandlerMethod } from "fastify";
|
|
4
4
|
//#region src/middleware/middleware.d.ts
|
|
5
5
|
interface NamedMiddleware {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CRUD_OPERATIONS } from "../constants-
|
|
3
|
-
import { t as multipartBody } from "../multipartBody-
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "../constants-BhzLXCfN.mjs";
|
|
3
|
+
import { t as multipartBody } from "../multipartBody-DjilSDAT.mjs";
|
|
4
4
|
//#region src/middleware/middleware.ts
|
|
5
5
|
/**
|
|
6
6
|
* Named Middleware — Priority-based, conditional middleware execution.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as startRenewingLease } from "../renewingLease-
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as startRenewingLease } from "../renewingLease-5ESPMxp0.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/migrations/index.ts
|
|
5
5
|
/**
|
|
@@ -160,12 +160,14 @@ var MigrationRunner = class {
|
|
|
160
160
|
async withLock(fn) {
|
|
161
161
|
const lock = this.lock;
|
|
162
162
|
if (!lock) return fn(() => false);
|
|
163
|
-
|
|
163
|
+
const fenced = await lock.tryAcquireFenced?.(MIGRATION_LOCK_NAME, this.holderId, this.lockLeaseMs);
|
|
164
|
+
if (!(fenced !== void 0 ? fenced !== null : await lock.tryAcquire(MIGRATION_LOCK_NAME, this.holderId, this.lockLeaseMs))) throw new Error(`MigrationRunner: another runner holds the migration lock — refusing to run concurrently. If a previous runner crashed, the lease expires on its own (leaseMs: ${this.lockLeaseMs}).`);
|
|
164
165
|
const lease = startRenewingLease({
|
|
165
166
|
lock,
|
|
166
167
|
name: MIGRATION_LOCK_NAME,
|
|
167
168
|
holderId: this.holderId,
|
|
168
169
|
leaseMs: this.lockLeaseMs,
|
|
170
|
+
...fenced ? { token: fenced.token } : {},
|
|
169
171
|
onLost: () => this.log.error("MigrationRunner: lease renewal lost — another holder took the migration lock; no further migrations will start and this run will fail."),
|
|
170
172
|
onError: (error) => this.log.error(`MigrationRunner: lease renewal errored (lease may lapse mid-run): ${error.message}`)
|
|
171
173
|
});
|
|
@@ -230,7 +232,7 @@ var MigrationRunner = class {
|
|
|
230
232
|
* Rollback last migration
|
|
231
233
|
*/
|
|
232
234
|
async down(migrations) {
|
|
233
|
-
await this.withLock(async () => {
|
|
235
|
+
await this.withLock(async (leaseLost) => {
|
|
234
236
|
const applied = await this.store.getApplied();
|
|
235
237
|
const last = applied[applied.length - 1];
|
|
236
238
|
if (!last) {
|
|
@@ -239,6 +241,7 @@ var MigrationRunner = class {
|
|
|
239
241
|
}
|
|
240
242
|
const migration = migrations.find((m) => m.resource === last.resource && m.version === last.version);
|
|
241
243
|
if (!migration) throw new Error(`Migration ${last.resource}:${last.version} not found in migration files`);
|
|
244
|
+
if (leaseLost()) throw new Error("MigrationRunner: refusing to roll back — lock ownership lost between acquiring the lease and starting the rollback.");
|
|
242
245
|
this.log.info(`Rolling back ${migration.resource} v${migration.version}...`);
|
|
243
246
|
await this.runMigration(migration, "down", true);
|
|
244
247
|
this.log.info("Rollback completed");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
3
|
-
import { n as convertRouteSchema } from "./schemaConverter-
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as buildActionBodySchema } from "./createActionRouter-
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as getUserRoles } from "./userHelpers-AKcB4V03.mjs";
|
|
3
|
+
import { n as convertRouteSchema } from "./schemaConverter-D2_bHGil.mjs";
|
|
4
|
+
import { t as resolveActionPermission } from "./actionPermissions-LFuOra7W.mjs";
|
|
5
|
+
import { t as pluralize } from "./pluralize-DGAQQKL8.mjs";
|
|
6
|
+
import { t as buildActionBodySchema } from "./createActionRouter-EYWgd0ly.mjs";
|
|
7
7
|
import fp from "fastify-plugin";
|
|
8
8
|
//#region src/docs/openapi/canonical-schemas.ts
|
|
9
9
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { l as PermissionCheck } from "../base-
|
|
3
|
-
import { t as ArcModule } from "../types-
|
|
2
|
+
import { l as PermissionCheck } from "../base-GZU3LlzP.mjs";
|
|
3
|
+
import { t as ArcModule } from "../types-DDD5RKTu.mjs";
|
|
4
4
|
import { OutboxStore } from "@classytic/primitives/outbox";
|
|
5
5
|
//#region src/outbox-admin/module.d.ts
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { i as NotFoundError, u as ValidationError } from "../errors-
|
|
3
|
-
import { t as defineResource } from "../defineResource-
|
|
4
|
-
import { n as getModuleExports, t as defineModule } from "../module-
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { i as NotFoundError, u as ValidationError } from "../errors-CLid6atr.mjs";
|
|
3
|
+
import { t as defineResource } from "../defineResource-BOrGeocE.mjs";
|
|
4
|
+
import { n as getModuleExports, t as defineModule } from "../module-Bh5OC7ww.mjs";
|
|
5
5
|
//#region src/outbox-admin/module.ts
|
|
6
6
|
/**
|
|
7
7
|
* Strip the domain payload and the stack unless explicitly opted in.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as transactionContext } from "./transactionContext-BTZzEcRo.mjs";
|
|
3
|
+
import { i as resolveEventTransport } from "./EventTransport-BrPeGUil.mjs";
|
|
4
|
+
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "./store-helpers-kIJCY0wI.mjs";
|
|
4
5
|
import { and, anyOf, eq, lte, ne, or } from "@classytic/repo-core/filter";
|
|
5
6
|
import { randomBytes } from "node:crypto";
|
|
6
7
|
import { InvalidOutboxEventError, OutboxOwnershipError } from "@classytic/primitives/outbox";
|
|
@@ -814,8 +815,16 @@ function createOutboxModule(options) {
|
|
|
814
815
|
...options.batchSize !== void 0 ? { batchSize: options.batchSize } : {},
|
|
815
816
|
...options.leaseMs !== void 0 ? { leaseMs: options.leaseMs } : {},
|
|
816
817
|
consumerId: options.consumerId ?? mintConsumerId(name),
|
|
817
|
-
|
|
818
|
-
|
|
818
|
+
onError: options.onError ?? ((info) => {
|
|
819
|
+
fastify.log.error({
|
|
820
|
+
err: info.error,
|
|
821
|
+
kind: info.kind,
|
|
822
|
+
...info.event?.meta.id !== void 0 ? { eventId: info.event.meta.id } : {},
|
|
823
|
+
...info.event?.type !== void 0 ? { eventType: info.event.type } : {}
|
|
824
|
+
}, `outbox relay "${name}" failed`);
|
|
825
|
+
}),
|
|
826
|
+
...options.failurePolicy !== void 0 ? { failurePolicy: options.failurePolicy } : {},
|
|
827
|
+
...options.sessionProvider === false ? {} : { sessionProvider: options.sessionProvider ?? (() => transactionContext.get()) }
|
|
819
828
|
})
|
|
820
829
|
};
|
|
821
830
|
return exports;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { a as EventTransport, n as DomainEvent, t as DeadLetteredEvent } from "./EventTransport-BEVP50ka.mjs";
|
|
3
|
-
import { t as ArcModule } from "./types-
|
|
3
|
+
import { t as ArcModule } from "./types-DDD5RKTu.mjs";
|
|
4
4
|
import { FastifyInstance } from "fastify";
|
|
5
5
|
import { MemoryOutboxStore } from "@classytic/primitives/memory-outbox";
|
|
6
6
|
import { OutboxFailurePolicy, OutboxStore, OutboxWriteOptions } from "@classytic/primitives/outbox";
|
|
@@ -308,8 +308,22 @@ interface OutboxModuleOptions {
|
|
|
308
308
|
* Called for every non-fatal relay problem — publish failures, ownership mismatches,
|
|
309
309
|
* acknowledge failures.
|
|
310
310
|
*
|
|
311
|
-
*
|
|
312
|
-
*
|
|
311
|
+
* Omit to report through the Arc app's structured logger. Override for metrics, tracing, or
|
|
312
|
+
* external alerting. Silence here is the failure mode that matters: the relay keeps ticking,
|
|
313
|
+
* rows keep failing, and the only symptom is revenue that never posted.
|
|
314
|
+
*
|
|
315
|
+
* **Fires per EVENT, not per batch.** With the defaults (`batchSize: 100`,
|
|
316
|
+
* `relayEveryMs: 5000`) a transport outage emits up to 100 lines per tick —
|
|
317
|
+
* ~1,200/minute — and that is UNBOUNDED without a {@link
|
|
318
|
+
* OutboxModuleOptions.failurePolicy}: with no policy the row is failed with
|
|
319
|
+
* neither `retryAt` nor `deadLetter`, so it stays pending and is retried on
|
|
320
|
+
* every poll forever.
|
|
321
|
+
*
|
|
322
|
+
* Set a `failurePolicy` first — it bounds the retry loop and the logs
|
|
323
|
+
* together. Reach for a custom `onError` when you want a different SHAPE
|
|
324
|
+
* (aggregate per batch, sample, emit a metric); `() => {}` restores the
|
|
325
|
+
* pre-2.34 silence, which is a choice worth making explicitly rather than
|
|
326
|
+
* inheriting.
|
|
313
327
|
*/
|
|
314
328
|
onError?: OutboxRelayErrorHandler;
|
|
315
329
|
/**
|
|
@@ -322,6 +336,29 @@ interface OutboxModuleOptions {
|
|
|
322
336
|
* shape is exponential backoff up to N attempts, then dead-letter.
|
|
323
337
|
*/
|
|
324
338
|
failurePolicy?: OutboxFailurePolicy;
|
|
339
|
+
/**
|
|
340
|
+
* Unit-of-Work session provider. Defaults to `() => transactionContext.get()`.
|
|
341
|
+
*
|
|
342
|
+
* This is what makes the durable path the DEFAULT path rather than a
|
|
343
|
+
* discipline. `EventOutbox.store()` already auto-injects a session from this
|
|
344
|
+
* provider (explicit `options.session` still wins), and a `transactional:
|
|
345
|
+
* true` write now publishes its session on `transactionContext` — so with
|
|
346
|
+
* the default in place, `outbox.store(event)` inside a transactional write
|
|
347
|
+
* commits the event row atomically with the domain write. No threading the
|
|
348
|
+
* handle from the controller through every service layer to the call site.
|
|
349
|
+
*
|
|
350
|
+
* The default matters more than the capability: `auditPlugin` has defaulted
|
|
351
|
+
* its `sessionProvider` the same way since it shipped, while this module
|
|
352
|
+
* required every host to remember. A host that forgets does not get an
|
|
353
|
+
* error — it gets an event row written outside the transaction, which
|
|
354
|
+
* survives a rollback and reports something that never happened. That is
|
|
355
|
+
* precisely the guarantee an outbox exists to provide.
|
|
356
|
+
*
|
|
357
|
+
* Pass `false` (or `() => undefined`) to opt out — for a store whose
|
|
358
|
+
* writes must NOT join the caller's transaction (a separate connection,
|
|
359
|
+
* an external queue).
|
|
360
|
+
*/
|
|
361
|
+
sessionProvider?: (() => unknown) | false;
|
|
325
362
|
/**
|
|
326
363
|
* Run one relay pass at boot. Default `true` — a process that restarts with a backlog should
|
|
327
364
|
* drain it immediately rather than waiting a full interval, because that backlog is precisely
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { c as DataPolicy, d as UserBase, l as PermissionCheck, m as normalizeRoles, p as getUserRoles, s as AuthorizationDecision, u as PermissionContext } from "../base-
|
|
2
|
+
import { c as DataPolicy, d as UserBase, l as PermissionCheck, m as normalizeRoles, p as getUserRoles, s as AuthorizationDecision, u as PermissionContext } from "../base-GZU3LlzP.mjs";
|
|
3
3
|
import { a as applyFieldWritePermissions, i as applyFieldReadPermissions, n as FieldPermissionMap, o as fields, r as FieldPermissionType, s as resolveEffectiveRoles, t as FieldPermission } from "../fields-I_EeRWND.mjs";
|
|
4
|
-
import { $ as requireAuth, A as RequireGrantOptions, B as ConnectEventsOptions, C as requireServiceScope, D as GRANT_MODES, E as createRoleHierarchy, F as PermissionRequirement, G as createOrgPermissions, H as DynamicPermissionMatrixConfig, I as collectPublicSurface, J as allowPublic, K as allOf, L as describePermission, M as requireGrant, N as conjoinPolicyFilters, O as GrantMode, P as AccessExplanation, Q as not, R as describePermissionMap, S as requireScopeContext, T as RoleHierarchy, U as PermissionEventBus, V as DynamicPermissionMatrix, W as createDynamicPermissionMatrix, X as deny, Y as anyOf, Z as denyAll, _ as publicReadAdminWrite, a as PermissionMatrixRegistry, at as scopeOf, b as requireOrgMembership, c as introspectModule, ct as evaluatePermissionDecision, d as authenticated, dt as RequireMandateOptions, et as requireOwnership, f as fullPublic, ft as requireAgentScope, g as publicRead, h as presets_d_exports, i as PermissionMatrixOptions, it as when, j as modeSatisfies, k as GrantResolution, l as introspectRegistry, lt as normalizeToDecision, m as permissionMatrix, mt as requireMandate, n as PermissionEntryType, nt as requireRoles, o as buildPermissionMatrix, ot as PermissionCheckReturn, p as ownerWithAdminBypass, pt as requireDPoP, q as allow, r as PermissionMatrix, rt as roles, s as introspectCheck, st as applyAuthorizationDecision, t as PermissionEntry, tt as requirePlatformRole, u as adminOnly, ut as RequireAgentScopeOptions, v as readOnly, w as requireTeamMembership, x as requireOrgRole, y as requireOrgInScope, z as explainAccess } from "../index-
|
|
4
|
+
import { $ as requireAuth, A as RequireGrantOptions, B as ConnectEventsOptions, C as requireServiceScope, D as GRANT_MODES, E as createRoleHierarchy, F as PermissionRequirement, G as createOrgPermissions, H as DynamicPermissionMatrixConfig, I as collectPublicSurface, J as allowPublic, K as allOf, L as describePermission, M as requireGrant, N as conjoinPolicyFilters, O as GrantMode, P as AccessExplanation, Q as not, R as describePermissionMap, S as requireScopeContext, T as RoleHierarchy, U as PermissionEventBus, V as DynamicPermissionMatrix, W as createDynamicPermissionMatrix, X as deny, Y as anyOf, Z as denyAll, _ as publicReadAdminWrite, a as PermissionMatrixRegistry, at as scopeOf, b as requireOrgMembership, c as introspectModule, ct as evaluatePermissionDecision, d as authenticated, dt as RequireMandateOptions, et as requireOwnership, f as fullPublic, ft as requireAgentScope, g as publicRead, h as presets_d_exports, i as PermissionMatrixOptions, it as when, j as modeSatisfies, k as GrantResolution, l as introspectRegistry, lt as normalizeToDecision, m as permissionMatrix, mt as requireMandate, n as PermissionEntryType, nt as requireRoles, o as buildPermissionMatrix, ot as PermissionCheckReturn, p as ownerWithAdminBypass, pt as requireDPoP, q as allow, r as PermissionMatrix, rt as roles, s as introspectCheck, st as applyAuthorizationDecision, t as PermissionEntry, tt as requirePlatformRole, u as adminOnly, ut as RequireAgentScopeOptions, v as readOnly, w as requireTeamMembership, x as requireOrgRole, y as requireOrgInScope, z as explainAccess } from "../index-K7auNNW0.mjs";
|
|
5
5
|
export { type AccessExplanation, type AuthorizationDecision, type ConnectEventsOptions, type DataPolicy, type DynamicPermissionMatrix, type DynamicPermissionMatrixConfig, type FieldPermission, type FieldPermissionMap, type FieldPermissionType, GRANT_MODES, type GrantMode, type GrantResolution, type PermissionCheck, type PermissionCheckReturn, type PermissionContext, type PermissionEntry, type PermissionEntryType, type PermissionEventBus, type PermissionMatrix, type PermissionMatrixOptions, type PermissionMatrixRegistry, type PermissionRequirement, type RequireAgentScopeOptions, type RequireGrantOptions, type RequireMandateOptions, type RoleHierarchy, type UserBase, adminOnly, allOf, allow, allowPublic, anyOf, applyAuthorizationDecision, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, buildPermissionMatrix, collectPublicSurface, conjoinPolicyFilters, createDynamicPermissionMatrix, createOrgPermissions, createRoleHierarchy, deny, denyAll, describePermission, describePermissionMap, evaluatePermissionDecision, explainAccess, fields, fullPublic, getUserRoles, introspectCheck, introspectModule, introspectRegistry, modeSatisfies, normalizeRoles, normalizeToDecision, not, ownerWithAdminBypass, permissionMatrix, presets_d_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAgentScope, requireAuth, requireDPoP, requireGrant, requireMandate, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requirePlatformRole, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, resolveEffectiveRoles, roles, scopeOf, when };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as conjoinPolicyFilters, i as normalizeToDecision, r as evaluatePermissionDecision, t as applyAuthorizationDecision } from "../authorizationDecision-
|
|
3
|
-
import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-
|
|
4
|
-
import { i as resolveEffectiveRoles, n as applyFieldWritePermissions, r as fields, t as applyFieldReadPermissions } from "../fields-
|
|
5
|
-
import { A as requireAgentScope, B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, H as requirePlatformRole, I as anyOf, K as scopeOf, L as deny, M as requireMandate, N as allOf, O as requireServiceScope, P as allow, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, W as roles, _ as requireGrant, a as adminOnly, b as describePermissionMap, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, g as modeSatisfies, h as GRANT_MODES, i as introspectRegistry, j as requireDPoP, k as requireTeamMembership, l as permissionMatrix, m as createRoleHierarchy, n as introspectCheck, o as authenticated, p as readOnly, r as introspectModule, s as fullPublic, t as buildPermissionMatrix, u as presets_exports, v as collectPublicSurface, w as requireOrgInScope, x as explainAccess, y as describePermission, z as not } from "../permissions-
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as conjoinPolicyFilters, i as normalizeToDecision, r as evaluatePermissionDecision, t as applyAuthorizationDecision } from "../authorizationDecision-DYXBBgtg.mjs";
|
|
3
|
+
import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-AKcB4V03.mjs";
|
|
4
|
+
import { i as resolveEffectiveRoles, n as applyFieldWritePermissions, r as fields, t as applyFieldReadPermissions } from "../fields-UtpiJO5R.mjs";
|
|
5
|
+
import { A as requireAgentScope, B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, H as requirePlatformRole, I as anyOf, K as scopeOf, L as deny, M as requireMandate, N as allOf, O as requireServiceScope, P as allow, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, W as roles, _ as requireGrant, a as adminOnly, b as describePermissionMap, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, g as modeSatisfies, h as GRANT_MODES, i as introspectRegistry, j as requireDPoP, k as requireTeamMembership, l as permissionMatrix, m as createRoleHierarchy, n as introspectCheck, o as authenticated, p as readOnly, r as introspectModule, s as fullPublic, t as buildPermissionMatrix, u as presets_exports, v as collectPublicSurface, w as requireOrgInScope, x as explainAccess, y as describePermission, z as not } from "../permissions-CpSBlFXZ.mjs";
|
|
6
6
|
export { GRANT_MODES, adminOnly, allOf, allow, allowPublic, anyOf, applyAuthorizationDecision, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, buildPermissionMatrix, collectPublicSurface, conjoinPolicyFilters, createDynamicPermissionMatrix, createOrgPermissions, createRoleHierarchy, deny, denyAll, describePermission, describePermissionMap, evaluatePermissionDecision, explainAccess, fields, fullPublic, getUserRoles, introspectCheck, introspectModule, introspectRegistry, modeSatisfies, normalizeRoles, normalizeToDecision, not, ownerWithAdminBypass, permissionMatrix, presets_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAgentScope, requireAuth, requireDPoP, requireGrant, requireMandate, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requirePlatformRole, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, resolveEffectiveRoles, roles, scopeOf, when };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-CEvvVXTC.mjs";
|
|
3
3
|
import { arcLog } from "./logger/index.mjs";
|
|
4
|
-
import { a as conjoinPolicyFilters, i as normalizeToDecision } from "./authorizationDecision-
|
|
5
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
6
|
-
import { C as isService, S as isOrgInScope, a as getDPoPJkt, b as isElevated, d as getScopeContext, f as getScopeContextMap, g as getUserId, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, u as getRequestScope, v as hasOrgAccess, x as isMember } from "./types-
|
|
7
|
-
import { t as MemoryCacheStore } from "./memory-
|
|
4
|
+
import { a as conjoinPolicyFilters, i as normalizeToDecision } from "./authorizationDecision-DYXBBgtg.mjs";
|
|
5
|
+
import { n as getUserRoles } from "./userHelpers-AKcB4V03.mjs";
|
|
6
|
+
import { C as isService, S as isOrgInScope, a as getDPoPJkt, b as isElevated, d as getScopeContext, f as getScopeContextMap, g as getUserId, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, u as getRequestScope, v as hasOrgAccess, x as isMember } from "./types-GY4kATJb.mjs";
|
|
7
|
+
import { t as MemoryCacheStore } from "./memory-BwedEXau.mjs";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
//#region src/permissions/context.ts
|
|
10
10
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as ForbiddenError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as ForbiddenError } from "./errors-CLid6atr.mjs";
|
|
3
3
|
//#region src/pipeline/pipe.ts
|
|
4
4
|
/**
|
|
5
5
|
* Compose pipeline steps into an ordered array.
|