@sectester/repeater 0.21.0 → 0.23.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/README.md +35 -6
- package/package.json +1 -1
- package/src/api/DefaultRepeatersManager.d.ts +3 -0
- package/src/api/DefaultRepeatersManager.js +8 -1
- package/src/api/DefaultRepeatersManager.js.map +1 -1
- package/src/api/RepeatersManager.d.ts +3 -0
- package/src/api/RepeatersManager.js.map +1 -1
- package/src/api/commands/GetRepeaterRequest.d.ts +9 -0
- package/src/api/commands/GetRepeaterRequest.js +15 -0
- package/src/api/commands/GetRepeaterRequest.js.map +1 -0
- package/src/api/commands/index.d.ts +1 -0
- package/src/api/commands/index.js +3 -1
- package/src/api/commands/index.js.map +1 -1
- package/src/lib/RepeaterFactory.d.ts +6 -1
- package/src/lib/RepeaterFactory.js +23 -9
- package/src/lib/RepeaterFactory.js.map +1 -1
- package/src/lib/RepeaterOptions.d.ts +3 -6
- package/src/lib/RepeaterRequestRunnerOptions.d.ts +7 -0
- package/src/lib/RepeaterRequestRunnerOptions.js +3 -0
- package/src/lib/RepeaterRequestRunnerOptions.js.map +1 -0
- package/src/lib/index.d.ts +1 -0
package/README.md
CHANGED
|
@@ -48,11 +48,13 @@ const repeater = await repeaterFactory.createRepeater({
|
|
|
48
48
|
|
|
49
49
|
The `createRepeater` method accepts the options described below:
|
|
50
50
|
|
|
51
|
-
| Option
|
|
52
|
-
|
|
|
53
|
-
| `namePrefix`
|
|
54
|
-
| `description`
|
|
55
|
-
| `requestRunnerOptions`
|
|
51
|
+
| Option | Description |
|
|
52
|
+
| :---------------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
53
|
+
| `namePrefix` | Enter a name prefix that will be used as a constant part of the unique name. By default, `sectester`. |
|
|
54
|
+
| `description` | Set a short description of the Repeater. |
|
|
55
|
+
| `requestRunnerOptions` | Custom the request runner settings that will be used to execute requests to your application. |
|
|
56
|
+
| `projectId` | Specify the project ID to associate the Repeater with. |
|
|
57
|
+
| `disableRandomNameGeneration` | Disable random name generation for the Repeater's name. |
|
|
56
58
|
|
|
57
59
|
The default `requestRunnerOptions` is as follows:
|
|
58
60
|
|
|
@@ -93,6 +95,33 @@ export interface RequestRunnerOptions {
|
|
|
93
95
|
}
|
|
94
96
|
```
|
|
95
97
|
|
|
98
|
+
The `RepeaterFactory` also provides a method to create a `Repeater` instance using an existing repeater ID. You can use the `createRepeaterFromExisting` method to accomplish this:
|
|
99
|
+
|
|
100
|
+
```ts
|
|
101
|
+
const existingRepeaterId = '<your repater ID>';
|
|
102
|
+
const repeater = await repeaterFactory.createRepeaterFromExisting(
|
|
103
|
+
existingRepeaterId
|
|
104
|
+
);
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
This method retrieves the existing repeater's details from the cloud using its ID and returns a `Repeater` instance associated with the specified ID.
|
|
108
|
+
|
|
109
|
+
You can also customize the request runner options for the existing repeater by passing them as options:
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
const existingRepeaterId = '<your repater ID>';
|
|
113
|
+
const repeater = await repeaterFactory.createRepeaterFromExisting(
|
|
114
|
+
existingRepeaterId,
|
|
115
|
+
{
|
|
116
|
+
requestRunnerOptions: {
|
|
117
|
+
timeout: 10000,
|
|
118
|
+
maxContentLength: 200,
|
|
119
|
+
allowedMimes: ['text/html']
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
```
|
|
124
|
+
|
|
96
125
|
The `Repeater` instance provides the `start` method. This method is required to establish a connection with the Bright cloud engine and interact with other services.
|
|
97
126
|
|
|
98
127
|
```ts
|
|
@@ -164,7 +193,7 @@ container.register(RequestRunner, {
|
|
|
164
193
|
## Limitations
|
|
165
194
|
|
|
166
195
|
Custom scripts and self-signed certificates
|
|
167
|
-
(see [
|
|
196
|
+
(see [Bright CLI](https://www.npmjs.com/package/@brightsec/cli)) are not supported yet.
|
|
168
197
|
|
|
169
198
|
## License
|
|
170
199
|
|
package/package.json
CHANGED
|
@@ -3,6 +3,9 @@ import { CommandDispatcher } from '@sectester/core';
|
|
|
3
3
|
export declare class DefaultRepeatersManager implements RepeatersManager {
|
|
4
4
|
private readonly commandDispatcher;
|
|
5
5
|
constructor(commandDispatcher: CommandDispatcher);
|
|
6
|
+
getRepeater(repeaterId: string): Promise<{
|
|
7
|
+
repeaterId: string;
|
|
8
|
+
}>;
|
|
6
9
|
createRepeater({ projectId, ...options }: {
|
|
7
10
|
name: string;
|
|
8
11
|
description?: string;
|
|
@@ -9,13 +9,20 @@ let DefaultRepeatersManager = class DefaultRepeatersManager {
|
|
|
9
9
|
constructor(commandDispatcher) {
|
|
10
10
|
this.commandDispatcher = commandDispatcher;
|
|
11
11
|
}
|
|
12
|
+
async getRepeater(repeaterId) {
|
|
13
|
+
const repeater = await this.commandDispatcher.execute(new commands_1.GetRepeaterRequest(repeaterId));
|
|
14
|
+
if (!(repeater === null || repeater === void 0 ? void 0 : repeater.id)) {
|
|
15
|
+
throw new Error('Cannot find repeater');
|
|
16
|
+
}
|
|
17
|
+
return { repeaterId: repeater.id };
|
|
18
|
+
}
|
|
12
19
|
async createRepeater({ projectId, ...options }) {
|
|
13
20
|
const repeater = await this.commandDispatcher.execute(new commands_1.CreateRepeaterRequest({
|
|
14
21
|
...options,
|
|
15
22
|
...(projectId ? { projectIds: [projectId] } : {})
|
|
16
23
|
}));
|
|
17
24
|
if (!(repeater === null || repeater === void 0 ? void 0 : repeater.id)) {
|
|
18
|
-
throw new Error('Cannot
|
|
25
|
+
throw new Error('Cannot create a new repeater.');
|
|
19
26
|
}
|
|
20
27
|
return { repeaterId: repeater.id };
|
|
21
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultRepeatersManager.js","sourceRoot":"","sources":["../../../../../packages/repeater/src/api/DefaultRepeatersManager.ts"],"names":[],"mappings":";;;;AACA,
|
|
1
|
+
{"version":3,"file":"DefaultRepeatersManager.js","sourceRoot":"","sources":["../../../../../packages/repeater/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,CAAC;CACF,CAAA;AA/CY,uBAAuB;IADnC,IAAA,qBAAU,GAAE;IAGR,mBAAA,IAAA,iBAAM,EAAC,wBAAiB,CAAC,CAAA;;GAFjB,uBAAuB,CA+CnC;AA/CY,0DAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RepeatersManager.js","sourceRoot":"","sources":["../../../../../packages/repeater/src/api/RepeatersManager.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"RepeatersManager.js","sourceRoot":"","sources":["../../../../../packages/repeater/src/api/RepeatersManager.ts"],"names":[],"mappings":";;;AAYa,QAAA,gBAAgB,GAAkB,MAAM,CAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HttpRequest } from '@sectester/bus';
|
|
2
|
+
export interface GetRepeaterResponsePayload {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
projectIds: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare class GetRepeaterRequest extends HttpRequest<undefined, GetRepeaterResponsePayload> {
|
|
8
|
+
constructor(repeaterId: string);
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetRepeaterRequest = void 0;
|
|
4
|
+
const bus_1 = require("@sectester/bus");
|
|
5
|
+
class GetRepeaterRequest extends bus_1.HttpRequest {
|
|
6
|
+
constructor(repeaterId) {
|
|
7
|
+
super({
|
|
8
|
+
url: `/api/v1/repeaters/${repeaterId}`,
|
|
9
|
+
method: 'GET',
|
|
10
|
+
payload: undefined
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.GetRepeaterRequest = GetRepeaterRequest;
|
|
15
|
+
//# sourceMappingURL=GetRepeaterRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetRepeaterRequest.js","sourceRoot":"","sources":["../../../../../../packages/repeater/src/api/commands/GetRepeaterRequest.ts"],"names":[],"mappings":";;;AAAA,wCAA6C;AAQ7C,MAAa,kBAAmB,SAAQ,iBAGvC;IACC,YAAY,UAAkB;QAC5B,KAAK,CAAC;YACJ,GAAG,EAAE,qBAAqB,UAAU,EAAE;YACtC,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,SAAS;SACnB,CAAC,CAAC;IACL,CAAC;CACF;AAXD,gDAWC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeleteRepeaterRequest = exports.CreateRepeaterRequest = void 0;
|
|
3
|
+
exports.GetRepeaterRequest = exports.DeleteRepeaterRequest = exports.CreateRepeaterRequest = void 0;
|
|
4
4
|
var CreateRepeaterRequest_1 = require("./CreateRepeaterRequest");
|
|
5
5
|
Object.defineProperty(exports, "CreateRepeaterRequest", { enumerable: true, get: function () { return CreateRepeaterRequest_1.CreateRepeaterRequest; } });
|
|
6
6
|
var DeleteRepeaterRequest_1 = require("./DeleteRepeaterRequest");
|
|
7
7
|
Object.defineProperty(exports, "DeleteRepeaterRequest", { enumerable: true, get: function () { return DeleteRepeaterRequest_1.DeleteRepeaterRequest; } });
|
|
8
|
+
var GetRepeaterRequest_1 = require("./GetRepeaterRequest");
|
|
9
|
+
Object.defineProperty(exports, "GetRepeaterRequest", { enumerable: true, get: function () { return GetRepeaterRequest_1.GetRepeaterRequest; } });
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/repeater/src/api/commands/index.ts"],"names":[],"mappings":";;;AAAA,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/repeater/src/api/commands/index.ts"],"names":[],"mappings":";;;AAAA,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA"}
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import { Repeater } from './Repeater';
|
|
2
2
|
import { RepeaterOptions } from './RepeaterOptions';
|
|
3
|
+
import { RepeaterRequestRunnerOptions } from './RepeaterRequestRunnerOptions';
|
|
3
4
|
import { Configuration } from '@sectester/core';
|
|
4
5
|
/**
|
|
5
6
|
* A factory that is able to create a dedicated instance of the repeater with a bus and other dependencies.
|
|
6
7
|
*/
|
|
7
8
|
export declare class RepeaterFactory {
|
|
8
9
|
private readonly configuration;
|
|
10
|
+
private readonly MAX_NAME_LENGTH;
|
|
9
11
|
private readonly DEFAULT_RUNNER_OPTIONS;
|
|
10
12
|
private readonly container;
|
|
11
13
|
private readonly repeatersManager;
|
|
12
14
|
private readonly eventBusFactory;
|
|
13
15
|
constructor(configuration: Configuration);
|
|
14
|
-
createRepeater({ projectId,
|
|
16
|
+
createRepeater({ projectId, description, disableRandomNameGeneration, namePrefix, ...requestRunnerOptions }?: RepeaterOptions): Promise<Repeater>;
|
|
17
|
+
createRepeaterFromExisting(repeaterId: string, options?: RepeaterRequestRunnerOptions): Promise<Repeater>;
|
|
18
|
+
private createRepeaterInstance;
|
|
19
|
+
private generateName;
|
|
15
20
|
private registerRequestRunners;
|
|
16
21
|
private registerRequestRunnerOptions;
|
|
17
22
|
private registerRequestRunner;
|
|
@@ -15,6 +15,7 @@ const tsyringe_1 = require("tsyringe");
|
|
|
15
15
|
let RepeaterFactory = class RepeaterFactory {
|
|
16
16
|
constructor(configuration) {
|
|
17
17
|
this.configuration = configuration;
|
|
18
|
+
this.MAX_NAME_LENGTH = 80;
|
|
18
19
|
this.DEFAULT_RUNNER_OPTIONS = {
|
|
19
20
|
timeout: 30000,
|
|
20
21
|
maxContentLength: 100,
|
|
@@ -42,19 +43,22 @@ let RepeaterFactory = class RepeaterFactory {
|
|
|
42
43
|
this.eventBusFactory =
|
|
43
44
|
this.container.resolve(bus_1.EventBusFactory);
|
|
44
45
|
}
|
|
45
|
-
async createRepeater({ projectId,
|
|
46
|
-
namePrefix
|
|
47
|
-
}) {
|
|
48
|
-
var _a;
|
|
49
|
-
if (namePrefix && namePrefix.length > 44) {
|
|
50
|
-
throw new Error('Name prefix must be less than 44 characters.');
|
|
51
|
-
}
|
|
52
|
-
this.registerRequestRunners(requestRunners, requestRunnerOptions);
|
|
46
|
+
async createRepeater({ projectId, description, disableRandomNameGeneration, namePrefix = 'sectester', ...requestRunnerOptions } = {}) {
|
|
47
|
+
const name = this.generateName(namePrefix, disableRandomNameGeneration);
|
|
53
48
|
const { repeaterId } = await this.repeatersManager.createRepeater({
|
|
54
49
|
description,
|
|
55
50
|
projectId,
|
|
56
|
-
name
|
|
51
|
+
name
|
|
57
52
|
});
|
|
53
|
+
return this.createRepeaterInstance(repeaterId, requestRunnerOptions);
|
|
54
|
+
}
|
|
55
|
+
async createRepeaterFromExisting(repeaterId, options) {
|
|
56
|
+
await this.repeatersManager.getRepeater(repeaterId);
|
|
57
|
+
return this.createRepeaterInstance(repeaterId, options);
|
|
58
|
+
}
|
|
59
|
+
async createRepeaterInstance(repeaterId, { requestRunnerOptions, requestRunners = [request_runner_1.HttpRequestRunner, request_runner_1.WsRequestRunner] } = {}) {
|
|
60
|
+
var _a;
|
|
61
|
+
this.registerRequestRunners(requestRunners, requestRunnerOptions);
|
|
58
62
|
const bus = await this.eventBusFactory.create(repeaterId);
|
|
59
63
|
await ((_a = bus.init) === null || _a === void 0 ? void 0 : _a.call(bus));
|
|
60
64
|
return new Repeater_1.Repeater({
|
|
@@ -63,6 +67,16 @@ let RepeaterFactory = class RepeaterFactory {
|
|
|
63
67
|
configuration: this.configuration
|
|
64
68
|
});
|
|
65
69
|
}
|
|
70
|
+
generateName(namePrefix, disableRandomNameGeneration = false) {
|
|
71
|
+
const normalizedPrefix = namePrefix === null || namePrefix === void 0 ? void 0 : namePrefix.trim();
|
|
72
|
+
const randomPostfix = disableRandomNameGeneration ? '' : `-${(0, uuid_1.v4)()}`;
|
|
73
|
+
const name = `${normalizedPrefix}${randomPostfix}`;
|
|
74
|
+
if (name.length > this.MAX_NAME_LENGTH) {
|
|
75
|
+
const maxPrefixLength = this.MAX_NAME_LENGTH - randomPostfix.length;
|
|
76
|
+
throw new Error(`Name prefix must be less than or equal to ${maxPrefixLength} characters.`);
|
|
77
|
+
}
|
|
78
|
+
return name;
|
|
79
|
+
}
|
|
66
80
|
registerRequestRunners(requestRunners, requestRunnerOptions) {
|
|
67
81
|
this.registerRequestRunnerOptions(requestRunnerOptions);
|
|
68
82
|
requestRunners === null || requestRunners === void 0 ? void 0 : requestRunners.forEach(runner => this.registerRequestRunner(runner));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RepeaterFactory.js","sourceRoot":"","sources":["../../../../../packages/repeater/src/lib/RepeaterFactory.ts"],"names":[],"mappings":";;;;AAAA,yCAAsC;AACtC,sDAK2B;AAE3B,gCAA0C;AAC1C,gCAAyC;
|
|
1
|
+
{"version":3,"file":"RepeaterFactory.js","sourceRoot":"","sources":["../../../../../packages/repeater/src/lib/RepeaterFactory.ts"],"names":[],"mappings":";;;;AAAA,yCAAsC;AACtC,sDAK2B;AAE3B,gCAA0C;AAC1C,gCAAyC;AAEzC,0CAAgD;AAChD,+BAAoC;AACpC,uCAA2D;AAE3D;;GAEG;AAEH,IAAa,eAAe,GAA5B,MAAa,eAAe;IA2B1B,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QA1BxC,oBAAe,GAAG,EAAE,CAAC;QACrB,2BAAsB,GAAmC;YACxE,OAAO,EAAE,KAAK;YACd,gBAAgB,EAAE,GAAG;YACrB,eAAe,EAAE,KAAK;YACtB,YAAY,EAAE;gBACZ,WAAW;gBACX,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AAC,sBAAsB;gBAC9B,GAAG,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC;aACnB;SACF,CAAC,CAAC;IACL,CAAC;IAEO,qBAAqB,CAC3B,MAAmE;QAEnE,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;YAChC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,8BAAa,EAAE;gBACrC,QAAQ,EAAE,MAAM;aACjB,CAAC,CAAC;SACJ;aAAM;YACL,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,8BAAa,EAAE;gBACrC,QAAQ,EAAE,MAAM;aACjB,CAAC,CAAC;SACJ;IACH,CAAC;CACF,CAAA;AAzIY,eAAe;IAD3B,IAAA,qBAAU,GAAE;6CA4BiC,oBAAa;GA3B9C,eAAe,CAyI3B;AAzIY,0CAAe"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface RepeaterOptions {
|
|
1
|
+
import { RepeaterRequestRunnerOptions } from './RepeaterRequestRunnerOptions';
|
|
2
|
+
export interface RepeaterOptions extends RepeaterRequestRunnerOptions {
|
|
3
3
|
namePrefix?: string;
|
|
4
4
|
projectId?: string;
|
|
5
5
|
description?: string;
|
|
6
|
-
|
|
7
|
-
requestRunners?: (RequestRunner | {
|
|
8
|
-
new (...args: any[]): RequestRunner;
|
|
9
|
-
})[];
|
|
6
|
+
disableRandomNameGeneration?: boolean;
|
|
10
7
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RepeaterRequestRunnerOptions.js","sourceRoot":"","sources":["../../../../../packages/repeater/src/lib/RepeaterRequestRunnerOptions.ts"],"names":[],"mappings":""}
|
package/src/lib/index.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ import './register';
|
|
|
2
2
|
export { Repeater, RunningStatus } from './Repeater';
|
|
3
3
|
export { RepeaterFactory } from './RepeaterFactory';
|
|
4
4
|
export { RepeaterOptions } from './RepeaterOptions';
|
|
5
|
+
export { RepeaterRequestRunnerOptions } from './RepeaterRequestRunnerOptions';
|
|
5
6
|
export { RepeaterStatus } from '../models/RepeaterStatus';
|