@citec-spbu/jwt 1.0.1 → 1.0.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.
@@ -70,7 +70,7 @@ let ConsumerModule = (() => {
70
70
  })
71
71
  ],
72
72
  providers: [optionsProvider, consumer_service_1.ConsumerService],
73
- exports: [consumer_service_1.ConsumerService, constants_1.CONSUMER_OPTIONS]
73
+ exports: [consumer_service_1.ConsumerService, constants_1.CONSUMER_OPTIONS, jwt_1.JwtService]
74
74
  };
75
75
  }
76
76
  static registerAsync(options) {
@@ -80,6 +80,7 @@ let ConsumerModule = (() => {
80
80
  imports: [
81
81
  ...(options.imports || []),
82
82
  jwt_1.JwtModule.registerAsync({
83
+ imports: options.imports || [],
83
84
  useFactory: async (...args) => {
84
85
  const consumerOptions = await options.useFactory(...args);
85
86
  return {
@@ -87,11 +88,11 @@ let ConsumerModule = (() => {
87
88
  signOptions: JWT_VERIFY_OPTIONS
88
89
  };
89
90
  },
90
- inject: [constants_1.CONSUMER_OPTIONS]
91
+ inject: options.inject ?? []
91
92
  })
92
93
  ],
93
94
  providers: [optionsProvider, consumer_service_1.ConsumerService],
94
- exports: [consumer_service_1.ConsumerService, constants_1.CONSUMER_OPTIONS]
95
+ exports: [consumer_service_1.ConsumerService, constants_1.CONSUMER_OPTIONS, jwt_1.JwtService]
95
96
  };
96
97
  }
97
98
  };
@@ -71,7 +71,7 @@ let IssuerModule = (() => {
71
71
  })
72
72
  ],
73
73
  providers: [optionsProvider, issuer_service_1.IssuerService],
74
- exports: [issuer_service_1.IssuerService, constants_1.ISSUER_OPTIONS]
74
+ exports: [issuer_service_1.IssuerService, constants_1.ISSUER_OPTIONS, jwt_1.JwtService]
75
75
  };
76
76
  }
77
77
  static registerAsync(options) {
@@ -81,6 +81,7 @@ let IssuerModule = (() => {
81
81
  imports: [
82
82
  ...(options.imports || []),
83
83
  jwt_1.JwtModule.registerAsync({
84
+ imports: options.imports || [],
84
85
  useFactory: async (...args) => {
85
86
  const issuerOptions = await options.useFactory(...args);
86
87
  return {
@@ -88,11 +89,11 @@ let IssuerModule = (() => {
88
89
  signOptions: JWT_SIGN_OPTIONS
89
90
  };
90
91
  },
91
- inject: [constants_1.ISSUER_OPTIONS]
92
+ inject: options.inject ?? []
92
93
  })
93
94
  ],
94
95
  providers: [optionsProvider, issuer_service_1.IssuerService],
95
- exports: [issuer_service_1.IssuerService, constants_1.ISSUER_OPTIONS]
96
+ exports: [issuer_service_1.IssuerService, constants_1.ISSUER_OPTIONS, jwt_1.JwtService]
96
97
  };
97
98
  }
98
99
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citec-spbu/jwt",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Lightweight auth lib",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",