@routr/dispatcher 2.0.8-alpha.30 → 2.0.8-alpha.31

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.
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = void 0;
4
4
  /*
5
- * Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
5
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/routr
7
7
  *
8
8
  * This file is part of Routr
package/dist/envs.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const CONFIG_PATH: string;
package/dist/envs.js ADDED
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CONFIG_PATH = void 0;
4
+ /*
5
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
6
+ * http://github.com/fonoster
7
+ *
8
+ * This file is part of Routr.
9
+ *
10
+ * Licensed under the MIT License (the "License");
11
+ * you may not use this file except in compliance with
12
+ * the License. You may obtain a copy of the License at
13
+ *
14
+ * https://opensource.org/licenses/MIT
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" BASIS,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ */
22
+ const common_1 = require("@routr/common");
23
+ common_1.Assertions.assertEnvsAreSet(["CONFIG_PATH"]);
24
+ exports.CONFIG_PATH = process.env.CONFIG_PATH;
package/dist/errors.js CHANGED
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.MiddlewareUnavailableError = exports.ProcessorUnavailableError = exports.NotMatchingProcessorFound = void 0;
27
27
  /*
28
- * Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
28
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
29
29
  * http://github.com/fonoster/routr
30
30
  *
31
31
  * This file is part of Routr
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /*
4
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
5
+ * http://github.com/fonoster
6
+ *
7
+ * This file is part of Routr.
8
+ *
9
+ * Licensed under the MIT License (the "License");
10
+ * you may not use this file except in compliance with
11
+ * the License. You may obtain a copy of the License at
12
+ *
13
+ * https://opensource.org/licenses/MIT
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+ const common_1 = require("@routr/common");
22
+ const get_config_1 = require("./config/get_config");
23
+ const logger_1 = require("@fonoster/logger");
24
+ const envs_1 = require("./envs");
25
+ const logger = (0, logger_1.getLogger)({ service: "dispatcher", filePath: __filename });
26
+ const result = (0, get_config_1.getConfig)(envs_1.CONFIG_PATH);
27
+ if (result._tag === "Right") {
28
+ common_1.HealthCheck.check(result.right.bindAddr);
29
+ }
30
+ else {
31
+ logger.error(result.left);
32
+ }
package/dist/processor.js CHANGED
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  /*
16
- * Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
16
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
17
17
  * http://github.com/fonoster/routr
18
18
  *
19
19
  * This file is part of Routr
@@ -34,7 +34,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  exports.runMiddlewares = void 0;
36
36
  /*
37
- * Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
37
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
38
38
  * http://github.com/fonoster/routr
39
39
  *
40
40
  * This file is part of Routr
@@ -37,7 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
38
  exports.runProcessor = void 0;
39
39
  /*
40
- * Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
40
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
41
41
  * http://github.com/fonoster/routr
42
42
  *
43
43
  * This file is part of Routr
package/dist/runner.js CHANGED
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  /*
8
- * Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
8
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
9
9
  * http://github.com/fonoster/routr
10
10
  *
11
11
  * This file is part of Routr
@@ -24,11 +24,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
24
24
  */
25
25
  const service_1 = __importDefault(require("./service"));
26
26
  const get_config_1 = require("./config/get_config");
27
- const common_1 = require("@routr/common");
28
27
  const logger_1 = require("@fonoster/logger");
28
+ const envs_1 = require("./envs");
29
29
  const logger = (0, logger_1.getLogger)({ service: "dispatcher", filePath: __filename });
30
- common_1.Assertions.assertEnvsAreSet(["CONFIG_PATH"]);
31
- const result = (0, get_config_1.getConfig)(process.env.CONFIG_PATH);
30
+ const result = (0, get_config_1.getConfig)(envs_1.CONFIG_PATH);
32
31
  if (result._tag === "Right") {
33
32
  (0, service_1.default)(result.right);
34
33
  }
package/dist/service.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  /*
4
- * Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
4
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
5
5
  * http://github.com/fonoster/routr
6
6
  *
7
7
  * This file is part of Routr
package/dist/tracer.js CHANGED
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.init = void 0;
7
7
  /*
8
- * Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
8
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
9
9
  * http://github.com/fonoster/routr
10
10
  *
11
11
  * This file is part of Routr
package/dist/util.js CHANGED
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getServiceInfo = void 0;
7
7
  /*
8
- * Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
8
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
9
9
  * http://github.com/fonoster/routr
10
10
  *
11
11
  * This file is part of Routr
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/dispatcher",
3
- "version": "2.0.8-alpha.30",
3
+ "version": "2.0.8-alpha.31",
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",
@@ -12,7 +12,8 @@
12
12
  "build": "tsc -b tsconfig.json"
13
13
  },
14
14
  "bin": {
15
- "run_dispatcher": "dist/runner.js"
15
+ "run_dispatcher": "dist/runner.js",
16
+ "healthcheck_dispatcher": "dist/healthcheck.js"
16
17
  },
17
18
  "directories": {
18
19
  "src": "src",
@@ -25,7 +26,7 @@
25
26
  "access": "public"
26
27
  },
27
28
  "dependencies": {
28
- "@fonoster/logger": "0.3.18",
29
+ "@fonoster/logger": "0.3.20",
29
30
  "@grpc/grpc-js": "^1.8.4",
30
31
  "@opentelemetry/api": "^1.0.4",
31
32
  "@opentelemetry/exporter-jaeger": "^1.0.4",
@@ -35,8 +36,8 @@
35
36
  "@opentelemetry/sdk-trace-base": "^1.0.4",
36
37
  "@opentelemetry/sdk-trace-node": "^1.0.4",
37
38
  "@opentelemetry/semantic-conventions": "^1.0.4",
38
- "@routr/common": "^2.0.8-alpha.30",
39
- "@routr/processor": "^2.0.8-alpha.30",
39
+ "@routr/common": "^2.0.8-alpha.31",
40
+ "@routr/processor": "^2.0.8-alpha.31",
40
41
  "ajv": "^6.12.6",
41
42
  "fp-ts": "^2.11.8"
42
43
  },
@@ -47,5 +48,5 @@
47
48
  "bugs": {
48
49
  "url": "https://github.com/fonoster/routr/issues"
49
50
  },
50
- "gitHead": "6466c3e5262850c85dc6d15eec3e25f915a37667"
51
+ "gitHead": "6bca271d5a0b7163353a16af6b5195d264b3530f"
51
52
  }