Compare commits

...

5 Commits

Author SHA1 Message Date
williamlardier 05fa4420a1
ARSN-227: bump project version 2022-12-08 15:20:01 +01:00
williamlardier 419b91c9c4
ARSN-227: fixups post werelogs type definitions 2022-12-08 15:20:01 +01:00
williamlardier 2234f2d714
ARSN-227: linter 2022-12-08 15:08:55 +01:00
williamlardier b6cef2f470
ARSN-227: use httpagent to create http(s) agents 2022-12-08 15:04:52 +01:00
williamlardier 01b3a29a32
ARSN-227: bump werelogs and add httpagent 2022-12-08 15:04:28 +01:00
7 changed files with 34 additions and 10 deletions

View File

@ -1,5 +1,6 @@
import * as http from 'http';
import * as https from 'https';
import { https as HttpsAgent } from 'httpagent';
import * as tls from 'tls';
import * as net from 'net';
import assert from 'assert';
@ -409,7 +410,7 @@ export default class Server {
method: 'arsenal.network.Server.start',
port: this._port,
});
this._https.agent = new https.Agent(this._https);
this._https.agent = new HttpsAgent.Agent(this._https);
this._server = https.createServer(this._https,
(req, res) => this._onRequest(req, res));
} else {

View File

@ -20,7 +20,7 @@ function _ttlvPadVector(vec: any[]) {
return vec;
}
function _throwError(logger: werelogs.Logger, msg: string, data?: LogDictionnary) {
function _throwError(logger: werelogs.Logger, msg: string, data?: LogDictionary) {
logger.error(msg, data);
throw Error(msg);
}

View File

@ -68,7 +68,6 @@ export default class RESTServer extends httpServer {
}) {
assert(params.port);
// @ts-expect-error
werelogs.configure({
level: params.log.logLevel,
dump: params.log.dumpLevel,

View File

@ -1,5 +1,6 @@
import ioClient from 'socket.io-client';
import * as http from 'http';
import { http as HttpAgent } from 'httpagent';
import io from 'socket.io';
import * as sioStream from './sio-stream';
import async from 'async';

View File

@ -1,5 +1,4 @@
const https = require('https');
const http = require('http');
const { http, https } = require('httpagent');
const url = require('url');
const AWS = require('aws-sdk');
const Sproxy = require('sproxydclient');
@ -77,8 +76,8 @@ function parseLC(config, vault) {
connectionAgent = new HttpsProxyAgent(options);
} else {
connectionAgent = sslEnabled ?
new https.Agent(httpAgentConfig) :
new http.Agent(httpAgentConfig);
new https.Agent(httpAgentConfig, { maxSockets: false }) :
new http.Agent(httpAgentConfig, { maxSockets: false });
}
const httpOptions = { agent: connectionAgent, timeout: 0 };
const s3Params = {

View File

@ -3,7 +3,7 @@
"engines": {
"node": ">=16"
},
"version": "8.1.73",
"version": "8.1.74",
"description": "Common utilities for the S3 project components",
"main": "build/index.js",
"repository": {
@ -33,6 +33,7 @@
"diskusage": "^1.1.1",
"fcntl": "github:scality/node-fcntl#0.2.0",
"hdclient": "scality/hdclient#1.1.0",
"httpagent": "git+https://github.com/scality/httpagent#1.0.2",
"https-proxy-agent": "^2.2.0",
"ioredis": "^4.28.5",
"ipaddr.js": "1.9.1",
@ -48,7 +49,7 @@
"sproxydclient": "github:scality/sproxydclient#8.0.4",
"utf8": "3.0.0",
"uuid": "^3.0.1",
"werelogs": "scality/werelogs#8.1.0",
"werelogs": "scality/werelogs#8.1.2",
"xml2js": "~0.4.23"
},
"optionalDependencies": {

View File

@ -1543,6 +1543,11 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.21.tgz#864b987c0c68d07b4345845c3e63b75edd143644"
integrity sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==
"@types/node@^18.11.9":
version "18.11.11"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.11.tgz#1d455ac0211549a8409d3cdb371cd55cc971e8dc"
integrity sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g==
"@types/prettier@^2.1.5":
version "2.4.4"
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.4.tgz#5d9b63132df54d8909fce1c3f8ca260fdd693e17"
@ -3040,6 +3045,11 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.4:
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
fast-safe-stringify@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884"
integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==
fb-watchman@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85"
@ -3442,6 +3452,12 @@ http-signature@~1.2.0:
jsprim "^1.2.2"
sshpk "^1.7.0"
"httpagent@git+https://github.com/scality/httpagent#1.0.2":
version "1.0.2"
resolved "git+https://github.com/scality/httpagent#676a70e10265a022d9bd061484117a4816d7953b"
dependencies:
"@types/node" "^18.11.9"
https-proxy-agent@^2.2.0:
version "2.2.4"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b"
@ -5637,7 +5653,7 @@ safe-json-stringify@1.0.3:
resolved "https://registry.yarnpkg.com/safe-json-stringify/-/safe-json-stringify-1.0.3.tgz#3cb6717660a086d07cb5bd9b7a6875bcf67bd05e"
integrity sha1-PLZxdmCghtB8tb2bemh1vPZ70F4=
safe-json-stringify@^1.0.3:
safe-json-stringify@^1.0.3, safe-json-stringify@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/safe-json-stringify/-/safe-json-stringify-1.2.0.tgz#356e44bc98f1f93ce45df14bcd7c01cda86e0afd"
integrity sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==
@ -6458,6 +6474,13 @@ werelogs@scality/werelogs#8.1.0:
dependencies:
safe-json-stringify "1.0.3"
werelogs@scality/werelogs#8.1.2:
version "8.1.2"
resolved "https://codeload.github.com/scality/werelogs/tar.gz/c9952528699978e4b09164c67922b4fbcfd4654f"
dependencies:
fast-safe-stringify "^2.1.1"
safe-json-stringify "^1.2.0"
werelogs@scality/werelogs#GA7.2.0.5:
version "7.2.0"
resolved "https://codeload.github.com/scality/werelogs/tar.gz/bc034589ebf7810d6e6d61932f94327976de6eef"