@rsdk/common.node 5.4.0-next.1 → 5.4.0-next.11
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 +54 -0
- package/dist/concurrency.decorator.js +1 -1
- package/dist/concurrency.decorator.js.map +1 -1
- package/dist/serialization/read-obj-sync.js +5 -2
- package/dist/serialization/read-obj-sync.js.map +1 -1
- package/dist/serialization/read-obj.js +5 -2
- package/dist/serialization/read-obj.js.map +1 -1
- package/dist/serialization/save-obj.js +5 -2
- package/dist/serialization/save-obj.js.map +1 -1
- package/dist/serialization/serializer.class.js +2 -2
- package/dist/serialization/serializer.class.js.map +1 -1
- package/package.json +3 -3
- package/src/concurrency.decorator.test.ts +1 -0
- package/src/concurrency.decorator.ts +1 -1
- package/src/serialization/read-obj-sync.ts +2 -2
- package/src/serialization/read-obj.ts +2 -2
- package/src/serialization/save-obj.ts +2 -2
- package/src/serialization/serializer.class.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,52 @@
|
|
|
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
|
+
## [5.4.0-next.11](https://github.com/R-Vision/rsdk/compare/v5.4.0-next.10...v5.4.0-next.11) (2024-12-04)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rsdk/common.node
|
|
9
|
+
|
|
10
|
+
## [5.4.0-next.10](https://github.com/R-Vision/rsdk/compare/v5.4.0-next.9...v5.4.0-next.10) (2024-12-03)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @rsdk/common.node
|
|
13
|
+
|
|
14
|
+
## [5.4.0-next.9](https://github.com/R-Vision/rsdk/compare/v5.4.0-next.8...v5.4.0-next.9) (2024-12-02)
|
|
15
|
+
|
|
16
|
+
## [5.3.1-rc.1](https://github.com/R-Vision/rsdk/compare/v5.3.1-rc.0...v5.3.1-rc.1) (2024-11-28)
|
|
17
|
+
|
|
18
|
+
## [5.3.1-rc.0](https://github.com/R-Vision/rsdk/compare/v5.4.0-next.6...v5.3.1-rc.0) (2024-11-28)
|
|
19
|
+
|
|
20
|
+
**Note:** Version bump only for package @rsdk/common.node
|
|
21
|
+
|
|
22
|
+
## [5.4.0-next.8](https://github.com/R-Vision/rsdk/compare/v5.4.0-next.7...v5.4.0-next.8) (2024-11-28)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @rsdk/common.node
|
|
25
|
+
|
|
26
|
+
## [5.4.0-next.7](https://github.com/R-Vision/rsdk/compare/v5.4.0-next.6...v5.4.0-next.7) (2024-11-28)
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* eslint rule lines-around-comment ([65083bd](https://github.com/R-Vision/rsdk/commit/65083bd2e084344e08f2124e39afbbc23fdaa4f4))
|
|
31
|
+
|
|
32
|
+
## [5.4.0-next.6](https://github.com/R-Vision/rsdk/compare/v5.4.0-next.5...v5.4.0-next.6) (2024-11-28)
|
|
33
|
+
|
|
34
|
+
**Note:** Version bump only for package @rsdk/common.node
|
|
35
|
+
|
|
36
|
+
## [5.4.0-next.5](https://github.com/R-Vision/rsdk/compare/v5.4.0-next.4...v5.4.0-next.5) (2024-11-28)
|
|
37
|
+
|
|
38
|
+
**Note:** Version bump only for package @rsdk/common.node
|
|
39
|
+
|
|
40
|
+
## [5.4.0-next.4](https://github.com/R-Vision/rsdk/compare/v5.4.0-next.3...v5.4.0-next.4) (2024-11-27)
|
|
41
|
+
|
|
42
|
+
**Note:** Version bump only for package @rsdk/common.node
|
|
43
|
+
|
|
44
|
+
## [5.4.0-next.3](https://github.com/R-Vision/rsdk/compare/v5.4.0-next.2...v5.4.0-next.3) (2024-11-25)
|
|
45
|
+
|
|
46
|
+
**Note:** Version bump only for package @rsdk/common.node
|
|
47
|
+
|
|
48
|
+
## [5.4.0-next.2](https://github.com/R-Vision/rsdk/compare/v5.4.0-next.1...v5.4.0-next.2) (2024-11-25)
|
|
49
|
+
|
|
50
|
+
**Note:** Version bump only for package @rsdk/common.node
|
|
51
|
+
|
|
6
52
|
## [5.4.0-next.1](https://github.com/R-Vision/rsdk/compare/v5.4.0-next.0...v5.4.0-next.1) (2024-11-08)
|
|
7
53
|
|
|
8
54
|
**Note:** Version bump only for package @rsdk/common.node
|
|
@@ -11,6 +57,14 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
57
|
|
|
12
58
|
**Note:** Version bump only for package @rsdk/common.node
|
|
13
59
|
|
|
60
|
+
## [5.3.1-rc.1](https://github.com/R-Vision/rsdk/compare/v5.3.1-rc.0...v5.3.1-rc.1) (2024-11-28)
|
|
61
|
+
|
|
62
|
+
**Note:** Version bump only for package @rsdk/common.node
|
|
63
|
+
|
|
64
|
+
## [5.3.1-rc.0](https://github.com/R-Vision/rsdk/compare/v5.3.0...v5.3.1-rc.0) (2024-11-28)
|
|
65
|
+
|
|
66
|
+
**Note:** Version bump only for package @rsdk/common.node
|
|
67
|
+
|
|
14
68
|
## [5.3.0](https://github.com/R-Vision/rsdk/compare/v5.3.0-next.4...v5.3.0) (2024-11-08)
|
|
15
69
|
|
|
16
70
|
**Note:** Version bump only for package @rsdk/common.node
|
|
@@ -8,7 +8,7 @@ const defaultLimit = 1;
|
|
|
8
8
|
const Concurrency = (limitOrOptions) => {
|
|
9
9
|
const { limit = defaultLimit, each = false } = typeof limitOrOptions === 'number'
|
|
10
10
|
? { limit: limitOrOptions }
|
|
11
|
-
: limitOrOptions ?? {};
|
|
11
|
+
: (limitOrOptions ?? {});
|
|
12
12
|
if (limit < 1) {
|
|
13
13
|
throw new Error('Limit must be more than zero', {
|
|
14
14
|
cause: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"concurrency.decorator.js","sourceRoot":"","sources":["../src/concurrency.decorator.ts"],"names":[],"mappings":";;;AAAA,8CAA8C;AAC9C,+GAA+G;AAC/G,MAAM,IAAI,GAAG,IA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EAAE,CAAC;YAEhD,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;YAEnC,OAAO,eAAe,CAAC,MAAM,IAAI,KAAK,EAAE,CAAC;gBACvC,oEAAoE;gBACpE,MAAM,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;YACtD,CAAC;YAED,2FAA2F;YAC3F,qCAAqC;YACrC;;;;;eAKG;YACH,8HAA8H;YAC9H,MAAM,OAAO,GAAG,KAAK,IAAsB,EAAE;gBAC3C,MAAM,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;gBAEjD,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;gBACpC,IAAI,CAAC;oBACH,OAAO,MAAM,aAAa,CAAC;gBAC7B,CAAC;wBAAS,CAAC;oBACT,eAAe,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC;gBACpE,CAAC;YACH,CAAC,CAAC;YAEF,OAAO,MAAM,OAAO,EAAE,CAAC;QACzB,CAAC,CAAC;QACF,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE;YAC9C,KAAK,EAAE,QAAQ,CAAC,IAAI;YACpB,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;IACL,CAAoB,CAAC;AACvB,CAAC,CAAC;AA7DW,QAAA,WAAW,eA6DtB"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.readObjSync = void 0;
|
|
4
7
|
const node_fs_1 = require("node:fs");
|
|
5
|
-
const node_path_1 = require("node:path");
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
6
9
|
const errors_1 = require("./errors");
|
|
7
10
|
const serializer_class_1 = require("./serializer.class");
|
|
8
11
|
/**
|
|
@@ -14,7 +17,7 @@ const serializer_class_1 = require("./serializer.class");
|
|
|
14
17
|
* @returns {any}
|
|
15
18
|
*/
|
|
16
19
|
const readObjSync = (pathToFile) => {
|
|
17
|
-
if (!
|
|
20
|
+
if (!node_path_1.default.isAbsolute(pathToFile)) {
|
|
18
21
|
throw new errors_1.NotAbsolutePathError(pathToFile);
|
|
19
22
|
}
|
|
20
23
|
const content = (0, node_fs_1.readFileSync)(pathToFile).toString();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-obj-sync.js","sourceRoot":"","sources":["../../src/serialization/read-obj-sync.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-obj-sync.js","sourceRoot":"","sources":["../../src/serialization/read-obj-sync.ts"],"names":[],"mappings":";;;;;;AAAA,qCAAuC;AACvC,0DAA6B;AAE7B,qCAAgD;AAChD,yDAAgD;AAEhD;;;;;;;GAOG;AACI,MAAM,WAAW,GAAG,CAAC,UAAkB,EAAW,EAAE;IACzD,IAAI,CAAC,mBAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,6BAAoB,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,sBAAY,EAAC,UAAU,CAAC,CAAC,QAAQ,EAAE,CAAC;IACpD,MAAM,MAAM,GAAG,6BAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEhD,OAAO,6BAAU,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC,CAAC;AATW,QAAA,WAAW,eAStB"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.readObj = void 0;
|
|
4
7
|
const node_fs_1 = require("node:fs");
|
|
5
|
-
const node_path_1 = require("node:path");
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
6
9
|
const errors_1 = require("./errors");
|
|
7
10
|
const serializer_class_1 = require("./serializer.class");
|
|
8
11
|
/**
|
|
@@ -13,7 +16,7 @@ const serializer_class_1 = require("./serializer.class");
|
|
|
13
16
|
* @returns {any}
|
|
14
17
|
*/
|
|
15
18
|
const readObj = async (pathToFile) => {
|
|
16
|
-
if (!
|
|
19
|
+
if (!node_path_1.default.isAbsolute(pathToFile)) {
|
|
17
20
|
throw new errors_1.NotAbsolutePathError(pathToFile);
|
|
18
21
|
}
|
|
19
22
|
const format = serializer_class_1.Serializer.getFormat(pathToFile);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-obj.js","sourceRoot":"","sources":["../../src/serialization/read-obj.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-obj.js","sourceRoot":"","sources":["../../src/serialization/read-obj.ts"],"names":[],"mappings":";;;;;;AAAA,qCAAyC;AACzC,0DAA6B;AAE7B,qCAAgD;AAChD,yDAAgD;AAEhD;;;;;;GAMG;AACI,MAAM,OAAO,GAAG,KAAK,EAAE,UAAkB,EAAoB,EAAE;IACpE,IAAI,CAAC,mBAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,6BAAoB,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,MAAM,GAAG,6BAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAChD,MAAM,OAAO,GAAG,MAAM,kBAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAE9C,OAAO,6BAAU,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC,CAAC;AATW,QAAA,OAAO,WASlB"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.saveObj = void 0;
|
|
4
7
|
const node_fs_1 = require("node:fs");
|
|
5
|
-
const node_path_1 = require("node:path");
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
6
9
|
const errors_1 = require("./errors");
|
|
7
10
|
const serializer_class_1 = require("./serializer.class");
|
|
8
11
|
/**
|
|
@@ -15,7 +18,7 @@ const serializer_class_1 = require("./serializer.class");
|
|
|
15
18
|
* to recognize it by file extension.
|
|
16
19
|
*/
|
|
17
20
|
const saveObj = async (obj, filename, format) => {
|
|
18
|
-
if (!
|
|
21
|
+
if (!node_path_1.default.isAbsolute(filename)) {
|
|
19
22
|
throw new errors_1.NotAbsolutePathError(filename);
|
|
20
23
|
}
|
|
21
24
|
const text = serializer_class_1.Serializer.stringify(obj, format || serializer_class_1.Serializer.getFormat(filename));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-obj.js","sourceRoot":"","sources":["../../src/serialization/save-obj.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"save-obj.js","sourceRoot":"","sources":["../../src/serialization/save-obj.ts"],"names":[],"mappings":";;;;;;AAAA,qCAAyC;AACzC,0DAA6B;AAE7B,qCAAgD;AAChD,yDAAgD;AAEhD;;;;;;;;GAQG;AACI,MAAM,OAAO,GAAG,KAAK,EAC1B,GAA4B,EAC5B,QAAgB,EAChB,MAAe,EACA,EAAE;IACjB,IAAI,CAAC,mBAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,6BAAoB,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,IAAI,GAAG,6BAAU,CAAC,SAAS,CAC/B,GAAG,EACH,MAAM,IAAI,6BAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,CACzC,CAAC;IAEF,MAAM,kBAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,GAAG,IAAI,IAAI,CAAC,CAAC;AAC5C,CAAC,CAAC;AAfW,QAAA,OAAO,WAelB"}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Serializer = void 0;
|
|
7
7
|
const dotenv_1 = __importDefault(require("dotenv"));
|
|
8
|
-
const node_path_1 = require("node:path");
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
9
|
const toml_1 = __importDefault(require("toml"));
|
|
10
10
|
const yaml_1 = __importDefault(require("yaml"));
|
|
11
11
|
const errors_1 = require("./errors");
|
|
@@ -30,7 +30,7 @@ class Serializer {
|
|
|
30
30
|
.set('.toml', 'toml')
|
|
31
31
|
.set('.env', 'env');
|
|
32
32
|
static getFormat(filename) {
|
|
33
|
-
let ext =
|
|
33
|
+
let ext = node_path_1.default.extname(filename);
|
|
34
34
|
if (!ext && filename.includes('.env')) {
|
|
35
35
|
ext = '.env';
|
|
36
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializer.class.js","sourceRoot":"","sources":["../../src/serialization/serializer.class.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,
|
|
1
|
+
{"version":3,"file":"serializer.class.js","sourceRoot":"","sources":["../../src/serialization/serializer.class.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,0DAA6B;AAC7B,gDAAwB;AACxB,gDAAwB;AAExB,qCAAyE;AAOzE,MAAM,MAAM,GAAG,CAAC,CAAC;AAEjB,MAAM,YAAY,GAAgB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,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,MAAc,EAAE,WAAwB;QAC5D,UAAU,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACnD,CAAC;;AA7DH,gCA8DC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdk/common.node",
|
|
3
|
-
"version": "5.4.0-next.
|
|
3
|
+
"version": "5.4.0-next.11",
|
|
4
4
|
"description": "Useful common classes, functions and types",
|
|
5
5
|
"license": "Apache License 2.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dotenv": "^16.3.1",
|
|
18
18
|
"rxjs": "^7.8.1",
|
|
19
19
|
"toml": "^3.0.0",
|
|
20
|
-
"yaml": "^2.
|
|
20
|
+
"yaml": "^2.6.1"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "aeefd240acea47a74d5eb5568fdf88ba8df533ae"
|
|
23
23
|
}
|
|
@@ -9,7 +9,7 @@ export const Concurrency = (
|
|
|
9
9
|
const { limit = defaultLimit, each = false } =
|
|
10
10
|
typeof limitOrOptions === 'number'
|
|
11
11
|
? { limit: limitOrOptions }
|
|
12
|
-
: limitOrOptions ?? {};
|
|
12
|
+
: (limitOrOptions ?? {});
|
|
13
13
|
|
|
14
14
|
if (limit < 1) {
|
|
15
15
|
throw new Error('Limit must be more than zero', {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
|
-
import
|
|
2
|
+
import path from 'node:path';
|
|
3
3
|
|
|
4
4
|
import { NotAbsolutePathError } from './errors';
|
|
5
5
|
import { Serializer } from './serializer.class';
|
|
@@ -13,7 +13,7 @@ import { Serializer } from './serializer.class';
|
|
|
13
13
|
* @returns {any}
|
|
14
14
|
*/
|
|
15
15
|
export const readObjSync = (pathToFile: string): unknown => {
|
|
16
|
-
if (!isAbsolute(pathToFile)) {
|
|
16
|
+
if (!path.isAbsolute(pathToFile)) {
|
|
17
17
|
throw new NotAbsolutePathError(pathToFile);
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { promises as fs } from 'node:fs';
|
|
2
|
-
import
|
|
2
|
+
import path from 'node:path';
|
|
3
3
|
|
|
4
4
|
import { NotAbsolutePathError } from './errors';
|
|
5
5
|
import { Serializer } from './serializer.class';
|
|
@@ -12,7 +12,7 @@ import { Serializer } from './serializer.class';
|
|
|
12
12
|
* @returns {any}
|
|
13
13
|
*/
|
|
14
14
|
export const readObj = async (pathToFile: string): Promise<unknown> => {
|
|
15
|
-
if (!isAbsolute(pathToFile)) {
|
|
15
|
+
if (!path.isAbsolute(pathToFile)) {
|
|
16
16
|
throw new NotAbsolutePathError(pathToFile);
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { promises as fs } from 'node:fs';
|
|
2
|
-
import
|
|
2
|
+
import path from 'node:path';
|
|
3
3
|
|
|
4
4
|
import { NotAbsolutePathError } from './errors';
|
|
5
5
|
import { Serializer } from './serializer.class';
|
|
@@ -18,7 +18,7 @@ export const saveObj = async (
|
|
|
18
18
|
filename: string,
|
|
19
19
|
format?: string,
|
|
20
20
|
): Promise<void> => {
|
|
21
|
-
if (!isAbsolute(filename)) {
|
|
21
|
+
if (!path.isAbsolute(filename)) {
|
|
22
22
|
throw new NotAbsolutePathError(filename);
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import dotenv from 'dotenv';
|
|
2
|
-
import
|
|
2
|
+
import path from 'node:path';
|
|
3
3
|
import TOML from 'toml';
|
|
4
4
|
import YAML from 'yaml';
|
|
5
5
|
|
|
@@ -40,7 +40,7 @@ export class Serializer {
|
|
|
40
40
|
.set('.env', 'env');
|
|
41
41
|
|
|
42
42
|
static getFormat(filename: string): Format {
|
|
43
|
-
let ext = extname(filename);
|
|
43
|
+
let ext = path.extname(filename);
|
|
44
44
|
|
|
45
45
|
if (!ext && filename.includes('.env')) {
|
|
46
46
|
ext = '.env';
|