@opra/nestjs 1.0.0-alpha.26 → 1.0.0-alpha.27

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/cjs/constants.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IS_PUBLIC_KEY = void 0;
4
- exports.IS_PUBLIC_KEY = 'isPublic';
4
+ exports.IS_PUBLIC_KEY = 'opra:isPublic';
@@ -169,10 +169,15 @@ class OpraNestAdapter extends core_1.HttpAdapter {
169
169
  for (const parent of parentTree) {
170
170
  const metadataKeys = Reflect.getOwnMetadataKeys(parent);
171
171
  for (const key of metadataKeys) {
172
+ if (typeof key === 'string' && key.startsWith('opra:') && !Reflect.hasOwnMetadata(key, target)) {
173
+ const metadata = Reflect.getMetadata(key, parent);
174
+ Reflect.defineMetadata(key, metadata, target);
175
+ continue;
176
+ }
172
177
  if (key === constants_1.GUARDS_METADATA || key === constants_1.INTERCEPTORS_METADATA || key === constants_1.EXCEPTION_FILTERS_METADATA) {
173
178
  const m1 = Reflect.getMetadata(key, target) || [];
174
- const m2 = Reflect.getOwnMetadata(key, parent) || [];
175
179
  const metadata = [...m1];
180
+ const m2 = Reflect.getOwnMetadata(key, parent) || [];
176
181
  m2.forEach((t) => {
177
182
  if (!metadata.includes(t)) {
178
183
  metadata.push(t);
package/esm/constants.js CHANGED
@@ -1 +1 @@
1
- export const IS_PUBLIC_KEY = 'isPublic';
1
+ export const IS_PUBLIC_KEY = 'opra:isPublic';
@@ -166,10 +166,15 @@ export class OpraNestAdapter extends HttpAdapter {
166
166
  for (const parent of parentTree) {
167
167
  const metadataKeys = Reflect.getOwnMetadataKeys(parent);
168
168
  for (const key of metadataKeys) {
169
+ if (typeof key === 'string' && key.startsWith('opra:') && !Reflect.hasOwnMetadata(key, target)) {
170
+ const metadata = Reflect.getMetadata(key, parent);
171
+ Reflect.defineMetadata(key, metadata, target);
172
+ continue;
173
+ }
169
174
  if (key === GUARDS_METADATA || key === INTERCEPTORS_METADATA || key === EXCEPTION_FILTERS_METADATA) {
170
175
  const m1 = Reflect.getMetadata(key, target) || [];
171
- const m2 = Reflect.getOwnMetadata(key, parent) || [];
172
176
  const metadata = [...m1];
177
+ const m2 = Reflect.getOwnMetadata(key, parent) || [];
173
178
  m2.forEach((t) => {
174
179
  if (!metadata.includes(t)) {
175
180
  metadata.push(t);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opra/nestjs",
3
- "version": "1.0.0-alpha.26",
3
+ "version": "1.0.0-alpha.27",
4
4
  "description": "Opra NestJS module",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
@@ -27,8 +27,8 @@
27
27
  "clean:cover": "rimraf ../../coverage/client"
28
28
  },
29
29
  "dependencies": {
30
- "@opra/common": "^1.0.0-alpha.26",
31
- "@opra/core": "^1.0.0-alpha.26",
30
+ "@opra/common": "^1.0.0-alpha.27",
31
+ "@opra/core": "^1.0.0-alpha.27",
32
32
  "fast-tokenizer": "^1.3.0",
33
33
  "lodash.head": "^4.0.1",
34
34
  "reflect-metadata": "^0.2.2"
@@ -1 +1 @@
1
- export declare const IS_PUBLIC_KEY = "isPublic";
1
+ export declare const IS_PUBLIC_KEY = "opra:isPublic";