mirror of
https://github.com/github/codeql-action.git
synced 2025-12-30 03:00:13 +08:00
Update checked-in dependencies
This commit is contained in:
32
node_modules/.package-lock.json
generated
vendored
32
node_modules/.package-lock.json
generated
vendored
@@ -627,9 +627,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/js": {
|
||||
"version": "9.19.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.19.0.tgz",
|
||||
"integrity": "sha512-rbq9/g38qjfqFLOVPvwjIvFFdNziEC5S65jmjPw5r6A//QH+W91akh9irMwjDN8zKUTak6W9EsAv4m/7Wnw0UQ==",
|
||||
"version": "9.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.20.0.tgz",
|
||||
"integrity": "sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -3738,9 +3738,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-github": {
|
||||
"version": "5.1.7",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-5.1.7.tgz",
|
||||
"integrity": "sha512-P3S5TwvHy8u1QadfcI/tZ2uNFMTHv+mT/YmEdLEgEzp08mA3iK02kg/IhoWOz0SnbTyUi1qrq0a6SwC3uQSkpQ==",
|
||||
"version": "5.1.8",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-5.1.8.tgz",
|
||||
"integrity": "sha512-A6q+R3EBMF7hxIViWpQsalqpu3O0POcQ9VpN1m9W2I8yGumw+SFxXZUTafBd9X9mgUJhaU4M9qSifC1q/39H3A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -5575,9 +5575,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/long": {
|
||||
"version": "5.2.4",
|
||||
"resolved": "https://registry.npmjs.org/long/-/long-5.2.4.tgz",
|
||||
"integrity": "sha512-qtzLbJE8hq7VabR3mISmVGtoXP8KGc2Z/AT8OuqlYD7JTR3oqrgwdjnk07wpj1twXxYmgDXgoKVWUG/fReSzHg==",
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/long/-/long-5.3.0.tgz",
|
||||
"integrity": "sha512-5vvY5yF1zF/kXk+L94FRiTDa1Znom46UjPCH6/XbSvS8zBKMFBHTJk8KDMqJ+2J6QezQFi7k1k8v21ClJYHPaw==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/lower-case": {
|
||||
@@ -5794,9 +5794,9 @@
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/nock": {
|
||||
"version": "14.0.0",
|
||||
"resolved": "https://registry.npmjs.org/nock/-/nock-14.0.0.tgz",
|
||||
"integrity": "sha512-3Z2ZoZoYTR/y2I+NI16+6IzfZFKBX7MrADtoBAm7v/QKqxQUhKw+Dh+847PPS1j/FDutjfIXfrh3CJF74yITWg==",
|
||||
"version": "14.0.1",
|
||||
"resolved": "https://registry.npmjs.org/nock/-/nock-14.0.1.tgz",
|
||||
"integrity": "sha512-IJN4O9pturuRdn60NjQ7YkFt6Rwei7ZKaOwb1tvUIIqTgeD0SDDAX3vrqZD4wcXczeEy/AsUXxpGpP/yHqV7xg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -5805,7 +5805,7 @@
|
||||
"propagate": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
"node": ">=18.20.0 <20 || >=20.12.1"
|
||||
}
|
||||
},
|
||||
"node_modules/node-fetch": {
|
||||
@@ -6623,9 +6623,9 @@
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.7.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.0.tgz",
|
||||
"integrity": "sha512-DrfFnPzblFmNrIZzg5RzHegbiRWg7KMR7btwi2yjHwx06zsUbO5g613sVwEV7FTwmzJu+Io0lJe2GJ3LxqpvBQ==",
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
|
||||
"integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
|
||||
2
node_modules/@eslint/js/package.json
generated
vendored
2
node_modules/@eslint/js/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@eslint/js",
|
||||
"version": "9.19.0",
|
||||
"version": "9.20.0",
|
||||
"description": "ESLint JavaScript language implementation",
|
||||
"main": "./src/index.js",
|
||||
"types": "./types/index.d.ts",
|
||||
|
||||
4
node_modules/eslint-plugin-github/lib/configs/flat/recommended.js
generated
vendored
4
node_modules/eslint-plugin-github/lib/configs/flat/recommended.js
generated
vendored
@@ -16,7 +16,7 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
prettierPlugin,
|
||||
prettier: prettierPlugin,
|
||||
'eslint-comments': eslintComments,
|
||||
import: importPlugin,
|
||||
'i18n-text': fixupPluginRules(i18nTextPlugin),
|
||||
@@ -131,7 +131,7 @@ module.exports = {
|
||||
'prefer-rest-params': 'error',
|
||||
'prefer-spread': 'error',
|
||||
'prefer-template': 'error',
|
||||
'prettierPlugin/prettier': 'error',
|
||||
'prettier/prettier': 'error',
|
||||
'require-yield': 'error',
|
||||
'use-isnan': 'error',
|
||||
'valid-typeof': 'error',
|
||||
|
||||
1
node_modules/eslint-plugin-github/lib/configs/react.js
generated
vendored
1
node_modules/eslint-plugin-github/lib/configs/react.js
generated
vendored
@@ -36,6 +36,7 @@ module.exports = {
|
||||
nav: ['navigation'], // default in eslint-plugin-jsx-a11y
|
||||
tbody: ['rowgroup'],
|
||||
thead: ['rowgroup'],
|
||||
ul: ['list'], // In webkit, setting list-style-type: none results in semantics being removed. Need explicit role.
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
2
node_modules/eslint-plugin-github/package.json
generated
vendored
2
node_modules/eslint-plugin-github/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eslint-plugin-github",
|
||||
"version": "5.1.7",
|
||||
"version": "5.1.8",
|
||||
"description": "An opinionated collection of ESLint shared configs and rules used by GitHub.",
|
||||
"main": "lib/index.js",
|
||||
"entries": [
|
||||
|
||||
56
node_modules/long/README.md
generated
vendored
56
node_modules/long/README.md
generated
vendored
@@ -4,7 +4,7 @@ long.js
|
||||
A Long class for representing a 64 bit two's-complement integer value derived from the [Closure Library](https://github.com/google/closure-library)
|
||||
for stand-alone use and extended with unsigned support.
|
||||
|
||||
[](https://github.com/dcodeIO/long.js/actions?query=workflow%3ATest) [](https://github.com/dcodeIO/long.js/actions?query=workflow%3APublish) [](https://www.npmjs.com/package/long)
|
||||
[](https://github.com/dcodeIO/long.js/actions/workflows/test.yml) [](https://github.com/dcodeIO/long.js/actions/workflows/publish.yml) [](https://www.npmjs.com/package/long)
|
||||
|
||||
Background
|
||||
----------
|
||||
@@ -103,7 +103,10 @@ API
|
||||
|
||||
### Utility
|
||||
|
||||
* Long.**isLong**(obj: `*`): `boolean`<br />
|
||||
* type **LongLike**: `Long | number | bigint | string`<br />
|
||||
Any value or object that either is or can be converted to a Long.
|
||||
|
||||
* Long.**isLong**(obj: `any`): `boolean`<br />
|
||||
Tests if the specified object is a Long.
|
||||
|
||||
* Long.**fromBits**(lowBits: `number`, highBits: `number`, unsigned?: `boolean`): `Long`<br />
|
||||
@@ -124,28 +127,31 @@ API
|
||||
* Long.**fromNumber**(value: `number`, unsigned?: `boolean`): `Long`<br />
|
||||
Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
|
||||
|
||||
* Long.**fromBigInt**(value: `bigint`, unsigned?: `boolean`): `Long`<br />
|
||||
Returns a Long representing the given big integer.
|
||||
|
||||
* Long.**fromString**(str: `string`, unsigned?: `boolean`, radix?: `number`)<br />
|
||||
Long.**fromString**(str: `string`, radix: `number`)<br />
|
||||
Returns a Long representation of the given string, written using the specified radix.
|
||||
|
||||
* Long.**fromValue**(val: `*`, unsigned?: `boolean`): `Long`<br />
|
||||
* Long.**fromValue**(val: `LongLike`, unsigned?: `boolean`): `Long`<br />
|
||||
Converts the specified value to a Long using the appropriate from* function for its type.
|
||||
|
||||
### Methods
|
||||
|
||||
* Long#**add**(addend: `Long | number | string`): `Long`<br />
|
||||
* Long#**add**(addend: `LongLike`): `Long`<br />
|
||||
Returns the sum of this and the specified Long.
|
||||
|
||||
* Long#**and**(other: `Long | number | string`): `Long`<br />
|
||||
* Long#**and**(other: `LongLike`): `Long`<br />
|
||||
Returns the bitwise AND of this Long and the specified.
|
||||
|
||||
* Long#**compare**/**comp**(other: `Long | number | string`): `number`<br />
|
||||
* Long#**compare**/**comp**(other: `LongLike`): `number`<br />
|
||||
Compares this Long's value with the specified's. Returns `0` if they are the same, `1` if the this is greater and `-1` if the given one is greater.
|
||||
|
||||
* Long#**divide**/**div**(divisor: `Long | number | string`): `Long`<br />
|
||||
* Long#**divide**/**div**(divisor: `LongLike`): `Long`<br />
|
||||
Returns this Long divided by the specified.
|
||||
|
||||
* Long#**equals**/**eq**(other: `Long | number | string`): `boolean`<br />
|
||||
* Long#**equals**/**eq**(other: `LongLike`): `boolean`<br />
|
||||
Tests if this Long's value equals the specified's.
|
||||
|
||||
* Long#**getHighBits**(): `number`<br />
|
||||
@@ -163,10 +169,10 @@ API
|
||||
* Long#**getNumBitsAbs**(): `number`<br />
|
||||
Gets the number of bits needed to represent the absolute value of this Long.
|
||||
|
||||
* Long#**greaterThan**/**gt**(other: `Long | number | string`): `boolean`<br />
|
||||
* Long#**greaterThan**/**gt**(other: `LongLike`): `boolean`<br />
|
||||
Tests if this Long's value is greater than the specified's.
|
||||
|
||||
* Long#**greaterThanOrEqual**/**gte**/**ge**(other: `Long | number | string`): `boolean`<br />
|
||||
* Long#**greaterThanOrEqual**/**gte**/**ge**(other: `LongLike`): `boolean`<br />
|
||||
Tests if this Long's value is greater than or equal the specified's.
|
||||
|
||||
* Long#**isEven**(): `boolean`<br />
|
||||
@@ -181,19 +187,22 @@ API
|
||||
* Long#**isPositive**(): `boolean`<br />
|
||||
Tests if this Long's value is positive or zero.
|
||||
|
||||
* Long#**isSafeInteger**(): `boolean`<br />
|
||||
Tests if this Long can be safely represented as a JavaScript number.
|
||||
|
||||
* Long#**isZero**/**eqz**(): `boolean`<br />
|
||||
Tests if this Long's value equals zero.
|
||||
|
||||
* Long#**lessThan**/**lt**(other: `Long | number | string`): `boolean`<br />
|
||||
* Long#**lessThan**/**lt**(other: `LongLike`): `boolean`<br />
|
||||
Tests if this Long's value is less than the specified's.
|
||||
|
||||
* Long#**lessThanOrEqual**/**lte**/**le**(other: `Long | number | string`): `boolean`<br />
|
||||
* Long#**lessThanOrEqual**/**lte**/**le**(other: `LongLike`): `boolean`<br />
|
||||
Tests if this Long's value is less than or equal the specified's.
|
||||
|
||||
* Long#**modulo**/**mod**/**rem**(divisor: `Long | number | string`): `Long`<br />
|
||||
* Long#**modulo**/**mod**/**rem**(divisor: `LongLike`): `Long`<br />
|
||||
Returns this Long modulo the specified.
|
||||
|
||||
* Long#**multiply**/**mul**(multiplier: `Long | number | string`): `Long`<br />
|
||||
* Long#**multiply**/**mul**(multiplier: `LongLike`): `Long`<br />
|
||||
Returns the product of this and the specified Long.
|
||||
|
||||
* Long#**negate**/**neg**(): `Long`<br />
|
||||
@@ -208,28 +217,28 @@ API
|
||||
* Long#**countTrailingZeros**/**ctz**(): `number`<br />
|
||||
Returns count trailing zeros of this Long.
|
||||
|
||||
* Long#**notEquals**/**neq**/**ne**(other: `Long | number | string`): `boolean`<br />
|
||||
* Long#**notEquals**/**neq**/**ne**(other: `LongLike`): `boolean`<br />
|
||||
Tests if this Long's value differs from the specified's.
|
||||
|
||||
* Long#**or**(other: `Long | number | string`): `Long`<br />
|
||||
* Long#**or**(other: `LongLike`): `Long`<br />
|
||||
Returns the bitwise OR of this Long and the specified.
|
||||
|
||||
* Long#**shiftLeft**/**shl**(numBits: `Long | number | string`): `Long`<br />
|
||||
* Long#**shiftLeft**/**shl**(numBits: `Long | number`): `Long`<br />
|
||||
Returns this Long with bits shifted to the left by the given amount.
|
||||
|
||||
* Long#**shiftRight**/**shr**(numBits: `Long | number | string`): `Long`<br />
|
||||
* Long#**shiftRight**/**shr**(numBits: `Long | number`): `Long`<br />
|
||||
Returns this Long with bits arithmetically shifted to the right by the given amount.
|
||||
|
||||
* Long#**shiftRightUnsigned**/**shru**/**shr_u**(numBits: `Long | number | string`): `Long`<br />
|
||||
* Long#**shiftRightUnsigned**/**shru**/**shr_u**(numBits: `Long | number`): `Long`<br />
|
||||
Returns this Long with bits logically shifted to the right by the given amount.
|
||||
|
||||
* Long#**rotateLeft**/**rotl**(numBits: `Long | number | string`): `Long`<br />
|
||||
* Long#**rotateLeft**/**rotl**(numBits: `Long | number`): `Long`<br />
|
||||
Returns this Long with bits rotated to the left by the given amount.
|
||||
|
||||
* Long#**rotateRight**/**rotr**(numBits: `Long | number | string`): `Long`<br />
|
||||
* Long#**rotateRight**/**rotr**(numBits: `Long | number`): `Long`<br />
|
||||
Returns this Long with bits rotated to the right by the given amount.
|
||||
|
||||
* Long#**subtract**/**sub**(subtrahend: `Long | number | string`): `Long`<br />
|
||||
* Long#**subtract**/**sub**(subtrahend: `LongLike`): `Long`<br />
|
||||
Returns the difference of this and the specified Long.
|
||||
|
||||
* Long#**toBytes**(le?: `boolean`): `number[]`<br />
|
||||
@@ -247,6 +256,9 @@ API
|
||||
* Long#**toNumber**(): `number`<br />
|
||||
Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).
|
||||
|
||||
* Long#**toBigInt**(): `bigint`<br />
|
||||
Converts the Long to its big integer representation.
|
||||
|
||||
* Long#**toSigned**(): `Long`<br />
|
||||
Converts this Long to signed.
|
||||
|
||||
|
||||
4
node_modules/long/index.d.ts
generated
vendored
4
node_modules/long/index.d.ts
generated
vendored
@@ -1,2 +1,2 @@
|
||||
import Long from './umd/index';
|
||||
export default Long; // compatible with `import Long from "long"`
|
||||
import { Long } from './types.js';
|
||||
export default Long;
|
||||
|
||||
178
node_modules/long/index.js
generated
vendored
178
node_modules/long/index.js
generated
vendored
@@ -22,9 +22,69 @@
|
||||
var wasm = null;
|
||||
try {
|
||||
wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([
|
||||
0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11
|
||||
// \0asm
|
||||
0, 97, 115, 109,
|
||||
// version 1
|
||||
1, 0, 0, 0,
|
||||
|
||||
// section "type"
|
||||
1, 13, 2,
|
||||
// 0, () => i32
|
||||
96, 0, 1, 127,
|
||||
// 1, (i32, i32, i32, i32) => i32
|
||||
96, 4, 127, 127, 127, 127, 1, 127,
|
||||
|
||||
// section "function"
|
||||
3, 7, 6,
|
||||
// 0, type 0
|
||||
0,
|
||||
// 1, type 1
|
||||
1,
|
||||
// 2, type 1
|
||||
1,
|
||||
// 3, type 1
|
||||
1,
|
||||
// 4, type 1
|
||||
1,
|
||||
// 5, type 1
|
||||
1,
|
||||
|
||||
// section "global"
|
||||
6, 6, 1,
|
||||
// 0, "high", mutable i32
|
||||
127, 1, 65, 0, 11,
|
||||
|
||||
// section "export"
|
||||
7, 50, 6,
|
||||
// 0, "mul"
|
||||
3, 109, 117, 108, 0, 1,
|
||||
// 1, "div_s"
|
||||
5, 100, 105, 118, 95, 115, 0, 2,
|
||||
// 2, "div_u"
|
||||
5, 100, 105, 118, 95, 117, 0, 3,
|
||||
// 3, "rem_s"
|
||||
5, 114, 101, 109, 95, 115, 0, 4,
|
||||
// 4, "rem_u"
|
||||
5, 114, 101, 109, 95, 117, 0, 5,
|
||||
// 5, "get_high"
|
||||
8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0,
|
||||
|
||||
// section "code"
|
||||
10, 191, 1, 6,
|
||||
// 0, "get_high"
|
||||
4, 0, 35, 0, 11,
|
||||
// 1, "mul"
|
||||
36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11,
|
||||
// 2, "div_s"
|
||||
36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11,
|
||||
// 3, "div_u"
|
||||
36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11,
|
||||
// 4, "rem_s"
|
||||
36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11,
|
||||
// 5, "rem_u"
|
||||
36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11
|
||||
])), {}).exports;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
// no wasm support :(
|
||||
}
|
||||
|
||||
@@ -315,7 +375,7 @@ function fromValue(val, unsigned) {
|
||||
/**
|
||||
* Converts the specified value to a Long using the appropriate from* function for its type.
|
||||
* @function
|
||||
* @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value
|
||||
* @param {!Long|number|bigint|string|!{low: number, high: number, unsigned: boolean}} val Value
|
||||
* @param {boolean=} unsigned Whether unsigned or not, defaults to signed
|
||||
* @returns {!Long}
|
||||
*/
|
||||
@@ -585,6 +645,22 @@ LongPrototype.getNumBitsAbs = function getNumBitsAbs() {
|
||||
return this.high != 0 ? bit + 33 : bit + 1;
|
||||
};
|
||||
|
||||
/**
|
||||
* Tests if this Long can be safely represented as a JavaScript number.
|
||||
* @this {!Long}
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.isSafeInteger = function isSafeInteger() {
|
||||
// 2^53-1 is the maximum safe value
|
||||
var top11Bits = this.high >> 21;
|
||||
// [0, 2^53-1]
|
||||
if (!top11Bits) return true;
|
||||
// > 2^53-1
|
||||
if (this.unsigned) return false;
|
||||
// [-2^53, -1] except -2^53
|
||||
return top11Bits === -1 && !(this.low === 0 && this.high === -0x200000);
|
||||
};
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals zero.
|
||||
* @this {!Long}
|
||||
@@ -639,7 +715,7 @@ LongPrototype.isEven = function isEven() {
|
||||
/**
|
||||
* Tests if this Long's value equals the specified's.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.equals = function equals(other) {
|
||||
@@ -653,7 +729,7 @@ LongPrototype.equals = function equals(other) {
|
||||
/**
|
||||
* Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.eq = LongPrototype.equals;
|
||||
@@ -661,7 +737,7 @@ LongPrototype.eq = LongPrototype.equals;
|
||||
/**
|
||||
* Tests if this Long's value differs from the specified's.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.notEquals = function notEquals(other) {
|
||||
@@ -671,7 +747,7 @@ LongPrototype.notEquals = function notEquals(other) {
|
||||
/**
|
||||
* Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.neq = LongPrototype.notEquals;
|
||||
@@ -679,7 +755,7 @@ LongPrototype.neq = LongPrototype.notEquals;
|
||||
/**
|
||||
* Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.ne = LongPrototype.notEquals;
|
||||
@@ -687,7 +763,7 @@ LongPrototype.ne = LongPrototype.notEquals;
|
||||
/**
|
||||
* Tests if this Long's value is less than the specified's.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.lessThan = function lessThan(other) {
|
||||
@@ -697,7 +773,7 @@ LongPrototype.lessThan = function lessThan(other) {
|
||||
/**
|
||||
* Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.lt = LongPrototype.lessThan;
|
||||
@@ -705,7 +781,7 @@ LongPrototype.lt = LongPrototype.lessThan;
|
||||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
|
||||
@@ -715,7 +791,7 @@ LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
|
||||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.lte = LongPrototype.lessThanOrEqual;
|
||||
@@ -723,7 +799,7 @@ LongPrototype.lte = LongPrototype.lessThanOrEqual;
|
||||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.le = LongPrototype.lessThanOrEqual;
|
||||
@@ -731,7 +807,7 @@ LongPrototype.le = LongPrototype.lessThanOrEqual;
|
||||
/**
|
||||
* Tests if this Long's value is greater than the specified's.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.greaterThan = function greaterThan(other) {
|
||||
@@ -741,7 +817,7 @@ LongPrototype.greaterThan = function greaterThan(other) {
|
||||
/**
|
||||
* Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.gt = LongPrototype.greaterThan;
|
||||
@@ -749,7 +825,7 @@ LongPrototype.gt = LongPrototype.greaterThan;
|
||||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
|
||||
@@ -759,7 +835,7 @@ LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
|
||||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.gte = LongPrototype.greaterThanOrEqual;
|
||||
@@ -767,7 +843,7 @@ LongPrototype.gte = LongPrototype.greaterThanOrEqual;
|
||||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.ge = LongPrototype.greaterThanOrEqual;
|
||||
@@ -775,7 +851,7 @@ LongPrototype.ge = LongPrototype.greaterThanOrEqual;
|
||||
/**
|
||||
* Compares this Long's value with the specified's.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {number} 0 if they are the same, 1 if the this is greater and -1
|
||||
* if the given one is greater
|
||||
*/
|
||||
@@ -800,7 +876,7 @@ LongPrototype.compare = function compare(other) {
|
||||
/**
|
||||
* Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {number} 0 if they are the same, 1 if the this is greater and -1
|
||||
* if the given one is greater
|
||||
*/
|
||||
@@ -827,7 +903,7 @@ LongPrototype.neg = LongPrototype.negate;
|
||||
/**
|
||||
* Returns the sum of this and the specified Long.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} addend Addend
|
||||
* @param {!Long|number|bigint|string} addend Addend
|
||||
* @returns {!Long} Sum
|
||||
*/
|
||||
LongPrototype.add = function add(addend) {
|
||||
@@ -864,7 +940,7 @@ LongPrototype.add = function add(addend) {
|
||||
/**
|
||||
* Returns the difference of this and the specified Long.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} subtrahend Subtrahend
|
||||
* @param {!Long|number|bigint|string} subtrahend Subtrahend
|
||||
* @returns {!Long} Difference
|
||||
*/
|
||||
LongPrototype.subtract = function subtract(subtrahend) {
|
||||
@@ -876,7 +952,7 @@ LongPrototype.subtract = function subtract(subtrahend) {
|
||||
/**
|
||||
* Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.
|
||||
* @function
|
||||
* @param {!Long|number|string} subtrahend Subtrahend
|
||||
* @param {!Long|number|bigint|string} subtrahend Subtrahend
|
||||
* @returns {!Long} Difference
|
||||
*/
|
||||
LongPrototype.sub = LongPrototype.subtract;
|
||||
@@ -884,7 +960,7 @@ LongPrototype.sub = LongPrototype.subtract;
|
||||
/**
|
||||
* Returns the product of this and the specified Long.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} multiplier Multiplier
|
||||
* @param {!Long|number|bigint|string} multiplier Multiplier
|
||||
* @returns {!Long} Product
|
||||
*/
|
||||
LongPrototype.multiply = function multiply(multiplier) {
|
||||
@@ -961,7 +1037,7 @@ LongPrototype.multiply = function multiply(multiplier) {
|
||||
/**
|
||||
* Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.
|
||||
* @function
|
||||
* @param {!Long|number|string} multiplier Multiplier
|
||||
* @param {!Long|number|bigint|string} multiplier Multiplier
|
||||
* @returns {!Long} Product
|
||||
*/
|
||||
LongPrototype.mul = LongPrototype.multiply;
|
||||
@@ -970,7 +1046,7 @@ LongPrototype.mul = LongPrototype.multiply;
|
||||
* Returns this Long divided by the specified. The result is signed if this Long is signed or
|
||||
* unsigned if this Long is unsigned.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} divisor Divisor
|
||||
* @param {!Long|number|bigint|string} divisor Divisor
|
||||
* @returns {!Long} Quotient
|
||||
*/
|
||||
LongPrototype.divide = function divide(divisor) {
|
||||
@@ -1083,7 +1159,7 @@ LongPrototype.divide = function divide(divisor) {
|
||||
/**
|
||||
* Returns this Long divided by the specified. This is an alias of {@link Long#divide}.
|
||||
* @function
|
||||
* @param {!Long|number|string} divisor Divisor
|
||||
* @param {!Long|number|bigint|string} divisor Divisor
|
||||
* @returns {!Long} Quotient
|
||||
*/
|
||||
LongPrototype.div = LongPrototype.divide;
|
||||
@@ -1091,7 +1167,7 @@ LongPrototype.div = LongPrototype.divide;
|
||||
/**
|
||||
* Returns this Long modulo the specified.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} divisor Divisor
|
||||
* @param {!Long|number|bigint|string} divisor Divisor
|
||||
* @returns {!Long} Remainder
|
||||
*/
|
||||
LongPrototype.modulo = function modulo(divisor) {
|
||||
@@ -1115,7 +1191,7 @@ LongPrototype.modulo = function modulo(divisor) {
|
||||
/**
|
||||
* Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.
|
||||
* @function
|
||||
* @param {!Long|number|string} divisor Divisor
|
||||
* @param {!Long|number|bigint|string} divisor Divisor
|
||||
* @returns {!Long} Remainder
|
||||
*/
|
||||
LongPrototype.mod = LongPrototype.modulo;
|
||||
@@ -1123,7 +1199,7 @@ LongPrototype.mod = LongPrototype.modulo;
|
||||
/**
|
||||
* Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.
|
||||
* @function
|
||||
* @param {!Long|number|string} divisor Divisor
|
||||
* @param {!Long|number|bigint|string} divisor Divisor
|
||||
* @returns {!Long} Remainder
|
||||
*/
|
||||
LongPrototype.rem = LongPrototype.modulo;
|
||||
@@ -1174,7 +1250,7 @@ LongPrototype.ctz = LongPrototype.countTrailingZeros;
|
||||
/**
|
||||
* Returns the bitwise AND of this Long and the specified.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other Long
|
||||
* @param {!Long|number|bigint|string} other Other Long
|
||||
* @returns {!Long}
|
||||
*/
|
||||
LongPrototype.and = function and(other) {
|
||||
@@ -1186,7 +1262,7 @@ LongPrototype.and = function and(other) {
|
||||
/**
|
||||
* Returns the bitwise OR of this Long and the specified.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other Long
|
||||
* @param {!Long|number|bigint|string} other Other Long
|
||||
* @returns {!Long}
|
||||
*/
|
||||
LongPrototype.or = function or(other) {
|
||||
@@ -1198,7 +1274,7 @@ LongPrototype.or = function or(other) {
|
||||
/**
|
||||
* Returns the bitwise XOR of this Long and the given one.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other Long
|
||||
* @param {!Long|number|bigint|string} other Other Long
|
||||
* @returns {!Long}
|
||||
*/
|
||||
LongPrototype.xor = function xor(other) {
|
||||
@@ -1464,4 +1540,40 @@ Long.fromBytesBE = function fromBytesBE(bytes, unsigned) {
|
||||
);
|
||||
};
|
||||
|
||||
// Support conversion to/from BigInt where available
|
||||
if (typeof BigInt === "function") {
|
||||
|
||||
/**
|
||||
* Returns a Long representing the given big integer.
|
||||
* @function
|
||||
* @param {number} value The big integer value
|
||||
* @param {boolean=} unsigned Whether unsigned or not, defaults to signed
|
||||
* @returns {!Long} The corresponding Long value
|
||||
*/
|
||||
Long.fromBigInt = function fromBigInt(value, unsigned) {
|
||||
var lowBits = Number(BigInt.asIntN(32, value));
|
||||
var highBits = Number(BigInt.asIntN(32, value >> BigInt(32)));
|
||||
return fromBits(lowBits, highBits, unsigned);
|
||||
};
|
||||
|
||||
// Override
|
||||
Long.fromValue = function fromValueWithBigInt(value, unsigned) {
|
||||
if (typeof value === "bigint")
|
||||
return fromBigInt(value, unsigned);
|
||||
return fromValue(value, unsigned);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the Long to its big integer representation.
|
||||
* @this {!Long}
|
||||
* @returns {bigint}
|
||||
*/
|
||||
LongPrototype.toBigInt = function toBigInt() {
|
||||
var lowBigInt = BigInt(this.low >>> 0);
|
||||
var highBigInt = BigInt(this.unsigned ? this.high >>> 0 : this.high);
|
||||
return highBigInt << BigInt(32) | lowBigInt;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
export default Long;
|
||||
|
||||
10
node_modules/long/package.json
generated
vendored
10
node_modules/long/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "long",
|
||||
"version": "5.2.4",
|
||||
"version": "5.3.0",
|
||||
"author": "Daniel Wirtz <dcode@dcode.io>",
|
||||
"description": "A Long class for representing a 64-bit two's-complement integer value.",
|
||||
"repository": {
|
||||
@@ -33,7 +33,9 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "esm2umd Long index.js > umd/index.js",
|
||||
"test": "node tests"
|
||||
"test": "npm run test:unit && npm run test:typescript",
|
||||
"test:unit": "node tests",
|
||||
"test:typescript": "tsc --project tests/typescript/tsconfig.esnext.json && tsc --project tests/typescript/tsconfig.nodenext.json && tsc --project tests/typescript/tsconfig.commonjs.json"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
@@ -41,10 +43,12 @@
|
||||
"umd/index.js",
|
||||
"umd/index.d.ts",
|
||||
"umd/package.json",
|
||||
"types.d.ts",
|
||||
"LICENSE",
|
||||
"README.md"
|
||||
],
|
||||
"devDependencies": {
|
||||
"esm2umd": "^0.2.1"
|
||||
"esm2umd": "^0.2.2",
|
||||
"typescript": "^5.7.3"
|
||||
}
|
||||
}
|
||||
|
||||
465
node_modules/long/types.d.ts
generated
vendored
Normal file
465
node_modules/long/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,465 @@
|
||||
type LongLike = Long | number | bigint | string | { low: number; high: number; unsigned: boolean };
|
||||
|
||||
export declare class Long {
|
||||
/**
|
||||
* Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as signed integers. See the from* functions below for more convenient ways of constructing Longs.
|
||||
*/
|
||||
constructor(low: number, high?: number, unsigned?: boolean);
|
||||
|
||||
/**
|
||||
* Maximum unsigned value.
|
||||
*/
|
||||
static MAX_UNSIGNED_VALUE: Long;
|
||||
|
||||
/**
|
||||
* Maximum signed value.
|
||||
*/
|
||||
static MAX_VALUE: Long;
|
||||
|
||||
/**
|
||||
* Minimum signed value.
|
||||
*/
|
||||
static MIN_VALUE: Long;
|
||||
|
||||
/**
|
||||
* Signed negative one.
|
||||
*/
|
||||
static NEG_ONE: Long;
|
||||
|
||||
/**
|
||||
* Signed one.
|
||||
*/
|
||||
static ONE: Long;
|
||||
|
||||
/**
|
||||
* Unsigned one.
|
||||
*/
|
||||
static UONE: Long;
|
||||
|
||||
/**
|
||||
* Unsigned zero.
|
||||
*/
|
||||
static UZERO: Long;
|
||||
|
||||
/**
|
||||
* Signed zero
|
||||
*/
|
||||
static ZERO: Long;
|
||||
|
||||
/**
|
||||
* The high 32 bits as a signed value.
|
||||
*/
|
||||
high: number;
|
||||
|
||||
/**
|
||||
* The low 32 bits as a signed value.
|
||||
*/
|
||||
low: number;
|
||||
|
||||
/**
|
||||
* Whether unsigned or not.
|
||||
*/
|
||||
unsigned: boolean;
|
||||
|
||||
/**
|
||||
* Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is assumed to use 32 bits.
|
||||
*/
|
||||
static fromBits(lowBits: number, highBits: number, unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Returns a Long representing the given 32 bit integer value.
|
||||
*/
|
||||
static fromInt(value: number, unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
|
||||
*/
|
||||
static fromNumber(value: number, unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Returns a Long representing the given big integer value.
|
||||
*/
|
||||
static fromBigInt(value: bigint, unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Returns a Long representation of the given string, written using the specified radix.
|
||||
*/
|
||||
static fromString(
|
||||
str: string,
|
||||
unsigned?: boolean | number,
|
||||
radix?: number
|
||||
): Long;
|
||||
|
||||
/**
|
||||
* Creates a Long from its byte representation.
|
||||
*/
|
||||
static fromBytes(bytes: number[], unsigned?: boolean, le?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Creates a Long from its little endian byte representation.
|
||||
*/
|
||||
static fromBytesLE(bytes: number[], unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Creates a Long from its big endian byte representation.
|
||||
*/
|
||||
static fromBytesBE(bytes: number[], unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Tests if the specified object is a Long.
|
||||
*/
|
||||
static isLong(obj: any): obj is Long;
|
||||
|
||||
/**
|
||||
* Converts the specified value to a Long.
|
||||
*/
|
||||
static fromValue(val: LongLike, unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Returns the sum of this and the specified Long.
|
||||
*/
|
||||
add(addend: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Returns the bitwise AND of this Long and the specified.
|
||||
*/
|
||||
and(other: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Compares this Long's value with the specified's.
|
||||
*/
|
||||
compare(other: LongLike): number;
|
||||
|
||||
/**
|
||||
* Compares this Long's value with the specified's.
|
||||
*/
|
||||
comp(other: LongLike): number;
|
||||
|
||||
/**
|
||||
* Returns this Long divided by the specified.
|
||||
*/
|
||||
divide(divisor: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long divided by the specified.
|
||||
*/
|
||||
div(divisor: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals the specified's.
|
||||
*/
|
||||
equals(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals the specified's.
|
||||
*/
|
||||
eq(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Gets the high 32 bits as a signed integer.
|
||||
*/
|
||||
getHighBits(): number;
|
||||
|
||||
/**
|
||||
* Gets the high 32 bits as an unsigned integer.
|
||||
*/
|
||||
getHighBitsUnsigned(): number;
|
||||
|
||||
/**
|
||||
* Gets the low 32 bits as a signed integer.
|
||||
*/
|
||||
getLowBits(): number;
|
||||
|
||||
/**
|
||||
* Gets the low 32 bits as an unsigned integer.
|
||||
*/
|
||||
getLowBitsUnsigned(): number;
|
||||
|
||||
/**
|
||||
* Gets the number of bits needed to represent the absolute value of this Long.
|
||||
*/
|
||||
getNumBitsAbs(): number;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than the specified's.
|
||||
*/
|
||||
greaterThan(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than the specified's.
|
||||
*/
|
||||
gt(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's.
|
||||
*/
|
||||
greaterThanOrEqual(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's.
|
||||
*/
|
||||
gte(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's.
|
||||
*/
|
||||
ge(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is even.
|
||||
*/
|
||||
isEven(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is negative.
|
||||
*/
|
||||
isNegative(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is odd.
|
||||
*/
|
||||
isOdd(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is positive or zero.
|
||||
*/
|
||||
isPositive(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long can be safely represented as a JavaScript number.
|
||||
*/
|
||||
isSafeInteger(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals zero.
|
||||
*/
|
||||
isZero(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals zero.
|
||||
*/
|
||||
eqz(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than the specified's.
|
||||
*/
|
||||
lessThan(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than the specified's.
|
||||
*/
|
||||
lt(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's.
|
||||
*/
|
||||
lessThanOrEqual(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's.
|
||||
*/
|
||||
lte(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's.
|
||||
*/
|
||||
le(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Returns this Long modulo the specified.
|
||||
*/
|
||||
modulo(other: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long modulo the specified.
|
||||
*/
|
||||
mod(other: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long modulo the specified.
|
||||
*/
|
||||
rem(other: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Returns the product of this and the specified Long.
|
||||
*/
|
||||
multiply(multiplier: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Returns the product of this and the specified Long.
|
||||
*/
|
||||
mul(multiplier: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Negates this Long's value.
|
||||
*/
|
||||
negate(): Long;
|
||||
|
||||
/**
|
||||
* Negates this Long's value.
|
||||
*/
|
||||
neg(): Long;
|
||||
|
||||
/**
|
||||
* Returns the bitwise NOT of this Long.
|
||||
*/
|
||||
not(): Long;
|
||||
|
||||
/**
|
||||
* Returns count leading zeros of this Long.
|
||||
*/
|
||||
countLeadingZeros(): number;
|
||||
|
||||
/**
|
||||
* Returns count leading zeros of this Long.
|
||||
*/
|
||||
clz(): number;
|
||||
|
||||
/**
|
||||
* Returns count trailing zeros of this Long.
|
||||
*/
|
||||
countTrailingZeros(): number;
|
||||
|
||||
/**
|
||||
* Returns count trailing zeros of this Long.
|
||||
*/
|
||||
ctz(): number;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value differs from the specified's.
|
||||
*/
|
||||
notEquals(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value differs from the specified's.
|
||||
*/
|
||||
neq(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value differs from the specified's.
|
||||
*/
|
||||
ne(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Returns the bitwise OR of this Long and the specified.
|
||||
*/
|
||||
or(other: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits shifted to the left by the given amount.
|
||||
*/
|
||||
shiftLeft(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits shifted to the left by the given amount.
|
||||
*/
|
||||
shl(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits arithmetically shifted to the right by the given amount.
|
||||
*/
|
||||
shiftRight(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits arithmetically shifted to the right by the given amount.
|
||||
*/
|
||||
shr(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits logically shifted to the right by the given amount.
|
||||
*/
|
||||
shiftRightUnsigned(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits logically shifted to the right by the given amount.
|
||||
*/
|
||||
shru(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits logically shifted to the right by the given amount.
|
||||
*/
|
||||
shr_u(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits rotated to the left by the given amount.
|
||||
*/
|
||||
rotateLeft(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits rotated to the left by the given amount.
|
||||
*/
|
||||
rotl(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits rotated to the right by the given amount.
|
||||
*/
|
||||
rotateRight(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits rotated to the right by the given amount.
|
||||
*/
|
||||
rotr(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns the difference of this and the specified Long.
|
||||
*/
|
||||
subtract(subtrahend: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Returns the difference of this and the specified Long.
|
||||
*/
|
||||
sub(subtrahend: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Converts the Long to a big integer.
|
||||
*/
|
||||
toBigInt(): bigint;
|
||||
|
||||
/**
|
||||
* Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.
|
||||
*/
|
||||
toInt(): number;
|
||||
|
||||
/**
|
||||
* Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).
|
||||
*/
|
||||
toNumber(): number;
|
||||
|
||||
/**
|
||||
* Converts this Long to its byte representation.
|
||||
*/
|
||||
|
||||
toBytes(le?: boolean): number[];
|
||||
|
||||
/**
|
||||
* Converts this Long to its little endian byte representation.
|
||||
*/
|
||||
|
||||
toBytesLE(): number[];
|
||||
|
||||
/**
|
||||
* Converts this Long to its big endian byte representation.
|
||||
*/
|
||||
|
||||
toBytesBE(): number[];
|
||||
|
||||
/**
|
||||
* Converts this Long to signed.
|
||||
*/
|
||||
toSigned(): Long;
|
||||
|
||||
/**
|
||||
* Converts the Long to a string written in the specified radix.
|
||||
*/
|
||||
toString(radix?: number): string;
|
||||
|
||||
/**
|
||||
* Converts this Long to unsigned.
|
||||
*/
|
||||
toUnsigned(): Long;
|
||||
|
||||
/**
|
||||
* Returns the bitwise XOR of this Long and the given one.
|
||||
*/
|
||||
xor(other: LongLike): Long;
|
||||
}
|
||||
457
node_modules/long/umd/index.d.ts
generated
vendored
457
node_modules/long/umd/index.d.ts
generated
vendored
@@ -1,457 +1,2 @@
|
||||
declare class Long {
|
||||
/**
|
||||
* Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as signed integers. See the from* functions below for more convenient ways of constructing Longs.
|
||||
*/
|
||||
constructor(low: number, high?: number, unsigned?: boolean);
|
||||
|
||||
/**
|
||||
* Maximum unsigned value.
|
||||
*/
|
||||
static MAX_UNSIGNED_VALUE: Long;
|
||||
|
||||
/**
|
||||
* Maximum signed value.
|
||||
*/
|
||||
static MAX_VALUE: Long;
|
||||
|
||||
/**
|
||||
* Minimum signed value.
|
||||
*/
|
||||
static MIN_VALUE: Long;
|
||||
|
||||
/**
|
||||
* Signed negative one.
|
||||
*/
|
||||
static NEG_ONE: Long;
|
||||
|
||||
/**
|
||||
* Signed one.
|
||||
*/
|
||||
static ONE: Long;
|
||||
|
||||
/**
|
||||
* Unsigned one.
|
||||
*/
|
||||
static UONE: Long;
|
||||
|
||||
/**
|
||||
* Unsigned zero.
|
||||
*/
|
||||
static UZERO: Long;
|
||||
|
||||
/**
|
||||
* Signed zero
|
||||
*/
|
||||
static ZERO: Long;
|
||||
|
||||
/**
|
||||
* The high 32 bits as a signed value.
|
||||
*/
|
||||
high: number;
|
||||
|
||||
/**
|
||||
* The low 32 bits as a signed value.
|
||||
*/
|
||||
low: number;
|
||||
|
||||
/**
|
||||
* Whether unsigned or not.
|
||||
*/
|
||||
unsigned: boolean;
|
||||
|
||||
/**
|
||||
* Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is assumed to use 32 bits.
|
||||
*/
|
||||
static fromBits(lowBits: number, highBits: number, unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Returns a Long representing the given 32 bit integer value.
|
||||
*/
|
||||
static fromInt(value: number, unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
|
||||
*/
|
||||
static fromNumber(value: number, unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Returns a Long representation of the given string, written using the specified radix.
|
||||
*/
|
||||
static fromString(
|
||||
str: string,
|
||||
unsigned?: boolean | number,
|
||||
radix?: number
|
||||
): Long;
|
||||
|
||||
/**
|
||||
* Creates a Long from its byte representation.
|
||||
*/
|
||||
static fromBytes(bytes: number[], unsigned?: boolean, le?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Creates a Long from its little endian byte representation.
|
||||
*/
|
||||
static fromBytesLE(bytes: number[], unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Creates a Long from its big endian byte representation.
|
||||
*/
|
||||
static fromBytesBE(bytes: number[], unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Tests if the specified object is a Long.
|
||||
*/
|
||||
static isLong(obj: any): obj is Long;
|
||||
|
||||
/**
|
||||
* Converts the specified value to a Long.
|
||||
*/
|
||||
static fromValue(
|
||||
val:
|
||||
| Long
|
||||
| number
|
||||
| string
|
||||
| { low: number; high: number; unsigned: boolean },
|
||||
unsigned?: boolean
|
||||
): Long;
|
||||
|
||||
/**
|
||||
* Returns the sum of this and the specified Long.
|
||||
*/
|
||||
add(addend: number | Long | string): Long;
|
||||
|
||||
/**
|
||||
* Returns the bitwise AND of this Long and the specified.
|
||||
*/
|
||||
and(other: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Compares this Long's value with the specified's.
|
||||
*/
|
||||
compare(other: Long | number | string): number;
|
||||
|
||||
/**
|
||||
* Compares this Long's value with the specified's.
|
||||
*/
|
||||
comp(other: Long | number | string): number;
|
||||
|
||||
/**
|
||||
* Returns this Long divided by the specified.
|
||||
*/
|
||||
divide(divisor: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long divided by the specified.
|
||||
*/
|
||||
div(divisor: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals the specified's.
|
||||
*/
|
||||
equals(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals the specified's.
|
||||
*/
|
||||
eq(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Gets the high 32 bits as a signed integer.
|
||||
*/
|
||||
getHighBits(): number;
|
||||
|
||||
/**
|
||||
* Gets the high 32 bits as an unsigned integer.
|
||||
*/
|
||||
getHighBitsUnsigned(): number;
|
||||
|
||||
/**
|
||||
* Gets the low 32 bits as a signed integer.
|
||||
*/
|
||||
getLowBits(): number;
|
||||
|
||||
/**
|
||||
* Gets the low 32 bits as an unsigned integer.
|
||||
*/
|
||||
getLowBitsUnsigned(): number;
|
||||
|
||||
/**
|
||||
* Gets the number of bits needed to represent the absolute value of this Long.
|
||||
*/
|
||||
getNumBitsAbs(): number;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than the specified's.
|
||||
*/
|
||||
greaterThan(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than the specified's.
|
||||
*/
|
||||
gt(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's.
|
||||
*/
|
||||
greaterThanOrEqual(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's.
|
||||
*/
|
||||
gte(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's.
|
||||
*/
|
||||
ge(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is even.
|
||||
*/
|
||||
isEven(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is negative.
|
||||
*/
|
||||
isNegative(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is odd.
|
||||
*/
|
||||
isOdd(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is positive or zero.
|
||||
*/
|
||||
isPositive(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals zero.
|
||||
*/
|
||||
isZero(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals zero.
|
||||
*/
|
||||
eqz(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than the specified's.
|
||||
*/
|
||||
lessThan(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than the specified's.
|
||||
*/
|
||||
lt(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's.
|
||||
*/
|
||||
lessThanOrEqual(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's.
|
||||
*/
|
||||
lte(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's.
|
||||
*/
|
||||
le(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Returns this Long modulo the specified.
|
||||
*/
|
||||
modulo(other: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long modulo the specified.
|
||||
*/
|
||||
mod(other: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long modulo the specified.
|
||||
*/
|
||||
rem(other: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Returns the product of this and the specified Long.
|
||||
*/
|
||||
multiply(multiplier: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Returns the product of this and the specified Long.
|
||||
*/
|
||||
mul(multiplier: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Negates this Long's value.
|
||||
*/
|
||||
negate(): Long;
|
||||
|
||||
/**
|
||||
* Negates this Long's value.
|
||||
*/
|
||||
neg(): Long;
|
||||
|
||||
/**
|
||||
* Returns the bitwise NOT of this Long.
|
||||
*/
|
||||
not(): Long;
|
||||
|
||||
/**
|
||||
* Returns count leading zeros of this Long.
|
||||
*/
|
||||
countLeadingZeros(): number;
|
||||
|
||||
/**
|
||||
* Returns count leading zeros of this Long.
|
||||
*/
|
||||
clz(): number;
|
||||
|
||||
/**
|
||||
* Returns count trailing zeros of this Long.
|
||||
*/
|
||||
countTrailingZeros(): number;
|
||||
|
||||
/**
|
||||
* Returns count trailing zeros of this Long.
|
||||
*/
|
||||
ctz(): number;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value differs from the specified's.
|
||||
*/
|
||||
notEquals(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value differs from the specified's.
|
||||
*/
|
||||
neq(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value differs from the specified's.
|
||||
*/
|
||||
ne(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Returns the bitwise OR of this Long and the specified.
|
||||
*/
|
||||
or(other: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits shifted to the left by the given amount.
|
||||
*/
|
||||
shiftLeft(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits shifted to the left by the given amount.
|
||||
*/
|
||||
shl(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits arithmetically shifted to the right by the given amount.
|
||||
*/
|
||||
shiftRight(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits arithmetically shifted to the right by the given amount.
|
||||
*/
|
||||
shr(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits logically shifted to the right by the given amount.
|
||||
*/
|
||||
shiftRightUnsigned(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits logically shifted to the right by the given amount.
|
||||
*/
|
||||
shru(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits logically shifted to the right by the given amount.
|
||||
*/
|
||||
shr_u(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits rotated to the left by the given amount.
|
||||
*/
|
||||
rotateLeft(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits rotated to the left by the given amount.
|
||||
*/
|
||||
rotl(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits rotated to the right by the given amount.
|
||||
*/
|
||||
rotateRight(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits rotated to the right by the given amount.
|
||||
*/
|
||||
rotr(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns the difference of this and the specified Long.
|
||||
*/
|
||||
subtract(subtrahend: number | Long | string): Long;
|
||||
|
||||
/**
|
||||
* Returns the difference of this and the specified Long.
|
||||
*/
|
||||
sub(subtrahend: number | Long | string): Long;
|
||||
|
||||
/**
|
||||
* Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.
|
||||
*/
|
||||
toInt(): number;
|
||||
|
||||
/**
|
||||
* Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).
|
||||
*/
|
||||
toNumber(): number;
|
||||
|
||||
/**
|
||||
* Converts this Long to its byte representation.
|
||||
*/
|
||||
|
||||
toBytes(le?: boolean): number[];
|
||||
|
||||
/**
|
||||
* Converts this Long to its little endian byte representation.
|
||||
*/
|
||||
|
||||
toBytesLE(): number[];
|
||||
|
||||
/**
|
||||
* Converts this Long to its big endian byte representation.
|
||||
*/
|
||||
|
||||
toBytesBE(): number[];
|
||||
|
||||
/**
|
||||
* Converts this Long to signed.
|
||||
*/
|
||||
toSigned(): Long;
|
||||
|
||||
/**
|
||||
* Converts the Long to a string written in the specified radix.
|
||||
*/
|
||||
toString(radix?: number): string;
|
||||
|
||||
/**
|
||||
* Converts this Long to unsigned.
|
||||
*/
|
||||
toUnsigned(): Long;
|
||||
|
||||
/**
|
||||
* Returns the bitwise XOR of this Long and the given one.
|
||||
*/
|
||||
xor(other: Long | number | string): Long;
|
||||
}
|
||||
|
||||
import { Long } from '../types.js';
|
||||
export = Long;
|
||||
|
||||
615
node_modules/long/umd/index.js
generated
vendored
615
node_modules/long/umd/index.js
generated
vendored
File diff suppressed because it is too large
Load Diff
207
node_modules/nock/lib/recorder.js
generated
vendored
207
node_modules/nock/lib/recorder.js
generated
vendored
@@ -6,7 +6,6 @@ const { inspect } = require('util')
|
||||
|
||||
const common = require('./common')
|
||||
const { restoreOverriddenClientRequest } = require('./intercept')
|
||||
const { EventEmitter } = require('stream')
|
||||
const { gzipSync, brotliCompressSync, deflateSync } = require('zlib')
|
||||
const {
|
||||
default: nodeInterceptors,
|
||||
@@ -225,134 +224,106 @@ function record(recOptions) {
|
||||
// We override the requests so that we can save information on them before executing.
|
||||
clientRequestInterceptor.apply()
|
||||
fetchRequestInterceptor.apply()
|
||||
clientRequestInterceptor.on('request', async function ({ request }) {
|
||||
await recordRequest(request)
|
||||
})
|
||||
fetchRequestInterceptor.on('request', async function ({ request }) {
|
||||
await recordRequest(request)
|
||||
})
|
||||
clientRequestInterceptor.on(
|
||||
'response',
|
||||
async function ({ request, response }) {
|
||||
await recordResponse(request, response)
|
||||
},
|
||||
)
|
||||
fetchRequestInterceptor.on(
|
||||
'response',
|
||||
async function ({ request, response }) {
|
||||
// fetch decompresses the body automatically, so we need to recompress it
|
||||
const codings =
|
||||
response.headers
|
||||
.get('content-encoding')
|
||||
?.toLowerCase()
|
||||
.split(',')
|
||||
.map(c => c.trim()) || []
|
||||
|
||||
async function recordRequest(mswRequest) {
|
||||
let body = await response.arrayBuffer()
|
||||
for (const coding of codings) {
|
||||
if (coding === 'gzip') {
|
||||
body = gzipSync(body)
|
||||
} else if (coding === 'deflate') {
|
||||
body = deflateSync(body)
|
||||
} else if (coding === 'br') {
|
||||
body = brotliCompressSync(body)
|
||||
}
|
||||
}
|
||||
|
||||
await recordResponse(request, new Response(body, response))
|
||||
},
|
||||
)
|
||||
|
||||
async function recordResponse(mswRequest, mswResponse) {
|
||||
const request = mswRequest.clone()
|
||||
const response = mswResponse.clone()
|
||||
const { options } = common.normalizeClientRequestArgs(request.url)
|
||||
options.method = request.method
|
||||
const proto = options.protocol.slice(0, -1)
|
||||
|
||||
// Node 0.11 https.request calls http.request -- don't want to record things
|
||||
// twice.
|
||||
/* istanbul ignore if */
|
||||
if (options._recording) {
|
||||
return
|
||||
if (proto === 'https') {
|
||||
options.proto = 'https'
|
||||
}
|
||||
options._recording = true
|
||||
debug(thisRecordingId, proto, 'intercepted request ended')
|
||||
|
||||
const req = new EventEmitter()
|
||||
req.on('response', function () {
|
||||
debug(thisRecordingId, 'intercepting', proto, 'request to record')
|
||||
let reqheaders
|
||||
// Ignore request headers completely unless it was explicitly enabled by the user (see README)
|
||||
if (enableReqHeadersRecording) {
|
||||
// We never record user-agent headers as they are worse than useless -
|
||||
// they actually make testing more difficult without providing any benefit (see README)
|
||||
reqheaders = Object.fromEntries(request.headers.entries())
|
||||
common.deleteHeadersField(reqheaders, 'user-agent')
|
||||
}
|
||||
|
||||
clientRequestInterceptor.once('response', async function ({ response }) {
|
||||
await recordResponse(response)
|
||||
})
|
||||
fetchRequestInterceptor.once('response', async function ({ response }) {
|
||||
// fetch decompresses the body automatically, so we need to recompress it
|
||||
const codings =
|
||||
response.headers
|
||||
.get('content-encoding')
|
||||
?.toLowerCase()
|
||||
.split(',')
|
||||
.map(c => c.trim()) || []
|
||||
const headers = Object.fromEntries(response.headers.entries())
|
||||
const res = {
|
||||
statusCode: response.status,
|
||||
headers,
|
||||
rawHeaders: headers,
|
||||
}
|
||||
|
||||
let body = await response.arrayBuffer()
|
||||
for (const coding of codings) {
|
||||
if (coding === 'gzip') {
|
||||
body = gzipSync(body)
|
||||
} else if (coding === 'deflate') {
|
||||
body = deflateSync(body)
|
||||
} else if (coding === 'br') {
|
||||
body = brotliCompressSync(body)
|
||||
}
|
||||
}
|
||||
|
||||
await recordResponse(new Response(body, response))
|
||||
})
|
||||
|
||||
// Intercept "res.once('end', ...)"-like event
|
||||
async function recordResponse(mswResponse) {
|
||||
const response = mswResponse.clone()
|
||||
debug(thisRecordingId, proto, 'intercepted request ended')
|
||||
|
||||
let reqheaders
|
||||
// Ignore request headers completely unless it was explicitly enabled by the user (see README)
|
||||
if (enableReqHeadersRecording) {
|
||||
// We never record user-agent headers as they are worse than useless -
|
||||
// they actually make testing more difficult without providing any benefit (see README)
|
||||
reqheaders = Object.fromEntries(request.headers.entries())
|
||||
common.deleteHeadersField(reqheaders, 'user-agent')
|
||||
}
|
||||
|
||||
const headers = Object.fromEntries(response.headers.entries())
|
||||
const res = {
|
||||
statusCode: response.status,
|
||||
headers,
|
||||
rawHeaders: headers,
|
||||
}
|
||||
|
||||
const generateFn = outputObjects
|
||||
? generateRequestAndResponseObject
|
||||
: generateRequestAndResponse
|
||||
let out = generateFn({
|
||||
req: options,
|
||||
bodyChunks: [Buffer.from(await request.arrayBuffer())],
|
||||
options,
|
||||
res,
|
||||
dataChunks: [Buffer.from(await response.arrayBuffer())],
|
||||
reqheaders,
|
||||
})
|
||||
|
||||
debug('out:', out)
|
||||
|
||||
// Check that the request was made during the current recording.
|
||||
// If it hasn't then skip it. There is no other simple way to handle
|
||||
// this as it depends on the timing of requests and responses. Throwing
|
||||
// will make some recordings/unit tests fail randomly depending on how
|
||||
// fast/slow the response arrived.
|
||||
// If you are seeing this error then you need to make sure that all
|
||||
// the requests made during a single recording session finish before
|
||||
// ending the same recording session.
|
||||
if (thisRecordingId !== currentRecordingId) {
|
||||
debug('skipping recording of an out-of-order request', out)
|
||||
return
|
||||
}
|
||||
|
||||
outputs.push(out)
|
||||
|
||||
if (!dontPrint) {
|
||||
if (useSeparator) {
|
||||
if (typeof out !== 'string') {
|
||||
out = JSON.stringify(out, null, 2)
|
||||
}
|
||||
logging(SEPARATOR + out + SEPARATOR)
|
||||
} else {
|
||||
logging(out)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
debug('finished setting up intercepting')
|
||||
|
||||
// We override both the http and the https modules; when we are
|
||||
// serializing the request, we need to know which was called.
|
||||
// By stuffing the state, we can make sure that nock records
|
||||
// the intended protocol.
|
||||
if (proto === 'https') {
|
||||
options.proto = 'https'
|
||||
}
|
||||
const generateFn = outputObjects
|
||||
? generateRequestAndResponseObject
|
||||
: generateRequestAndResponse
|
||||
let out = generateFn({
|
||||
req: options,
|
||||
bodyChunks: [Buffer.from(await request.arrayBuffer())],
|
||||
options,
|
||||
res,
|
||||
dataChunks: [Buffer.from(await response.arrayBuffer())],
|
||||
reqheaders,
|
||||
})
|
||||
|
||||
// This is a massive change, we are trying to change minimum code, so we emit end event here
|
||||
// because mswjs take care for these events
|
||||
// TODO: refactor the recorder, we no longer need all the listeners and can just record the request we get from MSW
|
||||
req.emit('response')
|
||||
debug('out:', out)
|
||||
|
||||
// Check that the request was made during the current recording.
|
||||
// If it hasn't then skip it. There is no other simple way to handle
|
||||
// this as it depends on the timing of requests and responses. Throwing
|
||||
// will make some recordings/unit tests fail randomly depending on how
|
||||
// fast/slow the response arrived.
|
||||
// If you are seeing this error then you need to make sure that all
|
||||
// the requests made during a single recording session finish before
|
||||
// ending the same recording session.
|
||||
if (thisRecordingId !== currentRecordingId) {
|
||||
debug('skipping recording of an out-of-order request', out)
|
||||
return
|
||||
}
|
||||
|
||||
outputs.push(out)
|
||||
|
||||
if (!dontPrint) {
|
||||
if (useSeparator) {
|
||||
if (typeof out !== 'string') {
|
||||
out = JSON.stringify(out, null, 2)
|
||||
}
|
||||
logging(SEPARATOR + out + SEPARATOR)
|
||||
} else {
|
||||
logging(out)
|
||||
}
|
||||
}
|
||||
|
||||
debug('finished setting up intercepting')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
4
node_modules/nock/package.json
generated
vendored
4
node_modules/nock/package.json
generated
vendored
@@ -7,7 +7,7 @@
|
||||
"testing",
|
||||
"isolation"
|
||||
],
|
||||
"version": "14.0.0",
|
||||
"version": "14.0.1",
|
||||
"author": "Pedro Teixeira <pedro.teixeira@gmail.com>",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -17,7 +17,7 @@
|
||||
"url": "https://github.com/nock/nock/issues"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
"node": ">=18.20.0 <20 || >=20.12.1"
|
||||
},
|
||||
"main": "./index.js",
|
||||
"types": "types",
|
||||
|
||||
5
node_modules/semver/classes/semver.js
generated
vendored
5
node_modules/semver/classes/semver.js
generated
vendored
@@ -1,6 +1,6 @@
|
||||
const debug = require('../internal/debug')
|
||||
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')
|
||||
const { safeRe: re, t } = require('../internal/re')
|
||||
const { safeRe: re, safeSrc: src, t } = require('../internal/re')
|
||||
|
||||
const parseOptions = require('../internal/parse-options')
|
||||
const { compareIdentifiers } = require('../internal/identifiers')
|
||||
@@ -182,7 +182,8 @@ class SemVer {
|
||||
}
|
||||
// Avoid an invalid semver results
|
||||
if (identifier) {
|
||||
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])
|
||||
const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`)
|
||||
const match = `-${identifier}`.match(r)
|
||||
if (!match || match[1] !== identifier) {
|
||||
throw new Error(`invalid identifier: ${identifier}`)
|
||||
}
|
||||
|
||||
2
node_modules/semver/internal/re.js
generated
vendored
2
node_modules/semver/internal/re.js
generated
vendored
@@ -10,6 +10,7 @@ exports = module.exports = {}
|
||||
const re = exports.re = []
|
||||
const safeRe = exports.safeRe = []
|
||||
const src = exports.src = []
|
||||
const safeSrc = exports.safeSrc = []
|
||||
const t = exports.t = {}
|
||||
let R = 0
|
||||
|
||||
@@ -42,6 +43,7 @@ const createToken = (name, value, isGlobal) => {
|
||||
debug(name, index, value)
|
||||
t[name] = index
|
||||
src[index] = value
|
||||
safeSrc[index] = safe
|
||||
re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
|
||||
safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)
|
||||
}
|
||||
|
||||
2
node_modules/semver/package.json
generated
vendored
2
node_modules/semver/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "semver",
|
||||
"version": "7.7.0",
|
||||
"version": "7.7.1",
|
||||
"description": "The semantic version parser used by npm.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user