@nasl/cli 0.1.7 → 0.1.8

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.
@@ -1,2 +1,2 @@
1
- export declare function createAxios(baseURL: string): import("axios").AxiosInstance;
1
+ export declare function createAxios(baseURL: string): import("@lcap/axios-fixed").AxiosInstance;
2
2
  //# sourceMappingURL=createAxios.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createAxios.d.ts","sourceRoot":"","sources":["../../src/apis/createAxios.ts"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,iCAuB1C"}
1
+ {"version":3,"file":"createAxios.d.ts","sourceRoot":"","sources":["../../src/apis/createAxios.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,6CAQ1C"}
@@ -4,25 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.createAxios = createAxios;
7
- const axios_1 = __importDefault(require("axios"));
8
- const url_1 = require("url");
7
+ const axios_fixed_1 = __importDefault(require("@lcap/axios-fixed"));
9
8
  function createAxios(baseURL) {
10
- // 解析 baseURL 提取 hostname 和 port
11
- const url = new url_1.URL(baseURL);
12
- const hostname = url.hostname;
13
- const protocol = url.protocol;
14
- // 确定端口:如果 URL 中没有指定端口,根据协议使用默认端口
15
- let port = url.port;
16
- if (!port) {
17
- port = protocol === 'https:' ? '443' : '80';
18
- }
19
- // 构建 Host 头:hostname:port
20
- const hostHeader = `${hostname}:${port}`;
21
- return axios_1.default.create({
9
+ return axios_fixed_1.default.create({
22
10
  baseURL,
23
11
  headers: {
24
12
  'Content-Type': 'application/json',
25
- 'Host': hostHeader,
26
13
  },
27
14
  timeout: 120000,
28
15
  });
@@ -1 +1 @@
1
- {"version":3,"file":"createAxios.js","sourceRoot":"","sources":["../../src/apis/createAxios.ts"],"names":[],"mappings":";;;;;AAGA,kCAuBC;AA1BD,kDAA0B;AAC1B,6BAA0B;AAE1B,SAAgB,WAAW,CAAC,OAAe;IACvC,gCAAgC;IAChC,MAAM,GAAG,GAAG,IAAI,SAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IAC9B,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IAE9B,iCAAiC;IACjC,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IACpB,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,IAAI,GAAG,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAChD,CAAC;IAED,0BAA0B;IAC1B,MAAM,UAAU,GAAG,GAAG,QAAQ,IAAI,IAAI,EAAE,CAAC;IAEzC,OAAO,eAAK,CAAC,MAAM,CAAC;QAChB,OAAO;QACP,OAAO,EAAE;YACL,cAAc,EAAE,kBAAkB;YAClC,MAAM,EAAE,UAAU;SACrB;QACD,OAAO,EAAE,MAAM;KAClB,CAAC,CAAC;AACP,CAAC"}
1
+ {"version":3,"file":"createAxios.js","sourceRoot":"","sources":["../../src/apis/createAxios.ts"],"names":[],"mappings":";;;;;AAEA,kCAQC;AAVD,oEAAsC;AAEtC,SAAgB,WAAW,CAAC,OAAe;IACvC,OAAO,qBAAK,CAAC,MAAM,CAAC;QAChB,OAAO;QACP,OAAO,EAAE;YACL,cAAc,EAAE,kBAAkB;SACrC;QACD,OAAO,EAAE,MAAM;KAClB,CAAC,CAAC;AACP,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nasl/cli",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "NASL (Next Application Specific Language) CLI tool for checking, compiling and developing NASL code",
5
5
  "main": "out/index.js",
6
6
  "module": "dist/index.mjs",
@@ -51,6 +51,7 @@
51
51
  "typescript": "^5.9.0"
52
52
  },
53
53
  "dependencies": {
54
+ "@lcap/axios-fixed": "^1.13.2",
54
55
  "@types/fs-extra": "^11.0.4",
55
56
  "axios": "^1.13.2",
56
57
  "chalk": "^4.1.2",