@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.
package/dist/bin/nasl.mjs CHANGED
@@ -14,7 +14,7 @@ import require$$0$5, { type as type$1 } from 'os';
14
14
  import require$$1$1 from 'tty';
15
15
  import require$$3 from 'http';
16
16
  import require$$4$1 from 'https';
17
- import require$$0$6, { URL as URL$1 } from 'url';
17
+ import require$$0$6 from 'url';
18
18
  import require$$8 from 'crypto';
19
19
  import http2 from 'http2';
20
20
  import zlib from 'zlib';
@@ -26899,7 +26899,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
26899
26899
  } else {
26900
26900
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
26901
26901
  options.port = parsed.port;
26902
- setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
26902
+ setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : parsed.protocol === 'https:' ? '443' : '') + options.path);
26903
26903
  }
26904
26904
 
26905
26905
  let transport;
@@ -28833,22 +28833,10 @@ const {
28833
28833
  } = axios;
28834
28834
 
28835
28835
  function createAxios(baseURL) {
28836
- // 解析 baseURL 提取 hostname 和 port
28837
- const url = new URL$1(baseURL);
28838
- const hostname = url.hostname;
28839
- const protocol = url.protocol;
28840
- // 确定端口:如果 URL 中没有指定端口,根据协议使用默认端口
28841
- let port = url.port;
28842
- if (!port) {
28843
- port = protocol === 'https:' ? '443' : '80';
28844
- }
28845
- // 构建 Host 头:hostname:port
28846
- const hostHeader = `${hostname}:${port}`;
28847
28836
  return axios.create({
28848
28837
  baseURL,
28849
28838
  headers: {
28850
28839
  'Content-Type': 'application/json',
28851
- 'Host': hostHeader,
28852
28840
  },
28853
28841
  timeout: 120000,
28854
28842
  });
@@ -38047,7 +38035,7 @@ async function build(entry, options) {
38047
38035
  await justExecCommandSync(webpackArgs, outDir);
38048
38036
  }
38049
38037
 
38050
- var version = "0.1.7";
38038
+ var version = "0.1.8";
38051
38039
  var pkg = {
38052
38040
  version: version};
38053
38041