@routr/edgeport 2.15.1 → 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/config/fs.d.ts +2 -2
- package/dist/config/fs.js +2 -10
- package/dist/runner.js +0 -1
- package/package.json +4 -5
- package/dist/tracer.d.ts +0 -7
- package/dist/tracer.js +0 -52
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/dist/runner.js
CHANGED
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
var _a;
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
// require("./tracer").init("dispatcher")
|
|
8
7
|
const get_config_1 = require("./config/get_config");
|
|
9
8
|
const edgeport_1 = __importDefault(require("./edgeport"));
|
|
10
9
|
const config = (0, get_config_1.getConfig)(System.getenv("CONFIG_PATH"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@routr/edgeport",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.3",
|
|
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.3",
|
|
33
33
|
"ajv": "^6.12.6",
|
|
34
34
|
"fp-ts": "^2.11.8",
|
|
35
|
-
"js-yaml": "^4.1.1"
|
|
36
|
-
"toml": "^3.0.0"
|
|
35
|
+
"js-yaml": "^4.1.1"
|
|
37
36
|
},
|
|
38
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "30e73f1331f115b2dd9d02cdfdcf931dbeede36b"
|
|
39
38
|
}
|
package/dist/tracer.d.ts
DELETED
package/dist/tracer.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.init = init;
|
|
7
|
-
/*
|
|
8
|
-
* Copyright (C) 2026 by Fonoster Inc (https://fonoster.com)
|
|
9
|
-
* http://github.com/fonoster/routr
|
|
10
|
-
*
|
|
11
|
-
* This file is part of Routr.
|
|
12
|
-
*
|
|
13
|
-
* Licensed under the MIT License (the "License");
|
|
14
|
-
* you may not use this file except in compliance with
|
|
15
|
-
* the License. You may obtain a copy of the License at
|
|
16
|
-
*
|
|
17
|
-
* https://opensource.org/licenses/MIT
|
|
18
|
-
*
|
|
19
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
20
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
21
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
22
|
-
* See the License for the specific language governing permissions and
|
|
23
|
-
* limitations under the License.
|
|
24
|
-
*/
|
|
25
|
-
const api_1 = __importDefault(require("@opentelemetry/api"));
|
|
26
|
-
const instrumentation_1 = require("@opentelemetry/instrumentation");
|
|
27
|
-
const sdk_trace_node_1 = require("@opentelemetry/sdk-trace-node");
|
|
28
|
-
const resources_1 = require("@opentelemetry/resources");
|
|
29
|
-
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
|
|
30
|
-
const sdk_trace_base_1 = require("@opentelemetry/sdk-trace-base");
|
|
31
|
-
const exporter_jaeger_1 = require("@opentelemetry/exporter-jaeger");
|
|
32
|
-
const instrumentation_grpc_1 = require("@opentelemetry/instrumentation-grpc");
|
|
33
|
-
/**
|
|
34
|
-
* This function registers the instrumentations for the service.
|
|
35
|
-
*
|
|
36
|
-
* @param {string} serviceName - The name of the service.
|
|
37
|
-
* @return {Tracer} The tracer object.
|
|
38
|
-
*/
|
|
39
|
-
function init(serviceName) {
|
|
40
|
-
const provider = new sdk_trace_node_1.NodeTracerProvider({
|
|
41
|
-
resource: new resources_1.Resource({
|
|
42
|
-
[semantic_conventions_1.SemanticResourceAttributes.SERVICE_NAME]: serviceName
|
|
43
|
-
})
|
|
44
|
-
});
|
|
45
|
-
const exporter = new exporter_jaeger_1.JaegerExporter();
|
|
46
|
-
provider.addSpanProcessor(new sdk_trace_base_1.SimpleSpanProcessor(exporter));
|
|
47
|
-
provider.register();
|
|
48
|
-
(0, instrumentation_1.registerInstrumentations)({
|
|
49
|
-
instrumentations: [new instrumentation_grpc_1.GrpcInstrumentation()]
|
|
50
|
-
});
|
|
51
|
-
return api_1.default.trace.getTracer("routr-tracer");
|
|
52
|
-
}
|