Socket
Socket
Sign inDemoInstall

@clickhouse/client

Package Overview
Dependencies
Maintainers
4
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clickhouse/client - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

9

dist/client.js

@@ -9,5 +9,4 @@ "use strict";

function createClient(config) {
var _a, _b, _c, _d, _e, _f;
let tls = undefined;
if (config === null || config === void 0 ? void 0 : config.tls) {
if (config?.tls) {
if ('cert' in config.tls && 'key' in config.tls) {

@@ -27,5 +26,5 @@ tls = {

const keep_alive = {
enabled: (_b = (_a = config === null || config === void 0 ? void 0 : config.keep_alive) === null || _a === void 0 ? void 0 : _a.enabled) !== null && _b !== void 0 ? _b : true,
socket_ttl: (_d = (_c = config === null || config === void 0 ? void 0 : config.keep_alive) === null || _c === void 0 ? void 0 : _c.socket_ttl) !== null && _d !== void 0 ? _d : 2500,
retry_on_expired_socket: (_f = (_e = config === null || config === void 0 ? void 0 : config.keep_alive) === null || _e === void 0 ? void 0 : _e.retry_on_expired_socket) !== null && _f !== void 0 ? _f : false,
enabled: config?.keep_alive?.enabled ?? true,
socket_ttl: config?.keep_alive?.socket_ttl ?? 2500,
retry_on_expired_socket: config?.keep_alive?.retry_on_expired_socket ?? false,
};

@@ -32,0 +31,0 @@ return new client_common_1.ClickHouseClient({

@@ -12,9 +12,8 @@ "use strict";

constructor(params) {
var _a, _b, _c;
const agent = new https_1.default.Agent({
keepAlive: params.keep_alive.enabled,
maxSockets: params.max_open_connections,
ca: (_a = params.tls) === null || _a === void 0 ? void 0 : _a.ca_cert,
key: ((_b = params.tls) === null || _b === void 0 ? void 0 : _b.type) === 'Mutual' ? params.tls.key : undefined,
cert: ((_c = params.tls) === null || _c === void 0 ? void 0 : _c.type) === 'Mutual' ? params.tls.cert : undefined,
ca: params.tls?.ca_cert,
key: params.tls?.type === 'Mutual' ? params.tls.key : undefined,
cert: params.tls?.type === 'Mutual' ? params.tls.cert : undefined,
});

@@ -24,4 +23,3 @@ super(params, agent);

buildDefaultHeaders(username, password) {
var _a, _b;
if (((_a = this.params.tls) === null || _a === void 0 ? void 0 : _a.type) === 'Mutual') {
if (this.params.tls?.type === 'Mutual') {
return {

@@ -33,3 +31,3 @@ 'X-ClickHouse-User': username,

}
if (((_b = this.params.tls) === null || _b === void 0 ? void 0 : _b.type) === 'Basic') {
if (this.params.tls?.type === 'Basic') {
return {

@@ -36,0 +34,0 @@ 'X-ClickHouse-User': username,

@@ -1,2 +0,2 @@

declare const _default: "0.2.5";
declare const _default: "0.2.6";
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = '0.2.5';
exports.default = '0.2.6';
//# sourceMappingURL=version.js.map

@@ -5,3 +5,3 @@ {

"homepage": "https://clickhouse.com",
"version": "0.2.5",
"version": "0.2.6",
"license": "Apache-2.0",

@@ -27,4 +27,4 @@ "keywords": [

"dependencies": {
"@clickhouse/client-common": "0.2.5"
"@clickhouse/client-common": "0.2.6"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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