@opra/nestjs 1.0.0-alpha.37 → 1.0.0-alpha.39

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.
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OpraNestAdapter = void 0;
4
4
  const tslib_1 = require("tslib");
5
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
5
6
  const common_1 = require("@nestjs/common");
6
7
  const constants_js_1 = require("@nestjs/common/constants.js");
7
8
  const common_2 = require("@opra/common");
8
9
  const core_1 = require("@opra/core");
9
- const path_1 = tslib_1.__importDefault(require("path"));
10
10
  const ts_gems_1 = require("ts-gems");
11
11
  const public_decorator_js_1 = require("./decorators/public.decorator.js");
12
12
  class OpraNestAdapter extends core_1.HttpAdapter {
@@ -67,7 +67,7 @@ class OpraNestAdapter extends core_1.HttpAdapter {
67
67
  /** Copy metadata keys from source class to new one */
68
68
  let metadataKeys;
69
69
  OpraNestAdapter.copyDecoratorMetadataToChild(newClass, parentTree);
70
- const newPath = metadata.path ? path_1.default.join(currentPath, metadata.path) : currentPath;
70
+ const newPath = metadata.path ? node_path_1.default.join(currentPath, metadata.path) : currentPath;
71
71
  const adapter = this;
72
72
  // adapter.logger =
73
73
  /** Disable default error handler. Errors will be handled by OpraExceptionFilter */
@@ -116,7 +116,7 @@ class OpraNestAdapter extends core_1.HttpAdapter {
116
116
  (0, common_1.Req)()(newClass.prototype, k, 0);
117
117
  (0, common_1.Res)()(newClass.prototype, k, 1);
118
118
  const descriptor = Object.getOwnPropertyDescriptor(newClass.prototype, k);
119
- const operationPath = v.mergePath ? newPath + (v.path || '') : path_1.default.posix.join(newPath, v.path || '');
119
+ const operationPath = v.mergePath ? newPath + (v.path || '') : node_path_1.default.posix.join(newPath, v.path || '');
120
120
  switch (v.method || 'GET') {
121
121
  case 'DELETE':
122
122
  /** Call @Delete decorator over new property */
@@ -1,9 +1,9 @@
1
1
  import { __decorate, __metadata, __param } from "tslib";
2
- import { Controller, Delete, Get, Head, Next, Options, Patch, Post, Put, Req, Res, Search } from '@nestjs/common';
2
+ import nodePath from 'node:path';
3
+ import { Controller, Delete, Get, Head, Next, Options, Patch, Post, Put, Req, Res, Search, } from '@nestjs/common';
3
4
  import { EXCEPTION_FILTERS_METADATA, GUARDS_METADATA, INTERCEPTORS_METADATA } from '@nestjs/common/constants.js';
4
5
  import { ApiDocument, HTTP_CONTROLLER_METADATA, HttpApi, isConstructor, NotFoundError, } from '@opra/common';
5
6
  import { HttpAdapter } from '@opra/core';
6
- import nodePath from 'path';
7
7
  import { asMutable } from 'ts-gems';
8
8
  import { Public } from './decorators/public.decorator.js';
9
9
  export class OpraNestAdapter extends HttpAdapter {
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@opra/nestjs",
3
- "version": "1.0.0-alpha.37",
3
+ "version": "1.0.0-alpha.39",
4
4
  "description": "Opra NestJS module",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
7
7
  "dependencies": {
8
- "@opra/common": "^1.0.0-alpha.37",
9
- "@opra/core": "^1.0.0-alpha.37",
8
+ "@opra/common": "^1.0.0-alpha.39",
9
+ "@opra/core": "^1.0.0-alpha.39",
10
10
  "fast-tokenizer": "^1.7.0",
11
11
  "lodash.head": "^4.0.1",
12
12
  "putil-promisify": "^1.10.1",
13
13
  "reflect-metadata": "^0.2.2",
14
- "tslib": "^2.6.3"
14
+ "tslib": "^2.7.0"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@nestjs/common": "^10.4.1",
@@ -1,4 +1,4 @@
1
- import { DynamicModule, MiddlewareConsumer, NestModule, OnModuleDestroy } from '@nestjs/common';
1
+ import { type DynamicModule, type MiddlewareConsumer, type NestModule, type OnModuleDestroy } from '@nestjs/common';
2
2
  import type { OpraHttpModule } from './opra-http.module.js';
3
3
  import { OpraNestAdapter } from './opra-nestjs-adapter.js';
4
4
  export declare class OpraHttpCoreModule implements OnModuleDestroy, NestModule {
@@ -1,4 +1,4 @@
1
- import { DynamicModule, Type } from '@nestjs/common';
1
+ import { type DynamicModule, type Type } from '@nestjs/common';
2
2
  import { ApiDocumentFactory } from '@opra/common';
3
3
  import { HttpAdapter } from '@opra/core';
4
4
  export declare namespace OpraHttpModule {
@@ -1,4 +1,4 @@
1
- import { Type } from '@nestjs/common';
1
+ import { type Type } from '@nestjs/common';
2
2
  import { HttpAdapter } from '@opra/core';
3
3
  import type { OpraHttpModule } from './opra-http.module.js';
4
4
  export declare class OpraNestAdapter extends HttpAdapter {
@@ -1,4 +1,4 @@
1
- import { ArgumentsHost } from '@nestjs/common';
1
+ import { type ArgumentsHost } from '@nestjs/common';
2
2
  import { BaseExceptionFilter, ModuleRef } from '@nestjs/core';
3
3
  export declare class OpraExceptionFilter extends BaseExceptionFilter {
4
4
  private moduleRef;
@@ -1,4 +1,4 @@
1
- import { NestMiddleware } from '@nestjs/common';
1
+ import { type NestMiddleware } from '@nestjs/common';
2
2
  import type { NextFunction, Request, Response } from 'express';
3
3
  import type { OpraHttpModule } from '../opra-http.module.js';
4
4
  import { OpraNestAdapter } from '../opra-nestjs-adapter.js';