@elastic/transport
Advanced tools
Comparing version 8.7.1 to 8.8.0
@@ -1,12 +0,6 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { inspect } from 'util'; | ||
import * as http from 'http'; | ||
import { URL } from 'url'; | ||
import { ConnectionOptions as TlsConnectionOptions, TLSSocket, DetailedPeerCertificate } from 'tls'; | ||
import { Readable as ReadableStream } from 'stream'; | ||
import { inspect } from 'node:util'; | ||
import * as http from 'node:http'; | ||
import { URL } from 'node:url'; | ||
import { ConnectionOptions as TlsConnectionOptions, TLSSocket, DetailedPeerCertificate } from 'node:tls'; | ||
import { Readable as ReadableStream } from 'node:stream'; | ||
import Diagnostic from '../Diagnostic'; | ||
@@ -58,2 +52,5 @@ import { ApiKeyAuth, BasicAuth, BearerAuth, HttpAgentOptions, UndiciAgentOptions, agentFn } from '../types'; | ||
} | ||
/** | ||
* An HTTP connection to a single Elasticsearch node. | ||
*/ | ||
export default class BaseConnection { | ||
@@ -60,0 +57,0 @@ url: URL; |
@@ -22,8 +22,13 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isCaFingerprintMatch = exports.getIssuerCertificate = exports.prepareHeaders = void 0; | ||
exports.prepareHeaders = prepareHeaders; | ||
exports.getIssuerCertificate = getIssuerCertificate; | ||
exports.isCaFingerprintMatch = isCaFingerprintMatch; | ||
const tslib_1 = require("tslib"); | ||
const util_1 = require("util"); | ||
const node_util_1 = require("node:util"); | ||
const Diagnostic_1 = tslib_1.__importDefault(require("../Diagnostic")); | ||
const errors_1 = require("../errors"); | ||
const symbols_1 = require("../symbols"); | ||
/** | ||
* An HTTP connection to a single Elasticsearch node. | ||
*/ | ||
class BaseConnection { | ||
@@ -150,3 +155,3 @@ constructor(opts) { | ||
// 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) { | ||
[(_a = symbols_1.kStatus, _b = symbols_1.kCaFingerprint, _c = symbols_1.kDiagnostic, node_util_1.inspect.custom)](depth, options) { | ||
const { authorization, ...headers } = this.headers; | ||
@@ -170,3 +175,2 @@ return { | ||
} | ||
exports.default = BaseConnection; | ||
Object.defineProperty(BaseConnection, "statuses", { | ||
@@ -181,2 +185,3 @@ enumerable: true, | ||
}); | ||
exports.default = BaseConnection; | ||
const validStatuses = Object.keys(BaseConnection.statuses) | ||
@@ -210,3 +215,2 @@ // @ts-expect-error | ||
} | ||
exports.prepareHeaders = prepareHeaders; | ||
function isApiKeyAuth(auth) { | ||
@@ -235,3 +239,2 @@ return auth.apiKey != null; | ||
} | ||
exports.getIssuerCertificate = getIssuerCertificate; | ||
function isCaFingerprintMatch(cert1, cert2) { | ||
@@ -245,3 +248,2 @@ if (typeof cert1 === 'string' && typeof cert2 === 'string') { | ||
} | ||
exports.isCaFingerprintMatch = isCaFingerprintMatch; | ||
//# sourceMappingURL=BaseConnection.js.map |
@@ -1,7 +0,8 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import hpagent from 'hpagent'; | ||
import http from 'http'; | ||
import https from 'https'; | ||
import http from 'node:http'; | ||
import https from 'node:https'; | ||
import BaseConnection, { ConnectionOptions, ConnectionRequestParams, ConnectionRequestOptions, ConnectionRequestOptionsAsStream, ConnectionRequestResponse, ConnectionRequestResponseAsStream } from './BaseConnection'; | ||
/** | ||
* A connection to an Elasticsearch node, managed by the `http` client in the standard library | ||
*/ | ||
export default class HttpConnection extends BaseConnection { | ||
@@ -8,0 +9,0 @@ agent?: http.Agent | https.Agent | hpagent.HttpProxyAgent | hpagent.HttpsProxyAgent; |
@@ -24,16 +24,19 @@ "use strict"; | ||
const hpagent_1 = tslib_1.__importDefault(require("hpagent")); | ||
const http_1 = tslib_1.__importDefault(require("http")); | ||
const https_1 = tslib_1.__importDefault(require("https")); | ||
const node_http_1 = tslib_1.__importDefault(require("node:http")); | ||
const node_https_1 = tslib_1.__importDefault(require("node:https")); | ||
const debug_1 = tslib_1.__importDefault(require("debug")); | ||
const buffer_1 = tslib_1.__importDefault(require("buffer")); | ||
const node_buffer_1 = tslib_1.__importDefault(require("node:buffer")); | ||
const BaseConnection_1 = tslib_1.__importStar(require("./BaseConnection")); | ||
const symbols_1 = require("../symbols"); | ||
const stream_1 = require("stream"); | ||
const node_stream_1 = require("node:stream"); | ||
const errors_1 = require("../errors"); | ||
const promises_1 = require("timers/promises"); | ||
const promises_1 = require("node:timers/promises"); | ||
const debug = (0, debug_1.default)('elasticsearch'); | ||
const INVALID_PATH_REGEX = /[^\u0021-\u00ff]/; | ||
const MAX_BUFFER_LENGTH = buffer_1.default.constants.MAX_LENGTH; | ||
const MAX_STRING_LENGTH = buffer_1.default.constants.MAX_STRING_LENGTH; | ||
const MAX_BUFFER_LENGTH = node_buffer_1.default.constants.MAX_LENGTH; | ||
const MAX_STRING_LENGTH = node_buffer_1.default.constants.MAX_STRING_LENGTH; | ||
const noop = () => { }; | ||
/** | ||
* A connection to an Elasticsearch node, managed by the `http` client in the standard library | ||
*/ | ||
class HttpConnection extends BaseConnection_1.default { | ||
@@ -82,9 +85,9 @@ constructor(opts) { | ||
this.agent = this.url.protocol === 'http:' | ||
? new http_1.default.Agent(agentOptions) | ||
: new https_1.default.Agent(Object.assign({}, agentOptions, this.tls)); | ||
? new node_http_1.default.Agent(agentOptions) | ||
: new node_https_1.default.Agent(Object.assign({}, agentOptions, this.tls)); | ||
} | ||
} | ||
this.makeRequest = this.url.protocol === 'http:' | ||
? http_1.default.request | ||
: https_1.default.request; | ||
? node_http_1.default.request | ||
: node_https_1.default.request; | ||
} | ||
@@ -249,3 +252,3 @@ async request(params, options) { | ||
if (isStream(params.body)) { | ||
(0, stream_1.pipeline)(params.body, request, err => { | ||
(0, node_stream_1.pipeline)(params.body, request, err => { | ||
/* istanbul ignore if */ | ||
@@ -252,0 +255,0 @@ if (err != null && !cleanedListeners) { |
import BaseConnection, { ConnectionOptions, ConnectionRequestParams, ConnectionRequestOptions, ConnectionRequestOptionsAsStream, ConnectionRequestResponse, ConnectionRequestResponseAsStream } from './BaseConnection'; | ||
import { Pool } from 'undici'; | ||
/** | ||
* A connection to an Elasticsearch node, managed by the Undici HTTP client library | ||
*/ | ||
export default class Connection extends BaseConnection { | ||
@@ -4,0 +7,0 @@ pool: Pool; |
@@ -24,3 +24,3 @@ "use strict"; | ||
const debug_1 = tslib_1.__importDefault(require("debug")); | ||
const buffer_1 = tslib_1.__importDefault(require("buffer")); | ||
const node_buffer_1 = tslib_1.__importDefault(require("node:buffer")); | ||
const BaseConnection_1 = tslib_1.__importStar(require("./BaseConnection")); | ||
@@ -32,4 +32,7 @@ const undici_1 = require("undici"); | ||
const INVALID_PATH_REGEX = /[^\u0021-\u00ff]/; | ||
const MAX_BUFFER_LENGTH = buffer_1.default.constants.MAX_LENGTH; | ||
const MAX_STRING_LENGTH = buffer_1.default.constants.MAX_STRING_LENGTH; | ||
const MAX_BUFFER_LENGTH = node_buffer_1.default.constants.MAX_LENGTH; | ||
const MAX_STRING_LENGTH = node_buffer_1.default.constants.MAX_STRING_LENGTH; | ||
/** | ||
* A connection to an Elasticsearch node, managed by the Undici HTTP client library | ||
*/ | ||
class Connection extends BaseConnection_1.default { | ||
@@ -36,0 +39,0 @@ constructor(opts) { |
@@ -1,3 +0,2 @@ | ||
/// <reference types="node" /> | ||
import { EventEmitter } from 'events'; | ||
import { EventEmitter } from 'node:events'; | ||
import { ElasticsearchClientError } from './errors'; | ||
@@ -4,0 +3,0 @@ import { ConnectionRequestOptions } from './connection'; |
@@ -22,3 +22,3 @@ "use strict"; | ||
exports.events = void 0; | ||
const events_1 = require("events"); | ||
const node_events_1 = require("node:events"); | ||
const errors_1 = require("./errors"); | ||
@@ -33,4 +33,4 @@ var events; | ||
events["DESERIALIZATION"] = "deserialization"; | ||
})(events = exports.events || (exports.events = {})); | ||
class Diagnostic extends events_1.EventEmitter { | ||
})(events || (exports.events = events = {})); | ||
class Diagnostic extends node_events_1.EventEmitter { | ||
on(event, listener) { | ||
@@ -37,0 +37,0 @@ assertSupportedEvent(event); |
@@ -1,3 +0,2 @@ | ||
/// <reference types="node" /> | ||
import * as http from 'http'; | ||
import * as http from 'node:http'; | ||
import { DiagnosticResult } from './types'; | ||
@@ -4,0 +3,0 @@ import { RedactionOptions } from './Transport'; |
@@ -150,4 +150,6 @@ "use strict"; | ||
this.name = 'ResponseError'; | ||
// TODO: this is for Elasticsearch | ||
if (isObject(meta.body) && meta.body.error != null && meta.body.error.type != null) { | ||
if (meta.statusCode === 410) { | ||
this.message = 'This API is unavailable in the version of Elasticsearch you are using.'; | ||
} | ||
else if (isObject(meta.body) && meta.body.error != null && meta.body.error.type != null) { | ||
this.message = meta.body.error.type; | ||
@@ -154,0 +156,0 @@ if (isObject(meta.body.error.caused_by)) { |
@@ -1,5 +0,3 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { URL } from 'url'; | ||
import { ConnectionOptions as TlsConnectionOptions } from 'tls'; | ||
import { URL } from 'node:url'; | ||
import { ConnectionOptions as TlsConnectionOptions } from 'node:tls'; | ||
import Diagnostic from '../Diagnostic'; | ||
@@ -29,2 +27,8 @@ import { kCaFingerprint } from '../symbols'; | ||
} | ||
/** | ||
* Manages the HTTP connections to each Elasticsearch node, | ||
* keeping track of which are currently dead or alive, and | ||
* provides the functionality for deciding which node to send | ||
* a request to. | ||
*/ | ||
export default class BaseConnectionPool { | ||
@@ -71,3 +75,3 @@ connections: Connection[]; | ||
* | ||
* @param {array} array of connections | ||
* @param nodes array of connections | ||
* @returns {ConnectionPool} | ||
@@ -74,0 +78,0 @@ */ |
@@ -23,3 +23,3 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const url_1 = require("url"); | ||
const node_url_1 = require("node:url"); | ||
const debug_1 = tslib_1.__importDefault(require("debug")); | ||
@@ -31,2 +31,8 @@ const Diagnostic_1 = tslib_1.__importDefault(require("../Diagnostic")); | ||
const debug = (0, debug_1.default)('elasticsearch'); | ||
/** | ||
* Manages the HTTP connections to each Elasticsearch node, | ||
* keeping track of which are currently dead or alive, and | ||
* provides the functionality for deciding which node to send | ||
* a request to. | ||
*/ | ||
class BaseConnectionPool { | ||
@@ -196,3 +202,3 @@ constructor(opts) { | ||
* | ||
* @param {array} array of connections | ||
* @param nodes array of connections | ||
* @returns {ConnectionPool} | ||
@@ -282,3 +288,3 @@ */ | ||
hosts.push({ | ||
url: new url_1.URL(address), | ||
url: new node_url_1.URL(address), | ||
id: ids[i] | ||
@@ -297,8 +303,8 @@ }); | ||
return { | ||
url: new url_1.URL(url) | ||
url: new node_url_1.URL(url) | ||
}; | ||
} | ||
} | ||
_a = symbols_1.kCaFingerprint; | ||
exports.default = BaseConnectionPool; | ||
_a = symbols_1.kCaFingerprint; | ||
//# sourceMappingURL=BaseConnectionPool.js.map |
@@ -23,3 +23,3 @@ "use strict"; | ||
const BaseConnectionPool_1 = tslib_1.__importDefault(require("./BaseConnectionPool")); | ||
const assert_1 = tslib_1.__importDefault(require("assert")); | ||
const node_assert_1 = tslib_1.__importDefault(require("node:assert")); | ||
const debug_1 = tslib_1.__importDefault(require("debug")); | ||
@@ -71,3 +71,3 @@ const connection_1 = require("../connection"); | ||
this.resurrectStrategy = ClusterConnectionPool.resurrectStrategies[resurrectStrategy]; | ||
(0, assert_1.default)(this.resurrectStrategy != null, `Invalid resurrection strategy: '${resurrectStrategy}'`); | ||
(0, node_assert_1.default)(this.resurrectStrategy != null, `Invalid resurrection strategy: '${resurrectStrategy}'`); | ||
} | ||
@@ -250,3 +250,2 @@ /** | ||
} | ||
exports.default = ClusterConnectionPool; | ||
Object.defineProperty(ClusterConnectionPool, "resurrectStrategies", { | ||
@@ -262,2 +261,3 @@ enumerable: true, | ||
}); | ||
exports.default = ClusterConnectionPool; | ||
//# sourceMappingURL=ClusterConnectionPool.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.redactDiagnostic = exports.redactObject = void 0; | ||
exports.redactObject = redactObject; | ||
exports.redactDiagnostic = redactDiagnostic; | ||
const secretKeys = [ | ||
@@ -58,3 +59,2 @@ 'authorization', | ||
} | ||
exports.redactObject = redactObject; | ||
/** | ||
@@ -84,3 +84,2 @@ * Redacts a DiagnosticResult object using the provided options. | ||
} | ||
exports.redactDiagnostic = redactDiagnostic; | ||
//# sourceMappingURL=security.js.map |
@@ -23,3 +23,3 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const querystring_1 = require("querystring"); | ||
const node_querystring_1 = require("node:querystring"); | ||
const debug_1 = tslib_1.__importDefault(require("debug")); | ||
@@ -112,7 +112,7 @@ const secure_json_parse_1 = tslib_1.__importDefault(require("secure-json-parse")); | ||
} | ||
return (0, querystring_1.stringify)(object); | ||
return (0, node_querystring_1.stringify)(object); | ||
} | ||
} | ||
_a = symbols_1.kJsonOptions; | ||
exports.default = Serializer; | ||
_a = symbols_1.kJsonOptions; | ||
//# sourceMappingURL=Serializer.js.map |
@@ -1,3 +0,2 @@ | ||
/// <reference types="node" /> | ||
import * as http from 'http'; | ||
import * as http from 'node:http'; | ||
import { Connection } from './connection'; | ||
@@ -4,0 +3,0 @@ import Diagnostic from './Diagnostic'; |
@@ -22,9 +22,11 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.lowerCaseHeaders = exports.generateRequestId = void 0; | ||
exports.generateRequestId = generateRequestId; | ||
exports.lowerCaseHeaders = lowerCaseHeaders; | ||
const tslib_1 = require("tslib"); | ||
const debug_1 = tslib_1.__importDefault(require("debug")); | ||
const os_1 = tslib_1.__importDefault(require("os")); | ||
const zlib_1 = tslib_1.__importDefault(require("zlib")); | ||
const buffer_1 = tslib_1.__importDefault(require("buffer")); | ||
const util_1 = require("util"); | ||
const node_os_1 = tslib_1.__importDefault(require("node:os")); | ||
const node_zlib_1 = tslib_1.__importDefault(require("node:zlib")); | ||
const node_buffer_1 = tslib_1.__importDefault(require("node:buffer")); | ||
const node_util_1 = require("node:util"); | ||
const node_process_1 = tslib_1.__importDefault(require("node:process")); | ||
const ms_1 = tslib_1.__importDefault(require("ms")); | ||
@@ -39,6 +41,6 @@ const errors_1 = require("./errors"); | ||
const debug = (0, debug_1.default)('elasticsearch'); | ||
const gzip = (0, util_1.promisify)(zlib_1.default.gzip); | ||
const unzip = (0, util_1.promisify)(zlib_1.default.unzip); | ||
const { createGzip } = zlib_1.default; | ||
const userAgent = `elastic-transport-js/${clientVersion} (${os_1.default.platform()} ${os_1.default.release()}-${os_1.default.arch()}; Node.js ${process.version})`; // eslint-disable-line | ||
const gzip = (0, node_util_1.promisify)(node_zlib_1.default.gzip); | ||
const unzip = (0, node_util_1.promisify)(node_zlib_1.default.unzip); | ||
const { createGzip } = node_zlib_1.default; | ||
const userAgent = `elastic-transport-js/${clientVersion} (${node_os_1.default.platform()} ${node_os_1.default.release()}-${node_os_1.default.arch()}; Node.js ${node_process_1.default.version})`; // eslint-disable-line | ||
class Transport { | ||
@@ -231,7 +233,7 @@ constructor(opts) { | ||
} | ||
if (opts.maxResponseSize != null && opts.maxResponseSize > buffer_1.default.constants.MAX_STRING_LENGTH) { | ||
throw new errors_1.ConfigurationError(`The maxResponseSize cannot be bigger than ${buffer_1.default.constants.MAX_STRING_LENGTH}`); | ||
if (opts.maxResponseSize != null && opts.maxResponseSize > node_buffer_1.default.constants.MAX_STRING_LENGTH) { | ||
throw new errors_1.ConfigurationError(`The maxResponseSize cannot be bigger than ${node_buffer_1.default.constants.MAX_STRING_LENGTH}`); | ||
} | ||
if (opts.maxCompressedResponseSize != null && opts.maxCompressedResponseSize > buffer_1.default.constants.MAX_LENGTH) { | ||
throw new errors_1.ConfigurationError(`The maxCompressedResponseSize cannot be bigger than ${buffer_1.default.constants.MAX_LENGTH}`); | ||
if (opts.maxCompressedResponseSize != null && opts.maxCompressedResponseSize > node_buffer_1.default.constants.MAX_LENGTH) { | ||
throw new errors_1.ConfigurationError(`The maxCompressedResponseSize cannot be bigger than ${node_buffer_1.default.constants.MAX_LENGTH}`); | ||
} | ||
@@ -259,4 +261,4 @@ this[symbols_1.kNodeFilter] = (_5 = opts.nodeFilter) !== null && _5 !== void 0 ? _5 : defaultNodeFilter; | ||
this[symbols_1.kProductCheck] = (_16 = opts.productCheck) !== null && _16 !== void 0 ? _16 : null; | ||
this[symbols_1.kMaxResponseSize] = (_17 = opts.maxResponseSize) !== null && _17 !== void 0 ? _17 : buffer_1.default.constants.MAX_STRING_LENGTH; | ||
this[symbols_1.kMaxCompressedResponseSize] = (_18 = opts.maxCompressedResponseSize) !== null && _18 !== void 0 ? _18 : buffer_1.default.constants.MAX_LENGTH; | ||
this[symbols_1.kMaxResponseSize] = (_17 = opts.maxResponseSize) !== null && _17 !== void 0 ? _17 : node_buffer_1.default.constants.MAX_STRING_LENGTH; | ||
this[symbols_1.kMaxCompressedResponseSize] = (_18 = opts.maxCompressedResponseSize) !== null && _18 !== void 0 ? _18 : node_buffer_1.default.constants.MAX_LENGTH; | ||
this[symbols_1.kJsonContentType] = (_20 = (_19 = opts.vendoredHeaders) === null || _19 === void 0 ? void 0 : _19.jsonContentType) !== null && _20 !== void 0 ? _20 : 'application/json'; | ||
@@ -597,7 +599,10 @@ this[symbols_1.kNdjsonContentType] = (_22 = (_21 = opts.vendoredHeaders) === null || _21 === void 0 ? void 0 : _21.ndjsonContentType) !== null && _22 !== void 0 ? _22 : 'application/x-ndjson'; | ||
debug(`Retrying request, there are still ${maxRetries - meta.attempts} attempts`, params); | ||
// exponential backoff on retries, with jitter | ||
const backoff = (_21 = options.retryBackoff) !== null && _21 !== void 0 ? _21 : this[symbols_1.kRetryBackoff]; | ||
const backoffWait = backoff(0, 4, meta.attempts); | ||
if (backoffWait > 0) { | ||
await (0, promises_1.setTimeout)(backoffWait * 1000); | ||
// don't use exponential backoff until retrying on each node | ||
if (meta.attempts >= this[symbols_1.kConnectionPool].size) { | ||
// exponential backoff on retries, with jitter | ||
const backoff = (_21 = options.retryBackoff) !== null && _21 !== void 0 ? _21 : this[symbols_1.kRetryBackoff]; | ||
const backoffWait = backoff(0, 4, meta.attempts); | ||
if (backoffWait > 0) { | ||
await (0, promises_1.setTimeout)(backoffWait * 1000); | ||
} | ||
} | ||
@@ -681,3 +686,2 @@ continue; | ||
} | ||
exports.default = Transport; | ||
_a = symbols_1.kNodeFilter, _b = symbols_1.kNodeSelector, _c = symbols_1.kHeaders, _d = symbols_1.kDiagnostic, _e = symbols_1.kConnectionPool, _f = symbols_1.kSerializer, _g = symbols_1.kContext, _h = symbols_1.kGenerateRequestId, _j = symbols_1.kOpaqueIdPrefix, _k = symbols_1.kName, _l = symbols_1.kMaxRetries, _m = symbols_1.kCompression, _o = symbols_1.kRequestTimeout, _p = symbols_1.kRetryOnTimeout, _q = symbols_1.kSniffEnabled, _r = symbols_1.kNextSniff, _s = symbols_1.kIsSniffing, _t = symbols_1.kSniffInterval, _u = symbols_1.kSniffOnConnectionFault, _v = symbols_1.kSniffEndpoint, _w = symbols_1.kProductCheck, _x = symbols_1.kMaxResponseSize, _y = symbols_1.kMaxCompressedResponseSize, _z = symbols_1.kJsonContentType, _0 = symbols_1.kNdjsonContentType, _1 = symbols_1.kAcceptHeader, _2 = symbols_1.kRedaction, _3 = symbols_1.kRetryBackoff, _4 = symbols_1.kOtelTracer; | ||
@@ -695,2 +699,3 @@ Object.defineProperty(Transport, "sniffReasons", { | ||
}); | ||
exports.default = Transport; | ||
function toMs(time) { | ||
@@ -729,3 +734,2 @@ if (typeof time === 'string') { | ||
} | ||
exports.generateRequestId = generateRequestId; | ||
function lowerCaseHeaders(oldHeaders) { | ||
@@ -741,3 +745,2 @@ if (oldHeaders == null) | ||
} | ||
exports.lowerCaseHeaders = lowerCaseHeaders; | ||
/** | ||
@@ -744,0 +747,0 @@ * Function for calculating how long to sleep, in seconds, before the next request retry |
@@ -1,8 +0,4 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Readable as ReadableStream } from 'stream'; | ||
import { URL } from 'url'; | ||
import * as http from 'http'; | ||
import { Readable as ReadableStream } from 'node:stream'; | ||
import { URL } from 'node:url'; | ||
import * as http from 'node:http'; | ||
import { Connection, ConnectionOptions, ConnectionRequestParams } from './connection'; | ||
@@ -9,0 +5,0 @@ import { TransportRequestParams, TransportRequestOptions } from './Transport'; |
{ | ||
"name": "@elastic/transport", | ||
"version": "8.7.1", | ||
"version": "8.8.0", | ||
"description": "Transport classes and utilities shared among Node.js Elastic client libraries", | ||
"main": "index.js", | ||
"main": "./index.js", | ||
"types": "index.d.ts", | ||
"exports": { | ||
"require": "./index.js" | ||
}, | ||
"scripts": { | ||
@@ -40,22 +43,22 @@ "test": "npm run build && npm run lint && tap test/{unit,acceptance}/{*,**/*}.test.ts", | ||
"devDependencies": { | ||
"@opentelemetry/sdk-trace-base": "^1.25.0", | ||
"@sinonjs/fake-timers": "github:sinonjs/fake-timers#0bfffc1", | ||
"@tapjs/clock": "^1.1.24", | ||
"@types/debug": "^4.1.7", | ||
"@types/ms": "^0.7.31", | ||
"@types/node": "^18.19.21", | ||
"@types/sinonjs__fake-timers": "^8.1.2", | ||
"@types/stoppable": "^1.1.1", | ||
"@types/tap": "^15.0.7", | ||
"into-stream": "^6.0.0", | ||
"license-checker": "^25.0.1", | ||
"node-abort-controller": "^3.0.1", | ||
"proxy": "^1.0.2", | ||
"rimraf": "^3.0.2", | ||
"stoppable": "^1.1.0", | ||
"tap": "^19.0.0", | ||
"ts-node": "^10.7.0", | ||
"ts-standard": "^11.0.0", | ||
"typescript": "^4.6.4", | ||
"workq": "^3.0.0" | ||
"@opentelemetry/sdk-trace-base": "1.26.0", | ||
"@sinonjs/fake-timers": "github:sinonjs/fake-timers#ed43eb8", | ||
"@tapjs/clock": "3.0.0", | ||
"@types/debug": "4.1.12", | ||
"@types/ms": "0.7.34", | ||
"@types/node": "20.16.4", | ||
"@types/sinonjs__fake-timers": "8.1.5", | ||
"@types/stoppable": "1.1.3", | ||
"@types/tap": "15.0.12", | ||
"into-stream": "6.0.0", | ||
"license-checker": "25.0.1", | ||
"node-abort-controller": "3.1.1", | ||
"proxy": "1.0.2", | ||
"rimraf": "6.0.1", | ||
"stoppable": "1.1.0", | ||
"tap": "21.0.1", | ||
"ts-node": "10.9.2", | ||
"ts-standard": "12.0.2", | ||
"typescript": "5.6.2", | ||
"workq": "3.0.0" | ||
}, | ||
@@ -62,0 +65,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
662823
75
9116
1