@classytic/arc 2.1.2 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/bin/arc.js +1 -0
- 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 +6 -2
- package/dist/cli/commands/generate.mjs +89 -58
- package/dist/cli/commands/init.d.mts +1 -2
- package/dist/cli/commands/init.mjs +15 -19
- 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-DZVbwsFb.mjs} +17 -39
- 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-sGkvUvf5.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-Ch8HU9uM.d.mts → interface-Cb2klgid.d.mts} +10 -10
- package/dist/{interface-CZe8IkMf.d.mts → interface-DTbsvIWe.d.mts} +1 -2
- 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-DJbMt3yf.mjs +1 -2
- package/dist/{prisma-Dg9GoVdj.d.mts → prisma-DQBSSHAB.d.mts} +2 -3
- 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 +7 -8
- 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
package/README.md
CHANGED
|
@@ -326,11 +326,12 @@ import { tracingPlugin } from '@classytic/arc/plugins/tracing';
|
|
|
326
326
|
## CLI
|
|
327
327
|
|
|
328
328
|
```bash
|
|
329
|
-
arc init my-api --mongokit --better-auth --ts # Scaffold project
|
|
330
|
-
arc generate resource product # Generate resource files
|
|
331
|
-
arc
|
|
332
|
-
arc
|
|
333
|
-
arc
|
|
329
|
+
npx @classytic/arc init my-api --mongokit --better-auth --ts # Scaffold project
|
|
330
|
+
npx @classytic/arc generate resource product # Generate resource files
|
|
331
|
+
npx @classytic/arc describe ./dist/index.js # Resource metadata (JSON)
|
|
332
|
+
npx @classytic/arc docs ./openapi.json --entry ./dist/index.js # Export OpenAPI
|
|
333
|
+
npx @classytic/arc introspect --entry ./dist/index.js # Show resources
|
|
334
|
+
npx @classytic/arc doctor # Health check
|
|
334
335
|
```
|
|
335
336
|
|
|
336
337
|
## Subpath Imports
|
package/bin/arc.js
CHANGED
|
@@ -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-Cb2klgid.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-DQBSSHAB.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-Cb2klgid.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-Cb2klgid.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-Cb2klgid.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 };
|
|
@@ -8,11 +8,15 @@
|
|
|
8
8
|
* - src/resources/product/product.resource.ts
|
|
9
9
|
* - src/resources/product/product.controller.ts
|
|
10
10
|
* - src/resources/product/product.schemas.ts
|
|
11
|
+
*
|
|
12
|
+
* Handles kebab-case names: `arc g r org-profile` generates:
|
|
13
|
+
* - Class names: OrgProfile, OrgProfileRepository
|
|
14
|
+
* - Variable names: orgProfileSchema, orgProfileRepository
|
|
15
|
+
* - File names: org-profile.model.ts, org-profile.repository.ts
|
|
11
16
|
*/
|
|
12
17
|
/**
|
|
13
18
|
* Generate command handler
|
|
14
19
|
*/
|
|
15
20
|
declare function generate(type: string | undefined, args: string[]): Promise<void>;
|
|
16
21
|
//#endregion
|
|
17
|
-
export { generate as default, generate };
|
|
18
|
-
//# sourceMappingURL=generate.d.mts.map
|
|
22
|
+
export { generate as default, generate };
|