@furystack/rest-service 4.1.6 → 4.1.8
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.
|
@@ -16,11 +16,11 @@ describe('ServerResponse extensions', () => {
|
|
|
16
16
|
const socket = new net_1.Socket();
|
|
17
17
|
const msg = new http_1.ServerResponse(new http_1.IncomingMessage(socket));
|
|
18
18
|
msg.writeHead = jest.fn();
|
|
19
|
-
msg.end = (chunk) => {
|
|
19
|
+
msg.end = ((chunk) => {
|
|
20
20
|
expect(chunk).toBe(JSON.stringify(jsonValue));
|
|
21
21
|
expect(msg.writeHead).toBeCalledWith(200, { 'Content-Type': 'application/json' });
|
|
22
22
|
done();
|
|
23
|
-
};
|
|
23
|
+
});
|
|
24
24
|
msg.sendActionResult((0, request_action_implementation_1.JsonResult)(jsonValue));
|
|
25
25
|
});
|
|
26
26
|
it('Should send the plain TEXT response with the correct Content Type header and default status', (done) => {
|
|
@@ -28,11 +28,11 @@ describe('ServerResponse extensions', () => {
|
|
|
28
28
|
const socket = new net_1.Socket();
|
|
29
29
|
const msg = new http_1.ServerResponse(new http_1.IncomingMessage(socket));
|
|
30
30
|
msg.writeHead = jest.fn();
|
|
31
|
-
msg.end = (chunk) => {
|
|
31
|
+
msg.end = ((chunk) => {
|
|
32
32
|
expect(chunk).toBe(textValue);
|
|
33
33
|
expect(msg.writeHead).toBeCalledWith(200, { 'Content-Type': 'plain/text' });
|
|
34
34
|
done();
|
|
35
|
-
};
|
|
35
|
+
});
|
|
36
36
|
msg.sendActionResult((0, request_action_implementation_1.PlainTextResult)(textValue));
|
|
37
37
|
});
|
|
38
38
|
it('Should skip sending on BypassResult', () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-response-extensions.spec.js","sourceRoot":"","sources":["../src/server-response-extensions.spec.ts"],"names":[],"mappings":";;AAAA,6BAA4B;AAC5B,+BAAsD;AACtD,wCAAqC;AACrC,mFAA2F;AAE3F,QAAQ,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CAAC,SAAS,CAAC,CAAA;gBAC7B,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,CAAA;gBAC3E,IAAI,EAAE,CAAA;YACR,CAAC,CAAsB,CAAA;YAEvB,GAAG,CAAC,gBAAgB,CAAC,IAAA,+CAAe,EAAC,SAAS,CAAC,CAAC,CAAA;QAClD,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;YAC7C,MAAM,MAAM,GAAG,IAAI,YAAM,EAAE,CAAA;YAC3B,MAAM,GAAG,GAAG,IAAI,qBAAc,CAAC,IAAI,sBAAe,CAAC,MAAM,CAAC,CAAC,CAAA;YAC3D,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;YACzB,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;YAEnB,GAAG,CAAC,gBAAgB,CAAC,IAAA,4CAAY,GAAE,CAAC,CAAA;YACpC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,CAAA;YACtC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,CAAA;QAClC,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@furystack/rest-service",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.8",
|
|
4
4
|
"description": "Repository implementation for FuryStack",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/furystack/furystack",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@furystack/core": "^10.4.
|
|
35
|
-
"@furystack/inject": "^5.0.
|
|
36
|
-
"@furystack/logging": "^2.0.
|
|
37
|
-
"@furystack/repository": "^5.0.
|
|
38
|
-
"@furystack/rest": "^3.1.
|
|
39
|
-
"@furystack/utils": "^2.0.
|
|
34
|
+
"@furystack/core": "^10.4.4",
|
|
35
|
+
"@furystack/inject": "^5.0.2",
|
|
36
|
+
"@furystack/logging": "^2.0.86",
|
|
37
|
+
"@furystack/repository": "^5.0.28",
|
|
38
|
+
"@furystack/rest": "^3.1.6",
|
|
39
|
+
"@furystack/utils": "^2.0.2",
|
|
40
40
|
"ajv": "^8.8.2",
|
|
41
41
|
"ajv-formats": "^2.1.1",
|
|
42
42
|
"hash.js": "^1.1.7",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"uuid": "^8.3.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@types/jest": "^27.0
|
|
50
|
-
"@types/node": "^17.0.
|
|
51
|
-
"@types/uuid": "^8.3.
|
|
49
|
+
"@types/jest": "^27.4.0",
|
|
50
|
+
"@types/node": "^17.0.8",
|
|
51
|
+
"@types/uuid": "^8.3.4",
|
|
52
52
|
"got": "^11.8.3"
|
|
53
53
|
},
|
|
54
54
|
"typings": "./dist/index.d.ts",
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "302c069cac7bc920a20649ee38e574b0e7adcb9e"
|
|
56
56
|
}
|
|
@@ -16,11 +16,11 @@ describe('ServerResponse extensions', () => {
|
|
|
16
16
|
const socket = new Socket()
|
|
17
17
|
const msg = new ServerResponse(new IncomingMessage(socket))
|
|
18
18
|
msg.writeHead = jest.fn()
|
|
19
|
-
msg.end = (chunk
|
|
19
|
+
msg.end = ((chunk: any) => {
|
|
20
20
|
expect(chunk).toBe(JSON.stringify(jsonValue))
|
|
21
21
|
expect(msg.writeHead).toBeCalledWith(200, { 'Content-Type': 'application/json' })
|
|
22
22
|
done()
|
|
23
|
-
}
|
|
23
|
+
}) as typeof msg['end']
|
|
24
24
|
|
|
25
25
|
msg.sendActionResult(JsonResult(jsonValue))
|
|
26
26
|
})
|
|
@@ -30,11 +30,11 @@ describe('ServerResponse extensions', () => {
|
|
|
30
30
|
const socket = new Socket()
|
|
31
31
|
const msg = new ServerResponse(new IncomingMessage(socket))
|
|
32
32
|
msg.writeHead = jest.fn()
|
|
33
|
-
msg.end = (chunk
|
|
33
|
+
msg.end = ((chunk: any) => {
|
|
34
34
|
expect(chunk).toBe(textValue)
|
|
35
35
|
expect(msg.writeHead).toBeCalledWith(200, { 'Content-Type': 'plain/text' })
|
|
36
36
|
done()
|
|
37
|
-
}
|
|
37
|
+
}) as typeof msg['end']
|
|
38
38
|
|
|
39
39
|
msg.sendActionResult(PlainTextResult(textValue))
|
|
40
40
|
})
|