@opra/nestjs 1.2.1 → 1.2.3

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.
@@ -3,6 +3,7 @@ var OpraHttpCoreModule_1;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.OpraHttpCoreModule = void 0;
5
5
  const tslib_1 = require("tslib");
6
+ const objects_1 = require("@jsopen/objects");
6
7
  const common_1 = require("@nestjs/common");
7
8
  const core_1 = require("@nestjs/core");
8
9
  const common_2 = require("@opra/common");
@@ -70,7 +71,7 @@ let OpraHttpCoreModule = OpraHttpCoreModule_1 = class OpraHttpCoreModule {
70
71
  });
71
72
  if (moduleOptions.interceptors) {
72
73
  opraNestAdapter.interceptors = moduleOptions.interceptors.map(x => {
73
- if ((0, common_2.isConstructor)(x)) {
74
+ if ((0, objects_1.isConstructor)(x)) {
74
75
  return async (ctx, next) => {
75
76
  const interceptor = moduleRef.get(x);
76
77
  if (typeof interceptor.intercept === 'function')
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OpraHttpNestjsAdapter = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const node_path_1 = tslib_1.__importDefault(require("node:path"));
6
+ const objects_1 = require("@jsopen/objects");
6
7
  const common_1 = require("@nestjs/common");
7
8
  const constants_js_1 = require("@nestjs/common/constants.js");
8
9
  const common_2 = require("@opra/common");
@@ -149,7 +150,7 @@ class OpraHttpNestjsAdapter extends http_1.HttpAdapter {
149
150
  }
150
151
  if (metadata.controllers) {
151
152
  for (const child of metadata.controllers) {
152
- if (!(0, common_2.isConstructor)(child))
153
+ if (!(0, objects_1.isConstructor)(child))
153
154
  throw new TypeError('Controllers should be injectable a class');
154
155
  this._addToNestControllers(child, newPath, [...parentTree, sourceClass]);
155
156
  }
@@ -3,9 +3,9 @@ var OpraKafkaCoreModule_1;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.OpraKafkaCoreModule = void 0;
5
5
  const tslib_1 = require("tslib");
6
+ const objects_1 = require("@jsopen/objects");
6
7
  const common_1 = require("@nestjs/common");
7
8
  const core_1 = require("@nestjs/core");
8
- const common_2 = require("@opra/common");
9
9
  const kafka_1 = require("@opra/kafka");
10
10
  const constants_js_1 = require("../constants.js");
11
11
  const initialize_adapter_js_1 = require("./helpers/initialize-adapter.js");
@@ -58,7 +58,7 @@ let OpraKafkaCoreModule = OpraKafkaCoreModule_1 = class OpraKafkaCoreModule {
58
58
  useFactory: async (moduleRef, config) => {
59
59
  const interceptors = moduleOptions.interceptors
60
60
  ? moduleOptions.interceptors.map(x => {
61
- if ((0, common_2.isConstructor)(x)) {
61
+ if ((0, objects_1.isConstructor)(x)) {
62
62
  return async (ctx, next) => {
63
63
  const interceptor = moduleRef.get(x);
64
64
  if (typeof interceptor.intercept === 'function')
@@ -1,8 +1,9 @@
1
1
  var OpraHttpCoreModule_1;
2
2
  import { __decorate, __metadata } from "tslib";
3
+ import { isConstructor } from '@jsopen/objects';
3
4
  import { Global, Logger, Module, RequestMethod, } from '@nestjs/common';
4
5
  import { APP_FILTER, ModuleRef } from '@nestjs/core';
5
- import { ApiDocumentFactory, isConstructor } from '@opra/common';
6
+ import { ApiDocumentFactory } from '@opra/common';
6
7
  import { OPRA_HTTP_API_CONFIG } from '../constants.js';
7
8
  import { OpraHttpNestjsAdapter } from './opra-http-nestjs-adapter.js';
8
9
  import { OpraExceptionFilter } from './services/opra-exception-filter.js';
@@ -1,8 +1,9 @@
1
1
  import { __decorate, __metadata, __param } from "tslib";
2
2
  import nodePath from 'node:path';
3
+ import { isConstructor } from '@jsopen/objects';
3
4
  import { Controller, Delete, Get, Head, Next, Options, Patch, Post, Put, Req, Res, Search, } from '@nestjs/common';
4
5
  import { EXCEPTION_FILTERS_METADATA, GUARDS_METADATA, INTERCEPTORS_METADATA } from '@nestjs/common/constants.js';
5
- import { HTTP_CONTROLLER_METADATA, isConstructor, NotFoundError } from '@opra/common';
6
+ import { HTTP_CONTROLLER_METADATA, NotFoundError } from '@opra/common';
6
7
  import { HttpAdapter } from '@opra/http';
7
8
  import { asMutable } from 'ts-gems';
8
9
  import { Public } from '../decorators/public.decorator.js';
@@ -1,8 +1,8 @@
1
1
  var OpraKafkaCoreModule_1;
2
2
  import { __decorate, __metadata, __param } from "tslib";
3
+ import { isConstructor } from '@jsopen/objects';
3
4
  import { Global, Inject, Logger, Module, } from '@nestjs/common';
4
5
  import { ModuleRef } from '@nestjs/core';
5
- import { isConstructor } from '@opra/common';
6
6
  import { KafkaAdapter } from '@opra/kafka';
7
7
  import { OPRA_KAFKA_MODULE_CONFIG } from '../constants.js';
8
8
  import { initializeAdapter } from './helpers/initialize-adapter.js';
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@opra/nestjs",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "Opra NestJS module",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
7
7
  "dependencies": {
8
- "@opra/common": "^1.2.1",
9
- "@opra/core": "^1.2.1",
8
+ "@jsopen/objects": "^1.5.0",
9
+ "@opra/common": "^1.2.3",
10
+ "@opra/core": "^1.2.3",
10
11
  "fast-tokenizer": "^1.7.0",
11
12
  "lodash.head": "^4.0.1",
12
13
  "putil-promisify": "^1.10.1",
@@ -14,13 +15,13 @@
14
15
  "tslib": "^2.8.1"
15
16
  },
16
17
  "peerDependencies": {
17
- "@nestjs/common": "^10.4.8",
18
- "@nestjs/core": "^10.4.8"
18
+ "@nestjs/common": "^10.4.9",
19
+ "@nestjs/core": "^10.4.9"
19
20
  },
20
21
  "optionalDependencies": {
21
- "@nestjs/microservices": "^10.4.8",
22
- "@opra/http": "^1.2.1",
23
- "@opra/kafka": "^1.2.1"
22
+ "@nestjs/microservices": "^10.4.9",
23
+ "@opra/http": "^1.2.3",
24
+ "@opra/kafka": "^1.2.3"
24
25
  },
25
26
  "type": "module",
26
27
  "exports": {