Socket
Socket
Sign inDemoInstall

@elastic/transport

Package Overview
Dependencies
Maintainers
74
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elastic/transport - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

4

lib/connection/BaseConnection.d.ts

@@ -13,3 +13,3 @@ /// <reference types="node" />

url: URL;
ssl?: TlsConnectionOptions;
tls?: TlsConnectionOptions;
id?: string;

@@ -49,3 +49,3 @@ headers?: http.IncomingHttpHeaders;

url: URL;
ssl: TlsConnectionOptions | null;
tls: TlsConnectionOptions | null;
id: string;

@@ -52,0 +52,0 @@ timeout: number;

@@ -37,3 +37,3 @@ "use strict";

});
Object.defineProperty(this, "ssl", {
Object.defineProperty(this, "tls", {
enumerable: true,

@@ -105,3 +105,3 @@ configurable: true,

this.url = opts.url;
this.ssl = (_d = opts.ssl) !== null && _d !== void 0 ? _d : null;
this.tls = (_d = opts.tls) !== null && _d !== void 0 ? _d : null;
this.id = (_e = opts.id) !== null && _e !== void 0 ? _e : stripAuth(opts.url.href);

@@ -142,5 +142,5 @@ this.headers = prepareHeaders(opts.headers, opts.auth);

// Handles console.log and utils.inspect invocations.
// We want to hide `auth`, `agent` and `ssl` since they made
// We want to hide `auth`, `agent` and `tls` since they made
// the logs very hard to read. The user can still
// access them with `instance.agent` and `instance.ssl`.
// access them with `instance.agent` and `instance.tls`.
[(_a = symbols_1.kStatus, _b = symbols_1.kCaFingerprint, _c = symbols_1.kDiagnostic, util_1.inspect.custom)](depth, options) {

@@ -147,0 +147,0 @@ const { authorization, ...headers } = this.headers;

@@ -76,3 +76,3 @@ "use strict";

? new hpagent_1.default.HttpProxyAgent(proxyAgentOptions)
: new hpagent_1.default.HttpsProxyAgent(Object.assign({}, proxyAgentOptions, this.ssl));
: new hpagent_1.default.HttpsProxyAgent(Object.assign({}, proxyAgentOptions, this.tls));
}

@@ -82,3 +82,3 @@ else {

? new http_1.default.Agent(agentOptions)
: new https_1.default.Agent(Object.assign({}, agentOptions, this.ssl));
: new https_1.default.Agent(Object.assign({}, agentOptions, this.tls));
}

@@ -85,0 +85,0 @@ }

@@ -73,3 +73,3 @@ "use strict";

const caFingerprint = this[symbols_1.kCaFingerprint];
const connector = (0, undici_1.buildConnector)(((_b = this.ssl) !== null && _b !== void 0 ? _b : {}));
const connector = (0, undici_1.buildConnector)(((_b = this.tls) !== null && _b !== void 0 ? _b : {}));
undiciOptions.connect = function (opts, cb) {

@@ -98,4 +98,4 @@ connector(opts, (err, socket) => {

}
else if (this.ssl !== null) {
undiciOptions.connect = this.ssl;
else if (this.tls !== null) {
undiciOptions.connect = this.tls;
}

@@ -102,0 +102,0 @@ this.pool = new undici_1.Pool(this.url.toString(), undiciOptions);

@@ -10,3 +10,3 @@ /// <reference types="node" />

export interface ConnectionPoolOptions {
ssl?: TlsConnectionOptions;
tls?: TlsConnectionOptions;
agent?: HttpAgentOptions | UndiciAgentOptions | agentFn | false;

@@ -37,3 +37,3 @@ proxy?: string | URL;

_proxy?: string | URL;
_ssl?: TlsConnectionOptions;
_tls?: TlsConnectionOptions;
[kCaFingerprint]?: string;

@@ -40,0 +40,0 @@ constructor(opts: ConnectionPoolOptions);

@@ -75,3 +75,3 @@ "use strict";

});
Object.defineProperty(this, "_ssl", {
Object.defineProperty(this, "_tls", {
enumerable: true,

@@ -95,3 +95,3 @@ configurable: true,

this.auth = opts.auth;
this._ssl = opts.ssl;
this._tls = opts.tls;
this._agent = opts.agent;

@@ -129,4 +129,4 @@ this._proxy = opts.proxy;

/* istanbul ignore else */
if (opts.ssl == null)
opts.ssl = this._ssl;
if (opts.tls == null)
opts.tls = this._tls;
/* istanbul ignore else */

@@ -133,0 +133,0 @@ if (opts.agent == null)

{
"name": "@elastic/transport",
"version": "0.0.5",
"version": "0.0.6",
"description": "Transport classes and utilities shared among Node.js Elastic client libraries",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc