@classytic/arc 2.37.0 → 2.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BaseController-B5GZfUBy.mjs → BaseController-CYaDvmOB.mjs} +16 -15
- package/dist/{EventTransport-BEVP50ka.d.mts → EventTransport-Cx60_s-6.d.mts} +37 -0
- package/dist/{EventTransport-pGNNDQ__.mjs → EventTransport-Gq7JWbWw.mjs} +39 -7
- package/dist/{HookSystem-CuhHvcyZ.mjs → HookSystem-C0ikzqQf.mjs} +2 -2
- package/dist/{ResourceRegistry-DFOmazXg.mjs → ResourceRegistry-DPcX--zk.mjs} +2 -2
- package/dist/{actionPermissions-CQQrR4tu.mjs → actionPermissions-jlFZ1it4.mjs} +6 -6
- package/dist/audit/index.d.mts +1 -1
- package/dist/audit/index.mjs +2 -2
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.d.mts +1 -1
- package/dist/auth/index.mjs +79 -28
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-DgyWdav8.mjs → authorizationDecision-BP8GHtjc.mjs} +2 -2
- package/dist/{buildHandler-D2DkqtiY.mjs → buildHandler-DjXOqIvX.mjs} +4 -4
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-BmC2T-pX.mjs → caching-a3ZEcJJs.mjs} +2 -2
- package/dist/cleanup/index.d.mts +2 -2
- package/dist/cleanup/index.mjs +4 -4
- package/dist/cli/commands/describe.d.mts +1 -1
- package/dist/cli/commands/describe.mjs +3 -3
- package/dist/cli/commands/docs.mjs +3 -3
- package/dist/cli/commands/doctor.mjs +1 -1
- package/dist/cli/commands/generate.mjs +2 -2
- package/dist/cli/commands/init.mjs +2 -2
- package/dist/cli/commands/introspect.mjs +2 -2
- package/dist/cli/index.mjs +3 -3
- package/dist/{constants-CUpamQMJ.mjs → constants-BONghE1Y.mjs} +1 -1
- package/dist/context/index.mjs +3 -3
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.mjs +7 -7
- package/dist/{core-C8GWw-Iu.mjs → core-8She7FgF.mjs} +3 -3
- package/dist/{createActionRouter-CwDU_j2S.mjs → createActionRouter-Bqi6Bhhx.mjs} +7 -7
- package/dist/{createAggregationRouter-d057xXX1.mjs → createAggregationRouter-BsYO7ktd.mjs} +7 -7
- package/dist/{defineAggregation-cCitY2FA.mjs → defineAggregation-0KBvqEEC.mjs} +1 -1
- package/dist/{defineResource-WcbE1kJL.mjs → defineResource-BMdyRelW.mjs} +18 -18
- package/dist/discovery/index.mjs +1 -1
- package/dist/docs/index.d.mts +1 -1
- package/dist/docs/index.mjs +3 -3
- package/dist/{elevation-Bc6Gafv9.mjs → elevation-C6woysGC.mjs} +4 -4
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-CB75oY5i.mjs → errorHandler-BdmIWPba.mjs} +4 -4
- package/dist/{errors-DsdZc1Xv.mjs → errors-2ExmOgIJ.mjs} +1 -1
- package/dist/{eventPlugin-B47sfCJ8.d.mts → eventPlugin-DFvHa4Nf.d.mts} +10 -1
- package/dist/{eventPlugin-DEIfV1iC.mjs → eventPlugin-DJwpGMzx.mjs} +6 -6
- package/dist/events/index.d.mts +4 -4
- package/dist/events/index.mjs +5 -5
- package/dist/events/transports/redis-stream-entry.d.mts +1 -1
- package/dist/events/transports/redis-stream-entry.mjs +1 -1
- package/dist/events/transports/redis.d.mts +1 -1
- package/dist/events/transports/redis.mjs +1 -1
- package/dist/factory/index.d.mts +4 -4
- package/dist/factory/index.mjs +5 -5
- package/dist/{fastify-augmentation-CdY8FINU.d.mts → fastify-augmentation-jYA2oHyL.d.mts} +3 -3
- package/dist/{fields-DvGz47Ul.mjs → fields-Cha2QCKH.mjs} +37 -2
- package/dist/{generate-D7CIIWhS.mjs → generate-BUP4Oydg.mjs} +2 -2
- package/dist/{headers-BFu1st_i.mjs → headers-DeXNifVj.mjs} +2 -2
- package/dist/{health-Cc_sb94d.mjs → health-Bh0N_FLk.mjs} +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/idempotency/index.mjs +4 -4
- package/dist/idempotency/redis.mjs +1 -1
- package/dist/{index-C01wWGJt.d.mts → index-B78WZom8.d.mts} +11 -2
- package/dist/{index-du18bJjH.d.mts → index-BRoDtjek.d.mts} +2 -4
- package/dist/{index-DCxxRwLC.d.mts → index-D2uIUSQk.d.mts} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +11 -11
- package/dist/{init-BMgU1wYR.mjs → init-Dg_Am2o_.mjs} +1 -1
- package/dist/integrations/event-gateway.d.mts +1 -1
- package/dist/integrations/event-gateway.mjs +2 -2
- package/dist/integrations/index.d.mts +1 -1
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.mjs +2 -2
- package/dist/integrations/mcp/index.d.mts +2 -2
- package/dist/integrations/mcp/index.mjs +2 -2
- package/dist/integrations/mcp/testing.d.mts +1 -1
- package/dist/integrations/mcp/testing.mjs +2 -2
- package/dist/integrations/streamline.mjs +3 -3
- package/dist/integrations/webhooks.d.mts +2 -2
- package/dist/integrations/webhooks.mjs +3 -3
- package/dist/integrations/websocket-pushref-redis.mjs +1 -1
- package/dist/integrations/websocket-redis.mjs +1 -1
- package/dist/integrations/websocket.mjs +1 -1
- package/dist/{interface-CaPVHoVJ.mjs → interface-DYPVscCU.mjs} +1 -1
- package/dist/{jsonBody-BuzxOZV8.mjs → jsonBody-DVui0uJl.mjs} +2 -2
- package/dist/{keys-DoUI9-yP.mjs → keys-BSuxGS-B.mjs} +1 -1
- package/dist/{loadResources-CPlRWJCv.mjs → loadResources-CNd1DWnK.mjs} +2 -2
- package/dist/{loadResourcesFromEntry-CPCZiX9n.mjs → loadResourcesFromEntry-DNj8cpiY.mjs} +2 -2
- package/dist/logger/index.mjs +1 -1
- package/dist/{mcpPlugin-dxMxBPIg.mjs → mcpPlugin-KWsezMx7.mjs} +15 -15
- package/dist/{memory-BnafVem_.mjs → memory-BiPVaCPg.mjs} +2 -2
- package/dist/{metrics-CeAIcVMY.mjs → metrics-CsWaIVTa.mjs} +2 -2
- package/dist/middleware/index.d.mts +1 -1
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module-DIvG8qOg.mjs → module-BQXHxMEk.mjs} +1 -1
- package/dist/{multipartBody-BVCoaTwu.mjs → multipartBody-u6VrS_iH.mjs} +1 -1
- package/dist/{openapi-D_i6CifU.mjs → openapi-Dxc8RLy_.mjs} +6 -6
- package/dist/outbox-admin/index.d.mts +1 -1
- package/dist/outbox-admin/index.mjs +4 -4
- package/dist/{outbox-module-BbdaMyqy.d.mts → outbox-module-CQXu_O6o.d.mts} +2 -2
- package/dist/{outbox-module-CKaLL5BH.mjs → outbox-module-DyIqA5vo.mjs} +4 -4
- package/dist/permissions/index.mjs +5 -5
- package/dist/{permissions-DWkl60hx.mjs → permissions-H7Zcb82Z.mjs} +6 -6
- package/dist/{pipe-Dbs3GhOZ.mjs → pipe-SunhEaZ6.mjs} +2 -2
- package/dist/pipeline/index.d.mts +1 -1
- package/dist/pipeline/index.mjs +2 -2
- package/dist/plugins/index.d.mts +4 -4
- package/dist/plugins/index.mjs +16 -16
- package/dist/plugins/response-cache.mjs +2 -2
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-DgaYX91M.mjs → pluralize-Da7IT_qJ.mjs} +1 -1
- package/dist/{preloadResources-BYFfYnjZ.d.mts → preloadResources-BbBkNkqK.d.mts} +6 -6
- package/dist/{preloadResources-BUoGKPaS.mjs → preloadResources-DlhH81py.mjs} +21 -21
- package/dist/presets/filesUpload.d.mts +1 -1
- package/dist/presets/filesUpload.mjs +5 -5
- package/dist/presets/index.d.mts +1 -1
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.d.mts +1 -1
- package/dist/presets/multiTenant.mjs +3 -3
- package/dist/presets/search.d.mts +1 -1
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-Gbv9mNKD.mjs → presets-CNyfaxGL.mjs} +4 -4
- package/dist/{projection-BunxoeON.mjs → projection-DSfEoooA.mjs} +2 -2
- package/dist/{queryCachePlugin-BYqmg89O.mjs → queryCachePlugin-oTsmVyEQ.mjs} +5 -5
- package/dist/{rateLimitKey-DlqmDHA5.mjs → rateLimitKey-CewdR-m6.mjs} +1 -1
- package/dist/{realtime-CiAp2-LH.mjs → realtime-CPmjjgqd.mjs} +9 -9
- package/dist/{redis-stream-mwLWlfHG.d.mts → redis-stream-eh0eOtjh.d.mts} +1 -1
- package/dist/{registerRoute-dnf-JJf-.mjs → registerRoute-XvcI_3sh.mjs} +10 -6
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-ByC0UFNS.mjs → registry-UFEJQN8R.mjs} +2 -2
- package/dist/{renewingLease-C5Ta_ImD.mjs → renewingLease-DuRGVOMe.mjs} +1 -1
- package/dist/{replyHelpers-D1k0wHoO.mjs → replyHelpers-BHebarf0.mjs} +2 -2
- package/dist/{requestContext-DGM7EZRI.mjs → requestContext-DpmntRZy.mjs} +1 -1
- package/dist/{rolldown-runtime-DrZrabOW.mjs → rolldown-runtime-Add2L50I.mjs} +1 -1
- package/dist/{runtimeCapabilities-c4Sc85X-.mjs → runtimeCapabilities-D793Pxci.mjs} +1 -1
- package/dist/{schedules-CVtolEa-.mjs → schedules-DthM8Qag.mjs} +3 -3
- package/dist/{schemaConverter-C8zbW7tJ.mjs → schemaConverter-Db-MMsH6.mjs} +1 -1
- package/dist/{schemaIR-BfI425RH.mjs → schemaIR-CIXShch7.mjs} +2 -2
- package/dist/schemas/index.mjs +1 -1
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-DFSOKc4T.mjs → scope-D03sk17n.mjs} +4 -4
- package/dist/{simpleEqualityMatcher-Bhp7WrRF.mjs → simpleEqualityMatcher-B7qVjQBv.mjs} +1 -1
- package/dist/{sse-vRuwDd6N.mjs → sse-D4MYqkic.mjs} +5 -5
- package/dist/{sseStream-cWezGOk1.mjs → sseStream-BuMNPR6r.mjs} +2 -2
- package/dist/{store-helpers-bU8H5c-A.mjs → store-helpers-CIF4RG8s.mjs} +1 -1
- package/dist/{streaming-weWcFCk4.mjs → streaming-DkpW1HwJ.mjs} +1 -1
- package/dist/{subscribe-helpers-BrcG3NlV.mjs → subscribe-helpers-CBZOi6pk.mjs} +2 -2
- package/dist/sync/changelog.mjs +1 -1
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +4 -4
- package/dist/testing/index.mjs +10 -10
- package/dist/testing/outboxStoreContract.mjs +1 -1
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{transactionContext-Ca5peQpc.mjs → transactionContext-DMmvcfdo.mjs} +1 -1
- package/dist/{typeGuards-ALWme5WB.mjs → typeGuards-DHTnEs5X.mjs} +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-BMa2EPtv.d.mts → types-BRU-Kd3t.d.mts} +1 -1
- package/dist/{types-lDs9oF4z.mjs → types-BqLyyH0o.mjs} +4 -4
- package/dist/{types-BXnTOsXP.d.mts → types-LQFwC37d.d.mts} +1 -1
- package/dist/usage/index.mjs +0 -0
- package/dist/{userHelpers-DU_Z5OBA.mjs → userHelpers-CXySQFRg.mjs} +1 -1
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.mjs +11 -11
- package/dist/{utils-sXGFLegw.mjs → utils-BbGG8XNT.mjs} +1230 -1230
- package/dist/{validate-qK_-7MVk.mjs → validate-CidSeUrx.mjs} +2 -2
- package/dist/{versioning-DEs-_hFi.d.mts → versioning-B843jOYX.d.mts} +1 -1
- package/dist/{versioning-Dtw0MyX4.mjs → versioning-C2r0eOZ4.mjs} +3 -3
- package/package.json +11 -9
- package/skills/arc/references/auth.md +5 -2
- package/skills/arc/references/production.md +733 -733
- package/skills/arc-code-review/references/migration-recipes.md +16 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import "./constants-
|
|
3
|
-
import { t as defineResource } from "./defineResource-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import "./constants-BONghE1Y.mjs";
|
|
3
|
+
import { t as defineResource } from "./defineResource-BMdyRelW.mjs";
|
|
4
4
|
//#region src/core/defineAction.ts
|
|
5
5
|
/**
|
|
6
6
|
* Build an `ActionDefinition` with a typed handler. The literal schema
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import "./constants-
|
|
4
|
-
import { f as createError } from "./errors-
|
|
5
|
-
import {
|
|
6
|
-
import { i as
|
|
7
|
-
import { n as schemaIRToJsonSchemaBranch, t as normalizeSchemaIR } from "./schemaIR-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Add2L50I.mjs";
|
|
3
|
+
import "./constants-BONghE1Y.mjs";
|
|
4
|
+
import { f as createError } from "./errors-2ExmOgIJ.mjs";
|
|
5
|
+
import { i as resolvePipelineSteps, n as buildActionPipelineHandler, u as sendControllerResponse } from "./actionPermissions-jlFZ1it4.mjs";
|
|
6
|
+
import { a as selectPluginMw, c as buildRouteHooks, f as buildAuthMiddlewareForPermissions, i as resolveRouterPluginMw, n as buildRateLimitConfig, o as buildActionPermissionMw, p as buildArcDecorator, r as buildRouteConfig, t as tryRegisterRoute, u as routeHookOptions } from "./registerRoute-XvcI_3sh.mjs";
|
|
7
|
+
import { n as schemaIRToJsonSchemaBranch, t as normalizeSchemaIR } from "./schemaIR-CIXShch7.mjs";
|
|
8
8
|
//#region src/core/createActionRouter.ts
|
|
9
9
|
var createActionRouter_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
buildActionBodySchema: () => buildActionBodySchema,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as evaluateAndApplyPermission } from "./authorizationDecision-
|
|
3
|
-
import { f as createError } from "./errors-
|
|
4
|
-
import { u as getRequestScope } from "./types-
|
|
5
|
-
import { a as selectPluginMw, c as buildRouteHooks, d as buildAuthMiddleware, i as resolveRouterPluginMw, n as buildRateLimitConfig, p as buildArcDecorator, u as routeHookOptions } from "./registerRoute-
|
|
6
|
-
import { n as validateAggregations } from "./validate-
|
|
7
|
-
import { t as buildAggregationHandler } from "./buildHandler-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as evaluateAndApplyPermission } from "./authorizationDecision-BP8GHtjc.mjs";
|
|
3
|
+
import { f as createError } from "./errors-2ExmOgIJ.mjs";
|
|
4
|
+
import { u as getRequestScope } from "./types-BqLyyH0o.mjs";
|
|
5
|
+
import { a as selectPluginMw, c as buildRouteHooks, d as buildAuthMiddleware, i as resolveRouterPluginMw, n as buildRateLimitConfig, p as buildArcDecorator, u as routeHookOptions } from "./registerRoute-XvcI_3sh.mjs";
|
|
6
|
+
import { n as validateAggregations } from "./validate-CidSeUrx.mjs";
|
|
7
|
+
import { t as buildAggregationHandler } from "./buildHandler-DjXOqIvX.mjs";
|
|
8
8
|
//#region src/core/aggregation/createAggregationRouter.ts
|
|
9
9
|
/**
|
|
10
10
|
* Register one Fastify route per aggregation. No-op when the map is
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { p as MUTATION_OPERATIONS, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS } from "./constants-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { p as MUTATION_OPERATIONS, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS } from "./constants-BONghE1Y.mjs";
|
|
3
3
|
import { arcLog } from "./logger/index.mjs";
|
|
4
|
-
import { r as ForbiddenError } from "./errors-
|
|
5
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
6
|
-
import { b as isElevated, n as PUBLIC_SCOPE, x as isMember } from "./types-
|
|
7
|
-
import { d as isWriteVerbCapable, p as DEFAULT_FIELD_WRITE_DENIAL_POLICY, t as BaseController, u as detectOverriddenWriteSlots } from "./BaseController-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { i as
|
|
13
|
-
import { t as
|
|
14
|
-
import {
|
|
15
|
-
import { B as requireAuth } from "./permissions-
|
|
16
|
-
import { r as getAvailablePresets, t as applyPresets } from "./presets-
|
|
17
|
-
import { t as pluralize } from "./pluralize-
|
|
4
|
+
import { r as ForbiddenError } from "./errors-2ExmOgIJ.mjs";
|
|
5
|
+
import { n as getUserRoles } from "./userHelpers-CXySQFRg.mjs";
|
|
6
|
+
import { b as isElevated, n as PUBLIC_SCOPE, x as isMember } from "./types-BqLyyH0o.mjs";
|
|
7
|
+
import { d as isWriteVerbCapable, p as DEFAULT_FIELD_WRITE_DENIAL_POLICY, t as BaseController, u as detectOverriddenWriteSlots } from "./BaseController-CYaDvmOB.mjs";
|
|
8
|
+
import { v as getDefaultCrudSchemas } from "./utils-BbGG8XNT.mjs";
|
|
9
|
+
import { a as resolveEffectiveRoles, n as applyFieldWritePermissions } from "./fields-Cha2QCKH.mjs";
|
|
10
|
+
import { n as convertRouteSchema, r as ensureSchemaConverter, t as convertOpenApiSchemas } from "./schemaConverter-Db-MMsH6.mjs";
|
|
11
|
+
import { i as pipeUIMessageStreamToReply, r as isReadableStream } from "./streaming-DkpW1HwJ.mjs";
|
|
12
|
+
import { a as createCrudHandlers, i as resolvePipelineSteps, o as createFastifyHandler, r as buildPipelineHandler, s as createRequestContext, t as resolveActionPermission } from "./actionPermissions-jlFZ1it4.mjs";
|
|
13
|
+
import { a as selectPluginMw, c as buildRouteHooks, d as buildAuthMiddleware, i as resolveRouterPluginMw, l as resolveRoutePreHandlers, n as buildRateLimitConfig, p as buildArcDecorator, r as buildRouteConfig, s as buildCrudPermissionMw, t as tryRegisterRoute, u as routeHookOptions } from "./registerRoute-XvcI_3sh.mjs";
|
|
14
|
+
import { t as hasEvents } from "./typeGuards-DHTnEs5X.mjs";
|
|
15
|
+
import { B as requireAuth } from "./permissions-H7Zcb82Z.mjs";
|
|
16
|
+
import { r as getAvailablePresets, t as applyPresets } from "./presets-CNyfaxGL.mjs";
|
|
17
|
+
import { t as pluralize } from "./pluralize-Da7IT_qJ.mjs";
|
|
18
18
|
import { isReadOnlyRepo } from "@classytic/repo-core/repository";
|
|
19
19
|
//#region src/core/middlewares/fieldWrite.ts
|
|
20
20
|
/**
|
|
@@ -1425,7 +1425,7 @@ function buildResourcePlugin(resource) {
|
|
|
1425
1425
|
extensions: resource.extensions
|
|
1426
1426
|
});
|
|
1427
1427
|
if (resource.actions && Object.keys(resource.actions).length > 0) {
|
|
1428
|
-
const { createActionRouter } = await import("./createActionRouter-
|
|
1428
|
+
const { createActionRouter } = await import("./createActionRouter-Bqi6Bhhx.mjs").then((n) => n.n);
|
|
1429
1429
|
createActionRouter(typedInstance, {
|
|
1430
1430
|
...normalizeActionsToRouterConfig(resource.actions, resource.actionPermissions, resource.tag, resource.permissions, resource.name, typedInstance.log),
|
|
1431
1431
|
resourceName: resource.name,
|
|
@@ -1440,7 +1440,7 @@ function buildResourcePlugin(resource) {
|
|
|
1440
1440
|
});
|
|
1441
1441
|
}
|
|
1442
1442
|
if (resource.aggregations && Object.keys(resource.aggregations).length > 0) {
|
|
1443
|
-
const [{ createAggregationRouter }, { adapterSupportsAggregate, ArcAggregationConfigError }] = await Promise.all([import("./createAggregationRouter-
|
|
1443
|
+
const [{ createAggregationRouter }, { adapterSupportsAggregate, ArcAggregationConfigError }] = await Promise.all([import("./createAggregationRouter-BsYO7ktd.mjs"), import("./validate-CidSeUrx.mjs").then((n) => n.r)]);
|
|
1444
1444
|
const repoForAgg = resource.controller?.repository ?? resource.repository;
|
|
1445
1445
|
if (!adapterSupportsAggregate(repoForAgg)) {
|
|
1446
1446
|
const undispatchable = Object.entries(resource.aggregations).filter(([, cfg]) => !cfg.materialized).map(([name]) => name);
|
package/dist/discovery/index.mjs
CHANGED
package/dist/docs/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { p as RegistryEntry } from "../index-
|
|
2
|
+
import { p as RegistryEntry } from "../index-B78WZom8.mjs";
|
|
3
3
|
import { t as ExternalOpenApiPaths } from "../externalPaths-CmGOxOtD.mjs";
|
|
4
4
|
import { FastifyPluginAsync } from "fastify";
|
|
5
5
|
//#region src/docs/openapi/types.d.ts
|
package/dist/docs/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as getUserRoles } from "../userHelpers-
|
|
3
|
-
import { n as openApiPlugin, r as openapi_default, t as buildOpenApiSpec } from "../openapi-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as getUserRoles } from "../userHelpers-CXySQFRg.mjs";
|
|
3
|
+
import { n as openApiPlugin, r as openapi_default, t as buildOpenApiSpec } from "../openapi-Dxc8RLy_.mjs";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
//#region src/docs/scalar.ts
|
|
6
6
|
const scalarPlugin = async (fastify, opts = {}) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Add2L50I.mjs";
|
|
3
3
|
import { arcLog } from "./logger/index.mjs";
|
|
4
|
-
import { n as requireSingleHeaderValue } from "./headers-
|
|
5
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
4
|
+
import { n as requireSingleHeaderValue } from "./headers-DeXNifVj.mjs";
|
|
5
|
+
import { n as getUserRoles } from "./userHelpers-CXySQFRg.mjs";
|
|
6
6
|
import fp from "fastify-plugin";
|
|
7
7
|
//#region src/scope/elevation.ts
|
|
8
8
|
var elevation_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ArcError } from "../errors-
|
|
3
|
-
import { t as parseJsonBody } from "../jsonBody-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ArcError } from "../errors-2ExmOgIJ.mjs";
|
|
3
|
+
import { t as parseJsonBody } from "../jsonBody-DVui0uJl.mjs";
|
|
4
4
|
import { createCipheriv, createDecipheriv, randomBytes } from "node:crypto";
|
|
5
5
|
import fp from "fastify-plugin";
|
|
6
6
|
//#region src/encryption/fieldCipher.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { m as statusToArcCode, p as isArcError } from "./errors-
|
|
4
|
-
import { isHttpError, toErrorContract } from "@classytic/repo-core/errors";
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Add2L50I.mjs";
|
|
3
|
+
import { m as statusToArcCode, p as isArcError } from "./errors-2ExmOgIJ.mjs";
|
|
5
4
|
import { isProductionEnv } from "@classytic/primitives/environment";
|
|
5
|
+
import { isHttpError, toErrorContract } from "@classytic/repo-core/errors";
|
|
6
6
|
import fp from "fastify-plugin";
|
|
7
7
|
//#region src/plugins/errorHandler.ts
|
|
8
8
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as EventTransport, i as EventLogger, n as DomainEvent, r as EventHandler } from "./EventTransport-
|
|
2
|
+
import { a as EventTransport, i as EventLogger, n as DomainEvent, r as EventHandler, s as MemoryEventTransportOptions } from "./EventTransport-Cx60_s-6.mjs";
|
|
3
3
|
import { FastifyPluginAsync } from "fastify";
|
|
4
4
|
//#region src/events/defineEvent.d.ts
|
|
5
5
|
interface EventSchema {
|
|
@@ -227,6 +227,15 @@ declare function createDeadLetterPublisher(events: {
|
|
|
227
227
|
interface EventPluginOptions {
|
|
228
228
|
/** Event transport (default: MemoryEventTransport) */
|
|
229
229
|
transport?: EventTransport;
|
|
230
|
+
/**
|
|
231
|
+
* Options for the DEFAULT `MemoryEventTransport`, when no `transport` is
|
|
232
|
+
* supplied. Ignored if you pass your own.
|
|
233
|
+
*
|
|
234
|
+
* Exists so the default path can reach `handlerDispatch` / `onHandlerError`
|
|
235
|
+
* at all: without it only an app that hand-constructs its transport could
|
|
236
|
+
* opt in, which is most of the fleet unable to change either setting.
|
|
237
|
+
*/
|
|
238
|
+
memoryTransport?: MemoryEventTransportOptions;
|
|
230
239
|
/**
|
|
231
240
|
* Declare that this deployment is ONE process on purpose — the in-memory
|
|
232
241
|
* transport is its intended configuration, not a forgotten default.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Add2L50I.mjs";
|
|
3
3
|
import { arcLog } from "./logger/index.mjs";
|
|
4
|
-
import { d as createDomainError } from "./errors-
|
|
5
|
-
import { n as requestContext } from "./requestContext-
|
|
6
|
-
import { n as MemoryEventTransport, r as createEvent, t as ARC_EVENT_TRANSPORT } from "./EventTransport-
|
|
4
|
+
import { d as createDomainError } from "./errors-2ExmOgIJ.mjs";
|
|
5
|
+
import { n as requestContext } from "./requestContext-DpmntRZy.mjs";
|
|
6
|
+
import { n as MemoryEventTransport, r as createEvent, t as ARC_EVENT_TRANSPORT } from "./EventTransport-Gq7JWbWw.mjs";
|
|
7
7
|
import { isProductionEnv } from "@classytic/primitives/environment";
|
|
8
8
|
import fp from "fastify-plugin";
|
|
9
9
|
//#region src/events/retry.ts
|
|
@@ -147,7 +147,7 @@ const eventPlugin = async (fastify, opts = {}) => {
|
|
|
147
147
|
* from a host value afterwards.
|
|
148
148
|
*/
|
|
149
149
|
const ownsTransport = opts.transport === void 0;
|
|
150
|
-
const { transport = new MemoryEventTransport(), singleProcess = false, logEvents = false, failOpen = true, retry: retryOpts, deadLetterQueue: dlqOpts, wal, onPublish, onPublishError, registry, validateMode: rawValidateMode, warnOnDuplicate: rawWarnOnDuplicate } = opts;
|
|
150
|
+
const { transport = new MemoryEventTransport(opts.memoryTransport), singleProcess = false, logEvents = false, failOpen = true, retry: retryOpts, deadLetterQueue: dlqOpts, wal, onPublish, onPublishError, registry, validateMode: rawValidateMode, warnOnDuplicate: rawWarnOnDuplicate } = opts;
|
|
151
151
|
const validateMode = rawValidateMode ?? (registry ? "warn" : "off");
|
|
152
152
|
const warnOnDuplicate = rawWarnOnDuplicate ?? !isProductionEnv(process.env.NODE_ENV);
|
|
153
153
|
const DUP_WINDOW_MS = 5e3;
|
package/dist/events/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import { i as EventLogger, n as DomainEvent, o as MemoryEventTransport, r as EventHandler, s as MemoryEventTransportOptions } from "../EventTransport-
|
|
3
|
-
import { a as withRetry, c as EventDefinitionOutput, d as EventSchema, f as ValidationResult, i as createDeadLetterPublisher, l as EventRegistry, m as defineEvent, n as eventPlugin, o as CustomValidator, p as createEventRegistry, r as RetryOptions, s as EventDefinitionInput, t as EventPluginOptions, u as EventRegistryOptions } from "../eventPlugin-
|
|
4
|
-
import { a as EventOutbox, c as OutboxRelayErrorKind, i as MemoryOutboxStore, l as RelayResult, n as OutboxModuleOptions, o as EventOutboxOptions, r as createOutboxModule, s as OutboxRelayErrorHandler, t as OutboxModuleExports } from "../outbox-module-
|
|
2
|
+
import { i as EventLogger, n as DomainEvent, o as MemoryEventTransport, r as EventHandler, s as MemoryEventTransportOptions } from "../EventTransport-Cx60_s-6.mjs";
|
|
3
|
+
import { a as withRetry, c as EventDefinitionOutput, d as EventSchema, f as ValidationResult, i as createDeadLetterPublisher, l as EventRegistry, m as defineEvent, n as eventPlugin, o as CustomValidator, p as createEventRegistry, r as RetryOptions, s as EventDefinitionInput, t as EventPluginOptions, u as EventRegistryOptions } from "../eventPlugin-DFvHa4Nf.mjs";
|
|
4
|
+
import { a as EventOutbox, c as OutboxRelayErrorKind, i as MemoryOutboxStore, l as RelayResult, n as OutboxModuleOptions, o as EventOutboxOptions, r as createOutboxModule, s as OutboxRelayErrorHandler, t as OutboxModuleExports } from "../outbox-module-CQXu_O6o.mjs";
|
|
5
5
|
import { RedisEventTransportOptions, RedisLike } from "./transports/redis.mjs";
|
|
6
|
-
import { r as RedisStreamTransportOptions, t as RedisStreamLike } from "../redis-stream-
|
|
6
|
+
import { r as RedisStreamTransportOptions, t as RedisStreamLike } from "../redis-stream-eh0eOtjh.mjs";
|
|
7
7
|
import { OutboxStore } from "@classytic/primitives/outbox";
|
|
8
8
|
import { RepositoryLike } from "@classytic/repo-core/adapter";
|
|
9
9
|
//#region src/events/eventTypes.d.ts
|
package/dist/events/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as MemoryEventTransport } from "../EventTransport-
|
|
3
|
-
import { a as createEventRegistry, i as wrapWithSchema, n as subscribeWithSchema, o as defineEvent, r as wrapWithBoundary, t as subscribeWithBoundary } from "../subscribe-helpers-
|
|
4
|
-
import { i as withRetry, r as createDeadLetterPublisher, t as eventPlugin } from "../eventPlugin-
|
|
5
|
-
import { i as exponentialBackoff, n as EventOutbox, r as repositoryAsOutboxStore, t as createOutboxModule } from "../outbox-module-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as MemoryEventTransport } from "../EventTransport-Gq7JWbWw.mjs";
|
|
3
|
+
import { a as createEventRegistry, i as wrapWithSchema, n as subscribeWithSchema, o as defineEvent, r as wrapWithBoundary, t as subscribeWithBoundary } from "../subscribe-helpers-CBZOi6pk.mjs";
|
|
4
|
+
import { i as withRetry, r as createDeadLetterPublisher, t as eventPlugin } from "../eventPlugin-DJwpGMzx.mjs";
|
|
5
|
+
import { i as exponentialBackoff, n as EventOutbox, r as repositoryAsOutboxStore, t as createOutboxModule } from "../outbox-module-DyIqA5vo.mjs";
|
|
6
6
|
import { MemoryOutboxStore } from "@classytic/primitives/memory-outbox";
|
|
7
7
|
//#region src/events/eventTypes.ts
|
|
8
8
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { n as RedisStreamTransport, r as RedisStreamTransportOptions, t as RedisStreamLike } from "../../redis-stream-
|
|
2
|
+
import { n as RedisStreamTransport, r as RedisStreamTransportOptions, t as RedisStreamLike } from "../../redis-stream-eh0eOtjh.mjs";
|
|
3
3
|
export { type RedisStreamLike, RedisStreamTransport, type RedisStreamTransportOptions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as EventTransport, i as EventLogger, n as DomainEvent, r as EventHandler } from "../../EventTransport-
|
|
2
|
+
import { a as EventTransport, i as EventLogger, n as DomainEvent, r as EventHandler } from "../../EventTransport-Cx60_s-6.mjs";
|
|
3
3
|
//#region src/events/transports/redis.d.ts
|
|
4
4
|
interface RedisLike {
|
|
5
5
|
publish(channel: string, message: string): Promise<number>;
|
package/dist/factory/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import { _ as HealthCheck, a as ModuleContribution, c as LoadResourcesOptions, d as loadResources, i as EventHandlerDefinition, l as ResourceLike, n as ArcModuleInput, o as ModuleDisposer, r as ArcModuleRegistry, s as ModuleSetupContext, t as ArcModule, u as ResourceModule } from "../types-
|
|
3
|
-
import { _ as collectModuleScheduledJobs, a as lazyModuleExports, c as getModuleState, d as resolveModule, f as orderModules, g as collectModuleHealthChecks, h as extendModule, i as hasModuleExports, l as hasModule, m as ModuleExtension, n as getModuleExports, o as lazyRequiredModuleExports, p as subscribeModuleEventHandlers, r as getOptionalModuleExports, s as ModuleState, t as defineModule, u as resolveContribution, v as collectModuleWorkflows } from "../index-
|
|
4
|
-
import { c as ResolvedResourceDescriptor, l as describeResolvedModule, o as ResolvedModuleDescriptor, s as ResolvedModuleLifecycle } from "../fastify-augmentation-
|
|
5
|
-
import { a as RawBodyOptions, c as BetterAuthOption, d as JwtAuthOption, i as MultipartOptions, l as CustomAuthenticatorOption, n as preloadResourcesAsync, o as UnderPressureOptions, r as CreateAppOptions, s as AuthOption, t as preloadResources, u as CustomPluginAuthOption } from "../preloadResources-
|
|
2
|
+
import { _ as HealthCheck, a as ModuleContribution, c as LoadResourcesOptions, d as loadResources, i as EventHandlerDefinition, l as ResourceLike, n as ArcModuleInput, o as ModuleDisposer, r as ArcModuleRegistry, s as ModuleSetupContext, t as ArcModule, u as ResourceModule } from "../types-BRU-Kd3t.mjs";
|
|
3
|
+
import { _ as collectModuleScheduledJobs, a as lazyModuleExports, c as getModuleState, d as resolveModule, f as orderModules, g as collectModuleHealthChecks, h as extendModule, i as hasModuleExports, l as hasModule, m as ModuleExtension, n as getModuleExports, o as lazyRequiredModuleExports, p as subscribeModuleEventHandlers, r as getOptionalModuleExports, s as ModuleState, t as defineModule, u as resolveContribution, v as collectModuleWorkflows } from "../index-D2uIUSQk.mjs";
|
|
4
|
+
import { c as ResolvedResourceDescriptor, l as describeResolvedModule, o as ResolvedModuleDescriptor, s as ResolvedModuleLifecycle } from "../fastify-augmentation-jYA2oHyL.mjs";
|
|
5
|
+
import { a as RawBodyOptions, c as BetterAuthOption, d as JwtAuthOption, i as MultipartOptions, l as CustomAuthenticatorOption, n as preloadResourcesAsync, o as UnderPressureOptions, r as CreateAppOptions, s as AuthOption, t as preloadResources, u as CustomPluginAuthOption } from "../preloadResources-BbBkNkqK.mjs";
|
|
6
6
|
import { FastifyInstance, FastifyServerOptions } from "fastify";
|
|
7
7
|
//#region src/factory/createApp.d.ts
|
|
8
8
|
/**
|
package/dist/factory/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as mergeHealthChecks, t as healthPlugin } from "../health-
|
|
3
|
-
import { S as resolveModule, _ as describeResolvedModule, a as createApp, b as collectModuleWorkflows, c as edgePreset, d as testingPreset, f as workerPreset, g as subscribeModuleEventHandlers, h as orderModules, i as DEFAULT_LOGGER_REDACT_PATHS, l as getPreset, m as hasModule, n as preloadResourcesAsync, p as getModuleState, r as ArcFactory, s as developmentPreset, t as preloadResources, u as productionPreset, v as collectModuleHealthChecks, x as resolveContribution, y as collectModuleScheduledJobs } from "../preloadResources-
|
|
4
|
-
import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, t as defineModule } from "../module-
|
|
5
|
-
import { t as loadResources } from "../loadResources-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as mergeHealthChecks, t as healthPlugin } from "../health-Bh0N_FLk.mjs";
|
|
3
|
+
import { S as resolveModule, _ as describeResolvedModule, a as createApp, b as collectModuleWorkflows, c as edgePreset, d as testingPreset, f as workerPreset, g as subscribeModuleEventHandlers, h as orderModules, i as DEFAULT_LOGGER_REDACT_PATHS, l as getPreset, m as hasModule, n as preloadResourcesAsync, p as getModuleState, r as ArcFactory, s as developmentPreset, t as preloadResources, u as productionPreset, v as collectModuleHealthChecks, x as resolveContribution, y as collectModuleScheduledJobs } from "../preloadResources-DlhH81py.mjs";
|
|
4
|
+
import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, t as defineModule } from "../module-BQXHxMEk.mjs";
|
|
5
|
+
import { t as loadResources } from "../loadResources-CNd1DWnK.mjs";
|
|
6
6
|
//#region src/factory/module/extend.ts
|
|
7
7
|
/** Concatenate two contributions, resolving factories only when arc asks. */
|
|
8
8
|
function mergeContribution(own, extra) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import { on as HookSystem, z as ResourceRegistry } from "./index-
|
|
2
|
+
import { on as HookSystem, z as ResourceRegistry } from "./index-B78WZom8.mjs";
|
|
3
3
|
import { t as ExternalOpenApiPaths } from "./externalPaths-CmGOxOtD.mjs";
|
|
4
|
-
import { _ as HealthCheck, f as ScheduleDefinition, r as ArcModuleRegistry, t as ArcModule } from "./types-
|
|
5
|
-
import { s as ModuleState } from "./index-
|
|
4
|
+
import { _ as HealthCheck, f as ScheduleDefinition, r as ArcModuleRegistry, t as ArcModule } from "./types-BRU-Kd3t.mjs";
|
|
5
|
+
import { s as ModuleState } from "./index-D2uIUSQk.mjs";
|
|
6
6
|
import { FastifyPluginAsync } from "fastify";
|
|
7
7
|
//#region src/factory/module/descriptor.d.ts
|
|
8
8
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
2
|
//#region src/permissions/fields.ts
|
|
3
3
|
/**
|
|
4
4
|
* Field-Level Permissions
|
|
@@ -93,6 +93,41 @@ const fields = {
|
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
/**
|
|
96
|
+
* Field permissions implied by `schemaOptions.fieldRules[x].hidden === true`.
|
|
97
|
+
*
|
|
98
|
+
* `hidden` is documented — in `fieldRulePredicates.ts` and in arc's own adapter
|
|
99
|
+
* tests ("must never appear in API", "never surfaced") — as meaning the field is
|
|
100
|
+
* not readable AT ALL. Every read surface honoured that except the one that
|
|
101
|
+
* matters most: the response body. `select=`, `_distinct` and aggregations were
|
|
102
|
+
* gated while a plain `GET /:id` returned the value, so a resource declaring
|
|
103
|
+
* `fieldRules: { secret: { hidden: true } }` shipped the secret in every payload
|
|
104
|
+
* and nothing said so.
|
|
105
|
+
*
|
|
106
|
+
* Deriving a `hidden()` PERMISSION here routes it through the single existing
|
|
107
|
+
* response stripper rather than adding a second one — two strippers is how the
|
|
108
|
+
* two halves drift apart again.
|
|
109
|
+
*
|
|
110
|
+
* An explicit `fields` entry WINS: it is the more specific statement about
|
|
111
|
+
* visibility, and silently overriding an operator's `visibleTo([...])` with a
|
|
112
|
+
* broad query-surface flag would be the general defeating the specific.
|
|
113
|
+
*/
|
|
114
|
+
function deriveHiddenFieldPermissions(schemaOptions, explicit) {
|
|
115
|
+
const rules = schemaOptions?.fieldRules;
|
|
116
|
+
if (!rules) return explicit;
|
|
117
|
+
const derived = {};
|
|
118
|
+
let any = false;
|
|
119
|
+
for (const [name, rule] of Object.entries(rules)) {
|
|
120
|
+
if (rule?.hidden !== true) continue;
|
|
121
|
+
derived[name] = { _type: "hidden" };
|
|
122
|
+
any = true;
|
|
123
|
+
}
|
|
124
|
+
if (!any) return explicit;
|
|
125
|
+
return {
|
|
126
|
+
...derived,
|
|
127
|
+
...explicit ?? {}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
96
131
|
* Apply field-level READ permissions to a response object.
|
|
97
132
|
* Strips hidden fields, enforces visibility, and applies redaction.
|
|
98
133
|
*
|
|
@@ -161,4 +196,4 @@ function resolveEffectiveRoles(userRoles, orgRoles) {
|
|
|
161
196
|
return [.../* @__PURE__ */ new Set([...userRoles, ...orgRoles])];
|
|
162
197
|
}
|
|
163
198
|
//#endregion
|
|
164
|
-
export { resolveEffectiveRoles as i, applyFieldWritePermissions as n,
|
|
199
|
+
export { resolveEffectiveRoles as a, fields as i, applyFieldWritePermissions as n, deriveHiddenFieldPermissions as r, applyFieldReadPermissions as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as pluralize } from "./pluralize-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as pluralize } from "./pluralize-Da7IT_qJ.mjs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
5
|
//#region src/cli/commands/generate/name-helpers.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { u as ValidationError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { u as ValidationError } from "./errors-2ExmOgIJ.mjs";
|
|
3
3
|
//#region src/utils/headers.ts
|
|
4
4
|
/**
|
|
5
5
|
* Canonical header typing + accessor.
|
package/dist/hooks/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { an as HookRegistration, cn as afterCreate, dn as beforeCreate, en as DefineHookOptions, fn as beforeDelete, hn as defineHook, in as HookPhase, ln as afterDelete, mn as createHookSystem, nn as HookHandler, on as HookSystem, pn as beforeUpdate, rn as HookOperation, sn as HookSystemOptions, tn as HookContext, un as afterUpdate } from "../index-
|
|
2
|
+
import { an as HookRegistration, cn as afterCreate, dn as beforeCreate, en as DefineHookOptions, fn as beforeDelete, hn as defineHook, in as HookPhase, ln as afterDelete, mn as createHookSystem, nn as HookHandler, on as HookSystem, pn as beforeUpdate, rn as HookOperation, sn as HookSystemOptions, tn as HookContext, un as afterUpdate } from "../index-B78WZom8.mjs";
|
|
3
3
|
export { type DefineHookOptions, type HookContext, type HookHandler, type HookOperation, type HookPhase, type HookRegistration, HookSystem, type HookSystemOptions, afterCreate, afterDelete, afterUpdate, beforeCreate, beforeDelete, beforeUpdate, createHookSystem, defineHook };
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as beforeCreate, c as createHookSystem, i as afterUpdate, l as defineHook, n as afterCreate, o as beforeDelete, r as afterDelete, s as beforeUpdate, t as HookSystem } from "../HookSystem-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as beforeCreate, c as createHookSystem, i as afterUpdate, l as defineHook, n as afterCreate, o as beforeDelete, r as afterDelete, s as beforeUpdate, t as HookSystem } from "../HookSystem-C0ikzqQf.mjs";
|
|
3
3
|
export { HookSystem, afterCreate, afterDelete, afterUpdate, beforeCreate, beforeDelete, beforeUpdate, createHookSystem, defineHook };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as requireSingleHeaderValue } from "../headers-
|
|
3
|
-
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-
|
|
4
|
-
import { t as createIdempotencyResult } from "../interface-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as requireSingleHeaderValue } from "../headers-DeXNifVj.mjs";
|
|
3
|
+
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-CIF4RG8s.mjs";
|
|
4
|
+
import { t as createIdempotencyResult } from "../interface-DYPVscCU.mjs";
|
|
5
5
|
import { and, eq, exists, gt, lt, or, startsWith } from "@classytic/repo-core/filter";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
import fp from "fastify-plugin";
|
|
@@ -5,10 +5,10 @@ import { a as QueryCacheConfig } from "./QueryCache-DFA-QrU9.mjs";
|
|
|
5
5
|
import "./elevation-BXCfVcNG.mjs";
|
|
6
6
|
import { n as FieldPermissionMap } from "./fields-I_EeRWND.mjs";
|
|
7
7
|
import { n as EncryptionDirective } from "./types-ByHn9rEO.mjs";
|
|
8
|
-
import { n as DomainEvent } from "./EventTransport-
|
|
8
|
+
import { n as DomainEvent } from "./EventTransport-Cx60_s-6.mjs";
|
|
9
9
|
import { Filter } from "@classytic/repo-core/filter";
|
|
10
|
-
import { KeysetPaginationResult, OffsetPaginationResult } from "@classytic/repo-core/pagination";
|
|
11
10
|
import { AggDateBucket, AggMeasure, AggTopN, QueryOptions, StandardRepo, TenantPurgeStrategy, TransactionHandle } from "@classytic/repo-core/repository";
|
|
11
|
+
import { KeysetPaginationResult, OffsetPaginationResult } from "@classytic/repo-core/pagination";
|
|
12
12
|
import { FastifyInstance, FastifyPluginAsync, FastifyReply, FastifyRequest, RouteHandlerMethod, RouteHandlerMethod as RouteHandlerMethod$1 } from "fastify";
|
|
13
13
|
import { DataAdapter, RepositoryLike } from "@classytic/repo-core/adapter";
|
|
14
14
|
import { LookupSpec } from "@classytic/repo-core/lookup";
|
|
@@ -1466,6 +1466,15 @@ interface SoftDeleteExt {
|
|
|
1466
1466
|
declare function SoftDeleteMixin<TBase extends Constructor<BaseCrudController>>(Base: TBase): TBase & Constructor<SoftDeleteExt>;
|
|
1467
1467
|
//#endregion
|
|
1468
1468
|
//#region src/core/BaseController.d.ts
|
|
1469
|
+
/**
|
|
1470
|
+
* The `Arc*Result` types above stay: `src/index.ts` re-exports them from THIS
|
|
1471
|
+
* path. `BaseCrudController` and the four mixins (+ their `*Ext` types) were
|
|
1472
|
+
* also re-exported here and are not, as of 2.37.1 — `core/index.ts` takes them
|
|
1473
|
+
* straight from `./BaseCrudController.js` and `./mixins/*.js`, so this file's
|
|
1474
|
+
* copies had no importer. Two public paths to one symbol is a drift seam, not
|
|
1475
|
+
* convenience: composition belongs to `core/index.ts`, and this module is the
|
|
1476
|
+
* composed `BaseController` itself.
|
|
1477
|
+
*/
|
|
1469
1478
|
/**
|
|
1470
1479
|
* Fully-composed controller shape: all CRUD methods + every preset method
|
|
1471
1480
|
* (SoftDelete / Tree / Slug / Bulk) typed over the caller-supplied `TDoc`.
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import { i as RequestScope } from "./types-Ddl9OjmE.mjs";
|
|
3
3
|
import { l as PermissionCheck, t as AnyRecord } from "./base-C-NL2fTi.mjs";
|
|
4
|
-
import { C as RequestContext, Et as ActionDefinition, F as FastifyWithDecorators, Fn as IControllerResponse, H as CrudController, In as IRequestContext, L as RequestWithExtras, Pn as IController, T as CrudRouterOptions, U as ResourceConfig, V as ResourceDefinition, et as RouteSchemaOptions, jt as RouteMcpConfig, tt as ArcFieldRule, ut as AggregationConfig } from "./index-
|
|
5
|
-
import "./fastify-augmentation-
|
|
4
|
+
import { C as RequestContext, Et as ActionDefinition, F as FastifyWithDecorators, Fn as IControllerResponse, H as CrudController, In as IRequestContext, L as RequestWithExtras, Pn as IController, T as CrudRouterOptions, U as ResourceConfig, V as ResourceDefinition, et as RouteSchemaOptions, jt as RouteMcpConfig, tt as ArcFieldRule, ut as AggregationConfig } from "./index-B78WZom8.mjs";
|
|
5
|
+
import "./fastify-augmentation-jYA2oHyL.mjs";
|
|
6
6
|
import { Filter } from "@classytic/repo-core/filter";
|
|
7
|
-
import { AggDateBucket, AggMeasure, AggTopN } from "@classytic/repo-core/repository";
|
|
8
7
|
import { FastifyReply, FastifyRequest, RouteHandlerMethod } from "fastify";
|
|
9
8
|
import { z } from "zod";
|
|
10
9
|
import { DataAdapter } from "@classytic/repo-core/adapter";
|
|
11
|
-
import { LookupSpec } from "@classytic/repo-core/lookup";
|
|
12
10
|
//#region src/constants.d.ts
|
|
13
11
|
/**
|
|
14
12
|
* Arc Framework Constants — Single Source of Truth
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { _ as HealthCheck, a as ModuleContribution, f as ScheduleDefinition, n as ArcModuleInput, r as ArcModuleRegistry, s as ModuleSetupContext, t as ArcModule } from "./types-
|
|
2
|
+
import { _ as HealthCheck, a as ModuleContribution, f as ScheduleDefinition, n as ArcModuleInput, r as ArcModuleRegistry, s as ModuleSetupContext, t as ArcModule } from "./types-BRU-Kd3t.mjs";
|
|
3
3
|
import { FastifyInstance } from "fastify";
|
|
4
4
|
//#region src/factory/module/contributions.d.ts
|
|
5
5
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
import { c as DataPolicy, d as UserBase, l as PermissionCheck, n as ArcRequest, o as UserOrganization, r as JWTPayload, s as AuthorizationDecision, t as AnyRecord, u as PermissionContext } from "./base-C-NL2fTi.mjs";
|
|
3
|
-
import { A as RequestIdOptions, An as WriteVerbKey, B as defineResource, Bt as BaseController, C as RequestContext, Cn as ControllerConstructionOptions, D as HealthCheck, Dn as MutationWriteContext, E as GracefulShutdownOptions, F as FastifyWithDecorators, Fn as IControllerResponse, Ft as AuthPluginOptions, Gt as SlugExt, H as CrudController, Ht as SoftDeleteMixin, In as IRequestContext, Jt as BulkMixin, Kt as SlugMixin, L as RequestWithExtras, Ln as RawRouteHandler, Mn as ControllerLike, N as FastifyRequestExtras, Nt as RateLimitConfig, O as HealthOptions, On as ResourceWrites, P as FastifyWithAuth, Pn as IController, Q as MiddlewareConfig, Rn as RouteHandler, S as QueryParserInterface, Sn as ControllerConfigurableOptions, T as CrudRouterOptions, U as ResourceConfig, Ut as TreeExt, V as ResourceDefinition, Vt as SoftDeleteExt, Wt as TreeMixin, X as CrudRouteKey, Y as PresetResult, Yt as BaseCrudController, Z as CrudSchemas, _n as ArcDeleteResult, a as InferAdapterDoc, bn as ArcUpdateResult, c as TypedController, ct as AggMeasureShorthand, d as PaginationResult, dt as AggregationDateRangeRequirement, et as RouteSchemaOptions, f as IntrospectionData, ft as AggregationIndexHint, g as ArcInternalMetadata, gn as ArcCreateResult, gt as AggregationsMap, h as ResourceMetadata, ht as AggregationRateLimit, i as ValidationResult, k as IntrospectionPluginOptions, kn as WriteContext, l as TypedRepository, lt as AggregationCacheConfig, m as RegistryStats, mt as AggregationMaterializedResult, n as ConfigError, nt as FieldRule, o as InferDocType, ot as EventDefinition, p as RegistryEntry, pt as AggregationMaterializedContext, q as PresetFunction, qt as BulkExt, r as ValidateOptions, s as InferResourceDoc, st as AggMeasureInput, t as RouteHandlerMethod, u as TypedResourceConfig, ut as AggregationConfig, vn as ArcGetResult, w as ServiceContext, wn as ListResult, xn as BaseControllerOptions, y as OwnershipCheck, yn as ArcListResult } from "./index-
|
|
3
|
+
import { A as RequestIdOptions, An as WriteVerbKey, B as defineResource, Bt as BaseController, C as RequestContext, Cn as ControllerConstructionOptions, D as HealthCheck, Dn as MutationWriteContext, E as GracefulShutdownOptions, F as FastifyWithDecorators, Fn as IControllerResponse, Ft as AuthPluginOptions, Gt as SlugExt, H as CrudController, Ht as SoftDeleteMixin, In as IRequestContext, Jt as BulkMixin, Kt as SlugMixin, L as RequestWithExtras, Ln as RawRouteHandler, Mn as ControllerLike, N as FastifyRequestExtras, Nt as RateLimitConfig, O as HealthOptions, On as ResourceWrites, P as FastifyWithAuth, Pn as IController, Q as MiddlewareConfig, Rn as RouteHandler, S as QueryParserInterface, Sn as ControllerConfigurableOptions, T as CrudRouterOptions, U as ResourceConfig, Ut as TreeExt, V as ResourceDefinition, Vt as SoftDeleteExt, Wt as TreeMixin, X as CrudRouteKey, Y as PresetResult, Yt as BaseCrudController, Z as CrudSchemas, _n as ArcDeleteResult, a as InferAdapterDoc, bn as ArcUpdateResult, c as TypedController, ct as AggMeasureShorthand, d as PaginationResult, dt as AggregationDateRangeRequirement, et as RouteSchemaOptions, f as IntrospectionData, ft as AggregationIndexHint, g as ArcInternalMetadata, gn as ArcCreateResult, gt as AggregationsMap, h as ResourceMetadata, ht as AggregationRateLimit, i as ValidationResult, k as IntrospectionPluginOptions, kn as WriteContext, l as TypedRepository, lt as AggregationCacheConfig, m as RegistryStats, mt as AggregationMaterializedResult, n as ConfigError, nt as FieldRule, o as InferDocType, ot as EventDefinition, p as RegistryEntry, pt as AggregationMaterializedContext, q as PresetFunction, qt as BulkExt, r as ValidateOptions, s as InferResourceDoc, st as AggMeasureInput, t as RouteHandlerMethod, u as TypedResourceConfig, ut as AggregationConfig, vn as ArcGetResult, w as ServiceContext, wn as ListResult, xn as BaseControllerOptions, y as OwnershipCheck, yn as ArcListResult } from "./index-B78WZom8.mjs";
|
|
4
4
|
import { a as applyFieldWritePermissions, i as applyFieldReadPermissions, n as FieldPermissionMap, o as fields, t as FieldPermission } from "./fields-I_EeRWND.mjs";
|
|
5
|
-
import "./fastify-augmentation-
|
|
6
|
-
import { A as CRUD_OPERATIONS, B as HookOperation, C as SeamedResourceConfig, E as defineAction, F as DEFAULT_SORT, G as MUTATION_OPERATIONS, H as MAX_FILTER_DEPTH, I as DEFAULT_TENANT_FIELD, J as SYSTEM_FIELDS, K as MutationOperation, L as DEFAULT_UPDATE_METHOD, M as DEFAULT_ID_FIELD, N as DEFAULT_LIMIT, P as DEFAULT_MAX_LIMIT, R as HOOK_OPERATIONS, S as ResourceSeams, U as MAX_REGEX_LENGTH, V as HookPhase, W as MAX_SEARCH_LENGTH, b as defineResourceVariants, c as nativePolicyFilter, h as getControllerScope, j as CrudOperation, k as defineAggregation, q as RESERVED_QUERY_PARAMS, s as NativePolicyFilter, w as mergeResourceConfig, x as AdapterLike, z as HOOK_PHASES } from "./index-
|
|
5
|
+
import "./fastify-augmentation-jYA2oHyL.mjs";
|
|
6
|
+
import { A as CRUD_OPERATIONS, B as HookOperation, C as SeamedResourceConfig, E as defineAction, F as DEFAULT_SORT, G as MUTATION_OPERATIONS, H as MAX_FILTER_DEPTH, I as DEFAULT_TENANT_FIELD, J as SYSTEM_FIELDS, K as MutationOperation, L as DEFAULT_UPDATE_METHOD, M as DEFAULT_ID_FIELD, N as DEFAULT_LIMIT, P as DEFAULT_MAX_LIMIT, R as HOOK_OPERATIONS, S as ResourceSeams, U as MAX_REGEX_LENGTH, V as HookPhase, W as MAX_SEARCH_LENGTH, b as defineResourceVariants, c as nativePolicyFilter, h as getControllerScope, j as CrudOperation, k as defineAggregation, q as RESERVED_QUERY_PARAMS, s as NativePolicyFilter, w as mergeResourceConfig, x as AdapterLike, z as HOOK_PHASES } from "./index-BRoDtjek.mjs";
|
|
7
7
|
import { $ as requireAuth, C as requireServiceScope, G as createOrgPermissions, H as DynamicPermissionMatrixConfig, J as allowPublic, K as allOf, S as requireScopeContext, V as DynamicPermissionMatrix, W as createDynamicPermissionMatrix, Y as anyOf, Z as denyAll, _ as publicReadAdminWrite, b as requireOrgMembership, d as authenticated, et as requireOwnership, f as fullPublic, g as publicRead, h as presets_d_exports, it as when, nt as requireRoles, p as ownerWithAdminBypass, u as adminOnly, v as readOnly, w as requireTeamMembership, x as requireOrgRole, y as requireOrgInScope } from "./index-BtYoMip1.mjs";
|
|
8
8
|
import { a as NotFoundError, d as ValidationError, f as createDomainError, i as ForbiddenError, t as ArcError, u as UnauthorizedError } from "./errors-BGdVwP25.mjs";
|
|
9
9
|
//#region src/index.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as DEFAULT_SORT, c as HOOK_OPERATIONS, d as MAX_REGEX_LENGTH, f as MAX_SEARCH_LENGTH, h as SYSTEM_FIELDS, i as DEFAULT_MAX_LIMIT, l as HOOK_PHASES, m as RESERVED_QUERY_PARAMS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MUTATION_OPERATIONS, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as MAX_FILTER_DEPTH } from "./constants-
|
|
3
|
-
import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-
|
|
4
|
-
import { a as BulkMixin, h as nativePolicyFilter, i as SlugMixin, n as TreeMixin, o as BaseCrudController, r as SoftDeleteMixin, t as BaseController } from "./BaseController-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { l as getControllerScope } from "./actionPermissions-
|
|
8
|
-
import { t as
|
|
9
|
-
import { a as mergeResourceConfig, i as defineResourceVariants, o as defineAction } from "./core-
|
|
10
|
-
import { B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, I as anyOf, N as allOf, O as requireServiceScope, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, a as adminOnly, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, k as requireTeamMembership, o as authenticated, p as readOnly, s as fullPublic, u as presets_exports, w as requireOrgInScope } from "./permissions-
|
|
1
|
+
/*! @classytic/arc v2.38.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as DEFAULT_SORT, c as HOOK_OPERATIONS, d as MAX_REGEX_LENGTH, f as MAX_SEARCH_LENGTH, h as SYSTEM_FIELDS, i as DEFAULT_MAX_LIMIT, l as HOOK_PHASES, m as RESERVED_QUERY_PARAMS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MUTATION_OPERATIONS, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as MAX_FILTER_DEPTH } from "./constants-BONghE1Y.mjs";
|
|
3
|
+
import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-2ExmOgIJ.mjs";
|
|
4
|
+
import { a as BulkMixin, h as nativePolicyFilter, i as SlugMixin, n as TreeMixin, o as BaseCrudController, r as SoftDeleteMixin, t as BaseController } from "./BaseController-CYaDvmOB.mjs";
|
|
5
|
+
import { t as defineAggregation } from "./defineAggregation-0KBvqEEC.mjs";
|
|
6
|
+
import { i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "./fields-Cha2QCKH.mjs";
|
|
7
|
+
import { l as getControllerScope } from "./actionPermissions-jlFZ1it4.mjs";
|
|
8
|
+
import { a as ResourceDefinition, t as defineResource } from "./defineResource-BMdyRelW.mjs";
|
|
9
|
+
import { a as mergeResourceConfig, i as defineResourceVariants, o as defineAction } from "./core-8She7FgF.mjs";
|
|
10
|
+
import { B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, I as anyOf, N as allOf, O as requireServiceScope, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, a as adminOnly, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, k as requireTeamMembership, o as authenticated, p as readOnly, s as fullPublic, u as presets_exports, w as requireOrgInScope } from "./permissions-H7Zcb82Z.mjs";
|
|
11
11
|
//#region src/index.ts
|
|
12
|
-
const version = "2.
|
|
12
|
+
const version = "2.38.0";
|
|
13
13
|
//#endregion
|
|
14
14
|
export { ArcError, BaseController, BaseCrudController, BulkMixin, CRUD_OPERATIONS, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, ForbiddenError, HOOK_OPERATIONS, HOOK_PHASES, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, NotFoundError, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, SlugMixin, SoftDeleteMixin, TreeMixin, UnauthorizedError, ValidationError, adminOnly, allOf, allowPublic, anyOf, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, createDomainError, createDynamicPermissionMatrix, createOrgPermissions, defineAction, defineAggregation, defineResource, defineResourceVariants, denyAll, fields, fullPublic, getControllerScope, mergeResourceConfig, nativePolicyFilter, ownerWithAdminBypass, presets_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, version, when };
|