@classytic/arc 2.34.0 → 2.36.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-CbkuhNI2.mjs → BaseController-CTJKm6Cb.mjs} +95 -14
- package/dist/{EventTransport-tq4CEB-q.mjs → EventTransport-D23Uvhg4.mjs} +1 -1
- package/dist/{HookSystem-DqXkMXkB.mjs → HookSystem-DgwxNZTx.mjs} +6 -4
- package/dist/{ResourceRegistry-DoALUlOO.mjs → ResourceRegistry-DNuYVbmv.mjs} +2 -2
- package/dist/{pipeline-q69DZzgG.mjs → actionPermissions-D97DniUQ.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-CMMLWmuZ.mjs → authorizationDecision-EsiY3nUu.mjs} +2 -2
- package/dist/{base-Csjc2oF-.d.mts → base-C-NL2fTi.d.mts} +16 -1
- package/dist/{buildHandler-BrdYrG_1.mjs → buildHandler-Dohd2JuY.mjs} +4 -4
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-BcGmvnHh.mjs → caching-CP3GLJ7U.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-DUoKAGYD.mjs} +1 -1
- package/dist/context/index.d.mts +16 -1
- package/dist/context/index.mjs +64 -4
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.mjs +7 -8
- package/dist/{core-BYKa8wHu.mjs → core-DTXsiNTJ.mjs} +3 -3
- package/dist/{createActionRouter-D6T0jWhS.mjs → createActionRouter-CZz6JO93.mjs} +27 -64
- package/dist/{createAggregationRouter-QLV2PrWP.mjs → createAggregationRouter-DKrGv_EC.mjs} +7 -7
- package/dist/defineAggregation-CpQfcM8R.mjs +25 -0
- package/dist/{defineResource-ZhuLonLm.mjs → defineResource-DWzjyxb2.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-D_cmo80j.mjs} +4 -4
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-C7xBqHsI.mjs → errorHandler-2RT0hLSI.mjs} +3 -3
- package/dist/{errors-Cd_yy7aW.mjs → errors-DDKni6Tz.mjs} +1 -1
- package/dist/{eventPlugin-DSNEZWfV.d.mts → eventPlugin-B47sfCJ8.d.mts} +1 -1
- package/dist/{eventPlugin-Dar8qRaj.mjs → eventPlugin-c3YwGzz9.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-Bk_9PoiV.d.mts} +3 -3
- package/dist/{fields-CojeUkS4.mjs → fields-DdP225wt.mjs} +1 -1
- package/dist/{generate-DiB0nHPR.mjs → generate-B1bKdcV9.mjs} +2 -2
- package/dist/{headers-CveNO9gR.mjs → headers-DKslnhey.mjs} +2 -2
- package/dist/{health-CasG2A28.mjs → health-k6NODS8f.mjs} +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/idempotency/index.mjs +22 -56
- package/dist/idempotency/redis.mjs +1 -1
- package/dist/{index-B-DvUzsr.d.mts → index-BtYoMip1.d.mts} +21 -3
- package/dist/{index-BcR2bFZQ.d.mts → index-C01wWGJt.d.mts} +33 -105
- package/dist/{index-C5NnMEKF.d.mts → index-C50BUxKs.d.mts} +1 -1
- package/dist/{index-CFAJEWCX.d.mts → index-RdpLP71b.d.mts} +7 -30
- package/dist/{index-ugr1tQlW.d.mts → index-eyg5WEcy.d.mts} +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +11 -12
- package/dist/{init-mdJ-v4Xp.mjs → init-LuGxIbQ_.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 +4 -2
- package/dist/integrations/webhooks.mjs +28 -27
- 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-B7awDx3b.mjs} +1 -1
- package/dist/{jsonBody-CfGH-GxO.mjs → jsonBody-CiHih3ZU.mjs} +2 -2
- package/dist/{keys-WeKvY1dE.mjs → keys-BcNl12HN.mjs} +1 -1
- package/dist/{loadResources-Bj-aSsXi.mjs → loadResources-DGlfRQc9.mjs} +2 -2
- package/dist/{loadResourcesFromEntry-DwaxNcE2.mjs → loadResourcesFromEntry-VYPGSas8.mjs} +2 -2
- package/dist/logger/index.d.mts +23 -4
- package/dist/logger/index.mjs +50 -7
- package/dist/{mcpPlugin-DX3PHD7K.mjs → mcpPlugin-NxSlc-Ks.mjs} +15 -16
- package/dist/{memory-qYSB7rMQ.mjs → memory-BU-C-MV3.mjs} +2 -2
- package/dist/{metrics-D7uchLjN.mjs → metrics-7_1GbJpl.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-CQNHzE7g.mjs} +1 -1
- package/dist/{multipartBody-4w-S3-PU.mjs → multipartBody-Bi5yqW0M.mjs} +1 -1
- package/dist/{openapi-CkV5mQ53.mjs → openapi-RpNbPBL-.mjs} +6 -6
- package/dist/outbox-admin/index.d.mts +2 -2
- package/dist/outbox-admin/index.mjs +4 -4
- package/dist/{outbox-module-D1QfHqO4.mjs → outbox-module-ClcFrq98.mjs} +6 -4
- package/dist/{outbox-module-C1Bs_FXF.d.mts → outbox-module-b1TyDGGi.d.mts} +24 -1
- package/dist/permissions/index.d.mts +2 -2
- package/dist/permissions/index.mjs +5 -5
- package/dist/{permissions-CP47jdi7.mjs → permissions-DgPrZsJh.mjs} +36 -9
- package/dist/{pipe-BzzoEhHj.mjs → pipe-Cjy1UiXX.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-B7m0dPm8.mjs} +1 -1
- package/dist/{preloadResources-g07ldtzh.d.mts → preloadResources-BuutdWgr.d.mts} +54 -270
- package/dist/{createApp-zR-DEesr.mjs → preloadResources-CjnW4iIX.mjs} +170 -34
- 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-BAPijK_A.mjs → presets-CsGg8B58.mjs} +4 -4
- package/dist/{projection-BKM0Ui-s.mjs → projection-koISNyQo.mjs} +2 -2
- package/dist/{queryCachePlugin-DhsZ0ZIc.mjs → queryCachePlugin-DHueQT9O.mjs} +5 -5
- package/dist/{rateLimitKey-XngqVNEV.mjs → rateLimitKey-Bma8VXDO.mjs} +1 -1
- package/dist/{realtime-G1TC6Yzc.mjs → realtime-BBoC91Bz.mjs} +9 -9
- package/dist/{rateLimit-D4-ASwsI.mjs → registerRoute-BTgORTlR.mjs} +114 -3
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-CLxCR5LF.mjs → registry-BzvRCYS6.mjs} +15 -56
- package/dist/{renewingLease-BnWtbA2U.mjs → renewingLease-CgIGh0Ab.mjs} +14 -2
- package/dist/{replyHelpers-BSBVCwL3.mjs → replyHelpers-BN16KPHr.mjs} +2 -2
- package/dist/{requestContext-uYE35JxI.mjs → requestContext-B93dmpf0.mjs} +1 -1
- package/dist/{rolldown-runtime-DNg-KNCk.mjs → rolldown-runtime-JJWfp8rp.mjs} +1 -1
- package/dist/{runtimeCapabilities-Dm88DaTW.mjs → runtimeCapabilities-jK99Ciw_.mjs} +1 -1
- package/dist/{schedules-CAcZgia0.mjs → schedules-CKKEL21P.mjs} +6 -4
- package/dist/{schemaConverter-XH1RZRyu.mjs → schemaConverter-gg0_aUPF.mjs} +19 -32
- package/dist/{schemaIR-CDvclAew.mjs → schemaIR-CngYvpCF.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-B1RsHdjF.mjs} +4 -4
- package/dist/simpleEqualityMatcher-_9NAMHUD.mjs +43 -0
- package/dist/{sse-Cf0jUHsh.mjs → sse-Bxt03Hk5.mjs} +5 -5
- package/dist/{sseStream-Bvpi-UXQ.mjs → sseStream-BMHTLlhR.mjs} +2 -2
- package/dist/{store-helpers-B88p99Z2.mjs → store-helpers-Brt8OxWZ.mjs} +1 -1
- package/dist/{streaming-DsT1B5zJ.mjs → streaming-CiTJW8kZ.mjs} +1 -1
- package/dist/{subscribe-helpers-CLIOHsOK.mjs → subscribe-helpers-B4fNHRNc.mjs} +21 -49
- 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-D2HwJM2z.mjs} +1 -1
- package/dist/{typeGuards-jjKJDN13.mjs → typeGuards-IE1laMDf.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-CoqIRrkY.mjs → types-B8lwJv9Q.mjs} +10 -53
- package/dist/{types-BfC83KsP.d.mts → types-BXnTOsXP.d.mts} +1 -1
- package/dist/{types-BcTumAz_.d.mts → types-DDD5RKTu.d.mts} +30 -87
- package/dist/{types-ChuShpCP.d.mts → types-Ddl9OjmE.d.mts} +18 -121
- package/dist/usage/index.d.mts +2 -2
- package/dist/usage/index.mjs +0 -0
- package/dist/{userHelpers-CWF5pbZD.mjs → userHelpers-xQAi5bPF.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-DgNFsJ2c.mjs} +3 -3
- package/dist/{validate-CdQlz52F.mjs → validate-DI3L5V9w.mjs} +2 -2
- package/dist/{versioning-rZbyLVD-.mjs → versioning-COpAyfpZ.mjs} +3 -3
- package/package.json +8 -8
- 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-Ba8v0PCa.mjs +0 -113
- package/dist/repositoryFilter-BANpz6BX.mjs +0 -78
- package/dist/simpleEqualityMatcher-Se8VrsaP.mjs +0 -69
|
@@ -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.36.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-jK99Ciw_.mjs";
|
|
3
|
+
import { i as exponentialBackoff, t as createOutboxModule } from "../outbox-module-ClcFrq98.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
|
/**
|
|
@@ -442,6 +429,8 @@ function createWebhookDeliveryTransport(options) {
|
|
|
442
429
|
timestamp,
|
|
443
430
|
deliveryId: payload.event.meta.id
|
|
444
431
|
});
|
|
432
|
+
const extraHeaders = options.resolveHeaders ? await options.resolveHeaders(sub, payload.event) : {};
|
|
433
|
+
assertWebhookHeaderOverrides(extraHeaders);
|
|
445
434
|
const ac = new AbortController();
|
|
446
435
|
const timer = setTimeout(() => ac.abort(), timeout);
|
|
447
436
|
let response;
|
|
@@ -452,7 +441,8 @@ function createWebhookDeliveryTransport(options) {
|
|
|
452
441
|
"content-type": "application/json",
|
|
453
442
|
"x-arc-webhook-signature": v1Signature,
|
|
454
443
|
"x-arc-webhook-timestamp": String(timestamp),
|
|
455
|
-
"x-arc-webhook-delivery": payload.event.meta.id
|
|
444
|
+
"x-arc-webhook-delivery": payload.event.meta.id,
|
|
445
|
+
...extraHeaders
|
|
456
446
|
},
|
|
457
447
|
body,
|
|
458
448
|
signal: ac.signal,
|
|
@@ -515,7 +505,7 @@ function webhookDeliveryFailurePolicy(options = {}) {
|
|
|
515
505
|
* boot-checked, not discovered on the first row.
|
|
516
506
|
*/
|
|
517
507
|
function createDurableWebhookModule(options) {
|
|
518
|
-
const { name, delivery, failurePolicy, fetch, timeout, validateUrl, ...outboxOptions } = options;
|
|
508
|
+
const { name, delivery, failurePolicy, fetch, timeout, validateUrl, resolveHeaders, ...outboxOptions } = options;
|
|
519
509
|
return createOutboxModule({
|
|
520
510
|
...outboxOptions,
|
|
521
511
|
name: name ?? "webhook-delivery",
|
|
@@ -533,11 +523,22 @@ function createDurableWebhookModule(options) {
|
|
|
533
523
|
},
|
|
534
524
|
...fetch !== void 0 ? { fetch } : {},
|
|
535
525
|
...timeout !== void 0 ? { timeout } : {},
|
|
536
|
-
...validateUrl !== void 0 ? { validateUrl } : {}
|
|
526
|
+
...validateUrl !== void 0 ? { validateUrl } : {},
|
|
527
|
+
...resolveHeaders !== void 0 ? { resolveHeaders } : {}
|
|
537
528
|
});
|
|
538
529
|
},
|
|
539
530
|
failurePolicy: failurePolicy ?? webhookDeliveryFailurePolicy(delivery)
|
|
540
531
|
});
|
|
541
532
|
}
|
|
533
|
+
const RESERVED_WEBHOOK_HEADERS = /* @__PURE__ */ new Set([
|
|
534
|
+
"content-type",
|
|
535
|
+
"x-arc-webhook-signature",
|
|
536
|
+
"x-arc-webhook-timestamp",
|
|
537
|
+
"x-arc-webhook-delivery"
|
|
538
|
+
]);
|
|
539
|
+
function assertWebhookHeaderOverrides(headers) {
|
|
540
|
+
const reserved = Object.keys(headers).find((name) => RESERVED_WEBHOOK_HEADERS.has(name.toLowerCase()));
|
|
541
|
+
if (reserved) throw new WebhookDeliveryError(`webhook authentication header '${reserved}' is reserved`, { transient: false });
|
|
542
|
+
}
|
|
542
543
|
//#endregion
|
|
543
544
|
export { WEBHOOK_DELIVERY_EVENT, WebhookDeliveryError, createDurableWebhookModule, createWebhookDeliveryTransport, webhooks_default as default, defaultWebhookUrlPolicy, signWebhook, verifySignature, verifyWebhook, webhookDeliveryFailurePolicy, webhookPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ArcError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ArcError } from "./errors-DDKni6Tz.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.36.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-JJWfp8rp.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.36.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ResourceRegistry } from "./ResourceRegistry-DNuYVbmv.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.36.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.36.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as evaluatePermissionDecision } from "./authorizationDecision-EsiY3nUu.mjs";
|
|
3
|
+
import { p as isArcError, t as ArcError } from "./errors-DDKni6Tz.mjs";
|
|
4
|
+
import { n as requireSingleHeaderValue } from "./headers-DKslnhey.mjs";
|
|
5
|
+
import { b as isElevated, c as getOrgId, g as getUserId, x as isMember } from "./types-B8lwJv9Q.mjs";
|
|
6
|
+
import { t as BaseController } from "./BaseController-CTJKm6Cb.mjs";
|
|
7
|
+
import { i as resolveEffectiveRoles, t as applyFieldReadPermissions } from "./fields-DdP225wt.mjs";
|
|
8
|
+
import { t as executePipeline } from "./pipe-Cjy1UiXX.mjs";
|
|
9
|
+
import { t as buildRequestScopeProjection } from "./projection-koISNyQo.mjs";
|
|
10
|
+
import { i as resolvePipelineSteps, t as resolveActionPermission } from "./actionPermissions-D97DniUQ.mjs";
|
|
11
|
+
import { n as validateAggregations } from "./validate-DI3L5V9w.mjs";
|
|
12
|
+
import { n as executeAggregation } from "./buildHandler-Dohd2JuY.mjs";
|
|
13
|
+
import { t as pluralize } from "./pluralize-B7m0dPm8.mjs";
|
|
14
|
+
import { t as createIdempotencyResult } from "./interface-B7awDx3b.mjs";
|
|
15
|
+
import { r as shouldRejectAdditionalProperties, t as normalizeSchemaIR } from "./schemaIR-CngYvpCF.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.36.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-JJWfp8rp.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.36.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-JJWfp8rp.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-C01wWGJt.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.36.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "../constants-DUoKAGYD.mjs";
|
|
3
|
+
import { t as multipartBody } from "../multipartBody-Bi5yqW0M.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.36.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as startRenewingLease } from "../renewingLease-CgIGh0Ab.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.36.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as getUserRoles } from "./userHelpers-xQAi5bPF.mjs";
|
|
3
|
+
import { n as convertRouteSchema } from "./schemaConverter-gg0_aUPF.mjs";
|
|
4
|
+
import { t as resolveActionPermission } from "./actionPermissions-D97DniUQ.mjs";
|
|
5
|
+
import { t as pluralize } from "./pluralize-B7m0dPm8.mjs";
|
|
6
|
+
import { t as buildActionBodySchema } from "./createActionRouter-CZz6JO93.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-C-NL2fTi.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.36.0 | MIT | https://classytic.com */
|
|
2
|
+
import { i as NotFoundError, u as ValidationError } from "../errors-DDKni6Tz.mjs";
|
|
3
|
+
import { t as defineResource } from "../defineResource-DWzjyxb2.mjs";
|
|
4
|
+
import { n as getModuleExports, t as defineModule } from "../module-CQNHzE7g.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.36.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as transactionContext } from "./transactionContext-D2HwJM2z.mjs";
|
|
3
|
+
import { i as resolveEventTransport } from "./EventTransport-D23Uvhg4.mjs";
|
|
4
|
+
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "./store-helpers-Brt8OxWZ.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";
|
|
@@ -822,7 +823,8 @@ function createOutboxModule(options) {
|
|
|
822
823
|
...info.event?.type !== void 0 ? { eventType: info.event.type } : {}
|
|
823
824
|
}, `outbox relay "${name}" failed`);
|
|
824
825
|
}),
|
|
825
|
-
...options.failurePolicy !== void 0 ? { failurePolicy: options.failurePolicy } : {}
|
|
826
|
+
...options.failurePolicy !== void 0 ? { failurePolicy: options.failurePolicy } : {},
|
|
827
|
+
...options.sessionProvider === false ? {} : { sessionProvider: options.sessionProvider ?? (() => transactionContext.get()) }
|
|
826
828
|
})
|
|
827
829
|
};
|
|
828
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";
|
|
@@ -336,6 +336,29 @@ interface OutboxModuleOptions {
|
|
|
336
336
|
* shape is exponential backoff up to N attempts, then dead-letter.
|
|
337
337
|
*/
|
|
338
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;
|
|
339
362
|
/**
|
|
340
363
|
* Run one relay pass at boot. Default `true` — a process that restarts with a backlog should
|
|
341
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-C-NL2fTi.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-BtYoMip1.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.36.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as conjoinPolicyFilters, i as normalizeToDecision, r as evaluatePermissionDecision, t as applyAuthorizationDecision } from "../authorizationDecision-EsiY3nUu.mjs";
|
|
3
|
+
import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-xQAi5bPF.mjs";
|
|
4
|
+
import { i as resolveEffectiveRoles, n as applyFieldWritePermissions, r as fields, t as applyFieldReadPermissions } from "../fields-DdP225wt.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-DgPrZsJh.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 };
|