@classytic/arc 2.45.2 → 2.47.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-DHb1tpu-.mjs → EventTransport-BHKy4_Bi.mjs} +5 -6
- package/dist/{EventTransport-CiicKz2Z.d.mts → EventTransport-CYEoCJGe.d.mts} +0 -2
- package/dist/{HookSystem-C1u0EUnt.mjs → HookSystem-CAIDVoKC.mjs} +3 -4
- package/dist/{QueryCache--5uAuYPW.d.mts → QueryCache-DdvrGG8Q.d.mts} +1 -3
- package/dist/{ResourceRegistry-D2jXWVN_.mjs → ResourceRegistry-23Ml6FNe.mjs} +15 -4
- package/dist/{acquire-DTkA8Lme.mjs → acquire-DoFX06fm.mjs} +2 -3
- package/dist/{actionPermissions-DRVk6m7x.mjs → actionPermissions-DXrlWHHK.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-D48fUJv1.mjs → authorizationDecision-DYiubkYw.mjs} +5 -6
- package/dist/{base-CZyixEQR.d.mts → base-HXNgPQww.d.mts} +1 -7
- package/dist/{boundedMap-DkKiPifd.mjs → boundedMap-CtdzpJ3X.mjs} +2 -3
- package/dist/{buildHandler-BiZ4VATS.mjs → buildHandler-CARdmPNo.mjs} +5 -6
- package/dist/cache/index.d.mts +4 -10
- package/dist/cache/index.mjs +5 -6
- package/dist/{caching-Cj0as-P1.mjs → caching-QRiryDLs.mjs} +3 -4
- package/dist/{claimed-ChI13rUR.mjs → claimed-BLecr1j3.mjs} +2 -3
- package/dist/cleanup/index.d.mts +4 -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-D_aiew34.mjs → constants-Cx7BcnHT.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-QIZ2560Y.mjs → core-0WyMuo0f.mjs} +9 -12
- package/dist/{createActionRouter-CvH84dyx.mjs → createActionRouter-mLAGbpDV.mjs} +7 -8
- package/dist/{createAggregationRouter-DGyK2Hp6.mjs → createAggregationRouter-BEAjn3dA.mjs} +9 -10
- package/dist/{createApp-CKjZpmq9.mjs → createApp-QDP4vYWH.mjs} +49 -62
- package/dist/{createMcpServer-DSztofa9.d.mts → createMcpServer-DzXHX0SO.d.mts} +1 -3
- package/dist/{defineAggregation-BLza7Ca4.mjs → defineAggregation-CFNfvz-C.mjs} +2 -3
- package/dist/{defineResource-CEo0gDCb.mjs → defineResource-BROJmhzJ.mjs} +80 -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-BW2J3tNj.d.mts → elevation-DPD0hcU-.d.mts} +0 -2
- package/dist/{elevation-BJTsSnke.mjs → elevation-DrXeEWWk.mjs} +9 -10
- 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-2p4SL5zm.mjs → errorHandler-BiBXtxj4.mjs} +16 -6
- package/dist/{errors-JYc9vwqE.d.mts → errors-DTo0me1o.d.mts} +0 -2
- package/dist/{errors-grZkIA8N.mjs → errors-DnrUChAy.mjs} +2 -3
- package/dist/{eventPlugin-BtmA4-3P.d.mts → eventPlugin-BY38F6yK.d.mts} +1 -7
- package/dist/{eventPlugin-ItcYBGUs.mjs → eventPlugin-BhKLUe7H.mjs} +10 -12
- package/dist/{eventTypes-Ck6fD3ne.mjs → eventTypes-CCIRGakw.mjs} +5 -8
- package/dist/events/index.d.mts +5 -17
- package/dist/events/index.mjs +9 -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-bzkWPt1f.d.mts} +4 -10
- package/dist/{fields-BRX0Krcj.mjs → fields-CYdpcV73.mjs} +2 -3
- package/dist/{fields-BBSpf8pS.d.mts → fields-JTkrtO-r.d.mts} +0 -2
- package/dist/{filter-merge-CDc7YMwX.mjs → filter-merge-6kasezRH.mjs} +2 -3
- package/dist/{generate-DCGuEbqI.d.mts → generate-C-g_KOkV.d.mts} +0 -4
- package/dist/{generate-hvg7V2g1.mjs → generate-DUkcbc4r.mjs} +7 -12
- package/dist/{headers-Cqkg4LzI.mjs → headers-KxhrKevA.mjs} +3 -4
- package/dist/{health-PVt0VjOx.mjs → health-CRJg3IIq.mjs} +2 -3
- package/dist/{health-DyeP3mTW.mjs → health-jkYNdobJ.mjs} +4 -7
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/http-cache/index.d.mts +211 -0
- package/dist/http-cache/index.mjs +605 -0
- package/dist/http-cache/purgers/cloudflare.d.mts +13 -0
- package/dist/http-cache/purgers/cloudflare.mjs +46 -0
- package/dist/http-cache/purgers/fastly.d.mts +12 -0
- package/dist/http-cache/purgers/fastly.mjs +47 -0
- package/dist/http-cache/testing/index.d.mts +68 -0
- package/dist/http-cache/testing/index.mjs +168 -0
- package/dist/idempotency/index.d.mts +3 -9
- package/dist/idempotency/index.mjs +11 -14
- 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-BxZS-8So.d.mts} +67 -25
- package/dist/{index-WH7xgvxS.d.mts → index-Cy2-QffW.d.mts} +40 -92
- package/dist/{index-uhkUA5-U.d.mts → index-D1X_C_qz.d.mts} +13 -23
- package/dist/{index-CUJvoyw3.d.mts → index-DFCCQ9AE.d.mts} +2 -24
- package/dist/index.d.mts +7 -9
- package/dist/index.mjs +12 -13
- package/dist/{init-jC3rMPzb.mjs → init-CACwpktI.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 +5 -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-ptwyzZQ-.mjs → jsonBody-CzDBkCme.mjs} +3 -4
- package/dist/{keys-C1vFuSbv.mjs → keys-Cbwf6r1B.mjs} +2 -3
- package/dist/{loadResources-CHPDyIPn.mjs → loadResources-Kr6vuljv.mjs} +4 -5
- package/dist/{loadResourcesFromEntry-BkHHTu_B.mjs → loadResourcesFromEntry-D2e0qoDR.mjs} +3 -4
- package/dist/logger/index.d.mts +1 -3
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-C5bvCiAK.mjs → logger-C110X5Yz.mjs} +3 -5
- package/dist/{mcpPlugin-C9qohJCF.mjs → mcpPlugin-4lIPr9OJ.mjs} +41 -60
- package/dist/{memory-CxiTwT0j.mjs → memory-D9qkhXiB.mjs} +4 -5
- package/dist/{metrics-Ckp2zRy-.mjs → metrics-B-qrrWfI.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-CfnKuIuH.mjs → module-BD8xHgrz.mjs} +2 -3
- package/dist/{multiTenant-CAtYlW6H.d.mts → multiTenant-KZj8j1uJ.d.mts} +1 -5
- package/dist/{multipartBody-BFasGtP9.mjs → multipartBody-qU7KCn1l.mjs} +2 -3
- package/dist/observeSend-BnPtTotW.mjs +20 -0
- package/dist/{openapi-DAPxjYHX.mjs → openapi-DoVa5SVP.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-5Mnwcycy.d.mts} +3 -9
- package/dist/outbox-module-DyITEIop.mjs +297 -0
- package/dist/permissions/index.d.mts +4 -4
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-B14c3OMp.mjs → permissions-BBy4bOGi.mjs} +19 -29
- package/dist/{pipe-CQv7PsAK.mjs → pipe-BOm2o4UA.mjs} +3 -4
- package/dist/pipeline/index.d.mts +1 -9
- package/dist/pipeline/index.mjs +5 -8
- package/dist/{plan-CpnTykjb.mjs → plan-DDIGwuxr.mjs} +5 -9
- package/dist/{plugin-DXTjVg_Q.mjs → plugin-Bn4D_0XK.mjs} +156 -64
- 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-C3VJKRGp.mjs → pluralize-ClEjcKlG.mjs} +2 -3
- package/dist/policy.types-DPqToKG1.d.mts +50 -0
- 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-CquqYJPy.mjs → presets-DK2jh5YR.mjs} +11 -18
- package/dist/{projection-CgfSLOSM.mjs → projection-BHH-sXyS.mjs} +3 -4
- package/dist/purger.types-2wNJK_89.mjs +24 -0
- package/dist/purger.types-DvPp4-yd.d.mts +26 -0
- package/dist/{pushref-registry-UxCkoA4C.d.mts → pushref-registry-d86QUaSq.d.mts} +0 -6
- package/dist/{queryCachePlugin-D0HUISHJ.mjs → queryCachePlugin-Ckqe98AM.mjs} +8 -10
- package/dist/{queryCachePlugin-C2lZjTxk.d.mts → queryCachePlugin-DYQUyeJ9.d.mts} +2 -4
- package/dist/{rateLimitKey-AvkBOMkl.mjs → rateLimitKey-CWAjlqcN.mjs} +2 -3
- package/dist/{realtime-CbWtVbqK.mjs → realtime-BIJi9USY.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-BVwpAuFI.mjs → registry-y9ZA-R_J.mjs} +7 -12
- package/dist/{outbox-module-B4FAkx3A.mjs → relay-BNrC1CEP.mjs} +8 -306
- package/dist/{renewingLease-CykpeNcQ.mjs → renewingLease-CS43br5E.mjs} +2 -3
- package/dist/{replyHelpers-DA51IZio.mjs → replyHelpers-oZDzakGb.mjs} +3 -4
- package/dist/{requestContext-DIWHKDtQ.mjs → requestContext-fWb_YaV2.mjs} +2 -3
- package/dist/{requirement-Cp_fsMDL.mjs → requirement--2hWyyHi.mjs} +2 -3
- package/dist/{requirement-CbiLdQ1n.d.mts → requirement-CTRQjjQx.d.mts} +0 -2
- package/dist/{resourceRateLimit-BFuluodF.mjs → resourceRateLimit-1WbcyMZY.mjs} +3 -4
- package/dist/{resourceRateLimit-Wf6d6FL9.d.mts → resourceRateLimit-DCWglD7V.d.mts} +1 -3
- package/dist/{rolldown-runtime-D_lMdYOd.mjs → rolldown-runtime-yH2lHMo_.mjs} +2 -3
- package/dist/{routeValidator-DuLonYwr.mjs → routeValidator-BSlRIA5c.mjs} +2 -3
- package/dist/{runtimeCapabilities-CydRfm0i.mjs → runtimeCapabilities-CYCEtU1W.mjs} +2 -3
- package/dist/{schedules-B693KXxa.mjs → schedules-B5WGlYIT.mjs} +132 -9
- package/dist/{schemaConverter-DNvZWTV6.mjs → schemaConverter-DtNvts-6.mjs} +3 -4
- package/dist/{schemaIR-REV2y7Wd.mjs → schemaIR-uS_RHqa3.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-Bevxy_ST.mjs → scope-BwVLSyNG.mjs} +5 -6
- package/dist/{sessionManager-qimlKV0P.d.mts → sessionManager-CdvDF04x.d.mts} +2 -4
- package/dist/{shutdown-CfrqPR7A.mjs → shutdown-BJiJN7FT.mjs} +2 -3
- package/dist/{simpleEqualityMatcher-BJwfuRKP.mjs → simpleEqualityMatcher-DGRLq-1k.mjs} +2 -3
- package/dist/{sse-CuNNWr2z.mjs → sse-B_50llZu.mjs} +8 -9
- package/dist/{sseStream-C_2ujAVY.mjs → sseStream-BjSo9Ult.mjs} +3 -4
- package/dist/{storage-Cx9Sz3Ou.d.mts → storage-odC5MNKN.d.mts} +0 -2
- package/dist/{store-helpers-C8uBGCbb.mjs → store-helpers-D-n5cwy5.mjs} +2 -3
- package/dist/{streaming-Bdq_M4d5.mjs → streaming-Dcgqa-hH.mjs} +2 -3
- package/dist/{subscriberIdentity-B-KpZkdl.mjs → subscriberIdentity-C9KhIXTF.mjs} +2 -3
- package/dist/{tenancy-C5PCvm1h.mjs → tenancy-COrhjPRZ.mjs} +3 -4
- package/dist/{tenantPreparation-dYvWrgNa.mjs → tenantPreparation-BElWHytd.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-DCqsezX8.mjs → timing-CaxKbRk_.mjs} +3 -5
- package/dist/{tracing-Dro5eH6j.d.mts → tracing-JSFiBl5r.d.mts} +0 -2
- package/dist/{transactionContext-DrcNyjpv.mjs → transactionContext-8qKON0Nk.mjs} +2 -3
- package/dist/{typeGuards-CEl10KPy.mjs → typeGuards-DVjVSsXO.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-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-D9NWjpYc.mjs → types-DZHqOuJE.mjs} +5 -6
- package/dist/{types-D3Ixsh00.d.mts → types-DeLiuaNv.d.mts} +2 -4
- 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-BHig1kHq.mjs → userHelpers-_eGj6kf0.mjs} +2 -3
- package/dist/utils/index.d.mts +5 -39
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-BG5P7_Vb.mjs → utils-Dd6MWpye.mjs} +20 -30
- package/dist/{validate-D_mdOCir.mjs → validate-BaF5wd0x.mjs} +5 -7
- package/dist/{versioning-DBGHjPh7.mjs → versioning-DyV7mwtK.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-DPPfM4m6.mjs → workScope-CmCBUmPR.mjs} +3 -4
- package/llms.txt +37 -30
- package/package.json +51 -22
- 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,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
|
|
1
|
+
/*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
|
|
2
|
+
// src/utils/pluralize.ts
|
|
3
3
|
/**
|
|
4
4
|
* Lightweight English pluralization for the Arc CLI.
|
|
5
5
|
*
|
|
@@ -83,5 +83,4 @@ function pluralize(word) {
|
|
|
83
83
|
if (lower.endsWith("o") && !/[aeiou]o$/i.test(lower)) return `${word}es`;
|
|
84
84
|
return `${word}s`;
|
|
85
85
|
}
|
|
86
|
-
//#endregion
|
|
87
86
|
export { pluralize as t };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
|
|
2
|
+
import { FastifyRequest } from "fastify";
|
|
3
|
+
/** Tags for one response: a fixed list, or computed from the request and the reply body. */
|
|
4
|
+
type TagSpec = readonly string[] | ((request: FastifyRequest, body: unknown) => readonly string[] | undefined);
|
|
5
|
+
/** How one route may be cached. Seconds throughout. */
|
|
6
|
+
interface HttpCachePolicy {
|
|
7
|
+
/** Shared-cache (CDN) TTL. Must be > 0. */
|
|
8
|
+
cdn: number;
|
|
9
|
+
/** Browser TTL. A browser copy cannot be purged, so keep it short. Default 0. */
|
|
10
|
+
browser?: number;
|
|
11
|
+
/** Serve a stale copy while one request refreshes it (RFC 5861). CDN only. */
|
|
12
|
+
staleWhileRevalidate?: number;
|
|
13
|
+
/** Serve the last good copy while the origin errors (RFC 5861). Browser and CDN. */
|
|
14
|
+
staleIfError?: number;
|
|
15
|
+
/** Purge tags carried by the response, in addition to any derived ones. */
|
|
16
|
+
tags?: TagSpec;
|
|
17
|
+
}
|
|
18
|
+
/** A path-prefix rule, for routes that cannot carry `config`. */
|
|
19
|
+
interface HttpCacheRule extends HttpCachePolicy {
|
|
20
|
+
/** Path prefix, matched against the URL path without its query string. */
|
|
21
|
+
match: string;
|
|
22
|
+
}
|
|
23
|
+
/** Extra tags for one document: added to the derived `<resource>` / `<resource>:<id>`. */
|
|
24
|
+
type DocumentTags = (doc: unknown) => readonly string[] | undefined;
|
|
25
|
+
/** `defineResource({ httpCache })`: one policy per read operation; tags and purges derived from the resource. */
|
|
26
|
+
interface ResourceHttpCacheConfig {
|
|
27
|
+
list?: HttpCachePolicy;
|
|
28
|
+
get?: HttpCachePolicy;
|
|
29
|
+
tags?: {
|
|
30
|
+
extra?: DocumentTags;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/** What arc puts in a CRUD route's `config.httpCache` for a resource that declared `httpCache`. */
|
|
34
|
+
interface RouteHttpCacheConfig extends HttpCachePolicy {
|
|
35
|
+
resource?: {
|
|
36
|
+
name: string;
|
|
37
|
+
op: "list" | "get";
|
|
38
|
+
extra?: DocumentTags;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
type PrivacyReason = `header:${string}` | `cookie:${string}` | `scope:${string}` | "classifier";
|
|
42
|
+
type PrivacyDecision = {
|
|
43
|
+
private: false;
|
|
44
|
+
} | {
|
|
45
|
+
private: true;
|
|
46
|
+
reason: PrivacyReason;
|
|
47
|
+
};
|
|
48
|
+
/** Why a response on an opted-in route was not made public. */
|
|
49
|
+
type NonCacheableReason = PrivacyReason | "status" | "set-cookie";
|
|
50
|
+
export { PrivacyDecision as a, RouteHttpCacheConfig as c, NonCacheableReason as i, TagSpec as l, HttpCachePolicy as n, PrivacyReason as o, HttpCacheRule as r, ResourceHttpCacheConfig as s, DocumentTags as t };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import { i as RequestScope } from "../types-
|
|
3
|
-
import { l as PermissionCheck } from "../base-
|
|
4
|
-
import { W as PresetResult } from "../index-
|
|
5
|
-
import { a as StorageReadResult, i as StorageReadRange, n as StorageContext, o as StorageUploadInput, r as StorageFile, t as Storage } from "../storage-
|
|
6
|
-
//#region src/presets/filesUpload.d.ts
|
|
2
|
+
import { i as RequestScope } from "../types-DnkIALZ8.mjs";
|
|
3
|
+
import { l as PermissionCheck } from "../base-HXNgPQww.mjs";
|
|
4
|
+
import { W as PresetResult } from "../index-Cy2-QffW.mjs";
|
|
5
|
+
import { a as StorageReadResult, i as StorageReadRange, n as StorageContext, o as StorageUploadInput, r as StorageFile, t as Storage } from "../storage-odC5MNKN.mjs";
|
|
7
6
|
export interface FilesUploadPresetRoutes {
|
|
8
7
|
upload?: boolean;
|
|
9
8
|
read?: boolean;
|
|
@@ -67,5 +66,4 @@ export interface FilesUploadPresetOptions {
|
|
|
67
66
|
* envelope manually because the response is structured metadata, not bytes.
|
|
68
67
|
*/
|
|
69
68
|
export declare function filesUploadPreset(options: FilesUploadPresetOptions): PresetResult;
|
|
70
|
-
//#endregion
|
|
71
69
|
export type { Storage, StorageContext, StorageFile, StorageReadRange, StorageReadResult, StorageUploadInput };
|
|
@@ -1,9 +1,9 @@
|
|
|
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-
|
|
6
|
-
|
|
1
|
+
/*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
|
|
2
|
+
import { i as NotFoundError, u as ValidationError } from "../errors-DnrUChAy.mjs";
|
|
3
|
+
import { c as getOrgId, g as getUserId } from "../types-DZHqOuJE.mjs";
|
|
4
|
+
import { B as requireAuth, F as allowPublic } from "../permissions-BBy4bOGi.mjs";
|
|
5
|
+
import { t as multipartBody } from "../multipartBody-qU7KCn1l.mjs";
|
|
6
|
+
// src/presets/filesUpload.ts
|
|
7
7
|
const DEFAULT_FIELD_NAME = "file";
|
|
8
8
|
const DEFAULT_MAX_FILE_SIZE = 10485760;
|
|
9
9
|
function defaultContextFrom(scope) {
|
|
@@ -247,5 +247,4 @@ function filesUploadPreset(options) {
|
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
249
|
}
|
|
250
|
-
//#endregion
|
|
251
250
|
export { filesUploadPreset };
|
package/dist/presets/index.d.mts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import { t as AnyRecord } from "../base-
|
|
3
|
-
import { Hn as IRequestContext, L as ResourceConfig, Vn as IControllerResponse, W as PresetResult, i as PaginationResult } from "../index-
|
|
2
|
+
import { t as AnyRecord } from "../base-HXNgPQww.mjs";
|
|
3
|
+
import { Hn as IRequestContext, L as ResourceConfig, Vn as IControllerResponse, W as PresetResult, i as PaginationResult } from "../index-Cy2-QffW.mjs";
|
|
4
4
|
import { FilesUploadPresetOptions, FilesUploadPresetPermissions, FilesUploadPresetRoutes, filesUploadPreset } from "./filesUpload.mjs";
|
|
5
|
-
import { n as multiTenantPreset, r as TenantFieldSpec, t as MultiTenantOptions } from "../multiTenant-
|
|
5
|
+
import { n as multiTenantPreset, r as TenantFieldSpec, t as MultiTenantOptions } from "../multiTenant-KZj8j1uJ.mjs";
|
|
6
6
|
import { SearchHandler, SearchPresetOptions, SearchRouteConfig, searchPreset } from "./search.mjs";
|
|
7
|
-
//#region src/presets/audited.d.ts
|
|
8
7
|
interface AuditedPresetOptions {
|
|
9
8
|
/** Field name for creator (default: 'createdBy') */
|
|
10
9
|
createdByField?: string;
|
|
@@ -15,8 +14,6 @@ interface AuditedPresetOptions {
|
|
|
15
14
|
* Audited preset - adds createdBy/updatedBy tracking
|
|
16
15
|
*/
|
|
17
16
|
export declare function auditedPreset(options?: AuditedPresetOptions): PresetResult;
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region src/presets/bulk.d.ts
|
|
20
17
|
type BulkOperation = "createMany" | "updateMany" | "deleteMany";
|
|
21
18
|
interface BulkPresetOptions {
|
|
22
19
|
/** Which bulk operations to enable (default: all three) */
|
|
@@ -25,8 +22,6 @@ interface BulkPresetOptions {
|
|
|
25
22
|
maxCreateItems?: number;
|
|
26
23
|
}
|
|
27
24
|
export declare function bulkPreset(opts?: BulkPresetOptions): PresetResult;
|
|
28
|
-
//#endregion
|
|
29
|
-
//#region src/presets/ownedByUser.d.ts
|
|
30
25
|
interface OwnedByUserOptions {
|
|
31
26
|
ownerField?: string;
|
|
32
27
|
/**
|
|
@@ -43,23 +38,15 @@ interface OwnedByUserOptions {
|
|
|
43
38
|
missingOwner?: "deny" | "allow";
|
|
44
39
|
}
|
|
45
40
|
export declare function ownedByUserPreset(options?: OwnedByUserOptions): PresetResult;
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/presets/slugLookup.d.ts
|
|
48
41
|
interface SlugLookupOptions {
|
|
49
42
|
slugField?: string;
|
|
50
43
|
}
|
|
51
44
|
export declare function slugLookupPreset(options?: SlugLookupOptions): PresetResult;
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region src/presets/softDelete.d.ts
|
|
54
45
|
export declare function softDeletePreset(): PresetResult;
|
|
55
|
-
//#endregion
|
|
56
|
-
//#region src/presets/tree.d.ts
|
|
57
46
|
interface TreeOptions {
|
|
58
47
|
parentField?: string;
|
|
59
48
|
}
|
|
60
49
|
export declare function treePreset(options?: TreeOptions): PresetResult;
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region src/presets/types.d.ts
|
|
63
50
|
/**
|
|
64
51
|
* Soft Delete Preset Interface
|
|
65
52
|
*
|
|
@@ -265,8 +252,6 @@ interface PresetControllerContracts<TDoc> {
|
|
|
265
252
|
*/
|
|
266
253
|
type UnionToIntersection<U> = (U extends unknown ? (x: U) => void : never) extends ((x: infer I) => void) ? I : never;
|
|
267
254
|
type IPresetController<TDoc = unknown, TPresets extends keyof PresetControllerContracts<TDoc> = never> = UnionToIntersection<PresetControllerContracts<TDoc>[TPresets]>;
|
|
268
|
-
//#endregion
|
|
269
|
-
//#region src/presets/index.d.ts
|
|
270
255
|
type PresetFactory = (options?: AnyRecord) => PresetResult;
|
|
271
256
|
/**
|
|
272
257
|
* Get preset by name with options
|
|
@@ -294,5 +279,4 @@ export type PresetInput = string | PresetResult | {
|
|
|
294
279
|
* Validates preset combinations for conflicts before merging.
|
|
295
280
|
*/
|
|
296
281
|
export declare function applyPresets<TDoc = AnyRecord>(config: ResourceConfig<TDoc>, presets?: PresetInput[]): ResourceConfig<TDoc>;
|
|
297
|
-
//#endregion
|
|
298
282
|
export { type AuditedPresetOptions, type BulkOperation, type BulkPresetOptions, type FilesUploadPresetOptions, type FilesUploadPresetPermissions, type FilesUploadPresetRoutes, type IAuditedPreset, type IMultiTenantPreset, type IOwnedByUserPreset, type IPresetController, type ISlugLookupController, type ISoftDeleteController, type ITreeController, type MultiTenantOptions, type OwnedByUserOptions, type SearchHandler, type SearchPresetOptions, type SearchRouteConfig, type SlugLookupOptions, type TenantFieldSpec, type TreeOptions, filesUploadPreset, multiTenantPreset, searchPreset };
|
package/dist/presets/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as treePreset, c as ownedByUserPreset, i as registerPreset, l as bulkPreset, n as getAvailablePresets, o as softDeletePreset, r as getPreset, s as slugLookupPreset, t as applyPresets, u as auditedPreset } from "../presets-
|
|
1
|
+
/*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as treePreset, c as ownedByUserPreset, i as registerPreset, l as bulkPreset, n as getAvailablePresets, o as softDeletePreset, r as getPreset, s as slugLookupPreset, t as applyPresets, u as auditedPreset } from "../presets-DK2jh5YR.mjs";
|
|
3
3
|
import { filesUploadPreset } from "./filesUpload.mjs";
|
|
4
4
|
import { multiTenantPreset } from "./multiTenant.mjs";
|
|
5
5
|
import { searchPreset } from "./search.mjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { n as multiTenantPreset, r as TenantFieldSpec, t as MultiTenantOptions } from "../multiTenant-
|
|
2
|
+
import { n as multiTenantPreset, r as TenantFieldSpec, t as MultiTenantOptions } from "../multiTenant-KZj8j1uJ.mjs";
|
|
3
3
|
export { MultiTenantOptions, type TenantFieldSpec, multiTenantPreset };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import "../constants-
|
|
3
|
-
import { t as ArcError } from "../errors-
|
|
4
|
-
import { u as getRequestScope } from "../types-
|
|
5
|
-
import { i as tagTenantPreparation, t as applyTenantPreparation } from "../tenantPreparation-
|
|
6
|
-
|
|
1
|
+
/*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
|
|
2
|
+
import "../constants-Cx7BcnHT.mjs";
|
|
3
|
+
import { t as ArcError } from "../errors-DnrUChAy.mjs";
|
|
4
|
+
import { u as getRequestScope } from "../types-DZHqOuJE.mjs";
|
|
5
|
+
import { i as tagTenantPreparation, t as applyTenantPreparation } from "../tenantPreparation-BElWHytd.mjs";
|
|
6
|
+
// src/presets/multiTenant.ts
|
|
7
7
|
function createTenantMiddleware(specs, mode) {
|
|
8
8
|
const preparation = {
|
|
9
9
|
specs,
|
|
@@ -19,6 +19,7 @@ function createTenantMiddleware(specs, mode) {
|
|
|
19
19
|
error: error.status === 401 ? "Unauthorized" : "Forbidden",
|
|
20
20
|
message: error.message
|
|
21
21
|
});
|
|
22
|
+
return reply;
|
|
22
23
|
}
|
|
23
24
|
};
|
|
24
25
|
return tagTenantPreparation(middleware, preparation);
|
|
@@ -70,5 +71,4 @@ function multiTenantPreset(options = {}) {
|
|
|
70
71
|
}
|
|
71
72
|
};
|
|
72
73
|
}
|
|
73
|
-
//#endregion
|
|
74
74
|
export { multiTenantPreset };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { l as PermissionCheck } from "../base-
|
|
3
|
-
import { Dt as RouteMcpConfig, Et as RouteDefinition, Ln as ControllerHandler, W as PresetResult } from "../index-
|
|
4
|
-
//#region src/presets/search.d.ts
|
|
2
|
+
import { l as PermissionCheck } from "../base-HXNgPQww.mjs";
|
|
3
|
+
import { Dt as RouteMcpConfig, Et as RouteDefinition, Ln as ControllerHandler, W as PresetResult } from "../index-Cy2-QffW.mjs";
|
|
5
4
|
/**
|
|
6
5
|
* Search Preset — backend-agnostic search / vector / embed routes
|
|
7
6
|
*
|
|
@@ -135,5 +134,4 @@ export interface SearchPresetOptions {
|
|
|
135
134
|
* The preset itself stays DB-agnostic: nothing is imported from mongokit —
|
|
136
135
|
* it only feature-detects the optional methods on whatever repo you pass.
|
|
137
136
|
*/
|
|
138
|
-
export declare function searchPreset(options?: SearchPresetOptions): PresetResult;
|
|
139
|
-
//#endregion
|
|
137
|
+
export declare function searchPreset(options?: SearchPresetOptions): PresetResult;
|
package/dist/presets/search.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { B as requireAuth, F as allowPublic } from "../permissions-
|
|
3
|
-
|
|
1
|
+
/*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
|
|
2
|
+
import { B as requireAuth, F as allowPublic } from "../permissions-BBy4bOGi.mjs";
|
|
3
|
+
// src/presets/search.ts
|
|
4
4
|
const BUILTINS = [
|
|
5
5
|
{
|
|
6
6
|
key: "search",
|
|
@@ -146,5 +146,4 @@ function searchPreset(options = {}) {
|
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
//#endregion
|
|
150
149
|
export { searchPreset };
|
|
@@ -1,9 +1,9 @@
|
|
|
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.47.0 | MIT | https://classytic.com */
|
|
2
|
+
import { l as UnauthorizedError } from "./errors-DnrUChAy.mjs";
|
|
3
|
+
import { b as isElevated, n as PUBLIC_SCOPE } from "./types-DZHqOuJE.mjs";
|
|
4
|
+
import { B as requireAuth, F as allowPublic, U as requireRoles } from "./permissions-BBy4bOGi.mjs";
|
|
5
5
|
import { multiTenantPreset } from "./presets/multiTenant.mjs";
|
|
6
|
-
|
|
6
|
+
// src/presets/audited.ts
|
|
7
7
|
/**
|
|
8
8
|
* Audited preset - adds createdBy/updatedBy tracking
|
|
9
9
|
*/
|
|
@@ -35,8 +35,7 @@ function auditedPreset(options = {}) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
//#region src/presets/bulk.ts
|
|
38
|
+
// src/presets/bulk.ts
|
|
40
39
|
/**
|
|
41
40
|
* Bulk Operations Preset
|
|
42
41
|
*
|
|
@@ -141,8 +140,7 @@ function bulkPreset(opts) {
|
|
|
141
140
|
}
|
|
142
141
|
};
|
|
143
142
|
}
|
|
144
|
-
|
|
145
|
-
//#region src/presets/ownedByUser.ts
|
|
143
|
+
// src/presets/ownedByUser.ts
|
|
146
144
|
/**
|
|
147
145
|
* Create ownership check middleware.
|
|
148
146
|
*
|
|
@@ -182,8 +180,7 @@ function ownedByUserPreset(options = {}) {
|
|
|
182
180
|
}
|
|
183
181
|
};
|
|
184
182
|
}
|
|
185
|
-
|
|
186
|
-
//#region src/presets/slugLookup.ts
|
|
183
|
+
// src/presets/slugLookup.ts
|
|
187
184
|
/**
|
|
188
185
|
* Slug Lookup Preset
|
|
189
186
|
*
|
|
@@ -204,8 +201,7 @@ function slugLookupPreset(options = {}) {
|
|
|
204
201
|
controllerOptions: { slugField }
|
|
205
202
|
};
|
|
206
203
|
}
|
|
207
|
-
|
|
208
|
-
//#region src/presets/softDelete.ts
|
|
204
|
+
// src/presets/softDelete.ts
|
|
209
205
|
/**
|
|
210
206
|
* Soft Delete Preset
|
|
211
207
|
*
|
|
@@ -235,8 +231,7 @@ function softDeletePreset() {
|
|
|
235
231
|
}]
|
|
236
232
|
};
|
|
237
233
|
}
|
|
238
|
-
|
|
239
|
-
//#region src/presets/tree.ts
|
|
234
|
+
// src/presets/tree.ts
|
|
240
235
|
/**
|
|
241
236
|
* Tree Preset
|
|
242
237
|
*
|
|
@@ -264,8 +259,7 @@ function treePreset(options = {}) {
|
|
|
264
259
|
controllerOptions: { parentField }
|
|
265
260
|
};
|
|
266
261
|
}
|
|
267
|
-
|
|
268
|
-
//#region src/presets/index.ts
|
|
262
|
+
// src/presets/index.ts
|
|
269
263
|
const presetRegistry = {
|
|
270
264
|
softDelete: softDeletePreset,
|
|
271
265
|
slugLookup: slugLookupPreset,
|
|
@@ -400,5 +394,4 @@ function mergePreset(config, preset) {
|
|
|
400
394
|
}
|
|
401
395
|
return result;
|
|
402
396
|
}
|
|
403
|
-
//#endregion
|
|
404
397
|
export { treePreset as a, ownedByUserPreset as c, registerPreset as i, bulkPreset as l, getAvailablePresets as n, softDeletePreset as o, getPreset as r, slugLookupPreset as s, applyPresets as t, auditedPreset as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { c as getOrgId, f as getScopeContextMap, g as getUserId, m as getTeamId, x as isMember } from "./types-
|
|
3
|
-
|
|
1
|
+
/*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
|
|
2
|
+
import { c as getOrgId, f as getScopeContextMap, g as getUserId, m as getTeamId, x as isMember } from "./types-DZHqOuJE.mjs";
|
|
3
|
+
// src/scope/projection.ts
|
|
4
4
|
/**
|
|
5
5
|
* Compute the request-scope projection. Returns `undefined` when no
|
|
6
6
|
* scope is attached (public / unscoped routes) so hosts can idiomatically
|
|
@@ -38,5 +38,4 @@ function buildRequestScopeProjection(scope) {
|
|
|
38
38
|
function freezeContext(ctx) {
|
|
39
39
|
return ctx === void 0 ? void 0 : Object.freeze({ ...ctx });
|
|
40
40
|
}
|
|
41
|
-
//#endregion
|
|
42
41
|
export { buildRequestScopeProjection as t };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
|
|
2
|
+
// src/http-cache/purgers/purger.types.ts
|
|
3
|
+
/** A purge the CDN refused or never answered: a closed code plus the provider's own codes, never a credential. */
|
|
4
|
+
var CachePurgeError = class extends Error {
|
|
5
|
+
code = "http_cache.purge_failed";
|
|
6
|
+
purger;
|
|
7
|
+
status;
|
|
8
|
+
providerCodes;
|
|
9
|
+
constructor(purger, message, status, providerCodes = []) {
|
|
10
|
+
super(message);
|
|
11
|
+
this.name = "CachePurgeError";
|
|
12
|
+
this.purger = purger;
|
|
13
|
+
this.status = status;
|
|
14
|
+
this.providerCodes = providerCodes;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
/** Split tags into calls of at most `size`. */
|
|
18
|
+
function chunkTags(tags, size) {
|
|
19
|
+
if (!size || size >= tags.length) return [[...tags]];
|
|
20
|
+
const out = [];
|
|
21
|
+
for (let i = 0; i < tags.length; i += size) out.push(tags.slice(i, i + size));
|
|
22
|
+
return out;
|
|
23
|
+
}
|
|
24
|
+
export { chunkTags as n, CachePurgeError as t };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
/** `hard` evicts; `soft` marks stale so the next visitor gets the old copy while one request refreshes it. */
|
|
3
|
+
type PurgeMode = "hard" | "soft";
|
|
4
|
+
interface PurgerCapabilities {
|
|
5
|
+
/** The vendor can mark content stale instead of evicting it. Absent: soft purges are sent hard. */
|
|
6
|
+
readonly softPurge?: boolean;
|
|
7
|
+
/** Tags per call. arc splits larger batches; each chunk is delivered (and retried) on its own. */
|
|
8
|
+
readonly maxTagsPerCall?: number;
|
|
9
|
+
}
|
|
10
|
+
/** Purges cached responses by tag. Throws on failure: arc logs, counts, and (durably) retries. */
|
|
11
|
+
interface CachePurger {
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly capabilities?: PurgerCapabilities;
|
|
14
|
+
purgeTags(tags: readonly string[], options: {
|
|
15
|
+
mode: PurgeMode;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
/** A purge the CDN refused or never answered: a closed code plus the provider's own codes, never a credential. */
|
|
19
|
+
declare class CachePurgeError extends Error {
|
|
20
|
+
readonly code = "http_cache.purge_failed";
|
|
21
|
+
readonly purger: string;
|
|
22
|
+
readonly status: number | undefined;
|
|
23
|
+
readonly providerCodes: readonly (number | string)[];
|
|
24
|
+
constructor(purger: string, message: string, status?: number, providerCodes?: readonly (number | string)[]);
|
|
25
|
+
}
|
|
26
|
+
export { PurgerCapabilities as i, CachePurger as n, PurgeMode as r, CachePurgeError as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
//#region src/integrations/websocket/dead-queue.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Per-connection dead queue — ring buffer holding the last N outbound
|
|
5
4
|
* critical messages so a reconnecting client can RESUME and have any
|
|
@@ -50,8 +49,6 @@ declare class DeadQueue {
|
|
|
50
49
|
*/
|
|
51
50
|
snapshot(): DeadQueueEntry[];
|
|
52
51
|
}
|
|
53
|
-
//#endregion
|
|
54
|
-
//#region src/integrations/websocket/envelope.d.ts
|
|
55
52
|
/**
|
|
56
53
|
* Per-pushRef envelope state. One instance per logical session — when
|
|
57
54
|
* a client reconnects under the same pushRef within TTL, the same
|
|
@@ -86,8 +83,6 @@ declare class EnvelopeWriter {
|
|
|
86
83
|
/** Snapshot the dead queue contents for persistence. */
|
|
87
84
|
snapshotDeadQueue(): DeadQueueEntry[];
|
|
88
85
|
}
|
|
89
|
-
//#endregion
|
|
90
|
-
//#region src/integrations/websocket/pushref-registry.d.ts
|
|
91
86
|
/** Stable principal string. Format: `u:<userId>`, `c:<clientId>`, `anon`, or `conn:<pushRef>`. */
|
|
92
87
|
type Principal = string;
|
|
93
88
|
/**
|
|
@@ -434,5 +429,4 @@ declare class PushRefRegistry {
|
|
|
434
429
|
/** Reconstruct an EnvelopeWriter from a persisted snapshot. */
|
|
435
430
|
private hydrateEnvelope;
|
|
436
431
|
}
|
|
437
|
-
//#endregion
|
|
438
432
|
export { PushRefRegistry as a, SerializedEntry as c, Principal as i, EnvelopeWriter as l, FencedWriteOutcome as n, PushRefRegistryOptions as o, MemoryPushRefStore as r, PushRefStore as s, EnvelopeSnapshot as t, DeadQueueEntry as u };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { i as versionKey, r as tagVersionKey } from "./keys-
|
|
4
|
-
import { n as declareRuntimeCapability } from "./runtimeCapabilities-
|
|
5
|
-
import { t as hasEvents } from "./typeGuards-
|
|
6
|
-
import { t as MemoryCacheStore } from "./memory-
|
|
1
|
+
/*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-yH2lHMo_.mjs";
|
|
3
|
+
import { i as versionKey, r as tagVersionKey } from "./keys-Cbwf6r1B.mjs";
|
|
4
|
+
import { n as declareRuntimeCapability } from "./runtimeCapabilities-CYCEtU1W.mjs";
|
|
5
|
+
import { t as hasEvents } from "./typeGuards-DVjVSsXO.mjs";
|
|
6
|
+
import { t as MemoryCacheStore } from "./memory-D9qkhXiB.mjs";
|
|
7
7
|
import fp from "fastify-plugin";
|
|
8
|
-
|
|
8
|
+
// src/cache/QueryCache.ts
|
|
9
9
|
const MISS = Object.freeze({
|
|
10
10
|
status: "miss",
|
|
11
11
|
data: void 0
|
|
@@ -100,8 +100,7 @@ var QueryCache = class {
|
|
|
100
100
|
};
|
|
101
101
|
/** See `bumpVersion` — effectively non-expiring, refreshed on every bump. */
|
|
102
102
|
const VERSION_TTL_SECONDS = 31536e3;
|
|
103
|
-
|
|
104
|
-
//#region src/cache/queryCachePlugin.ts
|
|
103
|
+
// src/cache/queryCachePlugin.ts
|
|
105
104
|
var queryCachePlugin_exports = /* @__PURE__ */ __exportAll({ queryCachePlugin: () => queryCachePlugin });
|
|
106
105
|
const CRUD_SUFFIXES = /* @__PURE__ */ new Set([
|
|
107
106
|
"created",
|
|
@@ -191,5 +190,4 @@ const queryCachePlugin = fp(queryCachePluginImpl, {
|
|
|
191
190
|
name: "arc-query-cache",
|
|
192
191
|
fastify: "5.x"
|
|
193
192
|
});
|
|
194
|
-
//#endregion
|
|
195
193
|
export { queryCachePlugin_exports as n, QueryCache as r, queryCachePlugin as t };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { r as CacheStore } from "./interface-
|
|
3
|
-
import { i as QueryCache } from "./QueryCache
|
|
2
|
+
import { r as CacheStore } from "./interface-WR1U0K7t.mjs";
|
|
3
|
+
import { i as QueryCache } from "./QueryCache-DdvrGG8Q.mjs";
|
|
4
4
|
import { FastifyPluginAsync } from "fastify";
|
|
5
|
-
//#region src/cache/queryCachePlugin.d.ts
|
|
6
5
|
interface QueryCachePluginOptions {
|
|
7
6
|
/** CacheStore instance. Default: MemoryCacheStore with default options. */
|
|
8
7
|
store?: CacheStore;
|
|
@@ -30,5 +29,4 @@ declare module "fastify" {
|
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
declare const queryCachePlugin: FastifyPluginAsync<QueryCachePluginOptions>;
|
|
33
|
-
//#endregion
|
|
34
32
|
export { queryCachePlugin as i, QueryCacheDefaults as n, QueryCachePluginOptions as r, CrossResourceRule as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
|
|
1
|
+
/*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
|
|
2
|
+
// src/scope/rateLimitKey.ts
|
|
3
3
|
/**
|
|
4
4
|
* Marks a key generator as SCOPE-AWARE, so `buildRateLimitOpts` can place the rate-limit
|
|
5
5
|
* hook after authentication instead of before it.
|
|
@@ -37,5 +37,4 @@ function defaultTenantStrategy(ctx) {
|
|
|
37
37
|
if (scope.kind === "elevated") return scope.organizationId ?? scope.userId ?? ctx.ip;
|
|
38
38
|
return scope.userId ?? ctx.ip;
|
|
39
39
|
}
|
|
40
|
-
//#endregion
|
|
41
40
|
export { isScopeAwareKeyGenerator as n, createTenantKeyGenerator as t };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { t as arcLog } from "./logger-
|
|
4
|
-
import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-
|
|
5
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
6
|
-
import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-
|
|
7
|
-
import { t as applyFieldReadPermissions } from "./fields-
|
|
8
|
-
import { a as promoteStreamTokenToHeader } from "./streaming-
|
|
9
|
-
import { n as evaluateAndApplyPermission } from "./authorizationDecision-
|
|
10
|
-
import { t as openSseStream } from "./sseStream-
|
|
11
|
-
import { n as arcRouteValidatorCompiler } from "./routeValidator-
|
|
1
|
+
/*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-yH2lHMo_.mjs";
|
|
3
|
+
import { t as arcLog } from "./logger-C110X5Yz.mjs";
|
|
4
|
+
import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-DGRLq-1k.mjs";
|
|
5
|
+
import { n as getUserRoles } from "./userHelpers-_eGj6kf0.mjs";
|
|
6
|
+
import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-COrhjPRZ.mjs";
|
|
7
|
+
import { t as applyFieldReadPermissions } from "./fields-CYdpcV73.mjs";
|
|
8
|
+
import { a as promoteStreamTokenToHeader } from "./streaming-Dcgqa-hH.mjs";
|
|
9
|
+
import { n as evaluateAndApplyPermission } from "./authorizationDecision-DYiubkYw.mjs";
|
|
10
|
+
import { t as openSseStream } from "./sseStream-BjSo9Ult.mjs";
|
|
11
|
+
import { n as arcRouteValidatorCompiler } from "./routeValidator-BSlRIA5c.mjs";
|
|
12
12
|
import fp from "fastify-plugin";
|
|
13
|
-
|
|
13
|
+
// src/plugins/realtime.ts
|
|
14
14
|
var realtime_exports = /* @__PURE__ */ __exportAll({
|
|
15
15
|
DEFAULT_MAX_CONNECTION_MS: () => DEFAULT_MAX_CONNECTION_MS,
|
|
16
16
|
buildChangeFrame: () => buildChangeFrame,
|
|
@@ -188,8 +188,7 @@ const realtimePlugin = async (fastify, opts = {}) => {
|
|
|
188
188
|
return false;
|
|
189
189
|
}
|
|
190
190
|
if (typeof authenticate === "function") {
|
|
191
|
-
await authenticate(request, reply);
|
|
192
|
-
if (reply.sent) return false;
|
|
191
|
+
if (await authenticate(request, reply) === reply || reply.sent) return false;
|
|
193
192
|
}
|
|
194
193
|
return true;
|
|
195
194
|
};
|
|
@@ -322,9 +321,9 @@ const realtimePlugin = async (fastify, opts = {}) => {
|
|
|
322
321
|
const resourceName = request.params.resource;
|
|
323
322
|
const entry = lookupEntry(resourceName);
|
|
324
323
|
if (!entry) return notFound(reply, resourceName);
|
|
325
|
-
if (!await runAuth(request, reply, [entry])) return;
|
|
324
|
+
if (!await runAuth(request, reply, [entry])) return reply;
|
|
326
325
|
const sub = await authorizeResource(resourceName, entry, request, reply);
|
|
327
|
-
if (!sub) return;
|
|
326
|
+
if (!sub) return reply;
|
|
328
327
|
await streamSubscriptions(request, reply, [sub]);
|
|
329
328
|
}
|
|
330
329
|
});
|
|
@@ -362,11 +361,11 @@ const realtimePlugin = async (fastify, opts = {}) => {
|
|
|
362
361
|
if (!entry) return notFound(reply, name);
|
|
363
362
|
entries.push(entry);
|
|
364
363
|
}
|
|
365
|
-
if (!await runAuth(request, reply, entries)) return;
|
|
364
|
+
if (!await runAuth(request, reply, entries)) return reply;
|
|
366
365
|
const subscriptions = [];
|
|
367
366
|
for (let i = 0; i < names.length; i++) {
|
|
368
367
|
const sub = await authorizeResource(names[i], entries[i], request, reply);
|
|
369
|
-
if (!sub) return;
|
|
368
|
+
if (!sub) return reply;
|
|
370
369
|
subscriptions.push(sub);
|
|
371
370
|
}
|
|
372
371
|
await streamSubscriptions(request, reply, subscriptions);
|
|
@@ -387,5 +386,4 @@ var realtime_default = fp(realtimePlugin, {
|
|
|
387
386
|
fastify: "5.x",
|
|
388
387
|
dependencies: ["arc-events"]
|
|
389
388
|
});
|
|
390
|
-
//#endregion
|
|
391
389
|
export { realtime_exports as n, realtime_default as t };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { n as UpstashKeyValueCommands, t as IoredisKeyValueCommands } from "./redisShapes-
|
|
3
|
-
import { i as IdempotencyStore, r as IdempotencyResult, t as IdempotencyAcquisition } from "./interface-
|
|
4
|
-
//#region src/idempotency/stores/redis.d.ts
|
|
2
|
+
import { n as UpstashKeyValueCommands, t as IoredisKeyValueCommands } from "./redisShapes-CqBXTn_s.mjs";
|
|
3
|
+
import { i as IdempotencyStore, r as IdempotencyResult, t as IdempotencyAcquisition } from "./interface-BmExzQRD.mjs";
|
|
5
4
|
interface RedisClient {
|
|
6
5
|
get(key: string): Promise<string | null>;
|
|
7
6
|
set(key: string, value: string, options?: {
|
|
@@ -112,5 +111,4 @@ interface UpstashRedisLike extends UpstashKeyValueCommands {
|
|
|
112
111
|
declare function upstashAsIdempotencyClient(client: UpstashRedisLike): RedisClient & {
|
|
113
112
|
eval?: (script: string, numkeys: number, ...args: (string | number)[]) => Promise<unknown>;
|
|
114
113
|
};
|
|
115
|
-
//#endregion
|
|
116
114
|
export { UpstashRedisLike as a, RedisIdempotencyStoreOptions as i, RedisClient as n, ioredisAsIdempotencyClient as o, RedisIdempotencyStore as r, upstashAsIdempotencyClient as s, IoredisLike as t };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as EventTransport, i as EventLogger, n as DomainEvent, r as EventHandler } from "./EventTransport-
|
|
3
|
-
//#region src/events/transports/redis-stream.d.ts
|
|
2
|
+
import { a as EventTransport, i as EventLogger, n as DomainEvent, r as EventHandler } from "./EventTransport-CYEoCJGe.mjs";
|
|
4
3
|
interface RedisStreamLike {
|
|
5
4
|
xadd(key: string, id: string, ...fieldValues: string[]): Promise<string | null>;
|
|
6
5
|
/**
|
|
@@ -215,5 +214,4 @@ declare class RedisStreamTransport implements EventTransport {
|
|
|
215
214
|
private buildDlqEnvelope;
|
|
216
215
|
private sleep;
|
|
217
216
|
}
|
|
218
|
-
//#endregion
|
|
219
217
|
export { RedisStreamTransport as n, RedisStreamTransportOptions as r, RedisStreamLike as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
//#region src/utils/redisShapes.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* The key/value command shapes arc's cache and idempotency stores share, for
|
|
5
4
|
* the two Redis clients hosts actually plug in: ioredis (TCP) and
|
|
@@ -51,5 +50,4 @@ interface UpstashKeyValueCommands {
|
|
|
51
50
|
}): Promise<[number, string[]] | [string, string[]]>;
|
|
52
51
|
eval?(script: string, keys: string[], args: (string | number)[]): Promise<unknown>;
|
|
53
52
|
}
|
|
54
|
-
//#endregion
|
|
55
53
|
export { UpstashKeyValueCommands as n, IoredisKeyValueCommands as t };
|