@restorecommerce/service-config 1.0.6 → 1.0.8
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/CHANGELOG.md +20 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -3
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.8](https://github.com/restorecommerce/libs/compare/@restorecommerce/service-config@1.0.7...@restorecommerce/service-config@1.0.8) (2023-10-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **acs:** fix decorator declaration ([9847528](https://github.com/restorecommerce/libs/commit/98475283139362e8f5d8d04ac243bb32087b17c2))
|
|
12
|
+
* **logger, service-config:** fix export statements ([e6a4d24](https://github.com/restorecommerce/libs/commit/e6a4d24fb61afc7820ccab95a852b13df32c048e))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [1.0.7](https://github.com/restorecommerce/libs/compare/@restorecommerce/service-config@1.0.6...@restorecommerce/service-config@1.0.7) (2023-10-07)
|
|
19
|
+
|
|
20
|
+
**Note:** Version bump only for package @restorecommerce/service-config
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
## [1.0.6](https://github.com/restorecommerce/libs/compare/@restorecommerce/service-config@1.0.5...@restorecommerce/service-config@1.0.6) (2023-07-11)
|
|
7
27
|
|
|
8
28
|
**Note:** Version bump only for package @restorecommerce/service-config
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Provider as ServiceConfig } from 'nconf';
|
|
2
2
|
export interface ServiceConfigLogger {
|
|
3
3
|
verbose(...args: any[]): any;
|
|
4
4
|
}
|
|
@@ -6,5 +6,5 @@ export interface ServiceConfigOptions {
|
|
|
6
6
|
stageVar?: string;
|
|
7
7
|
logger?: ServiceConfigLogger;
|
|
8
8
|
}
|
|
9
|
-
export type ServiceConfig = nconf.Provider;
|
|
10
9
|
export declare function createServiceConfig(baseDir: string, opts?: ServiceConfigOptions): ServiceConfig;
|
|
10
|
+
export { ServiceConfig };
|
package/dist/index.js
CHANGED
|
@@ -23,9 +23,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.createServiceConfig = void 0;
|
|
26
|
+
exports.ServiceConfig = exports.createServiceConfig = void 0;
|
|
27
27
|
const path = __importStar(require("path"));
|
|
28
|
-
const
|
|
28
|
+
const nconf_1 = require("nconf");
|
|
29
|
+
Object.defineProperty(exports, "ServiceConfig", { enumerable: true, get: function () { return nconf_1.Provider; } });
|
|
29
30
|
// log config file usages
|
|
30
31
|
function logConfigFile(configFile, logger) {
|
|
31
32
|
let message;
|
|
@@ -46,7 +47,7 @@ function logConfigFile(configFile, logger) {
|
|
|
46
47
|
// read the layered configurations and merge into one
|
|
47
48
|
function createServiceConfig(baseDir, opts = {}) {
|
|
48
49
|
var _a;
|
|
49
|
-
const nconfInstance = new
|
|
50
|
+
const nconfInstance = new nconf_1.Provider();
|
|
50
51
|
const logger = opts.logger;
|
|
51
52
|
// static data from runtime
|
|
52
53
|
const STAGE_VAR = (_a = opts.stageVar) !== null && _a !== void 0 ? _a : 'NODE_ENV';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@restorecommerce/service-config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "An opinionated wrapper of nconf optimized for microservices",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -16,19 +16,19 @@
|
|
|
16
16
|
"configuration"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@restorecommerce/logger": "^1.2.
|
|
19
|
+
"@restorecommerce/logger": "^1.2.6",
|
|
20
20
|
"nconf": "^0.12.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@types/jest": "^29.5.
|
|
24
|
-
"@types/nconf": "^0.10.
|
|
25
|
-
"@types/node": "^20.
|
|
23
|
+
"@types/jest": "^29.5.5",
|
|
24
|
+
"@types/nconf": "^0.10.4",
|
|
25
|
+
"@types/node": "^20.8.2",
|
|
26
26
|
"cross-env": "^7.0.3",
|
|
27
|
-
"jest": "^29.
|
|
27
|
+
"jest": "^29.7.0",
|
|
28
28
|
"npm-run-all": "^4.1.5",
|
|
29
|
-
"rimraf": "^5.0.
|
|
29
|
+
"rimraf": "^5.0.5",
|
|
30
30
|
"ts-jest": "^29.1.1",
|
|
31
|
-
"typescript": "^5.
|
|
31
|
+
"typescript": "^5.2.2"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "npm-run-all build:clean build:compile",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "fe7482031b7c07c4d0af62d4205eead80cbf7178"
|
|
56
56
|
}
|