@steroidsjs/nest 1.0.9 → 1.0.13
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/infrastructure/commands/MigrateCommand.d.ts +1 -0
- package/infrastructure/commands/MigrateCommand.js +21 -0
- package/infrastructure/commands/MigrateCommand.js.map +1 -1
- package/infrastructure/commands/dbml/dbml2code.d.ts +1 -0
- package/infrastructure/commands/dbml/dbml2code.js +213 -0
- package/infrastructure/commands/dbml/dbml2code.js.map +1 -0
- package/infrastructure/commands/dbml/templates.d.ts +4 -0
- package/infrastructure/commands/dbml/templates.js +46 -0
- package/infrastructure/commands/dbml/templates.js.map +1 -0
- package/infrastructure/decorators/TableFromModel.d.ts +6 -0
- package/infrastructure/decorators/TableFromModel.js +20 -0
- package/infrastructure/decorators/TableFromModel.js.map +1 -0
- package/infrastructure/decorators/fields/PasswordField.js +1 -2
- package/infrastructure/decorators/fields/PasswordField.js.map +1 -1
- package/infrastructure/decorators/fields/index.d.ts +1 -1
- package/infrastructure/decorators/fields/index.js +3 -3
- package/infrastructure/repositories/CrudRepository.d.ts +2 -2
- package/infrastructure/repositories/CrudRepository.js.map +1 -1
- package/package.json +4 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/usecases/helpers/SearchHelper.d.ts +1 -1
- package/usecases/helpers/SearchHelper.js.map +1 -1
- package/usecases/interfaces/ICrudRepository.d.ts +6 -6
|
@@ -3,5 +3,5 @@ import { SelectQueryBuilder } from 'typeorm/query-builder/SelectQueryBuilder';
|
|
|
3
3
|
import { SearchInputDto } from '../../usecases/dtos/SearchInputDto';
|
|
4
4
|
import { SearchResultDto } from '../../usecases/dtos/SearchResultDto';
|
|
5
5
|
export declare class SearchHelper {
|
|
6
|
-
static search<
|
|
6
|
+
static search<TTable>(repository: Repository<any>, dto: SearchInputDto, prepareHandler?: (query: SelectQueryBuilder<TTable>) => void | null): Promise<SearchResultDto<TTable>>;
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchHelper.js","sourceRoot":"","sources":["../../../src/usecases/helpers/SearchHelper.ts"],"names":[],"mappings":";;;AAGA,yEAAoE;AAEpE,MAAa,YAAY;IACrB,MAAM,CAAC,KAAK,CAAC,MAAM,CACf,
|
|
1
|
+
{"version":3,"file":"SearchHelper.js","sourceRoot":"","sources":["../../../src/usecases/helpers/SearchHelper.ts"],"names":[],"mappings":";;;AAGA,yEAAoE;AAEpE,MAAa,YAAY;IACrB,MAAM,CAAC,KAAK,CAAC,MAAM,CACf,UAA2B,EAC3B,GAAmB,EACnB,iBAAqE,IAAI;QAEzE,MAAM,MAAM,GAAG,IAAI,iCAAe,EAAU,CAAC;QAG7C,GAAG,mBACC,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,EAAE,IACT,GAAG,CACT,CAAC;QAGF,MAAM,KAAK,GAAG,UAAU,CAAC,kBAAkB,EAAE,CAAC;QAG9C,MAAM,IAAI,GAAG,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;QACnF,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YACnB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;gBACrC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;gBACxE,OAAO,GAAG,CAAC;YACf,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;SACX;QAGD,IAAI,cAAc,EAAE;YAChB,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;SACpC;QAGD,KAAK;aACA,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,QAAQ,CAAC;aACrC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAGzB,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,KAAK,CAAC,eAAe,EAAE,CAAC;QACrD,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;QAErB,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AA5CD,oCA4CC"}
|
|
@@ -2,11 +2,11 @@ import { Repository } from 'typeorm';
|
|
|
2
2
|
import { SearchResultDto } from '../dtos/SearchResultDto';
|
|
3
3
|
import { SearchInputDto } from '../dtos/SearchInputDto';
|
|
4
4
|
import { ICondition } from '../../infrastructure/helpers/ConditionHelper';
|
|
5
|
-
export interface ICrudRepository<
|
|
6
|
-
dbRepository: Repository<
|
|
7
|
-
search: (dto: SearchInputDto) => Promise<SearchResultDto<
|
|
8
|
-
findOne: (condition: ICondition) => Promise<
|
|
9
|
-
create: (model:
|
|
10
|
-
update: (id: number, model:
|
|
5
|
+
export interface ICrudRepository<TModel> {
|
|
6
|
+
dbRepository: Repository<any>;
|
|
7
|
+
search: (dto: SearchInputDto) => Promise<SearchResultDto<TModel>>;
|
|
8
|
+
findOne: (condition: ICondition) => Promise<TModel>;
|
|
9
|
+
create: (model: TModel) => Promise<TModel>;
|
|
10
|
+
update: (id: number, model: TModel) => Promise<TModel>;
|
|
11
11
|
remove: (id: number) => Promise<void>;
|
|
12
12
|
}
|