configurapi-runner-ws 1.1.0 → 1.3.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 +2 -1
- package/package.json +1 -1
- package/src/wsAdapter.js +2 -0
package/README.md
CHANGED
|
@@ -8,4 +8,5 @@
|
|
|
8
8
|
- The last chunk will have `X-Stream: done` header.
|
|
9
9
|
- Check `X-Stream-ID: $id` header for the stream ID. A chunk belonging to the same stream will have the same stream ID.
|
|
10
10
|
- connectionId is available at `event.request.headers.connectionId`
|
|
11
|
-
- `on_connect` and `on_disconnect` will be called when a new connection is made or closed.
|
|
11
|
+
- `on_connect` and `on_disconnect` will be called when a new connection is made or closed.
|
|
12
|
+
- Use `Request.headers.pushFunction` to send an out-of-band message. The function is async and accepts an object to send back to the caller.
|
package/package.json
CHANGED
package/src/wsAdapter.js
CHANGED
|
@@ -146,9 +146,11 @@ module.exports = {
|
|
|
146
146
|
request.headers = data.headers || {};
|
|
147
147
|
request.name = data.name || undefined;
|
|
148
148
|
request.query = data.query || {};
|
|
149
|
+
request.params = data.params || {};
|
|
149
150
|
request.payload = data.payload || undefined;
|
|
150
151
|
|
|
151
152
|
request.headers['connectionId'] = ws.connectionId;
|
|
153
|
+
request.headers['pushFunction'] = async (data)=>await this.write(ws, data);
|
|
152
154
|
|
|
153
155
|
return request;
|
|
154
156
|
}
|