@routr/pgdata 2.0.8-alpha.22 → 2.0.8-alpha.23

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.
@@ -4,7 +4,7 @@ exports.NumberManager = void 0;
4
4
  const common_1 = require("@routr/common");
5
5
  const manager_1 = require("./manager");
6
6
  const trunk_1 = require("./trunk");
7
- const envs_1 = require("../envs");
7
+ const common_2 = require("@routr/common");
8
8
  // Needs testing
9
9
  class NumberManager extends manager_1.EntityManager {
10
10
  constructor(number) {
@@ -24,8 +24,8 @@ class NumberManager extends manager_1.EntityManager {
24
24
  };
25
25
  }
26
26
  validOrThrowCreate() {
27
- if (envs_1.ENFORCE_E164) {
28
- common_1.CommonConnect.isValidE164OrThrow(this.number.telUrl, this.number.countryIsoCode, envs_1.ENFORCE_E164_WITH_MOBILE_PREFIX);
27
+ if (common_2.Environment.ENFORCE_E164) {
28
+ common_1.CommonConnect.isValidE164OrThrow(this.number.telUrl, this.number.countryIsoCode, common_2.Environment.ENFORCE_E164_WITH_MOBILE_PREFIX);
29
29
  }
30
30
  common_1.CommonConnect.hasNameOrThrow(this.number.name);
31
31
  common_1.CommonConnect.isValidNameOrThrow(this.number.name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/pgdata",
3
- "version": "2.0.8-alpha.22",
3
+ "version": "2.0.8-alpha.23",
4
4
  "description": "Postgres 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-node": "^1.0.4",
31
31
  "@opentelemetry/semantic-conventions": "^1.0.4",
32
32
  "@prisma/client": "^4.8.0",
33
- "@routr/common": "^2.0.8-alpha.22",
34
- "@routr/processor": "^2.0.8-alpha.22",
33
+ "@routr/common": "^2.0.8-alpha.23",
34
+ "@routr/processor": "^2.0.8-alpha.23",
35
35
  "google-protobuf": "^3.9.2",
36
36
  "pb-util": "^1.0.3",
37
37
  "phone": "^3.1.32",
@@ -55,5 +55,5 @@
55
55
  "@types/validator": "^13.7.10",
56
56
  "prisma": "^4.8.0"
57
57
  },
58
- "gitHead": "7c1e14c20e077f817605be62cf61a68904583bb8"
58
+ "gitHead": "1347b753f0dbdd3bdf423f2691867aa250b768af"
59
59
  }
package/dist/envs.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare const ENFORCE_E164: boolean;
2
- export declare const ENFORCE_E164_WITH_MOBILE_PREFIX: boolean;
package/dist/envs.js DELETED
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ENFORCE_E164_WITH_MOBILE_PREFIX = exports.ENFORCE_E164 = 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
- exports.ENFORCE_E164 = process.env.ENFORCE_E164 === "true" ? true : false;
23
- exports.ENFORCE_E164_WITH_MOBILE_PREFIX = process.env.ENFORCE_E164_WITH_MOBILE_PREFIX === "true" ? true : false;