@koalarx/nest 3.1.49 → 3.1.50

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.
@@ -12,12 +12,13 @@ interface RepositoryInitProps<TEntity extends EntityBase<TEntity>, TContext exte
12
12
  context: TContext;
13
13
  modelName: Type<TEntity>;
14
14
  transactionContext?: Type<TContext>;
15
+ deepLimit?: number;
15
16
  }
16
17
  export declare abstract class RepositoryBase<TEntity extends EntityBase<TEntity>, TContext extends PrismaTransactionalClient = PrismaTransactionalClient, TModelKey extends keyof TContext = keyof TContext> {
17
18
  protected _context: TContext;
18
19
  protected readonly _modelName: Type<TEntity>;
19
20
  protected readonly _includeFindMany?: RepositoryInclude<TEntity>;
20
- constructor({ context, modelName }: RepositoryInitProps<TEntity, TContext>);
21
+ constructor({ context, modelName, deepLimit, }: RepositoryInitProps<TEntity, TContext>);
21
22
  protected get entityInstance(): any;
22
23
  protected getIdPropName(entity?: TEntity): string | string[];
23
24
  protected getWhereByIdSchema(entity: TEntity, value: any): {};
@@ -14,12 +14,12 @@ class RepositoryBase {
14
14
  _context;
15
15
  _modelName;
16
16
  _includeFindMany;
17
- constructor({ context, modelName }) {
17
+ constructor({ context, modelName, deepLimit, }) {
18
18
  this._context = context;
19
19
  this._modelName = modelName;
20
20
  this._includeFindMany = (0, generate_prisma_include_schema_1.generateIncludeSchema)({
21
21
  forList: true,
22
- deepLimit: 2,
22
+ deepLimit: deepLimit ?? 2,
23
23
  entity: this._modelName,
24
24
  });
25
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koalarx/nest",
3
- "version": "3.1.49",
3
+ "version": "3.1.50",
4
4
  "description": "",
5
5
  "author": "Igor D. Rangel",
6
6
  "license": "MIT",