@rytass/secret-adapter-vault-nestjs 0.2.2 → 0.2.4

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/index.cjs.js CHANGED
@@ -1,28 +1,30 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var common = require('@nestjs/common');
6
4
  var config = require('@nestjs/config');
7
5
  var secretAdapterVault = require('@rytass/secret-adapter-vault');
8
6
 
9
7
  const VAULT_PATH_TOKEN = Symbol('VAULT_PATH_TOKEN');
10
8
 
11
- var __decorate$1 = undefined && undefined.__decorate || function(decorators, target, key, desc) {
9
+ function _ts_decorate$1(decorators, target, key, desc) {
12
10
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
13
11
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
14
12
  else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
15
13
  return c > 3 && r && Object.defineProperty(target, key, r), r;
16
- };
17
- var __metadata = undefined && undefined.__metadata || function(k, v) {
14
+ }
15
+ function _ts_metadata(k, v) {
18
16
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
19
- };
20
- var __param = undefined && undefined.__param || function(paramIndex, decorator) {
17
+ }
18
+ function _ts_param(paramIndex, decorator) {
21
19
  return function(target, key) {
22
20
  decorator(target, key, paramIndex);
23
21
  };
24
- };
22
+ }
25
23
  exports.VaultService = class VaultService {
24
+ config;
25
+ manager;
26
+ onReadyCallbacks;
27
+ fallbackToEnvFile;
26
28
  constructor(config, path){
27
29
  this.config = config;
28
30
  this.onReadyCallbacks = [];
@@ -63,22 +65,22 @@ exports.VaultService = class VaultService {
63
65
  });
64
66
  }
65
67
  };
66
- exports.VaultService = __decorate$1([
68
+ exports.VaultService = _ts_decorate$1([
67
69
  common.Injectable(),
68
- __param(1, common.Inject(VAULT_PATH_TOKEN)),
69
- __metadata("design:type", Function),
70
- __metadata("design:paramtypes", [
70
+ _ts_param(1, common.Inject(VAULT_PATH_TOKEN)),
71
+ _ts_metadata("design:type", Function),
72
+ _ts_metadata("design:paramtypes", [
71
73
  typeof config.ConfigService === "undefined" ? Object : config.ConfigService,
72
74
  String
73
75
  ])
74
76
  ], exports.VaultService);
75
77
 
76
- var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
78
+ function _ts_decorate(decorators, target, key, desc) {
77
79
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
78
80
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
79
81
  else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
80
82
  return c > 3 && r && Object.defineProperty(target, key, r), r;
81
- };
83
+ }
82
84
  exports.VaultModule = class VaultModule1 {
83
85
  static forRoot(options = {
84
86
  path: '/'
@@ -87,7 +89,7 @@ exports.VaultModule = class VaultModule1 {
87
89
  imports: [
88
90
  config.ConfigModule.forRoot({
89
91
  envFilePath: options.fallbackFile
90
- }),
92
+ })
91
93
  ],
92
94
  module: exports.VaultModule,
93
95
  providers: [
@@ -96,7 +98,7 @@ exports.VaultModule = class VaultModule1 {
96
98
  provide: VAULT_PATH_TOKEN,
97
99
  useValue: options.path
98
100
  },
99
- exports.VaultService,
101
+ exports.VaultService
100
102
  ],
101
103
  exports: [
102
104
  exports.VaultService
@@ -104,7 +106,7 @@ exports.VaultModule = class VaultModule1 {
104
106
  };
105
107
  }
106
108
  };
107
- exports.VaultModule = __decorate([
109
+ exports.VaultModule = _ts_decorate([
108
110
  common.Global(),
109
111
  common.Module({})
110
112
  ], exports.VaultModule);
package/module.js CHANGED
@@ -3,12 +3,12 @@ import { ConfigModule, ConfigService } from '@nestjs/config';
3
3
  import { VAULT_PATH_TOKEN } from './constants.js';
4
4
  import { VaultService } from './service.js';
5
5
 
6
- var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
6
+ function _ts_decorate(decorators, target, key, desc) {
7
7
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8
8
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9
9
  else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
10
10
  return c > 3 && r && Object.defineProperty(target, key, r), r;
11
- };
11
+ }
12
12
  let VaultModule = class VaultModule1 {
13
13
  static forRoot(options = {
14
14
  path: '/'
@@ -17,7 +17,7 @@ let VaultModule = class VaultModule1 {
17
17
  imports: [
18
18
  ConfigModule.forRoot({
19
19
  envFilePath: options.fallbackFile
20
- }),
20
+ })
21
21
  ],
22
22
  module: VaultModule,
23
23
  providers: [
@@ -26,7 +26,7 @@ let VaultModule = class VaultModule1 {
26
26
  provide: VAULT_PATH_TOKEN,
27
27
  useValue: options.path
28
28
  },
29
- VaultService,
29
+ VaultService
30
30
  ],
31
31
  exports: [
32
32
  VaultService
@@ -34,7 +34,7 @@ let VaultModule = class VaultModule1 {
34
34
  };
35
35
  }
36
36
  };
37
- VaultModule = __decorate([
37
+ VaultModule = _ts_decorate([
38
38
  Global(),
39
39
  Module({})
40
40
  ], VaultModule);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rytass/secret-adapter-vault-nestjs",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Rytass Sceret Vault nestjs adapter",
5
5
  "keywords": [
6
6
  "rytass",
@@ -24,13 +24,13 @@
24
24
  "reflect-metadata": "^0.1.13"
25
25
  },
26
26
  "dependencies": {
27
- "@rytass/secret-adapter-vault": "^0.2.0",
27
+ "@rytass/secret-adapter-vault": "^0.2.1",
28
28
  "regenerator-runtime": "^0.13.11"
29
29
  },
30
30
  "devDependencies": {
31
- "@nestjs/common": "^9.4.1",
31
+ "@nestjs/common": "^9.4.2",
32
32
  "@nestjs/config": "^2.3.2",
33
- "@nestjs/core": "^9.4.1",
33
+ "@nestjs/core": "^9.4.2",
34
34
  "axios": "^1.4.0",
35
35
  "reflect-metadata": "^0.1.13"
36
36
  },
package/service.js CHANGED
@@ -3,21 +3,25 @@ import { ConfigService } from '@nestjs/config';
3
3
  import { VaultSecret, VaultSecretState } from '@rytass/secret-adapter-vault';
4
4
  import { VAULT_PATH_TOKEN } from './constants.js';
5
5
 
6
- var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
6
+ function _ts_decorate(decorators, target, key, desc) {
7
7
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8
8
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9
9
  else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
10
10
  return c > 3 && r && Object.defineProperty(target, key, r), r;
11
- };
12
- var __metadata = undefined && undefined.__metadata || function(k, v) {
11
+ }
12
+ function _ts_metadata(k, v) {
13
13
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
14
- };
15
- var __param = undefined && undefined.__param || function(paramIndex, decorator) {
14
+ }
15
+ function _ts_param(paramIndex, decorator) {
16
16
  return function(target, key) {
17
17
  decorator(target, key, paramIndex);
18
18
  };
19
- };
19
+ }
20
20
  let VaultService = class VaultService {
21
+ config;
22
+ manager;
23
+ onReadyCallbacks;
24
+ fallbackToEnvFile;
21
25
  constructor(config, path){
22
26
  this.config = config;
23
27
  this.onReadyCallbacks = [];
@@ -58,11 +62,11 @@ let VaultService = class VaultService {
58
62
  });
59
63
  }
60
64
  };
61
- VaultService = __decorate([
65
+ VaultService = _ts_decorate([
62
66
  Injectable(),
63
- __param(1, Inject(VAULT_PATH_TOKEN)),
64
- __metadata("design:type", Function),
65
- __metadata("design:paramtypes", [
67
+ _ts_param(1, Inject(VAULT_PATH_TOKEN)),
68
+ _ts_metadata("design:type", Function),
69
+ _ts_metadata("design:paramtypes", [
66
70
  typeof ConfigService === "undefined" ? Object : ConfigService,
67
71
  String
68
72
  ])