@routr/simpledata 2.6.3 → 2.7.0

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/api.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.findBy = exports.get = void 0;
4
4
  /*
5
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
5
+ * Copyright (C) 2024 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.js CHANGED
@@ -3,7 +3,7 @@ var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.PATH_TO_RESOURCES = exports.BIND_ADDR = void 0;
5
5
  /*
6
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
6
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
7
7
  * http://github.com/fonoster/routr
8
8
  *
9
9
  * This file is part of Routr.
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.aclLoader = void 0;
4
- /* eslint-disable require-jsdoc */
5
- /*
6
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
4
+ /* * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
7
5
  * http://github.com/fonoster/routr
8
6
  *
9
7
  * This file is part of Routr.
@@ -20,6 +18,7 @@ exports.aclLoader = void 0;
20
18
  * See the License for the specific language governing permissions and
21
19
  * limitations under the License.
22
20
  */
21
+ /* eslint-disable require-jsdoc */
23
22
  const common_1 = require("@routr/common");
24
23
  function aclLoader(config) {
25
24
  if (config.kind !== common_1.CommonConnect.Kind.ACL)
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.agentsLoader = void 0;
4
- /* eslint-disable require-jsdoc */
5
4
  /*
6
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
5
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
7
6
  * http://github.com/fonoster/routr
8
7
  *
9
8
  * This file is part of Routr.
@@ -20,6 +19,7 @@ exports.agentsLoader = void 0;
20
19
  * See the License for the specific language governing permissions and
21
20
  * limitations under the License.
22
21
  */
22
+ /* eslint-disable require-jsdoc */
23
23
  const common_1 = require("@routr/common");
24
24
  const find_1 = require("./find");
25
25
  function agentsLoader(config, list) {
@@ -28,6 +28,8 @@ function agentsLoader(config, list) {
28
28
  const agent = common_1.CommonConnect.mapToAgent(config);
29
29
  agent.domain = (0, find_1.findByRef)(config.spec.domainRef, list);
30
30
  agent.credentials = (0, find_1.findByRef)(config.spec.credentialsRef, list);
31
+ // maxContacts -1 means no limit
32
+ agent.maxContacts = agent.maxContacts || -1;
31
33
  return agent;
32
34
  }
33
35
  exports.agentsLoader = agentsLoader;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.credentialsLoader = void 0;
4
- /* eslint-disable require-jsdoc */
5
4
  /*
6
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
5
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
7
6
  * http://github.com/fonoster/routr
8
7
  *
9
8
  * This file is part of Routr.
@@ -20,6 +19,7 @@ exports.credentialsLoader = void 0;
20
19
  * See the License for the specific language governing permissions and
21
20
  * limitations under the License.
22
21
  */
22
+ /* eslint-disable require-jsdoc */
23
23
  const common_1 = require("@routr/common");
24
24
  function credentialsLoader(config) {
25
25
  if (config.kind !== common_1.CommonConnect.Kind.CREDENTIALS)
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.domainsLoader = void 0;
4
- /* eslint-disable require-jsdoc */
5
4
  /*
6
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
5
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
7
6
  * http://github.com/fonoster/routr
8
7
  *
9
8
  * This file is part of Routr.
@@ -20,6 +19,7 @@ exports.domainsLoader = void 0;
20
19
  * See the License for the specific language governing permissions and
21
20
  * limitations under the License.
22
21
  */
22
+ /* eslint-disable require-jsdoc */
23
23
  const common_1 = require("@routr/common");
24
24
  const find_1 = require("./find");
25
25
  function domainsLoader(config, list) {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.findByRef = void 0;
4
4
  /*
5
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
5
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/routr
7
7
  *
8
8
  * This file is part of Routr.
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getLoader = void 0;
4
4
  /*
5
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
5
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/routr
7
7
  *
8
8
  * This file is part of Routr.
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getLoader = void 0;
4
4
  /*
5
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
5
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/routr
7
7
  *
8
8
  * This file is part of Routr.
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.numbersLoader = void 0;
4
- /* eslint-disable require-jsdoc */
5
4
  /*
6
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
5
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
7
6
  * http://github.com/fonoster/routr
8
7
  *
9
8
  * This file is part of Routr.
@@ -20,6 +19,7 @@ exports.numbersLoader = void 0;
20
19
  * See the License for the specific language governing permissions and
21
20
  * limitations under the License.
22
21
  */
22
+ /* eslint-disable require-jsdoc */
23
23
  const common_1 = require("@routr/common");
24
24
  const find_1 = require("./find");
25
25
  function numbersLoader(config, list) {
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.peersLoader = void 0;
4
- /* eslint-disable require-jsdoc */
5
4
  /*
6
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
5
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
7
6
  * http://github.com/fonoster/routr
8
7
  *
9
8
  * This file is part of Routr.
@@ -20,13 +19,21 @@ exports.peersLoader = void 0;
20
19
  * See the License for the specific language governing permissions and
21
20
  * limitations under the License.
22
21
  */
22
+ /* eslint-disable require-jsdoc */
23
23
  const common_1 = require("@routr/common");
24
+ const logger_1 = require("@fonoster/logger");
24
25
  const find_1 = require("./find");
26
+ const logger = (0, logger_1.getLogger)({ service: "simpledata", filePath: __filename });
25
27
  function peersLoader(config, list) {
26
28
  if (config.kind !== common_1.CommonConnect.Kind.PEER)
27
29
  throw new Error("invalid resource type `Peer`");
28
30
  const peer = common_1.CommonConnect.mapToPeer(config);
31
+ if (peer.aor.startsWith("backend:")) {
32
+ logger.warn("'backend:' prefix to be removed in upcoming updates. please use 'sip:' for compatibility.");
33
+ }
29
34
  peer.credentials = (0, find_1.findByRef)(config.spec.credentialsRef, list);
35
+ // maxContacts -1 means no limit
36
+ peer.maxContacts = peer.maxContacts || -1;
30
37
  return peer;
31
38
  }
32
39
  exports.peersLoader = peersLoader;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.trunksLoader = void 0;
4
- /* eslint-disable require-jsdoc */
5
4
  /*
6
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
5
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
7
6
  * http://github.com/fonoster/routr
8
7
  *
9
8
  * This file is part of Routr.
@@ -20,6 +19,7 @@ exports.trunksLoader = void 0;
20
19
  * See the License for the specific language governing permissions and
21
20
  * limitations under the License.
22
21
  */
22
+ /* eslint-disable require-jsdoc */
23
23
  const common_1 = require("@routr/common");
24
24
  const find_1 = require("./find");
25
25
  function trunksLoader(config, list) {
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) 2023 by Fonoster Inc (https://fonoster.com)
8
+ * Copyright (C) 2024 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/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) 2023 by Fonoster Inc (https://fonoster.com)
8
+ * Copyright (C) 2024 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/utils.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.nyi = void 0;
4
4
  /*
5
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
5
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/routr
7
7
  *
8
8
  * This file is part of Routr
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/simpledata",
3
- "version": "2.6.3",
3
+ "version": "2.7.0",
4
4
  "description": "Files-based API Server for Routr Connect",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/routr#readme",
@@ -30,8 +30,8 @@
30
30
  "@opentelemetry/sdk-trace-base": "^1.0.4",
31
31
  "@opentelemetry/sdk-trace-node": "^1.0.4",
32
32
  "@opentelemetry/semantic-conventions": "^1.0.4",
33
- "@routr/common": "^2.6.1",
34
- "@routr/processor": "^2.6.2",
33
+ "@routr/common": "^2.7.0",
34
+ "@routr/processor": "^2.7.0",
35
35
  "google-protobuf": "^3.9.2",
36
36
  "jsonpath": "^1.1.1",
37
37
  "pb-util": "^1.0.3"
@@ -53,5 +53,5 @@
53
53
  "@types/google-protobuf": "^3.15.6",
54
54
  "@types/jsonpath": "^0.2.0"
55
55
  },
56
- "gitHead": "917a3bac2a626cada27ed6f11654ae312bf95a12"
56
+ "gitHead": "46d067f61a0797fbab905073f70c7ab319979d1d"
57
57
  }