@classytic/arc 2.45.1 → 2.46.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/dist/{EventTransport-CiicKz2Z.d.mts → EventTransport-CYEoCJGe.d.mts} +0 -2
- package/dist/{EventTransport-4b0noGwa.mjs → EventTransport-DNgD9NP4.mjs} +3 -4
- package/dist/{HookSystem-4pABQnGn.mjs → HookSystem-DRbPzEcP.mjs} +3 -4
- package/dist/{QueryCache--5uAuYPW.d.mts → QueryCache-DdvrGG8Q.d.mts} +1 -3
- package/dist/{ResourceRegistry-BBaN_Ne-.mjs → ResourceRegistry-Douk51fa.mjs} +15 -4
- package/dist/{acquire-kiZzy5bX.mjs → acquire-RbtvDg9s.mjs} +2 -3
- package/dist/{actionPermissions-BLnbDA6g.mjs → actionPermissions-De0AJ7hm.mjs} +37 -42
- package/dist/audit/index.d.mts +2 -10
- package/dist/audit/index.mjs +8 -12
- package/dist/auth/audit.d.mts +0 -2
- package/dist/auth/audit.mjs +2 -3
- package/dist/auth/index.d.mts +9 -17
- package/dist/auth/index.mjs +26 -29
- package/dist/auth/redis-session.d.mts +2 -4
- package/dist/auth/redis-session.mjs +2 -3
- package/dist/{authorizationDecision-CVlaTjAX.mjs → authorizationDecision-DeZMrHcm.mjs} +5 -6
- package/dist/{base-CZyixEQR.d.mts → base-HXNgPQww.d.mts} +1 -7
- package/dist/{boundedMap-DSy7KkeX.mjs → boundedMap-2WBh3gM9.mjs} +2 -3
- package/dist/{buildHandler-B4IhILv9.mjs → buildHandler-DxVOOBpw.mjs} +5 -6
- package/dist/cache/index.d.mts +4 -10
- package/dist/cache/index.mjs +5 -6
- package/dist/{caching-DqakP2vY.mjs → caching-BYRwYrUo.mjs} +3 -4
- package/dist/{claimed-XoiVrWZ2.mjs → claimed-DYlELdnm.mjs} +2 -3
- package/dist/cleanup/index.d.mts +9 -18
- package/dist/cleanup/index.mjs +12 -20
- package/dist/cli/commands/describe.d.mts +1 -3
- package/dist/cli/commands/describe.mjs +4 -5
- package/dist/cli/commands/docs.d.mts +1 -3
- package/dist/cli/commands/docs.mjs +4 -5
- package/dist/cli/commands/doctor.d.mts +1 -3
- package/dist/cli/commands/doctor.mjs +2 -3
- package/dist/cli/commands/generate.d.mts +1 -1
- package/dist/cli/commands/generate.mjs +2 -2
- package/dist/cli/commands/init.d.mts +1 -1
- package/dist/cli/commands/init.mjs +2 -2
- package/dist/cli/commands/introspect.d.mts +1 -3
- package/dist/cli/commands/introspect.mjs +3 -4
- package/dist/cli/index.d.mts +2 -2
- package/dist/cli/index.mjs +3 -3
- package/dist/{constants-CtWkmWn3.mjs → constants-CHZMUwBW.mjs} +2 -3
- package/dist/context/index.d.mts +0 -8
- package/dist/context/index.mjs +6 -7
- package/dist/core/index.d.mts +3 -3
- package/dist/core/index.mjs +8 -8
- package/dist/{core-Cro2v5a7.mjs → core-D9rS2BxO.mjs} +9 -12
- package/dist/{createActionRouter-k-gwiPv6.mjs → createActionRouter-0qkCRzTL.mjs} +7 -8
- package/dist/{createAggregationRouter-BqWqhAPG.mjs → createAggregationRouter-CUf5Esd9.mjs} +9 -10
- package/dist/{createApp-Dw7L72Hz.mjs → createApp-DZIXfDKD.mjs} +49 -62
- package/dist/{createMcpServer-DSztofa9.d.mts → createMcpServer-DeVpqQF-.d.mts} +1 -3
- package/dist/{defineAggregation-pxbd7BBK.mjs → defineAggregation-bmKQ4NmC.mjs} +2 -3
- package/dist/{defineResource-DwgEjLCO.mjs → defineResource-CGmdmGwh.mjs} +78 -29
- package/dist/discovery/index.d.mts +1 -3
- package/dist/discovery/index.mjs +2 -3
- package/dist/docs/index.d.mts +8 -8
- package/dist/docs/index.mjs +4 -5
- package/dist/{elevation-B9wF2Z1F.mjs → elevation-CzhqAyVN.mjs} +9 -10
- package/dist/{elevation-BW2J3tNj.d.mts → elevation-DPD0hcU-.d.mts} +0 -2
- package/dist/encryption/index.d.mts +1 -7
- package/dist/encryption/index.mjs +8 -13
- package/dist/{errorHandler--4rSMMvq.d.mts → errorHandler-B9r88jZV.d.mts} +8 -3
- package/dist/{errorHandler-Dr2nG0Ui.mjs → errorHandler-dFyGOEoB.mjs} +16 -6
- package/dist/{errors-BtHzrSA6.mjs → errors-BY8vzlP4.mjs} +2 -3
- package/dist/{errors-JYc9vwqE.d.mts → errors-DTo0me1o.d.mts} +0 -2
- package/dist/{eventPlugin-BtmA4-3P.d.mts → eventPlugin-BY38F6yK.d.mts} +1 -7
- package/dist/{eventPlugin-Dvs7OBw8.mjs → eventPlugin-eMhAPtQA.mjs} +10 -12
- package/dist/{eventTypes-BVoCTG5c.mjs → eventTypes-Do2KYeJx.mjs} +5 -8
- package/dist/events/index.d.mts +4 -16
- package/dist/events/index.mjs +8 -9
- package/dist/events/transports/redis-stream-entry.d.mts +1 -1
- package/dist/events/transports/redis-stream-entry.mjs +5 -6
- package/dist/events/transports/redis.d.mts +2 -4
- package/dist/events/transports/redis.mjs +3 -4
- package/dist/{externalPaths-CmGOxOtD.d.mts → externalPaths-BOqdq5wr.d.mts} +0 -2
- package/dist/factory/index.d.mts +4 -14
- package/dist/factory/index.mjs +12 -18
- package/dist/{fastify-augmentation-DRlCIWE9.d.mts → fastify-augmentation-Dtn0IIRn.d.mts} +4 -10
- package/dist/{fields-BBSpf8pS.d.mts → fields-JTkrtO-r.d.mts} +0 -2
- package/dist/{fields-C1e_7Fwi.mjs → fields-LnbCcvsw.mjs} +2 -3
- package/dist/{filter-merge-xaiEKtz8.mjs → filter-merge-BAWi019Q.mjs} +2 -3
- package/dist/{generate-DCGuEbqI.d.mts → generate-C-g_KOkV.d.mts} +0 -4
- package/dist/{generate-DJiJMaXN.mjs → generate-oXoDnpJf.mjs} +7 -12
- package/dist/{headers-Dr-wt6Tr.mjs → headers-DBd3Qheo.mjs} +3 -4
- package/dist/{health-DkkWbJtQ.mjs → health-BlJu9GXS.mjs} +2 -3
- package/dist/{health-BLYn_Hds.mjs → health-Dp-3EC9o.mjs} +4 -7
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/idempotency/index.d.mts +3 -9
- package/dist/idempotency/index.mjs +10 -13
- package/dist/idempotency/redis.d.mts +1 -1
- package/dist/idempotency/redis.mjs +3 -4
- package/dist/{index-Bxriq3so.d.mts → index-B5i9-vuP.d.mts} +4 -26
- package/dist/{index-Chgz3d0i.d.mts → index-BAXDo5eE.d.mts} +1 -7
- package/dist/{index-Beg3aNnK.d.mts → index-BTxzJ_MN.d.mts} +67 -25
- package/dist/{index-CUJvoyw3.d.mts → index-Bqfo8hLz.d.mts} +2 -24
- package/dist/{index-uhkUA5-U.d.mts → index-CUdaoCYt.d.mts} +13 -23
- package/dist/{index-WH7xgvxS.d.mts → index-DyJFTJLA.d.mts} +31 -92
- package/dist/index.d.mts +7 -9
- package/dist/index.mjs +12 -13
- package/dist/{init-CW3kJqNW.mjs → init-BOaNkLYb.mjs} +18 -35
- package/dist/{init-Cscs4lab.d.mts → init-CV2_Fw3H.d.mts} +0 -4
- package/dist/integrations/event-gateway.d.mts +3 -5
- package/dist/integrations/event-gateway.mjs +3 -4
- package/dist/integrations/index.d.mts +3 -3
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.d.mts +1 -1
- package/dist/integrations/jobs/index.mjs +7 -11
- package/dist/integrations/mcp/index.d.mts +7 -39
- package/dist/integrations/mcp/index.mjs +8 -14
- package/dist/integrations/mcp/testing.d.mts +3 -5
- package/dist/integrations/mcp/testing.mjs +3 -4
- package/dist/integrations/streamline.d.mts +1 -3
- package/dist/integrations/streamline.mjs +4 -5
- package/dist/integrations/webhooks.d.mts +2 -4
- package/dist/integrations/webhooks.mjs +4 -5
- package/dist/integrations/websocket-pushref-redis.d.mts +2 -4
- package/dist/integrations/websocket-pushref-redis.mjs +2 -3
- package/dist/integrations/websocket-redis.d.mts +2 -4
- package/dist/integrations/websocket-redis.mjs +2 -3
- package/dist/integrations/websocket.d.mts +2 -2
- package/dist/integrations/websocket.mjs +13 -24
- package/dist/{interface-JJzwH4Ro.d.mts → interface-BmExzQRD.d.mts} +0 -2
- package/dist/{interface-BOk3YnTz.d.mts → interface-WR1U0K7t.d.mts} +0 -2
- package/dist/{jsonBody-DPU8yYwA.mjs → jsonBody-DpRpKR_K.mjs} +3 -4
- package/dist/{keys-Dgn6OYhl.mjs → keys-FBz6Ull-.mjs} +2 -3
- package/dist/{loadResources-BtKj6P1P.mjs → loadResources-Bx1sKPnF.mjs} +4 -5
- package/dist/{loadResourcesFromEntry-Bmq6TnB7.mjs → loadResourcesFromEntry-b_jcqbxh.mjs} +3 -4
- package/dist/logger/index.d.mts +1 -3
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-qQNLlOAU.mjs → logger-CbFcIEBZ.mjs} +3 -5
- package/dist/{mcpPlugin-DDfe8jAP.mjs → mcpPlugin-yix548XX.mjs} +41 -60
- package/dist/{memory-C0Blueoh.mjs → memory-Bgw5dn8N.mjs} +4 -5
- package/dist/{metrics-DYka72iN.mjs → metrics-CZDQWVjS.mjs} +4 -5
- package/dist/middleware/index.d.mts +1 -5
- package/dist/middleware/index.mjs +4 -5
- package/dist/migrations/index.d.mts +0 -2
- package/dist/migrations/index.mjs +3 -4
- package/dist/{module-BszSyWbd.mjs → module-Dsc_nKL5.mjs} +2 -3
- package/dist/{multiTenant-CAtYlW6H.d.mts → multiTenant-XCxAUlru.d.mts} +1 -5
- package/dist/{multipartBody-RHvIkNmc.mjs → multipartBody-B85ek8Kj.mjs} +2 -3
- package/dist/observeSend-BK-JN1jK.mjs +20 -0
- package/dist/{openapi-BrFPc3Ny.mjs → openapi-Co7hl073.mjs} +18 -28
- package/dist/outbox-admin/index.d.mts +2 -4
- package/dist/outbox-admin/index.mjs +6 -7
- package/dist/{outbox-module-gZCHoE4H.d.mts → outbox-module-XvUThpqn.d.mts} +2 -8
- package/dist/{outbox-module-DF4Bu_Qa.mjs → outbox-module-mg9kDYkd.mjs} +13 -17
- package/dist/permissions/index.d.mts +4 -4
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-DN1CWH56.mjs → permissions-A1oKtpiC.mjs} +19 -29
- package/dist/{pipe-B8uq865o.mjs → pipe-Czpw9U2n.mjs} +3 -4
- package/dist/pipeline/index.d.mts +1 -9
- package/dist/pipeline/index.mjs +5 -8
- package/dist/{plan-DUGfynNg.mjs → plan-KVseuBCL.mjs} +5 -9
- package/dist/{plugin-ByU3h-bR.mjs → plugin-DTWt_8C3.mjs} +130 -62
- package/dist/plugins/index.d.mts +8 -16
- package/dist/plugins/index.mjs +22 -26
- package/dist/plugins/response-cache.d.mts +2 -4
- package/dist/plugins/response-cache.mjs +10 -10
- package/dist/plugins/tracing-entry.d.mts +1 -1
- package/dist/plugins/tracing-entry.mjs +3 -4
- package/dist/{pluralize-Cdya8zYt.mjs → pluralize-msB9X3yw.mjs} +2 -3
- package/dist/presets/filesUpload.d.mts +4 -6
- package/dist/presets/filesUpload.mjs +6 -7
- package/dist/presets/index.d.mts +3 -19
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.d.mts +1 -1
- package/dist/presets/multiTenant.mjs +7 -7
- package/dist/presets/search.d.mts +3 -5
- package/dist/presets/search.mjs +3 -4
- package/dist/{presets-CCOlKTZw.mjs → presets-qKCehiJM.mjs} +11 -18
- package/dist/{projection-BGty6ie4.mjs → projection-ClBqtsIw.mjs} +3 -4
- package/dist/{pushref-registry-UxCkoA4C.d.mts → pushref-registry-d86QUaSq.d.mts} +0 -6
- package/dist/{queryCachePlugin-B7itTkWu.mjs → queryCachePlugin-3gJj5Rbz.mjs} +8 -10
- package/dist/{queryCachePlugin-C2lZjTxk.d.mts → queryCachePlugin-DYQUyeJ9.d.mts} +2 -4
- package/dist/{rateLimitKey-DBWO59H9.mjs → rateLimitKey-Kro---xl.mjs} +2 -3
- package/dist/{realtime-_59Rlje8.mjs → realtime-Ber8uJN2.mjs} +17 -19
- package/dist/{redis-BDgv9Glw.d.mts → redis-RpDMemdm.d.mts} +2 -4
- package/dist/{redis-stream-BMk-bpQS.d.mts → redis-stream-CS1N9dwM.d.mts} +1 -3
- package/dist/{redisShapes-CQksY67q.d.mts → redisShapes-CqBXTn_s.d.mts} +0 -2
- package/dist/registry/index.d.mts +2 -12
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-uG4wr541.mjs → registry-BA-_vFYk.mjs} +7 -12
- package/dist/{renewingLease-CiU3ZynH.mjs → renewingLease-CMY8YOcc.mjs} +2 -3
- package/dist/{replyHelpers-Dr2pnXZg.mjs → replyHelpers-DK9P_XSz.mjs} +3 -4
- package/dist/{requestContext-DBKIdmDi.mjs → requestContext-GYO_0gEw.mjs} +2 -3
- package/dist/{requirement-CbiLdQ1n.d.mts → requirement-CTRQjjQx.d.mts} +0 -2
- package/dist/{requirement-DxOaghWD.mjs → requirement-DeNjZIH3.mjs} +2 -3
- package/dist/{resourceRateLimit-Wf6d6FL9.d.mts → resourceRateLimit-DCWglD7V.d.mts} +1 -3
- package/dist/{resourceRateLimit-BBdj5yRq.mjs → resourceRateLimit-tHLbrtWc.mjs} +3 -4
- package/dist/{rolldown-runtime-DpVPUeXF.mjs → rolldown-runtime-Kv1fZdLg.mjs} +2 -3
- package/dist/{routeValidator-BNTqM1Eh.mjs → routeValidator-C_H5NanI.mjs} +2 -3
- package/dist/{runtimeCapabilities-D_3eUO6V.mjs → runtimeCapabilities-DWqbxkyw.mjs} +2 -3
- package/dist/{schedules-CVS7c1nv.mjs → schedules-eO_RzhCU.mjs} +132 -9
- package/dist/{schemaConverter-BQbg7loK.mjs → schemaConverter-DBJrPZN4.mjs} +3 -4
- package/dist/{schemaIR-CUI3hPQR.mjs → schemaIR-CEScKT2v.mjs} +3 -4
- package/dist/schemas/index.d.mts +0 -2
- package/dist/schemas/index.mjs +2 -3
- package/dist/scim/index.d.mts +0 -12
- package/dist/scim/index.mjs +10 -18
- package/dist/scope/index.d.mts +2 -6
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-DFXngazv.mjs → scope-B-Sm9m_E.mjs} +5 -6
- package/dist/{sessionManager-qimlKV0P.d.mts → sessionManager-CdvDF04x.d.mts} +2 -4
- package/dist/{shutdown-BCXCwghd.mjs → shutdown-DzLFbe27.mjs} +2 -3
- package/dist/{simpleEqualityMatcher-5jOzYQ_L.mjs → simpleEqualityMatcher-DOJhwQ8g.mjs} +2 -3
- package/dist/{sse-BilBz766.mjs → sse-2972pVwV.mjs} +8 -9
- package/dist/{sseStream-BG_uJL6J.mjs → sseStream-AWLEeNV-.mjs} +3 -4
- package/dist/{storage-Cx9Sz3Ou.d.mts → storage-odC5MNKN.d.mts} +0 -2
- package/dist/{store-helpers-CzLZdVa1.mjs → store-helpers-VzjgVTkM.mjs} +2 -3
- package/dist/{streaming-DgUvMWlv.mjs → streaming-DvraWW6x.mjs} +2 -3
- package/dist/{subscriberIdentity-EWnIZ-U8.mjs → subscriberIdentity-Bya56jsg.mjs} +2 -3
- package/dist/{tenancy-CVMvO5DH.mjs → tenancy-DSa_0hhw.mjs} +3 -4
- package/dist/{tenantPreparation-DIH-GX4g.mjs → tenantPreparation-BrpkQre3.mjs} +5 -6
- package/dist/testing/cleanupStoreContract.d.mts +2 -4
- package/dist/testing/cleanupStoreContract.mjs +2 -3
- package/dist/testing/index.d.mts +6 -32
- package/dist/testing/index.mjs +24 -37
- package/dist/testing/outboxStoreContract.d.mts +1 -3
- package/dist/testing/outboxStoreContract.mjs +3 -4
- package/dist/testing/requiredPorts.d.mts +2 -4
- package/dist/testing/requiredPorts.mjs +3 -4
- package/dist/testing/storageContract.d.mts +2 -4
- package/dist/testing/storageContract.mjs +2 -3
- package/dist/{timing-q9NITK04.mjs → timing-6rQTuCwg.mjs} +3 -5
- package/dist/{tracing-Dro5eH6j.d.mts → tracing-JSFiBl5r.d.mts} +0 -2
- package/dist/{transactionContext-NHmhDIOF.mjs → transactionContext-DaxYUEgH.mjs} +2 -3
- package/dist/{typeGuards-CPYR9RCg.mjs → typeGuards-UKnX8wPX.mjs} +2 -3
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.d.mts +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-ByHn9rEO.d.mts → types-0Dqlbgn8.d.mts} +0 -2
- package/dist/{types-D3Ixsh00.d.mts → types-BYEb_dLW.d.mts} +2 -4
- package/dist/{types-BJ-2XqVF.d.mts → types-BeEJm-DV.d.mts} +114 -14
- package/dist/{types-DVLddu2q.d.mts → types-C0YJAiL0.d.mts} +0 -2
- package/dist/{types-BI4sbUJ3.mjs → types-CuGjhn83.mjs} +5 -6
- package/dist/{types-Ddl9OjmE.d.mts → types-DnkIALZ8.d.mts} +0 -4
- package/dist/usage/index.d.mts +2 -10
- package/dist/usage/index.mjs +8 -12
- package/dist/{userHelpers-oBTU3a_k.mjs → userHelpers-oX5_mOVs.mjs} +2 -3
- package/dist/utils/index.d.mts +5 -39
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-BmE8zRrh.mjs → utils-CjjGOT4E.mjs} +20 -30
- package/dist/{validate-Dby08LhR.mjs → validate-4RlTKOJb.mjs} +5 -7
- package/dist/{versioning-P6JMNcJr.mjs → versioning-Dk2-19La.mjs} +4 -5
- package/dist/{versioning-Bqm_57Qt.d.mts → versioning-S18y2-0C.d.mts} +1 -15
- package/dist/{websocket-Cs4awVyD.d.mts → websocket-BGuc-WVZ.d.mts} +1 -15
- package/dist/{workScope-BcMLKa3G.mjs → workScope-DoBsoVo4.mjs} +3 -4
- package/llms.txt +37 -30
- package/package.json +9 -8
- package/skills/arc/SKILL.md +65 -844
- package/skills/arc/references/agent-auth.md +82 -193
- package/skills/arc/references/api-reference.md +41 -245
- package/skills/arc/references/auth-api-keys.md +99 -0
- package/skills/arc/references/auth-better-auth-overlay.md +87 -0
- package/skills/arc/references/auth-better-auth.md +78 -0
- package/skills/arc/references/auth-permissions.md +100 -0
- package/skills/arc/references/auth-strategies.md +122 -0
- package/skills/arc/references/boot.md +80 -0
- package/skills/arc/references/enterprise-auth.md +65 -81
- package/skills/arc/references/events-outbox.md +90 -0
- package/skills/arc/references/events.md +75 -440
- package/skills/arc/references/integrations-jobs.md +74 -0
- package/skills/arc/references/integrations-realtime.md +84 -0
- package/skills/arc/references/integrations-webhooks.md +71 -0
- package/skills/arc/references/integrations-workflows.md +47 -0
- package/skills/arc/references/mcp-auth.md +83 -0
- package/skills/arc/references/mcp-custom-tools.md +125 -0
- package/skills/arc/references/mcp-setup.md +115 -0
- package/skills/arc/references/mcp-testing.md +63 -0
- package/skills/arc/references/multi-tenancy.md +56 -230
- package/skills/arc/references/permissions-scope.md +81 -0
- package/skills/arc/references/production-api.md +119 -0
- package/skills/arc/references/production-audit.md +101 -0
- package/skills/arc/references/production-boot.md +91 -0
- package/skills/arc/references/production-caching.md +63 -0
- package/skills/arc/references/production-distributed.md +75 -0
- package/skills/arc/references/production-idempotency.md +83 -0
- package/skills/arc/references/production-observability.md +83 -0
- package/skills/arc/references/production-realtime.md +70 -0
- package/skills/arc/references/production-reliability.md +100 -0
- package/skills/arc/references/production-shutdown.md +43 -0
- package/skills/arc/references/querying.md +76 -0
- package/skills/arc/references/resources.md +97 -0
- package/skills/arc/references/schedules.md +79 -0
- package/skills/arc/references/scim.md +61 -208
- package/skills/arc/references/tenancy-scope-install.md +82 -0
- package/skills/arc/references/testing.md +101 -144
- package/skills/arc/references/usage-cleanup-capabilities.md +45 -0
- package/skills/arc/references/validation.md +91 -0
- package/skills/arc/references/writes-hooks-errors.md +80 -0
- package/skills/arc-code-review/SKILL.md +67 -114
- package/skills/arc-code-review/references/arc-cheatsheet.md +68 -167
- package/skills/arc-code-review/references/mongokit-repositories.md +104 -0
- package/skills/arc-code-review/references/recipe-events-cache-jobs.md +112 -0
- package/skills/arc-code-review/references/recipe-resource.md +100 -0
- package/skills/arc-code-review/references/recipe-schemas-fields.md +93 -0
- package/skills/arc-code-review/references/recipe-scope-permissions.md +82 -0
- package/skills/arc-code-review/references/scaffolding.md +61 -198
- package/skills/arc-code-review/references/severity.md +49 -102
- package/skills/arc-code-review/references/smells-auth-scope.md +80 -0
- package/skills/arc-code-review/references/smells-data-events.md +66 -0
- package/skills/arc-code-review/references/smells-imports-style.md +59 -0
- package/skills/arc-code-review/references/smells-platform.md +89 -0
- package/skills/arc-code-review/references/smells-routes-schemas.md +66 -0
- package/skills/arc-module-publishing/SKILL.md +82 -208
- package/skills/arc-module-publishing/references/action-presets-and-plugins.md +87 -0
- package/skills/arc-module-publishing/references/build-and-types.md +73 -0
- package/skills/arc-module-publishing/references/module-lifecycle.md +101 -0
- package/skills/arc-module-publishing/references/package-manifest.md +34 -122
- package/skills/arc-module-publishing/references/publishing-workflow.md +44 -140
- package/skills/arc-module-publishing/references/resource-assembly.md +102 -0
- package/skills/arc-module-publishing/references/testing-packages.md +82 -0
- package/skills/arc/references/auth.md +0 -729
- package/skills/arc/references/integrations.md +0 -452
- package/skills/arc/references/mcp.md +0 -691
- package/skills/arc/references/production.md +0 -835
- package/skills/arc-code-review/references/anti-patterns.md +0 -1008
- package/skills/arc-code-review/references/migration-recipes.md +0 -649
- package/skills/arc-code-review/references/mongokit-migration.md +0 -360
- package/skills/arc-module-publishing/references/authoring-modules.md +0 -327
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import { LockAdapter } from "@classytic/repo-core/lock";
|
|
3
|
-
//#region src/migrations/index.d.ts
|
|
4
3
|
export interface Migration {
|
|
5
4
|
/** Migration version (sequential number) */
|
|
6
5
|
version: number;
|
|
@@ -289,5 +288,4 @@ export declare class MigrationRegistry {
|
|
|
289
288
|
*/
|
|
290
289
|
clear(): void;
|
|
291
290
|
}
|
|
292
|
-
//#endregion
|
|
293
291
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as startRenewingLease } from "../renewingLease-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as startRenewingLease } from "../renewingLease-CMY8YOcc.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
|
-
|
|
4
|
+
// src/migrations/index.ts
|
|
5
5
|
/**
|
|
6
6
|
* Schema Versioning and Migrations System
|
|
7
7
|
*
|
|
@@ -384,5 +384,4 @@ var MigrationRegistry = class {
|
|
|
384
384
|
this.migrations.clear();
|
|
385
385
|
}
|
|
386
386
|
};
|
|
387
|
-
//#endregion
|
|
388
387
|
export { MigrationRegistry, MigrationRunner, MongoMigrationStore, computeMigrationChecksum, defineMigration, withSchemaVersion };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
// src/factory/module/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* Identity helper for authoring a typed module — mirrors `defineResource`.
|
|
5
5
|
* Gives inference + a single obvious construction site; does no work.
|
|
@@ -74,5 +74,4 @@ Composed modules: ${composed.length ? composed.join(", ") : "(none)"}.`);
|
|
|
74
74
|
return resolved;
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
//#endregion
|
|
78
77
|
export { lazyModuleExports as a, hasModuleExports as i, getModuleExports as n, lazyRequiredModuleExports as o, getOptionalModuleExports as r, defineModule as t };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { G as CrudRouteKey, W as PresetResult } from "./index-
|
|
3
|
-
//#region src/permissions/tenantPreparation.d.ts
|
|
2
|
+
import { G as CrudRouteKey, W as PresetResult } from "./index-DyJFTJLA.mjs";
|
|
4
3
|
type TenantFieldSpec = {
|
|
5
4
|
field: string;
|
|
6
5
|
type: "org";
|
|
@@ -11,8 +10,6 @@ type TenantFieldSpec = {
|
|
|
11
10
|
field: string;
|
|
12
11
|
contextKey: string;
|
|
13
12
|
};
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/presets/multiTenant.d.ts
|
|
16
13
|
interface MultiTenantOptions {
|
|
17
14
|
/**
|
|
18
15
|
* Single-field form: name of the database field to filter by.
|
|
@@ -100,5 +97,4 @@ interface MultiTenantOptions {
|
|
|
100
97
|
crossTenant?: readonly Extract<CrudRouteKey, "list" | "get">[];
|
|
101
98
|
}
|
|
102
99
|
declare function multiTenantPreset(options?: MultiTenantOptions): PresetResult;
|
|
103
|
-
//#endregion
|
|
104
100
|
export { multiTenantPreset as n, TenantFieldSpec as r, MultiTenantOptions as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
2
|
import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
|
|
3
3
|
import sjson from "secure-json-parse";
|
|
4
|
-
|
|
4
|
+
// src/middleware/multipartBody.ts
|
|
5
5
|
/**
|
|
6
6
|
* Multipart Body Middleware — Opt-in multipart/form-data parsing for CRUD routes.
|
|
7
7
|
*
|
|
@@ -180,5 +180,4 @@ function tryParseValue(value) {
|
|
|
180
180
|
} catch {}
|
|
181
181
|
return value;
|
|
182
182
|
}
|
|
183
|
-
//#endregion
|
|
184
183
|
export { multipartBody as t };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
// src/utils/observeSend.ts
|
|
3
|
+
/** Run `fn`, reporting whether it called `reply.send` (or the reply is already sent). */
|
|
4
|
+
async function runObservingSend(reply, fn) {
|
|
5
|
+
let answered = false;
|
|
6
|
+
const send = reply.send;
|
|
7
|
+
reply.send = function trackedSend(payload) {
|
|
8
|
+
answered = true;
|
|
9
|
+
return send.call(this, payload);
|
|
10
|
+
};
|
|
11
|
+
try {
|
|
12
|
+
return {
|
|
13
|
+
result: await fn(),
|
|
14
|
+
answered: answered || reply.sent
|
|
15
|
+
};
|
|
16
|
+
} finally {
|
|
17
|
+
reply.send = send;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export { runObservingSend as t };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
3
|
-
import { n as convertRouteSchema } from "./schemaConverter-
|
|
4
|
-
import { t as resolveActionPermission } from "./actionPermissions-
|
|
5
|
-
import { t as pluralize } from "./pluralize-
|
|
6
|
-
import { t as buildActionBodySchema } from "./createActionRouter-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as getUserRoles } from "./userHelpers-oX5_mOVs.mjs";
|
|
3
|
+
import { n as convertRouteSchema } from "./schemaConverter-DBJrPZN4.mjs";
|
|
4
|
+
import { t as resolveActionPermission } from "./actionPermissions-De0AJ7hm.mjs";
|
|
5
|
+
import { t as pluralize } from "./pluralize-msB9X3yw.mjs";
|
|
6
|
+
import { t as buildActionBodySchema } from "./createActionRouter-0qkCRzTL.mjs";
|
|
7
7
|
import fp from "fastify-plugin";
|
|
8
|
-
|
|
8
|
+
// src/docs/openapi/canonical-schemas.ts
|
|
9
9
|
/**
|
|
10
10
|
* Static canonical schemas — referenced once, from
|
|
11
11
|
* `components.schemas`. Per-resource schemas (paginated `oneOf` with
|
|
@@ -227,8 +227,7 @@ function buildPaginatedListSchema(itemRef) {
|
|
|
227
227
|
]
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
|
-
|
|
231
|
-
//#region src/docs/openapi/field-permissions.ts
|
|
230
|
+
// src/docs/openapi/field-permissions.ts
|
|
232
231
|
/**
|
|
233
232
|
* Field permission descriptions — appended to schema-property
|
|
234
233
|
* `description` strings during component generation so codegen surfaces
|
|
@@ -249,8 +248,7 @@ function formatFieldPermDescription(perm) {
|
|
|
249
248
|
default: return perm.type;
|
|
250
249
|
}
|
|
251
250
|
}
|
|
252
|
-
|
|
253
|
-
//#region src/docs/openapi/components.ts
|
|
251
|
+
// src/docs/openapi/components.ts
|
|
254
252
|
/**
|
|
255
253
|
* Generate component schema definitions from pre-stored registry
|
|
256
254
|
* schemas.
|
|
@@ -346,8 +344,7 @@ function generateSchemas(resources) {
|
|
|
346
344
|
}
|
|
347
345
|
return schemas;
|
|
348
346
|
}
|
|
349
|
-
|
|
350
|
-
//#region src/docs/openapi/operations.ts
|
|
347
|
+
// src/docs/openapi/operations.ts
|
|
351
348
|
/**
|
|
352
349
|
* Standard error responses that every CRUD route ships. Per-route
|
|
353
350
|
* additions (e.g. 404 on get/update/delete, 409 on create/update) are
|
|
@@ -455,8 +452,7 @@ function describePermissionForOpenApi(check) {
|
|
|
455
452
|
if (Array.isArray(fn._orgRoles) && fn._orgRoles.length > 0) result.orgRoles = fn._orgRoles;
|
|
456
453
|
return result;
|
|
457
454
|
}
|
|
458
|
-
|
|
459
|
-
//#region src/docs/openapi/parameters.ts
|
|
455
|
+
// src/docs/openapi/parameters.ts
|
|
460
456
|
/**
|
|
461
457
|
* Default query parameters for list endpoints when the resource hasn't
|
|
462
458
|
* provided an explicit `openApiSchemas.listQuery` schema. These match
|
|
@@ -535,8 +531,7 @@ function extractPathParams(path) {
|
|
|
535
531
|
}
|
|
536
532
|
return params;
|
|
537
533
|
}
|
|
538
|
-
|
|
539
|
-
//#region src/docs/openapi/action-paths.ts
|
|
534
|
+
// src/docs/openapi/action-paths.ts
|
|
540
535
|
/**
|
|
541
536
|
* Action endpoint emitter — `POST /:resource/:id/action` and/or
|
|
542
537
|
* `POST /:resource/action`.
|
|
@@ -628,8 +623,7 @@ function emitMount(paths, resource, basePath, additionalSecurity, subsetActions,
|
|
|
628
623
|
}
|
|
629
624
|
}, anyAuthRequired, additionalSecurity);
|
|
630
625
|
}
|
|
631
|
-
|
|
632
|
-
//#region src/docs/openapi/aggregation-paths.ts
|
|
626
|
+
// src/docs/openapi/aggregation-paths.ts
|
|
633
627
|
/**
|
|
634
628
|
* Emit one OpenAPI path entry per declared aggregation.
|
|
635
629
|
*
|
|
@@ -776,8 +770,7 @@ function setNestedSchemaProp(target, path, leaf) {
|
|
|
776
770
|
if (!nested.properties) nested.properties = {};
|
|
777
771
|
setNestedSchemaProp(nested.properties, rest, leaf);
|
|
778
772
|
}
|
|
779
|
-
|
|
780
|
-
//#region src/docs/openapi/crud-paths.ts
|
|
773
|
+
// src/docs/openapi/crud-paths.ts
|
|
781
774
|
/**
|
|
782
775
|
* Append the default-CRUD paths (`GET /` list + `POST /` create on the
|
|
783
776
|
* collection path; `GET/PATCH|PUT/DELETE /:id` on the item path).
|
|
@@ -790,6 +783,7 @@ function appendCrudPaths(paths, resource, basePath, additionalSecurity) {
|
|
|
790
783
|
const collectionPath = {};
|
|
791
784
|
if (!disabledSet.has("list")) collectionPath.get = createOperation(resource, "list", "List all", {
|
|
792
785
|
parameters: resource.openApiSchemas?.listQuery ? convertSchemaToParameters(resource.openApiSchemas.listQuery) : DEFAULT_LIST_PARAMS,
|
|
786
|
+
...resource.queryContract && { "x-arc-query": resource.queryContract },
|
|
793
787
|
responses: {
|
|
794
788
|
"200": {
|
|
795
789
|
description: "List of items",
|
|
@@ -874,8 +868,7 @@ function appendCrudPaths(paths, resource, basePath, additionalSecurity) {
|
|
|
874
868
|
}, void 0, additionalSecurity);
|
|
875
869
|
if (Object.keys(itemPath).length > 0) paths[toOpenApiPath(`${basePath}/:id`)] = itemPath;
|
|
876
870
|
}
|
|
877
|
-
|
|
878
|
-
//#region src/docs/openapi/custom-paths.ts
|
|
871
|
+
// src/docs/openapi/custom-paths.ts
|
|
879
872
|
/**
|
|
880
873
|
* Append every entry in `resource.customRoutes` to the `paths` map.
|
|
881
874
|
*/
|
|
@@ -924,8 +917,7 @@ function appendCustomRoutePaths(paths, resource, basePath, additionalSecurity) {
|
|
|
924
917
|
paths[fullPath][method] = createOperation(resource, handlerName, route.summary ?? handlerName, extras, requiresAuthForRoute, additionalSecurity);
|
|
925
918
|
}
|
|
926
919
|
}
|
|
927
|
-
|
|
928
|
-
//#region src/docs/openapi/paths.ts
|
|
920
|
+
// src/docs/openapi/paths.ts
|
|
929
921
|
/**
|
|
930
922
|
* Generate the OpenAPI `paths` entries for a single resource.
|
|
931
923
|
*/
|
|
@@ -938,8 +930,7 @@ function generateResourcePaths(resource, apiPrefix = "", additionalSecurity = []
|
|
|
938
930
|
appendAggregationPaths(paths, resource, basePath, additionalSecurity);
|
|
939
931
|
return paths;
|
|
940
932
|
}
|
|
941
|
-
|
|
942
|
-
//#region src/docs/openapi/index.ts
|
|
933
|
+
// src/docs/openapi/index.ts
|
|
943
934
|
const openApiPlugin = async (fastify, opts = {}) => {
|
|
944
935
|
const { title = "Arc API", version = "1.0.0", description, serverUrl, prefix = "/_docs", apiPrefix = "", authRoles = [] } = opts;
|
|
945
936
|
const buildSpec = () => {
|
|
@@ -1041,5 +1032,4 @@ var openapi_default = fp(openApiPlugin, {
|
|
|
1041
1032
|
name: "arc-openapi",
|
|
1042
1033
|
fastify: "5.x"
|
|
1043
1034
|
});
|
|
1044
|
-
//#endregion
|
|
1045
1035
|
export { openapi_default as n, buildOpenApiSpec as t };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { l as PermissionCheck } from "../base-
|
|
3
|
-
import { n as ArcModule, u as ModuleName } from "../types-
|
|
2
|
+
import { l as PermissionCheck } from "../base-HXNgPQww.mjs";
|
|
3
|
+
import { n as ArcModule, u as ModuleName } from "../types-BeEJm-DV.mjs";
|
|
4
4
|
import { OutboxStore } from "@classytic/primitives/outbox";
|
|
5
|
-
//#region src/outbox-admin/module.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* A store that can answer an operator's questions.
|
|
8
7
|
*
|
|
@@ -81,5 +80,4 @@ interface OutboxAdminModuleDeps {
|
|
|
81
80
|
relayLagUnhealthyMs?: number;
|
|
82
81
|
}
|
|
83
82
|
export declare function createOutboxAdminModule(deps: OutboxAdminModuleDeps): ArcModule<void>;
|
|
84
|
-
//#endregion
|
|
85
83
|
export type { OutboxAdminModuleDeps, OutboxAdminPermissions, OutboxAdminStore };
|
|
@@ -1,9 +1,9 @@
|
|
|
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-
|
|
5
|
-
import { r as readOutboxHealth } from "../health-
|
|
6
|
-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { i as NotFoundError, u as ValidationError } from "../errors-BY8vzlP4.mjs";
|
|
3
|
+
import { t as defineResource } from "../defineResource-CGmdmGwh.mjs";
|
|
4
|
+
import { n as getModuleExports, t as defineModule } from "../module-Dsc_nKL5.mjs";
|
|
5
|
+
import { r as readOutboxHealth } from "../health-BlJu9GXS.mjs";
|
|
6
|
+
// src/outbox-admin/module.ts
|
|
7
7
|
/**
|
|
8
8
|
* Strip the domain payload and the stack unless explicitly opted in.
|
|
9
9
|
*
|
|
@@ -99,5 +99,4 @@ function createOutboxAdminModule(deps) {
|
|
|
99
99
|
resources: () => [resource]
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
|
-
//#endregion
|
|
103
102
|
export { createOutboxAdminModule };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as EventTransport, n as DomainEvent, t as DeadLetteredEvent } from "./EventTransport-
|
|
3
|
-
import { n as ArcModule } from "./types-
|
|
2
|
+
import { a as EventTransport, n as DomainEvent, t as DeadLetteredEvent } from "./EventTransport-CYEoCJGe.mjs";
|
|
3
|
+
import { n as ArcModule } from "./types-BeEJm-DV.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";
|
|
7
7
|
import { RepositoryLike } from "@classytic/repo-core/adapter";
|
|
8
|
-
//#region src/events/outbox/health.d.ts
|
|
9
8
|
/** Pending age past which the relay counts as stalled. */
|
|
10
9
|
declare const DEFAULT_RELAY_LAG_UNHEALTHY_MS: number;
|
|
11
10
|
interface OutboxHealth {
|
|
@@ -18,8 +17,6 @@ interface OutboxHealth {
|
|
|
18
17
|
/** A store that can report its own depth — both reads are optional on the contract. */
|
|
19
18
|
type OutboxHealthStore = OutboxStore & Required<Pick<OutboxStore, "countByStatus" | "oldestPendingAgeMs">>;
|
|
20
19
|
declare function readOutboxHealth(store: OutboxHealthStore, relayLagUnhealthyMs?: number): Promise<OutboxHealth>;
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region src/events/outbox/relay.d.ts
|
|
23
20
|
/** Reason codes passed to {@link EventOutboxOptions.onError}. */
|
|
24
21
|
type OutboxRelayErrorKind = "publish_failed" | "acknowledge_failed" | "fail_failed" | "ownership_mismatch" | "malformed_event";
|
|
25
22
|
/**
|
|
@@ -276,8 +273,6 @@ declare class EventOutbox {
|
|
|
276
273
|
*/
|
|
277
274
|
purge(olderThanMs?: number): Promise<number>;
|
|
278
275
|
}
|
|
279
|
-
//#endregion
|
|
280
|
-
//#region src/events/outbox-module.d.ts
|
|
281
276
|
interface OutboxModuleOptions {
|
|
282
277
|
/**
|
|
283
278
|
* The durable store. Supply it directly, or as a factory when it needs the booted app
|
|
@@ -487,5 +482,4 @@ interface OutboxModuleExports {
|
|
|
487
482
|
* boot error naming the module that needed it.
|
|
488
483
|
*/
|
|
489
484
|
declare function createOutboxModule(options: OutboxModuleOptions): ArcModule<OutboxModuleExports>;
|
|
490
|
-
//#endregion
|
|
491
485
|
export { MemoryOutboxStore as a, OutboxRelayErrorHandler as c, DEFAULT_RELAY_LAG_UNHEALTHY_MS as d, OutboxHealth as f, createOutboxModule as i, OutboxRelayErrorKind as l, readOutboxHealth as m, OutboxModuleExports as n, EventOutbox as o, OutboxHealthStore as p, OutboxModuleOptions as r, EventOutboxOptions as s, OutboxDrainResult as t, RelayResult as u };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as transactionContext } from "./transactionContext-
|
|
3
|
-
import { n as requestContext } from "./requestContext-
|
|
4
|
-
import { n as evictToSize, r as touch } from "./boundedMap-
|
|
5
|
-
import { i as resolveEventTransport } from "./EventTransport-
|
|
6
|
-
import { t as emitObserved } from "./eventPlugin-
|
|
7
|
-
import { n as canReportHealth, r as readOutboxHealth } from "./health-
|
|
8
|
-
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "./store-helpers-
|
|
9
|
-
import { t as claimedAttempts } from "./claimed-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as transactionContext } from "./transactionContext-DaxYUEgH.mjs";
|
|
3
|
+
import { n as requestContext } from "./requestContext-GYO_0gEw.mjs";
|
|
4
|
+
import { n as evictToSize, r as touch } from "./boundedMap-2WBh3gM9.mjs";
|
|
5
|
+
import { i as resolveEventTransport } from "./EventTransport-DNgD9NP4.mjs";
|
|
6
|
+
import { t as emitObserved } from "./eventPlugin-eMhAPtQA.mjs";
|
|
7
|
+
import { n as canReportHealth, r as readOutboxHealth } from "./health-BlJu9GXS.mjs";
|
|
8
|
+
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "./store-helpers-VzjgVTkM.mjs";
|
|
9
|
+
import { t as claimedAttempts } from "./claimed-DYlELdnm.mjs";
|
|
10
10
|
import { and, anyOf, eq, lte, ne, or } from "@classytic/repo-core/filter";
|
|
11
11
|
import { randomBytes } from "node:crypto";
|
|
12
12
|
import { InvalidOutboxEventError, OutboxConflictError, OutboxOwnershipError, outboxPayloadFingerprint } from "@classytic/primitives/outbox";
|
|
13
13
|
import { update } from "@classytic/repo-core/update";
|
|
14
14
|
import { hostname } from "node:os";
|
|
15
|
-
|
|
15
|
+
// src/events/outbox/backoff.ts
|
|
16
16
|
/**
|
|
17
17
|
* Compute a `retryAt` `Date` using exponential backoff with jitter.
|
|
18
18
|
*
|
|
@@ -56,8 +56,7 @@ function exponentialBackoff(options) {
|
|
|
56
56
|
const jittered = jitter > 0 ? capped * (1 + Math.random() * jitter) : capped;
|
|
57
57
|
return new Date(now + jittered);
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
//#region src/events/repository-outbox-adapter.ts
|
|
59
|
+
// src/events/repository-outbox-adapter.ts
|
|
61
60
|
/** A row read back from the repository that carries its event. */
|
|
62
61
|
function isStoredRow(value) {
|
|
63
62
|
if (typeof value !== "object" || value === null) return false;
|
|
@@ -387,8 +386,7 @@ function repositoryAsOutboxStore(repository, options) {
|
|
|
387
386
|
}
|
|
388
387
|
};
|
|
389
388
|
}
|
|
390
|
-
|
|
391
|
-
//#region src/events/outbox/relay.ts
|
|
389
|
+
// src/events/outbox/relay.ts
|
|
392
390
|
/** Default outbox retention — delivered events older than this are eligible for purge */
|
|
393
391
|
const DEFAULT_OUTBOX_RETENTION_MS = 6048e5;
|
|
394
392
|
const DEFAULT_LEASE_MS = 3e4;
|
|
@@ -748,8 +746,7 @@ function normalizeError(err) {
|
|
|
748
746
|
};
|
|
749
747
|
return { message: String(err) };
|
|
750
748
|
}
|
|
751
|
-
|
|
752
|
-
//#region src/events/outbox-module.ts
|
|
749
|
+
// src/events/outbox-module.ts
|
|
753
750
|
/**
|
|
754
751
|
* The OUTBOX as a module — so the store is a SLOT other modules depend on, not a value the host
|
|
755
752
|
* threads by hand.
|
|
@@ -1036,5 +1033,4 @@ function createOutboxModule(options) {
|
|
|
1036
1033
|
}] : []]
|
|
1037
1034
|
};
|
|
1038
1035
|
}
|
|
1039
|
-
//#endregion
|
|
1040
1036
|
export { exponentialBackoff as i, EventOutbox as n, repositoryAsOutboxStore as r, createOutboxModule as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
3
|
-
import { a as applyFieldReadPermissions, c as resolveEffectiveRoles, i as FieldWritePermissionResult, n as FieldPermissionMap, o as applyFieldWritePermissions, r as FieldPermissionType, s as fields, t as FieldPermission } from "../fields-
|
|
4
|
-
import { $ as deny, A as GrantResolution, B as explainAccess, C as requireScopeContext, D as createRoleHierarchy, E as RoleHierarchy, F as AccessExplanation, G as createDynamicPermissionMatrix, H as DynamicPermissionMatrix, I as PermissionRequirement, J as PublicPolicy, K as createOrgPermissions, L as collectPublicSurface, M as modeSatisfies, N as requireGrant, O as GRANT_MODES, P as conjoinPolicyFilters, Q as anyOf, R as describePermission, S as requireOrgRole, T as requireTeamMembership, U as DynamicPermissionMatrixConfig, V as ConnectEventsOptions, W as PermissionEventBus, X as allow, Y as allOf, Z as allowPublic, _ as publicRead, _t as requireMandate, a as PermissionMatrixRegistry, at as requireRoles, b as requireOrgInScope, c as introspectModule, ct as scopeOf, d as adminOnly, dt as evaluatePermissionDecision, et as denyAll, f as authenticated, ft as normalizeToDecision, g as presets_d_exports, gt as requireDPoP, h as permissionMatrix, ht as requireAgentScope, i as PermissionMatrixOptions, it as requirePlatformRole, j as RequireGrantOptions, k as GrantMode, l as introspectRegistry, lt as PermissionCheckReturn, m as ownerWithAdminBypass, mt as RequireMandateOptions, n as PermissionEntryType, nt as requireAuth, o as buildPermissionMatrix, ot as roles, p as fullPublic, pt as RequireAgentScopeOptions, q as AllowPublicOptions, r as PermissionMatrix, rt as requireOwnership, s as introspectCheck, st as when, t as PermissionEntry, tt as not, u as PermissionOverrides, ut as applyAuthorizationDecision, v as publicReadAdminWrite, w as requireServiceScope, x as requireOrgMembership, y as readOnly, z as describePermissionMap } from "../index-
|
|
5
|
-
import { a as createMemoryResourceRateLimiter, i as ResourceRateLimiter, n as ResourceRateLimitDecision, o as resolveResourceRateLimiter, r as ResourceRateLimitPolicy, t as ResourceRateLimitContext } from "../resourceRateLimit-
|
|
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-HXNgPQww.mjs";
|
|
3
|
+
import { a as applyFieldReadPermissions, c as resolveEffectiveRoles, i as FieldWritePermissionResult, n as FieldPermissionMap, o as applyFieldWritePermissions, r as FieldPermissionType, s as fields, t as FieldPermission } from "../fields-JTkrtO-r.mjs";
|
|
4
|
+
import { $ as deny, A as GrantResolution, B as explainAccess, C as requireScopeContext, D as createRoleHierarchy, E as RoleHierarchy, F as AccessExplanation, G as createDynamicPermissionMatrix, H as DynamicPermissionMatrix, I as PermissionRequirement, J as PublicPolicy, K as createOrgPermissions, L as collectPublicSurface, M as modeSatisfies, N as requireGrant, O as GRANT_MODES, P as conjoinPolicyFilters, Q as anyOf, R as describePermission, S as requireOrgRole, T as requireTeamMembership, U as DynamicPermissionMatrixConfig, V as ConnectEventsOptions, W as PermissionEventBus, X as allow, Y as allOf, Z as allowPublic, _ as publicRead, _t as requireMandate, a as PermissionMatrixRegistry, at as requireRoles, b as requireOrgInScope, c as introspectModule, ct as scopeOf, d as adminOnly, dt as evaluatePermissionDecision, et as denyAll, f as authenticated, ft as normalizeToDecision, g as presets_d_exports, gt as requireDPoP, h as permissionMatrix, ht as requireAgentScope, i as PermissionMatrixOptions, it as requirePlatformRole, j as RequireGrantOptions, k as GrantMode, l as introspectRegistry, lt as PermissionCheckReturn, m as ownerWithAdminBypass, mt as RequireMandateOptions, n as PermissionEntryType, nt as requireAuth, o as buildPermissionMatrix, ot as roles, p as fullPublic, pt as RequireAgentScopeOptions, q as AllowPublicOptions, r as PermissionMatrix, rt as requireOwnership, s as introspectCheck, st as when, t as PermissionEntry, tt as not, u as PermissionOverrides, ut as applyAuthorizationDecision, v as publicReadAdminWrite, w as requireServiceScope, x as requireOrgMembership, y as readOnly, z as describePermissionMap } from "../index-B5i9-vuP.mjs";
|
|
5
|
+
import { a as createMemoryResourceRateLimiter, i as ResourceRateLimiter, n as ResourceRateLimitDecision, o as resolveResourceRateLimiter, r as ResourceRateLimitPolicy, t as ResourceRateLimitContext } from "../resourceRateLimit-DCWglD7V.mjs";
|
|
6
6
|
export { type AccessExplanation, type AllowPublicOptions, type AuthorizationDecision, type ConnectEventsOptions, type DataPolicy, type DynamicPermissionMatrix, type DynamicPermissionMatrixConfig, type FieldPermission, type FieldPermissionMap, type FieldPermissionType, type FieldWritePermissionResult, 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 PermissionOverrides, type PermissionRequirement, type PublicPolicy, type RequireAgentScopeOptions, type RequireGrantOptions, type RequireMandateOptions, type ResourceRateLimitContext, type ResourceRateLimitDecision, type ResourceRateLimitPolicy, type ResourceRateLimiter, type RoleHierarchy, type UserBase, adminOnly, allOf, allow, allowPublic, anyOf, applyAuthorizationDecision, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, buildPermissionMatrix, collectPublicSurface, conjoinPolicyFilters, createDynamicPermissionMatrix, createMemoryResourceRateLimiter, 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, resolveResourceRateLimiter, roles, scopeOf, when };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as conjoinPolicyFilters } from "../filter-merge-
|
|
3
|
-
import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-
|
|
4
|
-
import { a as resolveEffectiveRoles, i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "../fields-
|
|
5
|
-
import { i as normalizeToDecision, r as evaluatePermissionDecision, t as applyAuthorizationDecision } from "../authorizationDecision-
|
|
6
|
-
import { i as resolveResourceRateLimiter, t as createMemoryResourceRateLimiter } from "../resourceRateLimit-
|
|
7
|
-
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.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as conjoinPolicyFilters } from "../filter-merge-BAWi019Q.mjs";
|
|
3
|
+
import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-oX5_mOVs.mjs";
|
|
4
|
+
import { a as resolveEffectiveRoles, i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "../fields-LnbCcvsw.mjs";
|
|
5
|
+
import { i as normalizeToDecision, r as evaluatePermissionDecision, t as applyAuthorizationDecision } from "../authorizationDecision-DeZMrHcm.mjs";
|
|
6
|
+
import { i as resolveResourceRateLimiter, t as createMemoryResourceRateLimiter } from "../resourceRateLimit-tHLbrtWc.mjs";
|
|
7
|
+
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-A1oKtpiC.mjs";
|
|
8
8
|
export { GRANT_MODES, adminOnly, allOf, allow, allowPublic, anyOf, applyAuthorizationDecision, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, buildPermissionMatrix, collectPublicSurface, conjoinPolicyFilters, createDynamicPermissionMatrix, createMemoryResourceRateLimiter, 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, resolveResourceRateLimiter, roles, scopeOf, when };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { t as arcLog } from "./logger-
|
|
4
|
-
import { t as conjoinPolicyFilters } from "./filter-merge-
|
|
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 { i as normalizeToDecision } from "./authorizationDecision-
|
|
8
|
-
import { n as declareRuntimeCapability } from "./runtimeCapabilities-
|
|
9
|
-
import { t as MemoryCacheStore } from "./memory-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Kv1fZdLg.mjs";
|
|
3
|
+
import { t as arcLog } from "./logger-CbFcIEBZ.mjs";
|
|
4
|
+
import { t as conjoinPolicyFilters } from "./filter-merge-BAWi019Q.mjs";
|
|
5
|
+
import { n as getUserRoles } from "./userHelpers-oX5_mOVs.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-CuGjhn83.mjs";
|
|
7
|
+
import { i as normalizeToDecision } from "./authorizationDecision-DeZMrHcm.mjs";
|
|
8
|
+
import { n as declareRuntimeCapability } from "./runtimeCapabilities-DWqbxkyw.mjs";
|
|
9
|
+
import { t as MemoryCacheStore } from "./memory-Bgw5dn8N.mjs";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
|
-
|
|
11
|
+
// src/permissions/context.ts
|
|
12
12
|
/**
|
|
13
13
|
* PermissionContext accessors (arc 2.30 — transport-neutral evaluation).
|
|
14
14
|
*
|
|
@@ -38,8 +38,7 @@ function scopeOf(ctx) {
|
|
|
38
38
|
if (ctx.scope) return ctx.scope;
|
|
39
39
|
return ctx.request ? getRequestScope(ctx.request) : PUBLIC_SCOPE;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
//#region src/permissions/core.ts
|
|
41
|
+
// src/permissions/core.ts
|
|
43
42
|
/**
|
|
44
43
|
* Build an `allow` {@link AuthorizationDecision}, optionally attaching a row-level
|
|
45
44
|
* `policy` and/or a `scope` to install. The idiomatic "grant" return for arc
|
|
@@ -457,8 +456,7 @@ function when(condition) {
|
|
|
457
456
|
return await condition(ctx) ? allow() : deny("Condition not met");
|
|
458
457
|
};
|
|
459
458
|
}
|
|
460
|
-
|
|
461
|
-
//#region src/permissions/agent.ts
|
|
459
|
+
// src/permissions/agent.ts
|
|
462
460
|
/**
|
|
463
461
|
* Agent-Auth Permission Helpers — DPoP + capability mandates for AI-agent flows
|
|
464
462
|
*
|
|
@@ -646,8 +644,7 @@ function requireAgentScope(opts) {
|
|
|
646
644
|
};
|
|
647
645
|
return check;
|
|
648
646
|
}
|
|
649
|
-
|
|
650
|
-
//#region src/permissions/scope.ts
|
|
647
|
+
// src/permissions/scope.ts
|
|
651
648
|
/**
|
|
652
649
|
* Permission Scope — checks bound to RequestScope.
|
|
653
650
|
*
|
|
@@ -864,8 +861,7 @@ function requireTeamMembership() {
|
|
|
864
861
|
check._teamPermission = "membership";
|
|
865
862
|
return check;
|
|
866
863
|
}
|
|
867
|
-
|
|
868
|
-
//#region src/permissions/dynamic.ts
|
|
864
|
+
// src/permissions/dynamic.ts
|
|
869
865
|
/**
|
|
870
866
|
* Permission Matrices — role × resource × action mapping.
|
|
871
867
|
*
|
|
@@ -1159,8 +1155,7 @@ function createDynamicPermissionMatrix(config) {
|
|
|
1159
1155
|
}
|
|
1160
1156
|
};
|
|
1161
1157
|
}
|
|
1162
|
-
|
|
1163
|
-
//#region src/permissions/explain.ts
|
|
1158
|
+
// src/permissions/explain.ts
|
|
1164
1159
|
/**
|
|
1165
1160
|
* Extract a check's static requirement from its `PermissionCheckMeta`. Public
|
|
1166
1161
|
* wins; then a scope-context gate (optionally with roles); then the union of
|
|
@@ -1333,8 +1328,7 @@ function describePermissionMap(permissions) {
|
|
|
1333
1328
|
function collectPublicSurface(permissions) {
|
|
1334
1329
|
return Object.entries(describePermissionMap(permissions)).filter(([, req]) => req.kind === "public").map(([action]) => action);
|
|
1335
1330
|
}
|
|
1336
|
-
|
|
1337
|
-
//#region src/permissions/grants.ts
|
|
1331
|
+
// src/permissions/grants.ts
|
|
1338
1332
|
/**
|
|
1339
1333
|
* Per-record grants — the `requireGrant` combinator + mode lattice.
|
|
1340
1334
|
*
|
|
@@ -1442,8 +1436,7 @@ function requireGrant(options) {
|
|
|
1442
1436
|
return deny(reason);
|
|
1443
1437
|
};
|
|
1444
1438
|
}
|
|
1445
|
-
|
|
1446
|
-
//#region src/permissions/roleHierarchy.ts
|
|
1439
|
+
// src/permissions/roleHierarchy.ts
|
|
1447
1440
|
/**
|
|
1448
1441
|
* Create a role hierarchy from a parent → children map.
|
|
1449
1442
|
*
|
|
@@ -1514,8 +1507,7 @@ function createRoleHierarchy(map) {
|
|
|
1514
1507
|
}
|
|
1515
1508
|
};
|
|
1516
1509
|
}
|
|
1517
|
-
|
|
1518
|
-
//#region src/permissions/presets.ts
|
|
1510
|
+
// src/permissions/presets.ts
|
|
1519
1511
|
/**
|
|
1520
1512
|
* Permission Presets — Common permission patterns in one call.
|
|
1521
1513
|
*
|
|
@@ -1689,8 +1681,7 @@ function readOnly(overrides) {
|
|
|
1689
1681
|
delete: denyAll("Write operations are disabled on this read-only resource")
|
|
1690
1682
|
}, overrides);
|
|
1691
1683
|
}
|
|
1692
|
-
|
|
1693
|
-
//#region src/permissions/matrix.ts
|
|
1684
|
+
// src/permissions/matrix.ts
|
|
1694
1685
|
/**
|
|
1695
1686
|
* Permission MATRIX — what the caller may do, answered from the live registry.
|
|
1696
1687
|
*
|
|
@@ -1805,5 +1796,4 @@ function buildPermissionMatrix(options = {}) {
|
|
|
1805
1796
|
modules
|
|
1806
1797
|
};
|
|
1807
1798
|
}
|
|
1808
|
-
//#endregion
|
|
1809
1799
|
export { requireAgentScope as A, requireAuth as B, createOrgPermissions as C, requireScopeContext as D, requireOrgRole as E, allowPublic as F, when as G, requirePlatformRole as H, anyOf as I, scopeOf as K, deny as L, requireMandate as M, allOf as N, requireServiceScope as O, allow as P, denyAll as R, createDynamicPermissionMatrix as S, requireOrgMembership as T, requireRoles as U, requireOwnership as V, roles as W, requireGrant as _, adminOnly as a, describePermissionMap as b, ownerWithAdminBypass as c, publicRead as d, publicReadAdminWrite as f, modeSatisfies as g, GRANT_MODES as h, introspectRegistry as i, requireDPoP as j, requireTeamMembership as k, permissionMatrix as l, createRoleHierarchy as m, introspectCheck as n, authenticated as o, readOnly as p, introspectModule as r, fullPublic as s, buildPermissionMatrix as t, presets_exports as u, collectPublicSurface as v, requireOrgInScope as w, explainAccess as x, describePermission as y, not as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as ForbiddenError } from "./errors-
|
|
3
|
-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as ForbiddenError } from "./errors-BY8vzlP4.mjs";
|
|
3
|
+
// src/pipeline/pipe.ts
|
|
4
4
|
/**
|
|
5
5
|
* Compose pipeline steps into an ordered array.
|
|
6
6
|
* Accepts guards, transforms, and interceptors in any order.
|
|
@@ -58,5 +58,4 @@ async function executePipeline(steps, ctx, handler, operation) {
|
|
|
58
58
|
}
|
|
59
59
|
return chain();
|
|
60
60
|
}
|
|
61
|
-
//#endregion
|
|
62
61
|
export { pipe as n, executePipeline as t };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { Vn as IControllerResponse, _t as PipelineConfig, bt as Transform, gt as OperationFilter, ht as NextFunction, mt as Interceptor, pt as Guard, vt as PipelineContext, yt as PipelineStep } from "../index-
|
|
3
|
-
//#region src/pipeline/guard.d.ts
|
|
2
|
+
import { Vn as IControllerResponse, _t as PipelineConfig, bt as Transform, gt as OperationFilter, ht as NextFunction, mt as Interceptor, pt as Guard, vt as PipelineContext, yt as PipelineStep } from "../index-DyJFTJLA.mjs";
|
|
4
3
|
interface GuardOptions {
|
|
5
4
|
operations?: OperationFilter;
|
|
6
5
|
handler: (ctx: PipelineContext) => boolean | Promise<boolean>;
|
|
@@ -12,8 +11,6 @@ interface GuardOptions {
|
|
|
12
11
|
* @param handlerOrOptions - Handler function or options object
|
|
13
12
|
*/
|
|
14
13
|
export declare function guard(name: string, handlerOrOptions: ((ctx: PipelineContext) => boolean | Promise<boolean>) | GuardOptions): Guard;
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/pipeline/intercept.d.ts
|
|
17
14
|
interface InterceptOptions {
|
|
18
15
|
operations?: OperationFilter;
|
|
19
16
|
handler: (ctx: PipelineContext, next: NextFunction) => Promise<IControllerResponse<unknown>>;
|
|
@@ -25,8 +22,6 @@ interface InterceptOptions {
|
|
|
25
22
|
* @param handlerOrOptions - Handler function or options object
|
|
26
23
|
*/
|
|
27
24
|
export declare function intercept(name: string, handlerOrOptions: ((ctx: PipelineContext, next: NextFunction) => Promise<IControllerResponse<unknown>>) | InterceptOptions): Interceptor;
|
|
28
|
-
//#endregion
|
|
29
|
-
//#region src/pipeline/pipe.d.ts
|
|
30
25
|
/**
|
|
31
26
|
* Compose pipeline steps into an ordered array.
|
|
32
27
|
* Accepts guards, transforms, and interceptors in any order.
|
|
@@ -45,8 +40,6 @@ export declare function pipe(...steps: PipelineStep[]): PipelineStep[];
|
|
|
45
40
|
* @returns The controller response (possibly modified by interceptors)
|
|
46
41
|
*/
|
|
47
42
|
export declare function executePipeline(steps: PipelineStep[], ctx: PipelineContext, handler: (ctx: PipelineContext) => Promise<IControllerResponse<unknown>>, operation: string): Promise<IControllerResponse<unknown>>;
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region src/pipeline/transform.d.ts
|
|
50
43
|
interface TransformOptions {
|
|
51
44
|
operations?: OperationFilter;
|
|
52
45
|
handler: (ctx: PipelineContext) => PipelineContext | undefined | Promise<PipelineContext | undefined>;
|
|
@@ -58,5 +51,4 @@ interface TransformOptions {
|
|
|
58
51
|
* @param handlerOrOptions - Handler function or options object
|
|
59
52
|
*/
|
|
60
53
|
export declare function transform(name: string, handlerOrOptions: ((ctx: PipelineContext) => PipelineContext | undefined | Promise<PipelineContext | undefined>) | TransformOptions): Transform;
|
|
61
|
-
//#endregion
|
|
62
54
|
export type { Guard, GuardOptions, InterceptOptions, Interceptor, NextFunction, OperationFilter, PipelineConfig, PipelineContext, PipelineStep, Transform, TransformOptions };
|
package/dist/pipeline/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as pipe, t as executePipeline } from "../pipe-
|
|
3
|
-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as pipe, t as executePipeline } from "../pipe-Czpw9U2n.mjs";
|
|
3
|
+
// src/pipeline/guard.ts
|
|
4
4
|
/**
|
|
5
5
|
* Create a named guard.
|
|
6
6
|
*
|
|
@@ -16,8 +16,7 @@ function guard(name, handlerOrOptions) {
|
|
|
16
16
|
handler: opts.handler
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
//#region src/pipeline/intercept.ts
|
|
19
|
+
// src/pipeline/intercept.ts
|
|
21
20
|
/**
|
|
22
21
|
* Create a named interceptor.
|
|
23
22
|
*
|
|
@@ -33,8 +32,7 @@ function intercept(name, handlerOrOptions) {
|
|
|
33
32
|
handler: opts.handler
|
|
34
33
|
};
|
|
35
34
|
}
|
|
36
|
-
|
|
37
|
-
//#region src/pipeline/transform.ts
|
|
35
|
+
// src/pipeline/transform.ts
|
|
38
36
|
/**
|
|
39
37
|
* Create a named transform.
|
|
40
38
|
*
|
|
@@ -50,5 +48,4 @@ function transform(name, handlerOrOptions) {
|
|
|
50
48
|
handler: opts.handler
|
|
51
49
|
};
|
|
52
50
|
}
|
|
53
|
-
//#endregion
|
|
54
51
|
export { executePipeline, guard, intercept, pipe, transform };
|