@mondart/nestjs-common-module 2.0.0 → 2.1.1

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.
@@ -0,0 +1,35 @@
1
+ name: Unpublish
2
+
3
+ on:
4
+ release:
5
+ types: [deleted]
6
+
7
+ jobs:
8
+ unpublish-package:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - name: Check out the repository
13
+ uses: actions/checkout@v3
14
+
15
+ - name: Set up Node.js
16
+ uses: actions/setup-node@v3
17
+ with:
18
+ node-version: '16'
19
+
20
+ - name: Set NPM Token
21
+ run: npm config set _authToken=${{ secrets.NPM_TOKEN }}
22
+ env:
23
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24
+
25
+ - name: Extract package name and version
26
+ id: extract-package-info
27
+ run: |
28
+ # Replace this logic with your specific way of determining the package name and version
29
+ echo "PACKAGE_NAME=@mondart/nestjs-common-module" >> $GITHUB_ENV
30
+ echo "PACKAGE_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
31
+
32
+ - name: Unpublish the package
33
+ env:
34
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
35
+ run: npm unpublish $PACKAGE_NAME@$PACKAGE_VERSION --force
@@ -1,9 +1,8 @@
1
1
  import { PaginateConfig } from 'nestjs-paginate/lib/paginate';
2
- import { CoreCrudService } from './core-crud.service';
3
- import { CoreBaseServiceOption, CoreFindAllWithPaginationServiceOption, CoreFindOneByIdServiceOption, CoreUpdateServiceOption } from './crud-service-options.interface';
4
- import { BaseModelEntity } from '../../entities';
5
- import { BaseResponse, IdDto, SuccessResponse } from '../../dto';
6
- import { PaginationQueryCustom } from '../../interfaces';
2
+ import { BaseModelEntity } from '../../../entities';
3
+ import { BaseResponse, IdDto, SuccessResponse } from '../../../dto';
4
+ import { CoreBaseServiceOption, CoreCrudService, CoreFindAllWithPaginationServiceOption, CoreFindOneByIdServiceOption, CoreUpdateServiceOption } from '../index';
5
+ import { PaginationQueryCustom } from '../../../interfaces';
7
6
  export declare class CoreCrudController<T extends BaseModelEntity, CreateDto, UpdateDto, ResponseDto extends BaseResponse> {
8
7
  protected readonly coreService: CoreCrudService<T, CreateDto, UpdateDto>;
9
8
  protected readonly responseDto: {
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CoreCrudController = void 0;
4
4
  const common_1 = require("@nestjs/common");
5
- const dto_1 = require("../../dto");
6
- const enums_1 = require("../../enums");
5
+ const dto_1 = require("../../../dto");
6
+ const enums_1 = require("../../../enums");
7
7
  class CoreCrudController {
8
8
  constructor(coreService, responseDto) {
9
9
  this.coreService = coreService;
@@ -1,3 +1,3 @@
1
- export * from './core-crud.controller';
2
- export * from './core-crud.service';
3
- export * from './crud-service-options.interface';
1
+ export * from './services/core-crud.service';
2
+ export * from './interfaces/crud-service-option.interface';
3
+ export * from './controllers/core-crud.controller';
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./core-crud.controller"), exports);
18
- __exportStar(require("./core-crud.service"), exports);
19
- __exportStar(require("./crud-service-options.interface"), exports);
17
+ __exportStar(require("./services/core-crud.service"), exports);
18
+ __exportStar(require("./interfaces/crud-service-option.interface"), exports);
19
+ __exportStar(require("./controllers/core-crud.controller"), exports);
@@ -6,7 +6,7 @@ export interface CoreFindOneServiceOption extends CoreBaseServiceOption {
6
6
  }
7
7
  export interface CoreFindOneByIdServiceOption<T> extends CoreBaseServiceOption {
8
8
  enableFirstLevelRelation?: boolean;
9
- relations?: FindOptionsRelations<T>;
9
+ relations?: FindOptionsRelations<T> | string[];
10
10
  existsCheck?: boolean;
11
11
  }
12
12
  export interface CoreFindAllServiceOption extends CoreBaseServiceOption {
@@ -15,11 +15,11 @@ export interface CoreFindAllServiceOption extends CoreBaseServiceOption {
15
15
  }
16
16
  export interface CoreFindAllWithPaginationServiceOption<T> {
17
17
  selectQueryBuilder?: SelectQueryBuilder<T>;
18
- relations?: FindOptionsRelations<T>;
18
+ relations?: FindOptionsRelations<T> | string[];
19
19
  enableFirstLevelRelation?: boolean;
20
20
  }
21
21
  export interface CoreUpdateServiceOption<T> extends CoreBaseServiceOption {
22
- relations?: FindOptionsRelations<T>;
22
+ relations?: FindOptionsRelations<T> | string[];
23
23
  enableFirstLevelRelation?: boolean;
24
24
  }
25
25
  export interface CoreBaseServiceOption {
@@ -1,12 +1,12 @@
1
1
  import { DeepPartial, DeleteResult, FindManyOptions, FindOptionsWhere, Repository, UpdateResult } from 'typeorm';
2
+ import { BaseModelEntity } from '../../../entities';
2
3
  import { QueryDeepPartialEntity } from 'typeorm/query-builder/QueryPartialEntity';
3
4
  import { Paginated } from 'nestjs-paginate';
4
5
  import { PaginateConfig } from 'nestjs-paginate/lib/paginate';
5
6
  import { InsertResult } from 'typeorm/query-builder/result/InsertResult';
6
7
  import { UpsertOptions } from 'typeorm/repository/UpsertOptions';
7
- import { CoreBaseServiceOption, CoreFindAllServiceOption, CoreFindAllWithPaginationServiceOption, CoreFindOneByIdServiceOption, CoreFindOneServiceOption, CoreUpdateServiceOption } from './crud-service-options.interface';
8
- import { BaseModelEntity } from '../../entities';
9
- import { PaginationQueryCustom } from '../../interfaces';
8
+ import { CoreBaseServiceOption, CoreFindAllServiceOption, CoreFindAllWithPaginationServiceOption, CoreFindOneByIdServiceOption, CoreFindOneServiceOption, CoreUpdateServiceOption } from '../interfaces/crud-service-option.interface';
9
+ import { PaginationQueryCustom } from '../../../interfaces';
10
10
  export declare abstract class CoreCrudService<T extends BaseModelEntity, CreateDto, UpdateDto> {
11
11
  protected readonly repository: Repository<T>;
12
12
  private readonly relationsPath;
@@ -4,8 +4,8 @@ exports.CoreCrudService = void 0;
4
4
  const typeorm_1 = require("typeorm");
5
5
  const common_1 = require("@nestjs/common");
6
6
  const nestjs_paginate_1 = require("nestjs-paginate");
7
- const helpers_1 = require("../../helpers");
8
- const enums_1 = require("../../enums");
7
+ const enums_1 = require("../../../enums");
8
+ const helpers_1 = require("../../../helpers");
9
9
  class CoreCrudService {
10
10
  constructor(repository) {
11
11
  this.repository = repository;