namirasoft-node 1.3.12 → 1.3.15

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.
@@ -14,7 +14,8 @@ class EnvService extends namirasoft_core_1.ConvertService {
14
14
  return null;
15
15
  }
16
16
  onMandatoryError() {
17
- throw new Error(`Env value was not provided: ${this.name}`);
17
+ if (!process.env.NAMIRASOFT_MUTE)
18
+ throw new Error(`Env value was not provided: ${this.name}`);
18
19
  }
19
20
  }
20
21
  exports.EnvService = EnvService;
@@ -1 +1 @@
1
- {"version":3,"file":"EnvService.js","sourceRoot":"","sources":["../src/EnvService.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AAEjD,MAAa,UAAW,SAAQ,gCAAc;IAG1C,YAAY,IAAY,EAAE,YAAqB,KAAK;QAEhD,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IACQ,aAAa;QAElB,IAAI,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,GAAG;YACH,OAAO,GAAG,CAAC;QACf,OAAO,IAAI,CAAC;IAChB,CAAC;IACkB,gBAAgB;QAE/B,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;CACJ;AAnBD,gCAmBC"}
1
+ {"version":3,"file":"EnvService.js","sourceRoot":"","sources":["../src/EnvService.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AAEjD,MAAa,UAAW,SAAQ,gCAAc;IAG1C,YAAY,IAAY,EAAE,YAAqB,KAAK;QAEhD,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IACQ,aAAa;QAElB,IAAI,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,GAAG;YACH,OAAO,GAAG,CAAC;QACf,OAAO,IAAI,CAAC;IAChB,CAAC;IACkB,gBAAgB;QAE/B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe;YAC5B,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACpE,CAAC;CACJ;AApBD,gCAoBC"}
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "framework": "npm",
9
9
  "application": "package",
10
10
  "private": false,
11
- "version": "1.3.12",
11
+ "version": "1.3.15",
12
12
  "main": "./dist/index.js",
13
13
  "types": "./dist/index.d.ts",
14
14
  "author": "Amir Abolhasani",
@@ -20,7 +20,7 @@
20
20
  "@supercharge/request-ip": "^1.2.0",
21
21
  "@types/cors": "^2.8.17",
22
22
  "@types/express": "^4.17.21",
23
- "@types/node": "^20.11.30",
23
+ "@types/node": "^20.12.2",
24
24
  "@types/nodemailer": "^6.4.14",
25
25
  "@types/nodemailer-smtp-transport": "^2.7.8",
26
26
  "@types/serve-index": "^1.9.4",
@@ -29,8 +29,8 @@
29
29
  "cors": "^2.8.5",
30
30
  "express": "^4.19.2",
31
31
  "joi": "^17.12.2",
32
- "namirasoft-core": "^1.3.14",
33
- "namirasoft-log": "^1.3.5",
32
+ "namirasoft-core": "^1.3.15",
33
+ "namirasoft-log": "^1.3.6",
34
34
  "namirasoft-schema": "^1.3.4",
35
35
  "nodemailer": "^6.9.13",
36
36
  "nodemailer-smtp-transport": "^2.7.4",
package/src/EnvService.ts CHANGED
@@ -17,6 +17,7 @@ export class EnvService extends ConvertService
17
17
  }
18
18
  protected override onMandatoryError(): void
19
19
  {
20
- throw new Error(`Env value was not provided: ${this.name}`);
20
+ if (!process.env.NAMIRASOFT_MUTE)
21
+ throw new Error(`Env value was not provided: ${this.name}`);
21
22
  }
22
23
  }