@opra/nestjs 0.0.13 → 0.1.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.
@@ -9,7 +9,6 @@ const external_context_creator_1 = require("@nestjs/core/helpers/external-contex
9
9
  const injector_1 = require("@nestjs/core/injector/injector");
10
10
  const internal_core_module_1 = require("@nestjs/core/injector/internal-core-module");
11
11
  const request_constants_1 = require("@nestjs/core/router/request/request-constants");
12
- const core_2 = require("@opra/core");
13
12
  const schema_1 = require("@opra/schema");
14
13
  const constants_js_1 = require("../constants.js");
15
14
  const handler_paramtype_enum_js_1 = require("../enums/handler-paramtype.enum.js");
@@ -37,7 +36,7 @@ let ServiceFactory = class ServiceFactory {
37
36
  const wrappers = this.explorerService.exploreResourceWrappers(rootModule);
38
37
  for (const wrapper of wrappers) {
39
38
  const instance = wrapper.instance;
40
- const resourceDef = Reflect.getMetadata(core_2.RESOURCE_METADATA, instance.constructor);
39
+ const resourceDef = Reflect.getMetadata(schema_1.RESOURCE_METADATA, instance.constructor);
41
40
  /* istanbul ignore next */
42
41
  if (!resourceDef)
43
42
  continue;
@@ -109,7 +108,7 @@ let ServiceFactory = class ServiceFactory {
109
108
  });
110
109
  }
111
110
  }
112
- return await core_2.OpraService.create(serviceArgs);
111
+ return await schema_1.OpraService.create(serviceArgs);
113
112
  }
114
113
  _createContextCallback(instance, prototype, wrapper, moduleRef, methodName, isRequestScoped, transform = lodash_1.default.identity, contextType, forPre) {
115
114
  const paramsFactory = this.paramsFactory;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NestExplorer = void 0;
4
- const core_1 = require("@opra/core");
4
+ const schema_1 = require("@opra/schema");
5
5
  class NestExplorer {
6
6
  exploreProviders(rootModule, predicate) {
7
7
  const modules = new Set();
@@ -28,7 +28,7 @@ class NestExplorer {
28
28
  return !!(wrapper.instance
29
29
  && typeof wrapper.instance === 'object'
30
30
  && wrapper.instance.constructor
31
- && Reflect.hasMetadata(core_1.RESOURCE_METADATA, wrapper.instance.constructor));
31
+ && Reflect.hasMetadata(schema_1.RESOURCE_METADATA, wrapper.instance.constructor));
32
32
  });
33
33
  }
34
34
  }
@@ -1,6 +1,6 @@
1
1
  import { ContextType } from '@nestjs/common';
2
2
  import { Module } from '@nestjs/core/injector/module.js';
3
- import { OpraService } from '@opra/core';
3
+ import { OpraService } from '@opra/schema';
4
4
  import { OpraModuleOptions } from '../interfaces/opra-module-options.interface.js';
5
5
  export declare class ServiceFactory {
6
6
  private readonly paramsFactory;
@@ -6,8 +6,7 @@ import { ExternalContextCreator } from '@nestjs/core/helpers/external-context-cr
6
6
  import { Injector } from '@nestjs/core/injector/injector';
7
7
  import { InternalCoreModule } from '@nestjs/core/injector/internal-core-module';
8
8
  import { REQUEST_CONTEXT_ID } from '@nestjs/core/router/request/request-constants';
9
- import { OpraService, RESOURCE_METADATA } from '@opra/core';
10
- import { OpraSchema } from '@opra/schema';
9
+ import { OpraSchema, OpraService, RESOURCE_METADATA } from '@opra/schema';
11
10
  import { PARAM_ARGS_METADATA } from '../constants.js';
12
11
  import { HandlerParamType } from '../enums/handler-paramtype.enum.js';
13
12
  import { NestExplorer } from '../services/nest-explorer.js';
@@ -1,4 +1,4 @@
1
- import { RESOURCE_METADATA } from '@opra/core';
1
+ import { RESOURCE_METADATA } from '@opra/schema';
2
2
  export class NestExplorer {
3
3
  exploreProviders(rootModule, predicate) {
4
4
  const modules = new Set();
@@ -1,6 +1,7 @@
1
1
  import { ApplicationConfig, HttpAdapterHost } from '@nestjs/core';
2
2
  import { Module } from '@nestjs/core/injector/module.js';
3
- import { OpraExpressAdapter, OpraService } from '@opra/core';
3
+ import { OpraExpressAdapter } from '@opra/core';
4
+ import { OpraService } from '@opra/schema';
4
5
  import { ServiceFactory } from '../factories/service.factory.js';
5
6
  import { OpraModuleOptions } from '../interfaces/opra-module-options.interface.js';
6
7
  export declare class OpraServiceLoader {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opra/nestjs",
3
- "version": "0.0.13",
3
+ "version": "0.1.0",
4
4
  "description": "Opra NestJS module",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
@@ -25,10 +25,10 @@
25
25
  "clean:cover": "rimraf ../../coverage/nestjs"
26
26
  },
27
27
  "dependencies": {
28
- "@opra/core": "^0.0.13",
29
- "@opra/i18n": "^0.0.13",
30
- "@opra/schema": "^0.0.13",
31
- "@opra/url": "^0.0.13",
28
+ "@opra/core": "^0.1.0",
29
+ "@opra/i18n": "^0.1.0",
30
+ "@opra/schema": "^0.1.0",
31
+ "@opra/url": "^0.1.0",
32
32
  "fast-tokenizer": "^1.1.0",
33
33
  "lodash": "^4.17.21",
34
34
  "reflect-metadata": "^0.1.13"