Skip to content

Commit 676a70e

Browse files
author
William
authored
Merge pull request #5 from scality/improvement/ARTESCA-6420-better-builds
Improvement/artesca 6420 better builds
2 parents fed06b3 + 481e443 commit 676a70e

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

.npmignore

Whitespace-only changes.

lib/http-agent.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ import * as http from 'http';
22
import clientConfigurationDefault from './config/default';
33

44
/**
5-
* @class ClientHttp
5+
* @class AgentHttp
66
* Abstracts the native http.Agent class to enforce common
77
* networking configuration across components.
88
*/
9-
export default class ClientHttp extends http.Agent {
9+
export default class AgentHttp extends http.Agent {
1010
/**
1111
* The maximum socket configuration defaults to 50.
1212
*/
1313
private static maxSocketsConfiguration = Number(process.env.MAX_SOCKETS) || 50;
1414

1515
/**
16-
* Constructor for the ClientHttp class
16+
* Constructor for the AgentHttp class
1717
*
1818
* @param opts - Custom HTTP Agent options
1919
* @param config - user-defined default configuration to apply
@@ -28,8 +28,8 @@ export default class ClientHttp extends http.Agent {
2828
const defaultConfigurations: http.AgentOptions = {};
2929
if (config.maxSockets) {
3030
defaultConfigurations.keepAlive = true;
31-
defaultConfigurations.maxSockets = ClientHttp.maxSocketsConfiguration;
32-
defaultConfigurations.maxFreeSockets = ClientHttp.maxSocketsConfiguration;
31+
defaultConfigurations.maxSockets = AgentHttp.maxSocketsConfiguration;
32+
defaultConfigurations.maxFreeSockets = AgentHttp.maxSocketsConfiguration;
3333
}
3434
super({
3535
...opts,

lib/https-agent.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import * as https from 'https';
22
import clientConfigurationDefault from './config/default';
33

44
/**
5-
* @class ClientHttps
5+
* @class AgentHttps
66
* Abstracts the native https.Agent class to enforce common
77
* networking configuration across components.
88
*/
9-
export default class ClientHttps extends https.Agent {
9+
export default class AgentHttps extends https.Agent {
1010
/**
1111
* The maximum socket configuration defaults to 50.
1212
*/
@@ -28,8 +28,8 @@ import clientConfigurationDefault from './config/default';
2828
const defaultConfigurations: https.AgentOptions = {};
2929
if (config.maxSockets) {
3030
defaultConfigurations.keepAlive = true;
31-
defaultConfigurations.maxSockets = ClientHttps.maxSocketsConfiguration;
32-
defaultConfigurations.maxFreeSockets = ClientHttps.maxSocketsConfiguration;
31+
defaultConfigurations.maxSockets = AgentHttps.maxSocketsConfiguration;
32+
defaultConfigurations.maxFreeSockets = AgentHttps.maxSocketsConfiguration;
3333
}
3434
super({
3535
...opts,

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "httpagent",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"engines": {
55
"node": ">=16"
66
},
@@ -10,7 +10,7 @@
1010
"author": "Scality Inc.",
1111
"license": "Apache-2.0",
1212
"scripts": {
13-
"build": "tsc --build tsconfig.json",
13+
"build": "tsc --declaration; tsc --build tsconfig.json",
1414
"format": "prettier --write \"**/*.{ts,tsx,css,html}\" ",
1515
"prepare": "yarn build || true",
1616
"eslint": "eslint ./ --ext .js,.ts,.tsx",

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"sourceMap": true,
1717
"declarationMap": true
1818
},
19-
"include": ["index.ts", "lib"],
19+
"include": ["index.ts", "lib/**/*"],
2020
"exclude": ["node_modules/*"],
2121
"compileOnSave": true
2222
}

0 commit comments

Comments
 (0)