@routr/edgeport 2.15.2 → 2.15.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/dist/config/fs.d.ts +2 -2
- package/dist/config/fs.js +2 -10
- package/package.json +4 -5
package/dist/config/fs.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ export declare const exists: (path: string) => any;
|
|
|
4
4
|
export declare const isFile: (path: string) => any;
|
|
5
5
|
/**
|
|
6
6
|
* Reads a file and returns a JSON object or throws an error.
|
|
7
|
-
* The file must be a valid JSON
|
|
7
|
+
* The file must be a valid JSON or YAML file.
|
|
8
8
|
*
|
|
9
9
|
* @param {string} path - The path to the file
|
|
10
10
|
* @return {object} The JSON object
|
|
11
|
-
* @throws {Error} If the file is not a valid JSON
|
|
11
|
+
* @throws {Error} If the file is not a valid JSON or YAML file
|
|
12
12
|
* @throws {Error} If the file does not exist
|
|
13
13
|
* @throws {Error} If the file is not readable
|
|
14
14
|
* @throws {Error} If the file is empty
|
package/dist/config/fs.js
CHANGED
|
@@ -35,7 +35,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.readConfigFile = exports.isFile = exports.exists = exports.readFile = void 0;
|
|
37
37
|
const yaml = __importStar(require("js-yaml"));
|
|
38
|
-
const toml = __importStar(require("toml"));
|
|
39
38
|
const JFile = Java.type("java.io.File");
|
|
40
39
|
const Files = Java.type("java.nio.file.Files");
|
|
41
40
|
const Paths = Java.type("java.nio.file.Paths");
|
|
@@ -54,11 +53,11 @@ const isFile = (path) => new JFile(path).isFile();
|
|
|
54
53
|
exports.isFile = isFile;
|
|
55
54
|
/**
|
|
56
55
|
* Reads a file and returns a JSON object or throws an error.
|
|
57
|
-
* The file must be a valid JSON
|
|
56
|
+
* The file must be a valid JSON or YAML file.
|
|
58
57
|
*
|
|
59
58
|
* @param {string} path - The path to the file
|
|
60
59
|
* @return {object} The JSON object
|
|
61
|
-
* @throws {Error} If the file is not a valid JSON
|
|
60
|
+
* @throws {Error} If the file is not a valid JSON or YAML file
|
|
62
61
|
* @throws {Error} If the file does not exist
|
|
63
62
|
* @throws {Error} If the file is not readable
|
|
64
63
|
* @throws {Error} If the file is empty
|
|
@@ -74,13 +73,6 @@ const readConfigFile = (path) => {
|
|
|
74
73
|
catch (e) {
|
|
75
74
|
// no-op
|
|
76
75
|
}
|
|
77
|
-
// Experimental TOML support
|
|
78
|
-
try {
|
|
79
|
-
return toml.parse(content);
|
|
80
|
-
}
|
|
81
|
-
catch (e) {
|
|
82
|
-
// no-op
|
|
83
|
-
}
|
|
84
76
|
try {
|
|
85
77
|
return JSON.parse(content);
|
|
86
78
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@routr/edgeport",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.4",
|
|
4
4
|
"description": "SIP endpoint at the edge of the network",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/routr#readme",
|
|
@@ -29,11 +29,10 @@
|
|
|
29
29
|
"url": "https://github.com/fonoster/routr/issues"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@routr/common": "^2.15.
|
|
32
|
+
"@routr/common": "^2.15.4",
|
|
33
33
|
"ajv": "^6.12.6",
|
|
34
34
|
"fp-ts": "^2.11.8",
|
|
35
|
-
"js-yaml": "^4.1.1"
|
|
36
|
-
"toml": "^5.0.1"
|
|
35
|
+
"js-yaml": "^4.1.1"
|
|
37
36
|
},
|
|
38
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "3d4a72191d5ac315429570e562d20fb5807cc942"
|
|
39
38
|
}
|