@routr/common 2.15.2 → 2.15.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.
package/dist/helper.d.ts CHANGED
@@ -16,11 +16,11 @@ export declare const deepCopy: <T>(source: T) => T;
16
16
  export declare const getListeningPoint: (listeningPoints: NetInterface[], transport: Transport) => NetInterface;
17
17
  /**
18
18
  * Reads a file and returns a JSON object or throws an error.
19
- * The file must be a valid JSON, YAML, or TOML file.
19
+ * The file must be a valid JSON or YAML file.
20
20
  *
21
21
  * @param {string} path - The path to the file.
22
22
  * @return {object} The JSON object.
23
- * @throws {Error} If the file is not a valid JSON, YAML, or TOML file.
23
+ * @throws {Error} If the file is not a valid JSON or YAML file.
24
24
  * @throws {Error} If the file does not exist.
25
25
  * @throws {Error} If the file is not readable.
26
26
  * @throws {Error} If the file is empty.
package/dist/helper.js CHANGED
@@ -56,7 +56,6 @@ exports.toPascalCase = exports.readConfigFile = exports.getListeningPoint = expo
56
56
  * limitations under the License.
57
57
  */
58
58
  const yaml = __importStar(require("js-yaml"));
59
- const toml = __importStar(require("toml"));
60
59
  const fs_1 = __importDefault(require("fs"));
61
60
  const types_1 = require("./types");
62
61
  /**
@@ -105,11 +104,11 @@ const getListeningPoint = (listeningPoints, transport) => {
105
104
  exports.getListeningPoint = getListeningPoint;
106
105
  /**
107
106
  * Reads a file and returns a JSON object or throws an error.
108
- * The file must be a valid JSON, YAML, or TOML file.
107
+ * The file must be a valid JSON or YAML file.
109
108
  *
110
109
  * @param {string} path - The path to the file.
111
110
  * @return {object} The JSON object.
112
- * @throws {Error} If the file is not a valid JSON, YAML, or TOML file.
111
+ * @throws {Error} If the file is not a valid JSON or YAML file.
113
112
  * @throws {Error} If the file does not exist.
114
113
  * @throws {Error} If the file is not readable.
115
114
  * @throws {Error} If the file is empty.
@@ -125,13 +124,6 @@ const readConfigFile = (path) => {
125
124
  catch (e) {
126
125
  // Ignore
127
126
  }
128
- // Experimental TOML support
129
- try {
130
- return toml.parse(content);
131
- }
132
- catch (e) {
133
- // Ignore
134
- }
135
127
  try {
136
128
  return JSON.parse(content);
137
129
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/common",
3
- "version": "2.15.2",
3
+ "version": "2.15.3",
4
4
  "description": "Common package",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/routr#readme",
@@ -31,7 +31,6 @@
31
31
  "js-yaml": "^4.1.1",
32
32
  "pb-util": "^1.0.3",
33
33
  "phone": "^3.1.68",
34
- "toml": "^5.0.1",
35
34
  "validator": "^13.15.26"
36
35
  },
37
36
  "directories": {
@@ -54,5 +53,5 @@
54
53
  "devDependencies": {
55
54
  "@types/js-yaml": "^4.0.5"
56
55
  },
57
- "gitHead": "012332304537f623d017dffdf4911910fb27c0e0"
56
+ "gitHead": "30e73f1331f115b2dd9d02cdfdcf931dbeede36b"
58
57
  }