@classytic/arc 2.1.2 → 2.1.3
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/{EventTransport-BD2U0BTc.d.mts → EventTransport-BkUDYZEb.d.mts} +1 -2
- package/dist/HookSystem-BsGV-j2l.mjs +1 -2
- package/dist/{ResourceRegistry-DsN4KJjV.mjs → ResourceRegistry-7Ic20ZMw.mjs} +1 -2
- package/dist/adapters/index.d.mts +4 -4
- package/dist/audit/index.d.mts +5 -6
- package/dist/audit/index.mjs +2 -3
- package/dist/audit/mongodb.d.mts +4 -4
- package/dist/audit/mongodb.mjs +1 -1
- package/dist/{audited-C3T5DTUx.mjs → audited-CGdLiSlE.mjs} +1 -2
- package/dist/auth/index.d.mts +6 -7
- package/dist/auth/index.mjs +10 -16
- package/dist/auth/redis-session.d.mts +2 -3
- package/dist/auth/redis-session.mjs +1 -2
- package/dist/{betterAuthOpenApi-BrHKeSAx.mjs → betterAuthOpenApi-DjWDddNc.mjs} +2 -3
- package/dist/cache/index.d.mts +3 -4
- package/dist/cache/index.mjs +4 -5
- package/dist/{caching-Bl28lYsR.mjs → caching-GSDJcA6-.mjs} +1 -2
- package/dist/{circuitBreaker-DeY4FCjs.mjs → circuitBreaker-DYhWBW_D.mjs} +1 -2
- package/dist/cli/commands/describe.d.mts +1 -2
- package/dist/cli/commands/describe.mjs +1 -2
- package/dist/cli/commands/docs.d.mts +1 -2
- package/dist/cli/commands/docs.mjs +3 -4
- package/dist/cli/commands/generate.d.mts +1 -2
- package/dist/cli/commands/generate.mjs +2 -3
- package/dist/cli/commands/init.d.mts +1 -2
- package/dist/cli/commands/init.mjs +6 -7
- package/dist/cli/commands/introspect.d.mts +1 -2
- package/dist/cli/commands/introspect.mjs +2 -3
- package/dist/cli/index.d.mts +1 -2
- package/dist/cli/index.mjs +1 -2
- package/dist/constants-DdXFXQtN.mjs +1 -2
- package/dist/core/index.d.mts +4 -4
- package/dist/core/index.mjs +1 -1
- package/dist/{createApp-CUgNqegw.mjs → createApp-D2D5XXaV.mjs} +9 -10
- package/dist/{defineResource-k0_BDn8v.mjs → defineResource-PXzSJ15_.mjs} +11 -11
- package/dist/discovery/index.d.mts +1 -2
- package/dist/discovery/index.mjs +1 -2
- package/dist/docs/index.d.mts +5 -6
- package/dist/docs/index.mjs +5 -4
- package/dist/{elevation-B_2dRLVP.d.mts → elevation-DGo5shaX.d.mts} +1 -2
- package/dist/{elevation-BRy3yFWT.mjs → elevation-DSTbVvYj.mjs} +4 -4
- package/dist/{errorHandler-C1okiriz.mjs → errorHandler-C3GY3_ow.mjs} +2 -3
- package/dist/{errorHandler-BbcgBmIH.d.mts → errorHandler-CW3OOeYq.d.mts} +2 -3
- package/dist/{errors-ChKiFz62.d.mts → errors-DAWRdiYP.d.mts} +1 -2
- package/dist/{errors-B9bZok84.mjs → errors-DBANPbGr.mjs} +1 -2
- package/dist/{eventPlugin-DGR_B2on.mjs → eventPlugin-BEOvaDqo.mjs} +2 -3
- package/dist/{eventPlugin-CTrLH3mt.d.mts → eventPlugin-H6wDDjGO.d.mts} +2 -3
- package/dist/events/index.d.mts +4 -5
- package/dist/events/index.mjs +2 -3
- package/dist/events/transports/redis-stream-entry.d.mts +1 -1
- package/dist/events/transports/redis-stream-entry.mjs +1 -2
- package/dist/events/transports/redis.d.mts +2 -3
- package/dist/events/transports/redis.mjs +1 -2
- package/dist/{externalPaths-DlINfKbP.d.mts → externalPaths-SyPF2tgK.d.mts} +1 -2
- package/dist/factory/index.d.mts +8 -9
- package/dist/factory/index.mjs +1 -1
- package/dist/{fastifyAdapter-BkrGrlFi.d.mts → fastifyAdapter-C8DlE0YH.d.mts} +4 -5
- package/dist/{fields-DyaDVX4J.d.mts → fields-Bi_AVKSo.d.mts} +2 -3
- package/dist/{fields-iagOozy0.mjs → fields-CTd_CrKr.mjs} +2 -3
- package/dist/hooks/index.d.mts +3 -3
- package/dist/idempotency/index.d.mts +4 -5
- package/dist/idempotency/index.mjs +1 -2
- package/dist/idempotency/mongodb.d.mts +1 -1
- package/dist/idempotency/mongodb.mjs +1 -2
- package/dist/idempotency/redis.d.mts +1 -1
- package/dist/idempotency/redis.mjs +1 -2
- package/dist/index.d.mts +9 -10
- package/dist/index.mjs +7 -8
- package/dist/integrations/event-gateway.d.mts +2 -3
- package/dist/integrations/event-gateway.mjs +2 -3
- package/dist/integrations/jobs.d.mts +1 -2
- package/dist/integrations/jobs.mjs +1 -2
- package/dist/integrations/streamline.d.mts +1 -2
- package/dist/integrations/streamline.mjs +1 -2
- package/dist/integrations/websocket.d.mts +1 -2
- package/dist/integrations/websocket.mjs +1 -2
- package/dist/{interface-B01JvPVc.d.mts → interface-CSNjltAc.d.mts} +1 -2
- package/dist/{interface-CZe8IkMf.d.mts → interface-DTbsvIWe.d.mts} +1 -2
- package/dist/{interface-Ch8HU9uM.d.mts → interface-e9XfSsUV.d.mts} +3 -4
- package/dist/{introspectionPlugin-rFdO8ZUa.mjs → introspectionPlugin-B3JkrjwU.mjs} +1 -2
- package/dist/{keys-BqNejWup.mjs → keys-DhqDRxv3.mjs} +1 -2
- package/dist/{logger-Df2O2WsW.mjs → logger-ByrvQWZO.mjs} +1 -2
- package/dist/{memory-cQgelFOj.mjs → memory-B2v7KrCB.mjs} +1 -2
- package/dist/migrations/index.d.mts +1 -2
- package/dist/migrations/index.mjs +1 -2
- package/dist/{mongodb-CGzRbfAK.d.mts → mongodb-ClykrfGo.d.mts} +2 -3
- package/dist/{mongodb-BfJVlUJH.mjs → mongodb-DNKEExbf.mjs} +1 -2
- package/dist/{mongodb-JN-9JA7K.d.mts → mongodb-Dg8O_gvd.d.mts} +2 -3
- package/dist/{openapi-G3Cw7XuM.mjs → openapi-9nB_kiuR.mjs} +5 -4
- package/dist/org/index.d.mts +4 -5
- package/dist/org/index.mjs +1 -2
- package/dist/org/types.d.mts +1 -2
- package/dist/permissions/index.d.mts +5 -6
- package/dist/permissions/index.mjs +7 -7
- package/dist/plugins/index.d.mts +7 -8
- package/dist/plugins/index.mjs +7 -8
- package/dist/plugins/response-cache.d.mts +1 -2
- package/dist/plugins/response-cache.mjs +2 -3
- package/dist/plugins/tracing-entry.d.mts +1 -1
- package/dist/plugins/tracing-entry.mjs +1 -2
- package/dist/{pluralize-CEweyOEm.mjs → pluralize-CM-jZg7p.mjs} +1 -2
- package/dist/policies/index.d.mts +4 -5
- package/dist/policies/index.mjs +1 -2
- package/dist/presets/index.d.mts +4 -5
- package/dist/presets/index.mjs +2 -3
- package/dist/presets/multiTenant.d.mts +4 -5
- package/dist/presets/multiTenant.mjs +1 -2
- package/dist/{presets-DzSMwlKj.d.mts → presets-BTeYbw7h.d.mts} +2 -3
- package/dist/{presets-BITljm96.mjs → presets-CeFtfDR8.mjs} +1 -2
- package/dist/{prisma-Dg9GoVdj.d.mts → prisma-C3iornoK.d.mts} +2 -3
- package/dist/prisma-DJbMt3yf.mjs +1 -2
- package/dist/{queryCachePlugin-DMBnp2Q0.mjs → queryCachePlugin-B6R0d4av.mjs} +4 -5
- package/dist/{queryCachePlugin-7THaI5mt.d.mts → queryCachePlugin-Q6SYuHZ6.d.mts} +2 -3
- package/dist/{redis-D-JAeLtm.d.mts → redis-UwjEp8Ea.d.mts} +2 -3
- package/dist/{redis-stream-Bdh_vUU8.d.mts → redis-stream-CBg0upHI.d.mts} +2 -3
- package/dist/registry/index.d.mts +4 -5
- package/dist/registry/index.mjs +2 -2
- package/dist/{requestContext-QQD6ROJc.mjs → requestContext-xi6OKBL-.mjs} +1 -2
- package/dist/{schemaConverter-BwrmWroW.mjs → schemaConverter-Dtg0Kt9T.mjs} +1 -2
- package/dist/schemas/index.d.mts +1 -2
- package/dist/schemas/index.mjs +1 -2
- package/dist/scope/index.d.mts +2 -3
- package/dist/scope/index.mjs +2 -3
- package/dist/{sessionManager-jPKLbHE0.d.mts → sessionManager-D_iEHjQl.d.mts} +1 -2
- package/dist/{sse-B3c3_yZp.mjs → sse-DkqQ1uxb.mjs} +2 -3
- package/dist/testing/index.d.mts +8 -9
- package/dist/testing/index.mjs +3 -4
- package/dist/{tracing-Cc7vVQPp.d.mts → tracing-8CEbhF0w.d.mts} +1 -2
- package/dist/{typeGuards-DhMNLuvU.mjs → typeGuards-DwxA1t_L.mjs} +1 -2
- package/dist/types/index.d.mts +6 -7
- package/dist/types/index.mjs +1 -2
- package/dist/{types-CIgB7UUl.d.mts → types-B0dhNrnd.d.mts} +9 -10
- package/dist/types-Beqn1Un7.mjs +1 -2
- package/dist/types-DelU6kln.mjs +25 -0
- package/dist/{types-aYB4V7uN.d.mts → types-RLkFVgaw.d.mts} +18 -4
- package/dist/utils/index.d.mts +5 -6
- package/dist/utils/index.mjs +4 -4
- package/package.json +1 -1
- package/dist/EventTransport-BD2U0BTc.d.mts.map +0 -1
- package/dist/HookSystem-BsGV-j2l.mjs.map +0 -1
- package/dist/ResourceRegistry-DsN4KJjV.mjs.map +0 -1
- package/dist/audit/index.d.mts.map +0 -1
- package/dist/audit/index.mjs.map +0 -1
- package/dist/audited-C3T5DTUx.mjs.map +0 -1
- package/dist/auth/index.d.mts.map +0 -1
- package/dist/auth/index.mjs.map +0 -1
- package/dist/auth/redis-session.d.mts.map +0 -1
- package/dist/auth/redis-session.mjs.map +0 -1
- package/dist/betterAuthOpenApi-BrHKeSAx.mjs.map +0 -1
- package/dist/cache/index.d.mts.map +0 -1
- package/dist/cache/index.mjs.map +0 -1
- package/dist/caching-Bl28lYsR.mjs.map +0 -1
- package/dist/circuitBreaker-DeY4FCjs.mjs.map +0 -1
- package/dist/cli/commands/describe.d.mts.map +0 -1
- package/dist/cli/commands/describe.mjs.map +0 -1
- package/dist/cli/commands/docs.d.mts.map +0 -1
- package/dist/cli/commands/docs.mjs.map +0 -1
- package/dist/cli/commands/generate.d.mts.map +0 -1
- package/dist/cli/commands/generate.mjs.map +0 -1
- package/dist/cli/commands/init.d.mts.map +0 -1
- package/dist/cli/commands/init.mjs.map +0 -1
- package/dist/cli/commands/introspect.d.mts.map +0 -1
- package/dist/cli/commands/introspect.mjs.map +0 -1
- package/dist/cli/index.d.mts.map +0 -1
- package/dist/cli/index.mjs.map +0 -1
- package/dist/constants-DdXFXQtN.mjs.map +0 -1
- package/dist/createApp-CUgNqegw.mjs.map +0 -1
- package/dist/defineResource-k0_BDn8v.mjs.map +0 -1
- package/dist/discovery/index.d.mts.map +0 -1
- package/dist/discovery/index.mjs.map +0 -1
- package/dist/docs/index.d.mts.map +0 -1
- package/dist/docs/index.mjs.map +0 -1
- package/dist/elevation-BRy3yFWT.mjs.map +0 -1
- package/dist/elevation-B_2dRLVP.d.mts.map +0 -1
- package/dist/errorHandler-BbcgBmIH.d.mts.map +0 -1
- package/dist/errorHandler-C1okiriz.mjs.map +0 -1
- package/dist/errors-B9bZok84.mjs.map +0 -1
- package/dist/errors-ChKiFz62.d.mts.map +0 -1
- package/dist/eventPlugin-CTrLH3mt.d.mts.map +0 -1
- package/dist/eventPlugin-DGR_B2on.mjs.map +0 -1
- package/dist/events/index.d.mts.map +0 -1
- package/dist/events/index.mjs.map +0 -1
- package/dist/events/transports/redis-stream-entry.mjs.map +0 -1
- package/dist/events/transports/redis.d.mts.map +0 -1
- package/dist/events/transports/redis.mjs.map +0 -1
- package/dist/externalPaths-DlINfKbP.d.mts.map +0 -1
- package/dist/factory/index.d.mts.map +0 -1
- package/dist/fastifyAdapter-BkrGrlFi.d.mts.map +0 -1
- package/dist/fields-DyaDVX4J.d.mts.map +0 -1
- package/dist/fields-iagOozy0.mjs.map +0 -1
- package/dist/idempotency/index.d.mts.map +0 -1
- package/dist/idempotency/index.mjs.map +0 -1
- package/dist/idempotency/mongodb.mjs.map +0 -1
- package/dist/idempotency/redis.mjs.map +0 -1
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/integrations/event-gateway.d.mts.map +0 -1
- package/dist/integrations/event-gateway.mjs.map +0 -1
- package/dist/integrations/jobs.d.mts.map +0 -1
- package/dist/integrations/jobs.mjs.map +0 -1
- package/dist/integrations/streamline.d.mts.map +0 -1
- package/dist/integrations/streamline.mjs.map +0 -1
- package/dist/integrations/websocket.d.mts.map +0 -1
- package/dist/integrations/websocket.mjs.map +0 -1
- package/dist/interface-B01JvPVc.d.mts.map +0 -1
- package/dist/interface-CZe8IkMf.d.mts.map +0 -1
- package/dist/interface-Ch8HU9uM.d.mts.map +0 -1
- package/dist/introspectionPlugin-rFdO8ZUa.mjs.map +0 -1
- package/dist/keys-BqNejWup.mjs.map +0 -1
- package/dist/logger-Df2O2WsW.mjs.map +0 -1
- package/dist/memory-cQgelFOj.mjs.map +0 -1
- package/dist/migrations/index.d.mts.map +0 -1
- package/dist/migrations/index.mjs.map +0 -1
- package/dist/mongodb-BfJVlUJH.mjs.map +0 -1
- package/dist/mongodb-CGzRbfAK.d.mts.map +0 -1
- package/dist/mongodb-JN-9JA7K.d.mts.map +0 -1
- package/dist/openapi-G3Cw7XuM.mjs.map +0 -1
- package/dist/org/index.d.mts.map +0 -1
- package/dist/org/index.mjs.map +0 -1
- package/dist/org/types.d.mts.map +0 -1
- package/dist/permissions/index.d.mts.map +0 -1
- package/dist/permissions/index.mjs.map +0 -1
- package/dist/plugins/index.d.mts.map +0 -1
- package/dist/plugins/index.mjs.map +0 -1
- package/dist/plugins/response-cache.d.mts.map +0 -1
- package/dist/plugins/response-cache.mjs.map +0 -1
- package/dist/plugins/tracing-entry.mjs.map +0 -1
- package/dist/pluralize-CEweyOEm.mjs.map +0 -1
- package/dist/policies/index.d.mts.map +0 -1
- package/dist/policies/index.mjs.map +0 -1
- package/dist/presets/index.d.mts.map +0 -1
- package/dist/presets/index.mjs.map +0 -1
- package/dist/presets/multiTenant.d.mts.map +0 -1
- package/dist/presets/multiTenant.mjs.map +0 -1
- package/dist/presets-BITljm96.mjs.map +0 -1
- package/dist/presets-DzSMwlKj.d.mts.map +0 -1
- package/dist/prisma-DJbMt3yf.mjs.map +0 -1
- package/dist/prisma-Dg9GoVdj.d.mts.map +0 -1
- package/dist/queryCachePlugin-7THaI5mt.d.mts.map +0 -1
- package/dist/queryCachePlugin-DMBnp2Q0.mjs.map +0 -1
- package/dist/redis-D-JAeLtm.d.mts.map +0 -1
- package/dist/redis-stream-Bdh_vUU8.d.mts.map +0 -1
- package/dist/registry/index.d.mts.map +0 -1
- package/dist/requestContext-QQD6ROJc.mjs.map +0 -1
- package/dist/schemaConverter-BwrmWroW.mjs.map +0 -1
- package/dist/schemas/index.d.mts.map +0 -1
- package/dist/schemas/index.mjs.map +0 -1
- package/dist/scope/index.d.mts.map +0 -1
- package/dist/scope/index.mjs.map +0 -1
- package/dist/sessionManager-jPKLbHE0.d.mts.map +0 -1
- package/dist/sse-B3c3_yZp.mjs.map +0 -1
- package/dist/testing/index.d.mts.map +0 -1
- package/dist/testing/index.mjs.map +0 -1
- package/dist/tracing-Cc7vVQPp.d.mts.map +0 -1
- package/dist/typeGuards-DhMNLuvU.mjs.map +0 -1
- package/dist/types/index.d.mts.map +0 -1
- package/dist/types/index.mjs.map +0 -1
- package/dist/types-Beqn1Un7.mjs.map +0 -1
- package/dist/types-CIgB7UUl.d.mts.map +0 -1
- package/dist/types-aYB4V7uN.d.mts.map +0 -1
- package/dist/utils/index.d.mts.map +0 -1
|
@@ -96,5 +96,4 @@ declare class MemoryEventTransport implements EventTransport {
|
|
|
96
96
|
*/
|
|
97
97
|
declare function createEvent<T>(type: string, payload: T, meta?: Partial<DomainEvent['meta']>): DomainEvent<T>;
|
|
98
98
|
//#endregion
|
|
99
|
-
export { MemoryEventTransport as a, EventTransport as i, EventHandler as n, MemoryEventTransportOptions as o, EventLogger as r, createEvent as s, DomainEvent as t };
|
|
100
|
-
//# sourceMappingURL=EventTransport-BD2U0BTc.d.mts.map
|
|
99
|
+
export { MemoryEventTransport as a, EventTransport as i, EventHandler as n, MemoryEventTransportOptions as o, EventLogger as r, createEvent as s, DomainEvent as t };
|
|
@@ -401,5 +401,4 @@ function afterDelete(hooks, resource, handler, priority = 10) {
|
|
|
401
401
|
}
|
|
402
402
|
|
|
403
403
|
//#endregion
|
|
404
|
-
export { beforeCreate as a, createHookSystem as c, afterUpdate as i, defineHook as l, afterCreate as n, beforeDelete as o, afterDelete as r, beforeUpdate as s, HookSystem as t };
|
|
405
|
-
//# sourceMappingURL=HookSystem-BsGV-j2l.mjs.map
|
|
404
|
+
export { beforeCreate as a, createHookSystem as c, afterUpdate as i, defineHook as l, afterCreate as n, beforeDelete as o, afterDelete as r, beforeUpdate as s, HookSystem as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../elevation-
|
|
2
|
-
import { a as RepositoryLike, i as RelationMetadata, n as DataAdapter, o as SchemaMetadata, r as FieldMetadata, s as ValidationResult, t as AdapterFactory } from "../interface-
|
|
3
|
-
import "../types-
|
|
4
|
-
import { a as PrismaQueryParserOptions, c as MongooseAdapterOptions, i as PrismaQueryParser, l as createMongooseAdapter, n as PrismaAdapterOptions, o as createPrismaAdapter, r as PrismaQueryOptions, s as MongooseAdapter, t as PrismaAdapter } from "../prisma-
|
|
1
|
+
import "../elevation-DGo5shaX.mjs";
|
|
2
|
+
import { a as RepositoryLike, i as RelationMetadata, n as DataAdapter, o as SchemaMetadata, r as FieldMetadata, s as ValidationResult, t as AdapterFactory } from "../interface-e9XfSsUV.mjs";
|
|
3
|
+
import "../types-RLkFVgaw.mjs";
|
|
4
|
+
import { a as PrismaQueryParserOptions, c as MongooseAdapterOptions, i as PrismaQueryParser, l as createMongooseAdapter, n as PrismaAdapterOptions, o as createPrismaAdapter, r as PrismaQueryOptions, s as MongooseAdapter, t as PrismaAdapter } from "../prisma-C3iornoK.mjs";
|
|
5
5
|
export { type AdapterFactory, type DataAdapter, type FieldMetadata, MongooseAdapter, type MongooseAdapterOptions, PrismaAdapter, type PrismaAdapterOptions, type PrismaQueryOptions, PrismaQueryParser, type PrismaQueryParserOptions, type RelationMetadata, type RepositoryLike, type SchemaMetadata, type ValidationResult, createMongooseAdapter, createPrismaAdapter };
|
package/dist/audit/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../elevation-
|
|
2
|
-
import "../interface-
|
|
3
|
-
import "../types-
|
|
4
|
-
import { a as AuditContext, c as AuditStore, i as AuditAction, l as AuditStoreOptions, n as MongoAuditStoreOptions, o as AuditEntry, r as MongoConnection, s as AuditQueryOptions, u as createAuditEntry } from "../mongodb-
|
|
1
|
+
import "../elevation-DGo5shaX.mjs";
|
|
2
|
+
import "../interface-e9XfSsUV.mjs";
|
|
3
|
+
import "../types-RLkFVgaw.mjs";
|
|
4
|
+
import { a as AuditContext, c as AuditStore, i as AuditAction, l as AuditStoreOptions, n as MongoAuditStoreOptions, o as AuditEntry, r as MongoConnection, s as AuditQueryOptions, u as createAuditEntry } from "../mongodb-ClykrfGo.mjs";
|
|
5
5
|
import { FastifyPluginAsync } from "fastify";
|
|
6
6
|
|
|
7
7
|
//#region src/audit/auditPlugin.d.ts
|
|
@@ -78,5 +78,4 @@ declare class MemoryAuditStore implements AuditStore {
|
|
|
78
78
|
clear(): void;
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
|
-
export { type AuditAction, type AuditContext, type AuditEntry, type AuditLogger, type AuditPluginOptions, type AuditQueryOptions, type AuditStore, type AuditStoreOptions, MemoryAuditStore, type MemoryAuditStoreOptions, type MongoAuditStoreOptions, _default as auditPlugin, auditPlugin as auditPluginFn, createAuditEntry };
|
|
82
|
-
//# sourceMappingURL=index.d.mts.map
|
|
81
|
+
export { type AuditAction, type AuditContext, type AuditEntry, type AuditLogger, type AuditPluginOptions, type AuditQueryOptions, type AuditStore, type AuditStoreOptions, MemoryAuditStore, type MemoryAuditStoreOptions, type MongoAuditStoreOptions, _default as auditPlugin, auditPlugin as auditPluginFn, createAuditEntry };
|
package/dist/audit/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as MongoAuditStore } from "../mongodb-
|
|
1
|
+
import { t as MongoAuditStore } from "../mongodb-DNKEExbf.mjs";
|
|
2
2
|
import fp from "fastify-plugin";
|
|
3
3
|
|
|
4
4
|
//#region src/audit/stores/interface.ts
|
|
@@ -272,5 +272,4 @@ var auditPlugin_default = fp(auditPlugin, {
|
|
|
272
272
|
});
|
|
273
273
|
|
|
274
274
|
//#endregion
|
|
275
|
-
export { MemoryAuditStore, auditPlugin_default as auditPlugin, auditPlugin as auditPluginFn, createAuditEntry };
|
|
276
|
-
//# sourceMappingURL=index.mjs.map
|
|
275
|
+
export { MemoryAuditStore, auditPlugin_default as auditPlugin, auditPlugin as auditPluginFn, createAuditEntry };
|
package/dist/audit/mongodb.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../elevation-
|
|
2
|
-
import "../interface-
|
|
3
|
-
import "../types-
|
|
4
|
-
import { n as MongoAuditStoreOptions, t as MongoAuditStore } from "../mongodb-
|
|
1
|
+
import "../elevation-DGo5shaX.mjs";
|
|
2
|
+
import "../interface-e9XfSsUV.mjs";
|
|
3
|
+
import "../types-RLkFVgaw.mjs";
|
|
4
|
+
import { n as MongoAuditStoreOptions, t as MongoAuditStore } from "../mongodb-ClykrfGo.mjs";
|
|
5
5
|
export { MongoAuditStore, type MongoAuditStoreOptions };
|
package/dist/audit/mongodb.mjs
CHANGED
|
@@ -137,5 +137,4 @@ function auditedPreset(options = {}) {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
//#endregion
|
|
140
|
-
export { softDeletePreset as a, slugLookupPreset as i, treePreset as n, ownedByUserPreset as r, auditedPreset as t };
|
|
141
|
-
//# sourceMappingURL=audited-C3T5DTUx.mjs.map
|
|
140
|
+
export { softDeletePreset as a, slugLookupPreset as i, treePreset as n, ownedByUserPreset as r, auditedPreset as t };
|
package/dist/auth/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../elevation-
|
|
2
|
-
import "../interface-
|
|
3
|
-
import { t as PermissionCheck } from "../types-
|
|
1
|
+
import "../elevation-DGo5shaX.mjs";
|
|
2
|
+
import "../interface-e9XfSsUV.mjs";
|
|
3
|
+
import { t as PermissionCheck } from "../types-RLkFVgaw.mjs";
|
|
4
4
|
import { AuthHelpers, AuthPluginOptions } from "../types/index.mjs";
|
|
5
|
-
import { t as ExternalOpenApiPaths } from "../externalPaths-
|
|
6
|
-
import { a as SessionManagerOptions, c as createSessionManager, i as SessionData, n as MemorySessionStoreOptions, o as SessionManagerResult, r as SessionCookieOptions, s as SessionStore, t as MemorySessionStore } from "../sessionManager-
|
|
5
|
+
import { t as ExternalOpenApiPaths } from "../externalPaths-SyPF2tgK.mjs";
|
|
6
|
+
import { a as SessionManagerOptions, c as createSessionManager, i as SessionData, n as MemorySessionStoreOptions, o as SessionManagerResult, r as SessionCookieOptions, s as SessionStore, t as MemorySessionStore } from "../sessionManager-D_iEHjQl.mjs";
|
|
7
7
|
import { FastifyPluginAsync, FastifyReply as FastifyReply$1, FastifyRequest as FastifyRequest$1 } from "fastify";
|
|
8
8
|
|
|
9
9
|
//#region src/auth/authPlugin.d.ts
|
|
@@ -185,5 +185,4 @@ interface BetterAuthOpenApiOptions {
|
|
|
185
185
|
*/
|
|
186
186
|
declare function extractBetterAuthOpenApi(authApi: Record<string, unknown>, options?: BetterAuthOpenApiOptions): ExternalOpenApiPaths;
|
|
187
187
|
//#endregion
|
|
188
|
-
export { type AuthPluginOptions, type BetterAuthAdapterOptions, type BetterAuthAdapterResult, type BetterAuthHandler, type BetterAuthOpenApiOptions, MemorySessionStore, type MemorySessionStoreOptions, type SessionCookieOptions, type SessionData, type SessionManagerOptions, type SessionManagerResult, type SessionStore, _default as authPlugin, authPlugin as authPluginFn, createBetterAuthAdapter, createSessionManager, extractBetterAuthOpenApi };
|
|
189
|
-
//# sourceMappingURL=index.d.mts.map
|
|
188
|
+
export { type AuthPluginOptions, type BetterAuthAdapterOptions, type BetterAuthAdapterResult, type BetterAuthHandler, type BetterAuthOpenApiOptions, MemorySessionStore, type MemorySessionStoreOptions, type SessionCookieOptions, type SessionData, type SessionManagerOptions, type SessionManagerResult, type SessionStore, _default as authPlugin, authPlugin as authPluginFn, createBetterAuthAdapter, createSessionManager, extractBetterAuthOpenApi };
|
package/dist/auth/index.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as AUTHENTICATED_SCOPE } from "../types-Beqn1Un7.mjs";
|
|
2
|
-
import { t as
|
|
2
|
+
import { n as normalizeRoles, t as getUserRoles } from "../types-DelU6kln.mjs";
|
|
3
|
+
import { t as ArcError } from "../errors-DBANPbGr.mjs";
|
|
3
4
|
import { requireOrgMembership, requireOrgRole, requireTeamMembership } from "../permissions/index.mjs";
|
|
4
|
-
import { n as extractBetterAuthOpenApi } from "../betterAuthOpenApi-
|
|
5
|
+
import { n as extractBetterAuthOpenApi } from "../betterAuthOpenApi-DjWDddNc.mjs";
|
|
5
6
|
import { createHmac, randomUUID, timingSafeEqual } from "node:crypto";
|
|
6
7
|
import fp from "fastify-plugin";
|
|
7
8
|
|
|
@@ -241,7 +242,7 @@ const authPlugin = async (fastify, opts = {}) => {
|
|
|
241
242
|
});
|
|
242
243
|
return;
|
|
243
244
|
}
|
|
244
|
-
const userRoles = user
|
|
245
|
+
const userRoles = getUserRoles(user);
|
|
245
246
|
if (allowedRoles.length === 1 && allowedRoles[0] === "*") return;
|
|
246
247
|
if (!allowedRoles.some((role) => userRoles.includes(role))) {
|
|
247
248
|
reply.code(403).send({
|
|
@@ -385,7 +386,7 @@ async function tryDirectGetMemberRole(auth, headers, organizationId) {
|
|
|
385
386
|
headers,
|
|
386
387
|
query: { organizationId }
|
|
387
388
|
});
|
|
388
|
-
if (result?.role) return
|
|
389
|
+
if (result?.role) return normalizeRoles(result.role);
|
|
389
390
|
return null;
|
|
390
391
|
} catch {
|
|
391
392
|
return null;
|
|
@@ -427,19 +428,13 @@ function normalizeId(value) {
|
|
|
427
428
|
}
|
|
428
429
|
return String(value);
|
|
429
430
|
}
|
|
430
|
-
/** Parse role payload from Better Auth (string, csv, array) into normalized roles[] */
|
|
431
|
-
function parseRoles(value) {
|
|
432
|
-
if (Array.isArray(value)) return value.map((r) => String(r).trim()).filter(Boolean);
|
|
433
|
-
if (typeof value === "string") return value.split(",").map((r) => r.trim()).filter(Boolean);
|
|
434
|
-
return [];
|
|
435
|
-
}
|
|
436
431
|
/** Extract role field from heterogeneous org membership shapes */
|
|
437
432
|
function extractRolesFromMembership(membership) {
|
|
438
|
-
const direct =
|
|
433
|
+
const direct = normalizeRoles(membership.role ?? membership.roles ?? membership.orgRole);
|
|
439
434
|
if (direct.length > 0) return direct;
|
|
440
435
|
const nestedMembership = membership.membership;
|
|
441
436
|
if (nestedMembership) {
|
|
442
|
-
const nested =
|
|
437
|
+
const nested = normalizeRoles(nestedMembership.role ?? nestedMembership.roles);
|
|
443
438
|
if (nested.length > 0) return nested;
|
|
444
439
|
}
|
|
445
440
|
return [];
|
|
@@ -480,7 +475,7 @@ async function resolveOrgRoles(auth, protocol, host, normalizedBase, headers, ac
|
|
|
480
475
|
const roleResponse = await auth.handler(roleRequest);
|
|
481
476
|
if (roleResponse.ok) {
|
|
482
477
|
const roleData = await roleResponse.json();
|
|
483
|
-
if (roleData?.role) return
|
|
478
|
+
if (roleData?.role) return normalizeRoles(roleData.role);
|
|
484
479
|
}
|
|
485
480
|
const listUrl = `${protocol}://${host}${normalizedBase}/organization/list`;
|
|
486
481
|
const listRequest = new Request(listUrl, {
|
|
@@ -677,7 +672,7 @@ function createBetterAuthAdapter(options) {
|
|
|
677
672
|
if (!fastify.hasDecorator("authenticate")) fastify.decorate("authenticate", authenticate);
|
|
678
673
|
if (!fastify.hasDecorator("optionalAuthenticate")) fastify.decorate("optionalAuthenticate", optionalAuthenticate);
|
|
679
674
|
if (!extractedOpenApi && openapiOpt !== false && auth.api && typeof auth.api === "object") {
|
|
680
|
-
const { extractBetterAuthOpenApi } = await import("../betterAuthOpenApi-
|
|
675
|
+
const { extractBetterAuthOpenApi } = await import("../betterAuthOpenApi-DjWDddNc.mjs").then((n) => n.t);
|
|
681
676
|
extractedOpenApi = extractBetterAuthOpenApi(auth.api, {
|
|
682
677
|
basePath,
|
|
683
678
|
userFields
|
|
@@ -1098,5 +1093,4 @@ function createSessionManager(options) {
|
|
|
1098
1093
|
}
|
|
1099
1094
|
|
|
1100
1095
|
//#endregion
|
|
1101
|
-
export { MemorySessionStore, authPlugin_default as authPlugin, authPlugin as authPluginFn, createBetterAuthAdapter, createSessionManager, extractBetterAuthOpenApi };
|
|
1102
|
-
//# sourceMappingURL=index.mjs.map
|
|
1096
|
+
export { MemorySessionStore, authPlugin_default as authPlugin, authPlugin as authPluginFn, createBetterAuthAdapter, createSessionManager, extractBetterAuthOpenApi };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as SessionData, s as SessionStore } from "../sessionManager-
|
|
1
|
+
import { i as SessionData, s as SessionStore } from "../sessionManager-D_iEHjQl.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/auth/redis-session.d.ts
|
|
4
4
|
/** Minimal Redis client interface — compatible with ioredis */
|
|
@@ -40,5 +40,4 @@ declare class RedisSessionStore implements SessionStore {
|
|
|
40
40
|
deleteAllExcept(userId: string, currentSessionId: string): Promise<void>;
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
|
-
export { RedisLike, RedisSessionStore, RedisSessionStoreOptions };
|
|
44
|
-
//# sourceMappingURL=redis-session.d.mts.map
|
|
43
|
+
export { RedisLike, RedisSessionStore, RedisSessionStoreOptions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-C7Uep-_p.mjs";
|
|
2
|
-
import { a as toJsonSchema } from "./schemaConverter-
|
|
2
|
+
import { a as toJsonSchema } from "./schemaConverter-Dtg0Kt9T.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/auth/betterAuthOpenApi.ts
|
|
5
5
|
var betterAuthOpenApi_exports = /* @__PURE__ */ __exportAll({ extractBetterAuthOpenApi: () => extractBetterAuthOpenApi });
|
|
@@ -246,5 +246,4 @@ function mergeUserFieldsIntoRequestBody(requestBody, userFields, endpointPath) {
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
//#endregion
|
|
249
|
-
export { extractBetterAuthOpenApi as n, betterAuthOpenApi_exports as t };
|
|
250
|
-
//# sourceMappingURL=betterAuthOpenApi-BrHKeSAx.mjs.map
|
|
249
|
+
export { extractBetterAuthOpenApi as n, betterAuthOpenApi_exports as t };
|
package/dist/cache/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as CacheStore, n as CacheSetOptions, r as CacheStats, t as CacheLogger } from "../interface-
|
|
2
|
-
import { a as CacheEnvelope, c as QueryCache, i as queryCachePlugin, l as QueryCacheConfig, n as QueryCacheDefaults, o as CacheResult, r as QueryCachePluginOptions, s as CacheStatus, t as CrossResourceRule } from "../queryCachePlugin-
|
|
1
|
+
import { i as CacheStore, n as CacheSetOptions, r as CacheStats, t as CacheLogger } from "../interface-DTbsvIWe.mjs";
|
|
2
|
+
import { a as CacheEnvelope, c as QueryCache, i as queryCachePlugin, l as QueryCacheConfig, n as QueryCacheDefaults, o as CacheResult, r as QueryCachePluginOptions, s as CacheStatus, t as CrossResourceRule } from "../queryCachePlugin-Q6SYuHZ6.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/cache/memory.d.ts
|
|
5
5
|
interface MemoryCacheStoreOptions {
|
|
@@ -142,5 +142,4 @@ declare function tagVersionKey(tag: string): string;
|
|
|
142
142
|
*/
|
|
143
143
|
declare function hashParams(params: Record<string, unknown>): string;
|
|
144
144
|
//#endregion
|
|
145
|
-
export { type CacheEnvelope, type CacheLogger, type CacheResult, type CacheSetOptions, type CacheStats, type CacheStatus, type CacheStore, type CrossResourceRule, MemoryCacheStore, type MemoryCacheStoreOptions, QueryCache, type QueryCacheConfig, type QueryCacheDefaults, type QueryCachePluginOptions, type RedisCacheClient, RedisCacheStore, type RedisCacheStoreOptions, type RedisPipeline, buildQueryKey, hashParams, queryCachePlugin, tagVersionKey, versionKey };
|
|
146
|
-
//# sourceMappingURL=index.d.mts.map
|
|
145
|
+
export { type CacheEnvelope, type CacheLogger, type CacheResult, type CacheSetOptions, type CacheStats, type CacheStatus, type CacheStore, type CrossResourceRule, MemoryCacheStore, type MemoryCacheStoreOptions, QueryCache, type QueryCacheConfig, type QueryCacheDefaults, type QueryCachePluginOptions, type RedisCacheClient, RedisCacheStore, type RedisCacheStoreOptions, type RedisPipeline, buildQueryKey, hashParams, queryCachePlugin, tagVersionKey, versionKey };
|
package/dist/cache/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-
|
|
2
|
-
import { t as MemoryCacheStore } from "../memory-
|
|
3
|
-
import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-
|
|
1
|
+
import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-DhqDRxv3.mjs";
|
|
2
|
+
import { t as MemoryCacheStore } from "../memory-B2v7KrCB.mjs";
|
|
3
|
+
import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-B6R0d4av.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/cache/redis.ts
|
|
6
6
|
/**
|
|
@@ -88,5 +88,4 @@ var RedisCacheStore = class {
|
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
//#endregion
|
|
91
|
-
export { MemoryCacheStore, QueryCache, RedisCacheStore, buildQueryKey, hashParams, queryCachePlugin, tagVersionKey, versionKey };
|
|
92
|
-
//# sourceMappingURL=index.mjs.map
|
|
91
|
+
export { MemoryCacheStore, QueryCache, RedisCacheStore, buildQueryKey, hashParams, queryCachePlugin, tagVersionKey, versionKey };
|
|
@@ -90,5 +90,4 @@ var caching_default = fp(cachingPlugin, {
|
|
|
90
90
|
});
|
|
91
91
|
|
|
92
92
|
//#endregion
|
|
93
|
-
export { caching_default as n, caching_exports as r, cachingPlugin as t };
|
|
94
|
-
//# sourceMappingURL=caching-Bl28lYsR.mjs.map
|
|
93
|
+
export { caching_default as n, caching_exports as r, cachingPlugin as t };
|
|
@@ -1093,5 +1093,4 @@ function createCircuitBreakerRegistry() {
|
|
|
1093
1093
|
}
|
|
1094
1094
|
|
|
1095
1095
|
//#endregion
|
|
1096
|
-
export { ArcQueryParser as C, wrapResponse as S, paginateWrapper as _, createCircuitBreaker as a, responses as b, deleteResponse as c, getListQueryParams as d, itemResponse as f, mutationResponse as g, messageWrapper as h, CircuitState as i, errorResponseSchema as l, listResponse as m, CircuitBreakerError as n, createCircuitBreakerRegistry as o, itemWrapper as p, CircuitBreakerRegistry as r, createStateMachine as s, CircuitBreaker as t, getDefaultCrudSchemas as u, paginationSchema as v, createQueryParser as w, successResponseSchema as x, queryParams as y };
|
|
1097
|
-
//# sourceMappingURL=circuitBreaker-DeY4FCjs.mjs.map
|
|
1096
|
+
export { ArcQueryParser as C, wrapResponse as S, paginateWrapper as _, createCircuitBreaker as a, responses as b, deleteResponse as c, getListQueryParams as d, itemResponse as f, mutationResponse as g, messageWrapper as h, CircuitState as i, errorResponseSchema as l, listResponse as m, CircuitBreakerError as n, createCircuitBreakerRegistry as o, itemWrapper as p, CircuitBreakerRegistry as r, createStateMachine as s, CircuitBreaker as t, getDefaultCrudSchemas as u, paginationSchema as v, createQueryParser as w, successResponseSchema as x, queryParams as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as ResourceRegistry } from "../../ResourceRegistry-
|
|
2
|
-
import { t as buildOpenApiSpec } from "../../openapi-
|
|
1
|
+
import { t as ResourceRegistry } from "../../ResourceRegistry-7Ic20ZMw.mjs";
|
|
2
|
+
import { t as buildOpenApiSpec } from "../../openapi-9nB_kiuR.mjs";
|
|
3
3
|
import { writeFileSync } from "node:fs";
|
|
4
4
|
import { resolve } from "node:path";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
@@ -49,5 +49,4 @@ async function exportDocs(args) {
|
|
|
49
49
|
var docs_default = { exportDocs };
|
|
50
50
|
|
|
51
51
|
//#endregion
|
|
52
|
-
export { docs_default as default, exportDocs };
|
|
53
|
-
//# sourceMappingURL=docs.mjs.map
|
|
52
|
+
export { docs_default as default, exportDocs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as pluralize } from "../../pluralize-
|
|
1
|
+
import { t as pluralize } from "../../pluralize-CM-jZg7p.mjs";
|
|
2
2
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
|
|
@@ -354,5 +354,4 @@ async function generateFile(name, lowerName, resourcePath, fileType, template, e
|
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
//#endregion
|
|
357
|
-
export { generate as default, generate };
|
|
358
|
-
//# sourceMappingURL=generate.mjs.map
|
|
357
|
+
export { generate as default, generate };
|
|
@@ -1201,7 +1201,7 @@ export const requireSuperadmin = ()${returnType} =>
|
|
|
1201
1201
|
* - requireOrgMembership() — just checks if user is in the org (any role)
|
|
1202
1202
|
* - requireTeamMembership() — checks if user is in the active team
|
|
1203
1203
|
*
|
|
1204
|
-
* These are DIFFERENT from platform-level helpers above (requireRoles checks user.
|
|
1204
|
+
* These are DIFFERENT from platform-level helpers above (requireRoles checks user.role).
|
|
1205
1205
|
* Platform superadmin automatically bypasses all org role checks.
|
|
1206
1206
|
*
|
|
1207
1207
|
* IMPORTANT: When using Better Auth's Access Control (ac) with custom roles,
|
|
@@ -1219,13 +1219,13 @@ import {
|
|
|
1219
1219
|
export { requireOrgMembership, requireOrgRole, requireTeamMembership };
|
|
1220
1220
|
|
|
1221
1221
|
/**
|
|
1222
|
-
* Require organization owner (checks member.role, not user.
|
|
1222
|
+
* Require organization owner (checks member.role, not user.role)
|
|
1223
1223
|
*/
|
|
1224
1224
|
export const requireOrgOwner = ()${returnType} =>
|
|
1225
1225
|
requireOrgRole(['owner']);
|
|
1226
1226
|
|
|
1227
1227
|
/**
|
|
1228
|
-
* Require organization manager or higher (checks member.role, not user.
|
|
1228
|
+
* Require organization manager or higher (checks member.role, not user.role)
|
|
1229
1229
|
*/
|
|
1230
1230
|
export const requireOrgManager = ()${returnType} =>
|
|
1231
1231
|
requireOrgRole(['manager', 'admin', 'owner']);
|
|
@@ -2236,11 +2236,11 @@ export async function login(request${ts ? ": FastifyRequest" : ""}, reply${ts ?
|
|
|
2236
2236
|
return reply.code(401).send({ success: false, message: 'Invalid credentials' });
|
|
2237
2237
|
}
|
|
2238
2238
|
|
|
2239
|
-
const tokens = request.server.auth.issueTokens({ id: user._id.toString(),
|
|
2239
|
+
const tokens = request.server.auth.issueTokens({ id: user._id.toString(), role: user.role });
|
|
2240
2240
|
|
|
2241
2241
|
return reply.send({
|
|
2242
2242
|
success: true,
|
|
2243
|
-
user: { id: user._id, name: user.name, email: user.email,
|
|
2243
|
+
user: { id: user._id, name: user.name, email: user.email, role: user.role },
|
|
2244
2244
|
...tokens,
|
|
2245
2245
|
});
|
|
2246
2246
|
} catch (error) {
|
|
@@ -2612,5 +2612,4 @@ Documentation:
|
|
|
2612
2612
|
}
|
|
2613
2613
|
|
|
2614
2614
|
//#endregion
|
|
2615
|
-
export { init as default, init };
|
|
2616
|
-
//# sourceMappingURL=init.mjs.map
|
|
2615
|
+
export { init as default, init };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ResourceRegistry } from "../../ResourceRegistry-
|
|
1
|
+
import { t as ResourceRegistry } from "../../ResourceRegistry-7Ic20ZMw.mjs";
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
4
|
|
|
@@ -72,5 +72,4 @@ async function introspect(args) {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
//#endregion
|
|
75
|
-
export { introspect as default, introspect };
|
|
76
|
-
//# sourceMappingURL=introspect.mjs.map
|
|
75
|
+
export { introspect as default, introspect };
|
package/dist/cli/index.d.mts
CHANGED
|
@@ -13,5 +13,4 @@ import introspect from "./commands/introspect.mjs";
|
|
|
13
13
|
*/
|
|
14
14
|
declare function doctor(_args?: string[]): Promise<void>;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { describe, doctor, exportDocs, generate, init, introspect };
|
|
17
|
-
//# sourceMappingURL=index.d.mts.map
|
|
16
|
+
export { describe, doctor, exportDocs, generate, init, introspect };
|
package/dist/cli/index.mjs
CHANGED
|
@@ -81,5 +81,4 @@ const RESERVED_QUERY_PARAMS = Object.freeze(new Set([
|
|
|
81
81
|
]));
|
|
82
82
|
|
|
83
83
|
//#endregion
|
|
84
|
-
export { DEFAULT_SORT as a, HOOK_OPERATIONS as c, MAX_REGEX_LENGTH as d, MAX_SEARCH_LENGTH as f, SYSTEM_FIELDS as h, DEFAULT_MAX_LIMIT as i, HOOK_PHASES as l, RESERVED_QUERY_PARAMS as m, DEFAULT_ID_FIELD as n, DEFAULT_TENANT_FIELD as o, MUTATION_OPERATIONS as p, DEFAULT_LIMIT as r, DEFAULT_UPDATE_METHOD as s, CRUD_OPERATIONS as t, MAX_FILTER_DEPTH as u };
|
|
85
|
-
//# sourceMappingURL=constants-DdXFXQtN.mjs.map
|
|
84
|
+
export { DEFAULT_SORT as a, HOOK_OPERATIONS as c, MAX_REGEX_LENGTH as d, MAX_SEARCH_LENGTH as f, SYSTEM_FIELDS as h, DEFAULT_MAX_LIMIT as i, HOOK_PHASES as l, RESERVED_QUERY_PARAMS as m, DEFAULT_ID_FIELD as n, DEFAULT_TENANT_FIELD as o, MUTATION_OPERATIONS as p, DEFAULT_LIMIT as r, DEFAULT_UPDATE_METHOD as s, CRUD_OPERATIONS as t, MAX_FILTER_DEPTH as u };
|
package/dist/core/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../elevation-
|
|
2
|
-
import { E as defineResource, T as ResourceDefinition, c as BaseController, d as QueryResolverConfig, f as BodySanitizer, h as AccessControlConfig, l as BaseControllerOptions, m as AccessControl, p as BodySanitizerConfig, u as QueryResolver } from "../interface-
|
|
3
|
-
import "../types-
|
|
4
|
-
import { A as createCrudRouter, C as MutationOperation, D as ActionRouterConfig, E as ActionHandler, O as IdempotencyService, S as MUTATION_OPERATIONS, T as SYSTEM_FIELDS, _ as HookOperation, a as getControllerScope, b as MAX_REGEX_LENGTH, c as CrudOperation, d as DEFAULT_MAX_LIMIT, f as DEFAULT_SORT, g as HOOK_PHASES, h as HOOK_OPERATIONS, i as getControllerContext, j as createPermissionMiddleware, k as createActionRouter, l as DEFAULT_ID_FIELD, m as DEFAULT_UPDATE_METHOD, n as createFastifyHandler, o as sendControllerResponse, p as DEFAULT_TENANT_FIELD, r as createRequestContext, s as CRUD_OPERATIONS, t as createCrudHandlers, u as DEFAULT_LIMIT, v as HookPhase, w as RESERVED_QUERY_PARAMS, x as MAX_SEARCH_LENGTH, y as MAX_FILTER_DEPTH } from "../fastifyAdapter-
|
|
1
|
+
import "../elevation-DGo5shaX.mjs";
|
|
2
|
+
import { E as defineResource, T as ResourceDefinition, c as BaseController, d as QueryResolverConfig, f as BodySanitizer, h as AccessControlConfig, l as BaseControllerOptions, m as AccessControl, p as BodySanitizerConfig, u as QueryResolver } from "../interface-e9XfSsUV.mjs";
|
|
3
|
+
import "../types-RLkFVgaw.mjs";
|
|
4
|
+
import { A as createCrudRouter, C as MutationOperation, D as ActionRouterConfig, E as ActionHandler, O as IdempotencyService, S as MUTATION_OPERATIONS, T as SYSTEM_FIELDS, _ as HookOperation, a as getControllerScope, b as MAX_REGEX_LENGTH, c as CrudOperation, d as DEFAULT_MAX_LIMIT, f as DEFAULT_SORT, g as HOOK_PHASES, h as HOOK_OPERATIONS, i as getControllerContext, j as createPermissionMiddleware, k as createActionRouter, l as DEFAULT_ID_FIELD, m as DEFAULT_UPDATE_METHOD, n as createFastifyHandler, o as sendControllerResponse, p as DEFAULT_TENANT_FIELD, r as createRequestContext, s as CRUD_OPERATIONS, t as createCrudHandlers, u as DEFAULT_LIMIT, v as HookPhase, w as RESERVED_QUERY_PARAMS, x as MAX_SEARCH_LENGTH, y as MAX_FILTER_DEPTH } from "../fastifyAdapter-C8DlE0YH.mjs";
|
|
5
5
|
export { AccessControl, type AccessControlConfig, type ActionHandler, type ActionRouterConfig, BaseController, type BaseControllerOptions, BodySanitizer, type BodySanitizerConfig, CRUD_OPERATIONS, CrudOperation, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, HOOK_OPERATIONS, HOOK_PHASES, HookOperation, HookPhase, type IdempotencyService, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, MutationOperation, QueryResolver, type QueryResolverConfig, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, createActionRouter, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineResource, getControllerContext, getControllerScope, sendControllerResponse };
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
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-DdXFXQtN.mjs";
|
|
2
|
-
import { _ as QueryResolver, c as createPermissionMiddleware, d as createFastifyHandler, f as createRequestContext, g as BaseController, h as sendControllerResponse, m as getControllerScope, n as defineResource, o as createActionRouter, p as getControllerContext, s as createCrudRouter, t as ResourceDefinition, u as createCrudHandlers, v as BodySanitizer, y as AccessControl } from "../defineResource-
|
|
2
|
+
import { _ as QueryResolver, c as createPermissionMiddleware, d as createFastifyHandler, f as createRequestContext, g as BaseController, h as sendControllerResponse, m as getControllerScope, n as defineResource, o as createActionRouter, p as getControllerContext, s as createCrudRouter, t as ResourceDefinition, u as createCrudHandlers, v as BodySanitizer, y as AccessControl } from "../defineResource-PXzSJ15_.mjs";
|
|
3
3
|
|
|
4
4
|
export { AccessControl, BaseController, BodySanitizer, CRUD_OPERATIONS, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, HOOK_OPERATIONS, HOOK_PHASES, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, QueryResolver, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, createActionRouter, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineResource, getControllerContext, getControllerScope, sendControllerResponse };
|
|
@@ -276,7 +276,7 @@ async function loadPlugin(name, logger) {
|
|
|
276
276
|
*/
|
|
277
277
|
async function createApp(options) {
|
|
278
278
|
if (options.debug !== void 0 && options.debug !== false) {
|
|
279
|
-
const { configureArcLogger } = await import("./logger-
|
|
279
|
+
const { configureArcLogger } = await import("./logger-ByrvQWZO.mjs").then((n) => n.r);
|
|
280
280
|
configureArcLogger({ debug: options.debug });
|
|
281
281
|
}
|
|
282
282
|
const authConfig = options.auth;
|
|
@@ -404,7 +404,7 @@ async function createApp(options) {
|
|
|
404
404
|
};
|
|
405
405
|
trackPlugin("arc-core");
|
|
406
406
|
if (config.arcPlugins?.events !== false) {
|
|
407
|
-
const { default: eventPlugin } = await import("./eventPlugin-
|
|
407
|
+
const { default: eventPlugin } = await import("./eventPlugin-BEOvaDqo.mjs").then((n) => n.n);
|
|
408
408
|
const eventOpts = typeof config.arcPlugins?.events === "object" ? config.arcPlugins.events : {};
|
|
409
409
|
await fastify.register(eventPlugin, {
|
|
410
410
|
...eventOpts,
|
|
@@ -429,16 +429,16 @@ async function createApp(options) {
|
|
|
429
429
|
fastify.log.debug("Arc gracefulShutdown plugin enabled");
|
|
430
430
|
}
|
|
431
431
|
if (config.arcPlugins?.caching) {
|
|
432
|
-
const { default: cachingPlugin } = await import("./caching-
|
|
432
|
+
const { default: cachingPlugin } = await import("./caching-GSDJcA6-.mjs").then((n) => n.r);
|
|
433
433
|
const cachingOpts = config.arcPlugins.caching === true ? {} : config.arcPlugins.caching;
|
|
434
434
|
await fastify.register(cachingPlugin, cachingOpts);
|
|
435
435
|
trackPlugin("arc-caching", cachingOpts);
|
|
436
436
|
fastify.log.debug("Arc caching plugin enabled");
|
|
437
437
|
}
|
|
438
438
|
if (config.arcPlugins?.queryCache) {
|
|
439
|
-
const { queryCachePlugin } = await import("./queryCachePlugin-
|
|
439
|
+
const { queryCachePlugin } = await import("./queryCachePlugin-B6R0d4av.mjs").then((n) => n.n);
|
|
440
440
|
const qcOpts = config.arcPlugins.queryCache === true ? {} : config.arcPlugins.queryCache;
|
|
441
|
-
const store = options.stores?.queryCache ?? new (await (import("./memory-
|
|
441
|
+
const store = options.stores?.queryCache ?? new (await (import("./memory-B2v7KrCB.mjs").then((n) => n.n))).MemoryCacheStore();
|
|
442
442
|
await fastify.register(queryCachePlugin, {
|
|
443
443
|
store,
|
|
444
444
|
...qcOpts
|
|
@@ -448,7 +448,7 @@ async function createApp(options) {
|
|
|
448
448
|
}
|
|
449
449
|
if (config.arcPlugins?.sse) if (config.arcPlugins?.events === false) fastify.log.warn("SSE plugin requires events plugin (arcPlugins.events). SSE disabled.");
|
|
450
450
|
else {
|
|
451
|
-
const { default: ssePlugin } = await import("./sse-
|
|
451
|
+
const { default: ssePlugin } = await import("./sse-DkqQ1uxb.mjs").then((n) => n.r);
|
|
452
452
|
const sseOpts = config.arcPlugins.sse === true ? {} : config.arcPlugins.sse;
|
|
453
453
|
await fastify.register(ssePlugin, sseOpts);
|
|
454
454
|
trackPlugin("arc-sse", sseOpts);
|
|
@@ -492,13 +492,13 @@ async function createApp(options) {
|
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
if (config.elevation) {
|
|
495
|
-
const { elevationPlugin } = await import("./elevation-
|
|
495
|
+
const { elevationPlugin } = await import("./elevation-DSTbVvYj.mjs").then((n) => n.r);
|
|
496
496
|
await fastify.register(elevationPlugin, config.elevation);
|
|
497
497
|
trackPlugin("arc-elevation", config.elevation);
|
|
498
498
|
fastify.log.debug("Elevation plugin enabled");
|
|
499
499
|
}
|
|
500
500
|
if (config.errorHandler !== false) {
|
|
501
|
-
const { errorHandlerPlugin } = await import("./errorHandler-
|
|
501
|
+
const { errorHandlerPlugin } = await import("./errorHandler-C3GY3_ow.mjs").then((n) => n.n);
|
|
502
502
|
const errorOpts = typeof config.errorHandler === "object" ? config.errorHandler : { includeStack: config.preset !== "production" };
|
|
503
503
|
await fastify.register(errorHandlerPlugin, errorOpts);
|
|
504
504
|
trackPlugin("arc-error-handler", errorOpts);
|
|
@@ -556,5 +556,4 @@ const ArcFactory = {
|
|
|
556
556
|
};
|
|
557
557
|
|
|
558
558
|
//#endregion
|
|
559
|
-
export { getPreset as a, developmentPreset as i, createApp as n, productionPreset as o, createApp_exports as r, testingPreset as s, ArcFactory as t };
|
|
560
|
-
//# sourceMappingURL=createApp-CUgNqegw.mjs.map
|
|
559
|
+
export { getPreset as a, developmentPreset as i, createApp as n, productionPreset as o, createApp_exports as r, testingPreset as s, ArcFactory as t };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { a as DEFAULT_SORT, d as MAX_REGEX_LENGTH, h as SYSTEM_FIELDS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS } from "./constants-DdXFXQtN.mjs";
|
|
2
2
|
import { c as isElevated, l as isMember, n as PUBLIC_SCOPE, r as getOrgId } from "./types-Beqn1Un7.mjs";
|
|
3
3
|
import { getUserId } from "./types/index.mjs";
|
|
4
|
-
import { i as resolveEffectiveRoles, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "./fields-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { t as
|
|
4
|
+
import { i as resolveEffectiveRoles, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "./fields-CTd_CrKr.mjs";
|
|
5
|
+
import { t as getUserRoles } from "./types-DelU6kln.mjs";
|
|
6
|
+
import { C as ArcQueryParser, u as getDefaultCrudSchemas } from "./circuitBreaker-DYhWBW_D.mjs";
|
|
7
|
+
import { t as buildQueryKey } from "./keys-DhqDRxv3.mjs";
|
|
8
|
+
import { r as ForbiddenError } from "./errors-DBANPbGr.mjs";
|
|
9
|
+
import { t as hasEvents } from "./typeGuards-DwxA1t_L.mjs";
|
|
10
|
+
import { n as convertRouteSchema, t as convertOpenApiSchemas } from "./schemaConverter-Dtg0Kt9T.mjs";
|
|
11
|
+
import { t as requestContext } from "./requestContext-xi6OKBL-.mjs";
|
|
11
12
|
import { applyPresets, getAvailablePresets } from "./presets/index.mjs";
|
|
12
13
|
|
|
13
14
|
//#region src/core/AccessControl.ts
|
|
@@ -230,7 +231,7 @@ var BodySanitizer = class {
|
|
|
230
231
|
if (!isElevated(scope)) {
|
|
231
232
|
const fieldPerms = arcContext?.arc?.fields;
|
|
232
233
|
if (fieldPerms) {
|
|
233
|
-
const effectiveRoles = resolveEffectiveRoles(req.user
|
|
234
|
+
const effectiveRoles = resolveEffectiveRoles(getUserRoles(req.user), isMember(scope) ? scope.orgRoles : []);
|
|
234
235
|
sanitized = applyFieldWritePermissions(sanitized, fieldPerms, effectiveRoles);
|
|
235
236
|
}
|
|
236
237
|
}
|
|
@@ -1003,7 +1004,7 @@ function sendControllerResponse(reply, response, request) {
|
|
|
1003
1004
|
const arcMeta = reqWithExtras?.arc;
|
|
1004
1005
|
const scope = reqWithExtras?.scope ?? PUBLIC_SCOPE;
|
|
1005
1006
|
const fieldPerms = isElevated(scope) ? void 0 : arcMeta?.fields;
|
|
1006
|
-
const effectiveRoles = fieldPerms ? resolveEffectiveRoles((reqWithExtras?.user)
|
|
1007
|
+
const effectiveRoles = fieldPerms ? resolveEffectiveRoles(getUserRoles(reqWithExtras?.user), isMember(scope) ? scope.orgRoles : []) : [];
|
|
1007
1008
|
const fieldCaps = fieldPerms ? computeFieldCapabilities(fieldPerms, effectiveRoles) : void 0;
|
|
1008
1009
|
const hasFieldRestrictions = !!(fieldMaskConfig || fieldPerms);
|
|
1009
1010
|
/** Apply both field mask and field-level permissions to a data item */
|
|
@@ -2193,5 +2194,4 @@ function capitalize(str) {
|
|
|
2193
2194
|
}
|
|
2194
2195
|
|
|
2195
2196
|
//#endregion
|
|
2196
|
-
export { QueryResolver as _, validateResourceConfig as a, createPermissionMiddleware as c, createFastifyHandler as d, createRequestContext as f, BaseController as g, sendControllerResponse as h, formatValidationErrors as i, pipe as l, getControllerScope as m, defineResource as n, createActionRouter as o, getControllerContext as p, assertValidConfig as r, createCrudRouter as s, ResourceDefinition as t, createCrudHandlers as u, BodySanitizer as v, AccessControl as y };
|
|
2197
|
-
//# sourceMappingURL=defineResource-k0_BDn8v.mjs.map
|
|
2197
|
+
export { QueryResolver as _, validateResourceConfig as a, createPermissionMiddleware as c, createFastifyHandler as d, createRequestContext as f, BaseController as g, sendControllerResponse as h, formatValidationErrors as i, pipe as l, getControllerScope as m, defineResource as n, createActionRouter as o, getControllerContext as p, assertValidConfig as r, createCrudRouter as s, ResourceDefinition as t, createCrudHandlers as u, BodySanitizer as v, AccessControl as y };
|
|
@@ -43,5 +43,4 @@ declare function discoverResources(options: DiscoveryOptions): Promise<Array<{
|
|
|
43
43
|
/** Auto-discovery plugin for Arc resources */
|
|
44
44
|
declare const discoveryPlugin: FastifyPluginAsync<DiscoveryPluginOptions>;
|
|
45
45
|
//#endregion
|
|
46
|
-
export { DiscoverableResource, DiscoveryOptions, DiscoveryPluginOptions, discoveryPlugin as default, discoveryPlugin, discoverResources };
|
|
47
|
-
//# sourceMappingURL=index.d.mts.map
|
|
46
|
+
export { DiscoverableResource, DiscoveryOptions, DiscoveryPluginOptions, discoveryPlugin as default, discoveryPlugin, discoverResources };
|
package/dist/discovery/index.mjs
CHANGED
|
@@ -106,5 +106,4 @@ const discoveryPluginImpl = async (fastify, options) => {
|
|
|
106
106
|
const discoveryPlugin = discoveryPluginImpl;
|
|
107
107
|
|
|
108
108
|
//#endregion
|
|
109
|
-
export { discoveryPlugin as default, discoveryPlugin, discoverResources };
|
|
110
|
-
//# sourceMappingURL=index.mjs.map
|
|
109
|
+
export { discoveryPlugin as default, discoveryPlugin, discoverResources };
|