Add <%br= %> jqhtml syntax docs, class override detection, npm update
Document event handler placement and model fetch clarification 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1
node_modules/ws/lib/constants.js
generated
vendored
1
node_modules/ws/lib/constants.js
generated
vendored
@@ -7,6 +7,7 @@ if (hasBlob) BINARY_TYPES.push('blob');
|
||||
|
||||
module.exports = {
|
||||
BINARY_TYPES,
|
||||
CLOSE_TIMEOUT: 30000,
|
||||
EMPTY_BUFFER: Buffer.alloc(0),
|
||||
GUID: '258EAFA5-E914-47DA-95CA-C5AB0DC85B11',
|
||||
hasBlob,
|
||||
|
||||
6
node_modules/ws/lib/websocket-server.js
generated
vendored
6
node_modules/ws/lib/websocket-server.js
generated
vendored
@@ -11,7 +11,7 @@ const extension = require('./extension');
|
||||
const PerMessageDeflate = require('./permessage-deflate');
|
||||
const subprotocol = require('./subprotocol');
|
||||
const WebSocket = require('./websocket');
|
||||
const { GUID, kWebSocket } = require('./constants');
|
||||
const { CLOSE_TIMEOUT, GUID, kWebSocket } = require('./constants');
|
||||
|
||||
const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
|
||||
|
||||
@@ -38,6 +38,9 @@ class WebSocketServer extends EventEmitter {
|
||||
* pending connections
|
||||
* @param {Boolean} [options.clientTracking=true] Specifies whether or not to
|
||||
* track clients
|
||||
* @param {Number} [options.closeTimeout=30000] Duration in milliseconds to
|
||||
* wait for the closing handshake to finish after `websocket.close()` is
|
||||
* called
|
||||
* @param {Function} [options.handleProtocols] A hook to handle protocols
|
||||
* @param {String} [options.host] The hostname where to bind the server
|
||||
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
||||
@@ -67,6 +70,7 @@ class WebSocketServer extends EventEmitter {
|
||||
perMessageDeflate: false,
|
||||
handleProtocols: null,
|
||||
clientTracking: true,
|
||||
closeTimeout: CLOSE_TIMEOUT,
|
||||
verifyClient: null,
|
||||
noServer: false,
|
||||
backlog: null, // use default (511 as implemented in net.js)
|
||||
|
||||
21
node_modules/ws/lib/websocket.js
generated
vendored
21
node_modules/ws/lib/websocket.js
generated
vendored
@@ -18,6 +18,7 @@ const { isBlob } = require('./validation');
|
||||
|
||||
const {
|
||||
BINARY_TYPES,
|
||||
CLOSE_TIMEOUT,
|
||||
EMPTY_BUFFER,
|
||||
GUID,
|
||||
kForOnEventAttribute,
|
||||
@@ -32,7 +33,6 @@ const {
|
||||
const { format, parse } = require('./extension');
|
||||
const { toBuffer } = require('./buffer-util');
|
||||
|
||||
const closeTimeout = 30 * 1000;
|
||||
const kAborted = Symbol('kAborted');
|
||||
const protocolVersions = [8, 13];
|
||||
const readyStates = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'];
|
||||
@@ -88,6 +88,7 @@ class WebSocket extends EventEmitter {
|
||||
initAsClient(this, address, protocols, options);
|
||||
} else {
|
||||
this._autoPong = options.autoPong;
|
||||
this._closeTimeout = options.closeTimeout;
|
||||
this._isServer = true;
|
||||
}
|
||||
}
|
||||
@@ -629,6 +630,8 @@ module.exports = WebSocket;
|
||||
* times in the same tick
|
||||
* @param {Boolean} [options.autoPong=true] Specifies whether or not to
|
||||
* automatically send a pong in response to a ping
|
||||
* @param {Number} [options.closeTimeout=30000] Duration in milliseconds to wait
|
||||
* for the closing handshake to finish after `websocket.close()` is called
|
||||
* @param {Function} [options.finishRequest] A function which can be used to
|
||||
* customize the headers of each http request before it is sent
|
||||
* @param {Boolean} [options.followRedirects=false] Whether or not to follow
|
||||
@@ -655,6 +658,7 @@ function initAsClient(websocket, address, protocols, options) {
|
||||
const opts = {
|
||||
allowSynchronousEvents: true,
|
||||
autoPong: true,
|
||||
closeTimeout: CLOSE_TIMEOUT,
|
||||
protocolVersion: protocolVersions[1],
|
||||
maxPayload: 100 * 1024 * 1024,
|
||||
skipUTF8Validation: false,
|
||||
@@ -673,6 +677,7 @@ function initAsClient(websocket, address, protocols, options) {
|
||||
};
|
||||
|
||||
websocket._autoPong = opts.autoPong;
|
||||
websocket._closeTimeout = opts.closeTimeout;
|
||||
|
||||
if (!protocolVersions.includes(opts.protocolVersion)) {
|
||||
throw new RangeError(
|
||||
@@ -1290,7 +1295,7 @@ function senderOnError(err) {
|
||||
function setCloseTimer(websocket) {
|
||||
websocket._closeTimer = setTimeout(
|
||||
websocket._socket.destroy.bind(websocket._socket),
|
||||
closeTimeout
|
||||
websocket._closeTimeout
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1308,23 +1313,23 @@ function socketOnClose() {
|
||||
|
||||
websocket._readyState = WebSocket.CLOSING;
|
||||
|
||||
let chunk;
|
||||
|
||||
//
|
||||
// The close frame might not have been received or the `'end'` event emitted,
|
||||
// for example, if the socket was destroyed due to an error. Ensure that the
|
||||
// `receiver` stream is closed after writing any remaining buffered data to
|
||||
// it. If the readable side of the socket is in flowing mode then there is no
|
||||
// buffered data as everything has been already written and `readable.read()`
|
||||
// will return `null`. If instead, the socket is paused, any possible buffered
|
||||
// data will be read as a single chunk.
|
||||
// buffered data as everything has been already written. If instead, the
|
||||
// socket is paused, any possible buffered data will be read as a single
|
||||
// chunk.
|
||||
//
|
||||
if (
|
||||
!this._readableState.endEmitted &&
|
||||
!websocket._closeFrameReceived &&
|
||||
!websocket._receiver._writableState.errorEmitted &&
|
||||
(chunk = websocket._socket.read()) !== null
|
||||
this._readableState.length !== 0
|
||||
) {
|
||||
const chunk = this.read(this._readableState.length);
|
||||
|
||||
websocket._receiver.write(chunk);
|
||||
}
|
||||
|
||||
|
||||
2
node_modules/ws/package.json
generated
vendored
2
node_modules/ws/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ws",
|
||||
"version": "8.18.3",
|
||||
"version": "8.19.0",
|
||||
"description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js",
|
||||
"keywords": [
|
||||
"HyBi",
|
||||
|
||||
Reference in New Issue
Block a user