namirasoft-node 1.1.47 → 1.1.49
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.
|
@@ -9,8 +9,12 @@ class RequestHeaderService extends namirasoft_core_1.ConvertService {
|
|
|
9
9
|
this.name = name;
|
|
10
10
|
}
|
|
11
11
|
getNullString() {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
if (this.req)
|
|
13
|
+
if (this.req.headers) {
|
|
14
|
+
let item = this.req.headers[this.name];
|
|
15
|
+
return new namirasoft_core_1.ObjectService(item).getNullString();
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
14
18
|
}
|
|
15
19
|
onMandatoryError() {
|
|
16
20
|
throw new Error(`Request Header value was not provided: ${this.name}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestHeaderService.js","sourceRoot":"","sources":["../src/RequestHeaderService.ts"],"names":[],"mappings":";;;AACA,qDAAgE;AAEhE,MAAa,oBAAqB,SAAQ,gCAAc;IAIpD,YAAY,GAAoB,EAAE,IAAY,EAAE,YAAqB,KAAK;QAEtE,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IACQ,aAAa;QAElB,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"RequestHeaderService.js","sourceRoot":"","sources":["../src/RequestHeaderService.ts"],"names":[],"mappings":";;;AACA,qDAAgE;AAEhE,MAAa,oBAAqB,SAAQ,gCAAc;IAIpD,YAAY,GAAoB,EAAE,IAAY,EAAE,YAAqB,KAAK;QAEtE,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IACQ,aAAa;QAElB,IAAI,IAAI,CAAC,GAAG;YACR,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EACpB;gBACI,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACvC,OAAO,IAAI,+BAAa,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;aAClD;QACL,OAAO,IAAI,CAAC;IAChB,CAAC;IACkB,gBAAgB;QAE/B,MAAM,IAAI,KAAK,CAAC,0CAA0C,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3E,CAAC;CACJ;AAxBD,oDAwBC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "namirasoft-node",
|
|
3
3
|
"description": "Namira Software Corporation Node NPM Package",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.49",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"scripts": {},
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"cors": "^2.8.5",
|
|
20
20
|
"express": "^4.18.2",
|
|
21
21
|
"joi": "^17.11.0",
|
|
22
|
-
"namirasoft-core": "^1.1.
|
|
22
|
+
"namirasoft-core": "^1.1.10",
|
|
23
23
|
"namirasoft-log": "^1.1.3",
|
|
24
|
-
"namirasoft-schema": "^1.1.
|
|
24
|
+
"namirasoft-schema": "^1.1.58",
|
|
25
25
|
"nodemailer": "^6.9.7",
|
|
26
26
|
"nodemailer-smtp-transport": "^2.7.4",
|
|
27
27
|
"request-ip": "^3.3.0",
|
|
@@ -13,8 +13,13 @@ export class RequestHeaderService extends ConvertService
|
|
|
13
13
|
}
|
|
14
14
|
override getNullString()
|
|
15
15
|
{
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
if (this.req)
|
|
17
|
+
if (this.req.headers)
|
|
18
|
+
{
|
|
19
|
+
let item = this.req.headers[this.name];
|
|
20
|
+
return new ObjectService(item).getNullString();
|
|
21
|
+
}
|
|
22
|
+
return null;
|
|
18
23
|
}
|
|
19
24
|
protected override onMandatoryError(): void
|
|
20
25
|
{
|