browsermob-proxy-api-client 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/BMPError.d.ts +15 -0
- package/dist/BMPError.js +29 -0
- package/dist/BMPError.js.map +1 -0
- package/dist/httpRequest.d.ts +18 -0
- package/dist/httpRequest.js +57 -0
- package/dist/httpRequest.js.map +1 -0
- package/dist/index.d.ts +5 -13
- package/dist/index.js +83 -73
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [3.0.0](https://github.com/raul72/browsermob-proxy-api-client/compare/2.0.0...3.0.0) (2025-03-06)
|
|
4
|
+
|
|
5
|
+
- Throw error when API responds with non-ok response code ([#151](https://github.com/raul72/browsermob-proxy-api-client/pull/151))
|
|
6
|
+
|
|
7
|
+
## [2.0.0](https://github.com/raul72/browsermob-proxy-api-client/compare/1.0.2...2.0.0) (2024-02-02)
|
|
8
|
+
|
|
9
|
+
- Drop node 16 support ([#107](https://github.com/raul72/browsermob-proxy-api-client/pull/107))
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ClientRequest, IncomingMessage } from 'http';
|
|
2
|
+
import { OutgoingHttpHeaders } from 'http2';
|
|
3
|
+
import { HttpRequestResponse } from './httpRequest';
|
|
4
|
+
interface BMPErrorRequest extends Pick<ClientRequest, 'host' | 'protocol' | 'method' | 'path'> {
|
|
5
|
+
headers: OutgoingHttpHeaders;
|
|
6
|
+
}
|
|
7
|
+
interface BMPErrorResponse extends Pick<IncomingMessage, 'complete' | 'headers' | 'rawHeaders' | 'method' | 'url' | 'statusCode' | 'statusMessage'> {
|
|
8
|
+
}
|
|
9
|
+
export default class BMPError extends Error {
|
|
10
|
+
req: BMPErrorRequest;
|
|
11
|
+
res: BMPErrorResponse;
|
|
12
|
+
data: string;
|
|
13
|
+
constructor(message: string, { req, res, data }: HttpRequestResponse);
|
|
14
|
+
}
|
|
15
|
+
export {};
|
package/dist/BMPError.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class BMPError extends Error {
|
|
4
|
+
req;
|
|
5
|
+
res;
|
|
6
|
+
data;
|
|
7
|
+
constructor(message, { req, res, data }) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.req = {
|
|
10
|
+
host: req.host,
|
|
11
|
+
protocol: req.protocol,
|
|
12
|
+
method: req.method,
|
|
13
|
+
path: req.path,
|
|
14
|
+
headers: req.getHeaders(),
|
|
15
|
+
};
|
|
16
|
+
this.res = {
|
|
17
|
+
complete: res.complete,
|
|
18
|
+
headers: res.headers,
|
|
19
|
+
rawHeaders: res.rawHeaders,
|
|
20
|
+
method: res.method,
|
|
21
|
+
url: res.url,
|
|
22
|
+
statusCode: res.statusCode,
|
|
23
|
+
statusMessage: res.statusMessage,
|
|
24
|
+
};
|
|
25
|
+
this.data = data;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.default = BMPError;
|
|
29
|
+
//# sourceMappingURL=BMPError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BMPError.js","sourceRoot":"","sources":["../BMPError.ts"],"names":[],"mappings":";;AAaA,MAAqB,QAAS,SAAQ,KAAK;IAClC,GAAG,CAAkB;IAErB,GAAG,CAAmB;IAEtB,IAAI,CAAC;IAEZ,YAAmB,OAAe,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAuB;QACzE,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,GAAG,GAAG;YACT,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,OAAO,EAAE,GAAG,CAAC,UAAU,EAAE;SAC1B,CAAC;QAEF,IAAI,CAAC,GAAG,GAAG;YACT,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,GAAG,EAAE,GAAG,CAAC,GAAG;YACZ,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,aAAa,EAAE,GAAG,CAAC,aAAa;SACjC,CAAC;QAEF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AA9BD,2BA8BC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ClientRequest, IncomingMessage, RequestOptions } from 'http';
|
|
2
|
+
export declare enum Method {
|
|
3
|
+
GET = "GET",
|
|
4
|
+
POST = "POST",
|
|
5
|
+
PUT = "PUT",
|
|
6
|
+
DELETE = "DELETE"
|
|
7
|
+
}
|
|
8
|
+
export interface HttpRequestResponse {
|
|
9
|
+
req: ClientRequest;
|
|
10
|
+
res: IncomingMessage;
|
|
11
|
+
data: string;
|
|
12
|
+
}
|
|
13
|
+
export default class HttpRequest {
|
|
14
|
+
protected defaultOptions: RequestOptions;
|
|
15
|
+
protected overwriteOptions: RequestOptions;
|
|
16
|
+
protected httpRequest(options: RequestOptions, payload?: string): Promise<HttpRequestResponse>;
|
|
17
|
+
protected httpRequestWithArgs(path?: string, method?: Method, args?: Record<string, string | number | boolean>): Promise<HttpRequestResponse>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Method = void 0;
|
|
7
|
+
const http_1 = __importDefault(require("http"));
|
|
8
|
+
var Method;
|
|
9
|
+
(function (Method) {
|
|
10
|
+
Method["GET"] = "GET";
|
|
11
|
+
Method["POST"] = "POST";
|
|
12
|
+
Method["PUT"] = "PUT";
|
|
13
|
+
Method["DELETE"] = "DELETE";
|
|
14
|
+
})(Method || (exports.Method = Method = {}));
|
|
15
|
+
class HttpRequest {
|
|
16
|
+
defaultOptions = {};
|
|
17
|
+
overwriteOptions = {};
|
|
18
|
+
async httpRequest(options, payload = '') {
|
|
19
|
+
return new Promise((resolve, reject) => {
|
|
20
|
+
const req = http_1.default.request({
|
|
21
|
+
...this.defaultOptions,
|
|
22
|
+
...options,
|
|
23
|
+
...this.overwriteOptions,
|
|
24
|
+
}, res => {
|
|
25
|
+
const data = [];
|
|
26
|
+
res.on('data', chunk => data.push(chunk));
|
|
27
|
+
res.on('end', () => {
|
|
28
|
+
resolve({
|
|
29
|
+
req,
|
|
30
|
+
res,
|
|
31
|
+
data: data.join(''),
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
req.on('error', error => reject(error));
|
|
36
|
+
if (payload) {
|
|
37
|
+
req.write(payload);
|
|
38
|
+
}
|
|
39
|
+
req.end();
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
async httpRequestWithArgs(path = '/', method = Method.GET, args = {}) {
|
|
43
|
+
const headers = {};
|
|
44
|
+
const params = new URLSearchParams();
|
|
45
|
+
if ([Method.POST, Method.PUT].includes(method) && Object.entries(args).length) {
|
|
46
|
+
headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
47
|
+
Object.entries(args).forEach(arg => params.set(arg[0], String(arg[1])));
|
|
48
|
+
}
|
|
49
|
+
return this.httpRequest({
|
|
50
|
+
path,
|
|
51
|
+
method,
|
|
52
|
+
headers,
|
|
53
|
+
}, params.toString());
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.default = HttpRequest;
|
|
57
|
+
//# sourceMappingURL=htt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GAAG,CAAC,GAAG,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC;IAES,KAAK,CAAC,mBAAmB,CACjC,IAAI,GAAG,GAAG,EACV,SAAiB,MAAM,CAAC,GAAG,EAC3B,OAAkD,EAAE;QAEpD,MAAM,OAAO,GAA2B,EAAE,CAAC;QAC3C,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;QAErC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;YAC9E,OAAO,CAAC,cAAc,CAAC,GAAG,mCAAmC,CAAC;YAC9D,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,CAAC;QAED,OAAO,IAAI,CAAC,WAAW,CACrB;YACE,IAAI;YACJ,MAAM;YACN,OAAO;SACR,EACD,MAAM,CAAC,QAAQ,EAAE,CAClB,CAAC;IACJ,CAAC;CACF;AA5DD,8BA4DC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { RequestOptions } from 'http';
|
|
3
2
|
import { Har } from 'har-format';
|
|
3
|
+
import BMPError from './BMPError';
|
|
4
|
+
import HttpRequest, { HttpRequestResponse } from './httpRequest';
|
|
4
5
|
import { BandwidthLimitsResponse, BlacklistItem, NewHarPageArgs, ProxyList, SetBandwidthLimitArgs, SetBlacklistArgs, SetRetryCountArgs, SetRewriteArgs, SetTimeoutsArgs, SetWhitelistArgs, StartHarArgs, StartProxyArgs, WaitArgs } from './typings/proxy';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
POST = "POST",
|
|
8
|
-
PUT = "PUT",
|
|
9
|
-
DELETE = "DELETE"
|
|
10
|
-
}
|
|
11
|
-
export { BandwidthLimitsResponse, BlacklistItem, NewHarPageArgs, ProxyList, SetBandwidthLimitArgs, SetBlacklistArgs, SetRetryCountArgs, SetRewriteArgs, SetTimeoutsArgs, SetWhitelistArgs, StartHarArgs, StartProxyArgs, WaitArgs, };
|
|
12
|
-
export default class BrowserMobProxyAPIClient {
|
|
13
|
-
readonly host: string;
|
|
14
|
-
readonly port: number;
|
|
6
|
+
export { BandwidthLimitsResponse, BlacklistItem, BMPError, NewHarPageArgs, ProxyList, SetBandwidthLimitArgs, SetBlacklistArgs, SetRetryCountArgs, SetRewriteArgs, SetTimeoutsArgs, SetWhitelistArgs, StartHarArgs, StartProxyArgs, WaitArgs, };
|
|
7
|
+
export default class BrowserMobProxyAPIClient extends HttpRequest {
|
|
15
8
|
constructor(host?: string, port?: number);
|
|
16
|
-
protected httpRequest(options: RequestOptions, payload?: string): Promise<
|
|
17
|
-
protected httpRequestWithArgs(path?: string, method?: Method, args?: Record<string, string | number | boolean>): Promise<string>;
|
|
9
|
+
protected httpRequest(options: RequestOptions, payload?: string): Promise<HttpRequestResponse>;
|
|
18
10
|
/***
|
|
19
11
|
* Get a list of ports attached to ProxyServer instances managed by ProxyManager
|
|
20
12
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1,145 +1,154 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Method["PUT"] = "PUT";
|
|
12
|
-
Method["DELETE"] = "DELETE";
|
|
13
|
-
})(Method || (Method = {}));
|
|
14
|
-
class BrowserMobProxyAPIClient {
|
|
15
|
-
host;
|
|
16
|
-
port;
|
|
39
|
+
exports.BMPError = void 0;
|
|
40
|
+
const BMPError_1 = __importDefault(require("./BMPError"));
|
|
41
|
+
exports.BMPError = BMPError_1.default;
|
|
42
|
+
const httpRequest_1 = __importStar(require("./httpRequest"));
|
|
43
|
+
class BrowserMobProxyAPIClient extends httpRequest_1.default {
|
|
17
44
|
constructor(host = 'localhost', port = 8080) {
|
|
18
|
-
|
|
19
|
-
this.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
res.on('data', chunk => data.push(chunk));
|
|
30
|
-
res.on('end', () => {
|
|
31
|
-
resolve(data.join(''));
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
req.on('error', error => reject(error));
|
|
35
|
-
if (payload) {
|
|
36
|
-
req.write(payload);
|
|
37
|
-
}
|
|
38
|
-
req.end();
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
httpRequestWithArgs(path = '/', method = Method.GET, args = {}) {
|
|
42
|
-
const headers = {};
|
|
43
|
-
const params = new URLSearchParams();
|
|
44
|
-
if ([Method.POST, Method.PUT].includes(method) && Object.entries(args).length) {
|
|
45
|
-
headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
46
|
-
Object.entries(args).forEach(arg => params.set(arg[0], String(arg[1])));
|
|
45
|
+
super();
|
|
46
|
+
this.defaultOptions = {
|
|
47
|
+
host,
|
|
48
|
+
port,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
async httpRequest(options, payload = '') {
|
|
52
|
+
const ret = await super.httpRequest(options, payload);
|
|
53
|
+
const statusCode = ret.res.statusCode || 0;
|
|
54
|
+
if (statusCode < 200 || statusCode >= 400) {
|
|
55
|
+
throw new BMPError_1.default(`Invalid API response code ${ret.res.statusCode}${options.path ? ` on ${options.path}` : ''}`, ret);
|
|
47
56
|
}
|
|
48
|
-
return
|
|
49
|
-
path,
|
|
50
|
-
method,
|
|
51
|
-
headers,
|
|
52
|
-
}, params.toString());
|
|
57
|
+
return ret;
|
|
53
58
|
}
|
|
54
59
|
/***
|
|
55
60
|
* Get a list of ports attached to ProxyServer instances managed by ProxyManager
|
|
56
61
|
*/
|
|
57
62
|
async getProxyList() {
|
|
58
|
-
|
|
63
|
+
const res = await this.httpRequestWithArgs('/proxy', httpRequest_1.Method.GET);
|
|
64
|
+
return JSON.parse(res.data);
|
|
59
65
|
}
|
|
60
66
|
/**
|
|
61
67
|
* Creates a new proxy to run requests off of
|
|
62
68
|
*/
|
|
63
69
|
async start(args = {}) {
|
|
64
|
-
const res = await this.httpRequestWithArgs('/proxy', Method.POST, { ...args });
|
|
65
|
-
const { port } = JSON.parse(res);
|
|
70
|
+
const res = await this.httpRequestWithArgs('/proxy', httpRequest_1.Method.POST, { ...args });
|
|
71
|
+
const { port } = JSON.parse(res.data);
|
|
66
72
|
return port || null;
|
|
67
73
|
}
|
|
68
74
|
/**
|
|
69
75
|
* Shuts down the proxy and closes the port.
|
|
70
76
|
*/
|
|
71
77
|
async stop(port) {
|
|
72
|
-
await this.httpRequestWithArgs(`/proxy/${port}`, Method.DELETE);
|
|
78
|
+
await this.httpRequestWithArgs(`/proxy/${port}`, httpRequest_1.Method.DELETE);
|
|
73
79
|
}
|
|
74
80
|
/**
|
|
75
81
|
* Creates a new HAR attached to the proxy
|
|
76
82
|
* returns the HAR content if there was a previous HAR
|
|
77
83
|
*/
|
|
78
84
|
async startHar(port, args = {}) {
|
|
79
|
-
const res = await this.httpRequestWithArgs(`/proxy/${port}/har`, Method.PUT, { ...args });
|
|
80
|
-
return res ? JSON.parse(res) : undefined;
|
|
85
|
+
const res = await this.httpRequestWithArgs(`/proxy/${port}/har`, httpRequest_1.Method.PUT, { ...args });
|
|
86
|
+
return res.data ? JSON.parse(res.data) : undefined;
|
|
81
87
|
}
|
|
82
88
|
/**
|
|
83
89
|
* Starts a new page on the existing HAR
|
|
84
90
|
*/
|
|
85
91
|
async newHarPage(port, args = {}) {
|
|
86
|
-
await this.httpRequestWithArgs(`/proxy/${port}/har/pageRef`, Method.PUT, { ...args });
|
|
92
|
+
await this.httpRequestWithArgs(`/proxy/${port}/har/pageRef`, httpRequest_1.Method.PUT, { ...args });
|
|
87
93
|
}
|
|
88
94
|
/**
|
|
89
95
|
* Returns the JSON/HAR content representing all the HTTP traffic passed through the proxy
|
|
90
96
|
* provided you have already created the HAR with this.startHar
|
|
91
97
|
*/
|
|
92
98
|
async getHar(port) {
|
|
93
|
-
const res = await this.httpRequestWithArgs(`/proxy/${port}/har`, Method.GET);
|
|
94
|
-
return res ? JSON.parse(res) : undefined;
|
|
99
|
+
const res = await this.httpRequestWithArgs(`/proxy/${port}/har`, httpRequest_1.Method.GET);
|
|
100
|
+
return res.data ? JSON.parse(res.data) : undefined;
|
|
95
101
|
}
|
|
96
102
|
/**
|
|
97
103
|
* Get whitelisted items
|
|
98
104
|
*/
|
|
99
105
|
async getWhitelist(port) {
|
|
100
|
-
|
|
106
|
+
const res = await this.httpRequestWithArgs(`/proxy/${port}/whitelist`, httpRequest_1.Method.GET);
|
|
107
|
+
return JSON.parse(res.data);
|
|
101
108
|
}
|
|
102
109
|
/**
|
|
103
110
|
* Sets a list of URL patterns to whitelist
|
|
104
111
|
*/
|
|
105
112
|
async setWhitelist(port, args) {
|
|
106
|
-
await this.httpRequestWithArgs(`/proxy/${port}/whitelist`, Method.PUT, { ...args });
|
|
113
|
+
await this.httpRequestWithArgs(`/proxy/${port}/whitelist`, httpRequest_1.Method.PUT, { ...args });
|
|
107
114
|
}
|
|
108
115
|
/**
|
|
109
116
|
* Clears all URL patterns from the whitelist
|
|
110
117
|
*/
|
|
111
118
|
async clearWhitelist(port) {
|
|
112
|
-
await this.httpRequestWithArgs(`/proxy/${port}/whitelist`, Method.DELETE);
|
|
119
|
+
await this.httpRequestWithArgs(`/proxy/${port}/whitelist`, httpRequest_1.Method.DELETE);
|
|
113
120
|
}
|
|
114
121
|
/**
|
|
115
122
|
* Get blacklisted items
|
|
116
123
|
*/
|
|
117
124
|
async getBlacklist(port) {
|
|
118
|
-
|
|
125
|
+
const res = await this.httpRequestWithArgs(`/proxy/${port}/blacklist`, httpRequest_1.Method.GET);
|
|
126
|
+
return JSON.parse(res.data);
|
|
119
127
|
}
|
|
120
128
|
/**
|
|
121
129
|
* Set a URL to blacklist
|
|
122
130
|
*/
|
|
123
131
|
async setBlacklist(port, args) {
|
|
124
|
-
await this.httpRequestWithArgs(`/proxy/${port}/blacklist`, Method.PUT, { ...args });
|
|
132
|
+
await this.httpRequestWithArgs(`/proxy/${port}/blacklist`, httpRequest_1.Method.PUT, { ...args });
|
|
125
133
|
}
|
|
126
134
|
/**
|
|
127
135
|
* Clears all URL patterns from the blacklist
|
|
128
136
|
*/
|
|
129
137
|
async clearBlacklist(port) {
|
|
130
|
-
await this.httpRequestWithArgs(`/proxy/${port}/blacklist`, Method.DELETE);
|
|
138
|
+
await this.httpRequestWithArgs(`/proxy/${port}/blacklist`, httpRequest_1.Method.DELETE);
|
|
131
139
|
}
|
|
132
140
|
/**
|
|
133
141
|
* Limit the bandwidth through the proxy
|
|
134
142
|
*/
|
|
135
143
|
async setBandwidthLimit(port, args = {}) {
|
|
136
|
-
await this.httpRequestWithArgs(`/proxy/${port}/limit`, Method.PUT, { ...args });
|
|
144
|
+
await this.httpRequestWithArgs(`/proxy/${port}/limit`, httpRequest_1.Method.PUT, { ...args });
|
|
137
145
|
}
|
|
138
146
|
/**
|
|
139
147
|
* Displays the amount of data remaining to be uploaded/downloaded until the limit is reached
|
|
140
148
|
*/
|
|
141
149
|
async getBandwidthLimit(port) {
|
|
142
|
-
|
|
150
|
+
const res = await this.httpRequestWithArgs(`/proxy/${port}/limit`, httpRequest_1.Method.GET);
|
|
151
|
+
return JSON.parse(res.data);
|
|
143
152
|
}
|
|
144
153
|
/**
|
|
145
154
|
* Set and override HTTP Request headers
|
|
@@ -148,7 +157,7 @@ class BrowserMobProxyAPIClient {
|
|
|
148
157
|
async setRequestHeaders(port, headers) {
|
|
149
158
|
await this.httpRequest({
|
|
150
159
|
path: `/proxy/${port}/headers`,
|
|
151
|
-
method: Method.POST,
|
|
160
|
+
method: httpRequest_1.Method.POST,
|
|
152
161
|
headers: {
|
|
153
162
|
'Content-Type': 'text/plain',
|
|
154
163
|
},
|
|
@@ -161,7 +170,7 @@ class BrowserMobProxyAPIClient {
|
|
|
161
170
|
async setHosts(port, hosts) {
|
|
162
171
|
await this.httpRequest({
|
|
163
172
|
path: `/proxy/${port}/hosts`,
|
|
164
|
-
method: Method.POST,
|
|
173
|
+
method: httpRequest_1.Method.POST,
|
|
165
174
|
headers: {
|
|
166
175
|
'Content-Type': 'text/plain',
|
|
167
176
|
},
|
|
@@ -173,7 +182,7 @@ class BrowserMobProxyAPIClient {
|
|
|
173
182
|
async setBasicAuth(port, domain, username, password) {
|
|
174
183
|
await this.httpRequest({
|
|
175
184
|
path: `/proxy/${port}/auth/basic/${domain}`,
|
|
176
|
-
method: Method.POST,
|
|
185
|
+
method: httpRequest_1.Method.POST,
|
|
177
186
|
headers: {
|
|
178
187
|
'Content-Type': 'text/plain',
|
|
179
188
|
},
|
|
@@ -183,7 +192,8 @@ class BrowserMobProxyAPIClient {
|
|
|
183
192
|
* Wait till all request are being made
|
|
184
193
|
*/
|
|
185
194
|
async wait(port, args) {
|
|
186
|
-
|
|
195
|
+
const res = await this.httpRequestWithArgs(`/proxy/${port}/wait`, httpRequest_1.Method.PUT, { ...args });
|
|
196
|
+
return res.data;
|
|
187
197
|
}
|
|
188
198
|
/**
|
|
189
199
|
* Handles different proxy timeouts
|
|
@@ -191,7 +201,7 @@ class BrowserMobProxyAPIClient {
|
|
|
191
201
|
async setTimeouts(port, timeouts) {
|
|
192
202
|
await this.httpRequest({
|
|
193
203
|
path: `/proxy/${port}/timeout`,
|
|
194
|
-
method: Method.PUT,
|
|
204
|
+
method: httpRequest_1.Method.PUT,
|
|
195
205
|
headers: {
|
|
196
206
|
'Content-Type': 'text/plain',
|
|
197
207
|
},
|
|
@@ -201,25 +211,25 @@ class BrowserMobProxyAPIClient {
|
|
|
201
211
|
* Redirecting URLs
|
|
202
212
|
*/
|
|
203
213
|
async setRewrite(port, args) {
|
|
204
|
-
await this.httpRequestWithArgs(`/proxy/${port}/rewrite`, Method.PUT, { ...args });
|
|
214
|
+
await this.httpRequestWithArgs(`/proxy/${port}/rewrite`, httpRequest_1.Method.PUT, { ...args });
|
|
205
215
|
}
|
|
206
216
|
/**
|
|
207
217
|
* Removes all URL redirection rules currently in effect
|
|
208
218
|
*/
|
|
209
219
|
async clearRewrites(port) {
|
|
210
|
-
await this.httpRequestWithArgs(`/proxy/${port}/rewrite`, Method.DELETE);
|
|
220
|
+
await this.httpRequestWithArgs(`/proxy/${port}/rewrite`, httpRequest_1.Method.DELETE);
|
|
211
221
|
}
|
|
212
222
|
/**
|
|
213
223
|
* Set retry count
|
|
214
224
|
*/
|
|
215
225
|
async setRetryCount(port, args) {
|
|
216
|
-
await this.httpRequestWithArgs(`/proxy/${port}/retry`, Method.PUT, { ...args });
|
|
226
|
+
await this.httpRequestWithArgs(`/proxy/${port}/retry`, httpRequest_1.Method.PUT, { ...args });
|
|
217
227
|
}
|
|
218
228
|
/**
|
|
219
229
|
* Empties the DNS cache
|
|
220
230
|
*/
|
|
221
231
|
async clearDNSCache(port) {
|
|
222
|
-
await this.httpRequestWithArgs(`/proxy/${port}/dns/cache`, Method.DELETE);
|
|
232
|
+
await this.httpRequestWithArgs(`/proxy/${port}/dns/cache`, httpRequest_1.Method.DELETE);
|
|
223
233
|
}
|
|
224
234
|
/**
|
|
225
235
|
* Set request interceptor
|
|
@@ -229,7 +239,7 @@ class BrowserMobProxyAPIClient {
|
|
|
229
239
|
async setRequestInterceptor(port, interceptor) {
|
|
230
240
|
await this.httpRequest({
|
|
231
241
|
path: `/proxy/${port}/filter/request`,
|
|
232
|
-
method: Method.POST,
|
|
242
|
+
method: httpRequest_1.Method.POST,
|
|
233
243
|
headers: {
|
|
234
244
|
'Content-Type': 'text/plain',
|
|
235
245
|
},
|
|
@@ -243,7 +253,7 @@ class BrowserMobProxyAPIClient {
|
|
|
243
253
|
async setResponseInterceptor(port, interceptor) {
|
|
244
254
|
await this.httpRequest({
|
|
245
255
|
path: `/proxy/${port}/filter/response`,
|
|
246
|
-
method: Method.POST,
|
|
256
|
+
method: httpRequest_1.Method.POST,
|
|
247
257
|
headers: {
|
|
248
258
|
'Content-Type': 'text/plain',
|
|
249
259
|
},
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,0DAAkC;AAsBhC,mBAtBK,kBAAQ,CAsBL;AArBV,6DAAyE;AAmCzE,MAAqB,wBAAyB,SAAQ,qBAAW;IAC/D,YAAY,IAAI,GAAG,WAAW,EAAE,IAAI,GAAG,IAAI;QACzC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,cAAc,GAAG;YACpB,IAAI;YACJ,IAAI;SACL,CAAC;IACJ,CAAC;IAES,KAAK,CAAC,WAAW,CACzB,OAAuB,EACvB,OAAO,GAAG,EAAE;QAEZ,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAEtD,MAAM,UAAU,GAAG,GAAG,CAAC,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC;QAE3C,IAAI,UAAU,GAAG,GAAG,IAAI,UAAU,IAAI,GAAG,EAAE,CAAC;YAC1C,MAAM,IAAI,kBAAQ,CAChB,6BAA6B,GAAG,CAAC,GAAG,CAAC,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAC7F,GAAG,CACJ,CAAC;QACJ,CAAC;QAED,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY;QAChB,MAAM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CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,aAAa,CAAC,IAAY,EAAE,IAAuB;QACvD,MAAM,IAAI,CAAC,mBAAmB,CAAC,UAAU,IAAI,QAAQ,EAAE,oBAAM,CAAC,GAAG,EAAE,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,aAAa,CAAC,IAAY;QAC9B,MAAM,IAAI,CAAC,mBAAmB,CAAC,UAAU,IAAI,YAAY,EAAE,oBAAM,CAAC,MAAM,CAAC,CAAC;IAC5E,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,qBAAqB,CAAC,IAAY,EAAE,WAAmB;QAC3D,MAAM,IAAI,CAAC,WAAW,CACpB;YACE,IAAI,EAAE,UAAU,IAAI,iBAAiB;YACrC,MAAM,EAAE,oBAAM,CAAC,IAAI;YACnB,OAAO,EAAE;gBACP,cAAc,EAAE,YAAY;aAC7B;SACF,EACD,WAAW,CACZ,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,sBAAsB,CAAC,IAAY,EAAE,WAAmB;QAC5D,MAAM,IAAI,CAAC,WAAW,CACpB;YACE,IAAI,EAAE,UAAU,IAAI,kBAAkB;YACtC,MAAM,EAAE,oBAAM,CAAC,IAAI;YACnB,OAAO,EAAE;gBACP,cAAc,EAAE,YAAY;aAC7B;SACF,EACD,WAAW,CACZ,CAAC;IACJ,CAAC;CACF;AApRD,2CAoRC"}
|
package/package.json
CHANGED
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@jest/globals": "^29.3.1",
|
|
24
|
-
"@microsoft/eslint-formatter-sarif": "3.
|
|
24
|
+
"@microsoft/eslint-formatter-sarif": "3.1.0",
|
|
25
25
|
"@tsconfig/node18": "^18",
|
|
26
26
|
"@types/node": "^18",
|
|
27
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
28
|
-
"@typescript-eslint/parser": "
|
|
27
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
28
|
+
"@typescript-eslint/parser": "7.18.0",
|
|
29
29
|
"eslint": "^8.29.0",
|
|
30
|
-
"eslint-config-airbnb-typescript": "^
|
|
30
|
+
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
31
31
|
"eslint-plugin-import": "^2.26.0",
|
|
32
32
|
"jest": "^29.3.1",
|
|
33
33
|
"ts-jest": "^29.0.3",
|
|
34
34
|
"ts-node": "^10.9.1",
|
|
35
35
|
"typescript": "^5.0.0"
|
|
36
36
|
},
|
|
37
|
-
"version": "
|
|
37
|
+
"version": "3.0.0"
|
|
38
38
|
}
|