@routr/dispatcher 2.0.8-alpha.12 → 2.0.8-alpha.14
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.
|
@@ -27,14 +27,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.getConfig = void 0;
|
|
30
|
-
const fs_1 = __importDefault(require("fs"));
|
|
31
30
|
const schema_1 = require("./schema");
|
|
32
31
|
const ajv_1 = __importDefault(require("ajv"));
|
|
33
32
|
const E = __importStar(require("fp-ts/Either"));
|
|
33
|
+
const common_1 = require("@routr/common");
|
|
34
34
|
const ajv = new ajv_1.default();
|
|
35
35
|
const validate = ajv.compile(schema_1.schema);
|
|
36
36
|
const getConfig = (path) => {
|
|
37
|
-
const c =
|
|
37
|
+
const c = common_1.Helper.readConfigFile(path);
|
|
38
38
|
if (!validate(Object.assign({}, c))) {
|
|
39
39
|
return E.left(new Error(JSON.stringify(validate.errors[0].message)));
|
|
40
40
|
}
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -12,16 +12,9 @@ export declare const schema: {
|
|
|
12
12
|
description: string;
|
|
13
13
|
type: string;
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
ref: {
|
|
16
16
|
description: string;
|
|
17
17
|
type: string;
|
|
18
|
-
properties: {
|
|
19
|
-
ref: {
|
|
20
|
-
description: string;
|
|
21
|
-
type: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
required: string[];
|
|
25
18
|
};
|
|
26
19
|
spec: {
|
|
27
20
|
description: string;
|
package/dist/config/schema.js
CHANGED
|
@@ -33,16 +33,9 @@ exports.schema = {
|
|
|
33
33
|
description: "Resource version",
|
|
34
34
|
type: "string"
|
|
35
35
|
},
|
|
36
|
-
|
|
37
|
-
description: "
|
|
38
|
-
type: "
|
|
39
|
-
properties: {
|
|
40
|
-
ref: {
|
|
41
|
-
description: "EdgePort reference",
|
|
42
|
-
type: "string"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
required: ["ref"]
|
|
36
|
+
ref: {
|
|
37
|
+
description: "EdgePort reference",
|
|
38
|
+
type: "string"
|
|
46
39
|
},
|
|
47
40
|
spec: {
|
|
48
41
|
description: "Operations spec for EdgePort",
|
|
@@ -96,5 +89,5 @@ exports.schema = {
|
|
|
96
89
|
}
|
|
97
90
|
}
|
|
98
91
|
},
|
|
99
|
-
required: ["kind", "
|
|
92
|
+
required: ["kind", "ref", "spec", "apiVersion"]
|
|
100
93
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@routr/dispatcher",
|
|
3
|
-
"version": "2.0.8-alpha.
|
|
3
|
+
"version": "2.0.8-alpha.14",
|
|
4
4
|
"description": "Receives SIP messages and forwards them to the corresponding Message Processor",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/routr#readme",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@opentelemetry/sdk-trace-base": "^1.0.4",
|
|
36
36
|
"@opentelemetry/sdk-trace-node": "^1.0.4",
|
|
37
37
|
"@opentelemetry/semantic-conventions": "^1.0.4",
|
|
38
|
-
"@routr/common": "^2.0.8-alpha.
|
|
38
|
+
"@routr/common": "^2.0.8-alpha.14",
|
|
39
39
|
"ajv": "^6.12.6",
|
|
40
40
|
"fp-ts": "^2.11.8"
|
|
41
41
|
},
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"bugs": {
|
|
47
47
|
"url": "https://github.com/fonoster/routr/issues"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "e91abb1fd9bc49ede80dd7fc8a13f97362f4c1f1"
|
|
50
50
|
}
|