namirasoft-site 1.4.17 → 1.4.19
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/NSBaseServer.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { BaseServer } from "namirasoft-core";
|
|
|
2
2
|
import { AxiosRequestConfig, AxiosResponse } from "axios";
|
|
3
3
|
export declare abstract class NSBaseServer extends BaseServer {
|
|
4
4
|
static onBeforeRequest_SetVersion<ReqData>(version: string, config?: AxiosRequestConfig<ReqData>): void;
|
|
5
|
-
static onBeforeRequest_GetVersion<ReqData>(
|
|
5
|
+
static onBeforeRequest_GetVersion<ReqData>(res?: AxiosResponse<ReqData>): string;
|
|
6
6
|
private version;
|
|
7
7
|
backend: {
|
|
8
8
|
version: string;
|
package/dist/NSBaseServer.js
CHANGED
|
@@ -9,10 +9,10 @@ class NSBaseServer extends namirasoft_core_1.BaseServer {
|
|
|
9
9
|
if (config === null || config === void 0 ? void 0 : config.headers)
|
|
10
10
|
config.headers[header] = version;
|
|
11
11
|
}
|
|
12
|
-
static onBeforeRequest_GetVersion(
|
|
12
|
+
static onBeforeRequest_GetVersion(res) {
|
|
13
13
|
let header = NSHeader_1.NSHeader.req.VERSION();
|
|
14
|
-
if (
|
|
15
|
-
return
|
|
14
|
+
if (res === null || res === void 0 ? void 0 : res.headers)
|
|
15
|
+
return res.headers[header];
|
|
16
16
|
return "";
|
|
17
17
|
}
|
|
18
18
|
constructor(base_url, version) {
|
package/dist/NSBaseServer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSBaseServer.js","sourceRoot":"","sources":["../src/NSBaseServer.ts"],"names":[],"mappings":";;;AAAA,qDAA6C;AAE7C,yCAAsC;AAEtC,MAAsB,YAAa,SAAQ,4BAAU;IAEjD,MAAM,CAAC,0BAA0B,CAAU,OAAe,EAAE,MAAoC;QAE5F,IAAI,MAAM,GAAG,mBAAQ,CAAC,GAAG,CAAC,OA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,MAAM,CAAC,CAAC;IAClE,CAAC;IACO,gBAAgB,CAAgB,CAAS,EAAE,GAAgC;QAE/E,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,YAAY,CAAC,0BAA0B,CAAC,GAAG,CAAC,CAAC;IACxE,CAAC;CACJ;AAtCD,oCAsCC;AAAA,CAAC"}
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"framework": "npm",
|
|
9
9
|
"application": "package",
|
|
10
10
|
"private": false,
|
|
11
|
-
"version": "1.4.
|
|
11
|
+
"version": "1.4.19",
|
|
12
12
|
"author": "Amir Abolhasani",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"main": "./dist/index.js",
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"axios": "^1.7.9",
|
|
21
|
-
"namirasoft-core": "^1.4.
|
|
21
|
+
"namirasoft-core": "^1.4.51"
|
|
22
22
|
}
|
|
23
23
|
}
|
package/src/NSBaseServer.ts
CHANGED
|
@@ -11,11 +11,11 @@ export abstract class NSBaseServer extends BaseServer
|
|
|
11
11
|
config.headers[header] = version;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
static onBeforeRequest_GetVersion<ReqData>(
|
|
14
|
+
static onBeforeRequest_GetVersion<ReqData>(res?: AxiosResponse<ReqData>): string
|
|
15
15
|
{
|
|
16
16
|
let header = NSHeader.req.VERSION();
|
|
17
|
-
if (
|
|
18
|
-
return
|
|
17
|
+
if (res?.headers)
|
|
18
|
+
return res.headers[header];
|
|
19
19
|
return "";
|
|
20
20
|
}
|
|
21
21
|
|