mirror of
https://github.com/actions/setup-go.git
synced 2026-06-24 08:51:03 +03:00
chore: bump version to 6.5.0 in package.json and package-lock.json (#762)
* chore: bump version to 6.5.0 in package.json and package-lock.json * chore: update README.md for improved clarity and structure * License update
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: semver
|
name: semver
|
||||||
version: 7.7.3
|
version: 7.8.5
|
||||||
type: npm
|
type: npm
|
||||||
summary: The semantic version parser used by npm.
|
summary: The semantic version parser used by npm.
|
||||||
homepage:
|
homepage:
|
||||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: undici
|
name: undici
|
||||||
version: 6.24.1
|
version: 6.27.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: An HTTP/1.1 client, written from scratch for Node.js
|
summary: An HTTP/1.1 client, written from scratch for Node.js
|
||||||
homepage: https://undici.nodejs.org
|
homepage: https://undici.nodejs.org
|
||||||
|
|||||||
Vendored
+305
-110
@@ -22949,8 +22949,6 @@ function defaultFactory (origin, opts) {
|
|||||||
|
|
||||||
class Agent extends DispatcherBase {
|
class Agent extends DispatcherBase {
|
||||||
constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {
|
constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {
|
||||||
super()
|
|
||||||
|
|
||||||
if (typeof factory !== 'function') {
|
if (typeof factory !== 'function') {
|
||||||
throw new InvalidArgumentError('factory must be a function.')
|
throw new InvalidArgumentError('factory must be a function.')
|
||||||
}
|
}
|
||||||
@@ -22963,6 +22961,8 @@ class Agent extends DispatcherBase {
|
|||||||
throw new InvalidArgumentError('maxRedirections must be a positive number')
|
throw new InvalidArgumentError('maxRedirections must be a positive number')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
super(options)
|
||||||
|
|
||||||
if (connect && typeof connect !== 'function') {
|
if (connect && typeof connect !== 'function') {
|
||||||
connect = { ...connect }
|
connect = { ...connect }
|
||||||
}
|
}
|
||||||
@@ -23336,6 +23336,9 @@ const EMPTY_BUF = Buffer.alloc(0)
|
|||||||
const FastBuffer = Buffer[Symbol.species]
|
const FastBuffer = Buffer[Symbol.species]
|
||||||
const addListener = util.addListener
|
const addListener = util.addListener
|
||||||
const removeAllListeners = util.removeAllListeners
|
const removeAllListeners = util.removeAllListeners
|
||||||
|
const kIdleSocketValidation = Symbol('kIdleSocketValidation')
|
||||||
|
const kIdleSocketValidationTimeout = Symbol('kIdleSocketValidationTimeout')
|
||||||
|
const kSocketUsed = Symbol('kSocketUsed')
|
||||||
|
|
||||||
let extractBody
|
let extractBody
|
||||||
|
|
||||||
@@ -23558,29 +23561,71 @@ class Parser {
|
|||||||
|
|
||||||
const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr
|
const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr
|
||||||
|
|
||||||
if (ret === constants.ERROR.PAUSED_UPGRADE) {
|
if (ret !== constants.ERROR.OK) {
|
||||||
this.onUpgrade(data.slice(offset))
|
const body = data.subarray(offset)
|
||||||
} else if (ret === constants.ERROR.PAUSED) {
|
|
||||||
this.paused = true
|
if (ret === constants.ERROR.PAUSED_UPGRADE) {
|
||||||
socket.unshift(data.slice(offset))
|
this.onUpgrade(body)
|
||||||
} else if (ret !== constants.ERROR.OK) {
|
} else if (ret === constants.ERROR.PAUSED) {
|
||||||
const ptr = llhttp.llhttp_get_error_reason(this.ptr)
|
this.paused = true
|
||||||
let message = ''
|
socket.unshift(body)
|
||||||
/* istanbul ignore else: difficult to make a test case for */
|
} else {
|
||||||
if (ptr) {
|
throw this.createError(ret, body)
|
||||||
const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0)
|
|
||||||
message =
|
|
||||||
'Response does not match the HTTP/1.1 protocol (' +
|
|
||||||
Buffer.from(llhttp.memory.buffer, ptr, len).toString() +
|
|
||||||
')'
|
|
||||||
}
|
}
|
||||||
throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset))
|
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
util.destroy(socket, err)
|
util.destroy(socket, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
finish () {
|
||||||
|
assert(currentParser === null)
|
||||||
|
assert(this.ptr != null)
|
||||||
|
assert(!this.paused)
|
||||||
|
|
||||||
|
const { llhttp } = this
|
||||||
|
|
||||||
|
let ret
|
||||||
|
|
||||||
|
try {
|
||||||
|
currentParser = this
|
||||||
|
ret = llhttp.llhttp_finish(this.ptr)
|
||||||
|
} finally {
|
||||||
|
currentParser = null
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ret === constants.ERROR.OK) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ret === constants.ERROR.PAUSED || ret === constants.ERROR.PAUSED_UPGRADE) {
|
||||||
|
this.paused = true
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.createError(ret, EMPTY_BUF)
|
||||||
|
}
|
||||||
|
|
||||||
|
createError (ret, data) {
|
||||||
|
const { llhttp, contentLength, bytesRead } = this
|
||||||
|
|
||||||
|
if (contentLength && bytesRead !== parseInt(contentLength, 10)) {
|
||||||
|
return new ResponseContentLengthMismatchError()
|
||||||
|
}
|
||||||
|
|
||||||
|
const ptr = llhttp.llhttp_get_error_reason(this.ptr)
|
||||||
|
let message = ''
|
||||||
|
if (ptr) {
|
||||||
|
const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0)
|
||||||
|
message =
|
||||||
|
'Response does not match the HTTP/1.1 protocol (' +
|
||||||
|
Buffer.from(llhttp.memory.buffer, ptr, len).toString() +
|
||||||
|
')'
|
||||||
|
}
|
||||||
|
|
||||||
|
return new HTTPParserError(message, constants.ERROR[ret], data)
|
||||||
|
}
|
||||||
|
|
||||||
destroy () {
|
destroy () {
|
||||||
assert(this.ptr != null)
|
assert(this.ptr != null)
|
||||||
assert(currentParser == null)
|
assert(currentParser == null)
|
||||||
@@ -23608,6 +23653,11 @@ class Parser {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (client[kRunning] === 0) {
|
||||||
|
util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
|
||||||
const request = client[kQueue][client[kRunningIdx]]
|
const request = client[kQueue][client[kRunningIdx]]
|
||||||
if (!request) {
|
if (!request) {
|
||||||
return -1
|
return -1
|
||||||
@@ -23711,6 +23761,11 @@ class Parser {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (client[kRunning] === 0) {
|
||||||
|
util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
|
||||||
const request = client[kQueue][client[kRunningIdx]]
|
const request = client[kQueue][client[kRunningIdx]]
|
||||||
|
|
||||||
/* istanbul ignore next: difficult to make a test case for */
|
/* istanbul ignore next: difficult to make a test case for */
|
||||||
@@ -23884,6 +23939,7 @@ class Parser {
|
|||||||
request.onComplete(headers)
|
request.onComplete(headers)
|
||||||
|
|
||||||
client[kQueue][client[kRunningIdx]++] = null
|
client[kQueue][client[kRunningIdx]++] = null
|
||||||
|
socket[kSocketUsed] = true
|
||||||
|
|
||||||
if (socket[kWriting]) {
|
if (socket[kWriting]) {
|
||||||
assert(client[kRunning] === 0)
|
assert(client[kRunning] === 0)
|
||||||
@@ -23942,6 +23998,9 @@ async function connectH1 (client, socket) {
|
|||||||
socket[kWriting] = false
|
socket[kWriting] = false
|
||||||
socket[kReset] = false
|
socket[kReset] = false
|
||||||
socket[kBlocking] = false
|
socket[kBlocking] = false
|
||||||
|
socket[kIdleSocketValidation] = 0
|
||||||
|
socket[kIdleSocketValidationTimeout] = null
|
||||||
|
socket[kSocketUsed] = false
|
||||||
socket[kParser] = new Parser(client, socket, llhttpInstance)
|
socket[kParser] = new Parser(client, socket, llhttpInstance)
|
||||||
|
|
||||||
addListener(socket, 'error', function (err) {
|
addListener(socket, 'error', function (err) {
|
||||||
@@ -23952,8 +24011,11 @@ async function connectH1 (client, socket) {
|
|||||||
// On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded
|
// On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded
|
||||||
// to the user.
|
// to the user.
|
||||||
if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) {
|
if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) {
|
||||||
// We treat all incoming data so for as a valid response.
|
const parserErr = parser.finish()
|
||||||
parser.onMessageComplete()
|
if (parserErr) {
|
||||||
|
this[kError] = parserErr
|
||||||
|
this[kClient][kOnError](parserErr)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23972,8 +24034,10 @@ async function connectH1 (client, socket) {
|
|||||||
const parser = this[kParser]
|
const parser = this[kParser]
|
||||||
|
|
||||||
if (parser.statusCode && !parser.shouldKeepAlive) {
|
if (parser.statusCode && !parser.shouldKeepAlive) {
|
||||||
// We treat all incoming data so far as a valid response.
|
const parserErr = parser.finish()
|
||||||
parser.onMessageComplete()
|
if (parserErr) {
|
||||||
|
util.destroy(this, parserErr)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23983,10 +24047,11 @@ async function connectH1 (client, socket) {
|
|||||||
const client = this[kClient]
|
const client = this[kClient]
|
||||||
const parser = this[kParser]
|
const parser = this[kParser]
|
||||||
|
|
||||||
|
clearIdleSocketValidation(this)
|
||||||
|
|
||||||
if (parser) {
|
if (parser) {
|
||||||
if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) {
|
if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) {
|
||||||
// We treat all incoming data so far as a valid response.
|
this[kError] = parser.finish() || this[kError]
|
||||||
parser.onMessageComplete()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this[kParser].destroy()
|
this[kParser].destroy()
|
||||||
@@ -24049,7 +24114,7 @@ async function connectH1 (client, socket) {
|
|||||||
return socket.destroyed
|
return socket.destroyed
|
||||||
},
|
},
|
||||||
busy (request) {
|
busy (request) {
|
||||||
if (socket[kWriting] || socket[kReset] || socket[kBlocking]) {
|
if (socket[kWriting] || socket[kReset] || socket[kBlocking] || socket[kIdleSocketValidation] === 1) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24087,6 +24152,31 @@ async function connectH1 (client, socket) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearIdleSocketValidation (socket) {
|
||||||
|
if (socket[kIdleSocketValidationTimeout]) {
|
||||||
|
clearTimeout(socket[kIdleSocketValidationTimeout])
|
||||||
|
socket[kIdleSocketValidationTimeout] = null
|
||||||
|
}
|
||||||
|
|
||||||
|
socket[kIdleSocketValidation] = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
function scheduleIdleSocketValidation (client, socket) {
|
||||||
|
socket[kIdleSocketValidation] = 1
|
||||||
|
socket[kIdleSocketValidationTimeout] = setTimeout(() => {
|
||||||
|
socket[kIdleSocketValidationTimeout] = null
|
||||||
|
socket[kIdleSocketValidation] = 2
|
||||||
|
|
||||||
|
if (client[kSocket] === socket && !socket.destroyed) {
|
||||||
|
client[kResume]()
|
||||||
|
}
|
||||||
|
}, 0)
|
||||||
|
socket[kIdleSocketValidationTimeout].unref?.()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {import('./client.js')} client
|
||||||
|
*/
|
||||||
function resumeH1 (client) {
|
function resumeH1 (client) {
|
||||||
const socket = client[kSocket]
|
const socket = client[kSocket]
|
||||||
|
|
||||||
@@ -24101,6 +24191,32 @@ function resumeH1 (client) {
|
|||||||
socket[kNoRef] = false
|
socket[kNoRef] = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (client[kRunning] === 0 && client[kPending] > 0 && socket[kSocketUsed]) {
|
||||||
|
if (socket[kIdleSocketValidation] === 0) {
|
||||||
|
scheduleIdleSocketValidation(client, socket)
|
||||||
|
socket[kParser].readMore()
|
||||||
|
if (socket.destroyed) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (socket[kIdleSocketValidation] === 1) {
|
||||||
|
socket[kParser].readMore()
|
||||||
|
if (socket.destroyed) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (client[kRunning] === 0) {
|
||||||
|
socket[kParser].readMore()
|
||||||
|
if (socket.destroyed) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (client[kSize] === 0) {
|
if (client[kSize] === 0) {
|
||||||
if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) {
|
if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) {
|
||||||
socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE)
|
socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE)
|
||||||
@@ -24194,6 +24310,7 @@ function writeH1 (client, request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const socket = client[kSocket]
|
const socket = client[kSocket]
|
||||||
|
clearIdleSocketValidation(socket)
|
||||||
|
|
||||||
const abort = (err) => {
|
const abort = (err) => {
|
||||||
if (request.aborted || request.completed) {
|
if (request.aborted || request.completed) {
|
||||||
@@ -25515,9 +25632,10 @@ class Client extends DispatcherBase {
|
|||||||
autoSelectFamilyAttemptTimeout,
|
autoSelectFamilyAttemptTimeout,
|
||||||
// h2
|
// h2
|
||||||
maxConcurrentStreams,
|
maxConcurrentStreams,
|
||||||
allowH2
|
allowH2,
|
||||||
|
webSocket
|
||||||
} = {}) {
|
} = {}) {
|
||||||
super()
|
super({ webSocket })
|
||||||
|
|
||||||
if (keepAlive !== undefined) {
|
if (keepAlive !== undefined) {
|
||||||
throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')
|
throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')
|
||||||
@@ -26050,15 +26168,24 @@ const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = __nc
|
|||||||
const kOnDestroyed = Symbol('onDestroyed')
|
const kOnDestroyed = Symbol('onDestroyed')
|
||||||
const kOnClosed = Symbol('onClosed')
|
const kOnClosed = Symbol('onClosed')
|
||||||
const kInterceptedDispatch = Symbol('Intercepted Dispatch')
|
const kInterceptedDispatch = Symbol('Intercepted Dispatch')
|
||||||
|
const kWebSocketOptions = Symbol('webSocketOptions')
|
||||||
|
|
||||||
class DispatcherBase extends Dispatcher {
|
class DispatcherBase extends Dispatcher {
|
||||||
constructor () {
|
constructor (opts) {
|
||||||
super()
|
super()
|
||||||
|
|
||||||
this[kDestroyed] = false
|
this[kDestroyed] = false
|
||||||
this[kOnDestroyed] = null
|
this[kOnDestroyed] = null
|
||||||
this[kClosed] = false
|
this[kClosed] = false
|
||||||
this[kOnClosed] = []
|
this[kOnClosed] = []
|
||||||
|
this[kWebSocketOptions] = opts?.webSocket ?? {}
|
||||||
|
}
|
||||||
|
|
||||||
|
get webSocketOptions () {
|
||||||
|
return {
|
||||||
|
maxFragments: this[kWebSocketOptions].maxFragments ?? 131072,
|
||||||
|
maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get destroyed () {
|
get destroyed () {
|
||||||
@@ -26622,8 +26749,8 @@ const kRemoveClient = Symbol('remove client')
|
|||||||
const kStats = Symbol('stats')
|
const kStats = Symbol('stats')
|
||||||
|
|
||||||
class PoolBase extends DispatcherBase {
|
class PoolBase extends DispatcherBase {
|
||||||
constructor () {
|
constructor (opts) {
|
||||||
super()
|
super(opts)
|
||||||
|
|
||||||
this[kQueue] = new FixedQueue()
|
this[kQueue] = new FixedQueue()
|
||||||
this[kClients] = []
|
this[kClients] = []
|
||||||
@@ -26883,8 +27010,6 @@ class Pool extends PoolBase {
|
|||||||
allowH2,
|
allowH2,
|
||||||
...options
|
...options
|
||||||
} = {}) {
|
} = {}) {
|
||||||
super()
|
|
||||||
|
|
||||||
if (connections != null && (!Number.isFinite(connections) || connections < 0)) {
|
if (connections != null && (!Number.isFinite(connections) || connections < 0)) {
|
||||||
throw new InvalidArgumentError('invalid connections')
|
throw new InvalidArgumentError('invalid connections')
|
||||||
}
|
}
|
||||||
@@ -26909,6 +27034,8 @@ class Pool extends PoolBase {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
super(options)
|
||||||
|
|
||||||
this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool)
|
this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool)
|
||||||
? options.interceptors.Pool
|
? options.interceptors.Pool
|
||||||
: []
|
: []
|
||||||
@@ -31993,32 +32120,25 @@ function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {})
|
|||||||
// If the attribute-name case-insensitively matches the string
|
// If the attribute-name case-insensitively matches the string
|
||||||
// "SameSite", the user agent MUST process the cookie-av as follows:
|
// "SameSite", the user agent MUST process the cookie-av as follows:
|
||||||
|
|
||||||
// 1. Let enforcement be "Default".
|
|
||||||
let enforcement = 'Default'
|
|
||||||
|
|
||||||
const attributeValueLowercase = attributeValue.toLowerCase()
|
const attributeValueLowercase = attributeValue.toLowerCase()
|
||||||
// 2. If cookie-av's attribute-value is a case-insensitive match for
|
|
||||||
// "None", set enforcement to "None".
|
|
||||||
if (attributeValueLowercase.includes('none')) {
|
|
||||||
enforcement = 'None'
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. If cookie-av's attribute-value is a case-insensitive match for
|
// 1. If cookie-av's attribute-value is a case-insensitive match for
|
||||||
// "Strict", set enforcement to "Strict".
|
// "None", append an attribute to the cookie-attribute-list with an
|
||||||
if (attributeValueLowercase.includes('strict')) {
|
// attribute-name of "SameSite" and an attribute-value of "None".
|
||||||
enforcement = 'Strict'
|
if (attributeValueLowercase === 'none') {
|
||||||
|
cookieAttributeList.sameSite = 'None'
|
||||||
|
} else if (attributeValueLowercase === 'strict') {
|
||||||
|
// 2. If cookie-av's attribute-value is a case-insensitive match for
|
||||||
|
// "Strict", append an attribute to the cookie-attribute-list with
|
||||||
|
// an attribute-name of "SameSite" and an attribute-value of
|
||||||
|
// "Strict".
|
||||||
|
cookieAttributeList.sameSite = 'Strict'
|
||||||
|
} else if (attributeValueLowercase === 'lax') {
|
||||||
|
// 3. If cookie-av's attribute-value is a case-insensitive match for
|
||||||
|
// "Lax", append an attribute to the cookie-attribute-list with an
|
||||||
|
// attribute-name of "SameSite" and an attribute-value of "Lax".
|
||||||
|
cookieAttributeList.sameSite = 'Lax'
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. If cookie-av's attribute-value is a case-insensitive match for
|
|
||||||
// "Lax", set enforcement to "Lax".
|
|
||||||
if (attributeValueLowercase.includes('lax')) {
|
|
||||||
enforcement = 'Lax'
|
|
||||||
}
|
|
||||||
|
|
||||||
// 5. Append an attribute to the cookie-attribute-list with an
|
|
||||||
// attribute-name of "SameSite" and an attribute-value of
|
|
||||||
// enforcement.
|
|
||||||
cookieAttributeList.sameSite = enforcement
|
|
||||||
} else {
|
} else {
|
||||||
cookieAttributeList.unparsed ??= []
|
cookieAttributeList.unparsed ??= []
|
||||||
|
|
||||||
@@ -44724,40 +44844,35 @@ const tail = Buffer.from([0x00, 0x00, 0xff, 0xff])
|
|||||||
const kBuffer = Symbol('kBuffer')
|
const kBuffer = Symbol('kBuffer')
|
||||||
const kLength = Symbol('kLength')
|
const kLength = Symbol('kLength')
|
||||||
|
|
||||||
// Default maximum decompressed message size: 4 MB
|
|
||||||
const kDefaultMaxDecompressedSize = 4 * 1024 * 1024
|
|
||||||
|
|
||||||
class PerMessageDeflate {
|
class PerMessageDeflate {
|
||||||
/** @type {import('node:zlib').InflateRaw} */
|
/** @type {import('node:zlib').InflateRaw} */
|
||||||
#inflate
|
#inflate
|
||||||
|
|
||||||
#options = {}
|
#options = {}
|
||||||
|
|
||||||
/** @type {boolean} */
|
#maxPayloadSize = 0
|
||||||
#aborted = false
|
|
||||||
|
|
||||||
/** @type {Function|null} */
|
|
||||||
#currentCallback = null
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Map<string, string>} extensions
|
* @param {Map<string, string>} extensions
|
||||||
*/
|
*/
|
||||||
constructor (extensions) {
|
constructor (extensions, options) {
|
||||||
this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover')
|
this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover')
|
||||||
this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits')
|
this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits')
|
||||||
|
|
||||||
|
this.#maxPayloadSize = options.maxPayloadSize
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decompress a compressed payload.
|
||||||
|
* @param {Buffer} chunk Compressed data
|
||||||
|
* @param {boolean} fin Final fragment flag
|
||||||
|
* @param {Function} callback Callback function
|
||||||
|
*/
|
||||||
decompress (chunk, fin, callback) {
|
decompress (chunk, fin, callback) {
|
||||||
// An endpoint uses the following algorithm to decompress a message.
|
// An endpoint uses the following algorithm to decompress a message.
|
||||||
// 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the
|
// 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the
|
||||||
// payload of the message.
|
// payload of the message.
|
||||||
// 2. Decompress the resulting data using DEFLATE.
|
// 2. Decompress the resulting data using DEFLATE.
|
||||||
|
|
||||||
if (this.#aborted) {
|
|
||||||
callback(new MessageSizeExceededError())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.#inflate) {
|
if (!this.#inflate) {
|
||||||
let windowBits = Z_DEFAULT_WINDOWBITS
|
let windowBits = Z_DEFAULT_WINDOWBITS
|
||||||
|
|
||||||
@@ -44780,23 +44895,12 @@ class PerMessageDeflate {
|
|||||||
this.#inflate[kLength] = 0
|
this.#inflate[kLength] = 0
|
||||||
|
|
||||||
this.#inflate.on('data', (data) => {
|
this.#inflate.on('data', (data) => {
|
||||||
if (this.#aborted) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
this.#inflate[kLength] += data.length
|
this.#inflate[kLength] += data.length
|
||||||
|
|
||||||
if (this.#inflate[kLength] > kDefaultMaxDecompressedSize) {
|
if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) {
|
||||||
this.#aborted = true
|
callback(new MessageSizeExceededError())
|
||||||
this.#inflate.removeAllListeners()
|
this.#inflate.removeAllListeners()
|
||||||
this.#inflate.destroy()
|
|
||||||
this.#inflate = null
|
this.#inflate = null
|
||||||
|
|
||||||
if (this.#currentCallback) {
|
|
||||||
const cb = this.#currentCallback
|
|
||||||
this.#currentCallback = null
|
|
||||||
cb(new MessageSizeExceededError())
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44809,14 +44913,13 @@ class PerMessageDeflate {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
this.#currentCallback = callback
|
|
||||||
this.#inflate.write(chunk)
|
this.#inflate.write(chunk)
|
||||||
if (fin) {
|
if (fin) {
|
||||||
this.#inflate.write(tail)
|
this.#inflate.write(tail)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.#inflate.flush(() => {
|
this.#inflate.flush(() => {
|
||||||
if (this.#aborted || !this.#inflate) {
|
if (!this.#inflate) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44824,7 +44927,6 @@ class PerMessageDeflate {
|
|||||||
|
|
||||||
this.#inflate[kBuffer].length = 0
|
this.#inflate[kBuffer].length = 0
|
||||||
this.#inflate[kLength] = 0
|
this.#inflate[kLength] = 0
|
||||||
this.#currentCallback = null
|
|
||||||
|
|
||||||
callback(null, full)
|
callback(null, full)
|
||||||
})
|
})
|
||||||
@@ -44860,6 +44962,12 @@ const {
|
|||||||
const { WebsocketFrameSend } = __nccwpck_require__(3264)
|
const { WebsocketFrameSend } = __nccwpck_require__(3264)
|
||||||
const { closeWebSocketConnection } = __nccwpck_require__(86897)
|
const { closeWebSocketConnection } = __nccwpck_require__(86897)
|
||||||
const { PerMessageDeflate } = __nccwpck_require__(19469)
|
const { PerMessageDeflate } = __nccwpck_require__(19469)
|
||||||
|
const { MessageSizeExceededError } = __nccwpck_require__(68707)
|
||||||
|
|
||||||
|
function failWebsocketConnectionWithCode (ws, code, reason) {
|
||||||
|
closeWebSocketConnection(ws, code, reason, Buffer.byteLength(reason))
|
||||||
|
failWebsocketConnection(ws, reason)
|
||||||
|
}
|
||||||
|
|
||||||
// This code was influenced by ws released under the MIT license.
|
// This code was influenced by ws released under the MIT license.
|
||||||
// Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
|
// Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
|
||||||
@@ -44868,6 +44976,7 @@ const { PerMessageDeflate } = __nccwpck_require__(19469)
|
|||||||
|
|
||||||
class ByteParser extends Writable {
|
class ByteParser extends Writable {
|
||||||
#buffers = []
|
#buffers = []
|
||||||
|
#fragmentsBytes = 0
|
||||||
#byteOffset = 0
|
#byteOffset = 0
|
||||||
#loop = false
|
#loop = false
|
||||||
|
|
||||||
@@ -44879,18 +44988,27 @@ class ByteParser extends Writable {
|
|||||||
/** @type {Map<string, PerMessageDeflate>} */
|
/** @type {Map<string, PerMessageDeflate>} */
|
||||||
#extensions
|
#extensions
|
||||||
|
|
||||||
|
/** @type {number} */
|
||||||
|
#maxFragments
|
||||||
|
|
||||||
|
/** @type {number} */
|
||||||
|
#maxPayloadSize
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {import('./websocket').WebSocket} ws
|
* @param {import('./websocket').WebSocket} ws
|
||||||
* @param {Map<string, string>|null} extensions
|
* @param {Map<string, string>|null} extensions
|
||||||
|
* @param {{ maxFragments?: number, maxPayloadSize?: number }} [options]
|
||||||
*/
|
*/
|
||||||
constructor (ws, extensions) {
|
constructor (ws, extensions, options = {}) {
|
||||||
super()
|
super()
|
||||||
|
|
||||||
this.ws = ws
|
this.ws = ws
|
||||||
this.#extensions = extensions == null ? new Map() : extensions
|
this.#extensions = extensions == null ? new Map() : extensions
|
||||||
|
this.#maxFragments = options.maxFragments ?? 0
|
||||||
|
this.#maxPayloadSize = options.maxPayloadSize ?? 0
|
||||||
|
|
||||||
if (this.#extensions.has('permessage-deflate')) {
|
if (this.#extensions.has('permessage-deflate')) {
|
||||||
this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions))
|
this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions, options))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44906,6 +45024,19 @@ class ByteParser extends Writable {
|
|||||||
this.run(callback)
|
this.run(callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#validatePayloadLength () {
|
||||||
|
if (
|
||||||
|
this.#maxPayloadSize > 0 &&
|
||||||
|
!isControlFrame(this.#info.opcode) &&
|
||||||
|
this.#info.payloadLength + this.#fragmentsBytes > this.#maxPayloadSize
|
||||||
|
) {
|
||||||
|
failWebsocketConnectionWithCode(this.ws, 1009, 'Payload size exceeds maximum allowed size')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs whenever a new chunk is received.
|
* Runs whenever a new chunk is received.
|
||||||
* Callback is called whenever there are no more chunks buffering,
|
* Callback is called whenever there are no more chunks buffering,
|
||||||
@@ -44994,6 +45125,10 @@ class ByteParser extends Writable {
|
|||||||
if (payloadLength <= 125) {
|
if (payloadLength <= 125) {
|
||||||
this.#info.payloadLength = payloadLength
|
this.#info.payloadLength = payloadLength
|
||||||
this.#state = parserStates.READ_DATA
|
this.#state = parserStates.READ_DATA
|
||||||
|
|
||||||
|
if (!this.#validatePayloadLength()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
} else if (payloadLength === 126) {
|
} else if (payloadLength === 126) {
|
||||||
this.#state = parserStates.PAYLOADLENGTH_16
|
this.#state = parserStates.PAYLOADLENGTH_16
|
||||||
} else if (payloadLength === 127) {
|
} else if (payloadLength === 127) {
|
||||||
@@ -45018,6 +45153,10 @@ class ByteParser extends Writable {
|
|||||||
|
|
||||||
this.#info.payloadLength = buffer.readUInt16BE(0)
|
this.#info.payloadLength = buffer.readUInt16BE(0)
|
||||||
this.#state = parserStates.READ_DATA
|
this.#state = parserStates.READ_DATA
|
||||||
|
|
||||||
|
if (!this.#validatePayloadLength()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
} else if (this.#state === parserStates.PAYLOADLENGTH_64) {
|
} else if (this.#state === parserStates.PAYLOADLENGTH_64) {
|
||||||
if (this.#byteOffset < 8) {
|
if (this.#byteOffset < 8) {
|
||||||
return callback()
|
return callback()
|
||||||
@@ -45040,6 +45179,10 @@ class ByteParser extends Writable {
|
|||||||
|
|
||||||
this.#info.payloadLength = lower
|
this.#info.payloadLength = lower
|
||||||
this.#state = parserStates.READ_DATA
|
this.#state = parserStates.READ_DATA
|
||||||
|
|
||||||
|
if (!this.#validatePayloadLength()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
} else if (this.#state === parserStates.READ_DATA) {
|
} else if (this.#state === parserStates.READ_DATA) {
|
||||||
if (this.#byteOffset < this.#info.payloadLength) {
|
if (this.#byteOffset < this.#info.payloadLength) {
|
||||||
return callback()
|
return callback()
|
||||||
@@ -45052,42 +45195,58 @@ class ByteParser extends Writable {
|
|||||||
this.#state = parserStates.INFO
|
this.#state = parserStates.INFO
|
||||||
} else {
|
} else {
|
||||||
if (!this.#info.compressed) {
|
if (!this.#info.compressed) {
|
||||||
this.#fragments.push(body)
|
if (!this.writeFragments(body)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) {
|
||||||
|
failWebsocketConnectionWithCode(this.ws, 1009, new MessageSizeExceededError().message)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// If the frame is not fragmented, a message has been received.
|
// If the frame is not fragmented, a message has been received.
|
||||||
// If the frame is fragmented, it will terminate with a fin bit set
|
// If the frame is fragmented, it will terminate with a fin bit set
|
||||||
// and an opcode of 0 (continuation), therefore we handle that when
|
// and an opcode of 0 (continuation), therefore we handle that when
|
||||||
// parsing continuation frames, not here.
|
// parsing continuation frames, not here.
|
||||||
if (!this.#info.fragmented && this.#info.fin) {
|
if (!this.#info.fragmented && this.#info.fin) {
|
||||||
const fullMessage = Buffer.concat(this.#fragments)
|
websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments())
|
||||||
websocketMessageReceived(this.ws, this.#info.binaryType, fullMessage)
|
|
||||||
this.#fragments.length = 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.#state = parserStates.INFO
|
this.#state = parserStates.INFO
|
||||||
} else {
|
} else {
|
||||||
this.#extensions.get('permessage-deflate').decompress(body, this.#info.fin, (error, data) => {
|
this.#extensions.get('permessage-deflate').decompress(
|
||||||
if (error) {
|
body,
|
||||||
failWebsocketConnection(this.ws, error.message)
|
this.#info.fin,
|
||||||
return
|
(error, data) => {
|
||||||
}
|
if (error) {
|
||||||
|
const code = error instanceof MessageSizeExceededError ? 1009 : 1007
|
||||||
|
failWebsocketConnectionWithCode(this.ws, code, error.message)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.#fragments.push(data)
|
if (!this.writeFragments(data)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) {
|
||||||
|
failWebsocketConnectionWithCode(this.ws, 1009, new MessageSizeExceededError().message)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.#info.fin) {
|
||||||
|
this.#state = parserStates.INFO
|
||||||
|
this.#loop = true
|
||||||
|
this.run(callback)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments())
|
||||||
|
|
||||||
if (!this.#info.fin) {
|
|
||||||
this.#state = parserStates.INFO
|
|
||||||
this.#loop = true
|
this.#loop = true
|
||||||
|
this.#state = parserStates.INFO
|
||||||
this.run(callback)
|
this.run(callback)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
)
|
||||||
websocketMessageReceived(this.ws, this.#info.binaryType, Buffer.concat(this.#fragments))
|
|
||||||
|
|
||||||
this.#loop = true
|
|
||||||
this.#state = parserStates.INFO
|
|
||||||
this.#fragments.length = 0
|
|
||||||
this.run(callback)
|
|
||||||
})
|
|
||||||
|
|
||||||
this.#loop = false
|
this.#loop = false
|
||||||
break
|
break
|
||||||
@@ -45139,6 +45298,35 @@ class ByteParser extends Writable {
|
|||||||
return buffer
|
return buffer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
writeFragments (fragment) {
|
||||||
|
if (
|
||||||
|
this.#maxFragments > 0 &&
|
||||||
|
this.#fragments.length === this.#maxFragments
|
||||||
|
) {
|
||||||
|
failWebsocketConnectionWithCode(this.ws, 1008, 'Too many message fragments')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
this.#fragmentsBytes += fragment.length
|
||||||
|
this.#fragments.push(fragment)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
consumeFragments () {
|
||||||
|
const fragments = this.#fragments
|
||||||
|
|
||||||
|
if (fragments.length === 1) {
|
||||||
|
this.#fragmentsBytes = 0
|
||||||
|
return fragments.shift()
|
||||||
|
}
|
||||||
|
|
||||||
|
const output = Buffer.concat(fragments, this.#fragmentsBytes)
|
||||||
|
this.#fragments = []
|
||||||
|
this.#fragmentsBytes = 0
|
||||||
|
|
||||||
|
return output
|
||||||
|
}
|
||||||
|
|
||||||
parseCloseBody (data) {
|
parseCloseBody (data) {
|
||||||
assert(data.length !== 1)
|
assert(data.length !== 1)
|
||||||
|
|
||||||
@@ -46174,7 +46362,14 @@ class WebSocket extends EventTarget {
|
|||||||
// once this happens, the connection is open
|
// once this happens, the connection is open
|
||||||
this[kResponse] = response
|
this[kResponse] = response
|
||||||
|
|
||||||
const parser = new ByteParser(this, parsedExtensions)
|
const webSocketOptions = this[kController]?.dispatcher?.webSocketOptions
|
||||||
|
const maxFragments = webSocketOptions?.maxFragments
|
||||||
|
const maxPayloadSize = webSocketOptions?.maxPayloadSize
|
||||||
|
|
||||||
|
const parser = new ByteParser(this, parsedExtensions, {
|
||||||
|
maxFragments,
|
||||||
|
maxPayloadSize
|
||||||
|
})
|
||||||
parser.on('drain', onParserDrain)
|
parser.on('drain', onParserDrain)
|
||||||
parser.on('error', onParserError.bind(this))
|
parser.on('error', onParserError.bind(this))
|
||||||
|
|
||||||
|
|||||||
Vendored
+413
-123
@@ -20794,6 +20794,9 @@ class Range {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parseRange (range) {
|
parseRange (range) {
|
||||||
|
// strip build metadata so it can't bleed into the version
|
||||||
|
range = range.replace(BUILDSTRIPRE, '')
|
||||||
|
|
||||||
// memoize range parsing for performance.
|
// memoize range parsing for performance.
|
||||||
// this is a very hot path, and fully deterministic.
|
// this is a very hot path, and fully deterministic.
|
||||||
const memoOpts =
|
const memoOpts =
|
||||||
@@ -20919,6 +20922,7 @@ const debug = __nccwpck_require__(1159)
|
|||||||
const SemVer = __nccwpck_require__(7163)
|
const SemVer = __nccwpck_require__(7163)
|
||||||
const {
|
const {
|
||||||
safeRe: re,
|
safeRe: re,
|
||||||
|
src,
|
||||||
t,
|
t,
|
||||||
comparatorTrimReplace,
|
comparatorTrimReplace,
|
||||||
tildeTrimReplace,
|
tildeTrimReplace,
|
||||||
@@ -20926,6 +20930,9 @@ const {
|
|||||||
} = __nccwpck_require__(95471)
|
} = __nccwpck_require__(95471)
|
||||||
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __nccwpck_require__(45101)
|
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __nccwpck_require__(45101)
|
||||||
|
|
||||||
|
// unbounded global build-metadata stripper used by parseRange
|
||||||
|
const BUILDSTRIPRE = new RegExp(src[t.BUILD], 'g')
|
||||||
|
|
||||||
const isNullSet = c => c.value === '<0.0.0-0'
|
const isNullSet = c => c.value === '<0.0.0-0'
|
||||||
const isAny = c => c.value === ''
|
const isAny = c => c.value === ''
|
||||||
|
|
||||||
@@ -20966,6 +20973,11 @@ const parseComparator = (comp, options) => {
|
|||||||
|
|
||||||
const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
|
const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
|
||||||
|
|
||||||
|
const invalidXRangeOrder = (M, m, p) => (
|
||||||
|
(isX(M) && !isX(m)) ||
|
||||||
|
(isX(m) && p && !isX(p))
|
||||||
|
)
|
||||||
|
|
||||||
// ~, ~> --> * (any, kinda silly)
|
// ~, ~> --> * (any, kinda silly)
|
||||||
// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
|
// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
|
||||||
// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
|
// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
|
||||||
@@ -20983,6 +20995,10 @@ const replaceTildes = (comp, options) => {
|
|||||||
|
|
||||||
const replaceTilde = (comp, options) => {
|
const replaceTilde = (comp, options) => {
|
||||||
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
|
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
|
||||||
|
// if we're including prereleases in the match, then the lower bound is
|
||||||
|
// -0, the lowest possible prerelease value, just like x-ranges and carets.
|
||||||
|
// this keeps `~1.2` equivalent to the `1.2.x` x-range it's documented as.
|
||||||
|
const z = options.includePrerelease ? '-0' : ''
|
||||||
return comp.replace(r, (_, M, m, p, pr) => {
|
return comp.replace(r, (_, M, m, p, pr) => {
|
||||||
debug('tilde', comp, _, M, m, p, pr)
|
debug('tilde', comp, _, M, m, p, pr)
|
||||||
let ret
|
let ret
|
||||||
@@ -20990,10 +21006,10 @@ const replaceTilde = (comp, options) => {
|
|||||||
if (isX(M)) {
|
if (isX(M)) {
|
||||||
ret = ''
|
ret = ''
|
||||||
} else if (isX(m)) {
|
} else if (isX(m)) {
|
||||||
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`
|
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`
|
||||||
} else if (isX(p)) {
|
} else if (isX(p)) {
|
||||||
// ~1.2 == >=1.2.0 <1.3.0-0
|
// ~1.2 == >=1.2.0 <1.3.0-0
|
||||||
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`
|
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`
|
||||||
} else if (pr) {
|
} else if (pr) {
|
||||||
debug('replaceTilde pr', pr)
|
debug('replaceTilde pr', pr)
|
||||||
ret = `>=${M}.${m}.${p}-${pr
|
ret = `>=${M}.${m}.${p}-${pr
|
||||||
@@ -21062,10 +21078,10 @@ const replaceCaret = (comp, options) => {
|
|||||||
if (M === '0') {
|
if (M === '0') {
|
||||||
if (m === '0') {
|
if (m === '0') {
|
||||||
ret = `>=${M}.${m}.${p
|
ret = `>=${M}.${m}.${p
|
||||||
}${z} <${M}.${m}.${+p + 1}-0`
|
} <${M}.${m}.${+p + 1}-0`
|
||||||
} else {
|
} else {
|
||||||
ret = `>=${M}.${m}.${p
|
ret = `>=${M}.${m}.${p
|
||||||
}${z} <${M}.${+m + 1}.0-0`
|
} <${M}.${+m + 1}.0-0`
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ret = `>=${M}.${m}.${p
|
ret = `>=${M}.${m}.${p
|
||||||
@@ -21091,6 +21107,10 @@ const replaceXRange = (comp, options) => {
|
|||||||
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
|
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
|
||||||
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
||||||
debug('xRange', comp, ret, gtlt, M, m, p, pr)
|
debug('xRange', comp, ret, gtlt, M, m, p, pr)
|
||||||
|
if (invalidXRangeOrder(M, m, p)) {
|
||||||
|
return comp
|
||||||
|
}
|
||||||
|
|
||||||
const xM = isX(M)
|
const xM = isX(M)
|
||||||
const xm = xM || isX(m)
|
const xm = xM || isX(m)
|
||||||
const xp = xm || isX(p)
|
const xp = xm || isX(p)
|
||||||
@@ -21267,6 +21287,22 @@ const { safeRe: re, t } = __nccwpck_require__(95471)
|
|||||||
|
|
||||||
const parseOptions = __nccwpck_require__(70356)
|
const parseOptions = __nccwpck_require__(70356)
|
||||||
const { compareIdentifiers } = __nccwpck_require__(73348)
|
const { compareIdentifiers } = __nccwpck_require__(73348)
|
||||||
|
|
||||||
|
const isPrereleaseIdentifier = (prerelease, identifier) => {
|
||||||
|
const identifiers = identifier.split('.')
|
||||||
|
if (identifiers.length > prerelease.length) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < identifiers.length; i++) {
|
||||||
|
if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
class SemVer {
|
class SemVer {
|
||||||
constructor (version, options) {
|
constructor (version, options) {
|
||||||
options = parseOptions(options)
|
options = parseOptions(options)
|
||||||
@@ -21570,8 +21606,9 @@ class SemVer {
|
|||||||
if (identifierBase === false) {
|
if (identifierBase === false) {
|
||||||
prerelease = [identifier]
|
prerelease = [identifier]
|
||||||
}
|
}
|
||||||
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
||||||
if (isNaN(this.prerelease[1])) {
|
const prereleaseBase = this.prerelease[identifier.split('.').length]
|
||||||
|
if (isNaN(prereleaseBase)) {
|
||||||
this.prerelease = prerelease
|
this.prerelease = prerelease
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -21848,7 +21885,7 @@ const diff = (version1, version2) => {
|
|||||||
return prefix + 'patch'
|
return prefix + 'patch'
|
||||||
}
|
}
|
||||||
|
|
||||||
// high and low are preleases
|
// high and low are prereleases
|
||||||
return 'prerelease'
|
return 'prerelease'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22102,6 +22139,62 @@ const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
|
|||||||
module.exports = sort
|
module.exports = sort
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 16114:
|
||||||
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
|
const parse = __nccwpck_require__(16353)
|
||||||
|
const constants = __nccwpck_require__(45101)
|
||||||
|
const SemVer = __nccwpck_require__(7163)
|
||||||
|
|
||||||
|
const truncate = (version, truncation, options) => {
|
||||||
|
if (!constants.RELEASE_TYPES.includes(truncation)) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
const clonedVersion = cloneInputVersion(version, options)
|
||||||
|
return clonedVersion && doTruncation(clonedVersion, truncation)
|
||||||
|
}
|
||||||
|
|
||||||
|
const cloneInputVersion = (version, options) => {
|
||||||
|
const versionStringToParse = (
|
||||||
|
version instanceof SemVer ? version.version : version
|
||||||
|
)
|
||||||
|
|
||||||
|
return parse(versionStringToParse, options)
|
||||||
|
}
|
||||||
|
|
||||||
|
const doTruncation = (version, truncation) => {
|
||||||
|
if (isPrerelease(truncation)) {
|
||||||
|
return version.version
|
||||||
|
}
|
||||||
|
|
||||||
|
version.prerelease = []
|
||||||
|
|
||||||
|
switch (truncation) {
|
||||||
|
case 'major':
|
||||||
|
version.minor = 0
|
||||||
|
version.patch = 0
|
||||||
|
break
|
||||||
|
case 'minor':
|
||||||
|
version.patch = 0
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
return version.format()
|
||||||
|
}
|
||||||
|
|
||||||
|
const isPrerelease = (type) => {
|
||||||
|
return type.startsWith('pre')
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = truncate
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 58780:
|
/***/ 58780:
|
||||||
@@ -22154,6 +22247,7 @@ const gte = __nccwpck_require__(41236)
|
|||||||
const lte = __nccwpck_require__(56717)
|
const lte = __nccwpck_require__(56717)
|
||||||
const cmp = __nccwpck_require__(28646)
|
const cmp = __nccwpck_require__(28646)
|
||||||
const coerce = __nccwpck_require__(35385)
|
const coerce = __nccwpck_require__(35385)
|
||||||
|
const truncate = __nccwpck_require__(16114)
|
||||||
const Comparator = __nccwpck_require__(89379)
|
const Comparator = __nccwpck_require__(89379)
|
||||||
const Range = __nccwpck_require__(96782)
|
const Range = __nccwpck_require__(96782)
|
||||||
const satisfies = __nccwpck_require__(68011)
|
const satisfies = __nccwpck_require__(68011)
|
||||||
@@ -22192,6 +22286,7 @@ module.exports = {
|
|||||||
lte,
|
lte,
|
||||||
cmp,
|
cmp,
|
||||||
coerce,
|
coerce,
|
||||||
|
truncate,
|
||||||
Comparator,
|
Comparator,
|
||||||
Range,
|
Range,
|
||||||
satisfies,
|
satisfies,
|
||||||
@@ -22479,8 +22574,8 @@ createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
|
|||||||
|
|
||||||
// ## Pre-release Version Identifier
|
// ## Pre-release Version Identifier
|
||||||
// A numeric identifier, or a non-numeric identifier.
|
// A numeric identifier, or a non-numeric identifier.
|
||||||
// Non-numberic identifiers include numberic identifiers but can be longer.
|
// Non-numeric identifiers include numeric identifiers but can be longer.
|
||||||
// Therefore non-numberic identifiers must go first.
|
// Therefore non-numeric identifiers must go first.
|
||||||
|
|
||||||
createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]
|
createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]
|
||||||
}|${src[t.NUMERICIDENTIFIER]})`)
|
}|${src[t.NUMERICIDENTIFIER]})`)
|
||||||
@@ -22537,7 +22632,7 @@ createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
|
|||||||
createToken('GTLT', '((?:<|>)?=?)')
|
createToken('GTLT', '((?:<|>)?=?)')
|
||||||
|
|
||||||
// Something like "2.*" or "1.2.x".
|
// Something like "2.*" or "1.2.x".
|
||||||
// Note that "x.x" is a valid xRange identifer, meaning "any version"
|
// Note that "x.x" is a valid xRange identifier, meaning "any version"
|
||||||
// Only the first item is strictly required.
|
// Only the first item is strictly required.
|
||||||
createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
|
createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
|
||||||
createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
|
createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
|
||||||
@@ -23002,7 +23097,7 @@ const compare = __nccwpck_require__(78469)
|
|||||||
// - If LT
|
// - If LT
|
||||||
// - If LT.semver is greater than any < or <= comp in C, return false
|
// - If LT.semver is greater than any < or <= comp in C, return false
|
||||||
// - If LT is <=, and LT.semver does not satisfy every C, return false
|
// - If LT is <=, and LT.semver does not satisfy every C, return false
|
||||||
// - If GT.semver has a prerelease, and not in prerelease mode
|
// - If LT.semver has a prerelease, and not in prerelease mode
|
||||||
// - If no C has a prerelease and the LT.semver tuple, return false
|
// - If no C has a prerelease and the LT.semver tuple, return false
|
||||||
// - Else return true
|
// - Else return true
|
||||||
|
|
||||||
@@ -23138,7 +23233,7 @@ const simpleSubset = (sub, dom, options) => {
|
|||||||
if (higher === c && higher !== gt) {
|
if (higher === c && higher !== gt) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
} else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {
|
} else if (gt.operator === '>=' && !c.test(gt.semver)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23156,7 +23251,7 @@ const simpleSubset = (sub, dom, options) => {
|
|||||||
if (lower === c && lower !== lt) {
|
if (lower === c && lower !== lt) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
} else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {
|
} else if (lt.operator === '<=' && !c.test(lt.semver)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28246,8 +28341,6 @@ function defaultFactory (origin, opts) {
|
|||||||
|
|
||||||
class Agent extends DispatcherBase {
|
class Agent extends DispatcherBase {
|
||||||
constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {
|
constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {
|
||||||
super()
|
|
||||||
|
|
||||||
if (typeof factory !== 'function') {
|
if (typeof factory !== 'function') {
|
||||||
throw new InvalidArgumentError('factory must be a function.')
|
throw new InvalidArgumentError('factory must be a function.')
|
||||||
}
|
}
|
||||||
@@ -28260,6 +28353,8 @@ class Agent extends DispatcherBase {
|
|||||||
throw new InvalidArgumentError('maxRedirections must be a positive number')
|
throw new InvalidArgumentError('maxRedirections must be a positive number')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
super(options)
|
||||||
|
|
||||||
if (connect && typeof connect !== 'function') {
|
if (connect && typeof connect !== 'function') {
|
||||||
connect = { ...connect }
|
connect = { ...connect }
|
||||||
}
|
}
|
||||||
@@ -28633,6 +28728,9 @@ const EMPTY_BUF = Buffer.alloc(0)
|
|||||||
const FastBuffer = Buffer[Symbol.species]
|
const FastBuffer = Buffer[Symbol.species]
|
||||||
const addListener = util.addListener
|
const addListener = util.addListener
|
||||||
const removeAllListeners = util.removeAllListeners
|
const removeAllListeners = util.removeAllListeners
|
||||||
|
const kIdleSocketValidation = Symbol('kIdleSocketValidation')
|
||||||
|
const kIdleSocketValidationTimeout = Symbol('kIdleSocketValidationTimeout')
|
||||||
|
const kSocketUsed = Symbol('kSocketUsed')
|
||||||
|
|
||||||
let extractBody
|
let extractBody
|
||||||
|
|
||||||
@@ -28855,29 +28953,71 @@ class Parser {
|
|||||||
|
|
||||||
const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr
|
const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr
|
||||||
|
|
||||||
if (ret === constants.ERROR.PAUSED_UPGRADE) {
|
if (ret !== constants.ERROR.OK) {
|
||||||
this.onUpgrade(data.slice(offset))
|
const body = data.subarray(offset)
|
||||||
} else if (ret === constants.ERROR.PAUSED) {
|
|
||||||
this.paused = true
|
if (ret === constants.ERROR.PAUSED_UPGRADE) {
|
||||||
socket.unshift(data.slice(offset))
|
this.onUpgrade(body)
|
||||||
} else if (ret !== constants.ERROR.OK) {
|
} else if (ret === constants.ERROR.PAUSED) {
|
||||||
const ptr = llhttp.llhttp_get_error_reason(this.ptr)
|
this.paused = true
|
||||||
let message = ''
|
socket.unshift(body)
|
||||||
/* istanbul ignore else: difficult to make a test case for */
|
} else {
|
||||||
if (ptr) {
|
throw this.createError(ret, body)
|
||||||
const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0)
|
|
||||||
message =
|
|
||||||
'Response does not match the HTTP/1.1 protocol (' +
|
|
||||||
Buffer.from(llhttp.memory.buffer, ptr, len).toString() +
|
|
||||||
')'
|
|
||||||
}
|
}
|
||||||
throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset))
|
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
util.destroy(socket, err)
|
util.destroy(socket, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
finish () {
|
||||||
|
assert(currentParser === null)
|
||||||
|
assert(this.ptr != null)
|
||||||
|
assert(!this.paused)
|
||||||
|
|
||||||
|
const { llhttp } = this
|
||||||
|
|
||||||
|
let ret
|
||||||
|
|
||||||
|
try {
|
||||||
|
currentParser = this
|
||||||
|
ret = llhttp.llhttp_finish(this.ptr)
|
||||||
|
} finally {
|
||||||
|
currentParser = null
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ret === constants.ERROR.OK) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ret === constants.ERROR.PAUSED || ret === constants.ERROR.PAUSED_UPGRADE) {
|
||||||
|
this.paused = true
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.createError(ret, EMPTY_BUF)
|
||||||
|
}
|
||||||
|
|
||||||
|
createError (ret, data) {
|
||||||
|
const { llhttp, contentLength, bytesRead } = this
|
||||||
|
|
||||||
|
if (contentLength && bytesRead !== parseInt(contentLength, 10)) {
|
||||||
|
return new ResponseContentLengthMismatchError()
|
||||||
|
}
|
||||||
|
|
||||||
|
const ptr = llhttp.llhttp_get_error_reason(this.ptr)
|
||||||
|
let message = ''
|
||||||
|
if (ptr) {
|
||||||
|
const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0)
|
||||||
|
message =
|
||||||
|
'Response does not match the HTTP/1.1 protocol (' +
|
||||||
|
Buffer.from(llhttp.memory.buffer, ptr, len).toString() +
|
||||||
|
')'
|
||||||
|
}
|
||||||
|
|
||||||
|
return new HTTPParserError(message, constants.ERROR[ret], data)
|
||||||
|
}
|
||||||
|
|
||||||
destroy () {
|
destroy () {
|
||||||
assert(this.ptr != null)
|
assert(this.ptr != null)
|
||||||
assert(currentParser == null)
|
assert(currentParser == null)
|
||||||
@@ -28905,6 +29045,11 @@ class Parser {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (client[kRunning] === 0) {
|
||||||
|
util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
|
||||||
const request = client[kQueue][client[kRunningIdx]]
|
const request = client[kQueue][client[kRunningIdx]]
|
||||||
if (!request) {
|
if (!request) {
|
||||||
return -1
|
return -1
|
||||||
@@ -29008,6 +29153,11 @@ class Parser {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (client[kRunning] === 0) {
|
||||||
|
util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
|
||||||
const request = client[kQueue][client[kRunningIdx]]
|
const request = client[kQueue][client[kRunningIdx]]
|
||||||
|
|
||||||
/* istanbul ignore next: difficult to make a test case for */
|
/* istanbul ignore next: difficult to make a test case for */
|
||||||
@@ -29181,6 +29331,7 @@ class Parser {
|
|||||||
request.onComplete(headers)
|
request.onComplete(headers)
|
||||||
|
|
||||||
client[kQueue][client[kRunningIdx]++] = null
|
client[kQueue][client[kRunningIdx]++] = null
|
||||||
|
socket[kSocketUsed] = true
|
||||||
|
|
||||||
if (socket[kWriting]) {
|
if (socket[kWriting]) {
|
||||||
assert(client[kRunning] === 0)
|
assert(client[kRunning] === 0)
|
||||||
@@ -29239,6 +29390,9 @@ async function connectH1 (client, socket) {
|
|||||||
socket[kWriting] = false
|
socket[kWriting] = false
|
||||||
socket[kReset] = false
|
socket[kReset] = false
|
||||||
socket[kBlocking] = false
|
socket[kBlocking] = false
|
||||||
|
socket[kIdleSocketValidation] = 0
|
||||||
|
socket[kIdleSocketValidationTimeout] = null
|
||||||
|
socket[kSocketUsed] = false
|
||||||
socket[kParser] = new Parser(client, socket, llhttpInstance)
|
socket[kParser] = new Parser(client, socket, llhttpInstance)
|
||||||
|
|
||||||
addListener(socket, 'error', function (err) {
|
addListener(socket, 'error', function (err) {
|
||||||
@@ -29249,8 +29403,11 @@ async function connectH1 (client, socket) {
|
|||||||
// On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded
|
// On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded
|
||||||
// to the user.
|
// to the user.
|
||||||
if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) {
|
if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) {
|
||||||
// We treat all incoming data so for as a valid response.
|
const parserErr = parser.finish()
|
||||||
parser.onMessageComplete()
|
if (parserErr) {
|
||||||
|
this[kError] = parserErr
|
||||||
|
this[kClient][kOnError](parserErr)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29269,8 +29426,10 @@ async function connectH1 (client, socket) {
|
|||||||
const parser = this[kParser]
|
const parser = this[kParser]
|
||||||
|
|
||||||
if (parser.statusCode && !parser.shouldKeepAlive) {
|
if (parser.statusCode && !parser.shouldKeepAlive) {
|
||||||
// We treat all incoming data so far as a valid response.
|
const parserErr = parser.finish()
|
||||||
parser.onMessageComplete()
|
if (parserErr) {
|
||||||
|
util.destroy(this, parserErr)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29280,10 +29439,11 @@ async function connectH1 (client, socket) {
|
|||||||
const client = this[kClient]
|
const client = this[kClient]
|
||||||
const parser = this[kParser]
|
const parser = this[kParser]
|
||||||
|
|
||||||
|
clearIdleSocketValidation(this)
|
||||||
|
|
||||||
if (parser) {
|
if (parser) {
|
||||||
if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) {
|
if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) {
|
||||||
// We treat all incoming data so far as a valid response.
|
this[kError] = parser.finish() || this[kError]
|
||||||
parser.onMessageComplete()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this[kParser].destroy()
|
this[kParser].destroy()
|
||||||
@@ -29346,7 +29506,7 @@ async function connectH1 (client, socket) {
|
|||||||
return socket.destroyed
|
return socket.destroyed
|
||||||
},
|
},
|
||||||
busy (request) {
|
busy (request) {
|
||||||
if (socket[kWriting] || socket[kReset] || socket[kBlocking]) {
|
if (socket[kWriting] || socket[kReset] || socket[kBlocking] || socket[kIdleSocketValidation] === 1) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29384,6 +29544,31 @@ async function connectH1 (client, socket) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearIdleSocketValidation (socket) {
|
||||||
|
if (socket[kIdleSocketValidationTimeout]) {
|
||||||
|
clearTimeout(socket[kIdleSocketValidationTimeout])
|
||||||
|
socket[kIdleSocketValidationTimeout] = null
|
||||||
|
}
|
||||||
|
|
||||||
|
socket[kIdleSocketValidation] = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
function scheduleIdleSocketValidation (client, socket) {
|
||||||
|
socket[kIdleSocketValidation] = 1
|
||||||
|
socket[kIdleSocketValidationTimeout] = setTimeout(() => {
|
||||||
|
socket[kIdleSocketValidationTimeout] = null
|
||||||
|
socket[kIdleSocketValidation] = 2
|
||||||
|
|
||||||
|
if (client[kSocket] === socket && !socket.destroyed) {
|
||||||
|
client[kResume]()
|
||||||
|
}
|
||||||
|
}, 0)
|
||||||
|
socket[kIdleSocketValidationTimeout].unref?.()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {import('./client.js')} client
|
||||||
|
*/
|
||||||
function resumeH1 (client) {
|
function resumeH1 (client) {
|
||||||
const socket = client[kSocket]
|
const socket = client[kSocket]
|
||||||
|
|
||||||
@@ -29398,6 +29583,32 @@ function resumeH1 (client) {
|
|||||||
socket[kNoRef] = false
|
socket[kNoRef] = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (client[kRunning] === 0 && client[kPending] > 0 && socket[kSocketUsed]) {
|
||||||
|
if (socket[kIdleSocketValidation] === 0) {
|
||||||
|
scheduleIdleSocketValidation(client, socket)
|
||||||
|
socket[kParser].readMore()
|
||||||
|
if (socket.destroyed) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (socket[kIdleSocketValidation] === 1) {
|
||||||
|
socket[kParser].readMore()
|
||||||
|
if (socket.destroyed) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (client[kRunning] === 0) {
|
||||||
|
socket[kParser].readMore()
|
||||||
|
if (socket.destroyed) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (client[kSize] === 0) {
|
if (client[kSize] === 0) {
|
||||||
if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) {
|
if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) {
|
||||||
socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE)
|
socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE)
|
||||||
@@ -29491,6 +29702,7 @@ function writeH1 (client, request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const socket = client[kSocket]
|
const socket = client[kSocket]
|
||||||
|
clearIdleSocketValidation(socket)
|
||||||
|
|
||||||
const abort = (err) => {
|
const abort = (err) => {
|
||||||
if (request.aborted || request.completed) {
|
if (request.aborted || request.completed) {
|
||||||
@@ -30812,9 +31024,10 @@ class Client extends DispatcherBase {
|
|||||||
autoSelectFamilyAttemptTimeout,
|
autoSelectFamilyAttemptTimeout,
|
||||||
// h2
|
// h2
|
||||||
maxConcurrentStreams,
|
maxConcurrentStreams,
|
||||||
allowH2
|
allowH2,
|
||||||
|
webSocket
|
||||||
} = {}) {
|
} = {}) {
|
||||||
super()
|
super({ webSocket })
|
||||||
|
|
||||||
if (keepAlive !== undefined) {
|
if (keepAlive !== undefined) {
|
||||||
throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')
|
throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')
|
||||||
@@ -31347,15 +31560,24 @@ const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = __nc
|
|||||||
const kOnDestroyed = Symbol('onDestroyed')
|
const kOnDestroyed = Symbol('onDestroyed')
|
||||||
const kOnClosed = Symbol('onClosed')
|
const kOnClosed = Symbol('onClosed')
|
||||||
const kInterceptedDispatch = Symbol('Intercepted Dispatch')
|
const kInterceptedDispatch = Symbol('Intercepted Dispatch')
|
||||||
|
const kWebSocketOptions = Symbol('webSocketOptions')
|
||||||
|
|
||||||
class DispatcherBase extends Dispatcher {
|
class DispatcherBase extends Dispatcher {
|
||||||
constructor () {
|
constructor (opts) {
|
||||||
super()
|
super()
|
||||||
|
|
||||||
this[kDestroyed] = false
|
this[kDestroyed] = false
|
||||||
this[kOnDestroyed] = null
|
this[kOnDestroyed] = null
|
||||||
this[kClosed] = false
|
this[kClosed] = false
|
||||||
this[kOnClosed] = []
|
this[kOnClosed] = []
|
||||||
|
this[kWebSocketOptions] = opts?.webSocket ?? {}
|
||||||
|
}
|
||||||
|
|
||||||
|
get webSocketOptions () {
|
||||||
|
return {
|
||||||
|
maxFragments: this[kWebSocketOptions].maxFragments ?? 131072,
|
||||||
|
maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get destroyed () {
|
get destroyed () {
|
||||||
@@ -31919,8 +32141,8 @@ const kRemoveClient = Symbol('remove client')
|
|||||||
const kStats = Symbol('stats')
|
const kStats = Symbol('stats')
|
||||||
|
|
||||||
class PoolBase extends DispatcherBase {
|
class PoolBase extends DispatcherBase {
|
||||||
constructor () {
|
constructor (opts) {
|
||||||
super()
|
super(opts)
|
||||||
|
|
||||||
this[kQueue] = new FixedQueue()
|
this[kQueue] = new FixedQueue()
|
||||||
this[kClients] = []
|
this[kClients] = []
|
||||||
@@ -32180,8 +32402,6 @@ class Pool extends PoolBase {
|
|||||||
allowH2,
|
allowH2,
|
||||||
...options
|
...options
|
||||||
} = {}) {
|
} = {}) {
|
||||||
super()
|
|
||||||
|
|
||||||
if (connections != null && (!Number.isFinite(connections) || connections < 0)) {
|
if (connections != null && (!Number.isFinite(connections) || connections < 0)) {
|
||||||
throw new InvalidArgumentError('invalid connections')
|
throw new InvalidArgumentError('invalid connections')
|
||||||
}
|
}
|
||||||
@@ -32206,6 +32426,8 @@ class Pool extends PoolBase {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
super(options)
|
||||||
|
|
||||||
this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool)
|
this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool)
|
||||||
? options.interceptors.Pool
|
? options.interceptors.Pool
|
||||||
: []
|
: []
|
||||||
@@ -37290,32 +37512,25 @@ function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {})
|
|||||||
// If the attribute-name case-insensitively matches the string
|
// If the attribute-name case-insensitively matches the string
|
||||||
// "SameSite", the user agent MUST process the cookie-av as follows:
|
// "SameSite", the user agent MUST process the cookie-av as follows:
|
||||||
|
|
||||||
// 1. Let enforcement be "Default".
|
|
||||||
let enforcement = 'Default'
|
|
||||||
|
|
||||||
const attributeValueLowercase = attributeValue.toLowerCase()
|
const attributeValueLowercase = attributeValue.toLowerCase()
|
||||||
// 2. If cookie-av's attribute-value is a case-insensitive match for
|
|
||||||
// "None", set enforcement to "None".
|
|
||||||
if (attributeValueLowercase.includes('none')) {
|
|
||||||
enforcement = 'None'
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. If cookie-av's attribute-value is a case-insensitive match for
|
// 1. If cookie-av's attribute-value is a case-insensitive match for
|
||||||
// "Strict", set enforcement to "Strict".
|
// "None", append an attribute to the cookie-attribute-list with an
|
||||||
if (attributeValueLowercase.includes('strict')) {
|
// attribute-name of "SameSite" and an attribute-value of "None".
|
||||||
enforcement = 'Strict'
|
if (attributeValueLowercase === 'none') {
|
||||||
|
cookieAttributeList.sameSite = 'None'
|
||||||
|
} else if (attributeValueLowercase === 'strict') {
|
||||||
|
// 2. If cookie-av's attribute-value is a case-insensitive match for
|
||||||
|
// "Strict", append an attribute to the cookie-attribute-list with
|
||||||
|
// an attribute-name of "SameSite" and an attribute-value of
|
||||||
|
// "Strict".
|
||||||
|
cookieAttributeList.sameSite = 'Strict'
|
||||||
|
} else if (attributeValueLowercase === 'lax') {
|
||||||
|
// 3. If cookie-av's attribute-value is a case-insensitive match for
|
||||||
|
// "Lax", append an attribute to the cookie-attribute-list with an
|
||||||
|
// attribute-name of "SameSite" and an attribute-value of "Lax".
|
||||||
|
cookieAttributeList.sameSite = 'Lax'
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. If cookie-av's attribute-value is a case-insensitive match for
|
|
||||||
// "Lax", set enforcement to "Lax".
|
|
||||||
if (attributeValueLowercase.includes('lax')) {
|
|
||||||
enforcement = 'Lax'
|
|
||||||
}
|
|
||||||
|
|
||||||
// 5. Append an attribute to the cookie-attribute-list with an
|
|
||||||
// attribute-name of "SameSite" and an attribute-value of
|
|
||||||
// enforcement.
|
|
||||||
cookieAttributeList.sameSite = enforcement
|
|
||||||
} else {
|
} else {
|
||||||
cookieAttributeList.unparsed ??= []
|
cookieAttributeList.unparsed ??= []
|
||||||
|
|
||||||
@@ -50021,40 +50236,35 @@ const tail = Buffer.from([0x00, 0x00, 0xff, 0xff])
|
|||||||
const kBuffer = Symbol('kBuffer')
|
const kBuffer = Symbol('kBuffer')
|
||||||
const kLength = Symbol('kLength')
|
const kLength = Symbol('kLength')
|
||||||
|
|
||||||
// Default maximum decompressed message size: 4 MB
|
|
||||||
const kDefaultMaxDecompressedSize = 4 * 1024 * 1024
|
|
||||||
|
|
||||||
class PerMessageDeflate {
|
class PerMessageDeflate {
|
||||||
/** @type {import('node:zlib').InflateRaw} */
|
/** @type {import('node:zlib').InflateRaw} */
|
||||||
#inflate
|
#inflate
|
||||||
|
|
||||||
#options = {}
|
#options = {}
|
||||||
|
|
||||||
/** @type {boolean} */
|
#maxPayloadSize = 0
|
||||||
#aborted = false
|
|
||||||
|
|
||||||
/** @type {Function|null} */
|
|
||||||
#currentCallback = null
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Map<string, string>} extensions
|
* @param {Map<string, string>} extensions
|
||||||
*/
|
*/
|
||||||
constructor (extensions) {
|
constructor (extensions, options) {
|
||||||
this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover')
|
this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover')
|
||||||
this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits')
|
this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits')
|
||||||
|
|
||||||
|
this.#maxPayloadSize = options.maxPayloadSize
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decompress a compressed payload.
|
||||||
|
* @param {Buffer} chunk Compressed data
|
||||||
|
* @param {boolean} fin Final fragment flag
|
||||||
|
* @param {Function} callback Callback function
|
||||||
|
*/
|
||||||
decompress (chunk, fin, callback) {
|
decompress (chunk, fin, callback) {
|
||||||
// An endpoint uses the following algorithm to decompress a message.
|
// An endpoint uses the following algorithm to decompress a message.
|
||||||
// 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the
|
// 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the
|
||||||
// payload of the message.
|
// payload of the message.
|
||||||
// 2. Decompress the resulting data using DEFLATE.
|
// 2. Decompress the resulting data using DEFLATE.
|
||||||
|
|
||||||
if (this.#aborted) {
|
|
||||||
callback(new MessageSizeExceededError())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.#inflate) {
|
if (!this.#inflate) {
|
||||||
let windowBits = Z_DEFAULT_WINDOWBITS
|
let windowBits = Z_DEFAULT_WINDOWBITS
|
||||||
|
|
||||||
@@ -50077,23 +50287,12 @@ class PerMessageDeflate {
|
|||||||
this.#inflate[kLength] = 0
|
this.#inflate[kLength] = 0
|
||||||
|
|
||||||
this.#inflate.on('data', (data) => {
|
this.#inflate.on('data', (data) => {
|
||||||
if (this.#aborted) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
this.#inflate[kLength] += data.length
|
this.#inflate[kLength] += data.length
|
||||||
|
|
||||||
if (this.#inflate[kLength] > kDefaultMaxDecompressedSize) {
|
if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) {
|
||||||
this.#aborted = true
|
callback(new MessageSizeExceededError())
|
||||||
this.#inflate.removeAllListeners()
|
this.#inflate.removeAllListeners()
|
||||||
this.#inflate.destroy()
|
|
||||||
this.#inflate = null
|
this.#inflate = null
|
||||||
|
|
||||||
if (this.#currentCallback) {
|
|
||||||
const cb = this.#currentCallback
|
|
||||||
this.#currentCallback = null
|
|
||||||
cb(new MessageSizeExceededError())
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50106,14 +50305,13 @@ class PerMessageDeflate {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
this.#currentCallback = callback
|
|
||||||
this.#inflate.write(chunk)
|
this.#inflate.write(chunk)
|
||||||
if (fin) {
|
if (fin) {
|
||||||
this.#inflate.write(tail)
|
this.#inflate.write(tail)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.#inflate.flush(() => {
|
this.#inflate.flush(() => {
|
||||||
if (this.#aborted || !this.#inflate) {
|
if (!this.#inflate) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50121,7 +50319,6 @@ class PerMessageDeflate {
|
|||||||
|
|
||||||
this.#inflate[kBuffer].length = 0
|
this.#inflate[kBuffer].length = 0
|
||||||
this.#inflate[kLength] = 0
|
this.#inflate[kLength] = 0
|
||||||
this.#currentCallback = null
|
|
||||||
|
|
||||||
callback(null, full)
|
callback(null, full)
|
||||||
})
|
})
|
||||||
@@ -50157,6 +50354,12 @@ const {
|
|||||||
const { WebsocketFrameSend } = __nccwpck_require__(3264)
|
const { WebsocketFrameSend } = __nccwpck_require__(3264)
|
||||||
const { closeWebSocketConnection } = __nccwpck_require__(86897)
|
const { closeWebSocketConnection } = __nccwpck_require__(86897)
|
||||||
const { PerMessageDeflate } = __nccwpck_require__(19469)
|
const { PerMessageDeflate } = __nccwpck_require__(19469)
|
||||||
|
const { MessageSizeExceededError } = __nccwpck_require__(68707)
|
||||||
|
|
||||||
|
function failWebsocketConnectionWithCode (ws, code, reason) {
|
||||||
|
closeWebSocketConnection(ws, code, reason, Buffer.byteLength(reason))
|
||||||
|
failWebsocketConnection(ws, reason)
|
||||||
|
}
|
||||||
|
|
||||||
// This code was influenced by ws released under the MIT license.
|
// This code was influenced by ws released under the MIT license.
|
||||||
// Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
|
// Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
|
||||||
@@ -50165,6 +50368,7 @@ const { PerMessageDeflate } = __nccwpck_require__(19469)
|
|||||||
|
|
||||||
class ByteParser extends Writable {
|
class ByteParser extends Writable {
|
||||||
#buffers = []
|
#buffers = []
|
||||||
|
#fragmentsBytes = 0
|
||||||
#byteOffset = 0
|
#byteOffset = 0
|
||||||
#loop = false
|
#loop = false
|
||||||
|
|
||||||
@@ -50176,18 +50380,27 @@ class ByteParser extends Writable {
|
|||||||
/** @type {Map<string, PerMessageDeflate>} */
|
/** @type {Map<string, PerMessageDeflate>} */
|
||||||
#extensions
|
#extensions
|
||||||
|
|
||||||
|
/** @type {number} */
|
||||||
|
#maxFragments
|
||||||
|
|
||||||
|
/** @type {number} */
|
||||||
|
#maxPayloadSize
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {import('./websocket').WebSocket} ws
|
* @param {import('./websocket').WebSocket} ws
|
||||||
* @param {Map<string, string>|null} extensions
|
* @param {Map<string, string>|null} extensions
|
||||||
|
* @param {{ maxFragments?: number, maxPayloadSize?: number }} [options]
|
||||||
*/
|
*/
|
||||||
constructor (ws, extensions) {
|
constructor (ws, extensions, options = {}) {
|
||||||
super()
|
super()
|
||||||
|
|
||||||
this.ws = ws
|
this.ws = ws
|
||||||
this.#extensions = extensions == null ? new Map() : extensions
|
this.#extensions = extensions == null ? new Map() : extensions
|
||||||
|
this.#maxFragments = options.maxFragments ?? 0
|
||||||
|
this.#maxPayloadSize = options.maxPayloadSize ?? 0
|
||||||
|
|
||||||
if (this.#extensions.has('permessage-deflate')) {
|
if (this.#extensions.has('permessage-deflate')) {
|
||||||
this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions))
|
this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions, options))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50203,6 +50416,19 @@ class ByteParser extends Writable {
|
|||||||
this.run(callback)
|
this.run(callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#validatePayloadLength () {
|
||||||
|
if (
|
||||||
|
this.#maxPayloadSize > 0 &&
|
||||||
|
!isControlFrame(this.#info.opcode) &&
|
||||||
|
this.#info.payloadLength + this.#fragmentsBytes > this.#maxPayloadSize
|
||||||
|
) {
|
||||||
|
failWebsocketConnectionWithCode(this.ws, 1009, 'Payload size exceeds maximum allowed size')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs whenever a new chunk is received.
|
* Runs whenever a new chunk is received.
|
||||||
* Callback is called whenever there are no more chunks buffering,
|
* Callback is called whenever there are no more chunks buffering,
|
||||||
@@ -50291,6 +50517,10 @@ class ByteParser extends Writable {
|
|||||||
if (payloadLength <= 125) {
|
if (payloadLength <= 125) {
|
||||||
this.#info.payloadLength = payloadLength
|
this.#info.payloadLength = payloadLength
|
||||||
this.#state = parserStates.READ_DATA
|
this.#state = parserStates.READ_DATA
|
||||||
|
|
||||||
|
if (!this.#validatePayloadLength()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
} else if (payloadLength === 126) {
|
} else if (payloadLength === 126) {
|
||||||
this.#state = parserStates.PAYLOADLENGTH_16
|
this.#state = parserStates.PAYLOADLENGTH_16
|
||||||
} else if (payloadLength === 127) {
|
} else if (payloadLength === 127) {
|
||||||
@@ -50315,6 +50545,10 @@ class ByteParser extends Writable {
|
|||||||
|
|
||||||
this.#info.payloadLength = buffer.readUInt16BE(0)
|
this.#info.payloadLength = buffer.readUInt16BE(0)
|
||||||
this.#state = parserStates.READ_DATA
|
this.#state = parserStates.READ_DATA
|
||||||
|
|
||||||
|
if (!this.#validatePayloadLength()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
} else if (this.#state === parserStates.PAYLOADLENGTH_64) {
|
} else if (this.#state === parserStates.PAYLOADLENGTH_64) {
|
||||||
if (this.#byteOffset < 8) {
|
if (this.#byteOffset < 8) {
|
||||||
return callback()
|
return callback()
|
||||||
@@ -50337,6 +50571,10 @@ class ByteParser extends Writable {
|
|||||||
|
|
||||||
this.#info.payloadLength = lower
|
this.#info.payloadLength = lower
|
||||||
this.#state = parserStates.READ_DATA
|
this.#state = parserStates.READ_DATA
|
||||||
|
|
||||||
|
if (!this.#validatePayloadLength()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
} else if (this.#state === parserStates.READ_DATA) {
|
} else if (this.#state === parserStates.READ_DATA) {
|
||||||
if (this.#byteOffset < this.#info.payloadLength) {
|
if (this.#byteOffset < this.#info.payloadLength) {
|
||||||
return callback()
|
return callback()
|
||||||
@@ -50349,42 +50587,58 @@ class ByteParser extends Writable {
|
|||||||
this.#state = parserStates.INFO
|
this.#state = parserStates.INFO
|
||||||
} else {
|
} else {
|
||||||
if (!this.#info.compressed) {
|
if (!this.#info.compressed) {
|
||||||
this.#fragments.push(body)
|
if (!this.writeFragments(body)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) {
|
||||||
|
failWebsocketConnectionWithCode(this.ws, 1009, new MessageSizeExceededError().message)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// If the frame is not fragmented, a message has been received.
|
// If the frame is not fragmented, a message has been received.
|
||||||
// If the frame is fragmented, it will terminate with a fin bit set
|
// If the frame is fragmented, it will terminate with a fin bit set
|
||||||
// and an opcode of 0 (continuation), therefore we handle that when
|
// and an opcode of 0 (continuation), therefore we handle that when
|
||||||
// parsing continuation frames, not here.
|
// parsing continuation frames, not here.
|
||||||
if (!this.#info.fragmented && this.#info.fin) {
|
if (!this.#info.fragmented && this.#info.fin) {
|
||||||
const fullMessage = Buffer.concat(this.#fragments)
|
websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments())
|
||||||
websocketMessageReceived(this.ws, this.#info.binaryType, fullMessage)
|
|
||||||
this.#fragments.length = 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.#state = parserStates.INFO
|
this.#state = parserStates.INFO
|
||||||
} else {
|
} else {
|
||||||
this.#extensions.get('permessage-deflate').decompress(body, this.#info.fin, (error, data) => {
|
this.#extensions.get('permessage-deflate').decompress(
|
||||||
if (error) {
|
body,
|
||||||
failWebsocketConnection(this.ws, error.message)
|
this.#info.fin,
|
||||||
return
|
(error, data) => {
|
||||||
}
|
if (error) {
|
||||||
|
const code = error instanceof MessageSizeExceededError ? 1009 : 1007
|
||||||
|
failWebsocketConnectionWithCode(this.ws, code, error.message)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.#fragments.push(data)
|
if (!this.writeFragments(data)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) {
|
||||||
|
failWebsocketConnectionWithCode(this.ws, 1009, new MessageSizeExceededError().message)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.#info.fin) {
|
||||||
|
this.#state = parserStates.INFO
|
||||||
|
this.#loop = true
|
||||||
|
this.run(callback)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments())
|
||||||
|
|
||||||
if (!this.#info.fin) {
|
|
||||||
this.#state = parserStates.INFO
|
|
||||||
this.#loop = true
|
this.#loop = true
|
||||||
|
this.#state = parserStates.INFO
|
||||||
this.run(callback)
|
this.run(callback)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
)
|
||||||
websocketMessageReceived(this.ws, this.#info.binaryType, Buffer.concat(this.#fragments))
|
|
||||||
|
|
||||||
this.#loop = true
|
|
||||||
this.#state = parserStates.INFO
|
|
||||||
this.#fragments.length = 0
|
|
||||||
this.run(callback)
|
|
||||||
})
|
|
||||||
|
|
||||||
this.#loop = false
|
this.#loop = false
|
||||||
break
|
break
|
||||||
@@ -50436,6 +50690,35 @@ class ByteParser extends Writable {
|
|||||||
return buffer
|
return buffer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
writeFragments (fragment) {
|
||||||
|
if (
|
||||||
|
this.#maxFragments > 0 &&
|
||||||
|
this.#fragments.length === this.#maxFragments
|
||||||
|
) {
|
||||||
|
failWebsocketConnectionWithCode(this.ws, 1008, 'Too many message fragments')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
this.#fragmentsBytes += fragment.length
|
||||||
|
this.#fragments.push(fragment)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
consumeFragments () {
|
||||||
|
const fragments = this.#fragments
|
||||||
|
|
||||||
|
if (fragments.length === 1) {
|
||||||
|
this.#fragmentsBytes = 0
|
||||||
|
return fragments.shift()
|
||||||
|
}
|
||||||
|
|
||||||
|
const output = Buffer.concat(fragments, this.#fragmentsBytes)
|
||||||
|
this.#fragments = []
|
||||||
|
this.#fragmentsBytes = 0
|
||||||
|
|
||||||
|
return output
|
||||||
|
}
|
||||||
|
|
||||||
parseCloseBody (data) {
|
parseCloseBody (data) {
|
||||||
assert(data.length !== 1)
|
assert(data.length !== 1)
|
||||||
|
|
||||||
@@ -51471,7 +51754,14 @@ class WebSocket extends EventTarget {
|
|||||||
// once this happens, the connection is open
|
// once this happens, the connection is open
|
||||||
this[kResponse] = response
|
this[kResponse] = response
|
||||||
|
|
||||||
const parser = new ByteParser(this, parsedExtensions)
|
const webSocketOptions = this[kController]?.dispatcher?.webSocketOptions
|
||||||
|
const maxFragments = webSocketOptions?.maxFragments
|
||||||
|
const maxPayloadSize = webSocketOptions?.maxPayloadSize
|
||||||
|
|
||||||
|
const parser = new ByteParser(this, parsedExtensions, {
|
||||||
|
maxFragments,
|
||||||
|
maxPayloadSize
|
||||||
|
})
|
||||||
parser.on('drain', onParserDrain)
|
parser.on('drain', onParserDrain)
|
||||||
parser.on('error', onParserError.bind(this))
|
parser.on('error', onParserError.bind(this))
|
||||||
|
|
||||||
|
|||||||
Generated
+136
-120
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-go",
|
"name": "setup-go",
|
||||||
"version": "6.3.0",
|
"version": "6.5.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "setup-go",
|
"name": "setup-go",
|
||||||
"version": "6.3.0",
|
"version": "6.5.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^5.1.0",
|
"@actions/cache": "^5.1.0",
|
||||||
@@ -431,13 +431,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/code-frame": {
|
"node_modules/@babel/code-frame": {
|
||||||
"version": "7.27.1",
|
"version": "7.29.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz",
|
||||||
"integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==",
|
"integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-validator-identifier": "^7.27.1",
|
"@babel/helper-validator-identifier": "^7.29.7",
|
||||||
"js-tokens": "^4.0.0",
|
"js-tokens": "^4.0.0",
|
||||||
"picocolors": "^1.1.1"
|
"picocolors": "^1.1.1"
|
||||||
},
|
},
|
||||||
@@ -446,9 +446,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/compat-data": {
|
"node_modules/@babel/compat-data": {
|
||||||
"version": "7.28.5",
|
"version": "7.29.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz",
|
||||||
"integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==",
|
"integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -456,21 +456,21 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/core": {
|
"node_modules/@babel/core": {
|
||||||
"version": "7.28.5",
|
"version": "7.29.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz",
|
||||||
"integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",
|
"integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/code-frame": "^7.27.1",
|
"@babel/code-frame": "^7.29.7",
|
||||||
"@babel/generator": "^7.28.5",
|
"@babel/generator": "^7.29.7",
|
||||||
"@babel/helper-compilation-targets": "^7.27.2",
|
"@babel/helper-compilation-targets": "^7.29.7",
|
||||||
"@babel/helper-module-transforms": "^7.28.3",
|
"@babel/helper-module-transforms": "^7.29.7",
|
||||||
"@babel/helpers": "^7.28.4",
|
"@babel/helpers": "^7.29.7",
|
||||||
"@babel/parser": "^7.28.5",
|
"@babel/parser": "^7.29.7",
|
||||||
"@babel/template": "^7.27.2",
|
"@babel/template": "^7.29.7",
|
||||||
"@babel/traverse": "^7.28.5",
|
"@babel/traverse": "^7.29.7",
|
||||||
"@babel/types": "^7.28.5",
|
"@babel/types": "^7.29.7",
|
||||||
"@jridgewell/remapping": "^2.3.5",
|
"@jridgewell/remapping": "^2.3.5",
|
||||||
"convert-source-map": "^2.0.0",
|
"convert-source-map": "^2.0.0",
|
||||||
"debug": "^4.1.0",
|
"debug": "^4.1.0",
|
||||||
@@ -497,14 +497,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/generator": {
|
"node_modules/@babel/generator": {
|
||||||
"version": "7.28.5",
|
"version": "7.29.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.7.tgz",
|
||||||
"integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==",
|
"integrity": "sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/parser": "^7.28.5",
|
"@babel/parser": "^7.29.7",
|
||||||
"@babel/types": "^7.28.5",
|
"@babel/types": "^7.29.7",
|
||||||
"@jridgewell/gen-mapping": "^0.3.12",
|
"@jridgewell/gen-mapping": "^0.3.12",
|
||||||
"@jridgewell/trace-mapping": "^0.3.28",
|
"@jridgewell/trace-mapping": "^0.3.28",
|
||||||
"jsesc": "^3.0.2"
|
"jsesc": "^3.0.2"
|
||||||
@@ -514,14 +514,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-compilation-targets": {
|
"node_modules/@babel/helper-compilation-targets": {
|
||||||
"version": "7.27.2",
|
"version": "7.29.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz",
|
||||||
"integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==",
|
"integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/compat-data": "^7.27.2",
|
"@babel/compat-data": "^7.29.7",
|
||||||
"@babel/helper-validator-option": "^7.27.1",
|
"@babel/helper-validator-option": "^7.29.7",
|
||||||
"browserslist": "^4.24.0",
|
"browserslist": "^4.24.0",
|
||||||
"lru-cache": "^5.1.1",
|
"lru-cache": "^5.1.1",
|
||||||
"semver": "^6.3.1"
|
"semver": "^6.3.1"
|
||||||
@@ -541,9 +541,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-globals": {
|
"node_modules/@babel/helper-globals": {
|
||||||
"version": "7.28.0",
|
"version": "7.29.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz",
|
||||||
"integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==",
|
"integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -551,29 +551,29 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-module-imports": {
|
"node_modules/@babel/helper-module-imports": {
|
||||||
"version": "7.27.1",
|
"version": "7.29.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz",
|
||||||
"integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==",
|
"integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/traverse": "^7.27.1",
|
"@babel/traverse": "^7.29.7",
|
||||||
"@babel/types": "^7.27.1"
|
"@babel/types": "^7.29.7"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-module-transforms": {
|
"node_modules/@babel/helper-module-transforms": {
|
||||||
"version": "7.28.3",
|
"version": "7.29.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz",
|
||||||
"integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==",
|
"integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-module-imports": "^7.27.1",
|
"@babel/helper-module-imports": "^7.29.7",
|
||||||
"@babel/helper-validator-identifier": "^7.27.1",
|
"@babel/helper-validator-identifier": "^7.29.7",
|
||||||
"@babel/traverse": "^7.28.3"
|
"@babel/traverse": "^7.29.7"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
@@ -593,9 +593,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-string-parser": {
|
"node_modules/@babel/helper-string-parser": {
|
||||||
"version": "7.27.1",
|
"version": "7.29.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz",
|
||||||
"integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
|
"integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -603,9 +603,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-validator-identifier": {
|
"node_modules/@babel/helper-validator-identifier": {
|
||||||
"version": "7.28.5",
|
"version": "7.29.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz",
|
||||||
"integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",
|
"integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -613,9 +613,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-validator-option": {
|
"node_modules/@babel/helper-validator-option": {
|
||||||
"version": "7.27.1",
|
"version": "7.29.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz",
|
||||||
"integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==",
|
"integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -623,27 +623,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helpers": {
|
"node_modules/@babel/helpers": {
|
||||||
"version": "7.28.4",
|
"version": "7.29.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz",
|
||||||
"integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==",
|
"integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/template": "^7.27.2",
|
"@babel/template": "^7.29.7",
|
||||||
"@babel/types": "^7.28.4"
|
"@babel/types": "^7.29.7"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/parser": {
|
"node_modules/@babel/parser": {
|
||||||
"version": "7.28.5",
|
"version": "7.29.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz",
|
||||||
"integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==",
|
"integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/types": "^7.28.5"
|
"@babel/types": "^7.29.7"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"parser": "bin/babel-parser.js"
|
"parser": "bin/babel-parser.js"
|
||||||
@@ -892,33 +892,33 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/template": {
|
"node_modules/@babel/template": {
|
||||||
"version": "7.27.2",
|
"version": "7.29.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz",
|
||||||
"integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==",
|
"integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/code-frame": "^7.27.1",
|
"@babel/code-frame": "^7.29.7",
|
||||||
"@babel/parser": "^7.27.2",
|
"@babel/parser": "^7.29.7",
|
||||||
"@babel/types": "^7.27.1"
|
"@babel/types": "^7.29.7"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/traverse": {
|
"node_modules/@babel/traverse": {
|
||||||
"version": "7.28.5",
|
"version": "7.29.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.7.tgz",
|
||||||
"integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==",
|
"integrity": "sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/code-frame": "^7.27.1",
|
"@babel/code-frame": "^7.29.7",
|
||||||
"@babel/generator": "^7.28.5",
|
"@babel/generator": "^7.29.7",
|
||||||
"@babel/helper-globals": "^7.28.0",
|
"@babel/helper-globals": "^7.29.7",
|
||||||
"@babel/parser": "^7.28.5",
|
"@babel/parser": "^7.29.7",
|
||||||
"@babel/template": "^7.27.2",
|
"@babel/template": "^7.29.7",
|
||||||
"@babel/types": "^7.28.5",
|
"@babel/types": "^7.29.7",
|
||||||
"debug": "^4.3.1"
|
"debug": "^4.3.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -926,14 +926,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/types": {
|
"node_modules/@babel/types": {
|
||||||
"version": "7.28.5",
|
"version": "7.29.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz",
|
||||||
"integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==",
|
"integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/helper-string-parser": "^7.27.1",
|
"@babel/helper-string-parser": "^7.29.7",
|
||||||
"@babel/helper-validator-identifier": "^7.28.5"
|
"@babel/helper-validator-identifier": "^7.29.7"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
@@ -2325,13 +2325,16 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/baseline-browser-mapping": {
|
"node_modules/baseline-browser-mapping": {
|
||||||
"version": "2.9.8",
|
"version": "2.10.38",
|
||||||
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.8.tgz",
|
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.38.tgz",
|
||||||
"integrity": "sha512-Y1fOuNDowLfgKOypdc9SPABfoWXuZHBOyCS4cD52IeZBhr4Md6CLLs6atcxVrzRmQ06E7hSlm5bHHApPKR/byA==",
|
"integrity": "sha512-31/02mVB4yuQU6adKk5SlY6m+mxDwUq5KZkyYgnLrrKl7TEm1+3PyDtDBz2kOv/wxZz41GHsvV1A/u6RmiyBvw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
"baseline-browser-mapping": "dist/cli.js"
|
"baseline-browser-mapping": "dist/cli.cjs"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/brace-expansion": {
|
"node_modules/brace-expansion": {
|
||||||
@@ -2358,9 +2361,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/browserslist": {
|
"node_modules/browserslist": {
|
||||||
"version": "4.28.1",
|
"version": "4.28.4",
|
||||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz",
|
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.4.tgz",
|
||||||
"integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==",
|
"integrity": "sha512-MTc8i/x9jBQd1iMw2CFGS+rwMa07eYjLR0CCTLDACl9xhxy+nIs3KeML/biicXtk9JrZ6dnnTatmc7ErPXIxqw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -2378,11 +2381,11 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"baseline-browser-mapping": "^2.9.0",
|
"baseline-browser-mapping": "^2.10.38",
|
||||||
"caniuse-lite": "^1.0.30001759",
|
"caniuse-lite": "^1.0.30001799",
|
||||||
"electron-to-chromium": "^1.5.263",
|
"electron-to-chromium": "^1.5.376",
|
||||||
"node-releases": "^2.0.27",
|
"node-releases": "^2.0.48",
|
||||||
"update-browserslist-db": "^1.2.0"
|
"update-browserslist-db": "^1.2.3"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"browserslist": "cli.js"
|
"browserslist": "cli.js"
|
||||||
@@ -2492,9 +2495,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001760",
|
"version": "1.0.30001799",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001760.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001799.tgz",
|
||||||
"integrity": "sha512-7AAMPcueWELt1p3mi13HR/LHH0TJLT11cnwDJEs3xA4+CK/PLKeO9Kl1oru24htkyUKtkGCvAx4ohB0Ttry8Dw==",
|
"integrity": "sha512-hG1bReV+OUU+MOqK4t/ZWI0tZOyz3rqS9XuhOUz1cIcbwBKjOyJEJuw9ER5JuNyqxNk8u/JUVbGibBOL1yrjFw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -2875,9 +2878,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.5.267",
|
"version": "1.5.376",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.376.tgz",
|
||||||
"integrity": "sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==",
|
"integrity": "sha512-cUVA7/RvbFTEuw/i3obUwDTRIXojaxkResf+ibByPFxjc6XK3VNtcQXV0NSbAlJ0FMjcJGgftVVB4Qo184EXvA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
@@ -4713,10 +4716,20 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/js-yaml": {
|
"node_modules/js-yaml": {
|
||||||
"version": "4.1.1",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz",
|
||||||
"integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
|
"integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/puzrin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/nodeca"
|
||||||
|
}
|
||||||
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"argparse": "^2.0.1"
|
"argparse": "^2.0.1"
|
||||||
@@ -5062,11 +5075,14 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/node-releases": {
|
"node_modules/node-releases": {
|
||||||
"version": "2.0.27",
|
"version": "2.0.48",
|
||||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz",
|
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.48.tgz",
|
||||||
"integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==",
|
"integrity": "sha512-1uz8041X6LoI6ZSdZacM9lVY28vuzDlSKitnpbSNK0RfKoIJkX29NBPVEFXhnuSuEOA9Ww0xnPJ+ILWbGAv8DA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"node_modules/normalize-path": {
|
"node_modules/normalize-path": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
@@ -5720,9 +5736,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/semver": {
|
"node_modules/semver": {
|
||||||
"version": "7.7.3",
|
"version": "7.8.5",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
|
||||||
"integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
|
"integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"bin": {
|
"bin": {
|
||||||
"semver": "bin/semver.js"
|
"semver": "bin/semver.js"
|
||||||
@@ -6159,19 +6175,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ts-jest": {
|
"node_modules/ts-jest": {
|
||||||
"version": "29.4.6",
|
"version": "29.4.11",
|
||||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.6.tgz",
|
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.11.tgz",
|
||||||
"integrity": "sha512-fSpWtOO/1AjSNQguk43hb/JCo16oJDnMJf3CdEGNkqsEX3t0KX96xvyX1D7PfLCpVoKu4MfVrqUkFyblYoY4lA==",
|
"integrity": "sha512-IrFl7l9AuB/qrNw5quqvAv/hmKMb8dhWOH4jQOGo0Oq8tCeo1O86/iTFG1FaRimgUkF13l4PcepO8ATFT6Ns4g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bs-logger": "^0.2.6",
|
"bs-logger": "^0.2.6",
|
||||||
"fast-json-stable-stringify": "^2.1.0",
|
"fast-json-stable-stringify": "^2.1.0",
|
||||||
"handlebars": "^4.7.8",
|
"handlebars": "^4.7.9",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
"lodash.memoize": "^4.1.2",
|
"lodash.memoize": "^4.1.2",
|
||||||
"make-error": "^1.3.6",
|
"make-error": "^1.3.6",
|
||||||
"semver": "^7.7.3",
|
"semver": "^7.8.0",
|
||||||
"type-fest": "^4.41.0",
|
"type-fest": "^4.41.0",
|
||||||
"yargs-parser": "^21.1.1"
|
"yargs-parser": "^21.1.1"
|
||||||
},
|
},
|
||||||
@@ -6188,7 +6204,7 @@
|
|||||||
"babel-jest": "^29.0.0 || ^30.0.0",
|
"babel-jest": "^29.0.0 || ^30.0.0",
|
||||||
"jest": "^29.0.0 || ^30.0.0",
|
"jest": "^29.0.0 || ^30.0.0",
|
||||||
"jest-util": "^29.0.0 || ^30.0.0",
|
"jest-util": "^29.0.0 || ^30.0.0",
|
||||||
"typescript": ">=4.3 <6"
|
"typescript": ">=4.3 <7"
|
||||||
},
|
},
|
||||||
"peerDependenciesMeta": {
|
"peerDependenciesMeta": {
|
||||||
"@babel/core": {
|
"@babel/core": {
|
||||||
@@ -6304,9 +6320,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
"node_modules/undici": {
|
||||||
"version": "6.24.1",
|
"version": "6.27.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.24.1.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-6.27.0.tgz",
|
||||||
"integrity": "sha512-sC+b0tB1whOCzbtlx20fx3WgCXwkW627p4EA9uM+/tNNPkSS+eSEld6pAs9nDv7WbY1UUljBMYPtu9BCOrCWKA==",
|
"integrity": "sha512-YmfV3YnEDzXRC5lZ2jWtWWHKGUm1zIt8AhesR1tens+HTNv+YZlN/dp6G727LOvMJ8xjP9Be7Y2Sdr96LDm+pg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.17"
|
"node": ">=18.17"
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-go",
|
"name": "setup-go",
|
||||||
"version": "6.3.0",
|
"version": "6.5.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "setup go action",
|
"description": "setup go action",
|
||||||
"main": "lib/setup-go.js",
|
"main": "lib/setup-go.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user