@rxap/plugin-nestjs 19.1.3-dev.4 → 19.1.3-dev.6

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/CHANGELOG.md CHANGED
@@ -3,6 +3,19 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [19.1.3-dev.6](https://gitlab.com/rxap/packages/compare/@rxap/plugin-nestjs@19.1.3-dev.5...@rxap/plugin-nestjs@19.1.3-dev.6) (2024-08-15)
7
+
8
+ ### Bug Fixes
9
+
10
+ - print stack on bootstrap failure ([2c01ac5](https://gitlab.com/rxap/packages/commit/2c01ac5dbd8447246be240be752107dfbdd137f4))
11
+ - swagger server is stopped ([6b419e9](https://gitlab.com/rxap/packages/commit/6b419e9206b0d381f28b939d1d4d3a019dc651c4))
12
+
13
+ ## [19.1.3-dev.5](https://gitlab.com/rxap/packages/compare/@rxap/plugin-nestjs@19.1.3-dev.4...@rxap/plugin-nestjs@19.1.3-dev.5) (2024-08-15)
14
+
15
+ ### Bug Fixes
16
+
17
+ - use typed logger ([76a0fe1](https://gitlab.com/rxap/packages/commit/76a0fe1510c2866d3934a30d56d920bc265ce46d))
18
+
6
19
  ## [19.1.3-dev.4](https://gitlab.com/rxap/packages/compare/@rxap/plugin-nestjs@19.1.3-dev.3...@rxap/plugin-nestjs@19.1.3-dev.4) (2024-08-15)
7
20
 
8
21
  **Note:** Version bump only for package @rxap/plugin-nestjs
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "19.1.3-dev.4",
2
+ "version": "19.1.3-dev.6",
3
3
  "name": "@rxap/plugin-nestjs",
4
4
  "license": "GPL-3.0-or-later",
5
5
  "dependencies": {
@@ -54,6 +54,6 @@
54
54
  },
55
55
  "schematics": "./generators.json",
56
56
  "type": "commonjs",
57
- "gitHead": "6dffe27d523b5d32b75ed9931e95ad5c7310d74b",
57
+ "gitHead": "c222fa68fda329fe854f8dc348def4d787e63e9d",
58
58
  "main": "./src/index.js"
59
59
  }
@@ -1,3 +1,3 @@
1
1
  import { SourceFile } from 'ts-morph';
2
- export declare const MAIN_BOOTSTRAP_STATEMENT = "server.bootstrap().catch((e) => console.error('Server bootstrap failed: ' + e.message));";
2
+ export declare const MAIN_BOOTSTRAP_STATEMENT = "server.bootstrap().catch((e) => console.error('Server bootstrap failed: ' + e.message, e.stack));";
3
3
  export declare function assertMainStatements(sourceFile: SourceFile): void;
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.assertMainStatements = exports.MAIN_BOOTSTRAP_STATEMENT = void 0;
4
4
  const ts_morph_1 = require("@rxap/ts-morph");
5
5
  const MAIN_BOOTSTRAP_OPTIONS_STATEMENT = 'const bootstrapOptions: Partial<MonolithicBootstrapOptions> = {};';
6
- const MAIN_SERVER_STATEMENT = 'const server = new Monolithic<NestApplicationOptions, NestExpressApplication>(AppModule, environment, options, bootstrapOptions);';
7
- exports.MAIN_BOOTSTRAP_STATEMENT = 'server.bootstrap().catch((e) => console.error(\'Server bootstrap failed: \' + e.message));';
6
+ const MAIN_SERVER_STATEMENT = 'const server = new Monolithic<NestApplicationOptions, RxapLogger, NestExpressApplication>(AppModule, environment, options, bootstrapOptions);';
7
+ exports.MAIN_BOOTSTRAP_STATEMENT = 'server.bootstrap().catch((e) => console.error(\'Server bootstrap failed: \' + e.message, e.stack));';
8
8
  const MAIN_SETUP_HELMET_STATEMENT = 'server.after(SetupHelmet());';
9
9
  const MAIN_SETUP_COOKIE_STATEMENT = 'server.after(SetupCookieParser());';
10
10
  const MAIN_SETUP_CORS_STATEMENT = 'server.after(SetupCors());';
@@ -12,9 +12,9 @@ const MAIN_NEST_APP_OPTIONS_STATEMENT = 'const options: NestApplicationOptions =
12
12
  function assertMainStatements(sourceFile) {
13
13
  var _a;
14
14
  const statements = [];
15
- statements.push('const options: NestApplicationOptions = {');
16
- statements.push('const bootstrapOptions: Partial<MonolithicBootstrapOptions> = {');
17
- statements.push('const server = new Monolithic<NestApplicationOptions, RxapLogger, NestExpressApplication>(AppModule, environment, options, bootstrapOptions);');
15
+ statements.push(MAIN_NEST_APP_OPTIONS_STATEMENT.replace('};', ''));
16
+ statements.push(MAIN_BOOTSTRAP_OPTIONS_STATEMENT.replace('};', ''));
17
+ statements.push(MAIN_SERVER_STATEMENT);
18
18
  const existingStatements = (_a = sourceFile.getStatements().map(s => s.getText())) !== null && _a !== void 0 ? _a : [];
19
19
  for (const statement of statements) {
20
20
  if (!existingStatements.includes(statement)) {
@@ -1 +1 @@
1
- {"version":3,"file":"assert-main-statements.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/nestjs/src/generators/init-application/assert-main-statements.ts"],"names":[],"mappings":";;;AAAA,6CAA+C;AAG/C,MAAM,gCAAgC,GAAG,mEAAmE,CAAC;AAC7G,MAAM,qBAAqB,GAAG,mIAAmI,CAAC;AACrJ,QAAA,wBAAwB,GAAG,4FAA4F,CAAC;AACrI,MAAM,2BAA2B,GAAG,8BAA8B,CAAC;AACnE,MAAM,2BAA2B,GAAG,oCAAoC,CAAC;AACzE,MAAM,yBAAyB,GAAG,4BAA4B,CAAC;AAC/D,MAAM,+BAA+B,GAAG,6CAA6C,CAAC;AAEtF,SAAgB,oBAAoB,CAAC,UAAsB;;IACzD,MAAM,UAAU,GAAa,EAAE,CAAC;IAEhC,UAAU,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;IAC7D,UAAU,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;IACnF,UAAU,CAAC,IAAI,CACb,+IAA+I,CAAC,CAAC;IAEnJ,MAAM,kBAAkB,GAAG,MAAA,UAAU,CAAC,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,mCAAI,EAAE,CAAC;IAClF,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YAC5C,OAAO,CAAC,KAAK,CAAC,2CAA4C,SAAU,EAAE,CAAC,CAAC;YACxE,UAAU,CAAC,GAAG,CAAC;gBACb,UAAU,EAAE;oBACV,+BAA+B;oBAC/B,gCAAgC;oBAChC,qBAAqB;oBACrB,2BAA2B;oBAC3B,2BAA2B;oBAC3B,yBAAyB;oBACzB,gCAAwB;iBACzB;aACF,CAAC,CAAC;YACH,IAAA,wBAAa,EAAC,UAAU,EAAE;gBACxB;oBACE,eAAe,EAAE,gBAAgB;oBACjC,YAAY,EAAE,CAAE,wBAAwB,CAAE;iBAC3C;gBACD;oBACE,eAAe,EAAE,mBAAmB;oBACpC,YAAY,EAAE,CAAE,YAAY,CAAE;iBAC/B;gBACD;oBACE,eAAe,EAAE,0BAA0B;oBAC3C,YAAY,EAAE,CAAE,wBAAwB,CAAE;iBAC3C;gBACD;oBACE,eAAe,EAAE,mBAAmB;oBACpC,YAAY,EAAE;wBACZ,4BAA4B;wBAC5B,YAAY;wBACZ,aAAa;wBACb,mBAAmB;wBACnB,WAAW;qBACZ;iBACF;gBACD;oBACE,eAAe,EAAE,kBAAkB;oBACnC,YAAY,EAAE,CAAE,WAAW,CAAE;iBAC9B;gBACD;oBACE,eAAe,EAAE,4BAA4B;oBAC7C,YAAY,EAAE,CAAE,aAAa,CAAE;iBAChC;aACF,CAAC,CAAC;YACH,OAAO;QACT,CAAC;IACH,CAAC;AAGH,CAAC;AA5DD,oDA4DC"}
1
+ {"version":3,"file":"assert-main-statements.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/nestjs/src/generators/init-application/assert-main-statements.ts"],"names":[],"mappings":";;;AAAA,6CAA+C;AAG/C,MAAM,gCAAgC,GAAG,mEAAmE,CAAC;AAC7G,MAAM,qBAAqB,GAAG,+IAA+I,CAAC;AACjK,QAAA,wBAAwB,GAAG,qGAAqG,CAAC;AAC9I,MAAM,2BAA2B,GAAG,8BA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AC3C;gBACD;oBACE,eAAe,EAAE,mBAAmB;oBACpC,YAAY,EAAE;wBACZ,4BAA4B;wBAC5B,YAAY;wBACZ,aAAa;wBACb,mBAAmB;wBACnB,WAAW;qBACZ;iBACF;gBACD;oBACE,eAAe,EAAE,kBAAkB;oBACnC,YAAY,EAAE,CAAE,WAAW,CAAE;iBAC9B;gBACD;oBACE,eAAe,EAAE,4BAA4B;oBAC7C,YAAY,EAAE,CAAE,aAAa,CAAE;iBAChC;aACF,CAAC,CAAC;YACH,OAAO;QACT,CAAC;IACH,CAAC;AAGH,CAAC;AA3DD,oDA2DC"}
@@ -18,4 +18,7 @@ NestFactory
18
18
  return app.close();
19
19
  })
20
20
  .catch(e => console.error('failed to generate openapi: ' + e.message))
21
- .then(() => console.log('DONE'));
21
+ .then(() => {
22
+ console.log('DONE');
23
+ process.exit(0); // ensure the server is stopped
24
+ });