configurapi-handler-ws 1.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/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # configurapi-handler-ws
2
+
3
+ Configurapi request handlers for websocket
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "configurapi-handler-ws",
3
+ "version": "1.0.0",
4
+ "main": "src/index",
5
+ "files": [
6
+ "src/*",
7
+ "types.d.ts"
8
+ ],
9
+ "types": "types.d.ts",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+ssh://git@gitlab.com/mappies/configurapi-handler-ws.git"
13
+ },
14
+ "keywords": [
15
+ "configurapi"
16
+ ],
17
+ "author": "Nithiwat Kampanya",
18
+ "license": "ISC",
19
+ "bugs": {
20
+ "url": "https://gitlab.com/mappies/configurapi-handler-ws/issues"
21
+ },
22
+ "homepage": "https://gitlab.com/mappies/configurapi-handler-ws#readme",
23
+ "description": ""
24
+ }
package/src/index.js ADDED
@@ -0,0 +1,4 @@
1
+
2
+ module.exports = {
3
+ StreamResponse: require('./StreamResponse'),
4
+ };
@@ -0,0 +1,9 @@
1
+ const Response = require('configurapi').Response;
2
+
3
+ module.exports = class StreamResponse extends Response
4
+ {
5
+ constructor(stream, statusCode = 200, headers = {})
6
+ {
7
+ super(stream, statusCode, headers);
8
+ }
9
+ };
package/types.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import { Response } from "configurapi";
2
+ import type { Readable } from 'node:stream';
3
+
4
+ declare class StreamResponse extends Response
5
+ {
6
+ constructor(stream: Readable, statusCode?: number, headers?: Record<string, string>);
7
+ }
8
+