@darraghor/nest-backend-libs 1.35.0 → 1.37.0

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.
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
  rm -rf $1/src
3
3
  rm -rf $1/dist
4
- npx @openapitools/openapi-generator-cli generate -i ./open-api/swagger.json -g typescript-fetch -o $1 --additional-properties=typescriptThreePlus=true,withInterfaces=true,npmName=shared-api-client,supportsES6=true,modelPropertyNaming=original,enumPropertyNaming=original
4
+ npx @openapitools/openapi-generator-cli generate -i ./open-api/swagger.json -g typescript-fetch -o $1 --additional-properties=typescriptThreePlus=true,withInterfaces=true,npmName=$4,supportsES6=true,modelPropertyNaming=original,enumPropertyNaming=original
5
5
  cp ./node_modules/@darraghor/nest-backend-libs/dist/open-api-generation/api-client-templates/api-client-ts-config-template.json $1/tsconfig.json
6
6
  cp ./node_modules/@darraghor/nest-backend-libs/dist/open-api-generation/api-client-templates/package-json-template.json $1/package.json
7
7
  cd $1
@@ -1,4 +1,4 @@
1
- import { CoreLoggerService } from "..";
1
+ import CoreLoggerService from "../logger/CoreLoggerService";
2
2
  export declare class CliCommandService {
3
3
  private readonly logger;
4
4
  constructor(logger: CoreLoggerService);
@@ -13,18 +13,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.CliCommandService = void 0;
16
- const __1 = require("..");
17
16
  const common_1 = require("@nestjs/common");
18
17
  const child_process_1 = require("child_process");
19
18
  // eslint-disable-next-line unicorn/import-style
20
19
  const util_1 = __importDefault(require("util"));
20
+ const CoreLoggerService_1 = __importDefault(require("../logger/CoreLoggerService"));
21
21
  const execPromise = util_1.default.promisify(child_process_1.exec);
22
22
  let CliCommandService = class CliCommandService {
23
23
  constructor(logger) {
24
24
  this.logger = logger;
25
25
  }
26
26
  async execAsPromised(command, commandArguments, cwd, shell) {
27
- this.logger.warn(`Executing cli command ${command} in ${cwd}. Note: Do NOT allow user input for this function as inputs are not sanitised or checked and a hacker could take over your system.`);
27
+ this.logger.warn(`Executing cli command '${command}' in '${cwd}'`);
28
+ this.logger.warn("Note: Do NOT allow user input as parameters for 'execAsPromised' as inputs are not sanitised and a hacker could take over your system.");
28
29
  const result = await execPromise(`${command} ${commandArguments.join(" ")}`, {
29
30
  shell: shell || "/bin/bash",
30
31
  cwd,
@@ -34,7 +35,7 @@ let CliCommandService = class CliCommandService {
34
35
  };
35
36
  CliCommandService = __decorate([
36
37
  (0, common_1.Injectable)(),
37
- __metadata("design:paramtypes", [__1.CoreLoggerService])
38
+ __metadata("design:paramtypes", [CoreLoggerService_1.default])
38
39
  ], CliCommandService);
39
40
  exports.CliCommandService = CliCommandService;
40
41
  //# sourceMappingURL=CliCommandService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CliCommandService.js","sourceRoot":"","sources":["../../src/runningCommandLine/CliCommandService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0BAAqC;AACrC,2CAA0C;AAC1C,iDAAmC;AACnC,gDAAgD;AAChD,gDAAwB;AAExB,MAAM,WAAW,GAAG,cAAI,CAAC,SAAS,CAAC,oBAAI,CAAC,CAAC;AAGlC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC1B,YAA6B,MAAyB;QAAzB,WAAM,GAAN,MAAM,CAAmB;IAAG,CAAC;IACnD,KAAK,CAAC,cAAc,CACvB,OAAe,EACf,gBAA0B,EAC1B,GAAW,EACX,KAAc;QAEd,IAAI,CAAC,MAAM,CAAC,IAAI,CACZ,yBAAyB,OAAO,OAAO,GAAG,oIAAoI,CACjL,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,WAAW,CAC5B,GAAG,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAC1C;YACI,KAAK,EAAE,KAAK,IAAI,WAAW;YAC3B,GAAG;SACN,CACJ,CAAC;QAEF,OAAO,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;CACJ,CAAA;AArBY,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAE4B,qBAAiB;GAD7C,iBAAiB,CAqB7B;AArBY,8CAAiB"}
1
+ {"version":3,"file":"CliCommandService.js","sourceRoot":"","sources":["../../src/runningCommandLine/CliCommandService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA0C;AAC1C,iDAAmC;AACnC,gDAAgD;AAChD,gDAAwB;AACxB,oFAA4D;AAE5D,MAAM,WAAW,GAAG,cAAI,CAAC,SAAS,CAAC,oBAAI,CAAC,CAAC;AAGlC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC1B,YAA6B,MAAyB;QAAzB,WAAM,GAAN,MAAM,CAAmB;IAAG,CAAC;IACnD,KAAK,CAAC,cAAc,CACvB,OAAe,EACf,gBAA0B,EAC1B,GAAW,EACX,KAAc;QAEd,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,0BAA0B,OAAO,SAAS,GAAG,GAAG,CAAC,CAAC;QACnE,IAAI,CAAC,MAAM,CAAC,IAAI,CACZ,wIAAwI,CAC3I,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,WAAW,CAC5B,GAAG,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAC1C;YACI,KAAK,EAAE,KAAK,IAAI,WAAW;YAC3B,GAAG;SACN,CACJ,CAAC;QAEF,OAAO,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;CACJ,CAAA;AAtBY,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAE4B,2BAAiB;GAD7C,iBAAiB,CAsB7B;AAtBY,8CAAiB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darraghor/nest-backend-libs",
3
- "version": "1.35.0",
3
+ "version": "1.37.0",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Some helpers for personal projects in nestjs",
6
6
  "homepage": "https://github.com/darraghoriordan/nest-backend-libs",