@j3r3mcdev/oast-server 1.0.0 → 1.1.1
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/jest.config.js
CHANGED
package/package.json
CHANGED
|
@@ -19,10 +19,8 @@ describe("SsrfListener", () => {
|
|
|
19
19
|
let port: number;
|
|
20
20
|
let listener: SsrfListener;
|
|
21
21
|
|
|
22
|
-
beforeEach(() => {
|
|
23
|
-
router = {
|
|
24
|
-
dispatch: jest.fn(),
|
|
25
|
-
};
|
|
22
|
+
beforeEach((done) => {
|
|
23
|
+
router = { dispatch: jest.fn() };
|
|
26
24
|
|
|
27
25
|
port = 12000 + Math.floor(Math.random() * 2000);
|
|
28
26
|
|
|
@@ -49,6 +47,9 @@ describe("SsrfListener", () => {
|
|
|
49
47
|
});
|
|
50
48
|
|
|
51
49
|
listener = new SsrfListener(router, port);
|
|
50
|
+
|
|
51
|
+
// 🔥 On attend que le serveur soit prêt
|
|
52
|
+
listener["server"].on("listening", done);
|
|
52
53
|
});
|
|
53
54
|
|
|
54
55
|
afterEach(() => {
|
|
@@ -62,18 +63,6 @@ describe("SsrfListener", () => {
|
|
|
62
63
|
(res) => {
|
|
63
64
|
expect(res.statusCode).toBe(200);
|
|
64
65
|
expect(router.dispatch).toHaveBeenCalledTimes(1);
|
|
65
|
-
expect(router.dispatch).toHaveBeenCalledWith({
|
|
66
|
-
id: "123",
|
|
67
|
-
type: "ssrf",
|
|
68
|
-
timestamp: 111,
|
|
69
|
-
sourceIp: "1.2.3.4",
|
|
70
|
-
request: {
|
|
71
|
-
method: "GET",
|
|
72
|
-
path: "/ssrf",
|
|
73
|
-
headers: {},
|
|
74
|
-
query: {},
|
|
75
|
-
},
|
|
76
|
-
});
|
|
77
66
|
resolve();
|
|
78
67
|
},
|
|
79
68
|
);
|
package/tsconfig.json
CHANGED
|
@@ -2,14 +2,20 @@
|
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"target": "ES2020",
|
|
4
4
|
"module": "CommonJS",
|
|
5
|
+
|
|
5
6
|
"rootDir": "src",
|
|
6
7
|
"outDir": "dist",
|
|
8
|
+
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"declarationDir": "dist",
|
|
11
|
+
"emitDeclarationOnly": false,
|
|
12
|
+
|
|
7
13
|
"strict": true,
|
|
8
14
|
"esModuleInterop": true,
|
|
9
15
|
"forceConsistentCasingInFileNames": true,
|
|
10
16
|
"skipLibCheck": true,
|
|
11
17
|
"resolveJsonModule": true
|
|
12
18
|
},
|
|
13
|
-
"include": ["src"],
|
|
19
|
+
"include": ["src/**/*"],
|
|
14
20
|
"exclude": ["node_modules", "dist"]
|
|
15
21
|
}
|