@classytic/arc 2.32.0 → 2.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/arc.js +58 -17
- package/dist/{BaseController-Dk34dxhI.mjs → BaseController-CaQC5EXX.mjs} +293 -33
- package/dist/{EventTransport-2uVV34WU.d.mts → EventTransport-BEVP50ka.d.mts} +16 -0
- package/dist/{EventTransport-BV10D0oG.mjs → EventTransport-tq4CEB-q.mjs} +39 -2
- package/dist/{HookSystem-vimw5D7Z.mjs → HookSystem-DqXkMXkB.mjs} +2 -2
- package/dist/{ResourceRegistry-BVr7PgA0.mjs → ResourceRegistry-DoALUlOO.mjs} +3 -2
- package/dist/{actionPermissions-Dti7ebyv.mjs → actionPermissions-CUeCmpUd.mjs} +1 -1
- 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 +39 -7
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-__T3EJDA.mjs → authorizationDecision-B3mP_QTy.mjs} +2 -2
- package/dist/{types-B7XeLEgK.d.mts → base-Csjc2oF-.d.mts} +74 -74
- package/dist/{buildHandler-Dn7rzUJo.mjs → buildHandler-DLE9xX-V.mjs} +4 -4
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-DFJqHyFs.mjs → caching-BcGmvnHh.mjs} +2 -2
- package/dist/cleanup/index.d.mts +17 -5
- package/dist/cleanup/index.mjs +240 -7
- 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-J99LGTJI.mjs → constants-BxCoxmiN.mjs} +1 -1
- package/dist/context/index.mjs +3 -3
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.mjs +7 -7
- package/dist/{core-BwwmNSp7.mjs → core-dxhcHhUD.mjs} +3 -3
- package/dist/{createActionRouter-DkJZWo0m.mjs → createActionRouter-DVpoA0do.mjs} +8 -8
- package/dist/{createAggregationRouter-B1exOVD8.mjs → createAggregationRouter-B_B48JZ-.mjs} +7 -7
- package/dist/{createApp-Bv0m-Q6_.mjs → createApp-CLGegqiG.mjs} +128 -24
- package/dist/{defineAggregation-gX4No1gt.mjs → defineAggregation-Nv-DwfOf.mjs} +1 -1
- package/dist/{defineResource-XFPPUu2c.mjs → defineResource-DR9vsUYy.mjs} +297 -23
- 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-DNXXxgjl.mjs → elevation-B0tlY8y1.mjs} +4 -4
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-B2AZUJUj.mjs → errorHandler-C7xBqHsI.mjs} +42 -5
- package/dist/{errorHandler-CpYUJmPA.d.mts → errorHandler-DI5AN2b5.d.mts} +14 -3
- package/dist/{errors-Bh1KK5ps.mjs → errors-Cd_yy7aW.mjs} +1 -1
- package/dist/{eventPlugin-GF5nnBIq.d.mts → eventPlugin-DSNEZWfV.d.mts} +29 -1
- package/dist/{eventPlugin-Dk_TyXeE.mjs → eventPlugin-Dar8qRaj.mjs} +65 -9
- package/dist/events/index.d.mts +5 -351
- package/dist/events/index.mjs +5 -780
- package/dist/events/transports/redis-stream-entry.d.mts +1 -1
- package/dist/events/transports/redis-stream-entry.mjs +1 -1
- package/dist/events/transports/redis.d.mts +1 -1
- package/dist/events/transports/redis.mjs +1 -1
- package/dist/factory/index.d.mts +20 -5
- package/dist/factory/index.mjs +7 -7
- package/dist/{fastify-augmentation-BppG5bMT.d.mts → fastify-augmentation-DVsTAy6X.d.mts} +3 -3
- package/dist/{fields-DEi65pGj.mjs → fields-CojeUkS4.mjs} +1 -1
- package/dist/{generate-CRSG0jTv.mjs → generate-DiB0nHPR.mjs} +2 -2
- package/dist/{headers-BXjQYbeC.mjs → headers-CveNO9gR.mjs} +2 -2
- package/dist/{health-5XnTa2uo.mjs → health-CasG2A28.mjs} +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/idempotency/index.d.mts +45 -1
- package/dist/idempotency/index.mjs +91 -9
- package/dist/idempotency/redis.mjs +1 -1
- package/dist/{index-zq6VrjaB.d.mts → index-B-DvUzsr.d.mts} +12 -2
- package/dist/{index-CpzxqePp.d.mts → index-BcR2bFZQ.d.mts} +707 -373
- package/dist/{index-DXlHwvuE.d.mts → index-Brin0ODU.d.mts} +4 -4
- package/dist/{index-ZWhLTp_s.d.mts → index-C5NnMEKF.d.mts} +1 -1
- package/dist/{index-C-481Zf2.d.mts → index-ugr1tQlW.d.mts} +17 -1
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +11 -11
- package/dist/{init-BbfP8aky.mjs → init-mdJ-v4Xp.mjs} +18 -12
- package/dist/integrations/event-gateway.d.mts +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 +99 -97
- package/dist/integrations/mcp/index.d.mts +12 -3
- package/dist/integrations/mcp/index.mjs +2 -2
- package/dist/integrations/mcp/testing.d.mts +1 -1
- package/dist/integrations/mcp/testing.mjs +2 -2
- package/dist/integrations/streamline.mjs +3 -3
- package/dist/integrations/webhooks.d.mts +124 -1
- package/dist/integrations/webhooks.mjs +180 -2
- 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-BP4IJCBO.mjs → interface-DznJrm9R.mjs} +1 -1
- package/dist/{jsonBody-DDSR2HFl.mjs → jsonBody-CfGH-GxO.mjs} +2 -2
- package/dist/{keys-B-HBTGXl.mjs → keys-WeKvY1dE.mjs} +1 -1
- package/dist/{loadResources-DisEAmkm.mjs → loadResources-Bj-aSsXi.mjs} +2 -2
- package/dist/{loadResourcesFromEntry-D1MJp13f.mjs → loadResourcesFromEntry-DwaxNcE2.mjs} +2 -2
- package/dist/logger/index.mjs +1 -1
- package/dist/{mcpPlugin-CpfVpKHE.mjs → mcpPlugin-aJg5TqHi.mjs} +60 -21
- package/dist/{memory-DsuWnj4T.mjs → memory-qYSB7rMQ.mjs} +2 -2
- package/dist/{metrics-DdQL8syd.mjs → metrics-D7uchLjN.mjs} +2 -2
- package/dist/middleware/index.d.mts +1 -1
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module-Br81am6m.mjs → module-CwKsgZXp.mjs} +1 -1
- package/dist/{multipartBody-BnkBLN7v.mjs → multipartBody-4w-S3-PU.mjs} +1 -1
- package/dist/{openapi-DIRzvxC0.mjs → openapi-BN5cQaO2.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 +839 -0
- package/dist/outbox-module-D-VFq37T.d.mts +368 -0
- package/dist/permissions/index.d.mts +2 -2
- package/dist/permissions/index.mjs +5 -5
- package/dist/{permissions-Dl_m0NCe.mjs → permissions-BAfwgBxc.mjs} +25 -6
- package/dist/{pipe-ELHCP3zj.mjs → pipe-BzzoEhHj.mjs} +2 -2
- package/dist/pipeline/index.d.mts +1 -1
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{pipeline-CPA-jx0M.mjs → pipeline-q69DZzgG.mjs} +6 -6
- package/dist/plugins/index.d.mts +6 -6
- package/dist/plugins/index.mjs +16 -16
- package/dist/plugins/response-cache.mjs +2 -2
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-C2ZkKbsn.mjs → pluralize-B7xf8qZF.mjs} +1 -1
- package/dist/{preloadResources-CDs87fTw.mjs → preloadResources-BkyqeTDz.mjs} +1 -1
- package/dist/{preloadResources-T1hmlTEZ.d.mts → preloadResources-g07ldtzh.d.mts} +30 -7
- package/dist/presets/filesUpload.d.mts +2 -2
- 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 +2 -2
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-Dntd_pUO.mjs → presets-D-h0uWtP.mjs} +4 -4
- package/dist/projection-BKM0Ui-s.mjs +42 -0
- package/dist/{queryCachePlugin-Dhps-Ldt.mjs → queryCachePlugin-DhsZ0ZIc.mjs} +49 -7
- package/dist/{rateLimit-C7mmAGs3.mjs → rateLimit-D4-ASwsI.mjs} +2 -2
- package/dist/{rateLimitKey-CccEFBfk.mjs → rateLimitKey-XngqVNEV.mjs} +1 -1
- package/dist/{realtime-DVvVZZFz.mjs → realtime-CTkv3O59.mjs} +9 -9
- package/dist/{redis-stream-qN6A-RFv.d.mts → redis-stream-mwLWlfHG.d.mts} +1 -1
- package/dist/{registerRoute-B_QrjYZS.mjs → registerRoute-DNnd3vkz.mjs} +4 -4
- package/dist/registry/index.d.mts +3 -3
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-DqUmzA9W.mjs → registry-CLxCR5LF.mjs} +2 -2
- package/dist/{renewingLease-BpP9wwj7.mjs → renewingLease-BnWtbA2U.mjs} +1 -1
- package/dist/{replyHelpers-DS-P0b32.mjs → replyHelpers-BSBVCwL3.mjs} +2 -2
- package/dist/{repositoryFilter-DotlxG3L.mjs → repositoryFilter-DKny7PDn.mjs} +1 -1
- package/dist/{requestContext-B6vQF-sy.mjs → requestContext-uYE35JxI.mjs} +1 -1
- package/dist/{rolldown-runtime-BhflRrBs.mjs → rolldown-runtime-DNg-KNCk.mjs} +1 -1
- package/dist/runtimeCapabilities-Dm88DaTW.mjs +49 -0
- package/dist/{schedules-C2Q3uv2d.mjs → schedules-CAcZgia0.mjs} +3 -3
- package/dist/{schemaConverter-Crjvczi_.mjs → schemaConverter-XH1RZRyu.mjs} +1 -1
- package/dist/{schemaIR-CnyKK_1j.mjs → schemaIR-CDvclAew.mjs} +2 -2
- package/dist/schemas/index.mjs +1 -1
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-afz_Ieek.mjs → scope-BaWcqBvr.mjs} +4 -4
- package/dist/{simpleEqualityMatcher-C4KiMWUa.mjs → simpleEqualityMatcher-Se8VrsaP.mjs} +1 -1
- package/dist/{sse-B9P4Y-UI.mjs → sse-Cf0jUHsh.mjs} +5 -5
- package/dist/{sseStream-B3zb_d1h.mjs → sseStream-Bvpi-UXQ.mjs} +2 -2
- package/dist/{store-helpers-DmEMHlPQ.mjs → store-helpers-B88p99Z2.mjs} +1 -1
- package/dist/{streaming-DPZdQmDz.mjs → streaming-DsT1B5zJ.mjs} +1 -1
- package/dist/{subscribe-helpers-sp5xTDVA.mjs → subscribe-helpers-CLIOHsOK.mjs} +2 -2
- package/dist/sync/changelog.mjs +1 -1
- package/dist/testing/cleanupStoreContract.d.mts +1 -1
- package/dist/testing/cleanupStoreContract.mjs +3 -1
- package/dist/testing/index.d.mts +24 -12
- package/dist/testing/index.mjs +24 -12
- package/dist/testing/outboxStoreContract.mjs +1 -1
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{transactionContext-BvLKvOIL.mjs → transactionContext-BYtWnwAS.mjs} +1 -1
- package/dist/{typeGuards-B_5-hKjJ.mjs → typeGuards-jjKJDN13.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-CT5vu6M0.d.mts → types-BcTumAz_.d.mts} +41 -7
- package/dist/{types-CwcUQ610.d.mts → types-BfC83KsP.d.mts} +15 -1
- package/dist/{types-DXYX7dIR.mjs → types-CoqIRrkY.mjs} +4 -4
- package/dist/{types-C4QE8qnm.d.mts → types-DVLddu2q.d.mts} +144 -1
- package/dist/usage/index.d.mts +1 -1
- package/dist/usage/index.mjs +0 -0
- package/dist/{userHelpers-BNsOXzOd.mjs → userHelpers-CWF5pbZD.mjs} +1 -1
- package/dist/utils/index.d.mts +57 -5
- package/dist/utils/index.mjs +12 -11
- package/dist/{utils-BtOha_Sp.mjs → utils-h1V_sT-t.mjs} +38 -7
- package/dist/{validate-PMCPR9El.mjs → validate-CdQlz52F.mjs} +2 -2
- package/dist/{versioning-D_rhHfZm.d.mts → versioning-DEs-_hFi.d.mts} +1 -1
- package/dist/{versioning-CKv2jz_U.mjs → versioning-rZbyLVD-.mjs} +3 -3
- package/package.json +17 -16
- package/skills/arc/SKILL.md +96 -4
- package/skills/arc/references/api-reference.md +19 -0
- package/skills/arc/references/production.md +2 -2
- package/dist/projection-CjHhM5W1.mjs +0 -18
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { Y as PresetResult } from "../index-CpzxqePp.mjs";
|
|
3
2
|
import { i as RequestScope } from "../types-ChuShpCP.mjs";
|
|
4
|
-
import {
|
|
3
|
+
import { l as PermissionCheck } from "../base-Csjc2oF-.mjs";
|
|
4
|
+
import { Y as PresetResult } from "../index-BcR2bFZQ.mjs";
|
|
5
5
|
import { a as StorageReadResult, i as StorageReadRange, n as StorageContext, o as StorageUploadInput, r as StorageFile, t as Storage } from "../storage-Cx9Sz3Ou.mjs";
|
|
6
6
|
//#region src/presets/filesUpload.d.ts
|
|
7
7
|
interface FilesUploadPresetRoutes {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { i as NotFoundError, u as ValidationError } from "../errors-
|
|
3
|
-
import { c as getOrgId, g as getUserId } from "../types-
|
|
4
|
-
import { B as requireAuth, F as allowPublic } from "../permissions-
|
|
5
|
-
import { t as multipartBody } from "../multipartBody-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { i as NotFoundError, u as ValidationError } from "../errors-Cd_yy7aW.mjs";
|
|
3
|
+
import { c as getOrgId, g as getUserId } from "../types-CoqIRrkY.mjs";
|
|
4
|
+
import { B as requireAuth, F as allowPublic } from "../permissions-BAfwgBxc.mjs";
|
|
5
|
+
import { t as multipartBody } from "../multipartBody-4w-S3-PU.mjs";
|
|
6
6
|
//#region src/presets/filesUpload.ts
|
|
7
7
|
const DEFAULT_FIELD_NAME = "file";
|
|
8
8
|
const DEFAULT_MAX_FILE_SIZE = 10485760;
|
package/dist/presets/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { t as AnyRecord } from "../base-Csjc2oF-.mjs";
|
|
3
|
+
import { Fn as IControllerResponse, In as IRequestContext, U as ResourceConfig, Y as PresetResult, d as PaginationResult } from "../index-BcR2bFZQ.mjs";
|
|
4
4
|
import { FilesUploadPresetOptions, FilesUploadPresetPermissions, FilesUploadPresetRoutes, filesUploadPreset } from "./filesUpload.mjs";
|
|
5
5
|
import { MultiTenantOptions, TenantFieldSpec, multiTenantPreset } from "./multiTenant.mjs";
|
|
6
6
|
import { SearchHandler, SearchPresetOptions, SearchRouteConfig, searchPreset } from "./search.mjs";
|
package/dist/presets/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
2
|
import { multiTenantPreset } from "./multiTenant.mjs";
|
|
3
|
-
import { a as registerPreset, c as auditedPreset, d as ownedByUserPreset, i as getPreset, l as softDeletePreset, n as flexibleMultiTenantPreset, o as treePreset, r as getAvailablePresets, s as bulkPreset, t as applyPresets, u as slugLookupPreset } from "../presets-
|
|
3
|
+
import { a as registerPreset, c as auditedPreset, d as ownedByUserPreset, i as getPreset, l as softDeletePreset, n as flexibleMultiTenantPreset, o as treePreset, r as getAvailablePresets, s as bulkPreset, t as applyPresets, u as slugLookupPreset } from "../presets-D-h0uWtP.mjs";
|
|
4
4
|
import { filesUploadPreset } from "./filesUpload.mjs";
|
|
5
5
|
import { searchPreset } from "./search.mjs";
|
|
6
6
|
export { applyPresets, auditedPreset, bulkPreset, filesUploadPreset, flexibleMultiTenantPreset, getAvailablePresets, getPreset, multiTenantPreset, ownedByUserPreset, registerPreset, searchPreset, slugLookupPreset, softDeletePreset, treePreset };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { X as CrudRouteKey, Y as PresetResult } from "../index-
|
|
2
|
+
import { X as CrudRouteKey, Y as PresetResult } from "../index-BcR2bFZQ.mjs";
|
|
3
3
|
//#region src/presets/multiTenant.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* One tenant dimension for multi-field filtering. Discriminated by source:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import "../constants-
|
|
3
|
-
import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, u as getRequestScope, v as hasOrgAccess } from "../types-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import "../constants-BxCoxmiN.mjs";
|
|
3
|
+
import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, u as getRequestScope, v as hasOrgAccess } from "../types-CoqIRrkY.mjs";
|
|
4
4
|
//#region src/presets/multiTenant.ts
|
|
5
5
|
/**
|
|
6
6
|
* Resolve a single TenantFieldSpec against the current scope.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { l as PermissionCheck } from "../base-Csjc2oF-.mjs";
|
|
3
|
+
import { At as RouteDefinition, Y as PresetResult, jn as ControllerHandler, jt as RouteMcpConfig } from "../index-BcR2bFZQ.mjs";
|
|
4
4
|
//#region src/presets/search.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Search Preset — backend-agnostic search / vector / embed routes
|
package/dist/presets/search.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { B as requireAuth, F as allowPublic } from "../permissions-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { B as requireAuth, F as allowPublic } from "../permissions-BAfwgBxc.mjs";
|
|
3
3
|
//#region src/presets/search.ts
|
|
4
4
|
const BUILTINS = [
|
|
5
5
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { l as UnauthorizedError } from "./errors-
|
|
3
|
-
import { b as isElevated, n as PUBLIC_SCOPE } from "./types-
|
|
4
|
-
import { B as requireAuth, F as allowPublic, U as requireRoles } from "./permissions-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { l as UnauthorizedError } from "./errors-Cd_yy7aW.mjs";
|
|
3
|
+
import { b as isElevated, n as PUBLIC_SCOPE } from "./types-CoqIRrkY.mjs";
|
|
4
|
+
import { B as requireAuth, F as allowPublic, U as requireRoles } from "./permissions-BAfwgBxc.mjs";
|
|
5
5
|
import { multiTenantPreset } from "./presets/multiTenant.mjs";
|
|
6
6
|
//#region src/presets/ownedByUser.ts
|
|
7
7
|
/**
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { c as getOrgId, f as getScopeContextMap, g as getUserId, m as getTeamId, x as isMember } from "./types-CoqIRrkY.mjs";
|
|
3
|
+
//#region src/scope/projection.ts
|
|
4
|
+
/**
|
|
5
|
+
* Compute the request-scope projection. Returns `undefined` when no
|
|
6
|
+
* scope is attached (public / unscoped routes) so hosts can idiomatically
|
|
7
|
+
* write `ctx.scope?.organizationId` without a double-null check.
|
|
8
|
+
*/
|
|
9
|
+
function buildRequestScopeProjection(scope) {
|
|
10
|
+
if (!scope) return void 0;
|
|
11
|
+
return {
|
|
12
|
+
organizationId: getOrgId(scope),
|
|
13
|
+
userId: getUserId(scope),
|
|
14
|
+
orgRoles: isMember(scope) ? scope.orgRoles : void 0,
|
|
15
|
+
teamId: getTeamId(scope),
|
|
16
|
+
context: freezeContext(getScopeContextMap(scope))
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Hand out a FROZEN COPY of the scope's context, never the live map.
|
|
21
|
+
*
|
|
22
|
+
* `Readonly<Record<string, string>>` is erased at runtime, so the annotation
|
|
23
|
+
* alone protected nothing: `getScopeContextMap` returns the scope's own
|
|
24
|
+
* object, and a hook doing `ctx.scope.context.branchId = 'other'` mutated the
|
|
25
|
+
* caller's REAL scope. That matters because `requireScopeContext()` authorises
|
|
26
|
+
* against exactly these values — a later permission check in the same request
|
|
27
|
+
* would read the tampered dimension and allow what it should refuse.
|
|
28
|
+
*
|
|
29
|
+
* A copy rather than freezing in place: the map belongs to whoever built the
|
|
30
|
+
* scope (a host auth function), and freezing someone else's object as a side
|
|
31
|
+
* effect of reading it is a surprise a library should not spring. Copying also
|
|
32
|
+
* makes the guarantee deterministic instead of "frozen once something happens
|
|
33
|
+
* to call the accessor".
|
|
34
|
+
*
|
|
35
|
+
* ESM is always strict mode, so a write to the frozen copy THROWS rather than
|
|
36
|
+
* failing silently — the mistake surfaces where it is made.
|
|
37
|
+
*/
|
|
38
|
+
function freezeContext(ctx) {
|
|
39
|
+
return ctx === void 0 ? void 0 : Object.freeze({ ...ctx });
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { buildRequestScopeProjection as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { t as hasEvents } from "./typeGuards-
|
|
4
|
-
import { i as versionKey, r as tagVersionKey } from "./keys-
|
|
5
|
-
import { t as MemoryCacheStore } from "./memory-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DNg-KNCk.mjs";
|
|
3
|
+
import { t as hasEvents } from "./typeGuards-jjKJDN13.mjs";
|
|
4
|
+
import { i as versionKey, r as tagVersionKey } from "./keys-WeKvY1dE.mjs";
|
|
5
|
+
import { t as MemoryCacheStore } from "./memory-qYSB7rMQ.mjs";
|
|
6
6
|
import fp from "fastify-plugin";
|
|
7
7
|
//#region src/cache/QueryCache.ts
|
|
8
8
|
var QueryCache = class {
|
|
@@ -110,6 +110,7 @@ const CRUD_SUFFIXES = /* @__PURE__ */ new Set([
|
|
|
110
110
|
"deleted"
|
|
111
111
|
]);
|
|
112
112
|
const queryCachePluginImpl = async (fastify, opts = {}) => {
|
|
113
|
+
const ownsStore = opts.store === void 0;
|
|
113
114
|
const store = opts.store ?? new MemoryCacheStore();
|
|
114
115
|
const queryCache = new QueryCache(store);
|
|
115
116
|
const defaults = {
|
|
@@ -124,20 +125,61 @@ const queryCachePluginImpl = async (fastify, opts = {}) => {
|
|
|
124
125
|
});
|
|
125
126
|
fastify.addHook("onReady", async () => {
|
|
126
127
|
if (!hasEvents(fastify)) return;
|
|
128
|
+
/**
|
|
129
|
+
* Auto-invalidate on CRUD events — `product.created` bumps `product`, and
|
|
130
|
+
* `catalog:category.created` bumps BOTH `catalog:category` and `category`.
|
|
131
|
+
*
|
|
132
|
+
* ## Why the namespace has to be stripped
|
|
133
|
+
*
|
|
134
|
+
* This derived the resource as "everything before the last dot", which is right for
|
|
135
|
+
* an arc-native event (`product.created`) and wrong for every NAMESPACED one. Each
|
|
136
|
+
* `@classytic/*` kernel publishes `<domain>:<entity>.<verb>` —
|
|
137
|
+
* `catalog:category.created`, `revenue:payment.verified`,
|
|
138
|
+
* `access:entitlement.granted` — so the resource came out as `catalog:category` and
|
|
139
|
+
* the version bumped at `arc:ver:catalog:category`.
|
|
140
|
+
*
|
|
141
|
+
* Readers use the arc RESOURCE NAME: `buildQueryKey(resource, …)` folds in
|
|
142
|
+
* `getResourceVersion("category")`, i.e. `arc:ver:category`. Bump and read
|
|
143
|
+
* therefore used different keys and **auto-invalidation never fired for any
|
|
144
|
+
* kernel-backed resource** — no error, no warning, just caches serving stale data
|
|
145
|
+
* for a full `staleTime`. It was invisible precisely because the feature looks
|
|
146
|
+
* wired: the plugin is registered, events flow, a version does get bumped.
|
|
147
|
+
*
|
|
148
|
+
* ## Both names are bumped, on purpose
|
|
149
|
+
*
|
|
150
|
+
* Two namespaces could each own an `<entity>` of the same name (`catalog:category`
|
|
151
|
+
* and a hypothetical `cms:category`), so stripping is ambiguous. The asymmetry
|
|
152
|
+
* decides it: **over-invalidation costs a cache miss, under-invalidation serves
|
|
153
|
+
* wrong data.** Bumping both the qualified and the bare name means an unrelated
|
|
154
|
+
* namespace can at worst force an extra reload, and never a stale read. That is the
|
|
155
|
+
* same reasoning applied everywhere else here — a permissive default is only
|
|
156
|
+
* acceptable when the failure it causes is loud and cheap.
|
|
157
|
+
*
|
|
158
|
+
* By the same argument the split is UNCONDITIONAL: any `:` in the qualified
|
|
159
|
+
* name yields a bare candidate, including when the prefix itself contains a
|
|
160
|
+
* dot (`some.thing:entity` bumps `entity` too). Narrowing that would remove
|
|
161
|
+
* invalidations, which is the one direction that can serve wrong data.
|
|
162
|
+
*/
|
|
127
163
|
await fastify.events.subscribe("*", async (event) => {
|
|
128
164
|
const type = event.type;
|
|
129
165
|
const dotIdx = type.lastIndexOf(".");
|
|
130
166
|
if (dotIdx === -1) return;
|
|
131
167
|
const suffix = type.slice(dotIdx + 1);
|
|
132
168
|
if (!CRUD_SUFFIXES.has(suffix)) return;
|
|
133
|
-
const
|
|
134
|
-
await queryCache.bumpResourceVersion(
|
|
169
|
+
const qualified = type.slice(0, dotIdx);
|
|
170
|
+
await queryCache.bumpResourceVersion(qualified);
|
|
171
|
+
const colonIdx = qualified.lastIndexOf(":");
|
|
172
|
+
if (colonIdx === -1) return;
|
|
173
|
+
const bare = qualified.slice(colonIdx + 1);
|
|
174
|
+
if (bare.length === 0 || bare === qualified) return;
|
|
175
|
+
await queryCache.bumpResourceVersion(bare);
|
|
135
176
|
});
|
|
136
177
|
for (const rule of crossResourceRules) await fastify.events.subscribe(rule.pattern, async () => {
|
|
137
178
|
for (const tag of rule.tags) await queryCache.bumpTagVersion(tag);
|
|
138
179
|
});
|
|
139
180
|
});
|
|
140
181
|
fastify.addHook("onClose", async () => {
|
|
182
|
+
if (!ownsStore) return;
|
|
141
183
|
if ("close" in store && typeof store.close === "function") await store.close();
|
|
142
184
|
});
|
|
143
185
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as requestContext } from "./requestContext-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as requestContext } from "./requestContext-uYE35JxI.mjs";
|
|
3
3
|
//#region src/core/middlewares/arcDecorator.ts
|
|
4
4
|
/**
|
|
5
5
|
* Build the `arcDecorator` preHandler for a resource.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DNg-KNCk.mjs";
|
|
3
3
|
import { arcLog } from "./logger/index.mjs";
|
|
4
|
-
import { n as evaluateAndApplyPermission } from "./authorizationDecision-
|
|
5
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
6
|
-
import { c as getOrgId } from "./types-
|
|
7
|
-
import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-
|
|
8
|
-
import { t as applyFieldReadPermissions } from "./fields-
|
|
9
|
-
import { a as promoteStreamTokenToHeader } from "./streaming-
|
|
10
|
-
import { t as openSseStream } from "./sseStream-
|
|
4
|
+
import { n as evaluateAndApplyPermission } from "./authorizationDecision-B3mP_QTy.mjs";
|
|
5
|
+
import { n as getUserRoles } from "./userHelpers-CWF5pbZD.mjs";
|
|
6
|
+
import { c as getOrgId } from "./types-CoqIRrkY.mjs";
|
|
7
|
+
import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-Se8VrsaP.mjs";
|
|
8
|
+
import { t as applyFieldReadPermissions } from "./fields-CojeUkS4.mjs";
|
|
9
|
+
import { a as promoteStreamTokenToHeader } from "./streaming-DsT1B5zJ.mjs";
|
|
10
|
+
import { t as openSseStream } from "./sseStream-Bvpi-UXQ.mjs";
|
|
11
11
|
import fp from "fastify-plugin";
|
|
12
12
|
//#region src/plugins/realtime.ts
|
|
13
13
|
var realtime_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as EventTransport, i as EventLogger, n as DomainEvent, r as EventHandler } from "./EventTransport-
|
|
2
|
+
import { a as EventTransport, i as EventLogger, n as DomainEvent, r as EventHandler } from "./EventTransport-BEVP50ka.mjs";
|
|
3
3
|
//#region src/events/transports/redis-stream.d.ts
|
|
4
4
|
interface RedisStreamLike {
|
|
5
5
|
xadd(key: string, id: string, ...fieldValues: string[]): Promise<string | null>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as evaluateAndApplyPermission } from "./authorizationDecision-
|
|
3
|
-
import { f as createError } from "./errors-
|
|
4
|
-
import { u as getRequestScope } from "./types-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as evaluateAndApplyPermission } from "./authorizationDecision-B3mP_QTy.mjs";
|
|
3
|
+
import { f as createError } from "./errors-Cd_yy7aW.mjs";
|
|
4
|
+
import { u as getRequestScope } from "./types-CoqIRrkY.mjs";
|
|
5
5
|
//#region src/core/middlewares/permissions.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build a PermissionContext from a Fastify request. Extracted so the CRUD
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import { K as ResolvedTenantPurge, R as RegisterOptions, V as ResourceDefinition, X as CrudRouteKey, k as IntrospectionPluginOptions, p as RegistryEntry, z as ResourceRegistry } from "../index-
|
|
3
|
-
import "../fastify-augmentation-
|
|
4
|
-
import { FastifyPluginAsync } from "fastify";
|
|
2
|
+
import { K as ResolvedTenantPurge, R as RegisterOptions, V as ResourceDefinition, X as CrudRouteKey, k as IntrospectionPluginOptions, p as RegistryEntry, z as ResourceRegistry } from "../index-BcR2bFZQ.mjs";
|
|
3
|
+
import "../fastify-augmentation-DVsTAy6X.mjs";
|
|
5
4
|
import { TenantPurgeProgress, TenantPurgeStrategy } from "@classytic/repo-core/repository";
|
|
5
|
+
import { FastifyPluginAsync } from "fastify";
|
|
6
6
|
//#region src/registry/assertNoTenantData.d.ts
|
|
7
7
|
interface AssertNoTenantDataOptions {
|
|
8
8
|
readonly organizationId: string;
|
package/dist/registry/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as cascadeDeleteForOrganization, c as assertNoTenantData, i as introspectionPlugin_default, n as buildResourceManifestFromRegistry, o as getCascadingResources, r as introspectionPlugin, s as getCascadingResourcesWithMetadata, t as buildResourceManifest } from "../registry-
|
|
3
|
-
import { t as ResourceRegistry } from "../ResourceRegistry-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as cascadeDeleteForOrganization, c as assertNoTenantData, i as introspectionPlugin_default, n as buildResourceManifestFromRegistry, o as getCascadingResources, r as introspectionPlugin, s as getCascadingResourcesWithMetadata, t as buildResourceManifest } from "../registry-CLxCR5LF.mjs";
|
|
3
|
+
import { t as ResourceRegistry } from "../ResourceRegistry-DoALUlOO.mjs";
|
|
4
4
|
export { ResourceRegistry, assertNoTenantData, buildResourceManifest, buildResourceManifestFromRegistry, cascadeDeleteForOrganization, getCascadingResources, getCascadingResourcesWithMetadata, introspectionPlugin_default as introspectionPlugin, introspectionPlugin as introspectionPluginFn };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CRUD_OPERATIONS } from "./constants-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "./constants-BxCoxmiN.mjs";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
//#region src/registry/assertNoTenantData.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DNg-KNCk.mjs";
|
|
3
3
|
import { toCanonicalList } from "@classytic/repo-core/pagination";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
//#region src/plugins/replyHelpers.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
2
|
import { arcLog } from "./logger/index.mjs";
|
|
3
3
|
import { policyRecordToFilter } from "@classytic/repo-core/filter";
|
|
4
4
|
//#region src/core/repositoryFilter.ts
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
//#region src/utils/runtimeCapabilities.ts
|
|
3
|
+
/**
|
|
4
|
+
* `Symbol.for` so declarations from two arc copies in one dependency graph
|
|
5
|
+
* land in ONE registry — same reasoning as `ARC_EVENT_TRANSPORT`. Not on the
|
|
6
|
+
* public `fastify.arc` surface; the audit result is the product, not the list.
|
|
7
|
+
*/
|
|
8
|
+
const ARC_RUNTIME_CAPABILITIES = Symbol.for("arc.runtimeCapabilities");
|
|
9
|
+
function registryOf(fastify) {
|
|
10
|
+
const holder = fastify;
|
|
11
|
+
if (!holder[ARC_RUNTIME_CAPABILITIES]) holder[ARC_RUNTIME_CAPABILITIES] = [];
|
|
12
|
+
return holder[ARC_RUNTIME_CAPABILITIES];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Declare a runtime capability. Callable from ANY registration context —
|
|
16
|
+
* arc's own plugins, host `plugins()` callbacks, module `plugins` phases —
|
|
17
|
+
* which is the point: the audit sees what the constructor-time guard cannot.
|
|
18
|
+
*/
|
|
19
|
+
function declareRuntimeCapability(fastify, decl) {
|
|
20
|
+
registryOf(fastify).push(decl);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The boot audit. Runs once at the end of `buildApp`, after every declarant.
|
|
24
|
+
*
|
|
25
|
+
* - `runtime: 'distributed'` + `durability: 'memory'` + not `accepted` →
|
|
26
|
+
* collected and THROWN as one error naming every violator (fixing them one
|
|
27
|
+
* boot at a time is the checklist experience this replaces).
|
|
28
|
+
* - accepted memory declarations → one info line, so the topology decision is
|
|
29
|
+
* visible in the boot log it was made for.
|
|
30
|
+
* - non-distributed runtimes → nothing to enforce; declarations still logged
|
|
31
|
+
* at debug for `arc doctor`-style tooling.
|
|
32
|
+
*/
|
|
33
|
+
function auditRuntimeCapabilities(fastify, runtime) {
|
|
34
|
+
const declarations = registryOf(fastify);
|
|
35
|
+
if (declarations.length === 0) return;
|
|
36
|
+
if (runtime !== "distributed") {
|
|
37
|
+
fastify.log.debug({ capabilities: declarations }, "[arc] runtime capabilities declared (no distributed profile — informational)");
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const violations = declarations.filter((d) => d.durability === "memory" && !d.accepted);
|
|
41
|
+
const acceptedMemory = declarations.filter((d) => d.durability === "memory" && d.accepted);
|
|
42
|
+
if (acceptedMemory.length > 0) fastify.log.info({ accepted: acceptedMemory.map((d) => d.subsystem) }, "[arc] per-process state accepted by design under runtime: 'distributed'");
|
|
43
|
+
if (violations.length > 0) {
|
|
44
|
+
const lines = violations.map((d) => ` - ${d.subsystem}${d.detail ? ` — ${d.detail}` : ""}`).join("\n");
|
|
45
|
+
throw new Error(`runtime: 'distributed' — ${violations.length} subsystem(s) hold PER-PROCESS state that multi-replica deployment breaks:\n${lines}\nWire a shared store for each, or — where per-process is genuinely intended — have the declarant pass \`accepted: true\` with a reason.`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { declareRuntimeCapability as n, auditRuntimeCapabilities as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { t as startRenewingLease } from "./renewingLease-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DNg-KNCk.mjs";
|
|
3
|
+
import { t as startRenewingLease } from "./renewingLease-BnWtbA2U.mjs";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
//#region src/plugins/schedules.ts
|
|
6
6
|
var schedules_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { o as toJsonSchema } from "./schemaConverter-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { o as toJsonSchema } from "./schemaConverter-XH1RZRyu.mjs";
|
|
3
3
|
//#region src/core/schemaIR.ts
|
|
4
4
|
/**
|
|
5
5
|
* Schema IR — one canonical representation, two adapters.
|
package/dist/schemas/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
2
|
import { errorContractSchema, errorDetailSchema } from "@classytic/repo-core/errors";
|
|
3
3
|
import { Type, Type as Type$1 } from "typebox";
|
|
4
4
|
//#region src/schemas/index.ts
|
package/dist/scim/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as parseJsonBody } from "../jsonBody-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as parseJsonBody } from "../jsonBody-CfGH-GxO.mjs";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
//#region src/scim/errors.ts
|
|
5
5
|
var ScimError = class extends Error {
|
package/dist/scope/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { C as isService, D as requireUserId, E as requireTeamId, O as scopeFirstCtx, S as isOrgInScope, T as requireOrgId, _ as getUserRoles, a as getDPoPJkt, b as isElevated, c as getOrgId, d as getScopeContext, f as getScopeContextMap, g as getUserId, h as getTenantFromRequest, i as getClientId, l as getOrgRoles, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, r as getAncestorOrgIds, s as getOrgContext, t as AUTHENTICATED_SCOPE, u as getRequestScope, v as hasOrgAccess, w as requireClientId, x as isMember, y as isAuthenticated } from "../types-
|
|
3
|
-
import { n as elevation_default, t as elevationPlugin } from "../elevation-
|
|
4
|
-
import { t as createTenantKeyGenerator } from "../rateLimitKey-
|
|
5
|
-
import { t as resolveOrgFromHeader } from "../scope-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { C as isService, D as requireUserId, E as requireTeamId, O as scopeFirstCtx, S as isOrgInScope, T as requireOrgId, _ as getUserRoles, a as getDPoPJkt, b as isElevated, c as getOrgId, d as getScopeContext, f as getScopeContextMap, g as getUserId, h as getTenantFromRequest, i as getClientId, l as getOrgRoles, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, r as getAncestorOrgIds, s as getOrgContext, t as AUTHENTICATED_SCOPE, u as getRequestScope, v as hasOrgAccess, w as requireClientId, x as isMember, y as isAuthenticated } from "../types-CoqIRrkY.mjs";
|
|
3
|
+
import { n as elevation_default, t as elevationPlugin } from "../elevation-B0tlY8y1.mjs";
|
|
4
|
+
import { t as createTenantKeyGenerator } from "../rateLimitKey-XngqVNEV.mjs";
|
|
5
|
+
import { t as resolveOrgFromHeader } from "../scope-BaWcqBvr.mjs";
|
|
6
6
|
export { AUTHENTICATED_SCOPE, PUBLIC_SCOPE, createTenantKeyGenerator, elevation_default as elevationPlugin, elevationPlugin as elevationPluginFn, getAncestorOrgIds, getClientId, getDPoPJkt, getMandate, getOrgContext, getOrgId, getOrgRoles, getRequestScope, getScopeContext, getScopeContextMap, getServiceScopes, getTeamId, getTenantFromRequest, getUserId, getUserRoles, hasOrgAccess, isAuthenticated, isElevated, isMember, isOrgInScope, isService, requireClientId, requireOrgId, requireTeamId, requireUserId, resolveOrgFromHeader, scopeFirstCtx };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-
|
|
3
|
-
import { n as requireSingleHeaderValue } from "./headers-
|
|
4
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-Cd_yy7aW.mjs";
|
|
3
|
+
import { n as requireSingleHeaderValue } from "./headers-CveNO9gR.mjs";
|
|
4
|
+
import { n as getUserRoles } from "./userHelpers-CWF5pbZD.mjs";
|
|
5
5
|
//#region src/scope/resolveOrgFromHeader.ts
|
|
6
6
|
/**
|
|
7
7
|
* Create a preHandler hook that resolves org scope from a header.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DNg-KNCk.mjs";
|
|
3
3
|
import { arcLog } from "./logger/index.mjs";
|
|
4
|
-
import { c as getOrgId, n as PUBLIC_SCOPE } from "./types-
|
|
5
|
-
import { a as promoteStreamTokenToHeader } from "./streaming-
|
|
6
|
-
import { t as openSseStream } from "./sseStream-
|
|
4
|
+
import { c as getOrgId, n as PUBLIC_SCOPE } from "./types-CoqIRrkY.mjs";
|
|
5
|
+
import { a as promoteStreamTokenToHeader } from "./streaming-DsT1B5zJ.mjs";
|
|
6
|
+
import { t as openSseStream } from "./sseStream-Bvpi-UXQ.mjs";
|
|
7
7
|
import fp from "fastify-plugin";
|
|
8
8
|
//#region src/plugins/sse.ts
|
|
9
9
|
var sse_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as forwardedStreamHeaders } from "./streaming-
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as forwardedStreamHeaders } from "./streaming-DsT1B5zJ.mjs";
|
|
3
3
|
//#region src/utils/sseStream.ts
|
|
4
4
|
/**
|
|
5
5
|
* Take over the reply socket and open an SSE stream. Call ONLY after every
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as createEvent } from "./EventTransport-tq4CEB-q.mjs";
|
|
3
3
|
//#region src/events/defineEvent.ts
|
|
4
4
|
/**
|
|
5
5
|
* defineEvent — Typed Event Definitions with Optional Schema Validation
|
package/dist/sync/changelog.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
|
|
2
2
|
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
3
3
|
//#region src/testing/cleanupStoreContract.ts
|
|
4
4
|
/**
|
|
@@ -50,6 +50,8 @@ function plan(recipeId) {
|
|
|
50
50
|
rebuildActions: [],
|
|
51
51
|
warnings: [],
|
|
52
52
|
estimatedTotal: 1,
|
|
53
|
+
protectedTotal: 0,
|
|
54
|
+
excludeSteps: [],
|
|
53
55
|
confirmationPhrase: recipeId,
|
|
54
56
|
digest: `digest-${recipeId}`
|
|
55
57
|
};
|